Merge pull request #604 from Safelite/defect/CSR-729-3
CSR-726 Clear serviceLocation address and city on vin-lookup unless z…
This commit is contained in:
commit
2272cc91a5
1 changed files with 15 additions and 6 deletions
|
|
@ -302,23 +302,32 @@ export default {
|
||||||
if (zipValidationResponse.data.isServiceable) {
|
if (zipValidationResponse.data.isServiceable) {
|
||||||
// If the Service Zip entered is serviceable then save the Zip Info and Email Address and navigate forward
|
// If the Service Zip entered is serviceable then save the Zip Info and Email Address and navigate forward
|
||||||
if (this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode) {
|
if (this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode) {
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
const vehicleRegistrationInfo = this.$store.getters.vehicle.registration;
|
||||||
zipCode: this.serviceZipCode,
|
if (vehicleRegistrationInfo.zipCode == this.serviceZipCode) {
|
||||||
state: zipValidationResponse.data.state
|
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
||||||
}, false);
|
address: vehicleRegistrationInfo.address,
|
||||||
|
city: vehicleRegistrationInfo.city,
|
||||||
|
zipCode: vehicleRegistrationInfo.zipCode,
|
||||||
|
state: vehicleRegistrationInfo.state
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
||||||
|
zipCode: this.serviceZipCode,
|
||||||
|
state: zipValidationResponse.data.state
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);
|
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);
|
||||||
|
|
||||||
return await this.navigateForward();
|
return await this.navigateForward();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the Service Zip is NOT serviceable then show an alert
|
// If the Service Zip is NOT serviceable then show an alert
|
||||||
this.displayNonServiceableZipAlert = true;
|
this.displayNonServiceableZipAlert = true;
|
||||||
|
|
||||||
return this.$refs.funnelFooter.removeLoader();
|
return this.$refs.funnelFooter.removeLoader();
|
||||||
|
|
||||||
},
|
},
|
||||||
async navigateForward(){
|
async navigateForward(){
|
||||||
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
|
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue