diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 65fa3fc91..beb89e686 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -295,6 +295,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); diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index e6272b2fd..984a40fec 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -81,7 +81,7 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); await wrapper.setData({ - selectedValues: [vinLookupMethodSelections.HOMEADDRESS] + selectedVinLookupMethod: vinLookupMethodSelections.HOMEADDRESS }) //Act @@ -97,7 +97,7 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); await wrapper.setData({ - selectedValues: [vinLookupMethodSelections.MANUALVIN] + selectedVinLookupMethod: vinLookupMethodSelections.MANUALVIN }) //Act @@ -132,7 +132,7 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); await wrapper.setData({ - selectedValues: [vinLookupMethodSelections.LICENSEPLATE] + selectedVinLookupMethod: vinLookupMethodSelections.LICENSEPLATE }) //Act diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 8a8fe51e7..9abfd17d8 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -21,7 +21,7 @@ :answers="answersFromCms" groupName="vinLookupMethodOption" buttonType="listButton" - v-model="selectedValues" + v-model="selectedVinLookupMethod" isRequired validationRules="option-required" /> @@ -60,7 +60,7 @@ export default { name: "estimate", data() { return { - selectedValues: [], + selectedVinLookupMethod: "", }; }, @@ -94,20 +94,20 @@ export default { ); }, async forwardButtonAction() { - if (this.selectedValues[0] === vinLookupMethodSelections.MANUALVIN) { + if (this.selectedVinLookupMethod === vinLookupMethodSelections.MANUALVIN) { await this.dispatchStoreAction(storeActions.CLEAR_VIN); return this.$router.navigate( this.navigationScenarios.SELECTED_MANUAL_VIN, this.$route ); } - if (this.selectedValues[0] === vinLookupMethodSelections.LICENSEPLATE) { + if (this.selectedVinLookupMethod === vinLookupMethodSelections.LICENSEPLATE) { return this.$router.navigate( this.navigationScenarios.SELECTED_LICENSE_PLATE, this.$route ); } - if (this.selectedValues[0] === vinLookupMethodSelections.HOMEADDRESS) { + if (this.selectedVinLookupMethod === vinLookupMethodSelections.HOMEADDRESS) { return this.$router.navigate( this.navigationScenarios.SELECTED_HOME_ADDRESS, this.$route diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index af752a0cc..2a79a74d6 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -301,10 +301,12 @@ export default { // Check if Service Zip entered is serviceable 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.serviceZipCode, - state: zipValidationResponse.data.state - }, false); + if (this.$store.getters.order.serviceLocation.zipCode != this.zip) { + await this.dispatchStoreAction(storeActions.SAVE_SERVICE_LOCATION, { + zipCode: this.serviceZipCode, + state: zipValidationResponse.data.state + }, false); + } await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);