@php $meta = is_array($payload['meta'] ?? null) ? $payload['meta'] : []; $profil = is_array($meta['profil'] ?? null) ? $meta['profil'] : []; $dates = is_array($meta['dates'] ?? null) ? $meta['dates'] : []; $holidayMap = is_array($meta['holiday_map'] ?? null) ? $meta['holiday_map'] : []; $rows = is_array($payload['data'] ?? null) ? $payload['data'] : []; @endphp

Summary Absensi

Profil: {{ $profil['code'] ?? '-' }} - {{ $profil['name'] ?? '-' }} | Periode: {{ $profil['selected_start_date'] ?? '-' }} s/d {{ $profil['selected_end_date'] ?? '-' }}
Keterangan: tanda * = SPL approved
@foreach($dates as $d) @php $holidayName = (string) ($holidayMap[$d] ?? ''); $iso = (int) date('N', strtotime((string) $d)); $isWeekend = in_array($iso, [6, 7], true); $isHoliday = $holidayName !== '' && !$isWeekend; $cls = $isHoliday ? 'holiday' : ($isWeekend ? 'weekend' : ''); $label = is_string($d) && strlen($d) >= 10 ? substr($d, 8, 2) : (string) $d; @endphp @endforeach @forelse($rows as $r) @php $daily = is_array(($r['daily'] ?? null)) ? $r['daily'] : []; @endphp @foreach($dates as $d) @php $cell = is_array(($daily[$d] ?? null)) ? $daily[$d] : null; $code = $cell ? (string) ($cell['code'] ?? '') : ''; if ($cell && !empty($cell['is_lembur'])) { $code = $code === '' ? '*' : ($code . '*'); } @endphp @endforeach @empty @endforelse
No Kode Nama{{ $label }}
{{ (int) ($r['no'] ?? 0) }} {{ $r['employee_code'] ?? '' }} {{ $r['employee_name'] ?? '' }}{{ $code }}
Tidak ada data