{{ __('Attendance Records') }}

@can('attendances create') @endcan @if($this->canReviewPendingAttendance()) {{ __('Pending attendance sessions') }} @endif
@if(session()->has('message'))
{{ session('message') }}
@endif
@if(!$employee_id)
@if(filled($filterEmployeeName))
{{ $filterEmployeeName }}
@else @if(mb_strlen(trim($filterEmployeeSearch)) >= 2)
@forelse($filterEmployeeOptions as $id => $name) @empty
{{ __('No results') }}
@endforelse
@endif @endif
@endif
@forelse($attendances as $index => $att) @php $firstCheckIn = $att->first_check_in; $lastCheckOut = $att->last_check_out_display; $totalSeconds = $att->total_worked_seconds; $h = floor($totalSeconds / 3600); $m = floor(($totalSeconds % 3600) / 60); $s = $totalSeconds % 60; @endphp @empty @endforelse
{{ '#' }} {{ __('Name') }} {{ __('Work Shift') }} {{ __('Required hours') }} {{ __('Date') }} {{ __('Check In') }} {{ __('Check Out') }} {{ __('Duration') }} {{ __('Action') }}
{{ $attendances->firstItem() + $index }} {{ $att->employee->name }} {{ $att->shift_name }} {{ $att->scheduled_hours }} {{ $att->date }} {{ $firstCheckIn ?? '-' }} {{ $lastCheckOut }} {{ str_pad($h, 2, '0', STR_PAD_LEFT) }}h {{ str_pad($m, 2, '0', STR_PAD_LEFT) }}m {{ str_pad($s, 2, '0', STR_PAD_LEFT) }}s
{{ __('View') }} @can('attendances edit') @endcan
{{ __('No Records') }}
{{ $attendances->links() }}