Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
2.8 KiB
PHP
55 lines
2.8 KiB
PHP
<x-app-layout title="Security Dashboard">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<h1 class="text-xl font-semibold text-slate-900">Security dashboard</h1>
|
|
<p class="text-sm text-slate-500">{{ $occupancy->count() }} people currently inside</p>
|
|
</div>
|
|
<a href="{{ route('frontdesk.security.evacuation') }}" class="rounded-lg border border-red-200 bg-red-50 px-4 py-2 text-sm font-medium text-red-700 hover:bg-red-100">
|
|
Evacuation report
|
|
</a>
|
|
<a href="{{ route('frontdesk.security.verify') }}" class="rounded-lg border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
|
|
Verify badge
|
|
</a>
|
|
</div>
|
|
|
|
@if ($expiredBadges->isNotEmpty())
|
|
<div class="mt-4 rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900">
|
|
{{ $expiredBadges->count() }} visitor(s) have expired badges but are still checked in.
|
|
</div>
|
|
@endif
|
|
|
|
<div class="mt-6 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">Visitor</th>
|
|
<th class="px-4 py-3">Host</th>
|
|
<th class="px-4 py-3">Type</th>
|
|
<th class="px-4 py-3">Checked in</th>
|
|
<th class="px-4 py-3">Badge</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@foreach ($occupancy as $visit)
|
|
<tr class="{{ $visit->isBadgeExpired() ? 'bg-amber-50' : '' }}">
|
|
<td class="px-4 py-3 font-medium">{{ $visit->visitor->full_name }}</td>
|
|
<td class="px-4 py-3">{{ $visit->host?->name ?? '—' }}</td>
|
|
<td class="px-4 py-3 capitalize">{{ str_replace('_', ' ', $visit->visitor_type) }}</td>
|
|
<td class="px-4 py-3">{{ $visit->checked_in_at?->format('g:i A') }}</td>
|
|
<td class="px-4 py-3 font-mono">{{ $visit->badge_code }}</td>
|
|
<td class="px-4 py-3">
|
|
@if ($canCheckout)
|
|
<form method="POST" action="{{ route('frontdesk.security.checkout', $visit) }}">
|
|
@csrf
|
|
<button type="submit" class="text-sm text-teal-600 hover:text-teal-800">Check out</button>
|
|
</form>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</x-app-layout>
|