@extends('layouts.app') @section('content')
{{-- PAGE HEADER --}}

Manage Trainees ({{ Auth::user()->name }})

@if($centers && $centers->isNotEmpty()) Centers: {{ $centers->pluck('name')->join(', ') }} @else No center assigned @endif
{{-- SUCCESS MESSAGE --}} @if(session('success'))
{{ session('success') }}
@endif {{-- ADD TRAINEE FORM --}}
Add Trainee
@csrf
@if($centers && $centers->isNotEmpty())
@endif
{{-- TRAINEE LIST --}}
Trainees in Your Centers
@if($trainees->isEmpty())

No trainees found for your centers.

@else @foreach($trainees as $trainee) @php $assignment = optional($trainee->studentAssignments)->first(); $centerName = optional(optional($assignment)->classRoom)->center->name ?? 'N/A'; @endphp @endforeach
Name Email Phone Center Actions
{{ $trainee->name }} {{ $trainee->email }} {{ $trainee->phone ?? 'N/A' }} {{ $centerName }}
@csrf @method('DELETE')
@endif
@endsection