add additionalInfo to paylod when both endorsements are present
This commit is contained in:
parent
93ff9b718e
commit
69a746d717
1 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue