Files
ladill-care/resources/views/care/queue/index.blade.php
T
isaaccladandCursor 93c7a71ee5
Deploy Ladill Care / deploy (push) Successful in 39s
Redesign Care patient-flow board and remove Queue from nurses.
Shared queue-board is now a Waiting/Called/In care/Done stage board with prominent tickets and Call next; nurses lose queue.manage and canAccessPatientQueue so /queue and queue nav are gated while specialty workspaces stay available.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 19:42:44 +00:00

62 lines
2.9 KiB
PHP

@php
$specialtyLabel = $specialtyLabel ?? null;
$queueBridge = app(\App\Services\Care\CareQueueBridge::class);
@endphp
<x-app-layout title="Queue">
<div class="space-y-6">
<x-care.page-hero
:badge="$specialtyLabel
? $specialtyLabel.' · Patient flow'
: 'Ladill Care · Patient flow'"
:title="$specialtyLabel ? $specialtyLabel.' queue' : 'Patient flow'"
:description="$specialtyLabel
? 'Move '.$specialtyLabel.' patients from waiting through called, in care, and done.'
: 'Move patients from waiting through called, in care, and done — one board for your branch.'"
:stats="[
['value' => number_format($heroStats['waiting']), 'label' => 'Waiting'],
['value' => number_format($heroStats['in_consultation']), 'label' => $specialtyLabel ? 'In care' : 'In consultation'],
['value' => number_format($heroStats['today']), 'label' => 'Today'],
]">
@if ($canManageQueue)
<x-slot name="actions">
<a href="{{ route('care.appointments.walk-in.create') }}" class="btn-primary">Walk-in</a>
</x-slot>
@endif
</x-care.page-hero>
@include('care.partials.queue-board', [
'queue' => $queue,
'inConsultation' => $inConsultation,
'done' => $done ?? collect(),
'queueIntegration' => $queueIntegration ?? null,
'branchId' => $branchId,
'canConsult' => $canConsult,
'lockToPractitioner' => $lockToPractitioner ?? false,
'canSwitchBranch' => $canSwitchBranch ?? false,
'branches' => $branches ?? collect(),
'practitioners' => $practitioners ?? collect(),
'practitionerId' => $practitionerId ?? null,
'queueCallNextRoute' => 'care.queue.call-next',
'queueCallNextParams' => array_filter(['practitioner_id' => $practitionerId]),
'startRouteName' => 'care.queue.start',
'inCareLabel' => $specialtyLabel ? 'In care' : 'In consultation',
'openInCareUrl' => function ($appointment) use ($queueBridge) {
$organization = $appointment->organization;
if ($organization && $appointment->visit) {
$context = $queueBridge->contextForAppointment($organization, $appointment);
if ($context !== \App\Services\Care\CareQueueContexts::CONSULTATION) {
return route('care.specialty.workspace', [
'module' => $context,
'visit' => $appointment->visit,
]);
}
}
return $appointment->consultation
? route('care.consultations.show', $appointment->consultation)
: null;
},
])
</div>
</x-app-layout>