Files
ladill-frontdesk/resources/views/frontdesk/visits/index.blade.php
T
isaaccladandCursor e7f1cb1e5c
Deploy Ladill Frontdesk / deploy (push) Successful in 25s
Align Frontdesk buttons and accents with sibling Ladill apps.
Replace inline teal button classes with shared btn-primary and indigo nav/link styling used by CRM and POS.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 21:23:14 +00:00

50 lines
2.8 KiB
PHP

<x-app-layout title="Visit history">
<div class="flex items-center justify-between">
<h1 class="text-xl font-semibold text-slate-900">Visits</h1>
<div class="flex gap-2">
<a href="{{ route('frontdesk.visits.schedule') }}" class="rounded-lg border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Schedule</a>
<a href="{{ route('frontdesk.visits.create') }}" class="btn-primary">Check in</a>
</div>
</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>