CSR-702 Fix going back from vehicle-parts when there were no part-questions
This commit is contained in:
parent
62514984ee
commit
50ac848290
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;
|
||||
},
|
||||
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;
|
||||
|
||||
this.$router.navigate(
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ export default {
|
|||
|
||||
methods: {
|
||||
hasPartQuestions(partsOrQuestions) {
|
||||
return partsOrQuestions.some(pq => pq.partQuestions?.length > 0);
|
||||
return partsOrQuestions?.some(pq => pq.partQuestions?.length > 0);
|
||||
},
|
||||
hasGlassLocationWithMultipleParts(partsOrQuestions) {
|
||||
return partsOrQuestions.some(pq => pq.parts?.length > 1);
|
||||
return partsOrQuestions?.some(pq => pq.parts?.length > 1);
|
||||
},
|
||||
hasChildPartQuestions(partsOrQuestions) {
|
||||
return partsOrQuestions.some(pq => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue