diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index 66cef8389..20434da4d 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -381,18 +381,12 @@ export default { }, mounted() { // If we already have a full address, show it - console.log(this.showAddressFields); - debugger; // eslint-disable-line no-debugger - console.log(`this.addressModel.streetAddress ${this.addressModel.streetAddress}`); - console.log(`this.addressModel.city ${this.addressModel.city}`); - console.log(`this.addressModel.state ${this.addressModel.state}`); - console.log(`this.addressModel.zipCode ${this.addressModel.zipCode}`); this.showAddressFields = - this.addressModel.streetAddress !== "" && - this.addressModel.city !== "" && - this.addressModel.state !== "" && - this.addressModel.zipCode !== ""; - console.log(this.showAddressFields); + (this.addressModel.streetAddress ?? "") !== "" && + (this.addressModel.city ?? "") !== "" && + (this.addressModel.state ?? "") !== "" && + (this.addressModel.zipCode ?? "") !== ""; + if (!this.showAddressFields) { this.loadGooglePlacesAutocompleteScript(); } diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index defa865d3..b9d192ced 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -305,9 +305,14 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_SERVICE_LOCATION, { + address: null, + address2: null, + city: null, state: resultMap.serviceZipValidationResponse.state, zipCode: this.serviceZipCode, zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu, + appointmentType: null, + isVehicleProtected: null, }, false ); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 8f63e5df7..48be463c7 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -122,10 +122,10 @@ import { errorMessages } from "@/constants/error-messages"; // DEFINE VALIDATION RULES defineRule("mobile-location-required", (value) => { if ( - value.addressQuestions.streetAddress == "" || - value.addressQuestions.city == "" || - value.addressQuestions.state == "" || - value.addressQuestions.zipCode == "" || + value.addressQuestions.streetAddress == null || + value.addressQuestions.city == null || + value.addressQuestions.state == null || + value.addressQuestions.zipCode == null || value.isVehicleProtected == null ) { return errorMessages.MOBILE_LOCATION_REQUIRED; @@ -361,9 +361,9 @@ export default { return store.getters.order.serviceLocation.provider; }, resetMobileLocation() { - this.streetAddress = ""; - this.apartmentNumberOrBusinessName = ""; - this.city = ""; + this.streetAddress = null; + this.apartmentNumberOrBusinessName = null; + this.city = null; this.isVehicleProtected = null; }, diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 93f9862d4..d66275130 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -325,9 +325,14 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_SERVICE_ZIP_CODE_INFO, { + address: null, + address2: null, + city: null, state: resultMap.zipCodeData.state, zipCode: this.serviceZipCode, zipCodeCtu: resultMap.zipCodeData.zipCodeCtu, + appointmentType: null, + isVehicleProtected: null, }, false ); @@ -362,9 +367,14 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_SERVICE_ZIP_CODE_INFO, { + address: null, + address2: null, + city: null, state: zipCodeData.state, zipCode: this.serviceZipCode, zipCodeCtu: zipCodeData.zipCodeCtu, + appointmentType: null, + isVehicleProtected: null, }, false );