From 9f4268b90f7f4c1b6d78c071870d4b9ec3f02d0d Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Fri, 24 May 2024 09:49:00 -0500 Subject: [PATCH] SSR-1167 Fix Zip code lookup --- src/helpers/service-location-helper.js | 10 +++++----- src/store/index.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/helpers/service-location-helper.js b/src/helpers/service-location-helper.js index 2f80d85e..c5d961d8 100644 --- a/src/helpers/service-location-helper.js +++ b/src/helpers/service-location-helper.js @@ -4,11 +4,11 @@ export async function getZipCodeData(zipCode) { const serviceZipValidationResponse = await useMainStore().validateZip({ zip: zipCode }); return { - containsMilitaryBase: serviceZipValidationResponse.data.containsMilitaryBase, - isValid: serviceZipValidationResponse.data.isValid, - isServiceable: serviceZipValidationResponse.data.isServiceable, - state: serviceZipValidationResponse.data.state, - zipCodeCtu: serviceZipValidationResponse.data.zipCodeCtu + containsMilitaryBase: serviceZipValidationResponse.containsMilitaryBase, + isValid: serviceZipValidationResponse.isValid, + isServiceable: serviceZipValidationResponse.isServiceable, + state: serviceZipValidationResponse.state, + zipCodeCtu: serviceZipValidationResponse.zipCodeCtu }; } diff --git a/src/store/index.js b/src/store/index.js index 6a4eb37b..5aa306ed 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1048,7 +1048,7 @@ export const useMainStore = defineStore({ const zipCodeToUse = this.order.serviceLocation.zipCode; if (!this.order.serviceLocation.zipCodeCtu) { const zipInfo = await this.validateZip({ zip: zipCodeToUse }); - this.order.serviceLocation.zipCodeCtu = zipInfo.data.zipCodeCtu; + this.order.serviceLocation.zipCodeCtu = zipInfo.zipCodeCtu; } const ctuToUse = this.order.serviceLocation.zipCodeCtu; const deductibleToUse = this.order.currentDeductible ?? 0;