Deploy Ladill Frontdesk / deploy (push) Successful in 46s
Co-authored-by: Cursor <cursoragent@cursor.com>
44 lines
2.4 KiB
PHP
44 lines
2.4 KiB
PHP
<x-app-layout title="Badge template">
|
|
<x-settings.page title="Badge template" description="Configure fields shown on printed visitor badges.">
|
|
<form method="POST" action="{{ route('frontdesk.settings.badge.update') }}" class="space-y-6">
|
|
@csrf @method('PUT')
|
|
|
|
<x-settings.card title="Layout" description="Choose what appears on visitor badges and set accent styling.">
|
|
<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">
|
|
<input type="checkbox" name="{{ $key }}" value="1" @checked(old($key, $template[$key] ?? true))>
|
|
{{ $label }}
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
<div class="mt-4">
|
|
<label class="block text-sm font-medium text-slate-700">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 class="mt-4">
|
|
<label class="block text-sm font-medium text-slate-700">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">
|
|
</div>
|
|
@if ($canManage)
|
|
<div class="mt-6 flex justify-end">
|
|
<button type="submit" class="btn-primary">Save template</button>
|
|
</div>
|
|
@endif
|
|
</x-settings.card>
|
|
</form>
|
|
|
|
@if ($sampleVisit)
|
|
<x-settings.card title="Live preview" description="Preview how badges render with your current template.">
|
|
<iframe src="{{ route('frontdesk.visits.badge.preview', $sampleVisit) }}" class="h-96 w-full max-w-md rounded-xl border border-slate-200"></iframe>
|
|
</x-settings.card>
|
|
@endif
|
|
</x-settings.page>
|
|
</x-app-layout>
|