@extends('layouts.app') @php $pageTitle = 'Dashboard'; $hours = fn ($value) => rtrim(rtrim(number_format((float) $value, 2), '0'), '.'); @endphp @section('content')
{{ $schoolYear?->name ?? 'No School Year' }} • {{ $term?->name ?? 'No Term' }}
@if (!$schoolYear || !$term)
No active School Year and Term is set, so there is nothing to show yet.
@else
{{ $completionPercent }}%
Schedules Complete
{{ $totalSections }}
Sections
{{ $activeTeachers }}
Active Teachers
{{ $totalClasses }}
Classes per Week
{{ $hours($weeklyHours) }}
Hours per Week
{{-- Completion by grade level --}}
Schedule Completion
{{ $completedSections }} of {{ $totalSections }} sections complete
@forelse ($gradeSummaries as $grade) @php $total = max($grade['total'], 1); @endphp
{{ $grade['gradeLevel']->name }} {{ $grade['complete'] }} / {{ $grade['total'] }}
@empty
No active grade levels.
@endforelse
Complete Incomplete Not started
{{-- Readiness snapshot --}}
Scheduling Readiness
Details
Subject Coverage {{ $readiness['subjects_no_teacher'] > 0 ? $readiness['subjects_no_teacher'] . ' without a teacher' : 'All covered' }}
Specialized Rooms {{ $readiness['room_shortfall'] ? 'Short on capacity' : 'Sufficient' }}
Section Grid Capacity {{ $readiness['sections_grid_blocked'] > 0 ? $readiness['sections_grid_blocked'] . ' blocked' : 'All schedulable' }}
Teacher Assignment {{ $idleTeachers > 0 ? $idleTeachers . ' with no classes' : 'All assigned' }}
{{-- Sections to watch --}}
Sections Not Yet Complete
{{ $sectionsToWatch->count() }}
{{-- Highest teacher loads --}}
Highest Teacher Loads
All teachers
@php $maxLoad = max((float) ($topTeachers->first()['assigned_hours'] ?? 0), 1); @endphp @forelse ($topTeachers as $row)
{{ $row['teacher']->full_name }} {{ $hours($row['assigned_hours']) }} hrs/wk
@empty
No classes have been assigned this term.
@endforelse
{{-- Quick links (read-only portal pages only) --}}
Quick Links
@endif @endsection