@appcorp/fusion-storybook 0.5.19 → 0.5.23
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.
- package/base-modules/fee-structure/context/fee-structure-api-provider.js +48 -18
- package/base-modules/fee-structure/context/shared.d.ts +5 -0
- package/base-modules/fee-structure/context/shared.js +3 -0
- package/base-modules/fee-structure/context/use-fee-structure-module.d.ts +1 -0
- package/base-modules/fee-structure/context/use-fee-structure-module.js +35 -26
- package/base-modules/fee-structure/form.js +16 -48
- package/base-modules/fee-structure/more-actions.js +68 -14
- package/base-modules/fee-structure/page.js +52 -25
- package/base-modules/fee-structure/validate.d.ts +8 -1
- package/base-modules/fee-structure/validate.js +6 -1
- package/base-modules/fee-structure/view.js +20 -4
- package/base-modules/rbac/assign-permissions.js +5 -3
- package/base-modules/rbac/context.d.ts +8 -1
- package/base-modules/rbac/context.js +92 -65
- package/base-modules/rbac/page.js +6 -8
- package/base-modules/school/cache.js +0 -1
- package/base-modules/school/context.d.ts +0 -2
- package/base-modules/school/context.js +77 -18
- package/base-modules/school/drawer.js +1 -3
- package/base-modules/school/form.js +4 -23
- package/base-modules/school/page.js +2 -2
- package/base-modules/section/context.d.ts +6 -0
- package/base-modules/section/context.js +66 -34
- package/base-modules/section/form.js +2 -2
- package/base-modules/section/more-actions.js +71 -16
- package/base-modules/section/page.js +7 -3
- package/constants.d.ts +8 -2
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/resolve-rbac-permissions.js +8 -4
- package/base-modules/rbac/filter.d.ts +0 -1
- package/base-modules/rbac/filter.js +0 -20
- package/base-modules/rbac/more-actions.d.ts +0 -1
- package/base-modules/rbac/more-actions.js +0 -12
- package/base-modules/school/filter.d.ts +0 -1
- package/base-modules/school/filter.js +0 -13
- package/base-modules/school/more-actions.d.ts +0 -1
- package/base-modules/school/more-actions.js +0 -13
|
@@ -117,11 +117,13 @@ export function resolveRbacPermissions({ userRole, moduleName, }) {
|
|
|
117
117
|
[USER_ROLE.PARENT]: false,
|
|
118
118
|
}[userRole] || false);
|
|
119
119
|
}
|
|
120
|
+
// The API seed grants fee-structure READ_WRITE to STAFF, so the page must
|
|
121
|
+
// be reachable by the people who can operate it.
|
|
120
122
|
if (moduleName === "Fee Structure") {
|
|
121
123
|
return ({
|
|
122
124
|
[USER_ROLE.SUPER_ADMIN]: true,
|
|
123
125
|
[USER_ROLE.SCHOOL_ADMIN]: true,
|
|
124
|
-
[USER_ROLE.STAFF]:
|
|
126
|
+
[USER_ROLE.STAFF]: true,
|
|
125
127
|
[USER_ROLE.TEACHER]: false,
|
|
126
128
|
[USER_ROLE.STUDENT]: false,
|
|
127
129
|
[USER_ROLE.PARENT]: false,
|
|
@@ -284,14 +286,16 @@ export function resolveRbacPermissions({ userRole, moduleName, }) {
|
|
|
284
286
|
[USER_ROLE.PARENT]: false,
|
|
285
287
|
}[userRole] || false);
|
|
286
288
|
}
|
|
289
|
+
// Section is a management surface; teachers/students/parents keep API
|
|
290
|
+
// READ for dropdowns but do not get the page.
|
|
287
291
|
if (moduleName === "Section") {
|
|
288
292
|
return ({
|
|
289
293
|
[USER_ROLE.SUPER_ADMIN]: true,
|
|
290
294
|
[USER_ROLE.SCHOOL_ADMIN]: true,
|
|
291
295
|
[USER_ROLE.STAFF]: true,
|
|
292
|
-
[USER_ROLE.TEACHER]:
|
|
293
|
-
[USER_ROLE.STUDENT]:
|
|
294
|
-
[USER_ROLE.PARENT]:
|
|
296
|
+
[USER_ROLE.TEACHER]: false,
|
|
297
|
+
[USER_ROLE.STUDENT]: false,
|
|
298
|
+
[USER_ROLE.PARENT]: false,
|
|
295
299
|
}[userRole] || false);
|
|
296
300
|
}
|
|
297
301
|
if (moduleName === "Subject") {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RbacFilter: () => import("react").JSX.Element;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* RBAC Filter Component
|
|
5
|
-
*
|
|
6
|
-
* Filter UI for the RBAC module. Currently a placeholder
|
|
7
|
-
* since roles don't have enabled/status fields.
|
|
8
|
-
*/
|
|
9
|
-
import { useRbacModule } from "./context";
|
|
10
|
-
import { useTranslations } from "next-intl";
|
|
11
|
-
export const RbacFilter = () => {
|
|
12
|
-
const { applyFilters, clearFilters, closeDrawer } = useRbacModule();
|
|
13
|
-
const t = useTranslations("rbac");
|
|
14
|
-
return (_jsxs("div", { className: "space-y-4", children: [_jsx("p", { className: "text-muted-foreground text-sm", children: t("filterTextDescription") }), _jsxs("div", { className: "mt-4 flex gap-2", children: [_jsx("button", { className: "text-muted-foreground text-sm underline", onClick: () => {
|
|
15
|
-
clearFilters();
|
|
16
|
-
closeDrawer();
|
|
17
|
-
}, children: t("drawerButtonClearFilter") }), _jsx("button", { className: "text-sm underline", onClick: () => {
|
|
18
|
-
applyFilters();
|
|
19
|
-
}, children: t("drawerButtonApply") })] })] }));
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RbacMoreActions: () => import("react").JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* RBAC More Actions Component
|
|
5
|
-
*
|
|
6
|
-
* Placeholder for additional actions like bulk operations, exports, etc.
|
|
7
|
-
*/
|
|
8
|
-
import { useTranslations } from "next-intl";
|
|
9
|
-
export const RbacMoreActions = () => {
|
|
10
|
-
const t = useTranslations("rbac");
|
|
11
|
-
return (_jsx("div", { className: "space-y-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: t("moreActionsTextPlaceholder") }) }));
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SchoolFilter: () => import("react").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* School Filter
|
|
5
|
-
*
|
|
6
|
-
* Placeholder component for school filters.
|
|
7
|
-
* Currently no filters are available for schools.
|
|
8
|
-
*/
|
|
9
|
-
import { useTranslations } from "next-intl";
|
|
10
|
-
export const SchoolFilter = () => {
|
|
11
|
-
const t = useTranslations("school");
|
|
12
|
-
return (_jsx("div", { className: "p-6 text-center text-muted-foreground", children: _jsx("p", { children: t("filterFallbackText") }) }));
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SchoolMoreActions: () => import("react").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* School More Actions
|
|
5
|
-
*
|
|
6
|
-
* Placeholder component for additional school actions.
|
|
7
|
-
* Currently no additional actions are available for schools.
|
|
8
|
-
*/
|
|
9
|
-
import { useTranslations } from "next-intl";
|
|
10
|
-
export const SchoolMoreActions = () => {
|
|
11
|
-
const t = useTranslations("school");
|
|
12
|
-
return (_jsx("div", { className: "p-6 text-center text-muted-foreground", children: _jsx("p", { children: t("moreActionsFallbackText") }) }));
|
|
13
|
-
};
|