Skip to content

Commit

Permalink
Merge pull request #498 from R-Sourabh/#494-update-product-identifier…
Browse files Browse the repository at this point in the history
…s-fix

Fixed: Allowed users to successfully update product identifiers(#494)
  • Loading branch information
ymaheshwari1 authored Jan 27, 2025
2 parents 551bc9b + 774433b commit 9c070a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const actions: ActionTree<UserState, RootState> = {
}, []);
// TODO Use a separate API for getting facilities, this should handle user like admin accessing the app
const currentEComStore = await UserService.getCurrentEComStore(token, getCurrentFacilityId());

await useUserStore().setEComStorePreference(currentEComStore);
/* ---- Guard clauses ends here --- */

setPermissions(appPermissions);
Expand Down Expand Up @@ -184,6 +184,7 @@ const actions: ActionTree<UserState, RootState> = {
dispatch("order/clearOrders", null, {root: true})
dispatch("product/clearProducts", null, {root: true})
const eComStore = await UserService.getCurrentEComStore(token, facilityId);
await useUserStore().setEComStorePreference(eComStore);
commit(types.USER_CURRENT_ECOM_STORE_UPDATED, eComStore)
await useProductIdentificationStore().getIdentificationPref(eComStore?.productStoreId)
},
Expand Down

0 comments on commit 9c070a3

Please sign in to comment.