CASH-69: Simplify logic

This commit is contained in:
Chris Redelinghuys 2025-01-17 08:29:25 -05:00
parent 6eeddc6211
commit 38c16b434b

View file

@ -318,18 +318,11 @@ export default {
}
},
isMobileStaticRecalibrationApplicable() {
if (!this.isInsurance) {
return (
this.isVehicleMobileStaticRecalibrationApplicable &&
this.mobileFeePart?.partNumber == MOBILE_STATIC_RECAL_FEE_PART_NUMBER
);
} else {
return (
this.isVehicleMobileStaticRecalibrationApplicable &&
this.mobileFeePart?.partNumber == MOBILE_STATIC_RECAL_FEE_PART_NUMBER &&
this.mobileFeePart?.isInsurable
);
}
return (
this.isVehicleMobileStaticRecalibrationApplicable &&
this.mobileFeePart?.partNumber == MOBILE_STATIC_RECAL_FEE_PART_NUMBER &&
(this.isInsurance ? this.mobileFeePart?.isInsurable : true)
);
},
mobileFeeApplies() {
if (