consistency

This commit is contained in:
Bill Richardson 2023-10-05 17:03:21 -04:00
parent bf45490281
commit e42ef9c9ea

View file

@ -52,14 +52,14 @@ export default {
}, },
answersToDisplay() { answersToDisplay() {
const shouldShowMobile = this.isServiceableMobile && this.isITAC; const shouldShowMobile = this.isServiceableMobile && this.isITAC;
const shouldShowMobileInsurance = this.isServiceableMobile && !this.isITAC; const shouldShowMobileNotITAC = this.isServiceableMobile && !this.isITAC;
const shouldShowInshop = this.isServiceableInshop; const shouldShowInshop = this.isServiceableInshop;
const shouldShowDropoff = this.isServiceableInshop && !useMainStore().damage.isRepair; const shouldShowDropoff = this.isServiceableInshop && !useMainStore().damage.isRepair;
return this.answersFromCms return this.answersFromCms
? this.answersFromCms.filter((answer) => ( ? this.answersFromCms.filter((answer) => (
(answer.Name === AppointmentTypeStrings.IN_SHOP && shouldShowInshop) (answer.Name === AppointmentTypeStrings.IN_SHOP && shouldShowInshop)
|| (answer.Name === AppointmentTypeStrings.MOBILE && shouldShowMobile) || (answer.Name === AppointmentTypeStrings.MOBILE && shouldShowMobile)
|| (answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC && shouldShowMobileInsurance) || (answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC && shouldShowMobileNotITAC)
|| (answer.Name === AppointmentTypeStrings.DROP_OFF && shouldShowDropoff) || (answer.Name === AppointmentTypeStrings.DROP_OFF && shouldShowDropoff)
)) ))
: []; : [];