@extends('layouts.portal') @section('title', 'Batches and schedule') @section('subtitle', 'Every cohort, its trainer, seats and next class.') @section('actions') New batch@endsection @section('content')
@if($filters)Clear@endif
@if($batches->isEmpty())
Create a batch
@else
@foreach($batches as $b) @php $pct = $b->seat_limit ? min(100, (int) round($b->seats / $b->seat_limit * 100)) : 0; $next = $b->next_session_at ? \Illuminate\Support\Carbon::parse($b->next_session_at) : null; @endphp @endforeach
Course · batchTrainerDatesStatusSeatsNext classActions
{{ $b->course?->title ?? 'Course removed' }}
{{ $b->batch_code }} · {{ ucfirst($b->mode) }}
{{ $b->trainer?->name ?? $b->trainer_name ?? '—' }} {{ $b->start_date?->format('d M Y') ?? 'TBA' }}@if($b->end_date)
to {{ $b->end_date->format('d M Y') }}
@endif
{{ $b->seats }}{{ $b->seat_limit ? ' of '.$b->seat_limit : '' }} taken @if($b->seat_limit && $b->seats >= $b->seat_limit) · full@endif
@if($next){{ $next->format('D d M') }}
{{ $next->format('g:i A') }}
@else{{ $b->sessions_total ? 'None upcoming' : 'Not scheduled' }}@endif
{{ $batches->links() }} @endif @endsection