Skip to content

Commit

Permalink
StudentSupportForm: Fixing errors in confirm eligibility module #1450
Browse files Browse the repository at this point in the history
  • Loading branch information
ltwheeler committed Nov 28, 2017
1 parent 187a457 commit 7fb7ba6
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div ng-show="view.state.supportCallResponse.collectEligibilityConfirmation" class="student-requirement">
<div class="student-requirement" ng-show="props.supportCallResponse.collectEligibilityConfirmation">
<h4>TA Eligibility Requirements</h4>
<div style="margin-top: 34px;">
<div>
<p>
Full-time (12 units) registered graduate student, current cumulative GPA is 3.00 or higher, total appointments for this quarter does not exceed 75%,
</p>
</div>
<div class="checkbox religibility-checkbox">
<div role="menuitem" ng-click="toggleEligibilityConfirmed()">
<div class="checkbox checkbox-replace color-primary neon-cb-replacement"
ng-class="{ 'checked': view.state.supportCallResponse.eligibilityConfirmed }">
ng-class="{ 'checked': props.supportCallResponse.eligibilityConfirmed }">
<label class="cb-wrapper">
<div class="checked"></div>
</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("confirmEligible", this.confirmEligible = function () {
instructionalSupportApp.directive("confirmEligible", this.confirmEligible = function () {
return {
restrict: 'E',
templateUrl: 'confirmEligible.html',
Expand All @@ -7,16 +7,23 @@ summaryApp.directive("confirmEligible", this.confirmEligible = function () {
state: '<'
},
link: function (scope, element, attrs) {
scope.props = {};
scope.mapStateToProps(scope.state);

$rootScope.$on('supportStaffFormStateChanged', function (event, data) {
scope.mapStateToProps(data);
});

scope.mapStateToProps = function(state) {
return state;
scope.props.supportCallResponse = state.supportCallResponse;
scope.props.supportCallResponse.eligibilityConfirmed = Boolean(scope.props.supportCallResponse.eligibilityConfirmed);
};

scope.toggleEligibilityConfirmed = function() {
scope.props.supportCallResponse.eligibilityConfirmed = !scope.props.supportCallResponse.eligibilityConfirmed;

studentActions.updateSupportCallResponse(scope.props.supportCallResponse);
};

scope.props = {};
scope.mapStateToProps(scope.state);
}
};
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("confirmEligible", this.confirmEligible = function () {
instructionalSupportApp.directive("confirmEligible", this.confirmEligible = function () {
return {
restrict: 'E',
templateUrl: 'confirmEligible.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("crnAvailable", this.crnAvailable = function () {
instructionalSupportApp.directive("crnAvailable", this.crnAvailable = function () {
return {
restrict: 'E',
templateUrl: 'crnAvailable.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("gridAvailable", this.gridAvailable = function () {
instructionalSupportApp.directive("gridAvailable", this.gridAvailable = function () {
return {
restrict: 'E',
templateUrl: 'gridAvailable.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("studentAvailabilities", this.studentAvailabilities = function () {
instructionalSupportApp.directive("studentAvailabilities", this.studentAvailabilities = function () {
return {
restrict: 'E',
templateUrl: 'studentAvailabilities.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("studentComments", this.studentComments = function () {
instructionalSupportApp.directive("studentComments", this.studentComments = function () {
return {
restrict: 'E',
templateUrl: 'studentComments.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("studentFormReview", this.studentFormReview = function () {
instructionalSupportApp.directive("studentFormReview", this.studentFormReview = function () {
return {
restrict: 'E',
templateUrl: 'studentFormReview.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
* Provides the main course table in the Courses View
*/
instructionalSupportApp.directive("studentPreferenceSelector", this.studentPreferenceSelector = function ($rootScope, instructionalSupportAssignmentActionCreators) {
return {
restrict: 'E',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("studentPreferences", this.studentPreferences = function () {
instructionalSupportApp.directive("studentPreferences", this.studentPreferences = function () {
return {
restrict: 'E',
templateUrl: 'studentPreferences.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summaryApp.directive("teachingQualifications", this.teachingQualifications = function () {
instructionalSupportApp.directive("teachingQualifications", this.teachingQualifications = function () {
return {
restrict: 'E',
templateUrl: 'teachingQualifications.html',
Expand Down

0 comments on commit 7fb7ba6

Please sign in to comment.