reference endorsement constants

This commit is contained in:
Katie Kroell 2023-10-19 14:02:29 -04:00
parent 790db50814
commit 7bbc20cd14

View file

@ -67,6 +67,8 @@ import settleAllPromises from '@/helpers/layout-helper';
import { Form } from 'vee-validate';
import BaseFormMixin from '@/mixins/base-form-mixin.js';
import globalRules from '@/constants/global-rules.js';
import endorsementOptions from '@/constants/endorsement-options.js';
import { useMainStore } from '@/store';
export default {
@ -126,10 +128,10 @@ export default {
return this.getCmsContent('ParkingLotQuestion', 'Answers');
},
educatorEndorsement() {
return useMainStore().order.policy.endorsements?.includes('Educator') ?? false;
return useMainStore().order.policy.endorsements?.includes(endorsementOptions.EDUCATOR) ?? false;
},
parkingGuardEndorsement() {
return useMainStore().order.policy.endorsements?.includes('Parking Guard') ?? false;
return useMainStore().order.policy.endorsements?.includes(endorsementOptions.PARKING_GUARD) ?? false;
}
},
methods:
@ -142,7 +144,7 @@ export default {
if (this.educatorEndorsement) {
this.questionAnswersArray.push({
questionNum: 1,
endorsement: 'Educator',
endorsement: endorsementOptions.EDUCATOR,
questionText: this.schoolPropertyQuestionText,
selectedAnswer: this.schoolPropertyAnswer
});
@ -150,7 +152,7 @@ export default {
if (this.parkingGuardEndorsement) {
this.questionAnswersArray.push({
questionNum: 2,
endorsement: 'Parking Guard',
endorsement: endorsementOptions.PARKING_GUARD,
questionText: this.parkingLotQuestionText,
selectedAnswer: this.parkingLotAnswer
});