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:
@@ -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', [
|
||||
|
||||
Reference in New Issue
Block a user