Treat all Now Serving cards equally and announce every ticket change.
Deploy Ladill Queue / deploy (push) Successful in 1m56s
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user