Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
45 lines
2.6 KiB
PHP
45 lines
2.6 KiB
PHP
<x-app-layout title="Badge template">
|
|
<h1 class="text-xl font-semibold text-slate-900 dark:text-slate-100">Badge template</h1>
|
|
<p class="text-sm text-slate-500 dark:text-slate-400">Configure fields shown on printed visitor badges.</p>
|
|
|
|
<form method="POST" action="{{ route('frontdesk.settings.badge.update') }}" class="mt-6 max-w-2xl space-y-6">
|
|
@csrf @method('PUT')
|
|
|
|
<section class="rounded-2xl border border-slate-200 bg-white p-5 space-y-4 dark:border-slate-700 dark:bg-slate-900">
|
|
<h2 class="text-sm font-semibold text-slate-900 dark:text-slate-100">Layout</h2>
|
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
@foreach ([
|
|
'show_photo' => 'Visitor photo',
|
|
'show_qr' => 'QR code',
|
|
'show_host' => 'Host name',
|
|
'show_company' => 'Company',
|
|
'show_type' => 'Visitor type',
|
|
] as $key => $label)
|
|
<label class="flex items-center gap-2 text-sm text-slate-700 dark:text-slate-300">
|
|
<input type="checkbox" name="{{ $key }}" value="1" @checked(old($key, $template[$key] ?? true))>
|
|
{{ $label }}
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300">Accent color</label>
|
|
<input type="color" name="primary_color" value="{{ old('primary_color', $template['primary_color'] ?? '#0d9488') }}" class="mt-1 h-10 w-20 rounded border-slate-300">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300">Footer text</label>
|
|
<input type="text" name="footer_text" value="{{ old('footer_text', $template['footer_text'] ?? '') }}" class="mt-1 w-full rounded-lg border-slate-300 text-sm dark:border-slate-600 dark:bg-slate-800">
|
|
</div>
|
|
@if ($canManage)
|
|
<button type="submit" class="rounded-lg bg-teal-600 px-4 py-2 text-sm font-semibold text-white hover:bg-teal-700">Save template</button>
|
|
@endif
|
|
</section>
|
|
</form>
|
|
|
|
@if ($sampleVisit)
|
|
<div class="mt-8">
|
|
<h2 class="text-sm font-semibold text-slate-900 dark:text-slate-100">Live preview</h2>
|
|
<iframe src="{{ route('frontdesk.visits.badge.preview', $sampleVisit) }}" class="mt-3 h-96 w-full max-w-md rounded-2xl border border-slate-200 dark:border-slate-700"></iframe>
|
|
</div>
|
|
@endif
|
|
</x-app-layout>
|