From 774433be877810813d5b66670f3c9fcee1a98a6d Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Mon, 27 Jan 2025 18:10:34 +0530 Subject: [PATCH] Fixed: Allowed users to successfully update product identifiers(#494) --- 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 ba8c12abd..92fe37e48 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -84,7 +84,7 @@ const actions: ActionTree = { }, []); // 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); @@ -184,6 +184,7 @@ const actions: ActionTree = { 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) },