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
+8
View File
@@ -367,12 +367,20 @@ class CareQueueBridgeTest extends TestCase
'reason' => 'Toothache',
]);
// Board GET must remain read-only; ticket backfill is explicit (Call next / artisan).
$this->actingAs($this->owner)
->get(route('care.queue.index', ['branch_id' => $this->branch->id]))
->assertOk()
->assertSee('Toothache');
$appointment = Appointment::query()->where('patient_id', $this->patient->id)->first();
$this->assertNull($appointment?->queue_ticket_uuid);
$issued = app(\App\Services\Care\CareQueueBridge::class)
->syncMissingAppointmentTickets($this->organization->fresh(), (int) $this->branch->id, 10);
$this->assertSame(1, $issued);
$appointment = $appointment->fresh();
$this->assertNotNull($appointment?->queue_ticket_uuid);
$this->assertStringStartsWith('DEN', (string) $appointment->queue_ticket_number);
$this->assertDatabaseHas('care_service_queues', [