Treat all Now Serving cards equally and announce every ticket change.
Deploy Ladill Queue / deploy (push) Successful in 1m56s

Remove newest-card highlighting so every active service point looks the same, sort the board stably by destination, and have the display announce whenever a counter’s ticket changes (falling back when a server voice row is missing).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 18:20:45 +00:00
co-authored by Cursor
parent 9a11098674
commit 5356118fd8
5 changed files with 105 additions and 38 deletions
+13 -1
View File
@@ -35,7 +35,8 @@ class DisplayService
->get();
// One active ticket per destination (service point / counter). Older called/serving
// tickets at the same window must not crowd the public board.
// tickets at the same window must not crowd the public board. Order is stable by
// destination so every serving point is presented equally (no "newest" primacy).
$nowServing = Ticket::query()
->whereIn('service_queue_id', $queueIds)
->whereIn('status', ['called', 'serving'])
@@ -60,9 +61,20 @@ class DisplayService
'counter' => $point?->displayDestination() ?? $point?->name,
'destination' => $point?->displayDestination(),
'staff_display_name' => $point?->staff_display_name,
'point_key' => $point
? 'counter:'.$point->id
: 'queue:'.$t->service_queue_id,
'announcement_text' => TicketPresenter::announcementText($t, $point),
'called_at' => optional($t->called_at)?->toIso8601String(),
];
})
->sortBy(fn (array $item) => sprintf(
'%s|%s|%s',
mb_strtolower((string) ($item['queue_name'] ?? '')),
mb_strtolower((string) ($item['destination'] ?? $item['counter'] ?? '')),
(string) ($item['ticket_number'] ?? ''),
))
->values()
->all();
$waiting = Ticket::query()