diff --git a/app/budget/directives/budgetCosts/courseCostsRow/courseCostsRow.html b/app/budget/directives/budgetCosts/courseCostsRow/courseCostsRow.html index a26f39710..62877b8b6 100644 --- a/app/budget/directives/budgetCosts/courseCostsRow/courseCostsRow.html +++ b/app/budget/directives/budgetCosts/courseCostsRow/courseCostsRow.html @@ -61,7 +61,7 @@
- TAs + TAs (Appointment)
@@ -82,6 +82,9 @@
{{ sectionGroupCost.taCount || 0 }}
+
+  ({{ sectionGroupCost.sectionGroup.taAppointmentPercentage || '50'}}%) +
@@ -96,7 +99,7 @@
- Readers + Readers (Appointment)
@@ -117,6 +120,9 @@
{{ sectionGroupCost.readerCount || 0 }}
+
+  ({{ sectionGroupCost.sectionGroup.readerAppointmentPercentage || '25'}}%) +
diff --git a/app/budget/directives/instructorList/instructorList.html b/app/budget/directives/instructorList/instructorList.html index 48d4829db..1d21d0350 100644 --- a/app/budget/directives/instructorList/instructorList.html +++ b/app/budget/directives/instructorList/instructorList.html @@ -89,7 +89,7 @@
- TA + TA (50% Appointment)
@@ -106,7 +106,7 @@
- Reader + Reader (25% Appointment)
diff --git a/app/budget/services/actions/scheduleCostCalculations.js b/app/budget/services/actions/scheduleCostCalculations.js index 00b4adf73..cc12de3a8 100644 --- a/app/budget/services/actions/scheduleCostCalculations.js +++ b/app/budget/services/actions/scheduleCostCalculations.js @@ -232,9 +232,12 @@ class ScheduleCostCalculations { _calculateSectionGroupFinancialCosts: function(sectionGroupCost) { var budget = BudgetReducers._state.budget; + var readerApptAdjustment = sectionGroupCost.sectionGroup.readerAppointmentPercentage ? sectionGroupCost.sectionGroup.readerAppointmentPercentage / 25 : 1; + var taApptAdjustment = sectionGroupCost.sectionGroup.taAppointmentPercentage ? sectionGroupCost.sectionGroup.taAppointmentPercentage / 50 : 1; + // Support Costs - sectionGroupCost.readerCost = sectionGroupCost.readerCount > 0 ? sectionGroupCost.readerCount * budget.readerCost : 0; - sectionGroupCost.taCost = sectionGroupCost.taCount > 0 ? sectionGroupCost.taCount * budget.taCost : 0; + sectionGroupCost.readerCost = sectionGroupCost.readerCount > 0 ? sectionGroupCost.readerCount * budget.readerCost * readerApptAdjustment : 0; + sectionGroupCost.taCost = sectionGroupCost.taCount > 0 ? sectionGroupCost.taCount * budget.taCost * taApptAdjustment : 0; sectionGroupCost.courseCostSubTotal = sectionGroupCost.taCost + sectionGroupCost.readerCost; diff --git a/app/reports/budgetComparison/services/budgetComparisonReportCalculations.js b/app/reports/budgetComparison/services/budgetComparisonReportCalculations.js index 1a0977f69..02b41bff5 100644 --- a/app/reports/budgetComparison/services/budgetComparisonReportCalculations.js +++ b/app/reports/budgetComparison/services/budgetComparisonReportCalculations.js @@ -234,17 +234,21 @@ class BudgetComparisonReportCalculations { }; sectionGroupCosts.ids.forEach(function(sectionGroupCostId) { - var sectionGroupCost = sectionGroupCosts.list[sectionGroupCostId]; + var sectionGroupCost = sectionGroupCosts.list[sectionGroupCostId]; + + // TA default is 50, reader default is 25 + var taApptAdjustment = sectionGroupCost.taAppointmentPercentage ? (sectionGroupCost.taAppointmentPercentage / 50) : 1; + var readerApptAdjustment = sectionGroupCost.readerAppointmentPercentage ? (sectionGroupCost.readerAppointmentPercentage / 25) : 1; if (sectionGroupCost.budgetScenarioId != selectedScenarioId || sectionGroupCost.disabled) { return; } if (activeTerms.indexOf(sectionGroupCost.termCode.slice(-2)) == -1) { return; } supportCosts.taCount += sectionGroupCost.taCount || 0; - supportCosts.readerCount += sectionGroupCost.readerCount || 0; - }); + supportCosts.readerCount += sectionGroupCost.readerCount || 0; - supportCosts.taCost = supportCosts.taCount * budget.taCost; - supportCosts.readerCost = supportCosts.readerCount * budget.readerCost; + supportCosts.taCost += sectionGroupCost.taCount * budget.taCost * taApptAdjustment; + supportCosts.readerCost += sectionGroupCost.readerCount * budget.readerCost * readerApptAdjustment; + }); supportCosts.totalCount += supportCosts.taCount + supportCosts.readerCount; supportCosts.totalCost += supportCosts.taCost + supportCosts.readerCost; diff --git a/app/supportAssignment/directives/supportAssignmentTable/supportCoursesTab/courseHeader/courseHeader.html b/app/supportAssignment/directives/supportAssignmentTable/supportCoursesTab/courseHeader/courseHeader.html index e665fc050..a28e9cc20 100644 --- a/app/supportAssignment/directives/supportAssignmentTable/supportCoursesTab/courseHeader/courseHeader.html +++ b/app/supportAssignment/directives/supportAssignmentTable/supportCoursesTab/courseHeader/courseHeader.html @@ -1,54 +1,87 @@
-
- {{ sectionGroup.subjectCode }} {{ sectionGroup.courseNumber }} {{ sectionGroup.sequencePattern }} {{ sectionGroup.title }} -
+
+ {{ sectionGroup.subjectCode }} {{ sectionGroup.courseNumber }} + {{ sectionGroup.sequencePattern }} {{ sectionGroup.title }} +
- - - - - - - - - - - - - - - - - - - -
-
- TAs -
-
- - -
-
- Readers -
-
- - -
- Seats - - {{ sectionGroup.plannedSeats }} -
- Units - - {{ sectionGroup.units }} -
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ TAs +
+
+ + + +
Appt %
+
+
+ + +
+
+
+ Readers +
+
+ + + +
Appt %
+
+
+ + +
+
+ Seats + + {{ sectionGroup.plannedSeats }} +
+ Units + + {{ sectionGroup.units }} +
diff --git a/app/supportAssignment/services/supportActions.js b/app/supportAssignment/services/supportActions.js index 193e4ee1b..1d2b64f8c 100644 --- a/app/supportAssignment/services/supportActions.js +++ b/app/supportAssignment/services/supportActions.js @@ -102,6 +102,8 @@ class SupportActions { plannedSeats: sectionGroupDTO.plannedSeats, teachingAssistantAppointments: sectionGroupDTO.teachingAssistantAppointments, readerAppointments: sectionGroupDTO.readerAppointments, + taAppointmentPercentage: parseInt(sectionGroupDTO.taAppointmentPercentage), + readerAppointmentPercentage: parseInt(sectionGroupDTO.readerAppointmentPercentage), showTheStaff: sectionGroupDTO.showTheStaff, showPlaceholderAI: sectionGroupDTO.showPlaceholderAI }; @@ -128,13 +130,12 @@ class SupportActions { plannedSeats: sectionGroupDTO.plannedSeats, teachingAssistantAppointments: sectionGroupDTO.teachingAssistantAppointments, readerAppointments: sectionGroupDTO.readerAppointments, + taAppointmentPercentage: parseInt(sectionGroupDTO.taAppointmentPercentage), + readerAppointmentPercentage: parseInt(sectionGroupDTO.readerAppointmentPercentage), showTheStaff: sectionGroupDTO.showTheStaff, showPlaceholderAI: sectionGroupDTO.showPlaceholderAI }; - - sectionGroup.teachingAssistantAppointments = sectionGroupDTO.teachingAssistantAppointments; - - + SupportService.updateSectionGroup(sectionGroup).then(function() { $rootScope.$emit('toast', { message: "Updated Teaching Assistants", type: "SUCCESS" }); SupportReducer.reduce({