@extends('layouts.app') @section('title', 'Rekap Presensi') @section('content')
@if($type == 'daily') Rekap per jam pelajaran @elseif($type == 'weekly') Rekap per hari (Senin - Sabtu) @else Rekap per minggu @endif
{{ $students->count() }} siswa @if($className) • Kelas {{ $className }} @endif
| Siswa | @foreach($lessonHours as $hour)Jam {{ $hour }} | @endforeach
|---|---|
|
{{ $student->full_name }} {{ $student->class_name }} |
@foreach($lessonHours as $hour)
@php
$key = $student->id . '-' . $hour;
$att = $attendances->get($key);
$status = $att ? $att->status : '-';
$color = match($status) {
'hadir' => 'text-emerald-600 bg-emerald-50',
'alpha' => 'text-red-600 bg-red-50',
'sakit' => 'text-amber-600 bg-amber-50',
'izin' => 'text-blue-600 bg-blue-50',
'pkl' => 'text-violet-600 bg-violet-50',
'terlambat' => 'text-yellow-600 bg-yellow-50',
default => 'text-gray-300',
};
$icon = match($status) {
'hadir' => 'H',
'alpha' => 'A',
'sakit' => 'S',
'izin' => 'I',
'pkl' => 'P',
'terlambat' => 'T',
default => '-',
};
@endphp
{{ $icon }} | @endforeach
Pilih Kelas & Tanggal
Pilih kelas dan tanggal untuk melihat rekap harian
{{ $students->count() }} siswa @if($className) • Kelas {{ $className }} @endif
| Siswa | @foreach($recap as $row) @php $sep = !$loop->last ? 'border-r-2 border-gray-300' : ''; @endphp
{{ $row['label'] }} {{ \Carbon\Carbon::parse($row['date'])->format('d/m') }} |
@endforeach
TOTAL Hari |
|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| H | S | I | A | P | @endforeachH | S | I | A | P | ||||||
|
{{ $student->full_name }} |
@foreach($recap as $row)
@php
$s = $row['students'][$student->id] ?? null;
$sep = !$loop->last ? 'border-r-2 border-slate-200' : '';
@endphp
@if($s)
{{ $s['hadir'] }} | {{ $s['sakit'] }} | {{ $s['izin'] }} | {{ $s['alpha'] }} | {{ $s['pkl'] }} | @else— | — | — | — | — | @endif @endforeach {{-- TOTAL --}} @php $t = $totals[$student->id] ?? ['hadir' => 0, 'sakit' => 0, 'izin' => 0, 'alpha' => 0, 'pkl' => 0]; @endphp{{ $t['hadir'] }} | {{ $t['sakit'] }} | {{ $t['izin'] }} | {{ $t['alpha'] }} | {{ $t['pkl'] }} |
Pilih Kelas & Minggu
Pilih kelas dan minggu untuk melihat rekap mingguan
{{ $students->count() }} siswa @if($className) • Kelas {{ $className }} @endif
| Siswa | @foreach($recap as $row) @php $sep = !$loop->last ? 'border-r-2 border-gray-300' : ''; @endphp
{{ $row['label'] }} {{ \Carbon\Carbon::parse($row['start'])->format('d/m') }}-{{ \Carbon\Carbon::parse($row['end'])->format('d/m') }} |
@endforeach
TOTAL Hari |
|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| H | S | I | A | P | @endforeachH | S | I | A | P | ||||||
|
{{ $student->full_name }} |
@foreach($recap as $row)
@php
$s = $row['students'][$student->id] ?? null;
$sep = !$loop->last ? 'border-r-2 border-slate-200' : '';
@endphp
@if($s)
{{ $s['hadir'] }} | {{ $s['sakit'] }} | {{ $s['izin'] }} | {{ $s['alpha'] }} | {{ $s['pkl'] }} | @else— | — | — | — | — | @endif @endforeach {{-- TOTAL --}} @php $t = $totals[$student->id] ?? ['hadir' => 0, 'sakit' => 0, 'izin' => 0, 'alpha' => 0, 'pkl' => 0]; @endphp{{ $t['hadir'] }} | {{ $t['sakit'] }} | {{ $t['izin'] }} | {{ $t['alpha'] }} | {{ $t['pkl'] }} |
Pilih Kelas & Bulan
Pilih kelas dan bulan untuk melihat rekap bulanan