Merge pull request #636 from Safelite/feature/CSR-702
CSR-702 Fix going back from vehicle-parts when there were no part-que…
This commit is contained in:
commit
e565d667bc
2 changed files with 3 additions and 3 deletions
|
|
@ -159,7 +159,7 @@ export default {
|
||||||
Object.keys(store.getters.pageData(fmgPageValues.VEHICLE_PARTS)).length !== 0;
|
Object.keys(store.getters.pageData(fmgPageValues.VEHICLE_PARTS)).length !== 0;
|
||||||
},
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
const hasPartQuestions = this.hasPartQuestions(this.$store.getters.pageData(fmgPageValues.PART_QUESTIONS).partsOrQuestions);
|
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;
|
const backNavigationScenario = hasPartQuestions ? this.navigationScenarios.CLICKED_BACK_WITH_PART_QUESTION_ANSWERS : this.navigationScenarios.CLICKED_BACK_WITHOUT_PART_QUESTION_ANSWERS;
|
||||||
|
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@ export default {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
hasPartQuestions(partsOrQuestions) {
|
hasPartQuestions(partsOrQuestions) {
|
||||||
return partsOrQuestions.some(pq => pq.partQuestions?.length > 0);
|
return partsOrQuestions?.some(pq => pq.partQuestions?.length > 0);
|
||||||
},
|
},
|
||||||
hasGlassLocationWithMultipleParts(partsOrQuestions) {
|
hasGlassLocationWithMultipleParts(partsOrQuestions) {
|
||||||
return partsOrQuestions.some(pq => pq.parts?.length > 1);
|
return partsOrQuestions?.some(pq => pq.parts?.length > 1);
|
||||||
},
|
},
|
||||||
hasChildPartQuestions(partsOrQuestions) {
|
hasChildPartQuestions(partsOrQuestions) {
|
||||||
return partsOrQuestions.some(pq => {
|
return partsOrQuestions.some(pq => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue