DigitalConsumer.FixMyGlass/src/mixins/vehicle-questions-mixin.js
2022-07-26 15:08:45 -04:00

15 lines
No EOL
525 B
JavaScript

export default {
methods: {
hasPartQuestions(partsOrQuestions) {
return partsOrQuestions.some(pq => pq.partQuestions?.length > 0);
},
hasGlassLocationWithMultipleParts(partsOrQuestions) {
return partsOrQuestions.some(pq => pq.parts?.length > 1);
},
hasChildPartQuestions(partsOrQuestions) {
return partsOrQuestions.some(pq => {
return pq.parts?.some(part => part.childPartQuestions?.length > 0);
});
}
}
}