{{-- One month of days for one employee. $days and $month come from BuildsAttendanceReports; $monthRoute is the page to reload with another month. --}} @use('App\Enums\PermissionName') @use('App\Models\Attendance')

{{ __('History') }}

@isset($actions) {{ $actions }} @endisset
@if (count($days) === 0)
{{ __('This month has not started yet.') }}
@else
@can(PermissionName::ManageAttendance->value) @endcan @foreach ($days as $day) @php $attendance = $day['attendance']; @endphp @can(PermissionName::ManageAttendance->value) @endcan @endforeach
{{ __('Day') }} {{ __('Status') }} {{ __('In') }} {{ __('Out') }} {{ __('Hours') }} {{ __('Note') }}{{ __('Actions') }}
{{ $day['date']->format('D, M j') }}
@if ($day['derived'] === 'pending')
{{ __('Today') }}
@endif
@include('attendance.partials.status-badge', ['status' => $day['status'], 'derived' => $day['derived']]) @if ($attendance?->wasMarkedByHand()) {{ __('by admin') }} @endif {{ $attendance?->localCheckIn()?->format('g:i A') ?? '—' }} {{ $attendance?->localCheckOut()?->format('g:i A') ?? '—' }} {{ Attendance::formatHours($attendance?->hoursWorked()) }} {{ $attendance?->note ?? '' }}
@if ($attendance) {{ __('Edit') }} @elseif ($day['derived'] !== 'future') {{ __('Mark') }} @endif
@endif