@extends('layouts.training_centre_layout') @php use Illuminate\Support\Str; use Carbon\Carbon; $trainers = $trainers ?? collect(); $infrastructure = $infrastructure ?? []; $facilityDetails = $facilityDetails ?? collect(); $selectedProgram = $selectedProgram ?? collect(); $payment = $payment ?? null; $centreDocument = $centreDocument ?? (object)[]; $centreId = $centre->id ?? null; $pageTitle = $pageTitle ?? 'Application Preview'; $status = $centre->application_status ?? null; $editRoute = $centreId ? route('centre.my-application.edit', ['id' => $centreId]) : '#'; $applyRoute = route('training-centre.my-application.apply-now'); $backButtonRoute = ($status === 'DISCREPANCY_FOUND')? $editRoute: $applyRoute; @endphp @section('content')
{{-- Main Navigation Tabs (Pills) --}} {{-- Tab Content Panes --}}
{{-- ------------------------------------------------------------------------------------------------------ --}} {{-- Step 1: Trainers Info --}}

Trainer Information

{{-- Your main content goes here (trainer list, etc.) --}}
@if ($trainers->count() > 0) @foreach ($trainers as $trainer)
{{-- Main details --}}
{{ $trainer->name ?? 'Not Specified' }}

Date of Birth: {{ $trainer->dob ? \Carbon\Carbon::parse($trainer->dob)->format('d M Y') : 'N/A' }}

Education: {{ $trainer->higher_qualification ?? 'N/A' }}

Experience: {{ $trainer->experience ? $trainer->experience . ' years' : 'N/A' }}

{{-- Document Links - UPDATED CONTAINER --}}
{{-- Education Certificate --}} @if ($trainer->higher_qualification_certificate) Education Certificate @endif {{-- Experience Letter --}} @if ($trainer->experience_certificate) Experience Letter @endif {{-- NISD Certificate --}} @if ($trainer->nisd_certificate) @endif {{-- TOT Certificate --}} @if ($trainer->nisd_tot_certificate) NISD TOT Master Trainer Certificate @endif {{-- TOA Certificate (Optional) --}} @if ($trainer->toa_certificate) NISD TOA Certificate @endif {{-- Show message if no documents are uploaded --}} @if ( !($trainer->higher_qualification_certificate || $trainer->experience_certificate || $trainer->nisd_certificate || $trainer->tot_certificate || $trainer->toa_certificate) ) No documents uploaded. @endif
@endforeach @else {{-- Message when no trainers found --}}

No trainers have been added yet.

@endif
{{-- Navigation Button --}}
{{-- ------------------------------------------------------------------------------------------------------ --}} {{-- Step 2: Infrastructure --}}

Infrastructure

Provide details about training infrastructure

@php // Get the list of facilities $facilityList = ($facilityDetails instanceof \Illuminate\Support\Collection) ? $facilityDetails->pluck('name')->toArray() : []; $infraFields = [ ['label' => 'Total Area (sq ft)', 'value' => $infrastructure['total_area'] ?? '❌ Not Provided', 'icon' => 'fa-ruler-combined'], ['label' => 'Number of Classrooms', 'value' => $infrastructure['classrooms'] ?? '❌ Not Provided', 'icon' => 'fa-chalkboard-teacher'], ['label' => 'Classroom Size Confirmed', 'value' => ($infrastructure['classroom_size_confirmation'] ?? false) ? '✅ Confirmed' : '❌ Not Confirmed', 'icon' => 'fa-expand'], ['label' => 'Number of Demonstration Labs', 'value' => $infrastructure['number_of_laboratories'] ?? '❌ Not Provided', 'icon' => 'fa-flask'], ['label' => 'Demo Lab Size Confirmed', 'value' => ($infrastructure['laboratory_size_confirmation'] ?? false) ? '✅ Confirmed' : '❌ Not Confirmed', 'icon' => 'fa-vector-square'], ['label' => 'Available Facilities', 'value' => $facilityList, 'icon' => 'fa-tools'] ]; @endphp @foreach ($infraFields as $field)
{{ $field['label'] }}
@if ($field['label'] === 'Available Facilities') @if (!empty($field['value']))
    @foreach ($field['value'] as $facility)
  • {{ $facility }}
  • @endforeach
@else

❌ Not Provided

@endif @else

{{ $field['value'] }}

@endif
@endforeach
{{-- NAV BUTTONS --}}
{{-- Step 3: Training Programs --}}

Training Program(s)

These are the programs selected for your centre

@if($selectedProgram->count() > 0) @foreach($selectedProgram as $program) @php $programData = $program->program ?? null; @endphp
{{ $program->program->title ?? 'N/A' }}

Duration: {{ $program->program->total_hours ?? 'N/A' }} hrs

Type: {{ $program->program->course_type_desc ?? 'N/A' }}

@endforeach @else
@endif
{{-- NAV BUTTONS --}}
{{-- ------------------------------------------------------------------------------------------------------ --}} {{-- Step 4: Payment Details --}} {{-- ------------------------------------------------------------------------------------------------------ --}} {{-- Step 5: Document & Declaration --}}

Uploaded Documents & Declaration

@foreach($centreDocument as $label => $files)
{{ $label }}

{{ count($files) }} {{ Str::plural('file', count($files)) }}

@forelse($files as $file) @empty No file @endforelse
@endforeach
@php $declarationLabels = [ 'agree_terms' => 'I agree to the Terms and Conditions and Privacy Policy', 'agree_inspection' => 'I agree to facility inspection by NISD officials', 'declare_info' => 'I declare that all information provided is accurate and complete', ]; @endphp

Declarations

Declarations confirmed for this application:
@foreach($declarations as $key => $value)
@endforeach
{{-- NAV BUTTONS --}}

{{-- Final Action Buttons --}}
{{-- Back Button --}} {{-- Final Submit Form --}} @if ($centreId)
@csrf
@else
Cannot submit application. Application ID is missing.
@endif
@endsection @section('pages-scripts') @endsection