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 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) {
|
||||
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
||||
zipCode: this.serviceZipCode,
|
||||
state: zipValidationResponse.data.state
|
||||
}, false);
|
||||
const vehicleRegistrationInfo = this.$store.getters.vehicle.registration;
|
||||
if (vehicleRegistrationInfo.zipCode == this.serviceZipCode) {
|
||||
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
||||
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);
|
||||
|
||||
return await this.navigateForward();
|
||||
|
||||
}
|
||||
|
||||
// If the Service Zip is NOT serviceable then show an alert
|
||||
this.displayNonServiceableZipAlert = true;
|
||||
|
||||
return this.$refs.funnelFooter.removeLoader();
|
||||
|
||||
},
|
||||
async navigateForward(){
|
||||
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue