@extends('layouts.app') @section('title', 'Attendance') @section('crumbs') Dashboard/Attendance @endsection @section('content') @php $statuses = ['present' => 'Present', 'absent' => 'Absent', 'late' => 'Late', 'excused' => 'Excused']; $badgeColors = ['present' => 'green', 'absent' => 'red', 'late' => 'amber', 'excused' => 'blue']; @endphp @if ($classes->isEmpty())
No classes are available for your account, so there is nothing to take attendance for.
@endif
@unless ($isFamily)
@endunless
Reset
@perm('attendance.manage')
@csrf @endperm
Present {{ $summary['present'] }} Absent {{ $summary['absent'] }} Late {{ $summary['late'] }} Excused {{ $summary['excused'] }}
{{ array_sum($summary) }} of {{ $enrollments->count() }} marked · {{ $summary['present'] + $summary['late'] + $summary['excused'] }} accounted for @perm('attendance.manage') @endperm
@forelse ($enrollments as $enrollment) @php($student = $enrollment->student) @continue(!$student) @php($record = $records->get($student->id)) @empty @endforelse
Adm. No Student Roll call Remarks
{{ $student->admission_no }} {{ $student->full_name }} @if ($isFamily && $enrollment->schoolClass)
{{ $enrollment->schoolClass->name }}
@elseif ($enrollment->section)
Section {{ $enrollment->section->name }}
@endif
@perm('attendance.manage')
@foreach ($statuses as $value => $label) @endforeach
@else {{ $record ? ucfirst($record->status) : 'Not recorded' }} @endif
@perm('attendance.manage') @else {{ $record?->remarks ?: '—' }} @endif
@if ($enrollments->isEmpty() && $classes->isEmpty()) No classes are available for your account. @elseif ($isFamily) No students are linked to your account. @else No active students are enrolled in this class yet. @endif
@perm('attendance.manage')
Students without a selected status are left unrecorded for this date.
@endperm
@endsection @push('head') @endpush @push('scripts') @endpush