Improve mobile UI and add infinite scroll
This commit is contained in:
@@ -207,22 +207,16 @@
|
||||
Lihat
|
||||
</button>
|
||||
</form>
|
||||
{{if gt .KPI.InvitedStaff 0}}
|
||||
<div class="rounded-xl bg-brand-50 px-3 py-2 text-center">
|
||||
<p class="text-xs text-slate-500">Invited Staff</p>
|
||||
<p class="num text-sm font-semibold text-brand-600">{{.KPI.InvitedStaff}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- KPI Cards — SSE swap -->
|
||||
<section id="sse-kpi" class="grid gap-4 sm:grid-cols-3 sse-anim-target"
|
||||
<section id="sse-kpi" class="grid gap-4 sm:grid-cols-2 xl:grid-cols-4 sse-anim-target"
|
||||
sse-swap="kpi" hx-swap="innerHTML">
|
||||
<span class="sse-running-bar" aria-hidden="true"></span>
|
||||
<span class="sse-updating-label" aria-hidden="true">Updating...</span>
|
||||
{{range $i := seq 3}}
|
||||
{{range $i := seq 4}}
|
||||
<div class="card h-28 animate-pulse bg-slate-50"></div>
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
{{define "kpi"}}
|
||||
<!-- Invited Staff -->
|
||||
<article class="card border-l-4 border-l-brand-200 p-4">
|
||||
<div class="flex items-start justify-between">
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-slate-400">Invited Staff</p>
|
||||
<svg class="h-4 w-4 text-brand-300" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5.121 17.804A9.956 9.956 0 0112 15c2.2 0 4.236.711 5.879 1.915M15 11a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="num mt-3 text-3xl font-semibold text-slate-900">{{.InvitedStaff}}</p>
|
||||
<p class="mt-1 text-xs text-slate-400">Total staff undangan</p>
|
||||
</article>
|
||||
|
||||
<!-- Total Staff -->
|
||||
<article class="card border-l-4 border-l-brand-300 p-4">
|
||||
<div class="flex items-start justify-between">
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .Rows}}
|
||||
<div class="p-3">
|
||||
<table class="min-w-full text-sm">
|
||||
<div class="overflow-x-auto p-3">
|
||||
<table class="min-w-full text-sm md:table-fixed">
|
||||
<thead>
|
||||
<tr class="text-left text-xs font-semibold uppercase tracking-wide text-slate-400">
|
||||
<th class="px-3 py-2">Station</th>
|
||||
<th class="px-3 py-2 text-right">Sudah</th>
|
||||
<th class="hidden px-3 py-2 text-right sm:table-cell">Sudah</th>
|
||||
<th class="px-3 py-2 text-right">Belum</th>
|
||||
<th class="px-3 py-2 text-right">Total</th>
|
||||
<th class="px-3 py-2 w-40">Progress</th>
|
||||
<th class="px-3 py-2 sm:w-40">Progress</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-50">
|
||||
@@ -29,7 +29,7 @@
|
||||
<td class="px-3 py-2.5 font-medium text-slate-700">
|
||||
{{.Station | stationShort}}
|
||||
</td>
|
||||
<td class="num px-3 py-2.5 text-right font-semibold text-slate-900">{{.Processed}}</td>
|
||||
<td class="num hidden px-3 py-2.5 text-right font-semibold text-slate-900 sm:table-cell">{{.Processed}}</td>
|
||||
<td class="num px-3 py-2.5 text-right text-amber-600">{{.Pending}}</td>
|
||||
<td class="num px-3 py-2.5 text-right text-slate-400">{{.Total}}</td>
|
||||
<td class="px-3 py-2.5">
|
||||
|
||||
Reference in New Issue
Block a user