@extends('layouts.admin') @php $editing = $batch->exists; $locked = $editing && $batch->datesLocked(); @endphp @section('title', 'Batches') @section('heading', $editing ? 'Edit Batch' : 'Create Internship Batch') @use('App\Models\InternshipBatch', 'Batch') @use('App\Models\InternHospitalAllocation', 'Allocation') @section('content') @php $start = old('starts_on', $batch->starts_on?->toDateString()); $err = fn ($k) => $errors->first($k); $input = 'w-full rounded-xl border bg-white px-3.5 py-3 text-sm text-gray-800 focus:ring-2 focus:outline-none'; $ok = 'border-slate-200 focus:border-blue-300 focus:ring-blue-100'; $bad = 'border-red-400 focus:border-red-400 focus:ring-red-100'; @endphp {{ $editing ? 'Back to batch' : 'All batches' }}
@csrf @if($editing) @method('PUT') @endif {{-- ═════════ Details ═════════ --}}

Batch details

Define the internship intake. The completion date is set automatically to one year after the start date.

@if($err('name'))

{{ $err('name') }}

@endif
@if($err('year'))

{{ $err('year') }}

@endif
Batch type *
@foreach(['main' => ['ri-stack-line', 'Main', 'Regular intake'], 'repeat' => ['ri-repeat-line', 'Repeat', 'Repeating interns']] as $value => [$icon, $label, $hint]) @endforeach
@if($err('type'))

{{ $err('type') }}

@endif
@if($err('description'))

{{ $err('description') }}

@endif
@if($err('starts_on'))

{{ $err('starts_on') }}

@elseif($locked)

Locked: evaluations have started for this batch.

@endif

One year after the start date.

@if($editing) @endif
Cancel
{{-- ═════════ Live cycle preview ═════════ --}}
@endsection