Redesign display admin show page and public waiting-area screen.
Deploy Ladill Queue / deploy (push) Successful in 33s
Deploy Ladill Queue / deploy (push) Successful in 33s
Add corporate layout, live preview, URL copy, queue details, and a polished TV display with clock, stats sidebar, and branded now-serving cards. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,6 +19,7 @@ class DisplayPublicController extends Controller
|
||||
public function show(string $token): View
|
||||
{
|
||||
$screen = $this->displays->findByToken($token) ?? abort(404);
|
||||
$screen->loadMissing(['organization', 'branch']);
|
||||
$this->displays->touch($screen);
|
||||
|
||||
return view('qms.display.public', [
|
||||
|
||||
@@ -44,9 +44,23 @@ class DisplayScreenController extends Controller
|
||||
{
|
||||
$this->authorizeAbility($request, 'displays.view');
|
||||
$this->authorizeOwner($request, $display);
|
||||
$display->load('branch');
|
||||
$display->load(['branch', 'organization']);
|
||||
|
||||
return view('qms.displays.show', compact('display'));
|
||||
$member = app(OrganizationResolver::class)->memberFor($request->user());
|
||||
$permissions = app(QmsPermissions::class);
|
||||
|
||||
$queueIds = array_map('intval', $display->service_queue_ids ?? []);
|
||||
$queues = ServiceQueue::query()
|
||||
->whereIn('id', $queueIds)
|
||||
->orderBy('name')
|
||||
->get();
|
||||
|
||||
return view('qms.displays.show', [
|
||||
'display' => $display,
|
||||
'queues' => $queues,
|
||||
'publicUrl' => route('qms.display.public', $display->access_token),
|
||||
'canManage' => $permissions->can($member, 'displays.manage'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function create(Request $request): View
|
||||
|
||||
@@ -26,6 +26,7 @@ class DisplayService
|
||||
*/
|
||||
public function payload(DisplayScreen $screen): array
|
||||
{
|
||||
$screen->loadMissing(['branch', 'organization']);
|
||||
$queueIds = $screen->service_queue_ids ?? [];
|
||||
$queues = ServiceQueue::query()
|
||||
->whereIn('id', $queueIds)
|
||||
@@ -62,6 +63,8 @@ class DisplayService
|
||||
'screen' => [
|
||||
'name' => $screen->name,
|
||||
'layout' => $screen->layout,
|
||||
'branch_name' => $screen->branch?->name,
|
||||
'organization_name' => $screen->organization?->name,
|
||||
],
|
||||
'now_serving' => $nowServing,
|
||||
'waiting_count' => $waiting,
|
||||
|
||||
Reference in New Issue
Block a user