@extends('garage.layouts.app') @section('title', 'Attendance') @section('content') @include('garage.hr.styles') @include('garage.attendance._styles') @php $statLink = function (string $s = '') use ($filterQuery) { $q = $filterQuery; if ($s === '') { unset($q['status']); } else { $q['status'] = $s; } return route('garage.attendance.index', $q); }; @endphp
Attendance
{{ $filterLabel }} · {{ $stats['all'] }} record(s)
@csrf
Raw logs
@include('garage.attendance._nav', ['month' => $month ?? now()->format('Y-m')]) @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($unmappedLogs > 0)
{{ $unmappedLogs }} unmapped punch(es). Review logs
@endif @if($devices->where('is_active', true)->isEmpty())
Add a device and sync to import punches.
@endif
@if($view === 'day')
@elseif($view === 'range')
@else
@endif
Reset
All
{{ $stats['all'] }}
Present
{{ $stats['present'] }}
Absent
{{ $stats['absent'] }}
Half day
{{ $stats['half_day'] }}
Late
{{ $stats['late'] }}
No checkout
{{ $stats['missing_checkout'] }}
Punches
{{ $logsInRange }}
@csrf
Devices Reports @if($devices->isNotEmpty()) @foreach($devices as $d) {{ $d->name }} · last sync {{ $d->last_synced_at ? \Carbon\Carbon::parse($d->last_synced_at)->format('M j, H:i') : 'never' }} @endforeach @endif
Attendance records {{ $records->total() }} row(s)
@forelse($records as $r) @empty @endforelse
Date Employee In Out Work Late OT Status
{{ $r->work_date }}
@if(!empty($r->employee_ledger_id)) {{ $r->employee_name }} @else {{ $r->employee_name }} @endif
{{ $r->employee_code ?: '—' }}
{{ $r->first_in ? \Carbon\Carbon::parse($r->first_in)->format('H:i') : '—' }} {{ $r->last_out ? \Carbon\Carbon::parse($r->last_out)->format('H:i') : '—' }} @if($r->missing_checkout) @endif {{ number_format(($r->work_minutes ?? 0) / 60, 1) }}h {{ (int) ($r->late_minutes ?? 0) }} {{ (int) ($r->overtime_minutes ?? 0) }} @php $st = $r->status ?? 'absent'; @endphp {{ str_replace('_', ' ', ucfirst($st)) }}
No records for this filter.
Sync device or adjust dates.
@if($records->hasPages()) @endif
@if(count($summary) > 0 && $view !== 'day')
Employee rollup (period)
@foreach($summary as $s) @endforeach
Employee Present Absent Half day Work (hrs)
{{ $s['employee_name'] }} {{ $s['present_days'] }} {{ $s['absent_days'] }} {{ $s['half_days'] ?? 0 }} {{ number_format(($s['work_minutes'] ?? 0) / 60, 1) }}
@endif
@endsection