From 69a746d717317ffc8c6bc04dc424594395d1564b Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Wed, 1 Nov 2023 16:28:30 -0400 Subject: [PATCH] add additionalInfo to paylod when both endorsements are present --- src/store/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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