@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') }}