@php $canEditAttendance = \App\Support\AdminAccess::canAction('staff_attendance', 'edit'); @endphp
{{ __('Payroll Module') }}

{{ __('Staff Attendance') }}

{{ __('Select staff members, choose the date, mark the status, and save in one step.') }}

{{ __('Active Staff') }} {{ $summary['staff_count'] }}
{{ __('Selected') }} {{ $summary['selected_count'] }}
{{ __('Records') }} {{ $summary['record_count'] }}

{{ __('Select Staff Members') }}

{{ __('Tick the staff you want to mark for the selected date.') }}

@if($canEditAttendance) @endif
@forelse($staffMembers as $staff) @empty
{{ __('No active staff members found.') }}
@endforelse
@error('selectedStaffIds')
{{ $message }}
@enderror

{{ __('Attendance Settings') }}

{{ __('Keep it quick: one date, one status, multiple staff.') }}

@error('attendance_date') {{ $message }} @enderror
@error('status') {{ $message }} @enderror
@if($editingAttendanceId)
{{ __('You are editing an existing attendance record. Saving will update that record.') }}
@endif @if(! $canEditAttendance)
{{ __('You do not have permission to save attendance.') }}
@endif

{{ __('Attendance Records') }}

{{ __('Use the month and year filters to review saved records quickly.') }}

@if($attendanceRecords->isEmpty())
{{ __('No attendance records found for this month.') }}
@else
@foreach($attendanceRecords as $record) @endforeach
{{ __('Date') }} {{ __('Staff') }} {{ __('Status') }} {{ __('Action') }}
{{ $record->attendance_date?->format('d M Y') }} {{ $record->staff?->display_name ?? __('Staff') }} {{ ucfirst($record->status) }} @if($canEditAttendance) @endif
@endif