@foreach($days as $day) @endforeach @foreach($employees as $employee) @foreach($days as $day) @php $record = $employee['attendance'][$day] ?? null; $cellValue = ''; $cellColor = ''; if ($record) { if ($record['status'] === 'clock-in') { $cellValue = '✓'; $cellColor = '#10B981'; } elseif ($record['status'] === 'no-clock') { $cellValue = '✗'; $cellColor = '#EF4444'; } elseif ($record['status'] === 'not-available') { $cellValue = '⊗'; $cellColor = '#F59E0B'; } elseif ($record['status'] === 'holiday') { $cellValue = 'H'; $cellColor = '#EF4444'; } if ($record['extra_hours'] > 0) { $cellValue .= ' +' . $record['extra_hours'] . 'h'; } } @endphp @endforeach @endforeach
Employee Total Days Present Total Days Absent Total Extra Hours{{ $day }}
{{ $employee['name'] }} {{ $employee['total_present'] }} {{ $employee['total_absent'] }} {{ $employee['total_extra_hours'] }}{{ $cellValue }}