@extends('layouts.dashboard') @section('title', 'My Leaves') @section('content')
View and manage your leave requests
Total Leaves
{{ $stats['total'] }} days
Used Leaves
{{ $stats['used'] }} days
Available
{{ $stats['available'] }} days
Pending
{{ $stats['pending'] }} days
| Leave Details | Period | Duration | Status | Actions |
|---|---|---|---|---|
|
@php
$typeIcons = [
'sick' => 'fas fa-heartbeat text-red-500',
'vacation' => 'fas fa-umbrella-beach text-blue-500',
'personal' => 'fas fa-user text-yellow-500',
'emergency' => 'fas fa-exclamation-triangle text-purple-500'
];
@endphp
{{ ucfirst($leave->type) }} Leave
{{ Str::limit($leave->reason, 80) }}
Submitted: {{ $leave->created_at->format('M d, Y') }}
|
{{ $leave->start_date->format('M d, Y') }}
{{ $leave->end_date->format('M d, Y') }}
|
{{ $leave->days }}
days
|
@php
$statusColors = [
'pending' => 'bg-yellow-100 text-yellow-800',
'approved' => 'bg-green-100 text-green-800',
'rejected' => 'bg-red-100 text-red-800'
];
@endphp
{{ ucfirst($leave->status) }}
@if($leave->status != 'pending')
{{ $leave->approvedBy->name ?? 'Admin' }}
@if($leave->admin_notes)
{{ Str::limit($leave->admin_notes, 60) }}
@endif
|
@if($leave->status == 'pending')
@endif
|