Merge pull request #1447 from Safelite/feature/skiener/CSR-1656

CSR-1656 | Store promo information from load-session
This commit is contained in:
scottkiener 2023-10-24 10:51:52 -04:00 committed by GitHub
commit 38557f7477
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -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) {

View file

@ -2243,6 +2243,7 @@ export const actions = {
addGuidToLineItemsIfNotAlreadyThere(addableVaps);
const requestObject = {
promoCode: promoCode,
addableVaps: addableVaps,
order: {
appointmentType: order.serviceLocation.appointmentType,
carId: order.vehicle.carId,
@ -2251,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,
@ -2272,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;
},