@extends('layouts.app') @section('title', 'Leave Management') @section('content') @php $activeTab = request('tab', 'requests'); $canApprove = $canApprove ?? false; @endphp
| Request | Staff | Type | Dates | Days | Stage | Status | Actions |
|---|---|---|---|---|---|---|---|
| {{ $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)
@endif
@if(!$leave->applied_by || $leave->applied_by === auth()->id())
@endif
@endif
|
|
| Staff | Type | Entitled | Carried over | Used | Pending | Available |
|---|---|---|---|---|---|---|
| {{ $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) }} |
| Type | Days / year | Policy | Carry-over | Paid | Approval | Eligibility | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $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 |
|
|
| Holiday | Date | Recurring | Actions |
|---|---|---|---|
| {{ $holiday->name }} | {{ $holiday->date?->format('d M Y') }} ({{ $holiday->date?->format('l') }}) | {{ $holiday->recurring ? 'Every year' : 'One-off' }} | |
| Level | Approver | Action | Comments | When |
|---|---|---|---|---|
| {{ $approval->level }} | {{ $approval->approver?->name ?? 'System' }} | {{ $approval->comments ?: '—' }} | {{ $approval->acted_at?->format('d M Y H:i') ?? '—' }} | |