| {{ __('table.Code') }} | {{ __('table.Employee-Name') }} | @foreach($dates as $date){{ $date->format('d M') }} {{ $date->format('D') }} | @endforeach
|---|---|---|
| {{ $employee->code }} |
|
@foreach($dates as $date)
@php
$dateStr = $date->format('Y-m-d');
$key = $employee->id . '_' . $dateStr;
$attendance = $indexedAttendance[$key] ?? null;
if ($attendance) {
$bgColor = $attendance->bg_color;
$textColor = 'text-white';
} else {
$bgColor = 'transparent';
$textColor = 'text-gray-900 dark:text-white';
}
$shiftDisplay = null;
if (!$attendance) {
$pattern = $indexedSchedule[$key] ?? null;
$shiftDisplay = $pattern?->shift?->code ?? null;
}
$requestStatuses = ['CT','CM','CMA','CKA','CBA','CIM','CKM','CAK','CIH','CH','S','I','IT','DLK','DLN'];
$isRequest = $attendance && in_array($attendance->status, $requestStatuses);
$isIT = $attendance && $attendance->status === 'IT' && $attendance->clock_in;
$isRequestOnly = $isRequest && !$isIT;
@endphp
@if($attendance)
@if($isRequestOnly)
- - -
@if($attendance->shift_code)
{{ $attendance->shift_code }}
@endif
@else
@if($attendance->has_photo_in && $attendance->clock_in)
@else
{{ $attendance->clock_in ?? '- - -' }}
@endif
@if($attendance->clock_in || $attendance->clock_out)
-
@endif
@if($attendance->has_photo_out && $attendance->clock_out)
@else
{{ $attendance->clock_out ?? ($attendance->clock_in ? '-' : '') }}
@endif
@if($attendance->shift_code)
{{ $attendance->shift_code }}
@endif
@endif
@else
- - -
@if($shiftDisplay)
{{ $shiftDisplay }}
@endif
@endif
|
@endforeach
—
Menunggu Verifikasi HRD