Stack queue card hierarchy: ticket, patient, then room/doctor.
Deploy Ladill Care / deploy (push) Successful in 1m42s

Stops cramming ticket status, destination, and patient name onto one line across Patient, Pharmacy, Lab, and specialty queues.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 06:16:50 +00:00
co-authored by Cursor
parent e94708d46c
commit e62cb24bfc
5 changed files with 96 additions and 88 deletions
+15 -14
View File
@@ -40,27 +40,28 @@
<div class="mt-4 space-y-3">
@forelse ($queue as $item)
<div class="flex items-center justify-between rounded-2xl border border-slate-200 bg-white p-4">
<div>
<p class="font-medium text-slate-900">
@if (! empty($queueIntegration['enabled']) && $item->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $item->queue_ticket_number,
'ticketStatus' => $item->queue_ticket_status,
])
@endif
{{ $item->patient->fullName() }} {{ $item->investigationType->name }}
</p>
<p class="text-xs text-slate-500">{{ $statuses[$item->status] ?? $item->status }} · {{ $item->priority }} · {{ $item->created_at->diffForHumans() }}</p>
<div class="flex items-start justify-between gap-4 rounded-2xl border border-slate-200 bg-white p-4">
<div class="min-w-0 flex-1 space-y-2">
@if (! empty($queueIntegration['enabled']) && $item->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $item->queue_ticket_number,
'ticketStatus' => $item->queue_ticket_status,
])
@endif
<div class="min-w-0">
<p class="truncate text-base font-semibold text-slate-900">{{ $item->patient->fullName() }}</p>
<p class="mt-0.5 truncate text-sm text-slate-700">{{ $item->investigationType->name }}</p>
<p class="mt-0.5 truncate text-xs text-slate-500">{{ $statuses[$item->status] ?? $item->status }} · {{ $item->priority }} · {{ $item->created_at->diffForHumans() }}</p>
</div>
</div>
<div class="flex items-center gap-2">
<div class="flex shrink-0 items-center gap-2">
@if (! empty($queueIntegration['enabled']) && $item->queue_ticket_uuid && ($item->queue_ticket_status ?? '') !== 'serving')
<form method="POST" action="{{ route('care.lab.queue.serve', $item) }}">
@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">Serve</button>
</form>
@endif
<a href="{{ route('care.lab.requests.show', $item) }}" class="text-sm text-sky-600">Open</a>
<a href="{{ route('care.lab.requests.show', $item) }}" class="text-sm font-medium text-sky-600">Open</a>
</div>
</div>
@empty
@@ -3,25 +3,28 @@
$number = $ticketNumber ?? null;
$destination = $destination ?? null;
$staffDisplayName = $staffDisplayName ?? null;
$showAssignment = ($showAssignment ?? true) && ($destination || $staffDisplayName);
@endphp
@if ($number)
<span class="mr-2 inline-flex flex-wrap items-center gap-1.5">
<span class="inline-flex h-7 min-w-[2.5rem] items-center justify-center rounded-md bg-sky-100 px-1.5 font-mono text-xs font-bold text-sky-800">{{ $number }}</span>
@if ($status)
<span @class([
'rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide',
'bg-amber-100 text-amber-800' => $status === 'waiting',
'bg-indigo-100 text-indigo-800' => $status === 'called',
'bg-emerald-100 text-emerald-800' => $status === 'serving',
'bg-slate-100 text-slate-600' => ! in_array($status, ['waiting', 'called', 'serving'], true),
])>{{ $status }}</span>
@endif
@if ($destination || $staffDisplayName)
<span class="text-[11px] font-medium text-slate-500">
<div class="min-w-0">
<div class="flex flex-wrap items-center gap-2">
<span class="inline-flex h-7 min-w-[2.75rem] items-center justify-center rounded-md bg-sky-100 px-2 font-mono text-xs font-bold tracking-wide text-sky-800">{{ $number }}</span>
@if ($status)
<span @class([
'rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide',
'bg-amber-100 text-amber-800' => $status === 'waiting',
'bg-indigo-100 text-indigo-800' => $status === 'called',
'bg-emerald-100 text-emerald-800' => $status === 'serving',
'bg-slate-100 text-slate-600' => ! in_array($status, ['waiting', 'called', 'serving'], true),
])>{{ $status }}</span>
@endif
</div>
@if ($showAssignment)
<p class="mt-1 truncate text-xs text-slate-500">
@if ($destination){{ $destination }}@endif
@if ($destination && $staffDisplayName) · @endif
@if ($destination && $staffDisplayName)<span class="text-slate-300"> · </span>@endif
@if ($staffDisplayName){{ $staffDisplayName }}@endif
</span>
</p>
@endif
</span>
</div>
@endif
@@ -28,18 +28,18 @@
@forelse ($queue as $rx)
<div class="rounded-2xl border border-slate-200 bg-white p-4">
<div class="flex items-start justify-between gap-4">
<div class="min-w-0 flex-1">
<p class="font-medium text-slate-900">
@if (! empty($queueIntegration['enabled']) && $rx->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $rx->queue_ticket_number,
'ticketStatus' => $rx->queue_ticket_status,
])
@endif
{{ $rx->patient->fullName() }}
</p>
<p class="text-xs text-slate-500">{{ $rx->patient->patient_number }} · {{ $rx->visit->branch?->name }}</p>
<ul class="mt-2 space-y-1 text-sm text-slate-700">
<div class="min-w-0 flex-1 space-y-2">
@if (! empty($queueIntegration['enabled']) && $rx->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $rx->queue_ticket_number,
'ticketStatus' => $rx->queue_ticket_status,
])
@endif
<div class="min-w-0">
<p class="truncate text-base font-semibold text-slate-900">{{ $rx->patient->fullName() }}</p>
<p class="mt-0.5 truncate text-xs text-slate-500">{{ $rx->patient->patient_number }} · {{ $rx->visit->branch?->name }}</p>
</div>
<ul class="space-y-1 text-sm text-slate-700">
@foreach ($rx->items as $item)
<li>{{ $item->is_procedure ? 'Procedure' : 'Med' }}: {{ $item->name }} {{ $item->dosage }} {{ $item->frequency }}</li>
@endforeach
+36 -33
View File
@@ -44,30 +44,32 @@
<div class="mt-4 space-y-3">
@forelse ($queue as $appointment)
<div @class([
'flex items-center justify-between rounded-xl border p-4',
'flex items-start justify-between gap-4 rounded-xl border p-4',
'border-indigo-200 bg-indigo-50/60' => ($appointment->queue_ticket_status ?? null) === 'called',
'border-emerald-200 bg-emerald-50' => ($appointment->queue_ticket_status ?? null) === 'serving',
'border-slate-100 bg-slate-50' => ! in_array($appointment->queue_ticket_status ?? null, ['called', 'serving'], true),
])>
<div>
<p class="font-medium text-slate-900">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $appointment->queue_ticket_number,
'ticketStatus' => $appointment->queue_ticket_status,
'destination' => $appointment->queue_destination,
'staffDisplayName' => $appointment->queue_staff_display_name,
])
@elseif (! empty($queueIntegration['enabled']) && ($appointment->queue_routing_status ?? '') === 'unresolved')
<span class="mr-2 text-[11px] font-medium text-amber-700">Unassigned</span>
@elseif ($appointment->queue_position)
<span class="mr-2 inline-flex h-6 w-6 items-center justify-center rounded-full bg-sky-100 text-xs font-bold text-sky-700">{{ $appointment->queue_position }}</span>
@endif
{{ $appointment->patient->fullName() }}
</p>
<p class="text-xs text-slate-500">{{ $appointment->patient->patient_number }} · {{ $appointment->reason ?? '—' }}</p>
<div class="min-w-0 flex-1 space-y-2">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $appointment->queue_ticket_number,
'ticketStatus' => $appointment->queue_ticket_status,
'destination' => $appointment->queue_destination,
'staffDisplayName' => $appointment->queue_staff_display_name,
])
@elseif (! empty($queueIntegration['enabled']) && ($appointment->queue_routing_status ?? '') === 'unresolved')
<span class="inline-flex rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-800">Unassigned</span>
@elseif ($appointment->queue_position)
<span class="inline-flex h-7 w-7 items-center justify-center rounded-full bg-sky-100 text-xs font-bold text-sky-700">{{ $appointment->queue_position }}</span>
@endif
<div class="min-w-0">
<p class="truncate text-base font-semibold text-slate-900">{{ $appointment->patient->fullName() }}</p>
<p class="mt-0.5 truncate text-xs text-slate-500">{{ $appointment->patient->patient_number }} · {{ $appointment->reason ?? '—' }}</p>
</div>
</div>
<div class="flex flex-wrap items-center justify-end gap-2">
<div class="flex shrink-0 flex-wrap items-center justify-end gap-2">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_uuid && in_array($appointment->queue_ticket_status ?? '', ['called', 'serving'], true) && $canConsult)
<form method="POST" action="{{ route('care.queue.recall', $appointment) }}">
@csrf
@@ -94,20 +96,21 @@
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">In consultation ({{ $inConsultation->count() }})</h2>
<div class="mt-4 space-y-3">
@forelse ($inConsultation as $appointment)
<div class="flex items-center justify-between rounded-xl border border-emerald-100 bg-emerald-50 p-4">
<div>
<p class="font-medium text-slate-900">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $appointment->queue_ticket_number,
'ticketStatus' => $appointment->queue_ticket_status,
])
@endif
{{ $appointment->patient->fullName() }}
</p>
<p class="text-xs text-slate-500">{{ $appointment->practitioner?->name ?? 'Unassigned' }}</p>
<div class="flex items-start justify-between gap-4 rounded-xl border border-emerald-100 bg-emerald-50 p-4">
<div class="min-w-0 flex-1 space-y-2">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $appointment->queue_ticket_number,
'ticketStatus' => $appointment->queue_ticket_status,
'showAssignment' => false,
])
@endif
<div class="min-w-0">
<p class="truncate text-base font-semibold text-slate-900">{{ $appointment->patient->fullName() }}</p>
<p class="mt-0.5 truncate text-xs text-slate-500">{{ $appointment->practitioner?->name ?? 'Unassigned' }}</p>
</div>
</div>
<div class="flex flex-wrap items-center justify-end gap-2">
<div class="flex shrink-0 flex-wrap items-center justify-end gap-2">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_uuid && in_array($appointment->queue_ticket_status ?? '', ['called', 'serving'], true) && $canConsult)
<form method="POST" action="{{ route('care.queue.recall', $appointment) }}">
@csrf
@@ -115,7 +118,7 @@
</form>
@endif
@if ($appointment->consultation)
<a href="{{ route('care.consultations.show', $appointment->consultation) }}" class="text-sm text-sky-600 hover:text-sky-700">Open</a>
<a href="{{ route('care.consultations.show', $appointment->consultation) }}" class="text-sm font-medium text-sky-600 hover:text-sky-700">Open</a>
@endif
</div>
</div>
+14 -13
View File
@@ -56,20 +56,21 @@
</div>
<div class="mt-3 space-y-2">
@forelse ($waiting as $appointment)
<div class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-3 py-3 text-sm">
<div>
<p class="font-medium text-slate-900">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $appointment->queue_ticket_number,
'ticketStatus' => $appointment->queue_ticket_status,
])
@endif
{{ $appointment->patient?->fullName() }}
</p>
<p class="text-xs text-slate-500">{{ $appointment->department?->name }} · {{ $appointment->practitioner?->name ?? 'Unassigned' }}</p>
<div class="flex items-start justify-between gap-4 rounded-xl border border-slate-100 bg-slate-50 px-3 py-3 text-sm">
<div class="min-w-0 flex-1 space-y-1.5">
@if (! empty($queueIntegration['enabled']) && $appointment->queue_ticket_number)
@include('care.partials.queue-ticket', [
'ticketNumber' => $appointment->queue_ticket_number,
'ticketStatus' => $appointment->queue_ticket_status,
'showAssignment' => false,
])
@endif
<div class="min-w-0">
<p class="truncate font-semibold text-slate-900">{{ $appointment->patient?->fullName() }}</p>
<p class="mt-0.5 truncate text-xs text-slate-500">{{ $appointment->department?->name }} · {{ $appointment->practitioner?->name ?? 'Unassigned' }}</p>
</div>
</div>
<a href="{{ route('care.appointments.show', $appointment) }}" class="text-sky-600">View</a>
<a href="{{ route('care.appointments.show', $appointment) }}" class="shrink-0 text-sky-600">View</a>
</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 in this specialty.</p>