aq-fe-framework 0.1.100 → 0.1.101
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.
|
@@ -1118,7 +1118,6 @@ import { usePathname, useRouter } from "next/navigation";
|
|
|
1118
1118
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1119
1119
|
|
|
1120
1120
|
// src/components/Layouts/BasicAppShell/useS_BasicAppShell.ts
|
|
1121
|
-
import { useEffect as useEffect3 } from "react";
|
|
1122
1121
|
var useStore = createGenericStore({
|
|
1123
1122
|
initialState: {
|
|
1124
1123
|
menuCode: "",
|
|
@@ -1150,16 +1149,17 @@ function useS_BasicAppShell() {
|
|
|
1150
1149
|
function clearGroupMenuOpenId() {
|
|
1151
1150
|
store.setProperty("groupMenuOpenId", []);
|
|
1152
1151
|
}
|
|
1153
|
-
|
|
1152
|
+
function setDefault() {
|
|
1154
1153
|
var _a, _b;
|
|
1155
1154
|
if (!GetAQModule_query.data) return;
|
|
1156
1155
|
store.setProperty("faviconFileDetail", (_a = GetAQModule_query.data) == null ? void 0 : _a.faviconFileDetail);
|
|
1157
1156
|
store.setProperty("logoFileDetail", (_b = GetAQModule_query.data) == null ? void 0 : _b.logoFileDetail);
|
|
1158
|
-
}
|
|
1157
|
+
}
|
|
1159
1158
|
return __spreadProps(__spreadValues({}, store), {
|
|
1160
1159
|
toggle,
|
|
1161
1160
|
toggleGroupMenuOpenId,
|
|
1162
|
-
clearGroupMenuOpenId
|
|
1161
|
+
clearGroupMenuOpenId,
|
|
1162
|
+
setDefault
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
@@ -1601,7 +1601,7 @@ import { Button as Button7, Divider, Fieldset, Group as Group8, Modal as Modal7,
|
|
|
1601
1601
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
|
1602
1602
|
|
|
1603
1603
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
|
1604
|
-
import { useEffect as
|
|
1604
|
+
import { useEffect as useEffect3, useMemo as useMemo3 } from "react";
|
|
1605
1605
|
import * as XLSX3 from "xlsx";
|
|
1606
1606
|
var useStore2 = createGenericStore({
|
|
1607
1607
|
initialState: {
|
|
@@ -1714,7 +1714,7 @@ function useS_ButtonImport() {
|
|
|
1714
1714
|
}))) || []
|
|
1715
1715
|
];
|
|
1716
1716
|
}, [store.state.title]);
|
|
1717
|
-
|
|
1717
|
+
useEffect3(() => {
|
|
1718
1718
|
if (store.state.file == null) {
|
|
1719
1719
|
store.resetState();
|
|
1720
1720
|
}
|
|
@@ -1735,7 +1735,7 @@ function useS_ButtonImport() {
|
|
|
1735
1735
|
};
|
|
1736
1736
|
reader.readAsArrayBuffer(store.state.file);
|
|
1737
1737
|
}, [store.state.file]);
|
|
1738
|
-
|
|
1738
|
+
useEffect3(() => {
|
|
1739
1739
|
var _a;
|
|
1740
1740
|
if (((_a = store.state.data) == null ? void 0 : _a.length) == 0) return;
|
|
1741
1741
|
autoMap();
|
|
@@ -6527,7 +6527,7 @@ import { createEventsServicePlugin } from "@schedule-x/events-service";
|
|
|
6527
6527
|
import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
|
6528
6528
|
import { Paper as Paper5, Text as Text6 } from "@mantine/core";
|
|
6529
6529
|
import "@schedule-x/theme-default/dist/index.css";
|
|
6530
|
-
import { useEffect as
|
|
6530
|
+
import { useEffect as useEffect4 } from "react";
|
|
6531
6531
|
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6532
6532
|
function MyCalendar() {
|
|
6533
6533
|
const plugins = [createEventsServicePlugin(), createEventModalPlugin()];
|
|
@@ -6599,7 +6599,7 @@ function MyCalendar() {
|
|
|
6599
6599
|
}
|
|
6600
6600
|
]
|
|
6601
6601
|
}, plugins);
|
|
6602
|
-
|
|
6602
|
+
useEffect4(() => {
|
|
6603
6603
|
calendar == null ? void 0 : calendar.events.getAll();
|
|
6604
6604
|
}, []);
|
|
6605
6605
|
return /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsx42(ScheduleXCalendar, { calendarApp: calendar, customComponents: {
|
|
@@ -6779,11 +6779,11 @@ function AQStatCard1({ title: title3, value, unit = "", description, icons, diff
|
|
|
6779
6779
|
}
|
|
6780
6780
|
|
|
6781
6781
|
// src/components/FaviconSetter/FaviconSetter.tsx
|
|
6782
|
-
import { useEffect as
|
|
6782
|
+
import { useEffect as useEffect5 } from "react";
|
|
6783
6783
|
function FaviconSetter() {
|
|
6784
6784
|
var _a;
|
|
6785
6785
|
const store = useS_BasicAppShell();
|
|
6786
|
-
|
|
6786
|
+
useEffect5(() => {
|
|
6787
6787
|
var _a2, _b, _c;
|
|
6788
6788
|
if (!((_a2 = store.state.faviconFileDetail) == null ? void 0 : _a2.fileBase64String)) return;
|
|
6789
6789
|
try {
|
|
@@ -6853,7 +6853,7 @@ import TextAlign from "@tiptap/extension-text-align";
|
|
|
6853
6853
|
import Underline from "@tiptap/extension-underline";
|
|
6854
6854
|
import { useEditor } from "@tiptap/react";
|
|
6855
6855
|
import StarterKit from "@tiptap/starter-kit";
|
|
6856
|
-
import { useEffect as
|
|
6856
|
+
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
6857
6857
|
import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6858
6858
|
function MyTextEditor(_a) {
|
|
6859
6859
|
var _b = _a, {
|
|
@@ -6951,7 +6951,7 @@ function MyTextEditor(_a) {
|
|
|
6951
6951
|
}
|
|
6952
6952
|
}
|
|
6953
6953
|
}, rest));
|
|
6954
|
-
|
|
6954
|
+
useEffect6(() => {
|
|
6955
6955
|
if (editor && value !== editor.getHTML()) {
|
|
6956
6956
|
editor.commands.setContent(value);
|
|
6957
6957
|
}
|
|
@@ -8715,7 +8715,7 @@ import { Grid as Grid2, Paper as Paper10, ScrollArea as ScrollArea6 } from "@man
|
|
|
8715
8715
|
// src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
|
|
8716
8716
|
import { Container as Container4 } from "@mantine/core";
|
|
8717
8717
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
8718
|
-
import { useEffect as
|
|
8718
|
+
import { useEffect as useEffect7, useMemo as useMemo8, useState as useState9 } from "react";
|
|
8719
8719
|
|
|
8720
8720
|
// src/modules-features/admin/core/core83092/useS_core83092.tsx
|
|
8721
8721
|
var useStore4 = createGenericStore({
|
|
@@ -8789,11 +8789,11 @@ function F_core38677_ReadUser() {
|
|
|
8789
8789
|
setRowSelection({ [rowId]: true });
|
|
8790
8790
|
store.setProperty("roleId", parseInt(rowId));
|
|
8791
8791
|
};
|
|
8792
|
-
|
|
8792
|
+
useEffect7(() => {
|
|
8793
8793
|
if (store.state.roleId == 0) return;
|
|
8794
8794
|
setRowSelection({ [store.state.roleId]: true });
|
|
8795
8795
|
}, [store.state.roleId]);
|
|
8796
|
-
|
|
8796
|
+
useEffect7(() => {
|
|
8797
8797
|
if (!query.data) return;
|
|
8798
8798
|
store.setProperty("roleId", query.data[0].id);
|
|
8799
8799
|
}, [query.data]);
|
|
@@ -8834,7 +8834,7 @@ function useQ_Account_GetAdminAccount() {
|
|
|
8834
8834
|
|
|
8835
8835
|
// src/modules-features/admin/core/core38677/F_core38677_Save.tsx
|
|
8836
8836
|
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
8837
|
-
import { useEffect as
|
|
8837
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
8838
8838
|
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
8839
8839
|
function F_core38677_Save() {
|
|
8840
8840
|
const store = useS_core83092();
|
|
@@ -8857,7 +8857,7 @@ function F_core38677_Save() {
|
|
|
8857
8857
|
}
|
|
8858
8858
|
});
|
|
8859
8859
|
}
|
|
8860
|
-
|
|
8860
|
+
useEffect8(() => {
|
|
8861
8861
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
|
8862
8862
|
disable[1](true);
|
|
8863
8863
|
return;
|
|
@@ -8902,7 +8902,7 @@ var menuData = [
|
|
|
8902
8902
|
import { Checkbox as Checkbox3, Flex as Flex5, ScrollArea as ScrollArea5, Table as Table3, Text as Text13 } from "@mantine/core";
|
|
8903
8903
|
import { IconEdit as IconEdit5, IconEyeUp, IconFileExport as IconFileExport2, IconPlus as IconPlus5, IconPrinter as IconPrinter3, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
8904
8904
|
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
8905
|
-
import React2, { useEffect as
|
|
8905
|
+
import React2, { useEffect as useEffect9, useState as useState11 } from "react";
|
|
8906
8906
|
import { jsx as jsx85, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8907
8907
|
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
8908
8908
|
function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
@@ -8910,10 +8910,10 @@ function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
8910
8910
|
const store = useS_core83092();
|
|
8911
8911
|
const query = useGetUserPermission();
|
|
8912
8912
|
const list = useState11([]);
|
|
8913
|
-
|
|
8913
|
+
useEffect9(() => {
|
|
8914
8914
|
list[1](groupToTwoLevels(menuData2));
|
|
8915
8915
|
}, []);
|
|
8916
|
-
|
|
8916
|
+
useEffect9(() => {
|
|
8917
8917
|
if (!query.data) return;
|
|
8918
8918
|
store.setProperty("rolePermissions", query.data);
|
|
8919
8919
|
}, [query.data]);
|
|
@@ -9413,12 +9413,12 @@ function F_core47643() {
|
|
|
9413
9413
|
}
|
|
9414
9414
|
|
|
9415
9415
|
// src/modules-features/admin/core/core60524/F_core60524.tsx
|
|
9416
|
-
import { useEffect as
|
|
9416
|
+
import { useEffect as useEffect11 } from "react";
|
|
9417
9417
|
|
|
9418
9418
|
// src/modules-features/admin/core/core60524/F_core60524_Form.tsx
|
|
9419
9419
|
import { Grid as Grid3, Paper as Paper11 } from "@mantine/core";
|
|
9420
9420
|
import { useForm as useForm14 } from "@mantine/form";
|
|
9421
|
-
import { useEffect as
|
|
9421
|
+
import { useEffect as useEffect10 } from "react";
|
|
9422
9422
|
|
|
9423
9423
|
// src/modules-features/admin/core/core60524/F_core60524_Save.tsx
|
|
9424
9424
|
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
@@ -9488,7 +9488,7 @@ function F_core60524_Form() {
|
|
|
9488
9488
|
logoFileDetail: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9489
9489
|
}
|
|
9490
9490
|
});
|
|
9491
|
-
|
|
9491
|
+
useEffect10(() => {
|
|
9492
9492
|
var _a, _b;
|
|
9493
9493
|
if (!query.data) return;
|
|
9494
9494
|
const values = {
|
|
@@ -9563,7 +9563,7 @@ function F_core60524_Form() {
|
|
|
9563
9563
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9564
9564
|
function F_core60524({ AQModuleId }) {
|
|
9565
9565
|
const store = useS_core60524();
|
|
9566
|
-
|
|
9566
|
+
useEffect11(() => {
|
|
9567
9567
|
store.setProperty("AQModuleId", AQModuleId);
|
|
9568
9568
|
}, []);
|
|
9569
9569
|
return /* @__PURE__ */ jsx98(F_core60524_Form, {});
|
|
@@ -9776,7 +9776,7 @@ import { useMemo as useMemo13, useState as useState13 } from "react";
|
|
|
9776
9776
|
import { Button as Button16, Fieldset as Fieldset6, Group as Group16, Table as Table4 } from "@mantine/core";
|
|
9777
9777
|
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
|
9778
9778
|
import { useMutation as useMutation7, useQuery as useQuery14, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
9779
|
-
import { useEffect as
|
|
9779
|
+
import { useEffect as useEffect12, useMemo as useMemo12, useState as useState12 } from "react";
|
|
9780
9780
|
import { jsx as jsx103, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9781
9781
|
function F_core71678_ChangePermission({ user }) {
|
|
9782
9782
|
const disc = useDisclosure12();
|
|
@@ -9814,7 +9814,7 @@ function F_core71678_ChangePermission({ user }) {
|
|
|
9814
9814
|
}
|
|
9815
9815
|
});
|
|
9816
9816
|
}
|
|
9817
|
-
|
|
9817
|
+
useEffect12(() => {
|
|
9818
9818
|
var _a;
|
|
9819
9819
|
const result = (_a = user.roles) == null ? void 0 : _a.reduce((acc, item) => {
|
|
9820
9820
|
if (item.id !== void 0) {
|
|
@@ -9932,13 +9932,13 @@ function F_core71678_Delete({ id, code }) {
|
|
|
9932
9932
|
|
|
9933
9933
|
// src/modules-features/admin/core/core71678/F_core71678_Update.tsx
|
|
9934
9934
|
import { useForm as useForm17 } from "@mantine/form";
|
|
9935
|
-
import { useEffect as
|
|
9935
|
+
import { useEffect as useEffect13 } from "react";
|
|
9936
9936
|
import { jsx as jsx106, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
9937
9937
|
function F_core71678_Update({ user }) {
|
|
9938
9938
|
const form = useForm17({
|
|
9939
9939
|
initialValues: user
|
|
9940
9940
|
});
|
|
9941
|
-
|
|
9941
|
+
useEffect13(() => {
|
|
9942
9942
|
console.log(form.values);
|
|
9943
9943
|
}, [form.values]);
|
|
9944
9944
|
return /* @__PURE__ */ jsx106(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
|
@@ -10256,7 +10256,7 @@ import { Grid as Grid4, Paper as Paper12, ScrollArea as ScrollArea8 } from "@man
|
|
|
10256
10256
|
// src/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx
|
|
10257
10257
|
import { Container as Container5 } from "@mantine/core";
|
|
10258
10258
|
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
10259
|
-
import { useEffect as
|
|
10259
|
+
import { useEffect as useEffect14, useMemo as useMemo15, useState as useState14 } from "react";
|
|
10260
10260
|
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
10261
10261
|
function F_core83092_ReadUser() {
|
|
10262
10262
|
const store = useS_core83092();
|
|
@@ -10280,11 +10280,11 @@ function F_core83092_ReadUser() {
|
|
|
10280
10280
|
setRowSelection({ [rowId]: true });
|
|
10281
10281
|
store.setProperty("roleId", parseInt(rowId));
|
|
10282
10282
|
};
|
|
10283
|
-
|
|
10283
|
+
useEffect14(() => {
|
|
10284
10284
|
if (store.state.roleId == 0) return;
|
|
10285
10285
|
setRowSelection({ [store.state.roleId]: true });
|
|
10286
10286
|
}, [store.state.roleId]);
|
|
10287
|
-
|
|
10287
|
+
useEffect14(() => {
|
|
10288
10288
|
if (!query.data) return;
|
|
10289
10289
|
store.setProperty("roleId", query.data[0].id);
|
|
10290
10290
|
}, [query.data]);
|
|
@@ -10325,7 +10325,7 @@ function useQ_core83092_Account_GetAdminAccount() {
|
|
|
10325
10325
|
|
|
10326
10326
|
// src/modules-features/admin/core/core83092/F_core83092_Save.tsx
|
|
10327
10327
|
import { useMutation as useMutation8 } from "@tanstack/react-query";
|
|
10328
|
-
import { useEffect as
|
|
10328
|
+
import { useEffect as useEffect15, useState as useState15 } from "react";
|
|
10329
10329
|
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
10330
10330
|
function F_core83092_Save() {
|
|
10331
10331
|
const store = useS_core83092();
|
|
@@ -10348,7 +10348,7 @@ function F_core83092_Save() {
|
|
|
10348
10348
|
}
|
|
10349
10349
|
});
|
|
10350
10350
|
}
|
|
10351
|
-
|
|
10351
|
+
useEffect15(() => {
|
|
10352
10352
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
|
10353
10353
|
disable[1](true);
|
|
10354
10354
|
return;
|
|
@@ -10362,7 +10362,7 @@ function F_core83092_Save() {
|
|
|
10362
10362
|
import { Checkbox as Checkbox4, Flex as Flex6, ScrollArea as ScrollArea7, Table as Table5, Text as Text14 } from "@mantine/core";
|
|
10363
10363
|
import { IconEdit as IconEdit6, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport3, IconPlus as IconPlus6, IconPrinter as IconPrinter4, IconTrash as IconTrash6 } from "@tabler/icons-react";
|
|
10364
10364
|
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
10365
|
-
import React4, { useEffect as
|
|
10365
|
+
import React4, { useEffect as useEffect16, useState as useState16 } from "react";
|
|
10366
10366
|
import { jsx as jsx116, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10367
10367
|
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
10368
10368
|
function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
@@ -10370,10 +10370,10 @@ function F_core83092_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
|
10370
10370
|
const store = useS_core83092();
|
|
10371
10371
|
const query = useGetUserPermission2({ menuData: menuData2 });
|
|
10372
10372
|
const list = useState16([]);
|
|
10373
|
-
|
|
10373
|
+
useEffect16(() => {
|
|
10374
10374
|
list[1](groupToTwoLevels(menuData2));
|
|
10375
10375
|
}, []);
|
|
10376
|
-
|
|
10376
|
+
useEffect16(() => {
|
|
10377
10377
|
if (!query.data) return;
|
|
10378
10378
|
store.setProperty("rolePermissions", query.data);
|
|
10379
10379
|
}, [query.data]);
|
|
@@ -11201,12 +11201,12 @@ function F_authenticate_Logout() {
|
|
|
11201
11201
|
|
|
11202
11202
|
// src/modules-features/authenticate/F_authenticate_SplashPage.tsx
|
|
11203
11203
|
import { useRouter as useRouter5 } from "next/navigation";
|
|
11204
|
-
import { useEffect as
|
|
11204
|
+
import { useEffect as useEffect17 } from "react";
|
|
11205
11205
|
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
11206
11206
|
function F_authenticate_SplashPage() {
|
|
11207
11207
|
const router = useRouter5();
|
|
11208
11208
|
const S_Authenticate = useS_authenticate();
|
|
11209
|
-
|
|
11209
|
+
useEffect17(() => {
|
|
11210
11210
|
if (S_Authenticate.state.token == "") {
|
|
11211
11211
|
router.push("/authenticate/login");
|
|
11212
11212
|
return;
|
|
@@ -370,6 +370,7 @@ declare function useS_BasicAppShell(): {
|
|
|
370
370
|
toggle: () => void;
|
|
371
371
|
toggleGroupMenuOpenId: (id: string) => void;
|
|
372
372
|
clearGroupMenuOpenId: () => void;
|
|
373
|
+
setDefault: () => void;
|
|
373
374
|
state: I$2;
|
|
374
375
|
setState: (newState: I$2) => void;
|
|
375
376
|
setProperty: <K extends keyof I$2>(key: K, value: I$2[K]) => void;
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
useS_BasicAppShell,
|
|
65
65
|
useS_ButtonImport,
|
|
66
66
|
utils_layout_getItemsWithoutLinks
|
|
67
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-2CWYOXAG.mjs";
|
|
68
68
|
import "../chunk-QAWKASVG.mjs";
|
|
69
69
|
import "../chunk-Y3YGC5IH.mjs";
|
|
70
70
|
import "../chunk-CJDXLINF.mjs";
|