Files
ladill-frontdesk/resources/views/frontdesk/employees/index.blade.php
T
isaaccladandCursor 890c2c71e3
Deploy Ladill Frontdesk / deploy (push) Failing after 26s
Add employee presence with kiosk sign-in, QR badges, and mobile step-out.
Enables staff roster, PIN/code kiosk flow, attendance reports, evacuation staff roll call, webhooks, branch mismatch warnings, and a linked-user My presence portal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 21:11:18 +00:00

55 lines
3.3 KiB
PHP

<x-app-layout title="Employees">
<div class="flex flex-wrap items-center justify-between gap-3">
<h1 class="text-xl font-semibold text-slate-900">Employees</h1>
<div class="flex gap-2">
<a href="{{ route('frontdesk.employees.export.attendance') }}" class="rounded-lg border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Export attendance</a>
<a href="{{ route('frontdesk.employees.import') }}" class="rounded-lg border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Import CSV</a>
<a href="{{ route('frontdesk.employees.create') }}" class="btn-primary">Add employee</a>
</div>
</div>
<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">Code</th>
<th class="px-4 py-3">Department</th>
<th class="px-4 py-3">Status</th>
<th class="px-4 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse ($employees as $employee)
@php
$presence = $employee->presence;
$status = $presence?->status ?? 'off_site';
$statusLabel = config('frontdesk.employee_presence_statuses.'.$status, $status);
@endphp
<tr>
<td class="px-4 py-3 font-medium">{{ $employee->full_name }}</td>
<td class="px-4 py-3 font-mono text-slate-600">{{ $employee->employee_code }}</td>
<td class="px-4 py-3 text-slate-600">{{ $employee->department ?? '—' }}</td>
<td class="px-4 py-3">
<span class="rounded-full px-2.5 py-0.5 text-xs font-medium
{{ $status === 'on_site' ? 'bg-emerald-50 text-emerald-700' : ($status === 'stepped_out' ? 'bg-amber-50 text-amber-800' : 'bg-slate-100 text-slate-600') }}">
{{ $statusLabel }}
</span>
@if ($presence?->destination)
<span class="mt-0.5 block text-xs text-slate-400">{{ $presence->destination }}</span>
@endif
</td>
<td class="px-4 py-3 text-right">
<a href="{{ route('frontdesk.employees.badge', $employee) }}" target="_blank" class="text-sm text-slate-600">Badge</a>
<a href="{{ route('frontdesk.employees.edit', $employee) }}" class="ml-3 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 employees yet. Add staff who will sign in at the kiosk.</td></tr>
@endforelse
</tbody>
</table>
</div>
<div class="mt-4">{{ $employees->links() }}</div>
</x-app-layout>