Merge pull request #598 from Safelite/defect/CSR-729-2

CSR-729 Save registration address to service by default, only save se…
This commit is contained in:
katieoh-safelite 2022-07-13 08:56:19 -04:00 committed by GitHub
commit c9558b41d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);