@php use App\Enums\AttendanceStatus; use Carbon\Carbon; @endphp
| {{ __('Date') }} | {{ __('Day') }} | {{ __('Shift') }} | {{ __('Check In') }} | {{ __('Check Out') }} | {{ __('Work Hours') }} | {{ __('Status') }} | {{ __('Remarks') }} |
|---|---|---|---|---|---|---|---|
| {{ $log->date ? Carbon::parse($log->date)->format('d M Y') : __('N/A') }} | {{ $log->date ? Carbon::parse($log->date)->format('l') : __('N/A') }} | {{ $log->shift->name ?? __('N/A') }} | @if ($log->check_in_time) {{ Carbon::parse($log->check_in_time)->format('h:i A') }} @else {{ __('N/A') }} @endif | @if ($log->check_out_time) {{ Carbon::parse($log->check_out_time)->format('h:i A') }} @else {{ __('N/A') }} @endif | @if ($log->working_hours) @php $hours = floor($log->working_hours); $minutes = round(($log->working_hours - $hours) * 60); @endphp @if($hours > 0) {{ $hours }}h {{ $minutes }}m @else {{ $minutes }}m @endif @else {{ __('N/A') }} @endif | @php $statusEnum = is_string($log->status) ? AttendanceStatus::tryFrom($log->status) : $log->status; @endphp @if($statusEnum) {{ __($statusEnum->label()) }} @if(isset($log->late_hours) && $log->late_hours > 0) @endif @else {{ ucfirst($log->status ?? 'N/A') }} @endif | {{ $log->remarks ?? __('N/A') }} |
| {{ __('No attendance records found') }} | |||||||