@extends('layouts.app') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @php $statusOrder = [ 'applied' => 1, 'viewed' => 2, 'shortlisted' => 3, 'interview_scheduled' => 4, 'offered' => 5, 'joined' => 6, ]; $currentStep = $statusOrder[$application->status] ?? ($application->status === 'rejected' || $application->status === 'withdrawn' ? 5 : 1); $isTerminalNegative = in_array($application->status, ['rejected', 'withdrawn']); @endphp

Recruitment Milestone Progress Current: {{ $application->statusLabel() }}

Applied {{ $application->created_at->format('d M Y') }}
Review Profile Screened
Shortlisted Selected for Round
Interview {{ $application->interview_scheduled_at ? $application->interview_scheduled_at->format('d M') : 'Pending' }}
@if($application->status === 'offered' || $application->status === 'joined') @elseif($isTerminalNegative) @else @endif
{{ $isTerminalNegative ? ucfirst($application->status) : ($application->status === 'joined' ? 'Joined' : 'Offer') }} Final Milestone
@if($application->status === 'interview_scheduled' && $application->interview_scheduled_at)

Interview Appointment Scheduled!

The employer has invited you for a recruitment interview round. Please make note of the appointment schedule:

Date & Time: {{ $application->interview_scheduled_at->format('l, d F Y - h:i A') }}
Venue / Video Link: {{ $application->interview_location ?: 'Online Video Meeting (Link will be dispatched via email)' }}
@if($application->interview_notes)
Special Instructions: {{ $application->interview_notes }}
@endif
@endif

Status Audit Log

@foreach($application->statusHistories as $history)
{{ ucfirst(str_replace('_', ' ', $history->to_status)) }} {{ $history->created_at->format('d M Y, h:i A') }}
@if($history->remarks)

{{ $history->remarks }}

@endif @if($history->interview_scheduled_at)
Scheduled for {{ $history->interview_scheduled_at->format('d M Y, h:i A') }} @if($history->interview_location) | Venue: {{ $history->interview_location }} @endif
@endif
@endforeach
@if($application->canWithdraw()) @endif
@endsection