{{-- Single exam card row. Shared by every section on the My Exams page so all rows render with the same shape regardless of bucket. Props: $app Application (approved, with post + post.quotas eager-loaded) $attempt ?ExamAttempt — latest attempt for this application, or null $tone CSS modifier class for the left-border accent: is-live | is-upnext | is-soon | is-done | '' (no accent) --}} @php $post = $app->post; $when = $post?->exam_login_enabled_at; $isDone = $attempt && ($attempt->isCompleted() || $attempt->status === 'in_review'); $inProg = $attempt && $attempt->isInProgress(); $isLive = !$isDone && !$inProg && $post && $post->exam_login_enabled && $when && $when->lte(now()); $isUpnext = !$isDone && !$inProg && !$isLive && $when && $when->gt(now()); // Render countdown intensity — anything within 2 hours is "soon". $isSoon = $isUpnext && $when->diffInHours(now()) <= 2; @endphp
{{ $post?->code ?? '—' }} · {{ $post?->bps ?? '' }}
{{ $post?->title ?? 'Post unavailable' }}
Roll: {{ $app->roll_number ?? '—' }} @if($when) Exam: {{ $when->format('d M Y, h:i A') }} @else Date not announced yet @endif @if($isDone && $attempt) Completed @elseif($inProg) In progress — sign back in to resume @endif
@if($isUpnext) Starts in {{ $when->diffForHumans(['parts' => 2, 'short' => true, 'syntax' => \Carbon\CarbonInterface::DIFF_ABSOLUTE]) }} @if($app->roll_number) View roll slip @endif @elseif($isLive) Go to exam portal Use roll {{ $app->roll_number }} + exam password @elseif($inProg) Resume exam @elseif($isDone && $attempt) View result @else Awaiting schedule @if($app->roll_number) View roll slip @endif @endif