@appcorp/fusion-storybook 0.1.61 → 0.1.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.
@@ -78,40 +78,30 @@ export const { actionTypes: WORKSPACE_USER_ACTION_TYPES, config: workspaceUserMo
78
78
  // ENHANCED WORKSPACE USER HOOK WITH API INTEGRATION
79
79
  // ============================================================================
80
80
  export const useWorkspaceUserModule = () => {
81
- var _a;
82
81
  const context = useWorkspaceUserContext();
83
82
  const { state, dispatch } = context;
84
83
  const t = useTranslations("workspaceUser");
85
84
  const debouncedQuery = useDebounce(state.searchQuery, 800);
86
85
  const workspace = getCachedWorkspaceSync();
87
- const schoolId = ((_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id) || "";
88
86
  // ============================================================================
89
87
  // API PARAMETERS
90
88
  // ============================================================================
91
- const listParams = useMemo(() => (Object.assign(Object.assign({ currentPage: state.currentPage, pageLimit: state.pageLimit, schoolId }, (debouncedQuery ? { searchQuery: debouncedQuery } : {})), (state.filterEnabled !== undefined
89
+ const listParams = useMemo(() => (Object.assign(Object.assign({ currentPage: state.currentPage, pageLimit: state.pageLimit, workspaceId: workspace === null || workspace === void 0 ? void 0 : workspace.id }, (debouncedQuery ? { searchQuery: debouncedQuery } : {})), (state.filterEnabled !== undefined
92
90
  ? { filterEnabled: String(state.filterEnabled) }
93
91
  : {}))), [
94
92
  state.currentPage,
95
93
  state.filterEnabled,
96
94
  state.pageLimit,
97
95
  debouncedQuery,
98
- schoolId,
96
+ workspace === null || workspace === void 0 ? void 0 : workspace.id,
99
97
  ]);
100
98
  const updateParams = useMemo(() => ({
101
99
  enabled: state.enabled,
102
100
  id: state.id,
103
101
  roleId: state.roleId,
104
- schoolId,
105
102
  userId: state.userId,
106
- workspaceId: state.workspaceId,
107
- }), [
108
- state.enabled,
109
- state.id,
110
- state.roleId,
111
- state.userId,
112
- state.workspaceId,
113
- schoolId,
114
- ]);
103
+ workspaceId: workspace === null || workspace === void 0 ? void 0 : workspace.id,
104
+ }), [state.enabled, state.id, state.roleId, state.userId, workspace === null || workspace === void 0 ? void 0 : workspace.id]);
115
105
  const byIdParams = useMemo(() => ({ id: state.id }), [state.id]);
116
106
  const deleteParams = useMemo(() => ({ id: state.id }), [state.id]);
117
107
  // ============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",