Registration Status
@php
$statusMap = [
'pending' => ['label' => 'Awaiting Approval', 'class' => 'badge-warning', 'icon' => 'bi-hourglass-split'],
'approved' => ['label' => 'Approved', 'class' => 'badge-success', 'icon' => 'bi-check-circle'],
'completed' => ['label' => 'Completed', 'class' => 'badge-info', 'icon' => 'bi-check2-all'],
'rejected' => ['label' => 'Rejected', 'class' => 'badge-danger', 'icon' => 'bi-x-circle'],
];
$s = $statusMap[$registration->status] ?? ['label' => ucfirst($registration->status), 'class' => 'badge-muted', 'icon' => 'bi-dot'];
@endphp
{{ $s['label'] }}
@if($registration->payment_required && !$registration->payment_confirmed)
Payment of ${{ number_format($exam->price_per_candidate, 2) }} is required to take this exam.
Pay & Confirm Registration
@elseif($registration->status === 'approved' && $registration->canAttempt() && $exam->isActive())
You are cleared to take this exam. Good luck!
Start Exam Now
@elseif(!$exam->isActive())
@if($exam->start_at && $exam->start_at->isFuture())
The exam has not started yet. It opens on {{ $exam->start_at->format('M j, Y H:i') }}.
@else
This exam is not currently active.
@endif
@elseif(!$registration->canAttempt())
You have used all {{ $exam->max_attempts }} allowed attempt(s).
@endif
{{-- Past attempts --}}
@if(count($attempts) > 0)
Your Attempts
@foreach($attempts as $att)
Attempt #{{ $att->attempt_number }}
{{ $att->submitted_at?->format('M j, Y') }}
@if($att->status === 'graded')
{{ round($att->percentage) }}% โ {{ $att->grade_label }}
Result
@else
{{ ucfirst($att->status) }}
@endif
@endforeach
@endif