@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Attendance Dashboard')) @section('content')
{{ __('Attendance date') }}: {{ $attDate }}  ·  {{ __('Summary below uses department / branch / search filters. Status filter applies to the table only.') }}
@if(auth()->user()->can('Attendance-create') || auth()->user()->can('Attendance-edit'))
{{ __('Manual attendance (GPS required)') }}
{{ __('Allow browser location. Current time is used for sign-in / sign-out.') }}
{{ __('Select an employee, choose the attendance date, then use Set sign-in or Set sign-out. The system will request your device location before saving—without GPS the action cannot complete.') }}
@endif
@foreach([ ['value' => $summary['total'] ?? 0, 'label' => __('Staff in scope'), 'icon' => 'fas fa-users', 'color' => 'text-dark', 'bg' => 'rgba(45,59,71,.08)'], ['value' => $summary['P'] ?? 0, 'label' => __('Present (P)'), 'icon' => 'fas fa-user-check', 'color' => 'text-success', 'bg' => 'rgba(40,167,69,.12)'], ['value' => $summary['D'] ?? 0, 'label' => __('Late (D)'), 'icon' => 'fas fa-clock', 'color' => 'text-warning', 'bg' => 'rgba(255,193,7,.15)'], ['value' => $summary['E'] ?? 0, 'label' => __('Extra delay (E)'), 'icon' => 'fas fa-exclamation-triangle', 'color' => 'text-danger', 'bg' => 'rgba(220,53,69,.1)'], ['value' => $summary['A'] ?? 0, 'label' => __('Absent (A)'), 'icon' => 'fas fa-user-slash', 'color' => 'text-danger', 'bg' => 'rgba(220,53,69,.08)'], ['value' => $summary['L'] ?? 0, 'label' => __('On leave (L)'), 'icon' => 'fas fa-procedures', 'color' => 'text-info', 'bg' => 'rgba(23,162,184,.12)'], ] as $card)

{{ $card['value'] }}

{{ $card['label'] }}

@endforeach
{{ __('Pending leave applications') }}

{{ $pendingLeaveApplications }}

{{ __('Pending attendance reconciliation') }}

{{ $pendingReconciliation }}

{{ __('On break now') }}

{{ $onBreakNow }}

{{ __('Other status records') }}

{{ $summary['other'] ?? 0 }}

{{ __('Daily Attendance') }}
{{ __('Date') }}: {{ $attDate }}
{{ __('Clear') }}
@forelse($dailyAttendanceRows as $row) @php $staff = $row['staff']; $attendance = $row['attendance']; $displayStatus = $row['status']; @endphp @if($attendance !== null) @else @endif @empty @endforelse
{{ __('Employee') }} {{ __('Department') }} {{ __('In Time') }} {{ __('Out Time') }} {{ __('Status') }} {{ __('Action') }}
{{ $staff->user->name }} {{ $staff->user->name }} ({{ $staff->warehouse->name ?? '—' }}) {{ $staff->department->name ?? '—' }}
{{ __('No employees match the selected filters.') }}
{{ __('Attendance missed') }}
{{ __('This year · last :count rows', ['count' => 200]) }}

{{ __('Incomplete in/out (excluding today). Edit to correct.') }}

@foreach($missingAttendances as $attendanceMissing) @if($attendanceMissing->staff && $attendanceMissing->staff->user && $attendanceMissing->staff->user->is_active == 1) @endif @endforeach
{{ __('Date') }} {{ __('Name') }} {{ __('Branch') }} {{ __('In Time') }} {{ __('Out Time') }} {{ __('Action') }}
{{ date('D, M d', strtotime($attendanceMissing->date)) }} {{ $attendanceMissing->staff->user->name }} {{ $attendanceMissing->staff->warehouse->name ?? '—' }}

Last 30 Days Attendance Summary

@endsection @section('modal') @if(auth()->user()->can('Attendance-create') || auth()->user()->can('Attendance-edit')) @endif @endsection @section('script') @endsection