@extends('pia.layouts.app') @section('title','View Candidate') @section('content')

{{ $Candidate->name }}'s Details

Candidates List
@csrf

{{ $Candidate->name }}




@php $chk=""; $chk1=""; $chk2=""; if( $Candidate->gender =='Male'){ $chk="selected"; } elseif( $Candidate->gender =='Female'){ $chk1="selected"; } else{ $chk2="selected"; } @endphp
gender =='Male') checked @endif name="gender" id="male" value="Male" required>
gender =='Female') checked @endif name="gender" id="female" value="Female">
gender =='transgender') checked @endif name="gender" id="transgender" value="Transgender">


{{ $Candidate->Highest_Qualification }}

{{ $Candidate->AdditionalCertificates }}

{{ $Candidate->District->name }}

{{ $Candidate->LocalBtype->name_eng }}

{{ $Candidate->Localbody->name_eng }}

{{ $Candidate->religion }}

{{ $Candidate->category }}

@if($Candidate->status==1) New registration @elseif($Candidate->status==2) Joined @else Completed @endif

{{ $Candidate->MGNREGA }}

{{ $Candidate->willingTojoin }}
@if($Candidate->document_upload) @endif

@if ($Courses->isNotEmpty()) @foreach($Courses as $key=>$valInt) @if($key==0)
@else
@endif @endforeach @endif
@php $tr = $training->toArray(); if($Candidate->training_program_id){ // Assuming $Candidate->training_program_id is a single ID or an array of IDs $trainingProgramIds = json_decode($Candidate->training_program_id, true); $trainingProgramIds = array_map('intval', $trainingProgramIds); @endphp

@foreach($trainingProgramIds as $id) @php $matchingItem = collect($tr)->firstWhere('id', (int)$id); $name = $matchingItem ? $matchingItem['training_name'] : null; @endphp {{ $name }}
@endforeach
@php } @endphp



@endsection