@extends('layouts.nursery') @section('title', 'يوم الفصل — '.$classroom->name) @section('content') @php $checkInIds = $roster->where('state', 'not_yet')->map(fn ($row) => (int) $row['child']->id)->values()->all(); $checkOutIds = $roster->where('state', 'present')->map(fn ($row) => (int) $row['child']->id)->values()->all(); @endphp
{{-- Future: Care | Learning toggle. Learning stays a separate system — do not implement here. --}}

يوم الفصل

{{ $classroom->name }}

← الفصول

حضور

{{ $board['checked_in']->count() }}

لم يصلوا

{{ $board['not_yet']->count() }}

انصرفوا

{{ $board['checked_out']->count() }}

السعة

{{ $capacity ?? '—' }}

النسبة

@if($capacity)

{{ $enrolled }}/{{ $capacity }}

@else

{{ $enrolled }}

@endif @if($classroom->teacher?->name)

{{ $classroom->teacher->name }}

@endif

الأطفال

@if($canManageChildAttendance && (count($checkInIds) > 0 || count($checkOutIds) > 0))
@if(count($checkInIds) > 0) @endif @if(count($checkOutIds) > 0) @endif
@endif
@forelse($roster as $row) @php $child = $row['child']; $log = $row['log']; $state = $row['state']; $isLate = (bool) ($row['is_late'] ?? false); $isEarly = (bool) ($row['is_early'] ?? false); $selectable = $canManageChildAttendance && $state !== 'checked_out'; $correctStatus = $log?->status === 'absent' ? 'absent' : 'present'; @endphp
@if($selectable) @endif
{{ $child->name }} @if($child->code) {{ $child->code }} @endif
@if($state === 'checked_out' && $log?->checked_in_at)

حضور {{ $log->checked_in_at->format('H:i') }} @if($log->checked_out_at) · انصراف {{ $log->checked_out_at->format('H:i') }} @endif @if($isLate) · متأخر @endif @if($isEarly) · مغادرة مبكرة @endif

@elseif($state === 'present' && $isLate)

متأخر

@endif
$state === 'not_yet', 'bg-emerald-50 text-emerald-800 border border-emerald-100' => $state === 'present', 'bg-sky-50 text-sky-800 border border-sky-100' => $state === 'checked_out', ])> @if($state === 'not_yet') لم يحضر @elseif($state === 'present') حاضر{{ $log?->checked_in_at ? ' '.$log->checked_in_at->format('H:i') : '' }} @else انصرف{{ $log?->checked_out_at ? ' '.$log->checked_out_at->format('H:i') : '' }} @endif
@if($canManageChildAttendance || $canManageChildActivity)
@if($canManageChildAttendance) @if($state === 'not_yet')
@csrf
@elseif($state === 'present')
@csrf
@else تم الانصراف @endif @if($log) @endif @endif @if($canManageChildActivity)
@endif
@endif
@empty

لا يوجد أطفال مسجّلون في هذا الفصل.

@endforelse
@if($canManageChildAttendance)

تم تحديد أطفال

@include('nursery.classrooms.partials.today-bulk-confirm-modal') @include('nursery.classrooms.partials.today-correction-modal') @endif @if($canManageChildActivity) @include('nursery.classrooms.partials.today-care-modal') @endif
@endsection