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

90 lines
4.6 KiB
PHP

<x-app-layout title="Host portal">
<div class="flex flex-wrap items-start justify-between gap-4">
<div>
<h1 class="text-xl font-semibold text-slate-900">Host portal</h1>
<p class="text-sm text-slate-500">{{ $host->name }} · {{ $organization->name }}</p>
</div>
<div class="flex flex-wrap gap-2">
<form method="POST" action="{{ route('frontdesk.host.availability') }}">
@csrf
<button type="submit" class="rounded-lg border border-slate-200 px-4 py-2 text-sm font-medium hover:bg-slate-50">
{{ $host->is_available ? 'Mark unavailable' : 'Mark available' }}
</button>
</form>
<a href="{{ route('frontdesk.host.schedule') }}" class="btn-primary">Pre-register visitor</a>
</div>
</div>
@if ($pending->isNotEmpty())
<section class="mt-6">
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">Awaiting your approval</h2>
<div class="mt-3 space-y-2">
@foreach ($pending as $visit)
<div class="flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-amber-200 bg-amber-50 p-4">
<div>
<p class="font-medium text-slate-900">{{ $visit->visitor->full_name }}</p>
<p class="text-sm text-slate-600 capitalize">{{ str_replace('_', ' ', $visit->visitor_type) }} · {{ $visit->purpose ?: 'No purpose given' }}</p>
</div>
<form method="POST" action="{{ route('frontdesk.host.approve', $visit) }}">
@csrf
<button type="submit" class="btn-primary">Approve</button>
</form>
</div>
@endforeach
</div>
</section>
@endif
<section class="mt-8">
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">Upcoming visits</h2>
<div class="mt-3 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">When</th>
<th class="px-4 py-3">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse ($upcoming as $visit)
<tr>
<td class="px-4 py-3 font-medium">{{ $visit->visitor->full_name }}</td>
<td class="px-4 py-3 text-slate-600">{{ $visit->scheduled_at?->format('M j, g:i A') ?? '—' }}</td>
<td class="px-4 py-3 capitalize">{{ str_replace('_', ' ', $visit->status) }}</td>
</tr>
@empty
<tr><td colspan="3" class="px-4 py-8 text-center text-slate-500">No upcoming visits.</td></tr>
@endforelse
</tbody>
</table>
</div>
</section>
<section class="mt-8">
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">Recent history</h2>
<div class="mt-3 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">Status</th>
<th class="px-4 py-3">Updated</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse ($recent as $visit)
<tr>
<td class="px-4 py-3 font-medium">{{ $visit->visitor->full_name }}</td>
<td class="px-4 py-3 capitalize">{{ str_replace('_', ' ', $visit->status) }}</td>
<td class="px-4 py-3 text-slate-600">{{ $visit->updated_at->diffForHumans() }}</td>
</tr>
@empty
<tr><td colspan="3" class="px-4 py-8 text-center text-slate-500">No recent visits.</td></tr>
@endforelse
</tbody>
</table>
</div>
</section>
</x-app-layout>