diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 727828649..3f124f896 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -338,12 +338,10 @@ export default { false ); await this.dispatchStoreAction( - storeActions.SAVE_SERVICE_LOCATION, + storeActions.SAVE_SERVICE_ZIP_CODE_INFO, { - address: this.customerQuestions.addressQuestions.streetAddress, - city: this.customerQuestions.addressQuestions.city, - zipCode: this.serviceZipCode, state: resultMap.serviceZipValidationResponse.state, + zipCode: this.serviceZipCode, zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu, }, false diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index faf978f92..2e35b64b7 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -350,37 +350,22 @@ export default { // If a VIN has already been found. Validate the Service Zip (in case of changes) const zipCodeData = await this.getZipCodeData(this.serviceZipCode); - // Check if Service Zip entered is serviceable then save the ZIP info and email address + // Check if Service Zip entered is serviceable then save the ZIP info if (zipCodeData.isServiceable) { - //Only save the service location if the zip changed or we lack zipCodeCtu + //Only save the zipCode, state, and zipCodeCtu if the zip changed or we lack zipCodeCtu if ( this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode || !this.$store.getters.order.serviceLocation.zipCodeCtu ) { - const vehicleRegistrationInfo = this.$store.getters.vehicle.registration; - if (vehicleRegistrationInfo.zipCode == this.serviceZipCode) { - await this.dispatchStoreAction( - storeActions.SAVE_SERVICE_LOCATION, - { - address: vehicleRegistrationInfo.address, - city: vehicleRegistrationInfo.city, - state: vehicleRegistrationInfo.state, - zipCode: vehicleRegistrationInfo.zipCode, - zipCodeCtu: zipCodeData.zipCodeCtu, - }, - false - ); - } else { - await this.dispatchStoreAction( - storeActions.SAVE_SERVICE_ZIP_CODE_INFO, - { - state: zipCodeData.state, - zipCode: this.serviceZipCode, - zipCodeCtu: zipCodeData.zipCodeCtu, - }, - false - ); - } + await this.dispatchStoreAction( + storeActions.SAVE_SERVICE_ZIP_CODE_INFO, + { + state: zipCodeData.state, + zipCode: this.serviceZipCode, + zipCodeCtu: zipCodeData.zipCodeCtu, + }, + false + ); } await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false); diff --git a/src/store/index.js b/src/store/index.js index 44b1c0864..c3c9fc8a0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2172,9 +2172,6 @@ function convertGlassPieceToBackEndCompatibleFormat(glassPieces) { } function providersEqual(providerA, providerB) { - if (!providerA) { - return false; - } return ( providerA.providerNumber === providerB.providerNumber && providerA.address?.city === providerB.address?.city &&