@use('App\Enums\PermissionName') @use('App\Models\Attendance')

{{ __('Attendance') }}

@if ($locations->isNotEmpty()) @endif
‹ {{ __('Prev') }} @if ($date->lessThan($today)) {{ __('Next') }} › @endif
{{ __('Monthly summary') }} @can(PermissionName::ManageAttendance->value) {{ __('Mark a day') }} @endcan
{{ $date->format('l, F j, Y') }} @if ($date->isSameDay($today)) · {{ __('Today') }} @endif @unless (Attendance::isWorkingDay($date)) · {{ __('Weekend') }} @endunless
@if ($rows->isEmpty())
{{ __('No active employees to show.') }}
@else
@foreach ($rows as $row) @php $employee = $row['employee']; $attendance = $row['attendance']; @endphp @endforeach
{{ __('Employee') }} {{ __('Location') }} {{ __('Status') }} {{ __('In') }} {{ __('Out') }} {{ __('Hours') }} {{ __('Actions') }}
{{ $employee->name }}
{{ $employee->designation() }}
{{ $employee->location?->name ?? '—' }} @include('attendance.partials.status-badge', ['status' => $row['status'], 'derived' => $row['derived']]) {{ $attendance?->localCheckIn()?->format('g:i A') ?? '—' }} {{ $attendance?->localCheckOut()?->format('g:i A') ?? '—' }} {{ Attendance::formatHours($attendance?->hoursWorked()) }}
{{ __('History') }} @can(PermissionName::ManageAttendance->value) @if ($attendance) {{ __('Edit') }} @else {{ __('Mark') }} @endif @endcan
@endif