@extends('layouts.admin') @section('title', ($record ? 'Edit' : 'Create') . ' Academic Session') @section('content') @php use App\Enums\RecordStatus; use App\Models\Institution; $institution = Institution::current(); @endphp @include('institution.partials.flash') @csrf @if($formMethod !== 'POST') @method($formMethod) @endif Code * @error('code'){{ $message }}@enderror Session name * @error('name'){{ $message }}@enderror @foreach(RecordStatus::cases() as $status) status?->value ?? RecordStatus::Active->value) === $status->value)>{{ $status->label() }} @endforeach Status @error('status'){{ $message }}@enderror Start year * @error('year_start'){{ $message }}@enderror End year * @error('year_end'){{ $message }}@enderror is_current ?? false))> Set as current session Key dates @foreach([ ['registration_start', 'registration_end', 'Registration'], ['teaching_start', 'teaching_end', 'Teaching'], ['examination_start', 'examination_end', 'Examination'], ] as [$startField, $endField, $label]) {{ $label }} start @error($startField){{ $message }}@enderror {{ $label }} end @error($endField){{ $message }}@enderror @endforeach Graduation date @error('graduation_date'){{ $message }}@enderror {{ $record ? 'Update session' : 'Create session' }} Cancel @endsection