Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: Passed method to fetch good identification types in order to display product identifier options dynamically(dxp-345) #455

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/adapter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
getConfig,
getNotificationEnumIds,
getNotificationUserPrefTypeIds,
fetchGoodIdentificationTypes,
getProductIdentificationPref,
getUserFacilities,
hasError,
Expand All @@ -28,6 +29,7 @@ export {
getConfig,
getNotificationEnumIds,
getNotificationUserPrefTypeIds,
fetchGoodIdentificationTypes,
getProductIdentificationPref,
getUserFacilities,
hasError,
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* Login user and return token
*/
async login ({ commit, dispatch, getters }, payload) {

Check warning on line 37 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'getters' is defined but never used

Check warning on line 37 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'getters' is defined but never used
try {
const {token, oms} = payload;
dispatch("setUserInstanceUrl", oms);
Expand Down Expand Up @@ -176,6 +176,7 @@
* 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);
Expand All @@ -184,7 +185,7 @@
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)
Expand Down Expand Up @@ -366,7 +367,7 @@
commit(types.USER_BOPIS_PRODUCT_STORE_SETTINGS_UPDATED, settingValues)
},

async createProductStoreSetting({ commit }, enumeration) {

Check warning on line 370 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 370 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
const fromDate = Date.now()

try {
Expand Down
Loading