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);