@extends('layouts.adminlte') @section('title', 'Riwayat Absensi Lengkap') @section('content_header')

Riwayat Absensi

Laporan kehadiran putra/putri Anda dalam 30 hari terakhir.

@stop @section('content')
{{-- CARD HEADER --}}

Data Kehadiran

Berikut adalah data kehadiran yang tercatat. Untuk melihat detail log (foto scan/lokasi), klik tombol mata.

{{-- Tombol Export --}}
@if($absences->isEmpty())

Belum Ada Data

Tidak ada riwayat absensi dalam 30 hari terakhir.

@else
@foreach($absences as $absence) @endforeach
Siswa Tanggal Masuk Pulang Status Detail
{{ $absence->student->name ?? 'N/A' }}
{{ $absence->student->class?->name ?? 'N/A' }}
{{ $absence->attendance_time->translatedFormat('d F Y') }} {{ $absence->attendance_time->format('H:i') }} @if($absence->checkout_time) {{ $absence->checkout_time->format('H:i') }} @else - @endif @php $statusStyles = [ 'Hadir' => 'bg-green-100 text-green-700', 'Terlambat' => 'bg-amber-100 text-amber-700', 'Absen' => 'bg-red-100 text-red-700', 'Izin' => 'bg-blue-100 text-blue-700', 'Sakit' => 'bg-purple-100 text-purple-700', 'Alpha' => 'bg-red-100 text-red-700', ]; $style = $statusStyles[$absence->status] ?? 'bg-gray-100 text-gray-600'; if($absence->checkout_time) { $style = 'bg-teal-100 text-teal-700'; } @endphp {{ $absence->status }}{{ $absence->checkout_time ? ' (Selesai)' : '' }}
{{-- Pagination --}}
{{ $absences->links('pagination::tailwind') }}
@endif
@stop @section('js') @stop