diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 2b7033e10..3fc664413 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -29,6 +29,7 @@ const storeActions = { GET_PART_FROM_CAPABILITY_QUESTION_ANSWER: "getPartFromCapabilityQuestionAnswer", GET_MOLDING_QUESTIONS: "getMoldingQuestions", GET_MOBILE_FEE_PART: "getMobileFeePart", + GET_SERVICEABILITY_DETAILS: "getServiceabilityDetails", SAVE_SESSION: "saveSession", LOAD_SESSION: "loadSession", UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE: "updateStoreWithSaveSessionResponse", diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index ba81a973f..444147b72 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -28,3 +28,18 @@ export async function getPricedMobileFeePart(serviceZipCode) { return Promise.resolve(pricingResults[0]); } + +export async function getServiceabilityDetails(serviceZipCode, lineItems) { + + // Get the Mobile Fee Part + const serviceabilityDetails = await baseMixin.methods.dispatchStoreAction( + storeActions.GET_SERVICEABILITY_DETAILS, + { + serviceZipCode: serviceZipCode, + lineItems: lineItems, + }, + false + ); + const temp = Promise.resolve(serviceabilityDetails) + return Promise.resolve(serviceabilityDetails); +} diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 5120685bc..0fe9e54af 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -60,7 +60,10 @@ import baseMixin from "@/mixins/base-mixin.js"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; -import { getPricedMobileFeePart, getServiceabilityDetails } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; +import { + getPricedMobileFeePart, + getServiceabilityDetails, +} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; import store from "@/store"; export default { @@ -86,6 +89,7 @@ export default { // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); + const serviceZipCode = store.getters.order.serviceLocation.zipCode; const getZipCodeData = baseMixin.methods.getZipCodeData(serviceZipCode); const lineItems = store.getters.order.lineItems; @@ -94,10 +98,9 @@ export default { lineItems: lineItems, }); - const serviceZipCode = store.getters.order.serviceLocation.zipCode; const serviceType = store.getters.damage.isRepair ? "Repair" : "Replace"; const parentAccountNumber = store.getters.payment.parentAccountNumber; - const billToAccountNumber = 1; + const billToAccountNumber = 87291; const mobileFeePartPromise = getPricedMobileFeePart( serviceZipCode, diff --git a/src/store/index.js b/src/store/index.js index 1cdd77e80..b7f3fcf03 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -930,8 +930,8 @@ export const actions = { return globalMethods.callMockHttpClient({ method: endpoints.GetServiceabilityDetails.method, //TODO: Remove Mocky Endpoints - endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable - //endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847" // ForcedInShop + //endpoint: "https://run.mocky.io/v3/59e1a644-cf16-4f08-8069-1ab2a1e38f79", // NoShopsAvailable + endpoint: "https://run.mocky.io/v3/4fe1fb89-dd56-4e4a-9af2-96bd1ab77847", // ForcedInShop //endpoint: "https://run.mocky.io/v3/e2eaa097-6ea5-4906-af53-901edaa94939", // ForcedMobile }); },