@extends('template.layouts.template-base') @section('title') View Candidate | {{ config('setting.website_name') ?: config('app.name') ?? '-' }} @endsection @section('content') @php // The candidate is listed on the onboarding page once onboarded, on the shortlist page once shortlisted, // else on the recruitment page $shortlisted = $recruitment->isShortlisted(); $onboarded = $recruitment->isOnboarded(); $listRoute = $onboarded ? 'backend.recruitment.onboarding' : ($shortlisted ? 'backend.recruitment.shortlist' : 'backend.recruitment.index'); $listTitle = $onboarded ? 'Onboarding' : ($shortlisted ? 'Shortlisted' : 'Recruitments'); // An onboarded candidate is edited on the onboarding edit page $editRoute = $onboarded ? 'backend.recruitment.edit.onboarding' : 'backend.recruitment.edit'; // Repeated fields are saved as a JSON list; a candidate saved before that has a single value $list = function ($value) { $decoded = is_array($value) ? $value : json_decode($value ?? '', true); return is_array($decoded) ? array_values($decoded) : [$value]; }; // Rows of a repeated section, built from its columns (label => values); the empty rows are left out // unless the position of a row matters ($keepEmpty) $rows = function (array $columns, $keepEmpty = false) { $count = max(array_map('count', $columns)); return collect($count ? range(0, $count - 1) : []) ->map(fn ($i) => array_map(fn ($values) => $values[$i] ?? null, $columns)) ->filter(fn ($row) => $keepEmpty || collect($row)->contains(fn ($value) => filled($value))) ->values(); }; @endphp

Candidate Details

Personal Details
Edit
Staff Type: {{ $recruitment->staff_type ?? '-' }}
@if ($recruitment->staff_type == 'Project')
Project: {{ $recruitment->project ? $recruitment->project->project_name . ' - ' . $recruitment->project->payroll_id : '-' }}
@else
Client: {{ $recruitment->client ? $recruitment->client->company_name . ' - ' . $recruitment->client->client_id : '-' }}
@endif
Application ID: {{ $recruitment->application_id ?? '-' }}
Category: {{ $recruitment->category ?? '-' }}
Aadhar No: {{ $recruitment->aadhar ?? '-' }}
Candidate Name: {{ $recruitment->name ?? '-' }}
DOB: {{ $recruitment->dob ? date('d-m-Y', strtotime($recruitment->dob)) : '-' }}
Age: {{ $recruitment->age ?? '-' }}
Gender: {{ $recruitment->gender ?? '-' }}
Marital Status: {{ $recruitment->marital_status ?? '-' }}
Blood Group: {{ $recruitment->blood_group ?? '-' }}
Mobile No: {{ $recruitment->mobile_no ?? '-' }}
Email: {{ $recruitment->email ?? '-' }}
Status: @if ($recruitment->isPending()) Pending @elseif($shortlisted) Shortlisted @elseif($onboarded) Onboarded @elseif($recruitment->status == 'canceled') Canceled @else {{ ucfirst($recruitment->status) }} @endif
@php $wellbeingRows = $rows([ 'medical_history' => $list($recruitment->medical_history), 'other_medical' => $list($recruitment->other_medical), ]); @endphp
Candidate Wellbeing
@if ($wellbeingRows->isNotEmpty()) @foreach ($wellbeingRows as $row) @endforeach
Medical History Comments
{{ $row['medical_history'] ?: '-' }} {{ $row['other_medical'] ?: '-' }}
@else - @endif
@php $educationRows = $rows([ 'education' => $list($recruitment->education), 'major' => $list($recruitment->major), ]); @endphp
Educational Details
@if ($educationRows->isNotEmpty()) @foreach ($educationRows as $row) @endforeach
Education Major
{{ $row['education'] ?: '-' }} {{ $row['major'] ?: '-' }}
@else - @endif
@php // A candidate saved before Fresher / Experience existed is experienced when Re-Joining was filled $experienceType = $recruitment->experience_type ?: ($recruitment->re_joining ? 'Experience' : null); @endphp
Experience
Experience: {{ $experienceType ?? '-' }}
{{-- Re-Joining and Years only apply to an experienced candidate --}} @if ($experienceType == 'Experience')
Re-Joining: {{ $recruitment->re_joining ? ucfirst($recruitment->re_joining) : '-' }}
Years: {{ $recruitment->experience_years !== null ? $recruitment->experience_years + 0 : '-' }}
@endif
Work Location: {{ $recruitment->work_location ?? '-' }}
@php $familyMembers = json_decode($recruitment->family_details ?? '', true); // A candidate saved before Family Details had rows: father, mother and emergency contact become rows if (!is_array($familyMembers)) { $familyMembers = collect([ ['name' => $recruitment->father_name, 'relationship' => 'Father'], ['name' => $recruitment->mother_name, 'relationship' => 'Mother'], ['name' => $recruitment->contact_preson_name, 'contact_number' => $recruitment->contact_preson_number], ])->filter(fn ($member) => filled($member['name']) || filled($member['contact_number'] ?? null))->values()->all(); } @endphp
Family Details
@if ($familyMembers) @foreach ($familyMembers as $member) @endforeach
Name Gender Relationship Contact Number
{{ ($member['name'] ?? null) ?: '-' }} {{ ($member['gender'] ?? null) ?: '-' }} {{ ($member['relationship'] ?? null) ?: '-' }} {{ ($member['contact_number'] ?? null) ?: '-' }}
@else - @endif
Nominee
Name: {{ $recruitment->nominee_name ?? '-' }}
Relationship: {{ $recruitment->nominee_relationship ?? '-' }}
Contact Number: {{ $recruitment->nominee_contact_number ?? '-' }}
Address Details
@php // Every address field is a JSON list: first the current address, then the permanent address $addresses = $rows([ 'Building No / Flat No' => $list($recruitment->building_no), 'Street / Village' => $list($recruitment->address1), 'City' => $list($recruitment->city), 'District' => $list($recruitment->district), 'State' => $list($recruitment->state), 'Country' => $list($recruitment->country), 'Pincode' => $list($recruitment->pincode), 'Full Address' => $list($recruitment->address2), ], true); @endphp
Registered Current Address
@foreach ($addresses[0] ?? [] as $label => $value)
{{ $label }}: {{ filled($value) ? $value : '-' }}
@endforeach @empty($addresses[0])
-
@endempty
Registered Permanent Address
Same as current address: {{ $recruitment->same_as_current ? 'Yes' : 'No' }}
@foreach ($addresses[1] ?? [] as $label => $value)
{{ $label }}: {{ filled($value) ? $value : '-' }}
@endforeach
@php // Opened from the All Staff list: Back returns to it with the same filters $allStaff = $onboarded ? \App\Http\Controllers\RecruitmentController::allStaffFilters(request()) : null; @endphp Back
@endsection