Files
ladill-care/resources/views/care/devices/index.blade.php
T
isaaccladandCursor a3839da869
Deploy Ladill Care / deploy (push) Successful in 39s
Add queue kiosk and display devices for Care Queue management.
Register walk-up kiosks and waiting-room display devices under Devices, with public kiosk ticket issue and linked TV boards surfaced in sidebar and Queue shortcuts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 10:59:02 +00:00

79 lines
4.5 KiB
PHP

<x-app-layout title="Devices">
<div class="space-y-6">
<x-care.page-hero
badge="Queue · Scanners · Agents"
title="Devices"
description="Register queue kiosks and waiting displays, plus barcode scanners and agent-connected clinical hardware."
:stats="[
['value' => number_format($heroStats['total']), 'label' => 'Devices'],
['value' => number_format($heroStats['kiosks'] ?? 0), 'label' => 'Kiosks'],
['value' => number_format($heroStats['displays'] ?? 0), 'label' => 'Displays'],
['value' => number_format($heroStats['online']), 'label' => 'Online'],
]">
@if ($canManage)
<x-slot name="actions">
@if ($hasQueueDevices ?? false)
<a href="{{ route('care.devices.create', ['type' => 'kiosk']) }}" class="btn-secondary">Add kiosk</a>
<a href="{{ route('care.devices.create', ['type' => 'display']) }}" class="btn-secondary">Add display</a>
@endif
<a href="{{ route('care.devices.create') }}" class="btn-primary">Add device</a>
</x-slot>
@endif
</x-care.page-hero>
<div class="rounded-2xl border border-sky-100 bg-sky-50 px-4 py-3 text-sm text-sky-900">
<p class="font-medium">Queue devices vs clinical devices</p>
<ul class="mt-1 list-disc space-y-1 pl-5 text-sky-800/90">
<li><strong>Queue kiosk</strong> walk-up ticket issue on a tablet (Pro).</li>
<li><strong>Queue display</strong> registers a waiting-room TV board URL (Pro).</li>
<li><strong>Barcode / QR scanners</strong> USB keyboard wedge in Patients and Lab (all plans).</li>
<li><strong>Vitals / analyzers</strong> Care Device Agent (Pro).</li>
</ul>
</div>
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
<table class="min-w-full 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">Connection</th>
<th class="px-4 py-3">Status</th>
<th class="px-4 py-3">Branch</th>
<th class="px-4 py-3">Last seen</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 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 text-slate-600">{{ $connectionModes[$device->connection_mode] ?? $device->connection_mode }}</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->branch?->name ?? 'All branches' }}</td>
<td class="px-4 py-3 text-slate-500">{{ $device->last_seen_at?->diffForHumans() ?? 'Never' }}</td>
<td class="px-4 py-3 text-right">
@if ($canManage)
<a href="{{ route('care.devices.edit', $device) }}" class="text-sky-600 hover:text-sky-700">Edit</a>
@endif
</td>
</tr>
@empty
<tr>
<td colspan="7" class="px-4 py-8 text-center text-slate-500">No devices registered yet.</td>
</tr>
@endforelse
</tbody>
</table>
@if ($devices->hasPages())
<div class="border-t border-slate-100 px-5 py-3">{{ $devices->links() }}</div>
@endif
</div>
</div>
</x-app-layout>