From fc8debc871cfd918c9e5bdfaba4a3aca08f5b99a Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 7 Jun 2023 12:54:48 -0400 Subject: [PATCH] Updates for CMS provider/serviceloc ctu --- src/layouts/schedule/location-alerts/location-alerts.vue | 8 ++++++-- src/layouts/schedule/schedule.vue | 5 ++++- src/layouts/service-location/service-location.vue | 1 + src/store/index.js | 4 +++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/layouts/schedule/location-alerts/location-alerts.vue b/src/layouts/schedule/location-alerts/location-alerts.vue index 0f8c7b46d..66f26e263 100644 --- a/src/layouts/schedule/location-alerts/location-alerts.vue +++ b/src/layouts/schedule/location-alerts/location-alerts.vue @@ -36,8 +36,12 @@ export default { }, }, methods: { - loadInitialData(zipCodeCtu) { - return getAlertReasons(zipCodeCtu); + loadInitialData(serviceLocationCtu, providerCtu) { + let ctuToUse = serviceLocationCtu; + if (providerCtu) { + ctuToUse = providerCtu; + } + return getAlertReasons(ctuToUse); }, initializeComponent(initialData) { this.alertReasons = initialData; diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index fe9f3dac8..68ccd593c 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -50,6 +50,7 @@ import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; import { Form, defineRule } from "vee-validate"; +import { processIfStatements } from "@/helpers/cms-content-helper"; import datePicker from "@/digital-components/date-picker/date-picker"; import locationAlerts from "@/layouts/schedule/location-alerts/location-alerts"; import timeSlotModalQuestion from "./time-slot-modal-question/time-slot-modal-question"; @@ -146,7 +147,8 @@ export default { }); const alertReasonsPromise = locationAlerts.methods.loadInitialData( - store.getters.order.serviceLocation.zipCodeCtu + store.getters.order.serviceLocation.zipCodeCtu, + store.getters.order.serviceLocation.provider?.address?.zipCtu ); // Settle promises and get results const promiseResultMap = [ @@ -227,6 +229,7 @@ export default { splitCopyOnCMSPlaceHolder, getRouterLinkRouteFromCopy, getRouterLinkDisplayTextFromCopy, + processIfStatements, arePagePrerequisitesValid() { const serviceLocation = store.getters.order.serviceLocation; const serviceLocationPreReqs = diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 252eac529..fe1d4ae2b 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -394,6 +394,7 @@ export default { city: this.selectedProvider?.address?.city, state: this.selectedProvider?.address?.state, zip: this.selectedProvider?.address?.zipCode, + zipCtu: this.selectedProvider?.address?.zipCodeCtu, }, }, }, diff --git a/src/store/index.js b/src/store/index.js index eac41c311..1223a407a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -264,6 +264,8 @@ export const mutations = { serviceLocationInfo.provider?.address?.state; state.order.serviceLocation.provider.address.zip = serviceLocationInfo.provider?.address?.zip; + state.order.serviceLocation.provider.address.zipCtu = + serviceLocationInfo.provider?.address?.zipCtu; } }, updateSchedule(state, scheduleInfo) { @@ -1345,6 +1347,7 @@ export const actions = { city: order.serviceLocation.provider?.address?.city, state: order.serviceLocation.provider?.address?.state, zip: order.serviceLocation.provider?.address?.zip, + zipCtu: order.serviceLocation.provider?.address?.zipCtu, }, }, }, @@ -1799,7 +1802,6 @@ export const actions = { `&${availableLineItemsFormattedForRequest}`; const lineItemServerData = context.getters.order.lineItems.serverData; - if (lineItemServerData) { queryString += `&ServerData=${encodeURIComponent(lineItemServerData)}`; }