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

Application Details

Track your request status

@if($application->status === 'submitted')
@csrf @method('DELETE')
@endif

{{ ucfirst($application->subject) }}

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

@php $statusColors = [ 'submitted' => 'bg-slate-100 text-slate-700 border border-slate-200', 'viewed' => 'bg-blue-50 text-blue-700 border border-blue-100', 'approved' => 'bg-emerald-50 text-emerald-700 border border-emerald-100', 'rejected' => 'bg-red-50 text-red-700 border border-red-100', 'processed' => 'bg-amber-50 text-amber-700 border border-amber-100', 'delivered' => 'bg-green-50 text-green-700 border border-green-100', ]; @endphp {{ $application->status }}
@if($application->application_type === 'leave')
{{ \Carbon\Carbon::parse($application->leave_from)->format('d M') }} to {{ \Carbon\Carbon::parse($application->leave_to)->format('d M Y') }} • {{ $application->leave_type }} Leave
@elseif($application->application_type === 'document')
{{ $application->document_type }} Certificate
@endif

Reason / Description

{{ $application->description }}

@if($application->attachment)

Attachment

View Attachment
@endif

Status History

@forelse($logs as $log)
@if(!$loop->last)
@endif

{{ str_replace('_', ' ', $log->to_status ?? $log->status ?? 'Updated') }}

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

@empty

No status updates yet.

@endforelse
@endsection