diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 5b05cf961..42916b47f 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -265,7 +265,7 @@ export default { } this.dispatchStoreAction(this.storeActions.SAVE_VAPS, this.selectedVaps, false); - this.dispatchStoreAction(this.storeActions.SAVE_PROMOS, this.newValidatedPromos, false); + this.dispatchStoreAction(this.storeActions.SAVE_PROMOS, this.allActivePromos, false); const payment = this.$store.getters.payment; if (payment.isInsurance) { diff --git a/src/store/index.js b/src/store/index.js index 7f4cb956d..87221dbc3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -499,10 +499,12 @@ export const mutations = { state.order.lineItems.glassParts = sessionInformation.order.lineItems.glassParts; state.order.lineItems.supportingItems = sessionInformation.order.lineItems.supportingItems; state.order.lineItems.vaps = sessionInformation.order.lineItems.vaps; + state.order.lineItems.promos = sessionInformation.order.lineItems.promos; state.order.lineItems.serverData = sessionInformation.order.lineItems.serverData; state.order.payment.parentAccountNumber = sessionInformation.order.payment.parentAccountNumber; + state.order.payment.inactivePromos = sessionInformation.order.payment.inactivePromos; state.order.serviceLocation.address = sessionInformation.order.serviceLocation.streetAddress; @@ -2241,6 +2243,7 @@ export const actions = { addGuidToLineItemsIfNotAlreadyThere(addableVaps); const requestObject = { promoCode: promoCode, + addableVaps: addableVaps, order: { appointmentType: order.serviceLocation.appointmentType, carId: order.vehicle.carId, @@ -2249,7 +2252,6 @@ export const actions = { isRepair: order.damage.isRepair, glassToReplace: renameGlassToReplaceAttributes(order.damage.glassToReplace), lineItemsOnOrder: getArrayOfAllLineItems(order.lineItems), - addableVaps: addableVaps, parentAccountNumber: order.payment.parentAccountNumber, referralSequenceNumber: order.referralSequenceNumber, serviceState: order.serviceLocation.state, @@ -2270,10 +2272,12 @@ export const actions = { pageNameToLog: pageNameToLog, }); - context.commit( - storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA, - validateResponse.data.lineItemsServerData - ); + if (validateResponse?.data?.serverData) { + context.commit( + storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA, + validateResponse.data.serverData + ); + } return validateResponse; },