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

Fixed: Allowed users to successfully update product identifiers(#430) #433

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 5 additions & 4 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@
return uniqueFacilities
}, []);

const currentFacility: any = getCurrentFacilityId();
const currentEComStore = await UserService.getEComStores(token, currentFacility?.facilityId);
const currentFacilityId: any = getCurrentFacilityId();
const currentEComStore = await UserService.getEComStores(token, currentFacilityId);
await useUserStore().setEComStorePreference(currentEComStore);
const productStoreId = currentEComStore?.productStoreId;

await useProductIdentificationStore().getIdentificationPref(productStoreId)
Expand All @@ -90,7 +91,7 @@
commit(types.USER_PERMISSIONS_UPDATED, appPermissions);
commit(types.USER_TOKEN_CHANGED, { newToken: token })
// Get facility location of selected facility
dispatch('getFacilityLocations', currentFacility.facilityId);
dispatch('getFacilityLocations', currentFacilityId);
// TODO: fetch product identifications from enumeration instead of storing it in env
this.dispatch('util/getForceScanSetting', currentEComStore?.productStoreId);
this.dispatch('util/getBarcodeIdentificationPref', currentEComStore?.productStoreId);
Expand Down Expand Up @@ -157,7 +158,7 @@
/**
* update current eComStore information
*/
async setEComStore({ commit, dispatch }, payload) {

Check warning on line 161 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)

'dispatch' is defined but never used

Check warning on line 161 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)

'dispatch' is defined but never used
commit(types.USER_CURRENT_ECOM_STORE_UPDATED, payload.eComStore);
await UserService.setUserPreference({
'userPrefTypeId': 'SELECTED_BRAND',
Expand All @@ -174,7 +175,7 @@
async setFacility ({ commit, dispatch }, facilityId) {
const token = store.getters['user/getUserToken'];
const eComStore = await UserService.getEComStores(token, facilityId);

await useUserStore().setEComStorePreference(eComStore);
commit(types.USER_CURRENT_ECOM_STORE_UPDATED, eComStore);
await dispatch('getFacilityLocations', facilityId)
eComStore?.productStoreId ? this.dispatch('util/getForceScanSetting', eComStore.productStoreId) : this.dispatch('util/updateForceScanStatus', false)
Expand Down
Loading