More readable check
This commit is contained in:
parent
965b579f59
commit
f72772e6b0
1 changed files with 8 additions and 5 deletions
|
|
@ -352,14 +352,17 @@ export default {
|
||||||
return false;
|
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
|
const serviceLocationPreReqs = serviceLocationToUse.zipCode !== null
|
||||||
&& serviceLocationToUse.zipCodeCtu !== null
|
&& serviceLocationToUse.zipCodeCtu !== null
|
||||||
&& serviceLocationToUse.appointmentType !== null
|
&& serviceLocationToUse.appointmentType !== null
|
||||||
&& (((this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
&& (validMobileAppointmentType || validInShopAppointmentType);
|
||||||
|| 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)));
|
|
||||||
|
|
||||||
const damageInfo = useMainStore().order.damage.isRepair
|
const damageInfo = useMainStore().order.damage.isRepair
|
||||||
|| (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0);
|
|| (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue