@extends('layouts.admin') @section('title', 'My Leave') @php $statusClass = ['pending' => 'warning', 'approved' => 'success', 'rejected' => 'danger']; @endphp @section('content') @if (! $employee)
You have not applied for any leave yet.
@else| Type | From | To | Days | Reason | Status | Reviewed | |
|---|---|---|---|---|---|---|---|
| {{ $item->leave_type }} | {{ optional($item->from_date)->format('d M Y') }} | {{ optional($item->to_date)->format('d M Y') }} | {{ $item->days }} | {{ \Illuminate\Support\Str::limit($item->reason, 80) }} | {{ ucfirst($item->status) }} |
@if ($item->reviewed_at)
{{ $item->reviewer?->name ?? 'Admin' }} {{ $item->reviewed_at->format('d M Y') }} @if ($item->review_note) {{ $item->review_note }} @endif @else Awaiting decision @endif |
@if ($item->isPending()) @endif |