{{-- resources/views/admin/settings/academicyear/show.blade.php --}} @extends('admin.layouts.mainlayout') @section('title', $academicYear->name) @section('content')
Back to Academic Years
{{-- Header --}}

{{ $academicYear->name }}

{{ \Carbon\Carbon::parse($academicYear->start_date)->format('F d, Y') }} - {{ \Carbon\Carbon::parse($academicYear->end_date)->format('F d, Y') }}

@if($academicYear->status === 'active') Active Year @elseif($academicYear->status === 'completed') Completed @else Planned @endif
{{-- Statistics --}}
Total Courses
{{ $academicYear->courseOfferings()->count() }}
Total Enrollments
{{ $academicYear->enrollments()->count() }}
Active Students
{{ $academicYear->enrollments()->distinct('student_id')->count('student_id') }}
Marking Periods
{{ $academicYear->markingPeriods->count() }}
{{-- Marking Periods Detail --}}

Marking Periods

@foreach($academicYear->markingPeriods as $period)

{{ $period->name }}

@if($period->pivot->is_active) Currently Active @endif

Sequence: {{ $period->pivot->sequence }}

Duration: {{ \Carbon\Carbon::parse($period->pivot->start_date)->format('F d, Y') }} - {{ \Carbon\Carbon::parse($period->pivot->end_date)->format('F d, Y') }}

Status: {{ $period->pivot->status }}

@if($academicYear->is_active && !$period->pivot->is_active && $period->pivot->status !== 'completed')
@csrf
@endif
@endforeach
@endsection