Deploy Ladill Frontdesk / deploy (push) Successful in 1m3s
Co-authored-by: Cursor <cursoragent@cursor.com>
56 lines
3.0 KiB
PHP
56 lines
3.0 KiB
PHP
<x-app-layout title="Host directory">
|
|
<div class="space-y-6">
|
|
<x-frontdesk.page-hero
|
|
badge="Host directory · Notifications · Departments"
|
|
title="Hosts"
|
|
description="Manage the people visitors come to see — hosts receive arrival alerts and approve visits."
|
|
:stats="[
|
|
['value' => number_format($heroStats['total']), 'label' => 'Hosts'],
|
|
['value' => number_format($heroStats['available']), 'label' => 'Available'],
|
|
['value' => number_format($heroStats['departments']), 'label' => 'Departments'],
|
|
]">
|
|
<x-slot name="actions">
|
|
<a href="{{ route('frontdesk.hosts.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>
|
|
Add host
|
|
</a>
|
|
</x-slot>
|
|
</x-frontdesk.page-hero>
|
|
|
|
<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">All hosts</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">Department</th>
|
|
<th class="px-4 py-3">Office</th>
|
|
<th class="px-4 py-3">Contact</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@forelse ($hosts as $host)
|
|
<tr>
|
|
<td class="px-4 py-3 font-medium">{{ $host->name }}</td>
|
|
<td class="px-4 py-3 text-slate-600">{{ $host->department ?? '—' }}</td>
|
|
<td class="px-4 py-3 text-slate-600">{{ $host->office ?? '—' }}</td>
|
|
<td class="px-4 py-3 text-slate-600">{{ $host->email ?? $host->phone ?? '—' }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<a href="{{ route('frontdesk.hosts.edit', $host) }}" class="text-sm text-indigo-600">Edit</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="5" class="px-4 py-8 text-center text-slate-400">No hosts yet. Add your first host to enable visitor notifications.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
@if ($hosts->hasPages())
|
|
<div class="border-t border-slate-100 px-5 py-3">{{ $hosts->links() }}</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|