diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index b2b38d07e..d38a1d273 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -117,8 +117,6 @@ export default { return capabilityQuestionsPageData && Object.keys(capabilityQuestionsPageData).length > 0; }, async forwardButtonAction() { - console.log(this.windshieldPartInfo); - console.log(this.selectedAnswer) const selectedAnswerResult1 = this.selectedAnswer.answerResult; const selectedAnswerResult2 = this.pageData.capabilityQuestions[0].answers.find(x => x.answerResult1 === selectedAnswerResult1).answerResult2; diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 2d24a3ca9..7aca0e77f 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -123,13 +123,6 @@ export default { if (this.currentPartNum === i || part.answerData?.answerResult?.length > 0) { return true; } return false; }, - // backButtonAction() { - // // route to move backwards - // this.$router.navigate( - // this.navigationScenarios.CLICKED_BACK, - // this.$route - // ); - // }, async forwardButtonAction() { const partQuestionAnswersArray = this.partsQuestionsData.map((item) => { return { @@ -156,32 +149,6 @@ export default { const glassNameAndPartsForStore = partsLookup.data.glassNameAndParts; this.navigateForward(glassNameAndPartsForStore); - // const hasGlassLocationWithMultipleParts = this.hasGlassLocationWithMultipleParts(glassNameAndPartsForStore); - // const hasChildPartQuestions = this.hasChildPartQuestions(glassNameAndPartsForStore); - // const hasCapabilityQuestions = this.hasCapabilityQuestions(glassNameAndPartsForStore); - - // // NAVIGATE FORWARD - // 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}); - // } 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}); - // } 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}); - // } else { - // // if single parts only - // const collectedGlassParts = this.reducedGlassPartsArray(glassNameAndPartsForStore); - // // save to store lineItems.glassParts - // this.$store.commit(storeMutations.UPDATE_GLASS_PARTS, collectedGlassParts); - // // go to heritage quote page - // this.$refs.loadingModal.showModal(); - // navigateToHeritageFunnel(); - // } }, arePagePrerequisitesValid() { const partQuestionsFromPageData = store.getters.pageData(fmgPageValues.PART_QUESTIONS); diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 0035131d3..a276ef132 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -159,15 +159,6 @@ export default { return store.getters.damage.isRepair != null && store.getters.pageData(fmgPageValues.VEHICLE_PARTS) && Object.keys(store.getters.pageData(fmgPageValues.VEHICLE_PARTS)).length !== 0; }, - // backButtonAction() { - // 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( - // backNavigationScenario, - // this.$route - // ); - // }, async forwardButtonAction() { const matchedParts = []; @@ -191,10 +182,6 @@ export default { } } } - - // const hasChildPartQuestions = this.hasChildPartQuestions(matchedParts); - // const hasCapabilityQuestions = this.hasCapabilityQuestions(matchedParts); - // If no parts could be matched, throw an error (isForwardActionDisabled is based off of matchedParts) if (this.isForwardActionDisabled) { this.$refs.funnelFooter.removeLoader(); @@ -203,33 +190,6 @@ export default { // Navigate to the next page this.navigateForward(matchedParts); - // if (hasChildPartQuestions) { - // this.$router.navigate( - // this.navigationScenarios.HAS_MOLDING_QUESTIONS, - // this.$route, - // {}, - // {}, - // {partsOrQuestions: matchedParts} - // ); - // } else if (hasCapabilityQuestions) { - // this.$router.navigate( - // this.navigationScenarios.HAS_CAPABILITY_QUESTIONS, - // this.$route, - // {}, - // {}, - // {partsOrQuestions: matchedParts} - // ); - - // } else { - // // if single parts only - // const collectedGlassParts = this.reducedGlassPartsArray(matchedParts); - // // save to store lineItems.glassParts - // this.$store.commit(storeMutations.UPDATE_GLASS_PARTS, collectedGlassParts); - - // // go to heritage quote page - // this.$refs.loadingModal.showModal(); - // navigateToHeritageFunnel(); - // } }, LoadInitialPartsData() { diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index ab27a6c18..583c184aa 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -24,7 +24,7 @@ export default { return pq.parts?.some(part => part.requiresCapabilityQuestions === true); }); }, - + // method to only include keys listed for lineItems.glassParts in // https://safelite.atlassian.net/wiki/spaces/DC/pages/17137665/Catalog+Front-End+State#glassParts reducedGlassPartsArray(glassParts) { @@ -61,8 +61,6 @@ export default { return this.comparePageIndices(currentPage, fmgPage) < 0; }, currentPageComesAfterPage(currentPage = this.$route.query.fmgPage, fmgPage) { - console.log(currentPage) - console.log(fmgPage) return this.comparePageIndices(currentPage, fmgPage) > 0; }, // Can't use `this` because navigateForward is also called from vin-pages-mixin diff --git a/src/mixins/vin-pages-mixin.js b/src/mixins/vin-pages-mixin.js index 6e030688d..817aa7b7e 100644 --- a/src/mixins/vin-pages-mixin.js +++ b/src/mixins/vin-pages-mixin.js @@ -1,47 +1,13 @@ import { storeActions } from "@/constants/store-actions.js"; -import { storeMutations } from "@/constants/store-mutations.js"; -import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin"; export default { methods: { async navigateForwardWithSingleCarMatch() { const result = await this.dispatchStoreAction(storeActions.GET_PARTS_OR_QUESTIONS); - const partsOrQuestions = result.data.partsOrQuestions; - console.log("HI") + vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this); - - // const hasPartsQuestions = this.hasPartQuestions(partsOrQuestions); - // const hasGlassLocationWithMultipleParts = this.hasGlassLocationWithMultipleParts(partsOrQuestions); - // const hasChildPartQuestions = this.hasChildPartQuestions(partsOrQuestions); - // const hasCapabilityQuestions = this.hasCapabilityQuestions(partsOrQuestions); - - // if (hasPartsQuestions) { - // this.$router.navigate(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); - // } - // else if (hasChildPartQuestions) { - // this.$router.navigate(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, {}, {}, { - // carId: this.$store.getters.vehicle.carId, - // partNumber: result.data.partsOrQuestions.filter(x => x.glassLocation === damageLocationsSelected.WINDSHIELD)[0].parts[0].partNumber - // }); - // } - // else { - // // if single parts only - // const collectedGlassParts = this.reducedGlassPartsArray(result.data.partsOrQuestions); - // // save to store lineItems.glassParts - // this.$store.commit(storeMutations.UPDATE_GLASS_PARTS, collectedGlassParts); - - // // go to heritage quote page - // this.$refs.loadingModal.showModal(); - // navigateToHeritageFunnel(); - // } }, } } \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index ea985c390..ea4c5cbcc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -192,9 +192,7 @@ async function navigate(scenario, currentRoute, optionalQuery = {}, optionalPara // Get navigation map depending on the scenario and the current 'page' you're on. function getNavigationMap(scenario, currentRoute) { - console.log("scenario: ", scenario) const fmgPageValue = currentRoute.query.fmgPage; - console.log(routingTable(store)) const matchedQueryValue = routingTable(store) .filter( (item) =>