@extends('layouts.app') @php use Carbon\Carbon; @endphp @section('title', 'Attendance Details') @section('content')
View and analyze attendance records over time
Total Days
{{ $attendances->count() }}
Present Days
{{ $attendances->where('status.name', 'present')->count() }}
Late Days
{{ $attendances->where('status.name', 'late')->count() }}
Absent Days
{{ $attendances->where('status.name', 'absent')->count() }}
| Date | Employee | Punch In | Punch Out | Total Hours | Behavior | Status | Actions |
|---|---|---|---|---|---|---|---|
| {{ $attendance->in_date->format('M d, Y') }} |
{{ $attendance->user?->full_name ?? ($attendance->user?->first_name . ' ' . $attendance->user?->last_name) ?? 'Unknown User' }}
{{ $attendance->user?->profile?->employee_id ?? '' }}
|
@php
$punchIns = $attendance->all_punch_in_times;
@endphp
@if($punchIns->count() > 0)
@foreach($punchIns as $index => $punchIn)
@else
-
@endif
{{ \Carbon\Carbon::parse($punchIn->punch_time)->format('h:i A') }}
@if($punchIns->count() > 1)
({{ $index + 1 }})
@endif
@endforeach
|
@php
$punchOuts = $attendance->all_punch_out_times;
@endphp
@if($punchOuts->count() > 0)
@foreach($punchOuts as $index => $punchOut)
@else
-
@endif
{{ \Carbon\Carbon::parse($punchOut->punch_time)->format('h:i A') }}
@if($punchOuts->count() > 1)
({{ $index + 1 }})
@endif
@endforeach
|
{{ $attendance->total_hours ?? '-' }} | @if($attendance->behavior === 'early') Early @elseif($attendance->behavior === 'late') Late @else Regular @endif | {{ $attendance->status->name }} |
|
| No attendance records found for the selected period. | |||||||