Simplifying

This commit is contained in:
Michaela Brydon 2024-01-22 16:18:44 -05:00
parent a84c0081c8
commit 503ac4e1c6

View file

@ -23,7 +23,7 @@ export default {
computed: {
displayContent() {
const { glassToReplace, isRepair } = useMainStore().order.damage;
return this.getDamageDisplayContent(
return getDamageDisplayContent(
this.locationAnswers,
this.driverSideDamageAnswers,
this.passengerSideDamageAnswers,
@ -32,11 +32,11 @@ export default {
);
},
driverSideDamageAnswers() {
const answerContent = this.getLocationAnswer(damageLocationsSelected.DRIVER, this.locationAnswers);
const answerContent = getLocationAnswer(damageLocationsSelected.DRIVER, this.locationAnswers);
return this.getAnswersNullSafe(answerContent?.SubWidgetName);
},
passengerSideDamageAnswers() {
const answerContent = this.getLocationAnswer(damageLocationsSelected.PASSENGER, this.locationAnswers);
const answerContent = getLocationAnswer(damageLocationsSelected.PASSENGER, this.locationAnswers);
return this.getAnswersNullSafe(answerContent?.SubWidgetName);
},
locationAnswers() {
@ -47,9 +47,7 @@ export default {
getAnswersNullSafe(widgetName) {
const rawAnswers = this.getCmsContent(widgetName, 'Answers');
return rawAnswers || [];
},
getDamageDisplayContent,
getLocationAnswer
}
}
};
</script>