From 1b68ab65bdbc130485d88e471874e06cfc6938a6 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 25 Oct 2024 11:26:13 +0530 Subject: [PATCH 1/2] Improved: oms-api version to latest release --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f5310b7..fa6c8230 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", "@hotwax/dxp-components": "^1.15.3", - "@hotwax/oms-api": "^1.14.0", + "@hotwax/oms-api": "^1.16.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", "@ionic/vue-router": "^7.6.0", @@ -2868,9 +2868,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 268e126d..c7af6150 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", "@hotwax/dxp-components": "^1.15.3", - "@hotwax/oms-api": "^1.14.0", + "@hotwax/oms-api": "^1.16.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", "@ionic/vue-router": "^7.6.0", From b28ba1ee8884186a2414ac085c321fd830706fd0 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 25 Oct 2024 11:34:42 +0530 Subject: [PATCH 2/2] Improved: code to pass the token in the client method when fetching ecom stores --- src/store/modules/user/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 1faa9f19..3d62a293 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -174,7 +174,8 @@ const actions: ActionTree = { * update current facility information */ async setFacility ({ commit, dispatch }, payload) { - const eComStore = await UserService.getEComStores(undefined, payload.facility.facilityId); + const token = store.getters['user/getUserToken']; + const eComStore = await UserService.getEComStores(token, payload.facility.facilityId); commit(types.USER_CURRENT_ECOM_STORE_UPDATED, eComStore); commit(types.USER_CURRENT_FACILITY_UPDATED, payload.facility);