@php /** @var array $board */ $canPostChildAttendance = $canManageChildren ?? app(\App\Support\NurseryAccess::class)->allows(\App\Support\NurseryAccess::CAP_MANAGE_CHILD_ATTENDANCE); $childCheckInIds = $board['not_yet']->map(fn ($child) => (int) $child->id)->values()->all(); $childCheckOutIds = $board['checked_in']->map(fn ($row) => (int) $row['child']->id)->values()->all(); @endphp
@if($canPostChildAttendance && (count($childCheckInIds) > 0 || count($childCheckOutIds) > 0))
@if(count($childCheckInIds) > 0) @endif @if(count($childCheckOutIds) > 0) @endif
@endif

بانتظار الحضور ({{ $board['not_yet']->count() }})

@forelse($board['not_yet'] as $child)
@if($canPostChildAttendance) @endif {{ $child->name }}
@if($canPostChildAttendance)
@csrf
@endif
@empty

@endforelse

حاضرون ({{ $board['checked_in']->count() }})

@forelse($board['checked_in'] as $row)
@if($canPostChildAttendance) @endif
{{ $row['child']->name }} {{ $row['log']->checked_in_at?->format('H:i') }}
@if($canPostChildAttendance)
@csrf
@endif
@empty

@endforelse

انصرفوا ({{ $board['checked_out']->count() }})

@forelse($board['checked_out'] as $row)
{{ $row['child']->name }} {{ $row['log']->checked_out_at?->format('H:i') }}
@empty

@endforelse
@if($canPostChildAttendance)

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

@csrf
@csrf
@endif