@extends('schoolLayout.app') @section('content') @include('successError')
Employee ID: {{ $staff->registration_no }}
Present Days
{{$presentCount}}
{{$presentPercent}}%
Absent Days
{{$absentCount}}
{{$absentPercent}}%
Leaves
{{$leaveCount}}
{{$leavePercent}}%
Half Days
{{$halfDayCount}}
{{$halfDayPercent}}%
| Date | Check-in Time | Check-out Time | Work Duration | Status | Remarks |
|---|---|---|---|---|---|
| {{ \Carbon\Carbon::parse($record->date)->format('M d, Y') }} | {{ $record->check_in ? \Carbon\Carbon::parse($record->check_in)->format('h:i A') : 'N/A' }} | {{ $record->check_out ? \Carbon\Carbon::parse($record->check_out)->format('h:i A') : 'N/A' }} | @if($record->check_in && $record->check_out) @php $checkIn = \Carbon\Carbon::parse($record->check_in); $checkOut = \Carbon\Carbon::parse($record->check_out); $diff = $checkIn->diff($checkOut); @endphp {{ $diff->h }}h {{ $diff->i }}m @else N/A @endif | @php $status = strtolower($record->status); $statusDisplay = ucfirst(str_replace('_', ' ', $status)); // Assign styles based on status $badgeStyles = match ($status) { 'present' => ['bg' => '#DCFCE7', 'text' => '#166534'], 'absent' => ['bg' => '#FEE2E2', 'text' => '#991B1B'], 'leave' => ['bg' => '#DBEAFE', 'text' => '#1E40AF'], 'half_day' => ['bg' => '#FEF9C3', 'text' => '#854D0E'], default => ['bg' => '#E5E7EB', 'text' => '#374151'], }; @endphp {{ $statusDisplay }} | - |