@extends('admin.layouts.mainlayout') @section('title', 'Academic Year Management') @section('content')
{{-- Header --}}

Academic Year Management

Manage academic years and marking periods

{{-- Flash Messages --}} @if(session('success')) @endif @if(session('error')) @endif {{-- Academic Years --}}
@forelse($academicYears as $year)
{{-- Year Info --}}
{{ $year->name }}
{{-- Status --}}
@if($year->status === 'active') Active @elseif($year->status === 'completed') Completed @else Planned @endif
Code: {{ $year->code }}
Duration: {{ \Carbon\Carbon::parse($year->start_date)->format('M d, Y') }} — {{ \Carbon\Carbon::parse($year->end_date)->format('M d, Y') }}
{{-- Actions --}}
@if(!$year->is_active && $year->status !== 'completed')
@csrf
@endif View Details
{{-- Marking Periods --}}
Marking Periods
@foreach($year->markingPeriods as $period)
{{ $period->name }}
@if($period->pivot->is_active) Active @else Inactive @endif
Sequence {{ $period->pivot->sequence }}
{{ \Carbon\Carbon::parse($period->pivot->start_date)->format('M d, Y') }} — {{ \Carbon\Carbon::parse($period->pivot->end_date)->format('M d, Y') }}
@if($year->is_active && !$period->pivot->is_active)
@csrf
@endif
@endforeach
@empty
No Academic Years Found

Get started by creating your first academic year.

Create Academic Year
@endforelse
@endsection