{{-- Shared by the admin panel and the teacher panel ($panel = admin|teacher). --}} @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; $isTeacher = $panel === 'teacher'; $navGroups = $isTeacher ? \App\Support\Navigation\TeacherNav::groups('batches') : \App\Support\Navigation\TenantNav::groups('coaching-attendance'); $action = $isTeacher ? route('tenant.teacher.batch-attendance.store', $batch) : route('tenant.admin.coaching.attendance.store', $batch); $back = $isTeacher ? route('tenant.teacher.batches.index') : route('tenant.admin.coaching.attendance.index', ['date' => $date->toDateString()]); $initial = $enrollments->mapWithKeys(fn ($e) => [$e->student_id => $existing->get($e->student_id)?->status ?? 'present']); @endphp
← Back
@include('tenant.coaching._errors')
@unless($meetsToday)

This batch doesn't normally meet on {{ $date->format('l') }} ({{ $batch->daysLabel() }}) — fine for a make-up class.

@endunless @if($existing->isNotEmpty())

Already marked — saving again updates it.

@endif
@csrf

present · absent

@forelse($enrollments as $enrollment) @php $record = $existing->get($enrollment->student_id); @endphp

{{ $loop->iteration }}.{{ $enrollment->student->first_name }} {{ $enrollment->student->last_name }}

{{ $enrollment->student->student_code }}@if($record?->sms_sent_at) · absence SMS sent {{ $record->sms_sent_at->format('g:i A') }}@endif

@foreach(['present' => 'Present', 'late' => 'Late', 'absent' => 'Absent'] as $value => $label) @endforeach
@empty

No active students in this batch.

@endforelse
@if($enrollments->isNotEmpty())
@endif