81 lines
4.2 KiB
HTML
81 lines
4.2 KiB
HTML
{{define "patients"}}
|
|
{{if not .Patients}}
|
|
<div class="flex flex-col items-center justify-center py-16 text-slate-400">
|
|
<svg class="mb-3 h-10 w-10 text-slate-300" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"/>
|
|
</svg>
|
|
<p class="text-sm font-medium">Belum ada data pasien pada tanggal ini.</p>
|
|
</div>
|
|
{{else}}
|
|
<div class="divide-y divide-slate-100">
|
|
{{range .Patients}}
|
|
{{if and (gt .DoneCount 0) (eq .DoneCount (len .Stations))}}
|
|
<div class="px-5 py-4 bg-emerald-50/60 transition-colors hover:bg-emerald-50">
|
|
{{else}}
|
|
<div class="px-5 py-4 hover:bg-slate-50 transition-colors">
|
|
{{end}}
|
|
<!-- Row atas: nama + waktu -->
|
|
<div class="flex flex-wrap items-center justify-between gap-3">
|
|
<div class="flex items-center gap-2.5">
|
|
<div class="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-brand-50 text-xs font-bold text-brand-600">
|
|
{{.Name | initials}}
|
|
</div>
|
|
<div>
|
|
<p class="font-semibold text-slate-800">{{.Name}}</p>
|
|
{{if $.IsRange}}<p class="text-xs text-slate-400 num">{{.Date | fmtDate}}</p>{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-3 text-xs">
|
|
<span class="num text-slate-500">
|
|
Masuk: <span class="font-semibold text-slate-700">{{.InTime}}</span>
|
|
</span>
|
|
{{if .HasOut}}
|
|
<span class="inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2.5 py-1 font-semibold text-emerald-700 num">
|
|
<svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
|
|
Keluar: {{.OutTime}}
|
|
</span>
|
|
{{else}}
|
|
<span class="inline-flex items-center gap-1 rounded-full bg-amber-50 px-2.5 py-1 font-semibold text-amber-600">
|
|
<span class="h-1.5 w-1.5 rounded-full bg-amber-400 animate-pulse"></span>
|
|
Dalam proses
|
|
</span>
|
|
{{end}}
|
|
<span class="text-slate-400">
|
|
<span class="font-semibold text-brand-600">{{.DoneCount}}</span>/{{len .Stations}} station selesai
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- Row bawah: station badges -->
|
|
{{if .Stations}}
|
|
<div class="mt-2.5 flex flex-wrap gap-1.5 pl-10">
|
|
{{range .Stations}}
|
|
{{if .Done}}
|
|
<span class="inline-flex max-w-full flex-col gap-0.5 rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-medium text-emerald-800 cursor-default">
|
|
<span class="inline-flex items-center gap-1">
|
|
<svg class="h-3 w-3 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
|
|
{{.Station}}
|
|
</span>
|
|
<span class="num pl-4 text-[10px] font-semibold text-emerald-700/80">
|
|
Proses: {{if .ProcessAt}}{{.ProcessAt}}{{else}}-{{end}} | Selesai: {{if .DoneAt}}{{.DoneAt}}{{else}}-{{end}}
|
|
</span>
|
|
</span>
|
|
{{else}}
|
|
<span class="inline-flex max-w-full flex-col gap-0.5 rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-500 cursor-default">
|
|
<span class="inline-flex items-center gap-1">
|
|
<svg class="h-3 w-3 flex-shrink-0 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
|
{{.Station}}
|
|
</span>
|
|
<span class="num pl-4 text-[10px] font-semibold text-slate-400">
|
|
Proses: {{if .ProcessAt}}{{.ProcessAt}}{{else}}-{{end}} | Selesai: {{if .DoneAt}}{{.DoneAt}}{{else}}-{{end}}
|
|
</span>
|
|
</span>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|