@extends('layouts.parent') @section('title', $lesson->studentDisplayName().' · '.config('brand.name')) @php $subjectName = $lesson->studentDisplayName(); $openSlots = $bookableSessions->filter(fn ($session) => $session->status?->isOperational() && ($session->status->value === 'live' || $session->ends_at?->greaterThanOrEqualTo(now('Africa/Accra')))); @endphp @section('content')
Back to subjects @if ($enrolled) Enrolled @endif @if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
@if ($enrolled) Enrolled @endif
Class

{{ $child->classLabel() }}

Subject

{{ $subjectName }}

Curriculum

{{ $lesson->curriculumItems->count() }} {{ $lesson->curriculumItems->count() === 1 ? 'unit' : 'units' }}

Monthly

{{ $lesson->priceLabel() }}

Yearly

{{ $lesson->yearlyPriceLabel() }}

@include('lessons.partials.detail-body', ['audience' => 'parent'])
Class times

@if ($enrolled) Super Admin sets these times. Choose the slots {{ $child->first_name }} will attend for {{ $subjectName }}. @else Enrol {{ $child->first_name }} first (or below with times). Class times are set by Super Admin. @endif

@if ($bookableSessions->isEmpty())

No class times have been set for {{ $subjectName }} yet. You can still enrol — times can be chosen later.

@else
@csrf
@foreach ($bookableSessions as $session) @php $checked = $selectedSessionIds->contains($session->id); $ended = $session->status?->value !== 'live' && $session->ends_at?->lessThan(now('Africa/Accra')); @endphp @endforeach
@if ($openSlots->isEmpty())

There are no upcoming class times left to choose.

@else @endif
@endif
@endsection