{{ __('form.Overtime') }}

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if(session('warning'))
{{ session('warning') }}
@endif @if ($errors->any()) @endif
{{-- ===================== MOBILE SEARCH & FILTER ===================== --}}
{{-- Search input --}}
{{-- Filter date --}}
{{-- Status filter buttons --}}
{{-- Per page select --}}
{{-- Result count --}}
{{-- ===================== DESKTOP TABLE ===================== --}} {{-- ===================== MOBILE CARD LIST ===================== --}}
@forelse ($overtimes as $overtime) @php $approval = $overtime->approval; $currentStep = $approval?->steps->firstWhere('status', 'active'); $currentUser = auth()->user(); $canApprove = false; if ($currentStep) { $canApprove = ($currentStep->user_id === $currentUser->id) || ($currentStep->approver_role && $currentUser->hasRole($currentStep->approver_role)); } $foto = $overtime->employee->foto ?? 'https://api.dicebear.com/9.x/initials/svg?seed=' . urlencode($overtime->employee->fullname ?? 'User'); $statusLabel = $overtime->status === 'P' ? 'pending' : ($overtime->status === 'A' ? 'approved' : 'rejected'); @endphp
{{-- Header --}}
{{-- Detail info --}}
Tanggal : {{ $overtime->date }} Waktu : {{ $overtime->formatted_start_time }} - {{ $overtime->formatted_end_time }} Durasi : {{ $overtime->duration }} Status :
@empty

Tidak ada data Overtime

@endforelse {{-- Pagination controls --}}