From 00f5092dc13ae97d8a20d9b89314bb9cdc6ce6af Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 10 Aug 2022 13:46:43 -0400 Subject: [PATCH 01/11] Added flag to 'navigate' method so that we can specify that the order by saved in the .afterEach method of the router. Added new 'navigateWithSaving' and 'navigateWithoutSaving' to allow us to control when the order is saved. --- src/layouts/address-lookup/address-lookup.vue | 6 +++--- .../address-vehicles/address-vehicles.vue | 4 ++-- .../capability-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 8 +++---- .../license-plate-lookup.vue | 4 ++-- .../molding-questions/molding-questions.vue | 4 ++-- src/layouts/part-questions/part-questions.vue | 8 +++---- src/layouts/reveal/reveal.vue | 2 +- src/layouts/vehicle-damage/vehicle-damage.vue | 6 +++--- src/layouts/vehicle-make/vehicle-make.vue | 4 ++-- src/layouts/vehicle-model/vehicle-model.vue | 4 ++-- src/layouts/vehicle-parts/vehicle-parts.vue | 6 +++--- src/layouts/vehicle-style/vehicle-style.vue | 4 ++-- src/layouts/vehicle-year/vehicle-year.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 6 +++--- src/mixins/vin-pages-mixin.js | 8 +++---- src/router/index.js | 21 ++++++++++++------- 17 files changed, 53 insertions(+), 46 deletions(-) diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index cbbfe0323..ed1ffd3db 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -140,7 +140,7 @@ export default { }, backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -309,11 +309,11 @@ export default { // If a different vehicle is found than the one entered and the selected glass is not available for that vehicle then navigate back to "vehicle-damage" // display vehicle changed alert on that page. if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle && matchingCars.length === 1) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, {[routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true}); + this.$router.navigateWithSaving(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, {[routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true}); } else if (matchingCars.length === 1) { await this.navigateForwardWithSingleCarMatch(); } else { - this.$router.navigate(this.navigationScenarios.CONTINUING_WITH_MULTIPLE_VEHICLES, this.$route, {}, {}, carsFound); + this.$router.navigateWithSaving(this.navigationScenarios.CONTINUING_WITH_MULTIPLE_VEHICLES, this.$route, {}, {}, carsFound); } }, diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue index b0669e720..081b83fe9 100644 --- a/src/layouts/address-vehicles/address-vehicles.vue +++ b/src/layouts/address-vehicles/address-vehicles.vue @@ -162,7 +162,7 @@ export default { return false; }, backButtonAction() { - this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); }, async forwardButtonAction() { @@ -184,7 +184,7 @@ export default { }, async navigateForward() { if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD,this.$route,{},{[routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true },); + this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD,this.$route,{},{[routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true },); } else { await this.navigateForwardWithSingleCarMatch(); } diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index 69fc8aad5..8b6eb127c 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -122,7 +122,7 @@ export default { }, backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 3949d4c41..956e9d8bb 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -87,7 +87,7 @@ export default { }, backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -95,19 +95,19 @@ export default { async forwardButtonAction() { if (this.selectedVinLookupMethod === vinLookupMethodSelections.MANUALVIN) { await this.dispatchStoreAction(storeActions.CLEAR_VIN); - return this.$router.navigate( + return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_MANUAL_VIN, this.$route ); } if (this.selectedVinLookupMethod === vinLookupMethodSelections.LICENSEPLATE) { - return this.$router.navigate( + return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_LICENSE_PLATE, this.$route ); } if (this.selectedVinLookupMethod === vinLookupMethodSelections.HOMEADDRESS) { - return this.$router.navigate( + return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_HOME_ADDRESS, this.$route ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 667bac7fc..1b163ef30 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -177,7 +177,7 @@ export default { }, backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -298,7 +298,7 @@ export default { }, async navigateForward() { if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); + this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); } else { await this.navigateForwardWithSingleCarMatch(); } diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index d2b469a36..eb1da755b 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -125,7 +125,7 @@ export default { }, backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -156,7 +156,7 @@ export default { if (hasCapabilityQuestions) { // if has capability questions // go to capability-questions page - this.$router.navigate(this.navigationScenarios.HAS_CAPABILITY_QUESTIONS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); + this.$router.navigateWithSaving(this.navigationScenarios.HAS_CAPABILITY_QUESTIONS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); } else { // if single parts only const collectedGlassParts = this.reducedGlassPartsArray(glassNameAndPartsForStore); diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index db237ce2b..4d10d1b98 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -121,7 +121,7 @@ export default { }, backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -155,15 +155,15 @@ export default { if (hasGlassLocationWithMultipleParts) { // if multiple parts on any glass // go to vehicle-parts page and pass the partsData - this.$router.navigate(this.navigationScenarios.ANSWERED_QUESTIONS_WITH_MULTIPLE_PARTS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); + this.$router.navigateWithSaving(this.navigationScenarios.ANSWERED_QUESTIONS_WITH_MULTIPLE_PARTS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); } else if (hasChildPartQuestions) { // if any childpart questions // go to molding-questions page and pass the partsData - this.$router.navigate(this.navigationScenarios.HAS_MOLDING_QUESTIONS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); + this.$router.navigateWithSaving(this.navigationScenarios.HAS_MOLDING_QUESTIONS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); } else if (hasCapabilityQuestions) { // if has capability questions // go to capability-questions page and pass the partsData - this.$router.navigate(this.navigationScenarios.HAS_CAPABILITY_QUESTIONS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); + this.$router.navigateWithSaving(this.navigationScenarios.HAS_CAPABILITY_QUESTIONS,this.$route,{},{},{partsOrQuestions: glassNameAndPartsForStore}); } else { // if single parts only const collectedGlassParts = this.reducedGlassPartsArray(glassNameAndPartsForStore); diff --git a/src/layouts/reveal/reveal.vue b/src/layouts/reveal/reveal.vue index 4280b099f..9ef10d61d 100644 --- a/src/layouts/reveal/reveal.vue +++ b/src/layouts/reveal/reveal.vue @@ -40,7 +40,7 @@ export default { methods: { backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 7d61814f8..233107c20 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -170,7 +170,7 @@ export default { backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -293,10 +293,10 @@ export default { // If vin already exists, navigate directly to vin-lookup if(store.getters.vehicle.vin) { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route); + this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route); } else { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN, this.$route); + this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN, this.$route); } }, diff --git a/src/layouts/vehicle-make/vehicle-make.vue b/src/layouts/vehicle-make/vehicle-make.vue index 8cd77c545..83361fe98 100644 --- a/src/layouts/vehicle-make/vehicle-make.vue +++ b/src/layouts/vehicle-make/vehicle-make.vue @@ -70,7 +70,7 @@ export default { methods: { backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -86,7 +86,7 @@ export default { watch: { selectedMake(make) { this.dispatchStoreAction(storeActions.SAVE_VEHICLE_MAKE, make, false); - this.$router.navigate( + this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_MAKE, this.$route ); diff --git a/src/layouts/vehicle-model/vehicle-model.vue b/src/layouts/vehicle-model/vehicle-model.vue index 455f3d8b3..2db7e34c8 100644 --- a/src/layouts/vehicle-model/vehicle-model.vue +++ b/src/layouts/vehicle-model/vehicle-model.vue @@ -71,7 +71,7 @@ export default { methods: { backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -87,7 +87,7 @@ export default { watch: { selectedModel(model) { this.dispatchStoreAction(storeActions.SAVE_VEHICLE_MODEL, model, false); - this.$router.navigate( + this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_MODEL, this.$route ); diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 27a92ddf4..02cb557a1 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -162,7 +162,7 @@ export default { const hasPartQuestions = this.hasPartQuestions(this.$store.getters.pageData(fmgPageValues.PART_QUESTIONS)?.partsOrQuestions); const backNavigationScenario = hasPartQuestions ? this.navigationScenarios.CLICKED_BACK_WITH_PART_QUESTION_ANSWERS : this.navigationScenarios.CLICKED_BACK_WITHOUT_PART_QUESTION_ANSWERS; - this.$router.navigate( + this.$router.WithoutSaving( backNavigationScenario, this.$route ); @@ -203,7 +203,7 @@ export default { // Navigate to the next page if (hasChildPartQuestions) { - this.$router.navigate( + this.$router.navigateWithSaving( this.navigationScenarios.HAS_MOLDING_QUESTIONS, this.$route, {}, @@ -211,7 +211,7 @@ export default { {partsOrQuestions: matchedParts} ); } else if (hasCapabilityQuestions) { - this.$router.navigate( + this.$router.navigateWithSaving( this.navigationScenarios.HAS_CAPABILITY_QUESTIONS, this.$route, {}, diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue index 4587172e7..1b99f88a4 100644 --- a/src/layouts/vehicle-style/vehicle-style.vue +++ b/src/layouts/vehicle-style/vehicle-style.vue @@ -71,7 +71,7 @@ export default { methods: { backButtonAction() { // route to move backwards - this.$router.navigate( + this.$router.WithoutSaving( this.navigationScenarios.CLICKED_BACK, this.$route ); @@ -99,7 +99,7 @@ export default { selectedStyle(style) { this.dispatchStoreAction(storeActions.SAVE_VEHICLE_STYLE, style, false); this.setVehicle().then(() => { - this.$router.navigate( + this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_STYLE, this.$route ); diff --git a/src/layouts/vehicle-year/vehicle-year.vue b/src/layouts/vehicle-year/vehicle-year.vue index 4ef506eef..029234a14 100644 --- a/src/layouts/vehicle-year/vehicle-year.vue +++ b/src/layouts/vehicle-year/vehicle-year.vue @@ -88,7 +88,7 @@ export default { selectedYear(year) { const parsedYear = parseInt(year); this.dispatchStoreAction(storeActions.SAVE_VEHICLE_YEAR, parsedYear); - this.$router.navigate( + this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_YEAR, this.$route ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 84c17cfd9..21d06ff56 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -211,10 +211,10 @@ export default { }, backButtonAction() { if (this.$store.getters.vehicle.vin) { - this.$router.navigate(this.navigationScenarios.CLICKED_BACK_WITH_VIN, this.$route); + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK_WITH_VIN, this.$route); } else { - this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); } }, @@ -331,7 +331,7 @@ export default { }, async navigateForward(){ if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); + this.$router.navigateWithSaving(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); } else { await this.navigateForwardWithSingleCarMatch(); } diff --git a/src/mixins/vin-pages-mixin.js b/src/mixins/vin-pages-mixin.js index a7ba799a2..61aaeb7fc 100644 --- a/src/mixins/vin-pages-mixin.js +++ b/src/mixins/vin-pages-mixin.js @@ -17,16 +17,16 @@ export default { const hasCapabilityQuestions = this.hasCapabilityQuestions(partsOrQuestions); if (hasPartsQuestions) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, this.$route, {}, {}, result.data); + this.$router.navigateWithSaving(this.navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, this.$route, {}, {}, result.data); } else if (hasGlassLocationWithMultipleParts) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, this.$route, {}, {}, result.data); + this.$router.navigateWithSaving(this.navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, this.$route, {}, {}, result.data); } else if (hasChildPartQuestions) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, this.$route, {}, {}, result.data); + this.$router.navigateWithSaving(this.navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, this.$route, {}, {}, result.data); } else if (hasCapabilityQuestions) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, this.$route, {}, {}, result.data); + this.$router.navigateWithSaving(this.navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, this.$route, {}, {}, result.data); } else { // if single parts only diff --git a/src/router/index.js b/src/router/index.js index 525664dd5..368d9aff6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -127,6 +127,13 @@ router.afterEach((to, from) => { // Push page view to GA analyticsMixin.methods.pushPageViewToGA(to.query[queryStrings.FMG_PAGE]); + // If saving on navigation is requested, check for saved SessionId or EmailAddress to determine if saving is appropriate + if (eval(to.params.isSavingNavigation)) { + if (store.getters.applicationUser.savedSessionId || store.getters.order.customer?.emailAddress) { + saveOrder(); + } + } + baseMixin.methods.dispatchStoreAction(storeActions.GET_EXPERIMENTS_BY_USER, { userId: getDeviceIdValue() }) .then( (response) => { analyticsMixin.methods.pushExperimentsToDataLayer(response.data); @@ -134,10 +141,13 @@ router.afterEach((to, from) => { }); -router.navigate = (scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData) => { - navigate(scenario, currentRoute, optionalQuery, optionalParams, optionalPageData); +router.navigateWithoutSaving = (scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) => { + navigate(scenario, currentRoute, false, optionalQuery, optionalParams, optionalPageData); } +router.navigateWithSaving = (scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) => { + navigate(scenario, currentRoute, true, optionalQuery, optionalParams, optionalPageData); +} router.navigateToExternalUrl = (url, optionalQuery = {}) => { navigateToUrl(url, optionalQuery); @@ -146,7 +156,7 @@ router.navigateToExternalUrl = (url, optionalQuery = {}) => { // PRIVATE FUNCTIONS // Navigate to the next route, depending on the scenario. -async function navigate(scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData) { +async function navigate(scenario, currentRoute, isSavingNavigation, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) { if (!scenario) { console.error("No scenario provided. Please review the routing table."); return; @@ -164,10 +174,7 @@ async function navigate(scenario, currentRoute, optionalQuery = {}, optionalPara baseMixin.methods.savePageDataToStore(destinationFmgPageValue, optionalPageData); } - // if cookie and referralNumber/Date exists OR an emailAddress has been saved - if ((getFunnelCookie()?.ReferralNumber && getFunnelCookie()?.ReferralDate) || store.getters.order.customer?.emailAddress) { - saveOrder(); - } + optionalParams.isSavingNavigation = isSavingNavigation; router.push({ name: "root", From 53f1b6117681f826d8f242bda553751e370bdd0c Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Fri, 19 Aug 2022 10:37:07 -0400 Subject: [PATCH 02/11] CSR-108: remove no longer needed code block --- src/layouts/part-questions/part-questions.vue | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index bbd71fbd5..8082e42f7 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -207,9 +207,7 @@ export default { const thisAnsweredPartQuestion = glassPart.partQuestions[pqIndex]; // remove answerData from this glass part - // delete glassPart.answerData; glassPart.answerData = null; - // delete glassPart.isSuppressedPart; glassPart.isSuppressedPart = null; // Update the key to re-render this part's question-chain component @@ -440,55 +438,6 @@ export default { return part; }); - // this block is purely for handling duplicate questions - alreadyAnsweredQuestions?.forEach((savedPart, partIndex) => { - savedPart.answeredQuestions.forEach((aq) => { - if (aq.isDuplicateQuestion) { - // find this one in partsQuestionData - const dupedPartsQuestion = this.partsQuestionsData[partIndex].partQuestions[aq.questionNum - 1]; - dupedPartsQuestion.suppressDuplicateQuestion = true; - - const dupedPartsQuestionAnswer = dupedPartsQuestion.answers.filter((ans) => { - return ans.answerText.toUpperCase() === aq.selectedAnswerText.toUpperCase(); - })[0]; - - let isDupedPartsQuestionFirst; - if (aq.questionNum === 1) { isDupedPartsQuestionFirst = true } - - this.partsQuestionsData.forEach((glassPart, i) => { - - // loop through this glass part's part questions, looking for a questionText match - glassPart.partQuestions.forEach((pq, pqIndex) => { - // if this dupedQ is the first in the array then - // suppress all questions for this part up until the answer's nextQuestionSequence - if (isDupedPartsQuestionFirst && - dupedPartsQuestionAnswer.nextQuestionSequence && - pq.questionSequence < dupedPartsQuestionAnswer.nextQuestionSequence) { - pq.suppressDuplicateQuestion = true; - } - pq.answers.forEach((thisAns) => { - if (thisAns.nextQuestionSequence === aq.questionNum) { - // update either the nextQuestionSequence or the answerResult - if (dupedPartsQuestionAnswer.nextQuestionSequence) { - thisAns.originalNextQuestionSequence = thisAns.nextQuestionSequence; - thisAns.nextQuestionSequence = dupedPartsQuestionAnswer.nextQuestionSequence; - // update this change to answerSelected - pq.answerSelected = `${pq.questionSequence}|nextQuestion|${thisAns.nextQuestionSequence}|${thisAns.answerText}`; - } else { - thisAns.originalNextQuestionSequence = thisAns.nextQuestionSequence; - thisAns.nextQuestionSequence = null; - thisAns.originalAnswerResult = thisAns.originalAnswerResult || thisAns.answerResult; - thisAns.answerResult = dupedPartsQuestionAnswer.answerResult; - } - } - }) - }); - - }); - - } - }) - }); }, }, components: { From 813cd3400991db39e87af842913eeaddd52a70f3 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Fri, 19 Aug 2022 10:37:57 -0400 Subject: [PATCH 03/11] CSR-108: allow for cases where there is no damage state saved --- src/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index b8b5ffe16..359d9cb3b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -997,7 +997,7 @@ export const actions = { savePartQuestionAnswers(context, partQuestionAnswersArray) { // if part question answers have changed, reset subsequent question answers const previousResultsArray = context.getters.damage.partQuestionAnswers; - const havePartQuestionAnswersChanged = previousResultsArray.length !== partQuestionAnswersArray.length || + const havePartQuestionAnswersChanged = previousResultsArray?.length !== partQuestionAnswersArray.length || !previousResultsArray.every((x, i) => x.result === partQuestionAnswersArray[i].result); if (havePartQuestionAnswersChanged) { From 64e046dd006b5290f583f5d9dbdd7f11ef159ea2 Mon Sep 17 00:00:00 2001 From: Katie Date: Fri, 19 Aug 2022 11:31:52 -0400 Subject: [PATCH 04/11] CSR-748 Cleanup routing and navigation-scenarios --- src/mixins/vehicle-questions-mixin.js | 2 +- src/mixins/vehicle-questions-mixin.spec.js | 18 +++---- .../router-constants/navigation-scenarios.js | 23 +++++---- src/router/router-constants/routing-table.js | 48 ++++++++----------- 4 files changed, 41 insertions(+), 50 deletions(-) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 9164045c9..1e6330a60 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -114,7 +114,7 @@ export default { navigateToHeritageFunnel(); // For quote pages MVP release - // self.$router.navigate(self.navigationScenarios.ANSWERED_ALL_QUESTIONS, self.$route); + // self.$router.navigate(self.navigationScenarios.HAS_NO_MORE_QUESTIONS, self.$route); } }, backButtonAction() { diff --git a/src/mixins/vehicle-questions-mixin.spec.js b/src/mixins/vehicle-questions-mixin.spec.js index 13a2f083a..52b6ac787 100644 --- a/src/mixins/vehicle-questions-mixin.spec.js +++ b/src/mixins/vehicle-questions-mixin.spec.js @@ -193,7 +193,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); test("multiple glass locations have part questions => go to parts-questions", async () => { @@ -301,7 +301,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); test("multiple glass locations selected, one has part question => go to parts-questions", async () => { @@ -401,7 +401,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); test("a selected glass location has part questions and multiple parts => go to parts-questions", async () => { @@ -549,7 +549,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_PART_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); }); @@ -591,7 +591,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); test("multiple glass locations selected, one of them has multiple parts => go to vehicle parts", async () => { @@ -697,7 +697,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); test("multiple glass locations selected, multiple have multiple parts => go to vehicle-parts", async () => { @@ -869,7 +869,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); }); @@ -922,7 +922,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_MOLDING_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions }); }); }); @@ -957,7 +957,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledTimes(1); - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions, capabilityQuestions: [] }); + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(navigationScenarios.HAS_CAPABILITY_QUESTIONS, wrapper.vm.$route, {}, {}, { partsOrQuestions, capabilityQuestions: [] }); }); }); diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index 7cca25d09..25b749212 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -1,34 +1,33 @@ const navigationScenarios = { + // General + CLICKED_BACK: "CLICKED_BACK", + CLICKED_FORWARD: "CLICKED_FORWARD", + + // YMMS SELECTED_YEAR: "SELECTED_YEAR", SELECTED_MODEL: "SELECTED_MODEL", SELECTED_MAKE: "SELECTED_MAKE", SELECTED_STYLE: "SELECTED_STYLE", - CLICKED_BACK: "CLICKED_BACK", + + // Vin pages CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN", - CLICKED_FORWARD: "CLICKED_FORWARD", CLICKED_FORWARD_WITH_VIN: "CLICKED_FORWARD_WITH_VIN", - SELECTED_PARTS: "SELECTED_PARTS", - SELECTED_VIN_WITH_PART_QUESTIONS: "HAS_PART_QUESTIONS", - SELECTED_VIN_WITH_MULTIPLE_PARTS: "HAS_MULTIPLE_PARTS_TO_CHOOSE", - SELECTED_VIN_WITH_MOLDING_QUESTIONS: "HAS_MOLDING_QUESTIONS", - SELECTED_VIN_WITH_CAPABILITY_QUESTIONS: "HAS_CAPABILITY_QUESTIONS", - CONTINUING_WITH_SINGLE_PART: "CONTINUING_WITH_SINGLE_PART", + CLICKED_FORWARD_WITHOUT_VIN: "CLICKED_FORWARD_WITHOUT_VIN", CONTINUING_WITH_MULTIPLE_VEHICLES: "CONTINUING_WITH_MULTIPLE_VEHICLES", SELECTED_VIN_HAS_MISMATCHED_GLASS: "SELECTED_VIN_HAS_MISMATCHED_GLASS", - CLICKED_FORWARD_WITHOUT_VIN: "CLICKED_FORWARD_WITHOUT_VIN", SELECTED_MANUAL_VIN: "SELECTED_MANUAL_VIN", SELECTED_LICENSE_PLATE: "SELECTED_LICENSE_PLATE", SELECTED_HOME_ADDRESS: "SELECTED_HOME_ADDRESS", ANSWERED_QUESTIONS_WITH_SINGLE_PART: "ANSWERED_QUESTIONS_WITH_SINGLE_PART", ANSWERED_QUESTIONS_WITH_MULTIPLE_PARTS: "ANSWERED_QUESTIONS_WITH_MULTIPLE_PARTS", SELECTED_PROVIDE_VIN_DIFFERENT_WAY: "SELECTED_PROVIDE_VIN_DIFFERENT_WAY", - CLICKED_BACK_WITH_PART_QUESTION_ANSWERS: "CLICKED_BACK_WITH_PART_QUESTION_ANSWERS", - CLICKED_BACK_WITHOUT_PART_QUESTION_ANSWERS: "CLICKED_BACK_WITHOUT_PART_QUESTION_ANSWERS", - ANSWERED_ALL_QUESTIONS: "ANSWERED_ALL_QUESTIONS", + + // Question pages HAS_PART_QUESTIONS: "HAS_PART_QUESTIONS", HAS_MULTIPLE_PARTS_TO_CHOOSE: "HAS_MULTIPLE_PARTS_TO_CHOOSE", HAS_MOLDING_QUESTIONS: "HAS_MOLDING_QUESTIONS", HAS_CAPABILITY_QUESTIONS: "HAS_CAPABILITY_QUESTIONS", + HAS_NO_MORE_QUESTIONS: "HAS_NO_MORE_QUESTIONS", CLICKED_BACK_TO_GO_TO_VIN_LOOKUP: "CLICKED_BACK_TO_GO_TO_VIN_LOOKUP", CLICKED_BACK_TO_GO_TO_PART_QUESTIONS: "CLICKED_BACK_TO_GO_TO_PART_QUESTIONS", CLICKED_BACK_TO_GO_TO_VEHICLE_PARTS: "CLICKED_BACK_TO_GO_TO_VEHICLE_PARTS", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 34c5263cf..733931acf 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -76,10 +76,6 @@ const routingTable = function(store) { scenario: navigationScenarios.CLICKED_BACK, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, }, - { - scenario: navigationScenarios.SELECTED_PARTS, - destinationFmgPageValue: fmgPageValues.VIN_LOOKUP, - }, ], }, { @@ -98,19 +94,19 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, + scenario: navigationScenarios.HAS_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, + scenario: navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, + scenario: navigationScenarios.HAS_MOLDING_QUESTIONS, destinationFmgPageValue: fmgPageValues.MOLDING_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, + scenario: navigationScenarios.HAS_CAPABILITY_QUESTIONS, destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS } ], @@ -127,19 +123,19 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, + scenario: navigationScenarios.HAS_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, + scenario: navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, + scenario: navigationScenarios.HAS_MOLDING_QUESTIONS, destinationFmgPageValue: fmgPageValues.MOLDING_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, + scenario: navigationScenarios.HAS_CAPABILITY_QUESTIONS, destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS } ], @@ -160,19 +156,19 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, + scenario: navigationScenarios.HAS_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, + scenario: navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, + scenario: navigationScenarios.HAS_MOLDING_QUESTIONS, destinationFmgPageValue: fmgPageValues.MOLDING_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, + scenario: navigationScenarios.HAS_CAPABILITY_QUESTIONS, destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS } ], @@ -189,19 +185,19 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, + scenario: navigationScenarios.HAS_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, + scenario: navigationScenarios.HAS_MULTIPLE_PARTS_TO_CHOOSE, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_MOLDING_QUESTIONS, + scenario: navigationScenarios.HAS_MOLDING_QUESTIONS, destinationFmgPageValue: fmgPageValues.MOLDING_QUESTIONS }, { - scenario: navigationScenarios.SELECTED_VIN_WITH_CAPABILITY_QUESTIONS, + scenario: navigationScenarios.HAS_CAPABILITY_QUESTIONS, destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS }, { @@ -251,7 +247,7 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS, }, { - scenario: navigationScenarios.ANSWERED_ALL_QUESTIONS, + scenario: navigationScenarios.HAS_NO_MORE_QUESTIONS, destinationFmgPageValue: fmgPageValues.QUOTE, }, ] @@ -259,10 +255,6 @@ const routingTable = function(store) { { fmgPageValue: fmgPageValues.VEHICLE_PARTS, maps: [ - { - scenario: navigationScenarios.SELECTED_PARTS, - destinationFmgPageValue: fmgPageValues.QUOTE, - }, { scenario: navigationScenarios.CLICKED_FORWARD, destinationFmgPageValue: fmgPageValues.REVEAL, @@ -284,7 +276,7 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS, }, { - scenario: navigationScenarios.ANSWERED_ALL_QUESTIONS, + scenario: navigationScenarios.HAS_NO_MORE_QUESTIONS, destinationFmgPageValue: fmgPageValues.QUOTE, }, ], @@ -309,7 +301,7 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS, }, { - scenario: navigationScenarios.ANSWERED_ALL_QUESTIONS, + scenario: navigationScenarios.HAS_NO_MORE_QUESTIONS, destinationFmgPageValue: fmgPageValues.QUOTE, } ] @@ -334,7 +326,7 @@ const routingTable = function(store) { destinationFmgPageValue: fmgPageValues.MOLDING_QUESTIONS }, { - scenario: navigationScenarios.ANSWERED_ALL_QUESTIONS, + scenario: navigationScenarios.HAS_NO_MORE_QUESTIONS, destinationFmgPageValue: fmgPageValues.QUOTE }, ] From 14c85c8eb710c1f15527d6ee43668c62f45bf8b8 Mon Sep 17 00:00:00 2001 From: Katie Date: Fri, 19 Aug 2022 12:52:46 -0400 Subject: [PATCH 05/11] CSR-748 Remove more unused navigation scenarios --- src/router/router-constants/navigation-scenarios.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index 25b749212..7578a0295 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -18,9 +18,6 @@ const navigationScenarios = { SELECTED_MANUAL_VIN: "SELECTED_MANUAL_VIN", SELECTED_LICENSE_PLATE: "SELECTED_LICENSE_PLATE", SELECTED_HOME_ADDRESS: "SELECTED_HOME_ADDRESS", - ANSWERED_QUESTIONS_WITH_SINGLE_PART: "ANSWERED_QUESTIONS_WITH_SINGLE_PART", - ANSWERED_QUESTIONS_WITH_MULTIPLE_PARTS: "ANSWERED_QUESTIONS_WITH_MULTIPLE_PARTS", - SELECTED_PROVIDE_VIN_DIFFERENT_WAY: "SELECTED_PROVIDE_VIN_DIFFERENT_WAY", // Question pages HAS_PART_QUESTIONS: "HAS_PART_QUESTIONS", From 1255375de32c0315ae830273a5d0dddf1e5b0619 Mon Sep 17 00:00:00 2001 From: Katie Date: Fri, 19 Aug 2022 12:53:36 -0400 Subject: [PATCH 06/11] CSR-748 Remove more unused navigation scenarios --- src/router/router-constants/routing-table.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 733931acf..d17530145 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -200,10 +200,6 @@ const routingTable = function(store) { scenario: navigationScenarios.HAS_CAPABILITY_QUESTIONS, destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS }, - { - scenario: navigationScenarios.SELECTED_PROVIDE_VIN_DIFFERENT_WAY, - destinationFmgPageValue: fmgPageValues.ESTIMATE - } ], }, { From c03c406eb2db25b7de4f9249325d4a363091fb23 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 22 Aug 2022 08:45:48 -0400 Subject: [PATCH 07/11] Fixed navigation error, we needed to add the 'isSavingNavigation' parameter to the overrideNavigation call in vehicle-style --- src/layouts/vehicle-style/vehicle-style.vue | 2 +- src/router/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue index b017fa6ce..b86914520 100644 --- a/src/layouts/vehicle-style/vehicle-style.vue +++ b/src/layouts/vehicle-style/vehicle-style.vue @@ -87,7 +87,7 @@ export default { }); //emulate selecting the vehicle style - router.overrideNavigation(navigationScenarios.SELECTED_STYLE, to, next); + router.overrideNavigation(navigationScenarios.SELECTED_STYLE, to, next, true); } else{ next( (vm) => { diff --git a/src/router/index.js b/src/router/index.js index fbb82c398..5c4b6ca75 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -160,8 +160,8 @@ router.navigateToExternalUrl = (url, optionalQuery = {}) => { } //Use this navigation when you need to call next() explicitly. beforeRouteEnter is a good example. -router.overrideNavigation = (scenario, currentRoute, next, optionalQuery = {}, optionalParams = {}, optionalPageData) => { - router.navigate(scenario, currentRoute, optionalQuery, optionalParams, optionalPageData); +router.overrideNavigation = (scenario, currentRoute, next, isSavingNavigation, optionalQuery = {}, optionalParams = {}, optionalPageData) => { + navigate(scenario, currentRoute, isSavingNavigation, optionalQuery, optionalParams, optionalPageData); next(); } From 4156eb281b7e3095df292356e2ec410cfcb3dc2f Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 24 Aug 2022 09:43:34 -0400 Subject: [PATCH 08/11] CSR-795 add modal for quote page. --- .../funnel-header/menu-modal/menu-modal.vue | 122 +++++++++--------- src/layouts/quote/quote-modal/quote-modal.vue | 75 +++++++++++ src/layouts/quote/quote.vue | 12 +- src/ux-components/button-main/button-main.vue | 1 + .../radio-service-package.vue | 38 ++---- src/ux-components/text-link/text-link.vue | 31 +++++ 6 files changed, 187 insertions(+), 92 deletions(-) create mode 100644 src/layouts/quote/quote-modal/quote-modal.vue diff --git a/src/common-components/funnel-header/menu-modal/menu-modal.vue b/src/common-components/funnel-header/menu-modal/menu-modal.vue index bd13e46a8..308f0cb0d 100644 --- a/src/common-components/funnel-header/menu-modal/menu-modal.vue +++ b/src/common-components/funnel-header/menu-modal/menu-modal.vue @@ -7,7 +7,7 @@ -