diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index 2a6119681..43b471e81 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -15,6 +15,10 @@ data-bs-target="#footerModal" data-bs-dismiss="modal" /> + +
+ +
@@ -191,7 +192,9 @@ export default { ).parts = partFromCapabilityQuestionAnswer; } - this.navigateForward(partsOrQuestions); + // this.navigateForward(partsOrQuestions); + // TODO KO delete after quote MVP + this.navigateForward(partsOrQuestions, null, this.shouldGoToHeritageQuote); }, handleAnswerUpdates(answer) { // only runs when all questions in a question-chain have been answered diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index a45df25b7..89b617b3c 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -28,6 +28,7 @@ ref="funnelFooter" cmsWidgetName="FunnelFooterWidget" :isForwardActionDisabled="!meta.valid" + @tempButtonClicked="() => handleTempButtonClicked(this)" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" /> @@ -168,7 +169,9 @@ export default { ]; } - this.navigateForward(partsOrQuestions); + // this.navigateForward(partsOrQuestions); + // TODO KO delete after quote MVP + this.navigateForward(partsOrQuestions, null, this.shouldGoToHeritageQuote); }, handleAnswerUpdates(answer) { // only runs when all questions in a question-chain have been answered diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index d72d84c06..e0dda08fc 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -28,6 +28,7 @@ ref="funnelFooter" cmsWidgetName="FunnelFooterWidget" :isForwardActionDisabled="!meta.valid" + @tempButtonClicked="() => handleTempButtonClicked(this)" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" /> @@ -155,7 +156,9 @@ export default { const glassPiecePartsForStore = partsLookup.data.glassPieceParts; - this.navigateForward(glassPiecePartsForStore); + // this.navigateForward(glassPiecePartsForStore); + // TODO KO delete after quote MVP + this.navigateForward(glassPiecePartsForStore, null, this.shouldGoToHeritageQuote); }, handleAnswerUpdates(answer) { // only runs when all questions in a question-chain have been answered diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index e59b77804..18a076b70 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -34,6 +34,7 @@ cmsWidgetName="FunnelFooterWidget" ref="funnelFooter" :isForwardActionDisabled="isForwardActionDisabled" + @tempButtonClicked="() => handleTempButtonClicked(this)" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" /> @@ -186,8 +187,10 @@ export default { false ); + // TODO KO delete after quote MVP + this.navigateForward(matchedParts, null, this.shouldGoToHeritageQuote); // Navigate to the next page - this.navigateForward(matchedParts); + // this.navigateForward(matchedParts); }, LoadInitialPartsData() { diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 7c356e793..d2934fe3c 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -99,6 +99,7 @@ cmsWidgetName="FunnelFooterWidget" ref="funnelFooter" :isForwardActionDisabled="!meta.valid" + @tempButtonClicked="() => handleTempButtonClicked(this)" @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" /> diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 92821da96..a790d3ccf 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -8,6 +8,11 @@ import baseMixin from "@/mixins/base-mixin.js"; import store from "@/store"; export default { + data() { // TODO KO DELETE AFTER QUOTE MVP + return { + shouldGoToHeritageQuote: false, + }; + }, methods: { hasPartQuestions(partsOrQuestions) { return partsOrQuestions?.some((pq) => pq.partQuestions?.length > 0); @@ -149,8 +154,9 @@ export default { return glass; }, + // TODO KO Delete `shouldGoToHeritageQuote` // Can't use `this` because navigateForward is also called from vin-pages-mixin - async navigateForward(partsOrQuestions, vm) { + async navigateForward(partsOrQuestions, vm, shouldGoToHeritageQuote) { const self = vm ?? this; const currentPage = self.$route.query.fmgPage; @@ -243,7 +249,7 @@ export default { // save to store lineItems.glassParts self.$store.commit(storeMutations.UPDATE_GLASS_PARTS, collectedGlassParts); - self.$router.navigateWithSaving( + shouldGoToHeritageQuote ? navigateToHeritageFunnel() : self.$router.navigateWithSaving( self.navigationScenarios.HAS_NO_MORE_QUESTIONS, self.$route ); @@ -295,5 +301,10 @@ export default { self.$router.navigateWithoutSaving(backNavigationScenario, self.$route); }, + // TODO KO delete this after quote mvp + async handleTempButtonClicked(vm) { + this.shouldGoToHeritageQuote = true; + // await vm.forwardButtonAction(); + }, }, }; diff --git a/src/mixins/vin-pages-mixin.js b/src/mixins/vin-pages-mixin.js index e6e41aad5..a3cd2ecb2 100644 --- a/src/mixins/vin-pages-mixin.js +++ b/src/mixins/vin-pages-mixin.js @@ -4,6 +4,11 @@ import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin"; import { saveSession } from "@/helpers/heritage-integration/order-helper.js"; export default { + data() { // TODO KO DELETE AFTER QUOTE MVP + return { + shouldGoToHeritageQuote: false, + }; + }, methods: { async navigateForwardWithSingleCarMatch() { // If we have not already saved a session, we need to save one now before the lengthy call to getPartsOrQuestions @@ -14,7 +19,13 @@ export default { const result = await this.dispatchStoreAction(storeActions.GET_PARTS_OR_QUESTIONS); const partsOrQuestions = result.data.partsOrQuestions; - vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this); + // TODO KO delete `this.shouldGoToHeritageQuote` + vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this, this.shouldGoToHeritageQuote); + }, + // TODO KO delete this after quote mvp + async handleTempButtonClicked(vm) { + this.shouldGoToHeritageQuote = true; + await vm.forwardButtonAction(); }, }, };