Files
ladill-frontdesk/resources/views/frontdesk/watchlist/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

67 lines
3.3 KiB
PHP

<x-app-layout title="Watchlist">
<div class="flex items-center justify-between">
<div>
<h1 class="text-xl font-semibold text-slate-900">Watchlist</h1>
<p class="text-sm text-slate-500">Flagged and blocked visitors</p>
</div>
@if ($canManage)
<a href="{{ route('frontdesk.watchlist.create') }}" class="btn-primary">Add entry</a>
@endif
</div>
<form method="GET" class="mt-4 flex flex-wrap gap-2">
<input type="search" name="q" value="{{ request('q') }}" placeholder="Search name or company…" 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 ($statuses as $key => $label)
@if ($key !== 'allowed')
<option value="{{ $key }}" @selected(request('status') === $key)>{{ $label }}</option>
@endif
@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">Name</th>
<th class="px-4 py-3">Company</th>
<th class="px-4 py-3">Status</th>
<th class="px-4 py-3">Reason</th>
<th class="px-4 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse ($entries as $entry)
<tr>
<td class="px-4 py-3 font-medium">
@if ($entry->visitor)
<a href="{{ route('frontdesk.visitors.show', $entry->visitor) }}" class="text-indigo-700">{{ $entry->full_name }}</a>
@else
{{ $entry->full_name }}
@endif
</td>
<td class="px-4 py-3 text-slate-600">{{ $entry->company ?? '—' }}</td>
<td class="px-4 py-3 capitalize">{{ str_replace('_', ' ', $entry->status) }}</td>
<td class="px-4 py-3 text-slate-500">{{ Str::limit($entry->reason, 60) ?: '—' }}</td>
<td class="px-4 py-3">
@if ($canManage)
<form method="POST" action="{{ route('frontdesk.watchlist.destroy', $entry) }}" onsubmit="return confirm('Remove this watchlist entry?')">
@csrf @method('DELETE')
<button type="submit" class="text-sm text-red-600 hover:text-red-800">Remove</button>
</form>
@endif
</td>
</tr>
@empty
<tr><td colspan="5" class="px-4 py-8 text-center text-slate-400">No watchlist entries.</td></tr>
@endforelse
</tbody>
</table>
</div>
<div class="mt-4">{{ $entries->links() }}</div>
</x-app-layout>