CSR-729 Save registration address to service by default, only save service location on vin-lookup if service zip hasn't changed

This commit is contained in:
Katie 2022-07-12 15:21:57 -04:00
parent e3ca8b25ba
commit 086392c561
2 changed files with 8 additions and 4 deletions

View file

@ -265,6 +265,8 @@ export default {
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.customerQuestions.emailAddress, false);
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
address: this.customerQuestions.addressQuestions.streetAddress,
city: this.customerQuestions.addressQuestions.city,
zipCode: this.serviceZipCode,
state: resultMap.serviceZipValidationResponse.state,
}, false);

View file

@ -351,10 +351,12 @@ export default {
if (zipValidationResponse.data.isServiceable) {
// If the Service Zip entered is serviceable then save the Zip Info and Email Address and navigate forward
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
zipCode: this.zip,
state: zipValidationResponse.data.state
}, false);
if (this.$store.getters.order.serviceLocation.zipCode != this.zip) {
await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, {
zipCode: this.zip,
state: zipValidationResponse.data.state
}, false);
}
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.email, false);