Back to Leave Applications

{{ $pageTitle ?? 'Leave Application Details' }}

@if(session('success'))
{{ session('success') }}
@endif
Application #{{ $leave->id }} @if($leave->status == 'new') Pending @elseif($leave->status == 'approved') Approved @elseif($leave->status == 'rejected') Rejected @else {{ ucfirst($leave->status) }} @endif
Staff Name
{{ $leave->staff->first_name ?? '' }} {{ $leave->staff->last_name ?? '' }}
Leave Type
{{ $leave->leaveType->name ?? 'Leave' }}
From Date
{{ \Carbon\Carbon::parse($leave->from_date)->format('d M Y') }}
To Date
{{ \Carbon\Carbon::parse($leave->to_date)->format('d M Y') }}
Number of Days
{{ $leave->number_of_days }} day(s)
Applied On
{{ $leave->created_at->format('d M Y, h:i A') }}
@if($leave->approver)
{{ $leave->status == 'approved' ? 'Approved' : 'Processed' }} By
{{ $leave->approver->first_name ?? '' }} {{ $leave->approver->last_name ?? '' }}
@endif @if($leave->approved_at)
{{ $leave->status == 'approved' ? 'Approved' : 'Processed' }} On
{{ $leave->approved_at->format('d M Y, h:i A') }}
@endif
@if($leave->reason)
Reason
{{ $leave->reason }}
@endif @if($leave->status == 'rejected' && $leave->reject_reason)
Rejection Reason
{{ $leave->reject_reason }}
@endif @if($leave->status == 'new')
@csrf
@csrf
Back
@else @endif
@if($leave->followers->count() > 0 || $leave->handovers->count() > 0)
Followers & Handover
Followers
@if($leave->followers->count() > 0) {{ $leave->followers->map(fn($f) => $f->first_name . ' ' . $f->last_name)->implode(', ') }} @else None @endif
Handover To
@if($leave->handovers->count() > 0) {{ $leave->handovers->map(fn($h) => $h->first_name . ' ' . $h->last_name)->implode(', ') }} @else None @endif
@endif