Speed up Queue board loads by dropping sync and gate side effects.
Deploy Ladill Care / deploy (push) Successful in 1m22s

Stop issuing missing tickets and refreshing financial gates on every GET;
eager-load advances, cap board rows, and cache specialty department maps.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 19:50:03 +00:00
co-authored by Cursor
parent 93c7a71ee5
commit a5bbbe23b1
10 changed files with 512 additions and 76 deletions
+9 -11
View File
@@ -1,6 +1,6 @@
@php
$specialtyLabel = $specialtyLabel ?? null;
$queueBridge = app(\App\Services\Care\CareQueueBridge::class);
$specialtyDepartmentMap = $specialtyDepartmentMap ?? [];
@endphp
<x-app-layout title="Queue">
<div class="space-y-6">
@@ -40,16 +40,14 @@
'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,
]);
}
'openInCareUrl' => function ($appointment) use ($specialtyDepartmentMap) {
$deptId = (int) ($appointment->department_id ?? 0);
$module = $deptId > 0 ? ($specialtyDepartmentMap[$deptId] ?? null) : null;
if ($module && $appointment->visit) {
return route('care.specialty.workspace', [
'module' => $module,
'visit' => $appointment->visit,
]);
}
return $appointment->consultation