@extends('layouts.school') @section('title', 'Application — ' . $application->application_no) @section('header', 'Application ' . $application->application_no) @section('content')
← Applications {{ $application->status_label }}
@if ($application->letter) View Letter Letter PDF @endif

Applicant Summary

@foreach ([ 'Applicant' => $application->full_name, 'Email' => $application->email, 'Phone' => $application->phone, 'Date of Birth' => $application->date_of_birth?->format('M j, Y'), 'Gender' => $application->gender, 'Programme' => $application->programme?->name, 'Class Applying For' => $application->desiredClass?->name, 'Parent / Guardian' => $application->parent_name, 'Parent Email' => $application->parent_email, 'Parent Phone' => $application->parent_phone, 'Previous School' => $application->previous_school, 'Submitted At' => $application->submitted_at?->format('M j, Y g:i a'), ] as $label => $value) @if ($value)

{{ $label }}

{{ $value }}

@endif @endforeach
@php $snapshot = $application->form_snapshot ?: ['sections' => []]; @endphp @foreach ($snapshot['sections'] ?? [] as $section)

{{ $section['title'] }}

@foreach ($section['fields'] ?? [] as $field) @php $value = $application->data[$field['name']] ?? null; $isFile = ($field['type'] ?? '') === 'file'; if ($isFile) { $document = $application->documents->firstWhere('field_name', $field['name']); $value = $document ? $document->original_name : null; } @endphp @if ($value !== null && $value !== '')

{{ $field['label'] }}

@if ($isFile && isset($document) && $document)

{{ $value }}

@else

{{ $value }}

@endif
@endif @endforeach
@endforeach @if ($application->admin_notes || $application->correction_notes || $application->decision_notes)

Staff Notes

@if ($application->correction_notes)

Correction request: {{ $application->correction_notes }}

@endif @if ($application->decision_notes)

Decision note: {{ $application->decision_notes }}

@endif @if ($application->admin_notes)

Notes: {{ $application->admin_notes }}

@endif
@endif
@if ($application->is_decisionable)

Next Steps

@if (! in_array($application->status, ['under_review'], true))
@csrf
@endif
@csrf
@csrf
@csrf
@csrf
@endif @if ($application->documents->isNotEmpty())

Documents ({{ $application->documents->count() }})

    @foreach ($application->documents as $document)
  • {{ $document->original_name }}

    {{ $document->size_label }} · {{ $document->field_name }}

    Download
  • @endforeach
@endif

History

    @forelse ($application->history as $event)
  1. {{ $event->toStatusLabel }} @if ($event->from_status && $event->to_status && $event->from_status !== $event->to_status) (was {{ $event->fromStatusLabel }}) @endif

    @if ($event->note)

    {{ $event->note }}

    @endif

    {{ $event->created_at->format('M j, Y g:i a') }} · {{ $event->actor_label }}

  2. @empty
  3. No history recorded.
  4. @endforelse
@endsection