@extends('admin.layout') @section('title', 'Riwayat Absensi') @section('content') {{-- Info --}}

💡 Info Absensi: Periode {{ request('period', 'week') }} | Total Hadir: {{ $stats['present_days'] }} hari | Terlambat: {{ $stats['late_days'] }} | Total Jam: {{ number_format($stats['total_hours'], 2) }} jam

{{-- Filter --}}
{{-- Reset --}}
@forelse($attendances as $attendance) @empty @endforelse
Tanggal Nama Status Check In Check Out Jam Kerja Lokasi Masuk Lokasi Keluar Dokumen
{{ $attendance->date->format('d/m/Y') }} {{ $attendance->user->name ?? '-' }}
{{ $attendance->user->email ?? '' }}
@php $statusStyle = match($attendance->status) { 'present' => 'background:#d1fae5;color:#065f46', 'late' => 'background:#fef3c7;color:#92400e', 'absent' => 'background:#fee2e2;color:#991b1b', default => 'background:#e5e7eb;color:#374151' }; @endphp {{ strtoupper($attendance->status) }} {{ $attendance->check_in ?? '-' }} {{ $attendance->check_out ?? '-' }} {{ number_format($attendance->work_hours ?? 0, 2) }} jam {{ $attendance->check_in_location ?? '-' }} {{ $attendance->check_out_location ?? '-' }} @if($attendance->hasDocument()) 📎 Lihat @else - @endif
Tidak ada data absensi
@endsection