@extends('layouts.app') @section('title', $event->title) @section('page-title', 'Parent-Teacher Meeting') @section('content') @php // Gather class teacher IDs from children's classes $ctIds = collect(); $actIds = collect(); foreach ($children as $child) { $cls = $child->studentProfile?->class_; if ($cls) { if ($cls->class_teacher_id) $ctIds->push($cls->class_teacher_id); if ($cls->asst_class_teacher_id) $actIds->push($cls->asst_class_teacher_id); } } $ctIds = $ctIds->unique(); $actIds = $actIds->unique(); @endphp
{{ $event->date->format('l, d M Y') }} · {{ $event->formatted_time }} @if($event->venue) · {{ $event->venue }} @endif
{{ $booking->slot->formatted_time }}
{{ $booking->slot->teacher->name ?? '—' }} @if($ctIds->contains($booking->slot->teacher_id)) ★ Class Teacher @elseif($actIds->contains($booking->slot->teacher_id)) Asst. CT @endif
For: {{ $booking->student->name ?? '—' }}
{{ $teacher->name ?? 'Unknown' }}
@if($ctIds->contains($teacherId)) ★ Class Teacher @elseif($actIds->contains($teacherId)) Asst. Class Teacher @endif{{ $teacher->teacherProfile?->specialization ?? '' }} · {{ $slots->count() }} slots available
No available slots
Teachers haven't set their availability yet, or all slots are booked