@extends('layouts.portal') @php $editing = $batch->exists; $dateVal = fn ($d) => $d ? $d->format('Y-m-d') : null; @endphp @section('title', $editing ? 'Edit batch' : 'New batch') @section('subtitle', $editing ? ($batch->course?->title.' · '.$batch->batch_code) : 'Schedule a run of a course, assign a trainer and (optionally) generate the class calendar.') @section('actions') {{ $editing ? 'Back to batch' : 'All batches' }}@endsection @section('content')
@csrf @if($editing) @method('PUT') @endif

Course & trainer

Dates & seats

Delivery

@unless($editing)

Generate class calendar

Optional. Needs a start date.
Days of the week
@foreach([1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat', 0 => 'Sun'] as $d => $lab) @endforeach
@error('auto_weekdays')
{{ $message }}
@enderror
Learners are notified when their enrollment is activated. You can also send the full schedule later from the batch page.
@endunless
Cancel
@endsection