Polish Queue Devices empty state and align sidebar with other apps.
Deploy Ladill Queue / deploy (push) Successful in 38s
Deploy Ladill Queue / deploy (push) Successful in 38s
Match Care/Frontdesk nav icon styling, admin icons, and settings footer; add proper table layouts and empty states for Devices and Displays. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,22 +1,75 @@
|
||||
<x-app-layout title="Devices">
|
||||
<div class="mb-6 flex justify-between">
|
||||
<h1 class="text-2xl font-semibold">Devices</h1>
|
||||
<a href="{{ route('qms.devices.create') }}" class="btn-primary">Register device</a>
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<div>
|
||||
<h1 class="text-xl font-semibold text-slate-900">Devices</h1>
|
||||
<p class="text-sm text-slate-500">Kiosks and ticket printers for self-service and reception</p>
|
||||
</div>
|
||||
@if ($canManage)
|
||||
<a href="{{ route('qms.devices.create') }}" class="btn-primary">Register device</a>
|
||||
@endif
|
||||
</div>
|
||||
@if (session('success'))<p class="mb-4 rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-800">{{ session('success') }}</p>@endif
|
||||
<div class="space-y-3">
|
||||
@foreach ($devices as $device)
|
||||
<div class="flex items-center justify-between rounded-2xl border bg-white p-4 dark:border-slate-700 dark:bg-slate-900">
|
||||
<div>
|
||||
<p class="font-semibold">{{ $device->name }}</p>
|
||||
<p class="text-sm text-slate-500">{{ config('qms.device_types.'.$device->type) }} · {{ $device->status }}</p>
|
||||
@if ($device->type === 'kiosk' && $device->device_token)
|
||||
<p class="mt-1 text-xs text-slate-400">Kiosk URL: {{ route('qms.kiosk.device', $device->device_token) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<form method="POST" action="{{ route('qms.devices.regenerate-token', $device) }}">@csrf<button class="btn-secondary text-sm">Regenerate token</button></form>
|
||||
|
||||
@if (session('success'))
|
||||
<div class="mt-4 rounded-lg bg-emerald-50 px-4 py-3 text-sm text-emerald-800">{{ session('success') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||
@if ($devices->isEmpty())
|
||||
<x-empty-state
|
||||
title="No devices registered yet"
|
||||
description="Register a kiosk tablet or ticket printer so customers can join queues without staff assistance."
|
||||
>
|
||||
<x-slot:icon>
|
||||
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21" />
|
||||
</svg>
|
||||
</x-slot:icon>
|
||||
@if ($canManage)
|
||||
<x-slot:action>
|
||||
<a href="{{ route('qms.devices.create') }}" class="btn-primary">Register your first device</a>
|
||||
</x-slot:action>
|
||||
@endif
|
||||
</x-empty-state>
|
||||
@else
|
||||
<table class="min-w-full divide-y divide-slate-100 text-sm">
|
||||
<thead class="bg-slate-50 text-left text-xs uppercase text-slate-500">
|
||||
<tr>
|
||||
<th class="px-4 py-3">Name</th>
|
||||
<th class="px-4 py-3">Type</th>
|
||||
<th class="px-4 py-3">Status</th>
|
||||
<th class="px-4 py-3">Branch</th>
|
||||
<th class="px-4 py-3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-50">
|
||||
@foreach ($devices as $device)
|
||||
<tr>
|
||||
<td class="px-4 py-3 font-medium text-slate-900">{{ $device->name }}</td>
|
||||
<td class="px-4 py-3 text-slate-600">{{ $deviceTypes[$device->type] ?? $device->type }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<span class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium {{ $device->status === 'online' ? 'bg-emerald-100 text-emerald-800' : 'bg-slate-100 text-slate-600' }}">
|
||||
{{ ucfirst($device->status) }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-slate-600">{{ $device->branch?->name ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
@if ($device->type === 'kiosk' && $device->device_token)
|
||||
<a href="{{ route('qms.kiosk.device', $device->device_token) }}" target="_blank" class="text-indigo-700 hover:underline">Open kiosk</a>
|
||||
@endif
|
||||
@if ($canManage)
|
||||
<form method="POST" action="{{ route('qms.devices.regenerate-token', $device) }}" class="ml-3 inline">
|
||||
@csrf
|
||||
<button type="submit" class="text-indigo-700 hover:underline">Regenerate token</button>
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="border-t border-slate-200 px-4 py-3">
|
||||
{{ $devices->links() }}
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
{{ $devices->links() }}
|
||||
</x-app-layout>
|
||||
|
||||
@@ -1,18 +1,59 @@
|
||||
<x-app-layout title="Displays">
|
||||
<div class="mb-6 flex justify-between">
|
||||
<h1 class="text-2xl font-semibold">Display screens</h1>
|
||||
<a href="{{ route('qms.displays.create') }}" class="btn-primary">New display</a>
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<div>
|
||||
<h1 class="text-xl font-semibold text-slate-900">Display screens</h1>
|
||||
<p class="text-sm text-slate-500">Waiting-area screens and voice announcements for called tickets</p>
|
||||
</div>
|
||||
@if ($canManage)
|
||||
<a href="{{ route('qms.displays.create') }}" class="btn-primary">New display</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="space-y-3">
|
||||
@foreach ($screens as $screen)
|
||||
<div class="flex items-center justify-between rounded-2xl border bg-white p-4 dark:border-slate-700 dark:bg-slate-900">
|
||||
<div>
|
||||
<p class="font-semibold">{{ $screen->name }}</p>
|
||||
<p class="text-sm text-slate-500">{{ config('qms.display_layouts.'.$screen->layout) }}</p>
|
||||
</div>
|
||||
<a href="{{ route('qms.display.public', $screen->access_token) }}" target="_blank" class="btn-secondary text-sm">Open display</a>
|
||||
|
||||
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||
@if ($screens->isEmpty())
|
||||
<x-empty-state
|
||||
title="No display screens yet"
|
||||
description="Create a display for your waiting area so customers can see the queue and hear ticket calls."
|
||||
>
|
||||
<x-slot:icon>
|
||||
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z" />
|
||||
</svg>
|
||||
</x-slot:icon>
|
||||
@if ($canManage)
|
||||
<x-slot:action>
|
||||
<a href="{{ route('qms.displays.create') }}" class="btn-primary">Create your first display</a>
|
||||
</x-slot:action>
|
||||
@endif
|
||||
</x-empty-state>
|
||||
@else
|
||||
<table class="min-w-full divide-y divide-slate-100 text-sm">
|
||||
<thead class="bg-slate-50 text-left text-xs uppercase text-slate-500">
|
||||
<tr>
|
||||
<th class="px-4 py-3">Name</th>
|
||||
<th class="px-4 py-3">Layout</th>
|
||||
<th class="px-4 py-3">Branch</th>
|
||||
<th class="px-4 py-3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-50">
|
||||
@foreach ($screens as $screen)
|
||||
<tr>
|
||||
<td class="px-4 py-3 font-medium text-slate-900">
|
||||
<a href="{{ route('qms.displays.show', $screen) }}" class="hover:text-indigo-600">{{ $screen->name }}</a>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-slate-600">{{ config('qms.display_layouts.'.$screen->layout, $screen->layout) }}</td>
|
||||
<td class="px-4 py-3 text-slate-600">{{ $screen->branch?->name ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<a href="{{ route('qms.display.public', $screen->access_token) }}" target="_blank" class="text-indigo-700 hover:underline">Open display</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="border-t border-slate-200 px-4 py-3">
|
||||
{{ $screens->links() }}
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
{{ $screens->links() }}
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user