{{-- Header Section --}}

Attendance Dashboard

Track and manage staff attendance

Export Excel
{{-- Filters Grid --}}
{{-- Month Selector --}}
{{-- Department Filter --}} @if(count($departments) > 0)
@endif {{-- Role Filter --}} @if(count($roles) > 0)
@endif {{-- Staff Filter --}}
{{-- Loading Indicator --}}
Loading...
{{-- Legend Card --}}
Legend
P Present
W:8 Worked
A Absent
L Leave
H Holiday
OFF Day Off
NS No Shift
{{-- Attendance Table Card --}}
@for($day = 1; $day <= $this->daysInMonth; $day++) @php $date = $this->startDate->copy()->addDays($day - 1); $isToday = $date->isToday(); $isWeekend = $date->isWeekend(); $bgColor = $isToday ? '#dbeafe' : ($isWeekend ? '#f3f4f6' : 'var(--table-header-bg,#f9fafb)'); @endphp @endfor @forelse($this->staffList as $index => $staff) @for($day = 1; $day <= $this->daysInMonth; $day++) @php $date = $this->startDate->copy()->addDays($day - 1); $status = $this->getStatusForDay($staff->id, $date); $isToday = $date->isToday(); $isWeekend = $date->isWeekend(); $bgColor = $isToday ? 'rgba(219,234,254,0.3)' : ($isWeekend ? 'rgba(243,244,246,0.5)' : ''); // Determine badge style $badgeStyles = [ 'P' => 'background:#dbeafe;color:#1e40af;', 'W' => 'background:#dcfce7;color:#166534;', 'A' => 'background:#fee2e2;color:#991b1b;', 'L' => 'background:#fef3c7;color:#92400e;', 'H' => 'background:#f3e8ff;color:#7c3aed;', 'OFF' => 'background:#f3f4f6;color:#6b7280;', 'NS' => 'background:#f9fafb;color:#9ca3af;font-style:italic;', ]; $badgeStyle = $badgeStyles[$status['class']] ?? 'background:transparent;color:var(--text-muted);'; @endphp @endfor @empty @endforelse
# Staff
{{ $date->format('D') }}
{{ str_pad($day, 2, '0', STR_PAD_LEFT) }}
{{ $index + 1 }}
{{ strtoupper(substr($staff->first_name, 0, 1) . substr($staff->last_name, 0, 1)) }}
{{ $staff->first_name }} {{ $staff->last_name }}
@if($staff->department)
{{ $staff->department->name }}
@endif
@if($status['value']) {{ $status['value'] }} @else - @endif
No Staff Found
Please assign shifts to staff members to view attendance
{{-- Day Detail Modal --}}
@push('styles') @endpush @push('scripts') @endpush