From 38c16b434b5365e6a5d21718c511387be5c8b95c Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Fri, 17 Jan 2025 08:29:25 -0500 Subject: [PATCH] CASH-69: Simplify logic --- .../service-location/service-location.vue | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 21a123e6e..71bfa4b01 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -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 (