{{-- 1. KPI SUMMARY CARDS --}}
Total Active Staff
{{ $metrics['total'] }}
Present Today
{{ $metrics['present'] }}
On Leave
{{ $metrics['leave'] }}
Missing Punch / Absent
{{ $metrics['missing'] }}
{{-- 2. FILTER BAR --}}
{{-- 3. ATTENDANCE TABLE --}}
@forelse($employees as $emp) @php // Get attendance for the filtered date (loaded via Livewire query) $att = $emp->attendance->first(); @endphp {{-- Clock In --}} {{-- Clock Out --}} {{-- Hours --}} {{-- Status Badge --}} {{-- Action --}} @empty @endforelse
Employee Clock In Clock Out Work Hrs Status Action
{{ $emp->full_name }}
{{ $emp->employee_code }} • {{ $emp->department }}
@if ($att && $att->clock_in)
{{ \Carbon\Carbon::parse($att->clock_in)->format('h:i A') }}
@else
--:--
@endif
@if ($att && $att->clock_out)
{{ \Carbon\Carbon::parse($att->clock_out)->format('h:i A') }}
@else
--:--
@endif
{{ $att ? $att->formatted_total_time : '00:00' }} hrs
@if ($att) @php $sClass = match ($att->status) { 'present' => 'badge-present', 'late' => 'badge-late', 'absent' => 'badge-absent', 'on_leave' => 'badge-leave', default => 'badge-none', }; @endphp {{ ucfirst(str_replace('_', ' ', $att->status)) }} @if ($att->is_regularized) @endif @else No Record @endif
No active employees found.
@if ($employees->hasPages())
{{ $employees->links() }}
@endif
{{-- 4. EDIT PUNCH MODAL --}}