Initial Ladill Queue release — enterprise QMS standalone app.
Deploy Ladill Queue / deploy (push) Successful in 56s
Deploy Ladill Queue / deploy (push) Successful in 56s
Phases 1–6: tickets, counters, displays, appointments, workflows, rules, analytics, reports, feedback, admin, device API, and Gitea deploy workflow for queue.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Qms;
|
||||
|
||||
use App\Models\Ticket;
|
||||
|
||||
class TicketPresenter
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public static function toArray(Ticket $ticket, bool $includeQr = true): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $ticket->uuid,
|
||||
'ticket_number' => $ticket->ticket_number,
|
||||
'status' => $ticket->status,
|
||||
'priority' => $ticket->priority,
|
||||
'position' => $ticket->position,
|
||||
'customer_name' => $ticket->customer_name,
|
||||
'customer_phone' => $ticket->customer_phone,
|
||||
'source' => $ticket->source,
|
||||
'estimated_wait_seconds' => $ticket->estimated_wait_seconds,
|
||||
'issued_at' => $ticket->issued_at?->toIso8601String(),
|
||||
'called_at' => $ticket->called_at?->toIso8601String(),
|
||||
'queue' => $ticket->serviceQueue ? [
|
||||
'uuid' => $ticket->serviceQueue->uuid,
|
||||
'name' => $ticket->serviceQueue->name,
|
||||
'prefix' => $ticket->serviceQueue->prefix,
|
||||
'color' => $ticket->serviceQueue->color,
|
||||
] : null,
|
||||
'counter' => $ticket->counter ? [
|
||||
'uuid' => $ticket->counter->uuid,
|
||||
'name' => $ticket->counter->name,
|
||||
] : null,
|
||||
'track_url' => $includeQr ? route('qms.mobile.show', $ticket->qr_token) : null,
|
||||
'barcode' => $ticket->barcode,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user