Fix operator precedence bug in isMobileStaticRecalibrationApplicable on schedule page

The schedule.vue computed property had incorrect parenthesization that caused
isCashItacNoComp and mobileFeePart?.isInsurable to be evaluated as top-level
OR alternatives instead of being gated behind the displayMSR experiment flag
and MOBILE_STATIC_RECAL_FEE part number check.

Before (buggy):
  (displayMSR && partNumber == RECAL_FEE && enableMSRSplitPay)
  || isCashItacNoComp
  || mobileFeePart?.isInsurable

After (fixed):
  displayMSR
  && partNumber == RECAL_FEE
  && (enableMSRSplitPay || isCashItacNoComp || mobileFeePart?.isInsurable)

This aligns schedule.vue with the correct logic in service-location.vue and
service-location-june-2025.vue, preventing unnecessary mobile schedule API
calls for orders where recalibration cannot be done mobile.

Co-authored-by: Mark Harris <mark.harris@safelite.com>
This commit is contained in:
Cursor Agent 2026-04-09 19:26:18 +00:00
parent 292b626267
commit c6ab0c6ec5
No known key found for this signature in database

View file

@ -705,11 +705,9 @@ export default {
},
isMobileStaticRecalibrationApplicable() {
return (
(this.displayMSR &&
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
this.enableMSRSplitPay) ||
this.isCashItacNoComp ||
this.mobileFeePart?.isInsurable
this.displayMSR &&
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
(this.enableMSRSplitPay || this.isCashItacNoComp || this.mobileFeePart?.isInsurable)
);
},
displayMSR() {