@extends('layouts.admin') @section('page_title', 'Leave Requests') @section('content')
Review and manage employee time-off and absence applications.
| # | Employee | Type | Duration Range | Days | Status | Action |
|---|---|---|---|---|---|---|
| {{ str_pad($loop->iteration, 2, '0', STR_PAD_LEFT) }} |
{{ substr($leave->user->name, 0, 1) }}{{ substr(strrchr($leave->user->name, ' '), 1, 1) ?: '' }}
{{ $leave->user->name }}
|
{{ ucfirst($leave->leave_type) }} | {{ $leave->from_date->format('d M') }} — {{ $leave->to_date->format('d M, Y') }} | {{ $leave->total_days }} | @php $statusColor = $leave->status == 'approved' ? '#059669' : ($leave->status == 'rejected' ? '#dc2626' : '#d97706'); $statusBg = $leave->status == 'approved' ? '#ecfdf5' : ($leave->status == 'rejected' ? '#fef2f2' : '#fffbeb'); @endphp {{ $leave->status }} {{ ucfirst($leave->status) }} |
@if ($leave->status == 'pending')
|
Showing 1-{{ count($leaves) }} requests