@extends('teacher.teacher_dashboard') @section('admin')
{{-- Breadcrumb --}} {{-- Statistics Cards --}}

{{ $statistics['total'] }}

Total Applications

{{ $statistics['pending'] }}

Pending

{{ $statistics['approved'] }}

Approved

{{ $statistics['rejected'] }}

Rejected

{{-- Filter Box --}}
Filter
Clear
{{-- Add Button --}} {{-- List Box --}}
My Leave Applications
@forelse($leaves as $key => $leave) @php $fromDate = \Carbon\Carbon::parse($leave->from_date); $toDate = \Carbon\Carbon::parse($leave->to_date); $totalDays = $fromDate->diffInDays($toDate) + 1; $statusColors = [ 'pending' => 'warning', 'approved' => 'success', 'rejected' => 'danger', 'cancelled' => 'secondary' ]; $statusColor = $statusColors[$leave->status] ?? 'info'; @endphp @empty @endforelse
S.No Leave Type From Date To Date Days Status Applied On Actions
{{ $leaves->firstItem() + $key }} {{ ucfirst($leave->leave_type) }} {{ $fromDate->format('d M Y') }} {{ $toDate->format('d M Y') }} {{ $totalDays }} day{{ $totalDays > 1 ? 's' : '' }} {{ ucfirst($leave->status) }} {{ $leave->created_at->format('d M Y, h:i A') }} (UTC+6) @if($leave->status === 'pending')
@csrf
@endif
No leave applications found.
{{-- Pagination --}} @if($leaves->hasPages())
Showing {{ $leaves->firstItem() }} to {{ $leaves->lastItem() }} of {{ $leaves->total() }} entries
{{ $leaves->links() }}
@endif
@endsection