diff --git a/app/scripts/controllers/eventDetails.js b/app/scripts/controllers/eventDetails.js index 0780cbdc1..d8068a917 100644 --- a/app/scripts/controllers/eventDetails.js +++ b/app/scripts/controllers/eventDetails.js @@ -912,6 +912,16 @@ angular }); }); const payload = angular.copy($scope.conference); + // Remove unwanted properties from sending to API. + payload.registrantTypes = payload.registrantTypes.map((regType) => { + regType.allowedRegistrantTypeSet = + regType.allowedRegistrantTypeSet.map((set) => { + delete set.name; + delete set.selected; + return set; + }); + return regType; + }); $http({ method: 'PUT', url: 'conferences/' + conference.id, diff --git a/app/scripts/directives/blockEditor.js b/app/scripts/directives/blockEditor.js index 4bfe221ad..1ea7b5c20 100644 --- a/app/scripts/directives/blockEditor.js +++ b/app/scripts/directives/blockEditor.js @@ -178,12 +178,9 @@ angular.module('confRegistrationWebApp').directive('blockEditor', function () { $scope.typeToProfile.addressQuestion = 'ADDRESS'; $scope.typeToProfile.genderQuestion = 'GENDER'; $scope.typeToProfile.yearInSchoolQuestion = 'YEAR_IN_SCHOOL'; - $scope.typeToProfile.opportunitiesQuestion = 'OPPORTUNITIES'; $scope.typeToProfile.birthDateQuestion = 'BIRTH_DATE'; $scope.typeToProfile.campusQuestion = 'CAMPUS'; $scope.typeToProfile.dormitoryQuestion = 'DORMITORY'; - $scope.typeToProfile.graduationDateQuestion = 'GRADUATION_DATE'; - $scope.typeToProfile.ethnicityQuestion = 'ETHNICITY'; $scope.profileCheck = !_.isNull($scope.block.profileType); $scope.profileOption = _.has($scope.typeToProfile, $scope.block.type); diff --git a/test/spec/directives/blockEditor.spec.js b/test/spec/directives/blockEditor.spec.js index ecf2084c3..58127c1de 100644 --- a/test/spec/directives/blockEditor.spec.js +++ b/test/spec/directives/blockEditor.spec.js @@ -76,15 +76,4 @@ describe('Directive: blockEditor', function () { expect(scope.pType).toBe('Sex'); }); - - it('returns whether a question type exists or not using eventHasQuestionType()', function () { - const block = _.find(testData.conference.registrationPages[1].blocks, { - id: '9b83eebd-b064-4edf-92d0-7982a330272a', - }); - scope.block = block; - - expect(scope.eventHasQuestionType('genderQuestion')).toBe(true); - - expect(scope.eventHasQuestionType('ethnicityQuestion')).toBe(false); - }); });