{{-- TEACHER LOAD --}}
@if ($tab === 'load')
@if (count($load['rows'] ?? []) > 0)
| Teacher |
Weekly Load |
Mon |
Tue |
Wed |
Thu |
Fri |
Entries |
@foreach ($load['rows'] as $row)
| {{ $row['teacher']->full_name }} |
{{ $hours($row['assigned_hours']) }} |
@foreach (['monday', 'tuesday', 'wednesday', 'thursday', 'friday'] as $day)
{{ $hours($row['daily_hours'][$day]) }} |
@endforeach
{{ $row['total_schedule_entries'] }} |
@endforeach
@else
No teacher load data is available for this term.
@endif
{{-- SUBJECT HOURS --}}
@elseif ($tab === 'hours')
@if (!empty($tracker) && $tracker->isNotEmpty())
| Subject |
Hours/Week |
Scheduled |
Remaining |
Status |
@foreach ($tracker as $row)
| {{ $row['subject']->name }} {{ $row['subject']->code }} |
{{ $hours($row['weekly_hours']) }} |
{{ $hours($row['scheduled_hours']) }} |
{{ $hours($row['remaining_hours']) }} |
{{ ucfirst($row['status']) }}
|
@endforeach
@else
No required subjects for this section in this term.
@endif
{{-- READINESS --}}
@else
@php
$summary = $readiness['summary'] ?? null;
$roomRow = $readiness['roomRow'] ?? null;
$blockedReasons = [
'no_teacher' => 'no qualified teacher',
'teacher_conflict' => 'teachers busy elsewhere',
'no_space' => 'not enough grid time',
];
$ok = '
';
$bad = '
';
@endphp
@if ($summary)
{{ $summary['is_ready']
? 'No blocking readiness issues detected for this term.'
: 'One or more readiness issues were found below.' }}
Subject Teacher Coverage
| Subject |
Sections |
Demand |
Available |
Hrs Needed |
Teachers |
More Needed |
Status |
@forelse ($readiness['subjectRows'] as $row)
| {{ $row['subject']->name }} |
{{ $row['sections_needing'] }} |
{{ $hours($row['demand_hours']) }} |
{{ $hours($row['available_hours']) }} |
{{ $hours($row['needed_more_hours']) }} |
{{ $row['qualified_teacher_count'] }} |
{{ $row['teachers_needed_more'] }} |
{!! $row['status'] === 'ok' && $row['teachers_needed_more'] === 0 ? $ok : $bad !!} |
@empty
| No required subjects found for this term. |
@endforelse
Specialized Room Capacity
| Demand |
Supply Ceiling |
Specialized Rooms |
Status |
| {{ $hours($roomRow['demand_hours']) }} |
{{ $hours($roomRow['supply_hours']) }} |
{{ $roomRow['specialized_room_count'] }} |
{!! $roomRow['status'] === 'ok' ? $ok : $bad !!} |
Section Grid Capacity
| Section |
Required |
Available |
Schedulable |
Unschedulable |
Blocked Subjects |
Status |
@forelse ($readiness['gridRows'] as $row)
| {{ $row['section']->name }} |
{{ $hours($row['required_hours']) }} |
{{ $hours($row['available_hours']) }} |
{{ $hours($row['schedulable_hours']) }} |
{{ $hours($row['short_hours']) }} |
@forelse ($row['blocked_subjects'] as $blocked)
{{ $blocked['subject']->name }} ({{ $blockedReasons[$blocked['reason']] ?? $blocked['reason'] }})
@empty
-
@endforelse
|
{!! $row['status'] === 'ok' ? $ok : $bad !!} |
@empty
| No active sections found for this year. |
@endforelse
@else
No readiness data is available for this term.
@endif
@endif