@php $nextSession = $this->getNextSession(); @endphp @if($nextSession) @php $session = $nextSession['session']; $instance = $nextSession['instance']; $slot = $nextSession['slot']; $enrollment = $nextSession['enrollment']; $daysUntil = $nextSession['days_until']; $sessionDate = $nextSession['date']; $schedulableType = class_basename($instance->schedulable_type); $isModule = $schedulableType === 'Module'; @endphp
{{-- Header --}}
@if($isModule) @else @endif

@lang('app.Next Session')

{{ \App\Models\ScheduleSlot::getRelativeDayText($daysUntil) }}

{{-- Time Badge --}}
{{ $this->formatTime($session->start_time) }} - {{ $this->formatTime($session->end_time) }}
{{-- Session Details --}}
{{-- What --}}

{{ $schedulableType }}

{{ $instance->schedulable->title }}

@php $teachers = $session->teachers->pluck('name')->join(', '); @endphp @if($teachers)

@lang('app.With') {{ $teachers }}

@endif
{{-- When & Where --}}
{{-- Date --}}

@lang('app.When')

{{ $sessionDate->translatedFormat('l, F j') }}

{{-- Location --}}

@lang('app.Where')

{{ $session->location ?? __('app.To Be Announced') }}

{{-- Slot Name --}}
@lang('app.Slot'): {{ $slot->name }} @lang('app.Unit'): {{ $enrollment->unit->name }}
@else {{-- No Upcoming Sessions --}}

@lang('app.No Upcoming Sessions')

@lang('app.You don\'t have any scheduled sessions at the moment.')

@endif