@extends('template.layouts.template-base') @section('title') Edit Candidate | {{ config('setting.website_name') ?: config('app.name') }} @endsection @section('content') @php // The list the candidate is on: onboarding, shortlist or hiring [$listRoute, $listTitle] = match (true) { $recruitment->isOnboarded() => ['backend.recruitment.onboarding', 'Onboarding'], $recruitment->isShortlisted() => ['backend.recruitment.shortlist', 'Shortlisted'], default => ['backend.recruitment.index', 'Hiring'], }; $listUrl = route($listRoute); // Opened from the All Staff list: Cancel and Submit go back to it with the same filters $allStaff = $recruitment->isOnboarded() ? \App\Http\Controllers\RecruitmentController::allStaffFilters(request()) : null; if ($allStaff !== null) { [$listUrl, $listTitle] = [route('backend.all-staff.index', $allStaff), 'Staffs List']; } @endphp