diff --git a/package-lock.json b/package-lock.json index abc17d0f5..388e113f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,8 +14,8 @@ "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", - "@hotwax/dxp-components": "^1.15.4", - "@hotwax/oms-api": "^1.14.0", + "@hotwax/dxp-components": "^1.15.5", + "@hotwax/oms-api": "^1.16.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", "@ionic/vue-router": "^7.6.0", @@ -2807,9 +2807,9 @@ "integrity": "sha512-zpUjGoY7LBlKeiP0V7tonrmoey8HQ5THQmyixQ+IDtrjmEJNBjynW/Ef3gC0FUNNPuVqxWPZdT5CVgaETLGTwg==" }, "node_modules/@hotwax/dxp-components": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.15.4.tgz", - "integrity": "sha512-dlgexo/QBLnLlPkq1zwfWBIPiVtmZKsRcPcCAwe+eFz9qPwyQORdzKb6YjX1WgtRU72GYMv345eA+HuaSY6H5w==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.15.5.tgz", + "integrity": "sha512-aOzipZwVk/fL6K7/BShsvE3eYqH8LagEQQpaNCPFtSs18KHgolGQxcKT3dQ1KRLTCmoKJugc7ut9uyxZVL5krg==", "dependencies": { "@hotwax/oms-api": "^1.8.1", "@ionic/core": "^7.6.0", @@ -2883,9 +2883,9 @@ } }, "node_modules/@hotwax/oms-api": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@hotwax/oms-api/-/oms-api-1.14.0.tgz", - "integrity": "sha512-dYkrFEi0oJHKiJ/VctKmyIY4WTVV2lmljm1EflgQ/LM7BTJ9jVEeT1zgYJ5vO906kW7SWM4pl7mZI3dDCt1YCQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@hotwax/oms-api/-/oms-api-1.16.0.tgz", + "integrity": "sha512-WZ3v0TxcHz5UZEBDX+GvZd/cqD08Kws42kGcseN2tfNf5kKWbfaDgWm6KEaBxLFuVBPBdRelRZhGj/nRIxBgGw==", "dependencies": { "@types/node-json-transform": "^1.0.0", "axios": "^0.21.1", diff --git a/package.json b/package.json index f28ae0d08..c77803ad4 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", - "@hotwax/dxp-components": "^1.15.4", - "@hotwax/oms-api": "^1.14.0", + "@hotwax/dxp-components": "^1.15.5", + "@hotwax/oms-api": "^1.16.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", "@ionic/vue-router": "^7.6.0", diff --git a/src/adapter/index.ts b/src/adapter/index.ts index db46dfd69..912c83bc3 100644 --- a/src/adapter/index.ts +++ b/src/adapter/index.ts @@ -4,6 +4,7 @@ import { getConfig, getNotificationEnumIds, getNotificationUserPrefTypeIds, + fetchGoodIdentificationTypes, getProductIdentificationPref, getUserFacilities, hasError, @@ -28,6 +29,7 @@ export { getConfig, getNotificationEnumIds, getNotificationUserPrefTypeIds, + fetchGoodIdentificationTypes, getProductIdentificationPref, getUserFacilities, hasError, diff --git a/src/main.ts b/src/main.ts index 2860cc564..2e6886eab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,7 +36,7 @@ import { dxpComponents } from '@hotwax/dxp-components' import localeMessages from './locales'; import { login, logout, loader } from '@/utils/user'; import { addNotification, storeClientRegistrationToken } from '@/utils/firebase'; -import { getConfig, getProductIdentificationPref, initialise, setProductIdentificationPref, setUserLocale, getAvailableTimeZones, setUserTimeZone } from '@/adapter'; +import { getConfig, fetchGoodIdentificationTypes, getProductIdentificationPref, initialise, setProductIdentificationPref, setUserLocale, getAvailableTimeZones, setUserTimeZone } from '@/adapter'; import logger from './logger'; const app = createApp(App) @@ -61,6 +61,7 @@ const app = createApp(App) appFirebaseVapidKey: process.env.VUE_APP_FIREBASE_VAPID_KEY, defaultImgUrl: require("@/assets/images/defaultImage.png"), getConfig, + fetchGoodIdentificationTypes, getProductIdentificationPref, initialise, loader, diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index abdebfade..a495d6ada 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -176,6 +176,7 @@ const actions: ActionTree = { * update current facility information */ async setFacility ({ commit, dispatch, state }, payload) { + const token = store.getters['user/getUserToken']; let facility = payload.facility; if(!facility && state.current?.facilities) { facility = state.current.facilities.find((facility: any) => facility.facilityId === payload.facilityId); @@ -184,7 +185,7 @@ const actions: ActionTree = { dispatch("order/clearOrders", null, {root: true}) dispatch("product/clearProducts", null, {root: true}) commit(types.USER_CURRENT_FACILITY_UPDATED, facility); - const eComStore = await UserService.getCurrentEComStore(undefined, facility?.facilityId); + const eComStore = await UserService.getCurrentEComStore(token, facility?.facilityId); commit(types.USER_CURRENT_ECOM_STORE_UPDATED, eComStore) await useProductIdentificationStore().getIdentificationPref(eComStore?.productStoreId)