From f7715b35e5b861f44275a35ad3e26bc2b9875b7f Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 24 Oct 2023 10:12:57 -0400 Subject: [PATCH] CSR-1656 | Front end promo bug fixes Don't save empty serverData to store Save all promos on quote page nav --- src/layouts/quote/quote.vue | 2 +- src/store/index.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) 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 158dc0c54..d52ded426 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2271,10 +2271,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; },