From f72772e6b0058271154bcb80ad0734ca48bebcb5 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 24 Feb 2026 13:31:11 -0500 Subject: [PATCH] More readable check --- src/layouts/schedule-page/schedule-page.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index 153e97a8..215654b0 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -352,14 +352,17 @@ export default { return false; } + const validMobileAppointmentType = ((this.selectedAppointmentType === AppointmentTypeStrings.MOBILE + || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) + && serviceLocationToUse.mobileProviderNumber); + const validInShopAppointmentType = ((this.selectedAppointmentType === AppointmentTypeStrings.IN_SHOP + || this.selectedAppointmentType === AppointmentTypeStrings.DROP_OFF) + && (this.selectedProvider?.providerNumber || serviceLocationToUse.provider?.providerNumber)); + const serviceLocationPreReqs = serviceLocationToUse.zipCode !== null && serviceLocationToUse.zipCodeCtu !== null && serviceLocationToUse.appointmentType !== null - && (((this.selectedAppointmentType === AppointmentTypeStrings.MOBILE - || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) - && serviceLocationToUse.mobileProviderNumber) - || ((this.selectedAppointmentType === AppointmentTypeStrings.IN_SHOP || this.selectedAppointmentType === AppointmentTypeStrings.DROP_OFF) - && (this.selectedProvider?.providerNumber || serviceLocationToUse.provider?.providerNumber))); + && (validMobileAppointmentType || validInShopAppointmentType); const damageInfo = useMainStore().order.damage.isRepair || (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0);