@extends('layouts.parent') @section('title', $heading.' · '.config('brand.name')) @section('content')
Subjects & enrolments @if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif @include('parent.partials.child-picker') @if (! $child)

Select or add a child first. Find Lessons only shows published lessons for that child’s class.

@elseif (! $child->studentProfile?->class_id)

{{ $child->first_name }} does not have a class yet. Update their details before searching for lessons.

@else
@if ($track) @endif @if ($programme ?? '') @endif @if ($enrolledOnly) @endif
Clear
@if (! empty($programmes))

SHS course

All courses @foreach ($programmes as $option) {{ $option['label'] }} @endforeach
@if (($programme ?? '') !== '')

Showing cores and electives for {{ \App\Support\ShsProgrammes::label($programme) }}.

@endif
@endif
@if ($lessons === null || $lessons->total() === 0)

@if ($q !== '' || $track !== '') No lessons matched your search for {{ $child->first_name }}’s class. @elseif ($enrolledOnly) {{ $child->first_name }} is not enrolled in a subject yet. @else No published lessons for {{ $child->first_name }}’s class ({{ $child->classLabel() }}) yet. @endif

@else @foreach ($lessons as $lesson) @unless ($enrolledIds->contains($lesson->id))
@csrf
@endunless @endforeach
@csrf

Tick several lessons, then enrol {{ $child->first_name }} in all of them. Lesson prices are monthly; yearly is 12 months. Payment will be collected later.

0 lessons selected · GH₵0.00 / month

Yearly equivalent GH₵0.00 / year

@foreach ($lessons as $lesson) @php $isEnrolled = $enrolledIds->contains($lesson->id); @endphp
{{ $child->classLabel() }} @if ($isEnrolled) Enrolled @endif

{{ $lesson->subject?->name }}

{{ $lesson->studentDisplayName() }}

{{ $lesson->priceLabel() }}

{{ $lesson->yearlyPriceLabel() }}

{{ $lesson->curriculum_items_count }} curriculum {{ $lesson->curriculum_items_count === 1 ? 'unit' : 'units' }} · {{ $isEnrolled ? 'Enrolled — open to manage class times' : 'Select to enrol; payment comes later' }}

{{ $isEnrolled ? 'View curriculum & times' : 'View' }} @unless ($isEnrolled) @endunless
@endforeach
@endif @endif
@endsection @section('scripts') @endsection