Show patients in queue on the doctor dashboard.
Deploy Ladill Care / deploy (push) Successful in 25s
Deploy Ladill Care / deploy (push) Successful in 25s
Clinical staff without admin KPIs get waiting and in-consultation lists in the empty space. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -129,6 +129,69 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! empty($showPatientQueue))
|
||||
<section class="mt-6 rounded-2xl border border-slate-200 bg-white">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3 border-b border-slate-100 px-5 py-4">
|
||||
<div>
|
||||
<h2 class="text-sm font-semibold text-slate-900">Patients in queue</h2>
|
||||
<p class="mt-0.5 text-xs text-slate-500">
|
||||
{{ $patientQueue->count() }} waiting
|
||||
· {{ $inConsultation->count() }} in consultation
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ route('care.queue.index', array_filter(['practitioner_id' => $practitionerId])) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">Open full queue</a>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-0 lg:grid-cols-2 lg:divide-x lg:divide-slate-100">
|
||||
<div class="px-5 py-4">
|
||||
<h3 class="text-xs font-semibold uppercase tracking-wide text-slate-500">Waiting</h3>
|
||||
<div class="mt-3 space-y-2">
|
||||
@forelse ($patientQueue->take(8) as $appointment)
|
||||
<div class="flex items-center justify-between gap-3 rounded-xl border border-slate-100 bg-slate-50 px-3 py-3">
|
||||
<div class="min-w-0">
|
||||
<p class="truncate font-medium text-slate-900">
|
||||
@if ($appointment->queue_position)
|
||||
<span class="mr-1.5 inline-flex h-5 w-5 items-center justify-center rounded-full bg-sky-100 text-[10px] font-bold text-sky-700">{{ $appointment->queue_position }}</span>
|
||||
@endif
|
||||
{{ $appointment->patient?->fullName() ?? 'Patient' }}
|
||||
</p>
|
||||
<p class="truncate text-xs text-slate-500">{{ $appointment->patient?->patient_number }} · {{ $appointment->reason ?? 'No reason noted' }}</p>
|
||||
</div>
|
||||
@if (! empty($canConsult))
|
||||
<form method="POST" action="{{ route('care.queue.start', $appointment) }}" class="shrink-0">
|
||||
@csrf
|
||||
<button type="submit" class="rounded-lg bg-sky-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-sky-700">Start</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
@empty
|
||||
<p class="rounded-xl border border-dashed border-slate-200 px-4 py-8 text-center text-sm text-slate-500">No patients waiting right now.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-slate-100 px-5 py-4 lg:border-t-0">
|
||||
<h3 class="text-xs font-semibold uppercase tracking-wide text-slate-500">In consultation</h3>
|
||||
<div class="mt-3 space-y-2">
|
||||
@forelse ($inConsultation->take(8) as $appointment)
|
||||
<div class="flex items-center justify-between gap-3 rounded-xl border border-emerald-100 bg-emerald-50 px-3 py-3">
|
||||
<div class="min-w-0">
|
||||
<p class="truncate font-medium text-slate-900">{{ $appointment->patient?->fullName() ?? 'Patient' }}</p>
|
||||
<p class="truncate text-xs text-slate-500">{{ $appointment->practitioner?->name ?? 'Unassigned' }}</p>
|
||||
</div>
|
||||
@if ($appointment->consultation)
|
||||
<a href="{{ route('care.consultations.show', $appointment->consultation) }}" class="shrink-0 text-sm font-medium text-sky-600 hover:text-sky-700">Open</a>
|
||||
@endif
|
||||
</div>
|
||||
@empty
|
||||
<p class="rounded-xl border border-dashed border-slate-200 px-4 py-8 text-center text-sm text-slate-500">No active consultations.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
@if (count($organizationCards) > 0)
|
||||
@php
|
||||
$orgCols = match (count($organizationCards)) {
|
||||
|
||||
Reference in New Issue
Block a user