@extends('layouts.app') @section('title', 'Candidate Dashboard') @section('breadcrumb') Home Dashboard @endsection @push('styles') @endpush @section('content')
{{ now()->format('l, F j, Y') }} @if($profile?->isApproved()) Profile verified @endif

Welcome, {{ $user->name }}

Track your profile, applications, and examinations in one place.

{{ $stats['total_applications'] }}
Applications
{{ $stats['approved_applications'] }}
Approved
{{ $stats['exams_completed'] }}
Exams done
{{ $stats['active_posts'] }}
Open posts
{{-- Smart completion warning (shows only while profile < 100%) --}} @include('candidate._partials._completion_warning', ['completion' => $completion]) {{-- Profile status banner --}} @if(!$profile)

Profile not started

You must complete and submit your profile before applying for any posts.

@elseif($profile->isPending())

Profile under review

Your profile is being reviewed. You'll be able to apply once it's approved.

@elseif($profile->isRejected())

Profile rejected

{{ $profile->rejection_reason ?? 'Your profile was not approved. Please update and re-submit.' }}

@else

Profile approved

Your profile is verified. Browse available posts and submit applications.

@endif {{-- Stat cards (all link to the my-applications list; exams card links there too since per-attempt pages require an application context) --}}
{{-- Applications total --}}
View my applications
total
Applications
{{ $stats['total_applications'] }}
{{-- Pending --}}
View pending applications
QUEUED
Pending
{{ $stats['pending_applications'] }}
{{-- Approved --}}
View approved applications
approved
Approved
{{ $stats['approved_applications'] }}
{{-- Exams completed --}}
View completed exams
done
Exams completed
{{ $stats['exams_completed'] }}
{{-- Applications list --}}
My applications
Most recent activity
View all →
@if($applications->isEmpty())
No applications yet
When your profile is approved, browse open posts and apply to start tracking them here.
@if($profile?->isApproved())
Browse available posts
@endif
@else @foreach($applications as $app) @php $attempt = $app->latestExamAttempt; $status = strtolower($app->status_label ?? ''); $pillTone = 's-neutral'; if (str_contains($status, 'approv')) $pillTone = 's-success'; elseif (str_contains($status, 'reject')) $pillTone = 's-danger'; elseif (str_contains($status, 'pend')) $pillTone = 's-warning'; @endphp
{{ $app->post?->code }} {{ $app->post?->title }}
Applied {{ $app->created_at->format('d M Y') }} @if($app->roll_number) · Roll {{ $app->roll_number }} @endif
@if($app->isRejected() && $app->remarks)
{{ Str::limit($app->remarks, 90) }}
@endif
{{ $app->status_label }} @if($app->isApproved()) @if($attempt && $attempt->status === 'completed') View result @else Roll slip @endif @elseif($app->isPending()) Awaiting review @elseif($app->isRejected()) Not eligible @endif
@endforeach @endif
@endsection