From 8e2178c4350e33a7b4614190ae1a2e0e5a804451 Mon Sep 17 00:00:00 2001 From: Katie Date: Thu, 10 Nov 2022 16:04:48 -0500 Subject: [PATCH] CSR-747 Send isInsurance to saveSession --- src/constants/store-actions.js | 1 + src/constants/store-mutations.js | 2 ++ src/layouts/quote/quote.vue | 11 +++++++++-- src/store/index.js | 3 +++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 78053b567..3ab710f6a 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -61,6 +61,7 @@ const storeActions = { "resetMoldingAndCapabilityQuestionAnswersIfNeeded", SAVE_MOLDING_QUESTION_ANSWERS: "saveMoldingQuestionAnswers", SAVE_CAPABILITY_QUESTION_ANSWERS: "saveCapabilityQuestionAnswers", + SAVE_IS_INSURANCE: "saveIsInsurance", }; export { storeActions }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index dc165eecf..ea1a44f38 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -36,6 +36,8 @@ const storeMutations = { UPDATE_CUSTOMER_EMAIL_ADDRESS: "updateCustomerEmailAddress", + UPDATE_IS_INSURANCE: "updateIsInsurance", + // ORDER MUTATIONS UPDATE_REFERRAL_NUMBER: "updateReferralNumber", UPDATE_REFERRAL_DATE: "updateReferralDate", diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 4fb3ba356..b68715983 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -57,10 +57,11 @@ import textBlock from "@/common-components/text-block/text-block"; import modal from "@/common-components/modal/modal"; import baseMixin from "@/mixins/base-mixin.js"; import vehicleQuestionsMixin from "../../mixins/vehicle-questions-mixin"; +import { storeActions } from "@/constants/store-actions"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { Form } from "vee-validate"; -import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper" +import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; export default { name: "quote", @@ -161,8 +162,14 @@ export default { vehicleQuestionsMixin.methods.backButtonAction(this); }, forwardButtonAction() { + // TODO KO if VAPS package is not selected, return + + // TODO KO is VAPS package is selected, add the items as needed + + this.dispatchStoreAction(storeActions.SAVE_IS_INSURANCE, this.isInsuranceSelected); + navigateToHeritageFunnel(); - } + }, }, components: { funnelHeader, diff --git a/src/store/index.js b/src/store/index.js index d7b13415f..3e6889c01 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1334,6 +1334,9 @@ export const actions = { clearVin(context) { context.commit(storeMutations.UPDATE_VEHICLE_VIN, null); }, + saveIsInsurance(context, isInsurance) { + context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance); + } }; export default createStore({