@extends('layouts.portal') @section('header_title', 'Leave Management') @section('content')

Leave Management

Manage and track your time off.

Annual Balance

{{ auth()->user()->leave_balance ?? 18 }} Days

Sick Leaves

12 Days

Unpaid / Casual

05 Days

@foreach($leaves as $leave) @endforeach
Employee Duration Type & Reason Status Actions

{{ $leave->user->name }}

{{ $leave->user->designation }}

{{ $leave->start_date->format('M d') }} - {{ $leave->end_date->format('M d') }}

{{ $leave->start_date->diffInDays($leave->end_date) + 1 }} Days

{{ $leave->type }}

{{ $leave->reason }}

@if($leave->status == 'pending') Pending Review @elseif($leave->status == 'approved') Approved @else Rejected @endif @if($leave->status == 'pending' && (auth()->user()->isAdmin() || auth()->user()->isManager()))
@csrf @method('PATCH')
@csrf @method('PATCH')
@else @endif
@if($leaves->isEmpty())

No leave history found.

@endif
{{ $leaves->links() }}
@endsection