@extends('layouts.app') @section('title', 'Attendance Overview') @section('content')

Attendance overview

Student and staff attendance between {{ \Carbon\Carbon::parse($from)->format('j M Y') }} and {{ \Carbon\Carbon::parse($to)->format('j M Y') }}.
Mark attendance
@php $present = (int)($summary['present'] ?? 0); $absent = (int)($summary['absent'] ?? 0); $late = (int)($summary['late'] ?? 0); $total = $present + $absent + $late; @endphp

Daily attendance

Present learners per day
@if($daily->count()) {!! \App\Support\Chart::line($daily->pluck('present', 'date')->all(), 180, '#0b5d51') !!} @else @endif

Attendance mix

Selected period
{!! \App\Support\Chart::donut(['Present' => $present, 'Absent' => $absent, 'Late' => $late], 150) !!}
Present{{ pct($present, $total) }}
Absent{{ pct($absent, $total) }}
Late{{ pct($late, $total) }}

Attendance by class

Present rate
@forelse($byClass as $c) @empty @endforelse
ClassPresentRecordedRate
{{ $c->name }}{{ num($c->present) }}{{ num($c->total) }}{{ pct($c->present, $c->total) }}

Learners needing follow-up

More than two absences
Full report
@forelse($chronic as $s) @empty @endforelse
LearnerAbsencesDaysRate
{{ initials($s->first_name.' '.$s->surname) }}
{{ $s->first_name }} {{ $s->surname }}{{ $s->admission_no }}
{{ $s->absences }}{{ $s->days }}{{ pct($s->days - $s->absences, $s->days) }}
@endsection