Skip to content

Commit

Permalink
Fixed: Allowed users to successfully update product identifiers(hotwa…
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Jan 27, 2025
1 parent 551bc9b commit 774433b
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 774433b

Please sign in to comment.