@extends('layouts.app') @section('title', 'Leave Management') @section('content') @php $activeTab = request('tab', 'requests'); $canApprove = $canApprove ?? false; @endphp

Leave management

Unlimited leave types, accruals, multi-level approvals, public holidays and payroll-ready balances.
@forelse($requests as $leave) @empty @endforelse
RequestStaffTypeDatesDaysStageStatusActions
{{ $leave->request_no }} {{ $leave->staff?->full_name ?? 'Unknown' }}
{{ $leave->staff?->staff_no }}
{{ $leave->type?->name ?? '—' }} @if($leave->type && !$leave->type->paid)Unpaid@endif {{ $leave->start_date?->format('d M Y') }} – {{ $leave->end_date?->format('d M Y') }} {{ num($leave->days, 1) }} {{ $leave->stage }}/{{ $leave->levels }}
@if($leave->status === 'pending') @if($canApprove)
@csrf
@endif @if(!$leave->applied_by || $leave->applied_by === auth()->id())
@csrf
@endif @endif
@if($requests->hasPages())
{{ $requests->links() }}
@endif
@forelse($balances as $balance) @empty @endforelse
StaffTypeEntitledCarried overUsedPendingAvailable
{{ $balance->staff?->full_name ?? 'Unknown' }}
{{ $balance->staff?->staff_no }}
{{ $balance->type?->name ?? '—' }} @if($balance->type && !$balance->type->paid)Unpaid@endif {{ num($balance->entitled, 1) }} {{ num($balance->carried_over, 1) }} {{ num($balance->used, 1) }} {{ num($balance->pending, 1) }} {{ num($balance->available, 1) }}
@forelse($types as $type) @empty @endforelse
TypeDays / yearPolicyCarry-overPaidApprovalEligibilityStatusActions
{{ $type->name }}
{{ $type->code ?: 'No code' }}
{{ num($type->days_per_year, 1) }} {{ ucfirst($type->accrual) }} {{ $type->carry_over ? 'Up to '.num($type->max_carry_over ?? $type->days_per_year, 1).' days' : 'None' }} {{ $type->paid ? 'Paid' : 'Unpaid' }} {{ $type->requires_approval ? 'Required' : 'Automatic' }} {{ $type->gender ? ucfirst($type->gender).' only' : 'All staff' }}@if($type->min_notice_days) / {{ $type->min_notice_days }}d notice@endif
@csrf @method('DELETE')
Weekends and public holidays are excluded when counting leave days. Recurring holidays repeat every year.
@forelse($holidays as $holiday) @empty @endforelse
HolidayDateRecurringActions
{{ $holiday->name }} {{ $holiday->date?->format('d M Y') }} ({{ $holiday->date?->format('l') }}) {{ $holiday->recurring ? 'Every year' : 'One-off' }}
@csrf @method('DELETE')
@csrf
How many approvers must sign off before leave is approved. Applies to new requests.
Displayed to staff. Individual leave types can enforce their own notice period.
{{-- Apply for leave --}}
@csrf
{{-- Allocate balances --}}
@csrf
Only applied when both a staff member and a leave type are selected.
{{-- New leave type --}}
@csrf @include('staff.leave._type_form', ['type' => null])
@foreach($types as $type)
@csrf @method('PUT') @include('staff.leave._type_form', ['type' => $type])
@endforeach {{-- New holiday --}}
@csrf
{{-- Reject and history modals --}} @foreach($requests as $leave)
@csrf
Staff{{ $leave->staff?->full_name }}
Dates{{ $leave->start_date?->format('d M Y') }} to {{ $leave->end_date?->format('d M Y') }}
Working days{{ num($leave->days, 1) }}
Reason{{ $leave->reason ?: 'Not provided' }}
Handover{{ $leave->handover ?: 'Not provided' }}
@if($leave->rejection_reason)
Notes{{ $leave->rejection_reason }}
@endif

Approval trail

@forelse($leave->approvals as $approval) @empty @endforelse
LevelApproverActionCommentsWhen
{{ $approval->level }} {{ $approval->approver?->name ?? 'System' }} {{ $approval->comments ?: '—' }} {{ $approval->acted_at?->format('d M Y H:i') ?? '—' }}
@endforeach @endsection