@extends('staff.layouts.app') @section('content')

Applications & Requests

Manage student leave and document requests

@if($isAdmin)

Pending

{{ $stats['pending'] ?? 0 }}

Approved

{{ $stats['processed'] ?? 0 }}

Delivered

{{ $stats['delivered'] ?? 0 }}

@endif
@forelse($applications as $app) @php $statusStyles = [ 'submitted' => 'bg-slate-100 text-slate-700', 'approved' => 'bg-emerald-50 text-emerald-700', 'rejected' => 'bg-red-50 text-red-700', ]; $statusClass = $statusStyles[$app->status] ?? 'bg-gray-100 text-gray-600'; // LEAVE ONLY: Notification for submitted (RED) and viewed (BLACK) $showNotification = false; $notificationColor = ''; if ($app->status === 'submitted') { $showNotification = true; $notificationColor = 'bg-red-500'; } elseif ($app->status === 'viewed') { $showNotification = true; $notificationColor = 'bg-gray-800'; } @endphp
@if($showNotification) @endif
{{ strtoupper(substr($app->student_name, 0, 1)) }}

{{ $app->student_name }}

{{ $app->admission_no }} · {{ $app->class_name }}-{{ $app->section_name }}

{{ $app->status }}
Leave

{{ $app->subject }}

{{ \Carbon\Carbon::parse($app->created_at)->format('d M Y, h:i A') }}

@empty

No applications found.

@endforelse
{{ $applications->links() }}
@push('scripts') @endpush @endsection