Fix for CSR-1410
This commit is contained in:
parent
000b9a0b35
commit
41df561a67
4 changed files with 27 additions and 18 deletions
|
|
@ -381,18 +381,12 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// If we already have a full address, show it
|
// 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.showAddressFields =
|
||||||
this.addressModel.streetAddress !== "" &&
|
(this.addressModel.streetAddress ?? "") !== "" &&
|
||||||
this.addressModel.city !== "" &&
|
(this.addressModel.city ?? "") !== "" &&
|
||||||
this.addressModel.state !== "" &&
|
(this.addressModel.state ?? "") !== "" &&
|
||||||
this.addressModel.zipCode !== "";
|
(this.addressModel.zipCode ?? "") !== "";
|
||||||
console.log(this.showAddressFields);
|
|
||||||
if (!this.showAddressFields) {
|
if (!this.showAddressFields) {
|
||||||
this.loadGooglePlacesAutocompleteScript();
|
this.loadGooglePlacesAutocompleteScript();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -305,9 +305,14 @@ export default {
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
storeActions.SAVE_SERVICE_LOCATION,
|
storeActions.SAVE_SERVICE_LOCATION,
|
||||||
{
|
{
|
||||||
|
address: null,
|
||||||
|
address2: null,
|
||||||
|
city: null,
|
||||||
state: resultMap.serviceZipValidationResponse.state,
|
state: resultMap.serviceZipValidationResponse.state,
|
||||||
zipCode: this.serviceZipCode,
|
zipCode: this.serviceZipCode,
|
||||||
zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu,
|
zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu,
|
||||||
|
appointmentType: null,
|
||||||
|
isVehicleProtected: null,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -122,10 +122,10 @@ import { errorMessages } from "@/constants/error-messages";
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("mobile-location-required", (value) => {
|
defineRule("mobile-location-required", (value) => {
|
||||||
if (
|
if (
|
||||||
value.addressQuestions.streetAddress == "" ||
|
value.addressQuestions.streetAddress == null ||
|
||||||
value.addressQuestions.city == "" ||
|
value.addressQuestions.city == null ||
|
||||||
value.addressQuestions.state == "" ||
|
value.addressQuestions.state == null ||
|
||||||
value.addressQuestions.zipCode == "" ||
|
value.addressQuestions.zipCode == null ||
|
||||||
value.isVehicleProtected == null
|
value.isVehicleProtected == null
|
||||||
) {
|
) {
|
||||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||||
|
|
@ -361,9 +361,9 @@ export default {
|
||||||
return store.getters.order.serviceLocation.provider;
|
return store.getters.order.serviceLocation.provider;
|
||||||
},
|
},
|
||||||
resetMobileLocation() {
|
resetMobileLocation() {
|
||||||
this.streetAddress = "";
|
this.streetAddress = null;
|
||||||
this.apartmentNumberOrBusinessName = "";
|
this.apartmentNumberOrBusinessName = null;
|
||||||
this.city = "";
|
this.city = null;
|
||||||
|
|
||||||
this.isVehicleProtected = null;
|
this.isVehicleProtected = null;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -325,9 +325,14 @@ export default {
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||||
{
|
{
|
||||||
|
address: null,
|
||||||
|
address2: null,
|
||||||
|
city: null,
|
||||||
state: resultMap.zipCodeData.state,
|
state: resultMap.zipCodeData.state,
|
||||||
zipCode: this.serviceZipCode,
|
zipCode: this.serviceZipCode,
|
||||||
zipCodeCtu: resultMap.zipCodeData.zipCodeCtu,
|
zipCodeCtu: resultMap.zipCodeData.zipCodeCtu,
|
||||||
|
appointmentType: null,
|
||||||
|
isVehicleProtected: null,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
@ -362,9 +367,14 @@ export default {
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||||
{
|
{
|
||||||
|
address: null,
|
||||||
|
address2: null,
|
||||||
|
city: null,
|
||||||
state: zipCodeData.state,
|
state: zipCodeData.state,
|
||||||
zipCode: this.serviceZipCode,
|
zipCode: this.serviceZipCode,
|
||||||
zipCodeCtu: zipCodeData.zipCodeCtu,
|
zipCodeCtu: zipCodeData.zipCodeCtu,
|
||||||
|
appointmentType: null,
|
||||||
|
isVehicleProtected: null,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue