Files
ladill-frontdesk/resources/views/frontdesk/security/verify.blade.php
T
isaaccladandCursor 9e2d79936c
Deploy Ladill Frontdesk / deploy (push) Failing after 35s
Test / test (push) Failing after 2m45s
Initial Ladill Frontdesk release with deploy pipeline.
Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 20:37:15 +00:00

47 lines
3.3 KiB
PHP

<x-app-layout title="Verify badge">
<div class="mx-auto max-w-xl">
<h1 class="text-xl font-semibold text-slate-900">Badge verification</h1>
<p class="text-sm text-slate-500">Scan or enter a badge code / QR token</p>
<form method="POST" action="{{ route('frontdesk.security.verify.lookup') }}" class="mt-6 flex gap-2">
@csrf
<input type="text" name="lookup" value="{{ $lookup ?? '' }}" required autofocus
placeholder="Badge code or QR token"
class="flex-1 rounded-lg border-slate-300 text-sm uppercase">
<button type="submit" class="rounded-lg bg-teal-600 px-4 py-2 text-sm font-medium text-white hover:bg-teal-700">Verify</button>
</form>
@isset($lookup)
@if ($visit)
<div class="mt-6 rounded-2xl border border-slate-200 bg-white p-6">
<div class="flex items-start justify-between">
<div>
<h2 class="text-lg font-semibold text-slate-900">{{ $visit->visitor->full_name }}</h2>
<p class="text-sm text-slate-500">{{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }} · {{ $visit->host?->name }}</p>
</div>
@if ($visit->isInside() && ! $visit->isBadgeExpired())
<span class="rounded-full bg-teal-50 px-3 py-1 text-xs font-semibold text-teal-700">Valid</span>
@elseif ($visit->isInside() && $visit->isBadgeExpired())
<span class="rounded-full bg-amber-50 px-3 py-1 text-xs font-semibold text-amber-700">Expired badge</span>
@else
<span class="rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-600">{{ str_replace('_', ' ', $visit->status) }}</span>
@endif
</div>
<dl class="mt-4 space-y-2 text-sm">
<div class="flex justify-between"><dt class="text-slate-500">Badge</dt><dd class="font-mono font-medium">{{ $visit->badge_code }}</dd></div>
<div class="flex justify-between"><dt class="text-slate-500">Checked in</dt><dd>{{ $visit->checked_in_at?->format('M j, Y g:i A') ?? '—' }}</dd></div>
<div class="flex justify-between"><dt class="text-slate-500">Expires</dt><dd>{{ $visit->badge_expires_at?->format('g:i A') ?? '—' }}</dd></div>
<div class="flex justify-between"><dt class="text-slate-500">Branch</dt><dd>{{ $visit->branch?->name ?? '—' }}</dd></div>
<div class="flex justify-between"><dt class="text-slate-500">Watchlist</dt><dd class="capitalize">{{ str_replace('_', ' ', $visit->visitor->watchlist_status) }}</dd></div>
</dl>
<a href="{{ route('frontdesk.visits.show', $visit) }}" class="mt-4 inline-block text-sm font-medium text-teal-600 hover:text-teal-700">View full visit record</a>
</div>
@else
<p class="mt-6 rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-800">No matching visit found for {{ $lookup }}.</p>
@endif
@endisset
</div>
</x-app-layout>