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
| Course Number | Brief Title | Section Number | Number of Students |
Lecture Schedule | Lecturer | TA for Lecture Course |
Lab Schedule | Lab TA | Tutorial Schedule | Tutors |
@foreach($rows as $r)
| {{ $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 }} |
@endforeach
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)
@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() }})
| Time | Decision | By | Comment |
@foreach($histories as $h)| {{ $h->created_at }} | {{ $h->action === 'Approved' ? 'Acknowledged' : $h->action }} | {{ $h->actor_name ?: $h->actor_user_id }} | {{ $h->comment ?: '-' }} |
@endforeach
@endif