aq-fe-framework 0.1.723 → 0.1.725
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.
|
@@ -9358,7 +9358,7 @@ function Permission_ViewCheckMenuPermission({
|
|
|
9358
9358
|
import { Grid as Grid3, Stack as Stack4 } from "@mantine/core";
|
|
9359
9359
|
import { useState as useState13 } from "react";
|
|
9360
9360
|
import { jsx as jsx85, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9361
|
-
function Feat_accessControl({ menuData
|
|
9361
|
+
function Feat_accessControl({ menuData }) {
|
|
9362
9362
|
const accountIdState = useState13();
|
|
9363
9363
|
const memuPermissionState = useState13();
|
|
9364
9364
|
return /* @__PURE__ */ jsxs45(Grid3, { children: [
|
|
@@ -9377,7 +9377,7 @@ function Feat_accessControl({ menuData: menuData2 }) {
|
|
|
9377
9377
|
roleOrUserId: parseInt(accountIdState[0]),
|
|
9378
9378
|
value: memuPermissionState[0],
|
|
9379
9379
|
onChange: memuPermissionState[1],
|
|
9380
|
-
menuDataRoot:
|
|
9380
|
+
menuDataRoot: menuData
|
|
9381
9381
|
}
|
|
9382
9382
|
),
|
|
9383
9383
|
/* @__PURE__ */ jsx85(
|
|
@@ -9462,7 +9462,7 @@ function Adapter_RoleTable(_a) {
|
|
|
9462
9462
|
import { Grid as Grid4, Stack as Stack5 } from "@mantine/core";
|
|
9463
9463
|
import { useState as useState14 } from "react";
|
|
9464
9464
|
import { jsx as jsx88, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9465
|
-
function Feat_accessControlLevel({ menuData
|
|
9465
|
+
function Feat_accessControlLevel({ menuData }) {
|
|
9466
9466
|
const accountIdState = useState14();
|
|
9467
9467
|
const memuPermissionState = useState14();
|
|
9468
9468
|
return /* @__PURE__ */ jsxs46(Grid4, { children: [
|
|
@@ -9480,7 +9480,7 @@ function Feat_accessControlLevel({ menuData: menuData2 }) {
|
|
|
9480
9480
|
roleOrUserId: parseInt(accountIdState[0]),
|
|
9481
9481
|
value: memuPermissionState[0],
|
|
9482
9482
|
onChange: memuPermissionState[1],
|
|
9483
|
-
menuDataRoot:
|
|
9483
|
+
menuDataRoot: menuData
|
|
9484
9484
|
}
|
|
9485
9485
|
),
|
|
9486
9486
|
/* @__PURE__ */ jsx88(
|
|
@@ -14186,7 +14186,7 @@ function Usecase_PageContentTable(_a) {
|
|
|
14186
14186
|
// src/modules-features/admin/core/pageContent/Feat_PageContentTable.tsx
|
|
14187
14187
|
import { useMemo as useMemo31 } from "react";
|
|
14188
14188
|
import { jsx as jsx188 } from "react/jsx-runtime";
|
|
14189
|
-
function Feat_PageContentTable({ menuData
|
|
14189
|
+
function Feat_PageContentTable({ menuData }) {
|
|
14190
14190
|
const query = useMyReactQuery({
|
|
14191
14191
|
queryKey: ["pages"],
|
|
14192
14192
|
axiosFn: () => service_page.getAll()
|
|
@@ -14201,13 +14201,13 @@ function Feat_PageContentTable({ menuData: menuData2 }) {
|
|
|
14201
14201
|
query.data.forEach((item) => {
|
|
14202
14202
|
labelMap.set(item.id, item);
|
|
14203
14203
|
});
|
|
14204
|
-
return extractLinkedMenuItems(
|
|
14204
|
+
return extractLinkedMenuItems(menuData).map((item) => {
|
|
14205
14205
|
if (labelMap.get(item.pageId) == void 0) return void 0;
|
|
14206
14206
|
return __spreadProps(__spreadValues({}, labelMap.get(item.pageId)), {
|
|
14207
14207
|
name: item.label
|
|
14208
14208
|
});
|
|
14209
14209
|
});
|
|
14210
|
-
}, [query.data,
|
|
14210
|
+
}, [query.data, menuData]).filter(Boolean);
|
|
14211
14211
|
return /* @__PURE__ */ jsx188(
|
|
14212
14212
|
Usecase_PageContentTable,
|
|
14213
14213
|
{
|
|
@@ -14257,7 +14257,7 @@ function F_pageContentConfig_Save({ menuValues }) {
|
|
|
14257
14257
|
|
|
14258
14258
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
|
|
14259
14259
|
import { jsx as jsx191, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
14260
|
-
function F_pageContentConfig_ReadMenu({ menuData
|
|
14260
|
+
function F_pageContentConfig_ReadMenu({ menuData }) {
|
|
14261
14261
|
const pageContentQuery = useMyReactQuery({
|
|
14262
14262
|
queryKey: ["pageContents"],
|
|
14263
14263
|
axiosFn: () => service_page.getAll()
|
|
@@ -14269,8 +14269,8 @@ function F_pageContentConfig_ReadMenu({ menuData: menuData2 }) {
|
|
|
14269
14269
|
}));
|
|
14270
14270
|
};
|
|
14271
14271
|
const flattenMenu = useMemo32(
|
|
14272
|
-
() => extractLinkedMenuItems(
|
|
14273
|
-
[
|
|
14272
|
+
() => extractLinkedMenuItems(menuData || []),
|
|
14273
|
+
[menuData]
|
|
14274
14274
|
);
|
|
14275
14275
|
const sortedPageContents = useMemo32(() => {
|
|
14276
14276
|
if (!pageContentQuery.data) return [];
|
|
@@ -14353,8 +14353,8 @@ function F_pageContentConfig_ReadMenu({ menuData: menuData2 }) {
|
|
|
14353
14353
|
|
|
14354
14354
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig.tsx
|
|
14355
14355
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
14356
|
-
function F_pageContentConfig({ menuData
|
|
14357
|
-
return /* @__PURE__ */ jsx192(F_pageContentConfig_ReadMenu, { menuData
|
|
14356
|
+
function F_pageContentConfig({ menuData }) {
|
|
14357
|
+
return /* @__PURE__ */ jsx192(F_pageContentConfig_ReadMenu, { menuData });
|
|
14358
14358
|
}
|
|
14359
14359
|
|
|
14360
14360
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
|
|
@@ -16099,43 +16099,6 @@ function Feat_Authenticate_Logout({ redirectURL = "/auth/login" }) {
|
|
|
16099
16099
|
}, leftSection: /* @__PURE__ */ jsx230(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
|
16100
16100
|
}
|
|
16101
16101
|
|
|
16102
|
-
// src/data/menuData.ts
|
|
16103
|
-
var menuData = [
|
|
16104
|
-
{
|
|
16105
|
-
label: "Qu\u1EA3n l\xED h\u1EC7 th\u1ED1ng",
|
|
16106
|
-
links: [
|
|
16107
|
-
{ pageId: 1, name: "Account management", label: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n", link: "accountManagement" },
|
|
16108
|
-
{ pageId: 100009, name: "Account group management", label: "Qu\u1EA3n l\xED nh\xF3m t\xE0i kho\u1EA3n", link: "roleManagement" },
|
|
16109
|
-
{ pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "accessControlLevel" },
|
|
16110
|
-
{ pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "accessControl" },
|
|
16111
|
-
{ pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "securityPolicyDocs" },
|
|
16112
|
-
{ pageId: 5, name: "System updates", label: "Th\xF4ng tin x\xE2y d\u1EF1ng, c\u1EA3i ti\u1EBFn, b\u1EA3o tr\xEC h\u1EC7 th\u1ED1ng", link: "systemUpdateDocs" },
|
|
16113
|
-
{ pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "userGuideDocs" }
|
|
16114
|
-
]
|
|
16115
|
-
},
|
|
16116
|
-
{
|
|
16117
|
-
label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
|
|
16118
|
-
links: [
|
|
16119
|
-
{ pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "organizationPolicyDocs" },
|
|
16120
|
-
{ pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "workflowProcessDocs" },
|
|
16121
|
-
{ pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "formTemplateDocs" }
|
|
16122
|
-
]
|
|
16123
|
-
},
|
|
16124
|
-
{
|
|
16125
|
-
label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng",
|
|
16126
|
-
links: [
|
|
16127
|
-
{ pageId: 100001, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "documentCategories" },
|
|
16128
|
-
{ pageId: 100011, name: "Code config", label: "Danh m\u1EE5c b\u1ED9 \u0111\u1EBFm", link: "codeFormula" },
|
|
16129
|
-
{ pageId: 100002, name: "mailConfig", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "mailConfig" },
|
|
16130
|
-
{ pageId: 100010, name: "Mail template", label: "M\u1EABu Mail th\xF4ng b\xE1o", link: "mailTemplate" },
|
|
16131
|
-
{ pageId: 100003, name: "pageContentConfig", label: "Danh m\u1EE5c Page Content", link: "pageContent" },
|
|
16132
|
-
{ pageId: 100006, name: "Department list", label: "Danh m\u1EE5c \u0111\u01A1n v\u1ECB", link: "departmentList" },
|
|
16133
|
-
{ pageId: 100007, name: "Academic year", label: "Danh m\u1EE5c n\u0103m h\u1ECDc", link: "academicYear" },
|
|
16134
|
-
{ pageId: 100004, name: "moduleConfig", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" }
|
|
16135
|
-
]
|
|
16136
|
-
}
|
|
16137
|
-
];
|
|
16138
|
-
|
|
16139
16102
|
// src/modules-features/authenticate/Feat_Authenticate_SSOHandler.tsx
|
|
16140
16103
|
import { useSearchParams } from "next/navigation";
|
|
16141
16104
|
import { useEffect as useEffect32, useState as useState25 } from "react";
|
|
@@ -16164,6 +16127,7 @@ function useAuthenticateManager() {
|
|
|
16164
16127
|
// src/modules-features/authenticate/Feat_Authenticate_SSOHandler.tsx
|
|
16165
16128
|
import { jsx as jsx231, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
16166
16129
|
function Feat_Authenticate_SSOHandler({
|
|
16130
|
+
menuData,
|
|
16167
16131
|
onSuccessNavigateFollowRole
|
|
16168
16132
|
}) {
|
|
16169
16133
|
const manager = useAuthenticateManager();
|
|
@@ -16175,6 +16139,7 @@ function Feat_Authenticate_SSOHandler({
|
|
|
16175
16139
|
const studentCode = searchParams.get("code");
|
|
16176
16140
|
const token = searchParams.get("token");
|
|
16177
16141
|
useEffect32(() => {
|
|
16142
|
+
localStorage.clear();
|
|
16178
16143
|
if (config3.isLoading == true) return;
|
|
16179
16144
|
if (studentCode && token) {
|
|
16180
16145
|
loginSSO(studentCode, token);
|
|
@@ -16200,7 +16165,7 @@ function Feat_Authenticate_SSOHandler({
|
|
|
16200
16165
|
if ((data2 == null ? void 0 : data2.isSuccess) && ((_a = data2 == null ? void 0 : data2.data) == null ? void 0 : _a.token)) {
|
|
16201
16166
|
manager.onLoginSuccessSaveStore({ data: data2.data });
|
|
16202
16167
|
const firstPageIdCanView = (_c = (_b = data2.data.permissions) == null ? void 0 : _b.find((element) => element.isRead)) == null ? void 0 : _c.pageId;
|
|
16203
|
-
const flatmenu = extractLinkedMenuItems(menuData);
|
|
16168
|
+
const flatmenu = extractLinkedMenuItems(menuData || []);
|
|
16204
16169
|
const first = flatmenu.find((item) => item.pageId == firstPageIdCanView);
|
|
16205
16170
|
onSuccessNavigateFollowRole(data2.data || [], first);
|
|
16206
16171
|
} else {
|
package/dist/core/index.mjs
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
MyStatsCard,
|
|
26
26
|
MyTextInput2 as MyTextInput,
|
|
27
27
|
MyWeeklySessionSchedulerPicker
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-RW6TLBQ2.mjs";
|
|
29
29
|
import "../chunk-SUH3FFFV.mjs";
|
|
30
30
|
import "../chunk-2B2FKBKX.mjs";
|
|
31
31
|
import "../chunk-7PUDC2WF.mjs";
|
|
@@ -954,7 +954,7 @@ interface Feat_Authenticate_SSOHandlerProps {
|
|
|
954
954
|
onSuccessNavigateFollowRole: (data: ISignInRes, firstMenuPermission?: I_BasicAppShell_LinkItem) => void;
|
|
955
955
|
menuData?: I_BasicAppShell_LinkItem[];
|
|
956
956
|
}
|
|
957
|
-
declare function Feat_Authenticate_SSOHandler({ onSuccessNavigateFollowRole }: Feat_Authenticate_SSOHandlerProps): react_jsx_runtime.JSX.Element;
|
|
957
|
+
declare function Feat_Authenticate_SSOHandler({ menuData, onSuccessNavigateFollowRole }: Feat_Authenticate_SSOHandlerProps): react_jsx_runtime.JSX.Element;
|
|
958
958
|
|
|
959
959
|
declare function F_authenticate_SplashPage(): react_jsx_runtime.JSX.Element;
|
|
960
960
|
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
MailTemplateDeleteButton,
|
|
113
113
|
useS_authenticate,
|
|
114
114
|
useS_moduleConfig
|
|
115
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-RW6TLBQ2.mjs";
|
|
116
116
|
import "../chunk-SUH3FFFV.mjs";
|
|
117
117
|
import "../chunk-2B2FKBKX.mjs";
|
|
118
118
|
import "../chunk-7PUDC2WF.mjs";
|