@appcorp/fusion-storybook 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
27
27
  import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
28
28
  import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
29
29
  import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
30
+ import { USER_ROLE } from "../../type";
30
31
  import { RBAC_API_ROUTES, pageLimit } from "./constants";
31
32
  import { getCachedRoles, invalidateRolesCache } from "./cache";
32
33
  import { roleFormValidation } from "./validate";
@@ -452,13 +453,13 @@ export const useRbacModule = () => {
452
453
  order: 1,
453
454
  },
454
455
  {
455
- enabled: true,
456
+ enabled: false,
456
457
  handleOnClick: handleEdit,
457
458
  label: t("actionsButtonEdit"),
458
459
  order: 2,
459
460
  },
460
461
  {
461
- enabled: true,
462
+ enabled: false,
462
463
  handleOnClick: handleDelete,
463
464
  label: t("actionsButtonDelete"),
464
465
  order: 4,
@@ -479,7 +480,7 @@ export const useRbacModule = () => {
479
480
  dispatch({
480
481
  type: RBAC_ACTION_TYPES.SET_ITEMS,
481
482
  payload: {
482
- items: items.filter((item) => item.name !== "SUPER_ADMIN") || [],
483
+ items: items.filter((item) => item.userRole !== USER_ROLE.SUPER_ADMIN) || [],
483
484
  count: count || 0,
484
485
  },
485
486
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",