From 1e9d3f7a4d070eed77fb91cd8a80734bcb170e14 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 17 Oct 2023 10:57:19 -0400 Subject: [PATCH] Add payment-method resetting --- src/constants/store-mutations.js | 1 + .../add-vaps-modal-buttons/add-vaps-modal-buttons.vue | 4 ++-- src/store/index.js | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index f4a43e91f..f5f2ca432 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -69,6 +69,7 @@ const storeMutations = { RESET_SERVICE_LOCATION_PROVIDER: "resetServiceLocationProvider", RESET_SERVICE_LOCATION_MOBILE_ADDRESS: "resetServiceLocationMobileAddress", RESET_SCHEDULE: "resetSchedule", + RESET_PAYMENT_METHOD_CHOICE: "resetPaymentMethodChoice", // OTHER MUTATIONS UPDATE_PAGE_DATA: "updatePageData", diff --git a/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue b/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue index d894f2ee8..7549bb69b 100644 --- a/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue +++ b/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue @@ -93,8 +93,8 @@ export default { } if (this.showAddRainDefense) { const answer = getAnswer("ADD RAIN DEFENSE", this.answersCmsData); - answer.SubText = "+$" + this.rainDefensePrice; - answers.push(answer); + //answer.SubText = "+$" + this.rainDefensePrice; + //answers.push(answer); } return answers; diff --git a/src/store/index.js b/src/store/index.js index 639f9d77c..0b0f684eb 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -423,6 +423,10 @@ export const mutations = { state.order.serviceLocation.state = null; state.order.serviceLocation.isVehicleProtected = null; }, + resetPaymentMethodChoice(state) { + state.order.payment.isPia = null; + state.order.payment.piaType = null; + }, // Misc Mutations updateStateWithOrderInformation(state, sessionInformation) { state.order.referralNumber = sessionInformation.order.referralNumber; @@ -893,6 +897,7 @@ export const actions = { context.commit(storeMutations.RESET_SERVICE_LOCATION_PROVIDER); context.commit(storeMutations.RESET_SCHEDULE); + context.commit(storeMutations.RESET_PAYMENT_METHOD_CHOICE); }, resetState(context) { @@ -2017,6 +2022,8 @@ export const actions = { savePaymentType(context, isInsurance) { context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance); + + context.commit(storeMutations.RESET_PAYMENT_METHOD_CHOICE); }, savePaymentMethodChoice(context, paymentMethod) { @@ -2294,6 +2301,7 @@ export const actions = { context.state.order.serviceLocation.appointmentType ) { context.commit(storeMutations.RESET_SCHEDULE); + context.commit(storeMutations.RESET_PAYMENT_METHOD_CHOICE); } }