diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 939caf922..d4e07cf0a 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -32,6 +32,7 @@ const storeMutations = { UPDATE_REGISTRATION_LAST_NAME: "updateRegistrationLastName", UPDATE_REGISTRATION: "updateRegistration", + UPDATE_SERVICE_ZIP: "updateServiceZip", UPDATE_SERVICE_LOCATION: "updateServiceLocation", UPDATE_SCHEDULE: "updateSchedule", diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 7da42f302..ddb69ba6f 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -324,14 +324,9 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_SERVICE_ZIP_CODE_INFO, { - address: "", - address2: "", - city: "", state: resultMap.zipCodeData.state, zipCode: this.serviceZipCode, zipCodeCtu: resultMap.zipCodeData.zipCodeCtu, - appointmentType: "", - isVehicleProtected: null, }, false ); @@ -366,14 +361,9 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_SERVICE_ZIP_CODE_INFO, { - address: null, - address2: null, - city: null, state: zipCodeData.state, zipCode: this.serviceZipCode, zipCodeCtu: zipCodeData.zipCodeCtu, - appointmentType: null, - isVehicleProtected: null, }, false ); diff --git a/src/store/index.js b/src/store/index.js index 4c0057b00..5c290b1cd 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -244,6 +244,11 @@ export const mutations = { state.order.vehicle.registration.firstName = registrationInfo?.firstName; state.order.vehicle.registration.lastName = registrationInfo?.lastName; }, + updateServiceZip(state, serviceZipInfo) { + state.order.serviceLocation.state = serviceZipInfo.state; + state.order.serviceLocation.zipCode = serviceZipInfo.zipCode; + state.order.serviceLocation.zipCodeCtu = serviceZipInfo.zipCodeCtu; + }, updateServiceLocation(state, serviceLocationInfo) { state.order.serviceLocation.address = serviceLocationInfo.address; state.order.serviceLocation.address2 = serviceLocationInfo.address2; @@ -1905,7 +1910,7 @@ export const actions = { context.commit(storeMutations.RESET_SERVICE_LOCATION_MOBILE_ADDRESS); } - context.commit(storeMutations.UPDATE_SERVICE_LOCATION, serviceZipCodeInfo); + context.commit(storeMutations.UPDATE_SERVICE_ZIP, serviceZipCodeInfo); }, saveServiceLocation(context, serviceLocationInfo) {