@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $statusColors = ['present' => 'green', 'late' => 'amber', 'absent' => 'red']; @endphp
← Previous {{ $period === 'monthly' ? $rangeStart->format('F Y') : $rangeStart->format('M j').' – '.$rangeEnd->format('M j') }} Next →
@for($day = $rangeStart->copy(); $day->lte($rangeEnd); $day->addDay()) @endfor @forelse($rows as $row) @for($day = $rangeStart->copy(); $day->lte($rangeEnd); $day->addDay()) @php $record = $row['records']->get($day->toDateString()); $short = ['present' => 'P', 'late' => 'La', 'absent' => 'A'][$record->status ?? ''] ?? ($day->lt(today()) ? 'A' : '—'); $title = $day->format('M j, Y'); if ($record) { $title .= ' — '.$record->statusLabel(); if ($record->check_in_at) $title .= ' · In '.$record->check_in_at->format('g:i A'); if ($record->check_out_at) $title .= ' · Out '.$record->check_out_at->format('g:i A'); } @endphp @endfor @empty @endforelse
Teacher {{ $period === 'monthly' ? $day->format('j') : $day->format('D') }} Present Late Absent %
{{ $row['teacher']->fullName() }} {{ $row['teacher']->branch->name }} {{ $short }} {{ $row['presentCount'] }} {{ $row['lateCount'] }} {{ $row['absentCount'] }} {{ $row['percentage'] }}%
No teachers with a portal login yet — staff attendance requires a login to check in.
P Present La Late A Absent Hover a day to see check-in/check-out time.