@extends('layouts.app') @section('title','Attendance Summary') @section('page-title','Attendance') @section('content')
{{ \Carbon\Carbon::parse($month.'-01')->format('F Y') }} — All Active Employees
@forelse($summary as $emp) @php $total = ($emp->present_days + $emp->absent_days + $emp->late_days + $emp->leave_days); $worked = $emp->present_days + $emp->late_days; $pct = $total > 0 ? round(($worked / $total) * 100) : 0; $pctCol = $pct >= 90 ? '#059669' : ($pct >= 75 ? '#f59e0b' : '#dc2626'); @endphp @empty @endforelse
Employee Department Present Absent Late On Leave Attendance %
{{ strtoupper(substr($emp->first_name??'?',0,1)) }}
{{ $emp->full_name }}
{{ $emp->employee_number }}
{{ $emp->department->name ?? '—' }} {{ $emp->present_days }} {{ $emp->absent_days }} {{ $emp->late_days }} {{ $emp->leave_days }}
{{ $pct }}%
No records found for this period
@if($summary->hasPages())
{{ $summary->links('pagination::bootstrap-5') }}
@endif
@endsection