@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; $navGroups = \App\Support\Navigation\TeacherNav::groups('my-attendance'); $statusColors = ['present' => 'green', 'late' => 'amber', 'absent' => 'red']; $tenantTimezone = $tenant->timezone ?? config('app.timezone'); $local = fn ($carbon) => $carbon?->copy()->setTimezone($tenantTimezone); @endphp

Attendance History

{{ $weekStart->format('M j') }} – {{ $weekEnd->format('M j') }} · {{ $presentCount }}/{{ $workingDaysSoFar }} days present · {{ $weeklyPercentage }}%

@foreach(\Carbon\CarbonPeriod::create($weekStart, $weekEnd) as $day) @php $record = $weekRecords->get($day->toDateString()); @endphp @endforeach
Day Check In Check Out Status
{{ $day->format('D, M j') }} {{ $local($record?->check_in_at)?->format('g:i A') ?? '—' }} {{ $local($record?->check_out_at)?->format('g:i A') ?? '—' }} @if($record) {{ $record->statusLabel() }} @elseif($day->lt(today())) Absent @else — @endif
{{ $month->format('F Y') }} {{ $monthPresentCount }} present {{ $monthLateCount }} late {{ $monthAbsentCount }} absent {{ $monthlyPercentage }}% attendance
@for($day = 1; $day <= $month->daysInMonth; $day++) @php $date = $month->copy()->day($day); @endphp @endfor @for($day = 1; $day <= $month->daysInMonth; $day++) @php $date = $month->copy()->day($day); $record = $monthRecords->get($date->toDateString()); $short = ['present' => 'P', 'late' => 'La', 'absent' => 'A'][$record->status ?? ''] ?? ($date->lt(today()) ? 'A' : '—'); @endphp @endfor
{{ $day }}
{{ $short }}