Fix display voice prompts requiring browser unlock and failed acks.
Deploy Ladill Queue / deploy (push) Successful in 28s
Deploy Ladill Queue / deploy (push) Successful in 28s
Add tap-to-enable speech overlay, stop marking announcements played on TTS errors, pick voices by locale, and scope pending announcements to the display's queues. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Services\Qms;
|
||||
use App\Models\Counter;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\VoiceAnnouncement;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class VoiceAnnouncementService
|
||||
{
|
||||
@@ -41,13 +40,17 @@ class VoiceAnnouncementService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<int>|null $queueIds
|
||||
* @return list<array<string, mixed>>
|
||||
*/
|
||||
public function pendingForBranch(int $branchId, int $limit = 10): array
|
||||
public function pendingForBranch(int $branchId, ?array $queueIds = null, int $limit = 10): array
|
||||
{
|
||||
return VoiceAnnouncement::query()
|
||||
->where('branch_id', $branchId)
|
||||
->where('status', 'pending')
|
||||
->when($queueIds, function ($query, array $queueIds) {
|
||||
$query->whereHas('ticket', fn ($ticket) => $ticket->whereIn('service_queue_id', $queueIds));
|
||||
})
|
||||
->orderBy('id')
|
||||
->limit($limit)
|
||||
->get()
|
||||
|
||||
Reference in New Issue
Block a user