Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
2.8 KiB
PHP
48 lines
2.8 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Visitor Badge · {{ $visit->badge_code }}</title>
|
|
<style>
|
|
body { font-family: system-ui, sans-serif; margin: 0; padding: 1rem; background: #f8fafc; }
|
|
.badge { width: 3.5in; border: 2px solid {{ $template['primary_color'] ?? '#0d9488' }}; border-radius: 12px; padding: 1rem; background: #fff; }
|
|
.org { font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
.name { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; color: #0f172a; }
|
|
.meta { font-size: 0.875rem; color: #444; line-height: 1.5; }
|
|
.code { font-family: monospace; font-size: 1.25rem; font-weight: 700; color: {{ $template['primary_color'] ?? '#0d9488' }}; margin-top: 1rem; }
|
|
.expiry { font-size: 0.75rem; color: #888; margin-top: 0.5rem; }
|
|
.photo { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; float: right; margin-left: 0.75rem; }
|
|
.qr { margin-top: 0.75rem; }
|
|
.footer { font-size: 0.7rem; color: #94a3b8; margin-top: 0.75rem; }
|
|
.preview-bar { margin-bottom: 1rem; padding: 0.75rem 1rem; background: #ecfeff; border: 1px solid #99f6e4; border-radius: 8px; font-size: 0.875rem; }
|
|
@media print { body { padding: 0; background: #fff; } .preview-bar { display: none; } }
|
|
</style>
|
|
</head>
|
|
<body @if($autoPrint ?? false) onload="window.print()" @endif>
|
|
@if ($preview ?? false)
|
|
<div class="preview-bar">Badge preview — <a href="{{ route('frontdesk.visits.badge', $visit) }}" target="_blank">Print badge</a></div>
|
|
@endif
|
|
<div class="badge">
|
|
@if (($template['show_photo'] ?? true) && $photoUrl)
|
|
<img src="{{ $photoUrl }}" alt="Visitor photo" class="photo">
|
|
@endif
|
|
<div class="org">{{ $visit->organization->name ?? 'Visitor' }}</div>
|
|
<div class="name">{{ $visit->visitor->full_name }}</div>
|
|
<div class="meta">
|
|
@if (($template['show_company'] ?? true) && $visit->visitor->company){{ $visit->visitor->company }}<br>@endif
|
|
@if ($template['show_host'] ?? true)Host: {{ $visit->host?->name ?? '—' }}<br>@endif
|
|
@if ($template['show_type'] ?? true)Type: {{ ucfirst(str_replace('_', ' ', $visit->visitor_type)) }}<br>@endif
|
|
Check-in: {{ $visit->checked_in_at?->format('g:i A') }}
|
|
</div>
|
|
<div class="code">{{ $visit->badge_code }}</div>
|
|
<div class="expiry">Expires {{ $visit->badge_expires_at?->format('g:i A') ?? 'end of day' }}</div>
|
|
@if (($template['show_qr'] ?? true) && $qrSvg)
|
|
<div class="qr">{!! $qrSvg !!}</div>
|
|
@endif
|
|
@if (! empty($template['footer_text']))
|
|
<div class="footer">{{ $template['footer_text'] }}</div>
|
|
@endif
|
|
</div>
|
|
</body>
|
|
</html>
|