Deploy Ladill Frontdesk / deploy (push) Successful in 24s
Add visit_purposes config and shared select on kiosk, reception check-in, and scheduling forms. Co-authored-by: Cursor <cursoragent@cursor.com>
67 lines
3.5 KiB
PHP
67 lines
3.5 KiB
PHP
<x-app-layout :title="'Check in '.$visitor->full_name">
|
|
<div class="mx-auto max-w-lg">
|
|
<h1 class="text-xl font-semibold text-slate-900">Quick check-in</h1>
|
|
<p class="mt-1 text-sm text-slate-500">
|
|
Returning visitor · {{ $visitor->full_name }}
|
|
@if ($visitor->is_frequent)
|
|
<span class="rounded bg-indigo-50 px-2 py-0.5 text-xs text-indigo-700">Frequent</span>
|
|
@endif
|
|
</p>
|
|
|
|
<dl class="mt-4 rounded-xl border border-slate-200 bg-white p-4 text-sm">
|
|
<div class="flex justify-between py-1"><dt class="text-slate-500">Company</dt><dd>{{ $visitor->company ?? '—' }}</dd></div>
|
|
<div class="flex justify-between py-1"><dt class="text-slate-500">Phone</dt><dd>{{ $visitor->phone ?? '—' }}</dd></div>
|
|
<div class="flex justify-between py-1"><dt class="text-slate-500">Email</dt><dd>{{ $visitor->email ?? '—' }}</dd></div>
|
|
<div class="flex justify-between py-1"><dt class="text-slate-500">Total visits</dt><dd>{{ $visitor->visit_count }}</dd></div>
|
|
</dl>
|
|
|
|
<form method="POST" action="{{ route('frontdesk.visitors.check-in.store', $visitor) }}" class="mt-6 space-y-4 rounded-2xl border border-slate-200 bg-white p-6">
|
|
@csrf
|
|
|
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
<div>
|
|
<label for="branch_id" class="block text-sm font-medium text-slate-700">Branch</label>
|
|
<select name="branch_id" id="branch_id" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
<option value="">Select branch…</option>
|
|
@foreach ($branches as $branch)
|
|
<option value="{{ $branch->id }}">{{ $branch->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="visitor_type" class="block text-sm font-medium text-slate-700">Visitor type</label>
|
|
<select name="visitor_type" id="visitor_type" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
@foreach (config('frontdesk.visitor_types') as $key => $label)
|
|
<option value="{{ $key }}">{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="host_id" class="block text-sm font-medium text-slate-700">Host</label>
|
|
<select name="host_id" id="host_id" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
<option value="">Select host…</option>
|
|
@foreach ($hosts as $host)
|
|
<option value="{{ $host->id }}">{{ $host->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="purpose" class="block text-sm font-medium text-slate-700">Purpose</label>
|
|
@include('frontdesk.partials.purpose-select', ['id' => 'purpose'])
|
|
</div>
|
|
|
|
<label class="flex items-start gap-2 text-sm text-slate-600">
|
|
<input type="checkbox" name="policies_accepted" value="1" required class="mt-1 rounded border-slate-300 text-indigo-600">
|
|
Visitor has read and accepted visitor policies.
|
|
</label>
|
|
|
|
<button type="submit" class="btn-primary btn-primary-lg w-full">
|
|
Check in now
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</x-app-layout>
|