@extends('layouts.school') @section('title', 'Attendance Report') @section('header', 'Attendance Report') @section('content')

{{ $summary['total'] }}

Total Records

{{ $summary['present'] }}

Present

{{ $summary['absent'] }}

Absent

{{ $summary['late'] }}

Late

@if($summary['total'] > 0)
Overall Attendance Rate {{ $summary['total'] > 0 ? round(($summary['present'] / $summary['total']) * 100, 1) : 0 }}%
@endif
@forelse($records as $record) @empty @endforelse
Date Student Class Status Time In
{{ $record->date->format('d M Y') }} {{ $record->student?->full_name ?? '—' }} {{ $record->classroom?->name ?? '—' }} @php $sColors = ['present' => 'bg-green-50 text-green-700', 'absent' => 'bg-red-50 text-red-700', 'late' => 'bg-amber-50 text-amber-700']; @endphp {{ ucfirst($record->status) }} {{ $record->time_in ?? '—' }}
No attendance records found.
{{ $records->links() }}
@endsection