@php /** @var array $staffBoard */ $canPostStaffAttendance = $canManageStaff ?? app(\App\Support\NurseryAccess::class)->allows(\App\Support\NurseryAccess::CAP_MANAGE_STAFF_ATTENDANCE); $staffCheckInIds = $staffBoard['not_yet']->map(fn ($employee) => (int) $employee->id)->values()->all(); $staffCheckOutIds = $staffBoard['checked_in']->map(fn ($row) => (int) $row['employee']->id)->values()->all(); @endphp
@if($canPostStaffAttendance && (count($staffCheckInIds) > 0 || count($staffCheckOutIds) > 0))
@if(count($staffCheckInIds) > 0) @endif @if(count($staffCheckOutIds) > 0) @endif
@endif

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

@forelse($staffBoard['not_yet'] as $employee)
@if($canPostStaffAttendance) @endif {{ $employee->name }}
@if($canPostStaffAttendance)
@csrf
@endif
@empty

@endforelse

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

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

@endforelse

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

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

@endforelse
@if($canPostStaffAttendance)

تم تحديد موظفين

@csrf
@csrf
@endif