@appcorp/fusion-storybook 0.4.61 → 0.4.63

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.
@@ -28,6 +28,7 @@ import { useDebounce } from "@react-pakistan/util-functions/hooks/use-debounce";
28
28
  import { createGenericModule } from "@react-pakistan/util-functions/factory/generic-module-factory";
29
29
  import { DRAWER_TYPES } from "@react-pakistan/util-functions/factory/generic-component-factory";
30
30
  import { generateThemeToast, TOAST_VARIANT, } from "@appcorp/shadcn/lib/toast-utils";
31
+ import { USER_ROLE } from "../../type";
31
32
  import { pageLimit } from "./constants";
32
33
  import { RBAC_API_ROUTES } from "../../constants";
33
34
  import { roleFormValidation } from "./validate";
@@ -97,6 +98,7 @@ export const useRbacModule = () => {
97
98
  currentPage: state.currentPage,
98
99
  pageLimit: state.pageLimit,
99
100
  searchQuery: debouncedQuery,
101
+ isSystem: "false",
100
102
  }), [state.currentPage, state.pageLimit, debouncedQuery]);
101
103
  const updateParams = useMemo(() => ({
102
104
  id: state.id,
@@ -137,7 +139,7 @@ export const useRbacModule = () => {
137
139
  }
138
140
  if (data) {
139
141
  const response = data;
140
- const items = (_b = (_a = response.items) !== null && _a !== void 0 ? _a : response.roles) !== null && _b !== void 0 ? _b : [];
142
+ const items = ((_b = (_a = response.items) !== null && _a !== void 0 ? _a : response.roles) !== null && _b !== void 0 ? _b : []).filter((role) => role.userRole !== USER_ROLE.SUPER_ADMIN);
141
143
  const count = typeof response.count === "number" ? response.count : 0;
142
144
  dispatch({
143
145
  type: RBAC_ACTION_TYPES.SET_ITEMS,
@@ -75,10 +75,10 @@ export const StudentFeeForm = () => {
75
75
  searchParams: { schoolId: (_g = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _g === void 0 ? void 0 : _g.id },
76
76
  searchPlaceholder: t("formSearchStudentsPlaceholder"),
77
77
  formatSearchResult: (item) => {
78
- var _a, _b;
78
+ var _a, _b, _c;
79
79
  const student = item;
80
80
  return {
81
- label: `${(_a = student === null || student === void 0 ? void 0 : student.familyMember) === null || _a === void 0 ? void 0 : _a.firstName} ${(_b = student === null || student === void 0 ? void 0 : student.familyMember) === null || _b === void 0 ? void 0 : _b.lastName}`,
81
+ label: `${((_a = item.familyMember) === null || _a === void 0 ? void 0 : _a.firstName) || ""} ${((_b = item.familyMember) === null || _b === void 0 ? void 0 : _b.lastName) || ""} - ${((_c = item.computerNumber) !== null && _c !== void 0 ? _c : "").split(":")[1] || item.computerNumber || ""}`,
82
82
  value: student.id,
83
83
  };
84
84
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.4.61",
3
+ "version": "0.4.63",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",