Add Care waiting-area TV displays with browser TTS voice.
Deploy Ladill Care / deploy (push) Failing after 57s
Deploy Ladill Care / deploy (push) Failing after 57s
Call-next and recall queue announcements for lobby screens without Ladill Queue. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,7 +7,9 @@ use App\Models\CareServicePoint;
|
||||
use App\Models\CareServiceQueue;
|
||||
use App\Models\Organization;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use InvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* In-app Care Queue Engine — issue / call-next / serve / complete / recall.
|
||||
@@ -149,6 +151,15 @@ class CareQueueEngine
|
||||
$waiting->setRelation('servicePoint', $point);
|
||||
$waiting->setRelation('serviceQueue', $queue);
|
||||
|
||||
try {
|
||||
app(CareVoiceAnnouncementService::class)->announceCalled($waiting, $point);
|
||||
} catch (Throwable $e) {
|
||||
Log::warning('Care voice announcement failed on call-next', [
|
||||
'ticket_id' => $waiting->id,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->toApiArray($waiting);
|
||||
});
|
||||
}
|
||||
@@ -246,6 +257,23 @@ class CareQueueEngine
|
||||
'status' => CareQueueTicket::STATUS_CALLED,
|
||||
'called_at' => now(),
|
||||
])->save();
|
||||
|
||||
$point = $ticket->servicePoint;
|
||||
if (! $point && $ticket->service_point_id) {
|
||||
$ticket->loadMissing('servicePoint');
|
||||
$point = $ticket->servicePoint;
|
||||
}
|
||||
|
||||
if ($point) {
|
||||
try {
|
||||
app(CareVoiceAnnouncementService::class)->announceCalled($ticket, $point);
|
||||
} catch (Throwable $e) {
|
||||
Log::warning('Care voice announcement failed on recall', [
|
||||
'ticket_id' => $ticket->id,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function markSkipped(CareQueueTicket $ticket): void
|
||||
|
||||
Reference in New Issue
Block a user