Speed up Queue board loads by dropping sync and gate side effects.
Deploy Ladill Care / deploy (push) Successful in 1m22s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user