@extends('layouts.app')
@section('content')<div class="mb-4"><div class="text-danger small fw-bold">ANALISIS DATA</div><h1 class="page-title">Laporan absensi</h1><p class="text-muted">Rekap kehadiran pegawai cabang.</p></div><div class="row g-3 mb-4"><div class="col-md-4"><div class="card stat p-4"><small class="text-muted">Total pegawai</small><h2>{{ $employees }}</h2></div></div><div class="col-md-4"><div class="card stat p-4"><small class="text-muted">Data absensi</small><h2>{{ $attendances->total() }}</h2></div></div><div class="col-md-4"><div class="card stat p-4"><small class="text-muted">Halaman laporan</small><h2>{{ $attendances->currentPage() }}</h2></div></div></div><div class="card p-4"><div class="table-responsive"><table class="table"><thead><tr><th>Tanggal</th><th>Pegawai</th><th>Masuk</th><th>Pulang</th><th>Status</th><th>Lokasi</th></tr></thead><tbody>@forelse($attendances as $attendance)<tr><td>{{ $attendance->attendance_date->format('d M Y') }}</td><td>{{ $attendance->employee->full_name }}</td><td>{{ optional($attendance->check_in)->format('H:i') }}</td><td>{{ optional($attendance->check_out)->format('H:i') ?: '-' }}</td><td>{{ $attendance->status }}</td><td>{{ $attendance->location_name }}</td></tr>@empty<tr><td colspan="6" class="text-center text-muted">Belum ada data.</td></tr>@endforelse</tbody></table></div>{{ $attendances->links() }}</div>@endsection
