CSR-748 Add temp heritage button
This commit is contained in:
parent
b402894b0b
commit
10c1675245
8 changed files with 46 additions and 7 deletions
|
|
@ -15,6 +15,10 @@
|
|||
data-bs-target="#footerModal"
|
||||
data-bs-dismiss="modal" />
|
||||
</div>
|
||||
<!-- TODO KO DELETE FOR QUOTE MVP -->
|
||||
<div class="col-auto">
|
||||
<button @click="$emit('tempButtonClicked')">Heritage</button>
|
||||
</div>
|
||||
<div v-if="!isBackButtonHidden" class="col-auto link-col py-1 text-break">
|
||||
<textLink
|
||||
linkType="navigation"
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
ref="funnelFooter"
|
||||
cmsWidgetName="FunnelFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@tempButtonClicked="() => handleTempButtonClicked(this)"
|
||||
@back-clicked="backButtonAction"
|
||||
@ForwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
ref="funnelFooter"
|
||||
cmsWidgetName="FunnelFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@tempButtonClicked="() => handleTempButtonClicked(this)"
|
||||
@back-clicked="backButtonAction"
|
||||
@ForwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
ref="funnelFooter"
|
||||
cmsWidgetName="FunnelFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@tempButtonClicked="() => handleTempButtonClicked(this)"
|
||||
@back-clicked="backButtonAction"
|
||||
@ForwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
cmsWidgetName="FunnelFooterWidget"
|
||||
ref="funnelFooter"
|
||||
:isForwardActionDisabled="isForwardActionDisabled"
|
||||
@tempButtonClicked="() => handleTempButtonClicked(this)"
|
||||
@back-clicked="backButtonAction"
|
||||
@ForwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@
|
|||
cmsWidgetName="FunnelFooterWidget"
|
||||
ref="funnelFooter"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@tempButtonClicked="() => handleTempButtonClicked(this)"
|
||||
@back-clicked="backButtonAction"
|
||||
@ForwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue