Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Extract shared quick-action and section-link partials so dashboard and visits headers share the same white and purple mobile FABs while section links keep indigo icon buttons. Co-authored-by: Cursor <cursoragent@cursor.com>
52 lines
2.8 KiB
PHP
52 lines
2.8 KiB
PHP
<x-app-layout title="Visit history">
|
|
<div class="flex items-center justify-between gap-3">
|
|
<h1 class="min-w-0 flex-1 truncate text-lg font-semibold text-slate-900 lg:text-xl">Visits</h1>
|
|
@include('frontdesk.partials.reception-quick-actions', [
|
|
'desktopSchedule' => 'Schedule',
|
|
'desktopCheckIn' => 'Check in',
|
|
'scheduleLabel' => 'Schedule visit',
|
|
'checkInLabel' => 'Check in visitor',
|
|
])
|
|
</div>
|
|
|
|
<form method="GET" class="mt-4 flex gap-2">
|
|
<input type="search" name="q" value="{{ request('q') }}" placeholder="Search visitors…" class="rounded-lg border-slate-300 text-sm">
|
|
<select name="status" class="rounded-lg border-slate-300 text-sm">
|
|
<option value="">All statuses</option>
|
|
@foreach (config('frontdesk.visit_statuses') as $key => $label)
|
|
<option value="{{ $key }}" @selected(request('status') === $key)>{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
<button type="submit" class="rounded-lg border border-slate-200 px-4 py-2 text-sm">Filter</button>
|
|
</form>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
|
<table class="min-w-full divide-y divide-slate-100 text-sm">
|
|
<thead class="bg-slate-50 text-left text-xs uppercase text-slate-500">
|
|
<tr>
|
|
<th class="px-4 py-3">Visitor</th>
|
|
<th class="px-4 py-3">Host</th>
|
|
<th class="px-4 py-3">Type</th>
|
|
<th class="px-4 py-3">Status</th>
|
|
<th class="px-4 py-3">Time</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@forelse ($visits as $visit)
|
|
<tr class="hover:bg-slate-50">
|
|
<td class="px-4 py-3"><a href="{{ route('frontdesk.visits.show', $visit) }}" class="font-medium text-indigo-700">{{ $visit->visitor->full_name }}</a></td>
|
|
<td class="px-4 py-3 text-slate-600">{{ $visit->host?->name ?? '—' }}</td>
|
|
<td class="px-4 py-3 capitalize text-slate-600">{{ str_replace('_', ' ', $visit->visitor_type) }}</td>
|
|
<td class="px-4 py-3 capitalize text-slate-600">{{ str_replace('_', ' ', $visit->status) }}</td>
|
|
<td class="px-4 py-3 text-slate-500">{{ $visit->checked_in_at?->format('M j, g:i A') ?? $visit->scheduled_at?->format('M j, g:i A') ?? $visit->created_at->format('M j, g:i A') }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="5" class="px-4 py-8 text-center text-slate-400">No visits yet.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mt-4">{{ $visits->links() }}</div>
|
|
</x-app-layout>
|