Skip to content

Commit cd9e66f

Browse files
committed
Add reader information to instructor summary page
1 parent 7cdf672 commit cd9e66f

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

app/summary/directives/instructorSummary/scheduledCourses/scheduledCourses.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ <h5>Scheduled Courses {{ year.yearToAcademicYear() }}</h5>
1010
<div class="scheduled-courses-table__header-cell">Time</div>
1111
<div class="scheduled-courses-table__header-cell">Location</div>
1212
<div class="scheduled-courses-table__header-cell">Teaching Assistant(s)</div>
13+
<div class="scheduled-courses-table__header-cell">Reader(s)</div>
1314
</div>
1415

1516
<div class="scheduled-courses-table__content" ng-repeat="termCode in termCodes">
@@ -47,6 +48,14 @@ <h5>Scheduled Courses {{ year.yearToAcademicYear() }}</h5>
4748
No TA information
4849
</div>
4950
</div>
51+
<div class="scheduled-courses-table__cell scheduled-courses-table__cell--gray">
52+
<div ng-if="instructorAssignment.readers.length > 0" ng-repeat="reader in instructorAssignment.readers">
53+
{{ reader.lastName }}, {{ reader.firstName }}
54+
</div>
55+
<div ng-if="instructorAssignment.readers.length == 0">
56+
No Reader information
57+
</div>
58+
</div>
5059
</div>
5160
</div>
5261

app/summary/directives/instructorSummary/scheduledCourses/scheduledCourses.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ let scheduledCourses = function ($rootScope, TeachingAssignmentService) {
5757
termCode: scheduledTermCode,
5858
meetings: meetings,
5959
sectionGroupId: sectionGroup ? sectionGroup.id : null,
60-
teachingAssistants: sectionGroup?.teachingAssistants
60+
teachingAssistants: sectionGroup?.teachingAssistants,
61+
readers: sectionGroup?.readers
6162
};
6263

6364
scope.instructorAssignments.push(instructorAssignment);
@@ -80,6 +81,7 @@ let scheduledCourses = function ($rootScope, TeachingAssignmentService) {
8081
title: course.title,
8182
meetings: meetings,
8283
teachingAssistants: sectionGroup.teachingAssistants,
84+
readers: sectionGroup.readers,
8385
sequencePattern: course.sequencePattern
8486
};
8587

app/summary/services/summaryStateService.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,24 @@ class SummaryStateService {
7373
appointmentType: supportAssignment.appointmentType
7474
};
7575
});
76+
77+
sectionGroups.list[sectionGroup.id].readers = action.payload.supportAssignments.filter(function(supportAssignment) {
78+
return supportAssignment.appointmentType == "reader" && supportAssignment.sectionGroupId == sectionGroup.id;
79+
}).map(function(supportAssignment) {
80+
var supportStaff = supportStaffList.list[supportAssignment.supportStaffId];
81+
return {
82+
id: supportStaff.id,
83+
supportStaffId: supportStaff.id,
84+
supportAssignmentId: supportAssignment.id,
85+
sectionGroupId: sectionGroup.id,
86+
firstName: supportStaff.firstName,
87+
lastName: supportStaff.lastName,
88+
fullName: supportStaff.fullName,
89+
loginId: supportStaff.loginId,
90+
appointmentPercentage: supportAssignment.appointmentPercentage,
91+
appointmentType: supportAssignment.appointmentType
92+
};
93+
});
7694
});
7795

7896
return sectionGroups;

0 commit comments

Comments
 (0)