Add service-point routing so call-next cannot steal assigned tickets.
Deploy Ladill Queue / deploy (push) Successful in 2m17s

Counters gain destination/staff metadata; tickets can be pre-assigned to a
service point with assigned_only queues for healthcare while shared_pool
preserves generic bank/government behavior. Display and announcements expose
ticket, staff, and destination clearly for Care and public boards.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 17:21:56 +00:00
co-authored by Cursor
parent 2d1f8c1eff
commit 0854b431bc
17 changed files with 753 additions and 42 deletions
@@ -40,6 +40,9 @@ class CounterController extends Controller
$validated = $request->validate([
'name' => ['required', 'string', 'max:255'],
'code' => ['nullable', 'string', 'max:50'],
'destination' => ['nullable', 'string', 'max:255'],
'staff_ref' => ['nullable', 'string', 'max:191'],
'staff_display_name' => ['nullable', 'string', 'max:255'],
'branch_id' => ['nullable', 'integer'],
'branch_name' => ['nullable', 'string', 'max:255'],
'department_id' => ['nullable', 'integer'],
@@ -65,6 +68,15 @@ class CounterController extends Controller
$existing->update([
'name' => $validated['name'],
'code' => $validated['code'] ?? $existing->code,
'destination' => array_key_exists('destination', $validated)
? $validated['destination']
: $existing->destination,
'staff_ref' => array_key_exists('staff_ref', $validated)
? $validated['staff_ref']
: $existing->staff_ref,
'staff_display_name' => array_key_exists('staff_display_name', $validated)
? $validated['staff_display_name']
: $existing->staff_display_name,
'branch_id' => $branch->id,
'department_id' => $validated['department_id'] ?? $existing->department_id,
'is_active' => array_key_exists('is_active', $validated)
@@ -86,6 +98,9 @@ class CounterController extends Controller
'department_id' => $validated['department_id'] ?? null,
'name' => $validated['name'],
'code' => $validated['code'] ?? null,
'destination' => $validated['destination'] ?? null,
'staff_ref' => $validated['staff_ref'] ?? null,
'staff_display_name' => $validated['staff_display_name'] ?? null,
'status' => 'offline',
'is_active' => array_key_exists('is_active', $validated) ? (bool) $validated['is_active'] : true,
'settings' => $externalKey !== '' ? ['external_key' => $externalKey] : null,
@@ -106,6 +121,9 @@ class CounterController extends Controller
$validated = $request->validate([
'name' => ['sometimes', 'string', 'max:255'],
'code' => ['nullable', 'string', 'max:50'],
'destination' => ['nullable', 'string', 'max:255'],
'staff_ref' => ['nullable', 'string', 'max:191'],
'staff_display_name' => ['nullable', 'string', 'max:255'],
'is_active' => ['sometimes', 'boolean'],
'queue_ids' => ['nullable', 'array'],
'queue_ids.*' => ['uuid'],
@@ -116,6 +134,11 @@ class CounterController extends Controller
$counter->update(array_filter([
'name' => $validated['name'] ?? null,
'code' => array_key_exists('code', $validated) ? $validated['code'] : null,
'destination' => array_key_exists('destination', $validated) ? $validated['destination'] : null,
'staff_ref' => array_key_exists('staff_ref', $validated) ? $validated['staff_ref'] : null,
'staff_display_name' => array_key_exists('staff_display_name', $validated)
? $validated['staff_display_name']
: null,
'is_active' => array_key_exists('is_active', $validated) ? (bool) $validated['is_active'] : null,
], fn ($v) => $v !== null));
@@ -181,9 +204,13 @@ class CounterController extends Controller
'uuid' => $c->uuid,
'name' => $c->name,
'code' => $c->code,
'destination' => $c->displayDestination(),
'staff_ref' => $c->staff_ref,
'staff_display_name' => $c->staff_display_name,
'status' => $c->status,
'is_active' => $c->is_active,
'branch' => $c->branch?->name,
'department_id' => $c->department_id,
'external_key' => data_get($c->settings, 'external_key'),
'queues' => $c->serviceQueues->map(fn (ServiceQueue $q) => [
'uuid' => $q->uuid,