@php use App\Enums\LeaveRequestStatus; @endphp
| {{ __('Leave Type') }} | {{ __('From Date') }} | {{ __('To Date') }} | {{ __('Days') }} | {{ __('Status') }} | {{ __('Reason') }} | {{ __('Applied On') }} |
|---|---|---|---|---|---|---|
| {{ $leave->leaveType->name ?? __('N/A') }} | {{ $leave->from_date ? \Carbon\Carbon::parse($leave->from_date)->format('d M Y') : __('N/A') }} | {{ $leave->to_date ? \Carbon\Carbon::parse($leave->to_date)->format('d M Y') : __('N/A') }} | {{ number_format($leave->total_days, 1) }} | @if($leave->status instanceof \App\Enums\LeaveRequestStatus) {!! $leave->status->badge() !!} @else {{ is_string($leave->status) ? ucfirst($leave->status) : __('N/A') }} @endif | {{ $leave->user_notes ?? __('N/A') }} | {{ $leave->created_at ? $leave->created_at->format('d M Y') : __('N/A') }} |
| {{ __('No leave records found') }} | ||||||