@extends('layouts.master') @section('title', 'Workload Table - Summary') @section('style') @endsection @section('content') @include('layouts.header') @include('layouts.title')

Workload Table - Summary

Back to All Request

School of {{ $schoolName }}

Academic Year {{ $year }} Semester {{ $semester }}

{{-- The DB keeps Approved for compatibility with the current Controller. --}} {{ $status === 'Approved' ? 'Acknowledged' : $status }} {{-- Export becomes visible only after acknowledgement of the CURRENT source signature. $status is calculated by the Controller; when source data changes, it becomes Waiting again. --}} @if($status === 'Approved') @else
Export is available after acknowledgement.
@endif

01
Head of School
{{ $headName }}
({{ $status === 'Approved' ? 'Acknowledged' : ($status === 'Disapproved' ? 'Disapproved (historical)' : 'Waiting for Acknowledgement') }})
@if($status !== 'Waiting' && $approval)
{{ $status === 'Approved' ? 'Acknowledged by' : 'Decision by' }} {{ $decider ?: ('User ID '.$approval->decided_by) }} • {{ $approval->decided_at }}
@endif

Summary of Courses
@foreach($rows as $r) @endforeach
Course NumberBrief TitleSection NumberNumber of Students Lecture ScheduleLecturerTA for Lecture Course Lab ScheduleLab TATutorial ScheduleTutors
{{ $r->course_code }}{{ $r->course_title }} {{ $r->course_section }}{{ $r->course_student }} {{ $r->lecture_schedule }}{{ $r->lecturer }} {{ $r->lecture_ta }}{{ $r->lab_schedule }} {{ $r->lab_ta }}{{ $r->tutorial_schedule }}{{ $r->tutors }}

Course sources: Approved Teaching Load / data_course (Lecture, Laboratory) / data_senior (Senior Project, Thesis, etc.) / data_timetable. TA/Tutorial columns show '–' until a verified source is connected.

@if($status === 'Waiting' && $approval && $approval->source_signature)
The underlying approved course list has changed since the previous decision. Head of School must acknowledge the updated Summary again.
@endif {{-- Acknowledgement replaces approval in the visible UI. Keep decision=Approved to remain compatible with the existing POST validation/database. --}} @if($mayDecide)
@csrf
@elseif($status === 'Approved')
Acknowledged — Excel and PDF exports are available above.
@elseif($status === 'Disapproved') {{-- Legacy disapproved records remain readable; the Disapprove action is hidden. --}}
This Workload Summary was disapproved previously.
@if($approval && $approval->decision_comment)
Comment: {{ $approval->decision_comment }}
@endif @else
Only the Head of School for this School can acknowledge this Summary.
@endif @if($histories->isNotEmpty())
Decision History ({{ $histories->count() }})
@foreach($histories as $h)@endforeach
TimeDecisionByComment
{{ $h->created_at }}{{ $h->action === 'Approved' ? 'Acknowledged' : $h->action }}{{ $h->actor_name ?: $h->actor_user_id }}{{ $h->comment ?: '-' }}
@endif
@include('layouts.footer') @endsection