diff --git a/src/store/index.js b/src/store/index.js index 1a9126b5..f0fba796 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -14,6 +14,7 @@ import coverageStatuses from '@/constants/coverage-statuses'; import { deepEqual } from '@/helpers/object-helper'; import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from '@/constants/schedule-constants'; import getDateDifferenceInDays from '@/helpers/date-helper'; +import endorsementOptions from '@/constants/endorsement-options'; const storeId = 'main'; @@ -517,6 +518,15 @@ export const useMainStore = defineStore({ } }); } + const endorsementsAdditionalInfo = { + schoolProperty: '', + parkingLot: '' + }; + if (endorsementAnswersForPayload.includes(endorsementOptions.EDUCATOR && endorsementOptions.PARKING_GUARD)) { + endorsementsAdditionalInfo.schoolProperty = 'Yes'; + endorsementsAdditionalInfo.parkingLot = 'Yes'; + } + const orderItemsArray = []; const manuaGlassNamesArray = []; const glassInformation = this.order.damage.glassToReplace; @@ -543,6 +553,7 @@ export const useMainStore = defineStore({ referralCorrelationId: this.order.referralCorrelationId, referralNumber: this.order.referralNumber, accountNumber: this.issConfig.parentAccountNumber?.toString() ?? '', + additionalInfo: endorsementsAdditionalInfo, insured: { address: { state: this.order.customer.address.state