@php use App\Models\Staff; @endphp @extends('admin.layouts.app') @section('title', get_setting('site_name').' | Leave Application') @section('content')

Leave Application

Review, approve, and manage employee leave requests.

@can('Leave-create') @endcan
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif
{{ (int) ($leaveStats->total ?? 0) }}
Total
{{ (int) ($leaveStats->pending ?? 0) }}
Pending
{{ (int) ($leaveStats->approved ?? 0) }}
Approved
{{ (int) ($leaveStats->rejected ?? 0) }}
Rejected
Filters Clear Filters
@unless(\App\Support\BranchWiseFeature::appliesToUser())
@endunless
@if($leaveHandoverEnabled) @endif @php $leaveDocService = app(\App\Services\LeaveSupportingDocumentService::class); @endphp @forelse($leaves as $key => $leave) @php $staffRow = $leave->staff; $durationLabel = (float) $leave->number_of_days === 1.0 ? __('Day') : __('Days'); @endphp @if($leaveHandoverEnabled) @endif @empty @endforelse
# Employee Leave Type Apply Date Category From / To Duration Remarks {{ __('Document') }}{{ __('Handover to') }}Status Action
{{ $leaves->firstItem() + $key }} @if($staffRow && $staffRow->user) {{ $staffRow->user->name }}
ID: {{ $staffRow->user_id }} · {{ $staffRow->designation?->name ?? 'No Designation' }} · {{ $staffRow->warehouse?->name ?? '—' }} @else — @endif
{{ $leave->leave_type?->name ?? '—' }} {{ $leave->apply_date }} {{ $leave->type }}
{{ __('From') }} {{ $leave->start }}
{{ __('To') }} {{ $leave->end }}
{{ $leave->number_of_days }} {{ $durationLabel }} {{ $leave->reason ?: '—' }} @if($leaveDocService->hasDocument($leave)) @else @endif {{ $leave->handoverStaff?->selectOptionLabel() ?? '—' }} @if($leave->status == 1) Approved @elseif($leave->status == 0) Pending @else Rejected @endif @can('Leave-list') id) : null))' title="View"> @endcan @can('Leave-edit') id) : null))' title="Edit"> @endcan @can('Leave-delete') @endcan
No leave applications found.
@if($leaves->hasPages()) @endif
@endsection @section('modal') @include('modals.delete_modal') @endsection @section('script') @endsection