Simplifying
This commit is contained in:
parent
a84c0081c8
commit
503ac4e1c6
1 changed files with 4 additions and 6 deletions
|
|
@ -23,7 +23,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
displayContent() {
|
displayContent() {
|
||||||
const { glassToReplace, isRepair } = useMainStore().order.damage;
|
const { glassToReplace, isRepair } = useMainStore().order.damage;
|
||||||
return this.getDamageDisplayContent(
|
return getDamageDisplayContent(
|
||||||
this.locationAnswers,
|
this.locationAnswers,
|
||||||
this.driverSideDamageAnswers,
|
this.driverSideDamageAnswers,
|
||||||
this.passengerSideDamageAnswers,
|
this.passengerSideDamageAnswers,
|
||||||
|
|
@ -32,11 +32,11 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
driverSideDamageAnswers() {
|
driverSideDamageAnswers() {
|
||||||
const answerContent = this.getLocationAnswer(damageLocationsSelected.DRIVER, this.locationAnswers);
|
const answerContent = getLocationAnswer(damageLocationsSelected.DRIVER, this.locationAnswers);
|
||||||
return this.getAnswersNullSafe(answerContent?.SubWidgetName);
|
return this.getAnswersNullSafe(answerContent?.SubWidgetName);
|
||||||
},
|
},
|
||||||
passengerSideDamageAnswers() {
|
passengerSideDamageAnswers() {
|
||||||
const answerContent = this.getLocationAnswer(damageLocationsSelected.PASSENGER, this.locationAnswers);
|
const answerContent = getLocationAnswer(damageLocationsSelected.PASSENGER, this.locationAnswers);
|
||||||
return this.getAnswersNullSafe(answerContent?.SubWidgetName);
|
return this.getAnswersNullSafe(answerContent?.SubWidgetName);
|
||||||
},
|
},
|
||||||
locationAnswers() {
|
locationAnswers() {
|
||||||
|
|
@ -47,9 +47,7 @@ export default {
|
||||||
getAnswersNullSafe(widgetName) {
|
getAnswersNullSafe(widgetName) {
|
||||||
const rawAnswers = this.getCmsContent(widgetName, 'Answers');
|
const rawAnswers = this.getCmsContent(widgetName, 'Answers');
|
||||||
return rawAnswers || [];
|
return rawAnswers || [];
|
||||||
},
|
}
|
||||||
getDamageDisplayContent,
|
|
||||||
getLocationAnswer
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue