{{ __('Attendance Overview') }}

{{ \Carbon\Carbon::parse($date)->format('l, F j, Y') }}
{{-- Flash Messages --}} @if (session('success'))

{{ session('success') }}

@endif {{-- ============================================================ --}} {{-- Date Filter --}} {{-- ============================================================ --}}
{{-- ============================================================ --}} {{-- Summary Strip --}} {{-- ============================================================ --}}

Total Records

{{ $records->count() }}

Clocked Out

{{ $records->whereNotNull('clock_out')->count() }}

Still Working

{{ $records->whereNull('clock_out')->count() }}

{{-- ============================================================ --}} {{-- Attendance Table --}} {{-- ============================================================ --}}

Attendance for {{ \Carbon\Carbon::parse($date)->format('F j, Y') }}

@if($records->count() > 0) @foreach($records as $index => $record) @endforeach
# Employee Clock In Clock Out Total Hours
{{ $index + 1 }}
{{ strtoupper(substr($record->user->name ?? '?', 0, 1)) }}

{{ $record->user->name ?? 'Unknown' }}

{{ $record->user->email ?? '' }}

{{ $record->clock_in ? \Carbon\Carbon::parse($record->clock_in)->format('h:i A') : '—' }} @if($record->clock_out) {{ \Carbon\Carbon::parse($record->clock_out)->format('h:i A') }} @else Working @endif @if($record->total_hours) {{ number_format($record->total_hours, 2) }} hrs @elseif($record->clock_in && !$record->clock_out) @php $elapsed = \Carbon\Carbon::parse($record->clock_in)->diffInMinutes(now()) / 60; @endphp ~{{ number_format($elapsed, 1) }} hrs @else @endif
@else

No attendance records

No one has clocked in for {{ \Carbon\Carbon::parse($date)->format('F j, Y') }}.

@endif