@use('App\Enums\AttendanceStatus') @php $attendance ??= null; $selectedEmployeeId ??= null; $selectedDate ??= null; $employeeId = (int) old('user_id', $attendance?->user_id ?? $selectedEmployeeId); $date = old('date', $attendance?->date->toDateString() ?? $selectedDate ?? now()->toDateString()); $status = old('status', $attendance?->status->value ?? AttendanceStatus::Present->value); $checkIn = old('check_in_time', $attendance?->localCheckIn()?->format('H:i')); $checkOut = old('check_out_time', $attendance?->localCheckOut()?->format('H:i')); @endphp
@foreach ($employees as $employee) @endforeach @if ($attendance) @endif
{{ __('Status') }}
@foreach ($statuses as $option) @endforeach

{{ __('Times are in the employee\'s own timezone. Leave check-out empty if they are still in.') }}

{{ old('note', $attendance?->note) }}
@if ($attendance) {{-- Submits the delete form that sits outside this one, so the two forms never nest. --}} {{ __('Delete this record') }} @endif
{{ __('Cancel') }} @unless ($attendance) @endunless {{ $submitLabel }}