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

{{-- --}}
{{-- Session Flash Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if(session('warning'))
{{ session('warning') }}
@endif {{-- Validation Errors --}} @if ($errors->any()) @endif
@foreach ($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)); } @endphp @endforeach
# {{ __('table.Code') }} {{ __('table.Employee-Name') }} {{ __('table.Date') }} {{ __('table.Time') }} {{ __('table.Duration') }} Status {{ __('table.Action') }}
{{ $loop->iteration }} {{ $overtime->code }} {{ $overtime->date }} {{ $overtime->formatted_start_time }} - {{ $overtime->formatted_end_time }} {{ $overtime->duration }} @if ($overtime->status === 'P') @if ($canApprove) @endif @else {{__('form.No-Action')}} @endif