@extends('dashboard.layouts.app') @section('content') @include('components.alert') @php $rows = $applicants ?? collect(); $statusVariant = fn ($status) => match ($status) { 'new' => 'neutral', 'rejected' => 'danger', 'hired' => 'success', default => 'neutral', }; $offerVariant = fn ($status) => match ($status) { 'accepted' => 'success', 'pending' => 'warn', 'rejected' => 'danger', default => 'neutral', }; $formatValue = function ($value) { return filled($value) ? ucfirst(str_replace('_', ' ', $value)) : 'N/A'; }; $totalApplicants = $stats['total'] ?? 0; $newApplicants = $stats['new'] ?? 0; $hiredApplicants = $stats['hired'] ?? 0; $rejectedApplicants = $stats['rejected'] ?? 0; $pendingOffers = $stats['pending_offers'] ?? 0; @endphp
Add Applicant Back to Requests
All Applicants Workspace

This page displays every applicant in the system, allowing you to track who created each record and who is currently responsible for it.

@if (filled(request('search'))) Reset @endif
System Applicants
Total applicants found: {{ $totalApplicants }}
@if (filled(request('search')))
Search: {{ request('search') }}
@endif
@foreach ($rows as $index => $applicant) @php $rowNumber = method_exists($rows, 'firstItem') ? $rows->firstItem() + $index : $index + 1; $recruitment = $applicant->recruitment; $requestCode = $recruitment?->request_id ? 'REQ-' . str_pad((string) $recruitment->request_id, 4, '0', STR_PAD_LEFT) : 'N/A'; $staffRawName = function ($staff) { if (!$staff) { return null; } return $staff->getRawOriginal('full_name') ?: trim(($staff->first_name ?? '') . ' ' . ($staff->getRawOriginal('last_name') ?? '')); }; $createdBy = $staffRawName($applicant->createdBy?->staff) ?: ($applicant->createdBy?->getRawOriginal('full_name') ?: 'System'); $assignedTo = $staffRawName($applicant->assignedStaff) ?: 'Unassigned'; $referralBy = $staffRawName($applicant->referral?->staff); @endphp {{ $rowNumber }}
{{ $applicant->full_name }}
{{ $applicant->email ?: 'N/A' }}
{{ $recruitment?->jobTitles?->name ?: 'Open Position' }}
{{ $recruitment?->requests?->department?->name ?: 'N/A' }}
{{ $requestCode }}
{{ $createdBy }}
@if ($applicant->source === 'referral' && $applicant->referral)
Referral by {{ $referralBy ?: 'N/A' }}
@endif
{{ $assignedTo }}
{{ $formatValue($applicant->current_status) }} @if($applicant->candidateUser) @if($applicant->candidateUser->isCandidate()) Active @elseif($applicant->candidateUser->user_type === 'deactivated') Deactivated @elseif($applicant->candidateUser->isEmployee()) Upgraded @else {{ ucfirst($applicant->candidateUser->user_type) }} @endif @else — @endif
{{ optional($applicant->updated_at)->format('Y-m-d H:i') ?: 'N/A' }}
@endforeach
@endsection @push('styles') @endpush