@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'; }; $jobTitleName = optional($recruitment->jobTitles)->name ?: 'Open Position'; $requestCode = 'REQ-' . str_pad((string) $recruitment->request_id, 4, '0', STR_PAD_LEFT); $totalApplicants = $rows->count(); $newApplicants = $rows->where('current_status', 'new')->count(); $hiredApplicants = $rows->filter(fn ($applicant) => $applicant->current_status === 'hired' || $applicant->offer_status === 'accepted')->count(); $rejectedApplicants = $rows->filter(fn ($applicant) => $applicant->current_status === 'rejected' || $applicant->offer_status === 'rejected')->count(); $pendingOffers = $rows->where('offer_status', 'pending')->count(); @endphp
Track candidate progress for this request, review hiring activity, and jump directly into each applicant record.