CSR-726 Clear serviceLocation address and city on vin-lookup unless zip matches registration zip
This commit is contained in:
parent
086392c561
commit
cc6ecd9918
1 changed files with 15 additions and 4 deletions
|
|
@ -352,10 +352,21 @@ export default {
|
|||
|
||||
// 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.zip) {
|
||||
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
|
||||
zipCode: this.zip,
|
||||
state: zipValidationResponse.data.state
|
||||
}, false);
|
||||
const vehicleRegistrationInfo = this.$store.getters.vehicle.registration;
|
||||
if (vehicleRegistrationInfo.zipCode == this.zip) {
|
||||
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.zip,
|
||||
state: zipValidationResponse.data.state
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
|
||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.email, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue