@php $attendance = $attendanceDashboard ?? []; $summary = data_get($attendance, 'summary', []); $health = data_get($attendance, 'health', []); $formatDate = fn ($value) => $value ? \Carbon\Carbon::parse($value)->format('d M Y') : '-'; $formatTime = fn ($value) => $value ? \Carbon\Carbon::parse($value)->format('h:i A') : '-'; $duration = function ($roster) { if (!$roster?->class_start_time || !$roster?->class_end_time) { return '-'; } return \Carbon\Carbon::parse($roster->class_start_time)->diffForHumans( \Carbon\Carbon::parse($roster->class_end_time), true ); }; $instructors = fn ($roster) => collect([$roster?->instructor1?->title, $roster?->instructor2?->title, $roster?->instructor3?->title])->filter()->implode(', ') ?: '-'; @endphp
{{ data_get($health, 'message') }}
| Month | Present |
|---|---|
| {{ data_get($month, 'month') }} | {{ data_get($month, 'present', 0) }} |
| Roster | Present |
|---|---|
| {{ data_get($row, 'roster') }} | {{ data_get($row, 'present') }} |
| No Roster Attendance Found | |
| Date | Roster | Instructor | Check In | Check Out | Duration | Status | Actions |
|---|---|---|---|---|---|---|---|
| {{ $formatDate($record->attendance_date) }} | {{ $record->roster?->roster_name ?? '-' }} | {{ $instructors($record->roster) }} | {{ $formatTime($record->created_at) }} | {{ $formatTime($record->roster?->class_end_time) }} | {{ $duration($record->roster) }} | Present | @include('admin.attendance.reports.partials.action-button', ['attendance' => $record]) |
No upcoming roster bookings found.
@endforelse{{ $note->notes }}
No instructor notes have been added for attendance.
@endforelse