@php $employeeOptions = $employees->pluck('name', 'id')->toArray(); $filterEmployeeOptions = $filterEmployees->pluck('name', 'id')->toArray(); $leaveTypeOptions = $leaveTypes->pluck('name', 'id')->toArray(); $hasActiveFilters = filled($filter_leave_type) || filled($filter_employee_id) || filled($filter_start_date) || filled($filter_end_date) || filled($filter_resume_date) || filled($filter_within_balance) || filled($filter_min_duration) || filled($filter_has_documents); @endphp
| # | {{ __('Employee') }} | {{ __('Leave Type') }} | {{ __('Pay Rule') }} | {{ __('Pay %') }} | {{ __('Leave Number') }} | {{ __('Duration') }} | {{ __('Start Date') }} | {{ __('End Date') }} | {{ __('Resume Date') }} | {{ __('Reason') }} | {{ __('Status') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration + ($leaves->currentPage() - 1) * $leaves->perPage() }} | {{ $leave->employee->name ?? '-' }} | {{ $leave->leaveType->name ?? '-' }} | {{ $leave->pay_rule_applied ?? '-' }} | {{ $leave->pay_percent_applied !== null ? $leave->pay_percent_applied.'%' : '-' }} | {{ $leave->leave_number }} | {{ $leave->duration }} | {{ $leave->start_date->format('Y-m-d') }} | {{ $leave->end_date->format('Y-m-d') }} | {{ $leave->resume_date->format('Y-m-d') }} |
{{ $leave->reason ?: '-' }}
|
@if($leave->status === 'approved') {{ __('Approved') }} @elseif($leave->status === 'manager_approved') {{ __('Manager Approved') }} @elseif($leave->status === 'hr_approved') {{ __('HR Approved') }} @elseif($leave->status === 'rejected') {{ __('Rejected') }} @else {{ __('Pending') }} @endif | @php $canApprove = $this->canApproveLeave($leave); @endphp @if($canApprove) @endif @can('leaves edit') @if(!in_array($leave->status, ['approved', 'rejected'])) @endif @endcan @can('leaves delete') @endcan {{ __('View') }} |
| {{ __('No Leaves found.') }} | ||||||||||||
{{ __('Are you sure you want to delete this leave?') }}