Deploy Ladill Frontdesk / deploy (push) Successful in 25s
Replace inline teal button classes with shared btn-primary and indigo nav/link styling used by CRM and POS. Co-authored-by: Cursor <cursoragent@cursor.com>
59 lines
3.1 KiB
PHP
59 lines
3.1 KiB
PHP
<x-app-layout title="Devices">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<h1 class="text-xl font-semibold text-slate-900">Devices</h1>
|
|
<p class="text-sm text-slate-500">Kiosks, printers, and reception hardware</p>
|
|
</div>
|
|
@if ($canManage)
|
|
<a href="{{ route('frontdesk.devices.create') }}" class="btn-primary">Add device</a>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
|
<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">Desk / branch</th>
|
|
<th class="px-4 py-3">Last online</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@forelse ($devices as $device)
|
|
<tr>
|
|
<td class="px-4 py-3 font-medium">{{ $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->isOnline() ? 'bg-emerald-100 text-emerald-800' : 'bg-slate-100 text-slate-600' }}">
|
|
{{ $device->isOnline() ? 'Online' : ucfirst($device->status) }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-slate-600">
|
|
{{ $device->receptionDesk?->name ?? '—' }}
|
|
@if ($device->branch)
|
|
<span class="text-slate-400">· {{ $device->branch->name }}</span>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 text-slate-500">{{ $device->last_online_at?->diffForHumans() ?? 'Never' }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
@if ($canManage)
|
|
<a href="{{ route('frontdesk.devices.edit', $device) }}" class="text-indigo-700 hover:underline">Edit</a>
|
|
@endif
|
|
@if ($device->type === 'kiosk' && $device->device_token)
|
|
<a href="{{ route('frontdesk.kiosk.device', $device->device_token) }}" target="_blank" class="ml-3 text-indigo-700 hover:underline">Open kiosk</a>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="6" class="px-4 py-8 text-center text-slate-500">No devices registered yet.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{{ $devices->links() }}
|
|
</x-app-layout>
|