Files
ladill-frontdesk/resources/views/frontdesk/visitors/index.blade.php
T
isaaccladandCursor 0d74330e44
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Add Visitors page hero and drop dark-mode classes from Reports.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 20:53:53 +00:00

57 lines
3.2 KiB
PHP

<x-app-layout title="Visitors">
<div class="space-y-6">
<x-frontdesk.page-hero
badge="Profiles · Return visits · Watchlist"
title="Visitors"
description="Search returning guests, review visit history, and manage watchlist status for people who check in at your sites."
:stats="[
['value' => number_format($heroStats['total']), 'label' => 'Visitors'],
['value' => number_format($heroStats['frequent']), 'label' => 'Frequent'],
['value' => number_format($heroStats['flagged']), 'label' => 'Flagged'],
]">
<x-slot name="actions">
<a href="{{ route('frontdesk.watchlist.index') }}" class="btn-secondary">Watchlist</a>
<a href="{{ route('frontdesk.visits.create') }}" class="btn-primary">
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
Check in visitor
</a>
</x-slot>
</x-frontdesk.page-hero>
<form method="GET" class="flex flex-wrap gap-2">
<input type="search" name="q" value="{{ request('q') }}" placeholder="Search by name…" class="w-full max-w-md rounded-lg border-slate-300 text-sm">
</form>
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
<div class="border-b border-slate-100 px-6 py-4">
<h2 class="text-sm font-semibold text-slate-900">Visitor database</h2>
</div>
<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">Name</th>
<th class="px-4 py-3">Company</th>
<th class="px-4 py-3">Visits</th>
<th class="px-4 py-3">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse ($visitors as $visitor)
<tr class="hover:bg-slate-50">
<td class="px-4 py-3"><a href="{{ route('frontdesk.visitors.show', $visitor) }}" class="font-medium text-indigo-700">{{ $visitor->full_name }}</a></td>
<td class="px-4 py-3 text-slate-600">{{ $visitor->company ?? '—' }}</td>
<td class="px-4 py-3 text-slate-600">{{ $visitor->visit_count }}</td>
<td class="px-4 py-3 capitalize text-slate-600">{{ str_replace('_', ' ', $visitor->watchlist_status) }}</td>
</tr>
@empty
<tr><td colspan="4" class="px-4 py-8 text-center text-slate-400">No visitors yet.</td></tr>
@endforelse
</tbody>
</table>
@if ($visitors->hasPages())
<div class="border-t border-slate-100 px-5 py-3">{{ $visitors->links() }}</div>
@endif
</div>
</div>
</x-app-layout>