aq-fe-framework 0.1.318 → 0.1.320
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/dist/chunk-2SBUKAGS.mjs +20 -0
- package/dist/chunk-BZMQOGL6.mjs +13 -0
- package/dist/{chunk-FUHOV7NB.mjs → chunk-FAG4PGP2.mjs} +330 -477
- package/dist/{chunk-VECMRDKG.mjs → chunk-FBGCXKGK.mjs} +0 -36
- package/dist/chunk-GEYCGM75.mjs +178 -0
- package/dist/{chunk-ZZ7S4EA4.mjs → chunk-HEW5D3R4.mjs} +65 -25
- package/dist/chunk-I2XIN2R3.mjs +38 -0
- package/dist/{chunk-YJ32RSH2.mjs → chunk-YQPDRFRL.mjs} +1 -1
- package/dist/columns/index.d.mts +6 -0
- package/dist/columns/index.mjs +8 -0
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.mjs +5 -5
- package/dist/const/index.mjs +12 -2
- package/dist/core/index.d.mts +10 -1
- package/dist/core/index.mjs +6 -4
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.mjs +1 -1
- package/dist/interfaces/index.d.mts +8 -446
- package/dist/modules-features/index.d.mts +54 -55
- package/dist/modules-features/index.mjs +247 -339
- package/dist/utils/index.mjs +7 -5
- package/package.json +5 -1
- package/dist/chunk-GFEMKKFH.mjs +0 -25
- package/dist/chunk-HHJFKKE7.mjs +0 -26
@@ -1,11 +1,19 @@
|
|
1
1
|
import {
|
2
|
-
U0DateToDDMMYYYString,
|
3
2
|
U0MyValidateEmail,
|
4
3
|
updateEnableList,
|
5
4
|
utils_config_getBaseUrl,
|
6
5
|
utils_converter_enumToSelectOptions,
|
7
6
|
utils_file_fileToAQDocumentType
|
8
|
-
} from "../chunk-
|
7
|
+
} from "../chunk-FBGCXKGK.mjs";
|
8
|
+
import {
|
9
|
+
baseColumns
|
10
|
+
} from "../chunk-2SBUKAGS.mjs";
|
11
|
+
import {
|
12
|
+
U0DateToDDMMYYYString
|
13
|
+
} from "../chunk-I2XIN2R3.mjs";
|
14
|
+
import {
|
15
|
+
const_object_documentTypes
|
16
|
+
} from "../chunk-BZMQOGL6.mjs";
|
9
17
|
import {
|
10
18
|
F_authenticate_Logout,
|
11
19
|
MyActionIconDelete,
|
@@ -16,7 +24,6 @@ import {
|
|
16
24
|
MyButtonModal,
|
17
25
|
MyButtonViewPDF,
|
18
26
|
MyCenterFull,
|
19
|
-
MyDataTable,
|
20
27
|
MyDateInput,
|
21
28
|
MyFieldset,
|
22
29
|
MyFileInput,
|
@@ -29,42 +36,37 @@ import {
|
|
29
36
|
groupToTwoLevels,
|
30
37
|
useS_authenticate,
|
31
38
|
utils_layout_getItemsWithoutLinks
|
32
|
-
} from "../chunk-
|
39
|
+
} from "../chunk-FAG4PGP2.mjs";
|
40
|
+
import {
|
41
|
+
createGenericStore
|
42
|
+
} from "../chunk-Y3YGC5IH.mjs";
|
33
43
|
import "../chunk-5U2JSHSJ.mjs";
|
34
44
|
import {
|
35
|
-
|
36
|
-
|
37
|
-
} from "../chunk-ZZ7S4EA4.mjs";
|
45
|
+
MyDataTableSelectOne
|
46
|
+
} from "../chunk-HEW5D3R4.mjs";
|
38
47
|
import {
|
48
|
+
MyDataTable,
|
39
49
|
MyFlexColumn,
|
40
50
|
MyFlexRow
|
41
|
-
} from "../chunk-
|
51
|
+
} from "../chunk-GEYCGM75.mjs";
|
52
|
+
import {
|
53
|
+
const_object_colors
|
54
|
+
} from "../chunk-NWBLJ3W3.mjs";
|
42
55
|
import {
|
43
56
|
enum_emailConfigModule
|
44
57
|
} from "../chunk-VH4ZAD6M.mjs";
|
45
58
|
import "../chunk-K6S7R6LU.mjs";
|
46
|
-
import {
|
47
|
-
const_object_documentTypes
|
48
|
-
} from "../chunk-GFEMKKFH.mjs";
|
49
|
-
import {
|
50
|
-
const_object_colors
|
51
|
-
} from "../chunk-NWBLJ3W3.mjs";
|
52
59
|
import {
|
53
60
|
baseAxios_default,
|
54
61
|
createBaseApi,
|
55
|
-
useMyDevice,
|
56
|
-
useMyReactMutation,
|
57
62
|
useMyReactQuery,
|
58
63
|
useMyRouter,
|
59
64
|
useQ_AQ_GetAQModule,
|
60
65
|
useQ_SkillCenter_GetAll
|
61
|
-
} from "../chunk-
|
66
|
+
} from "../chunk-YQPDRFRL.mjs";
|
62
67
|
import {
|
63
68
|
utils_notification_show
|
64
69
|
} from "../chunk-7ZCOFATU.mjs";
|
65
|
-
import {
|
66
|
-
createGenericStore
|
67
|
-
} from "../chunk-Y3YGC5IH.mjs";
|
68
70
|
import {
|
69
71
|
__objRest,
|
70
72
|
__spreadProps,
|
@@ -74,9 +76,18 @@ import {
|
|
74
76
|
// src/modules-features/admin/core/accessControl/F_accessControl.tsx
|
75
77
|
import { Grid, Paper, ScrollArea as ScrollArea2 } from "@mantine/core";
|
76
78
|
|
79
|
+
// src/api/services/serivce_account.ts
|
80
|
+
var CONTROLLER = "/account";
|
81
|
+
var serivce_account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER, baseAxios_default)), {
|
82
|
+
getAdminAccount: (paging) => {
|
83
|
+
return baseAxios_default.get(CONTROLLER + `/GetAdminAccount`, {
|
84
|
+
params: paging
|
85
|
+
});
|
86
|
+
}
|
87
|
+
});
|
88
|
+
|
77
89
|
// src/modules-features/admin/core/accessControl/F_accessControl_ReadUser.tsx
|
78
|
-
import {
|
79
|
-
import { useEffect, useMemo, useState } from "react";
|
90
|
+
import { useMemo } from "react";
|
80
91
|
|
81
92
|
// src/modules-features/admin/core/accessControl/useS_accessControl.tsx
|
82
93
|
var useStore = createGenericStore({
|
@@ -128,92 +139,62 @@ function utils_accessControl_mergePage(arr1, arr2) {
|
|
128
139
|
|
129
140
|
// src/modules-features/admin/core/accessControl/F_accessControl_ReadUser.tsx
|
130
141
|
import { jsx } from "react/jsx-runtime";
|
142
|
+
var userColumns = [
|
143
|
+
{
|
144
|
+
header: "H\u1ECD v\xE0 t\xEAn",
|
145
|
+
accessorKey: "fullName"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
header: "Email",
|
149
|
+
accessorKey: "email"
|
150
|
+
},
|
151
|
+
...baseColumns
|
152
|
+
];
|
131
153
|
function F_accessControl_ReadUser() {
|
132
154
|
const store = useS_accessControl();
|
133
|
-
const
|
134
|
-
const
|
135
|
-
|
136
|
-
() =>
|
137
|
-
|
138
|
-
|
139
|
-
accessorKey: "fullName"
|
140
|
-
},
|
141
|
-
{
|
142
|
-
header: "Email",
|
143
|
-
accessorKey: "email"
|
144
|
-
}
|
145
|
-
],
|
146
|
-
[]
|
147
|
-
);
|
148
|
-
const handleRowClick = (rowId) => {
|
149
|
-
setRowSelection({ [rowId]: true });
|
150
|
-
store.setProperty("roleId", parseInt(rowId));
|
151
|
-
};
|
152
|
-
useEffect(() => {
|
153
|
-
if (store.state.roleId == 0) return;
|
154
|
-
setRowSelection({ [store.state.roleId]: true });
|
155
|
-
}, [store.state.roleId]);
|
156
|
-
useEffect(() => {
|
157
|
-
if (!query.data) return;
|
158
|
-
store.setProperty("roleId", query.data[0].id);
|
159
|
-
}, [query.data]);
|
160
|
-
if (query.isLoading) return "Loading...";
|
161
|
-
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
155
|
+
const columns = useMemo(() => userColumns, []);
|
156
|
+
const getAdminAccountQuery = useMyReactQuery({
|
157
|
+
queryKey: ["getAdminAccountQuery"],
|
158
|
+
axiosFn: () => serivce_account.getAdminAccount(),
|
159
|
+
mockData: mockUserData
|
160
|
+
});
|
162
161
|
return /* @__PURE__ */ jsx(
|
163
|
-
|
162
|
+
MyDataTableSelectOne,
|
164
163
|
{
|
165
164
|
columns,
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
return (_a = row.id) == null ? void 0 : _a.toString();
|
170
|
-
},
|
171
|
-
mantineTableBodyRowProps: ({ row }) => ({
|
172
|
-
onClick: () => handleRowClick(row.id),
|
173
|
-
style: {
|
174
|
-
cursor: "pointer",
|
175
|
-
backgroundColor: rowSelection[row.id] ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
176
|
-
}
|
177
|
-
}),
|
178
|
-
state: rowSelection
|
165
|
+
queryResult: getAdminAccountQuery,
|
166
|
+
idSelection: store.state.roleId,
|
167
|
+
setIdSelection: (id) => store.setProperty("roleId", Number(id))
|
179
168
|
}
|
180
169
|
);
|
181
170
|
}
|
182
|
-
function useQ_core83092_Account_GetAdminAccount() {
|
183
|
-
const query = useQuery({
|
184
|
-
queryKey: ["useQ_core83092_Account_GetAdminAccount"],
|
185
|
-
queryFn: async () => {
|
186
|
-
var _a;
|
187
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") return mockUserData;
|
188
|
-
const result = await baseAxios_default.get(`/Account/GetAdminAccount`, { params: { page: 5, pageNumber: 1 } });
|
189
|
-
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
190
|
-
},
|
191
|
-
refetchOnWindowFocus: false
|
192
|
-
});
|
193
|
-
return query;
|
194
|
-
}
|
195
171
|
var mockUserData = [
|
196
172
|
{
|
173
|
+
id: 1,
|
197
174
|
userName: "nguyenvana",
|
198
175
|
fullName: "Nguy\u1EC5n V\u0103n A",
|
199
176
|
email: "vana@example.com"
|
200
177
|
},
|
201
178
|
{
|
179
|
+
id: 2,
|
202
180
|
userName: "tranthib",
|
203
181
|
fullName: "Tr\u1EA7n Th\u1ECB B",
|
204
182
|
email: "thib@example.com"
|
205
183
|
},
|
206
184
|
{
|
185
|
+
id: 3,
|
207
186
|
userName: "leminhc",
|
208
187
|
fullName: "L\xEA Minh C",
|
209
188
|
email: "minhc@example.com"
|
210
189
|
},
|
211
190
|
{
|
191
|
+
id: 4,
|
212
192
|
userName: "phamthid",
|
213
193
|
fullName: "Ph\u1EA1m Th\u1ECB D",
|
214
194
|
email: "thid@example.com"
|
215
195
|
},
|
216
196
|
{
|
197
|
+
id: 5,
|
217
198
|
userName: "doanvanh",
|
218
199
|
fullName: "Do\xE3n V\u0103n H",
|
219
200
|
email: "vanh@example.com"
|
@@ -223,19 +204,19 @@ var mockUserData = [
|
|
223
204
|
// src/modules-features/admin/core/accessControl/F_accessControl_ViewMenuPermissions.tsx
|
224
205
|
import { Checkbox, Flex, ScrollArea, Table, Text } from "@mantine/core";
|
225
206
|
import { IconEdit, IconEyeUp, IconFileExport, IconPlus, IconPrinter, IconTrash } from "@tabler/icons-react";
|
226
|
-
import { useQuery
|
227
|
-
import React, { useEffect
|
207
|
+
import { useQuery } from "@tanstack/react-query";
|
208
|
+
import React, { useEffect, useState } from "react";
|
228
209
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
229
210
|
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
230
211
|
function F_accessControl_ViewMenuPermissions({ menuData: menuData2 }) {
|
231
212
|
var _a, _b;
|
232
213
|
const store = useS_accessControl();
|
233
214
|
const query = useGetUserPermission({ menuData: menuData2 });
|
234
|
-
const list =
|
235
|
-
|
215
|
+
const list = useState([]);
|
216
|
+
useEffect(() => {
|
236
217
|
list[1](groupToTwoLevels(menuData2));
|
237
218
|
}, []);
|
238
|
-
|
219
|
+
useEffect(() => {
|
239
220
|
if (!query.data) return;
|
240
221
|
store.setProperty("rolePermissions", query.data);
|
241
222
|
}, [query.data]);
|
@@ -410,7 +391,7 @@ function F_accessControl_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
410
391
|
}
|
411
392
|
function useGetUserPermission({ menuData: menuData2 }) {
|
412
393
|
const store = useS_accessControl();
|
413
|
-
const query =
|
394
|
+
const query = useQuery({
|
414
395
|
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
415
396
|
queryFn: async () => {
|
416
397
|
const result = await baseAxios_default.get("/Role/GetUserPermission?userId=" + store.state.roleId);
|
@@ -447,11 +428,11 @@ function useGetUserPermission({ menuData: menuData2 }) {
|
|
447
428
|
|
448
429
|
// src/modules-features/admin/core/accessControl/F_accessControl_Save.tsx
|
449
430
|
import { useMutation } from "@tanstack/react-query";
|
450
|
-
import { useEffect as
|
431
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
451
432
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
452
433
|
function F_accessControl_Save() {
|
453
434
|
const store = useS_accessControl();
|
454
|
-
const disable =
|
435
|
+
const disable = useState2(false);
|
455
436
|
const mutation = useMutation({
|
456
437
|
mutationFn: async (body) => {
|
457
438
|
const res = await baseAxios_default.put("/Role/UpdateUserPermission", body);
|
@@ -476,7 +457,7 @@ function F_accessControl_Save() {
|
|
476
457
|
}
|
477
458
|
});
|
478
459
|
}
|
479
|
-
|
460
|
+
useEffect2(() => {
|
480
461
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
481
462
|
disable[1](true);
|
482
463
|
return;
|
@@ -501,75 +482,48 @@ function F_accessControl({ menuData: menuData2 }) {
|
|
501
482
|
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel.tsx
|
502
483
|
import { Grid as Grid2, Paper as Paper2, ScrollArea as ScrollArea4 } from "@mantine/core";
|
503
484
|
|
485
|
+
// src/api/services/service_role.ts
|
486
|
+
var CONTROLLER2 = "/role";
|
487
|
+
var service_role = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER2, baseAxios_default)), {
|
488
|
+
getAdminRole: (paging) => {
|
489
|
+
return baseAxios_default.get(CONTROLLER2 + `/GetAdminRole`, {
|
490
|
+
params: paging
|
491
|
+
});
|
492
|
+
}
|
493
|
+
});
|
494
|
+
|
504
495
|
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel_ReadUser.tsx
|
505
|
-
import {
|
506
|
-
import { useEffect as useEffect4, useMemo as useMemo2, useState as useState4 } from "react";
|
496
|
+
import { useMemo as useMemo2 } from "react";
|
507
497
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
498
|
+
var roleColumns = [
|
499
|
+
{
|
500
|
+
header: "M\xE3 quy\u1EC1n",
|
501
|
+
accessorKey: "code"
|
502
|
+
},
|
503
|
+
{
|
504
|
+
header: "T\xEAn quy\u1EC1n",
|
505
|
+
accessorKey: "name"
|
506
|
+
},
|
507
|
+
...baseColumns
|
508
|
+
];
|
508
509
|
function F_accessControlLevel_ReadUser() {
|
509
510
|
const store = useS_accessControl();
|
510
|
-
const
|
511
|
-
const
|
512
|
-
|
513
|
-
() =>
|
514
|
-
|
515
|
-
|
516
|
-
accessorKey: "code",
|
517
|
-
size: 60
|
518
|
-
},
|
519
|
-
{
|
520
|
-
header: "T\xEAn quy\u1EC1n",
|
521
|
-
accessorKey: "name"
|
522
|
-
}
|
523
|
-
],
|
524
|
-
[]
|
525
|
-
);
|
526
|
-
const handleRowClick = (rowId) => {
|
527
|
-
setRowSelection({ [rowId]: true });
|
528
|
-
store.setProperty("roleId", parseInt(rowId));
|
529
|
-
};
|
530
|
-
useEffect4(() => {
|
531
|
-
if (store.state.roleId == 0) return;
|
532
|
-
setRowSelection({ [store.state.roleId]: true });
|
533
|
-
}, [store.state.roleId]);
|
534
|
-
useEffect4(() => {
|
535
|
-
if (!query.data) return;
|
536
|
-
store.setProperty("roleId", query.data[0].id);
|
537
|
-
}, [query.data]);
|
538
|
-
if (query.isLoading) return "Loading...";
|
539
|
-
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
511
|
+
const columns = useMemo2(() => roleColumns, []);
|
512
|
+
const getAdminRoleQuery = useMyReactQuery({
|
513
|
+
queryKey: ["getAdminRoleQuery"],
|
514
|
+
axiosFn: () => service_role.getAdminRole(),
|
515
|
+
mockData
|
516
|
+
});
|
540
517
|
return /* @__PURE__ */ jsx5(
|
541
|
-
|
518
|
+
MyDataTableSelectOne,
|
542
519
|
{
|
543
520
|
columns,
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
return (_a = row.id) == null ? void 0 : _a.toString();
|
548
|
-
},
|
549
|
-
mantineTableBodyRowProps: ({ row }) => ({
|
550
|
-
onClick: () => handleRowClick(row.id),
|
551
|
-
style: {
|
552
|
-
cursor: "pointer",
|
553
|
-
backgroundColor: rowSelection[row.id] ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
554
|
-
}
|
555
|
-
}),
|
556
|
-
state: rowSelection
|
521
|
+
queryResult: getAdminRoleQuery,
|
522
|
+
idSelection: store.state.roleId,
|
523
|
+
setIdSelection: (id) => store.setProperty("roleId", Number(id))
|
557
524
|
}
|
558
525
|
);
|
559
526
|
}
|
560
|
-
function useQ_Account_GetAdminAccount() {
|
561
|
-
const query = useQuery3({
|
562
|
-
queryKey: ["useQ_Role_GetAdminRole"],
|
563
|
-
queryFn: async () => {
|
564
|
-
var _a;
|
565
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") return mockData;
|
566
|
-
const result = await baseAxios_default.get(`/Role/GetAdminRole`);
|
567
|
-
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
568
|
-
},
|
569
|
-
refetchOnWindowFocus: false
|
570
|
-
});
|
571
|
-
return query;
|
572
|
-
}
|
573
527
|
var mockData = [
|
574
528
|
{ id: 1, code: "GV", name: "Gi\u1EA3ng vi\xEAn" },
|
575
529
|
{ id: 2, code: "STU", name: "Student" },
|
@@ -615,19 +569,19 @@ var menuData = [
|
|
615
569
|
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel_ViewMenuPermissions.tsx
|
616
570
|
import { Checkbox as Checkbox2, Flex as Flex2, ScrollArea as ScrollArea3, Table as Table2, Text as Text2 } from "@mantine/core";
|
617
571
|
import { IconEdit as IconEdit2, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport2, IconPlus as IconPlus2, IconPrinter as IconPrinter2, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
618
|
-
import { useQuery as
|
619
|
-
import React2, { useEffect as
|
572
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
573
|
+
import React2, { useEffect as useEffect3, useState as useState3 } from "react";
|
620
574
|
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
621
575
|
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
622
576
|
function F_accessControlLevel_ViewMenuPermissions({ menuData: menuData2 }) {
|
623
577
|
var _a, _b;
|
624
578
|
const store = useS_accessControl();
|
625
579
|
const query = useGetUserPermission2();
|
626
|
-
const list =
|
627
|
-
|
580
|
+
const list = useState3([]);
|
581
|
+
useEffect3(() => {
|
628
582
|
list[1](groupToTwoLevels(menuData2));
|
629
583
|
}, []);
|
630
|
-
|
584
|
+
useEffect3(() => {
|
631
585
|
if (!query.data) return;
|
632
586
|
store.setProperty("rolePermissions", query.data);
|
633
587
|
}, [query.data]);
|
@@ -802,7 +756,7 @@ function F_accessControlLevel_ViewMenuPermissions({ menuData: menuData2 }) {
|
|
802
756
|
}
|
803
757
|
function useGetUserPermission2() {
|
804
758
|
const store = useS_accessControl();
|
805
|
-
const query =
|
759
|
+
const query = useQuery2({
|
806
760
|
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
807
761
|
queryFn: async () => {
|
808
762
|
const result = await baseAxios_default.get("/Role/GetRolePermission?roleId=" + store.state.roleId);
|
@@ -839,11 +793,11 @@ function useGetUserPermission2() {
|
|
839
793
|
|
840
794
|
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel_Save.tsx
|
841
795
|
import { useMutation as useMutation2 } from "@tanstack/react-query";
|
842
|
-
import { useEffect as
|
796
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
843
797
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
844
798
|
function F_accessControlLevel_Save() {
|
845
799
|
const store = useS_accessControl();
|
846
|
-
const disable =
|
800
|
+
const disable = useState4(false);
|
847
801
|
const mutation = useMutation2({
|
848
802
|
mutationFn: async (body) => {
|
849
803
|
const res = await baseAxios_default.put("/Role/UpdatePermission", body);
|
@@ -868,7 +822,7 @@ function F_accessControlLevel_Save() {
|
|
868
822
|
}
|
869
823
|
});
|
870
824
|
}
|
871
|
-
|
825
|
+
useEffect4(() => {
|
872
826
|
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
873
827
|
disable[1](true);
|
874
828
|
return;
|
@@ -891,17 +845,17 @@ function F_accessControlLevel({ menuData: menuData2 }) {
|
|
891
845
|
}
|
892
846
|
|
893
847
|
// src/modules-features/admin/core/accountManagement/F_accountManagement.tsx
|
894
|
-
import { useEffect as
|
848
|
+
import { useEffect as useEffect6 } from "react";
|
895
849
|
|
896
850
|
// src/api/services/accountService.ts
|
897
|
-
var
|
898
|
-
var apiData_Account = __spreadProps(__spreadValues({}, createBaseApi(
|
851
|
+
var CONTROLLER3 = "/account";
|
852
|
+
var apiData_Account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER3, baseAxios_default)), {
|
899
853
|
// Các hàm custom
|
900
854
|
getCoeAccountById: (id) => {
|
901
|
-
return baseAxios_default.post(
|
855
|
+
return baseAxios_default.post(CONTROLLER3 + `/getCOEAccount`, { userId: id });
|
902
856
|
},
|
903
857
|
getAdminAccount: (paging) => {
|
904
|
-
return baseAxios_default.get(
|
858
|
+
return baseAxios_default.get(CONTROLLER3 + `/GetAdminAccount`, {
|
905
859
|
params: paging
|
906
860
|
});
|
907
861
|
}
|
@@ -910,7 +864,7 @@ var apiData_Account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER,
|
|
910
864
|
// src/modules-features/admin/core/accountManagement/F_accountManagement_Read.tsx
|
911
865
|
import { Button as Button2, Group as Group2 } from "@mantine/core";
|
912
866
|
import { IconShield } from "@tabler/icons-react";
|
913
|
-
import { useMemo as useMemo4, useState as
|
867
|
+
import { useMemo as useMemo4, useState as useState7 } from "react";
|
914
868
|
|
915
869
|
// src/modules-features/admin/core/accountManagement/useS_accountManagement.ts
|
916
870
|
var useStore2 = createGenericStore({
|
@@ -924,15 +878,15 @@ function useS_accountManagement() {
|
|
924
878
|
// src/modules-features/admin/core/accountManagement/F_accountManagement_ChangePermission.tsx
|
925
879
|
import { Button, Fieldset, Group, Table as Table3 } from "@mantine/core";
|
926
880
|
import { useDisclosure } from "@mantine/hooks";
|
927
|
-
import { useMutation as useMutation3, useQuery as
|
928
|
-
import { useEffect as
|
881
|
+
import { useMutation as useMutation3, useQuery as useQuery3, useQueryClient } from "@tanstack/react-query";
|
882
|
+
import { useEffect as useEffect5, useMemo as useMemo3, useState as useState5 } from "react";
|
929
883
|
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
930
884
|
function F_accountManagement_ChangePermission({ user }) {
|
931
885
|
const disc = useDisclosure();
|
932
886
|
const queryClient = useQueryClient();
|
933
|
-
const [rowSelection, setRowSelection] =
|
934
|
-
const rowSelect =
|
935
|
-
const query =
|
887
|
+
const [rowSelection, setRowSelection] = useState5({});
|
888
|
+
const rowSelect = useState5();
|
889
|
+
const query = useQuery3({
|
936
890
|
queryKey: [`F1_1ChangePermission`],
|
937
891
|
queryFn: async () => {
|
938
892
|
const response = await baseAxios_default.get("/Role/GetAdminRole");
|
@@ -969,7 +923,7 @@ function F_accountManagement_ChangePermission({ user }) {
|
|
969
923
|
}
|
970
924
|
});
|
971
925
|
}
|
972
|
-
|
926
|
+
useEffect5(() => {
|
973
927
|
var _a;
|
974
928
|
if ((user == null ? void 0 : user.roles) == void 0) return;
|
975
929
|
const result = (_a = user == null ? void 0 : user.roles) == null ? void 0 : _a.reduce((acc, item) => {
|
@@ -1135,7 +1089,7 @@ function F_accountManagement_Delete({ id, code }) {
|
|
1135
1089
|
// src/modules-features/admin/core/accountManagement/F_accountManagement_Update.tsx
|
1136
1090
|
import { MultiSelect as MultiSelect2 } from "@mantine/core";
|
1137
1091
|
import { useForm as useForm2 } from "@mantine/form";
|
1138
|
-
import { useState as
|
1092
|
+
import { useState as useState6 } from "react";
|
1139
1093
|
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
1140
1094
|
function F_accountManagement_Update({ user }) {
|
1141
1095
|
var _a, _b, _c, _d;
|
@@ -1146,7 +1100,7 @@ function F_accountManagement_Update({ user }) {
|
|
1146
1100
|
userSkillCenters: (_a = user.userSkillCenters) != null ? _a : []
|
1147
1101
|
})
|
1148
1102
|
});
|
1149
|
-
const [editedUserSkillCentersState, setEditedUserSkillCentersState] =
|
1103
|
+
const [editedUserSkillCentersState, setEditedUserSkillCentersState] = useState6(
|
1150
1104
|
(_b = user.userSkillCenters) != null ? _b : []
|
1151
1105
|
);
|
1152
1106
|
return /* @__PURE__ */ jsx12(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
@@ -1213,12 +1167,12 @@ function F_accountManagement_Update({ user }) {
|
|
1213
1167
|
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
1214
1168
|
function F_accountManagement_Read() {
|
1215
1169
|
var _a, _b, _c;
|
1216
|
-
const paginationState =
|
1170
|
+
const paginationState = useState7({ pageIndex: 0, pageSize: 10 });
|
1217
1171
|
const router = useMyRouter();
|
1218
1172
|
const store = useS_accountManagement();
|
1219
1173
|
const AllUserQuery = useMyReactQuery({
|
1220
1174
|
queryKey: ["AllUserQuery", paginationState[0].pageIndex + 1, paginationState[0].pageSize],
|
1221
|
-
axiosFn:
|
1175
|
+
axiosFn: () => {
|
1222
1176
|
return apiData_Account.getAdminAccount({
|
1223
1177
|
pageNumber: paginationState[0].pageIndex + 1,
|
1224
1178
|
pageSize: paginationState[0].pageSize
|
@@ -1232,7 +1186,7 @@ function F_accountManagement_Read() {
|
|
1232
1186
|
});
|
1233
1187
|
const columns = useMemo4(() => {
|
1234
1188
|
var _a2;
|
1235
|
-
const
|
1189
|
+
const baseColumns2 = [
|
1236
1190
|
{
|
1237
1191
|
header: "T\xEAn t\xE0i kho\u1EA3n",
|
1238
1192
|
accessorKey: "userName"
|
@@ -1251,7 +1205,7 @@ function F_accountManagement_Read() {
|
|
1251
1205
|
}
|
1252
1206
|
];
|
1253
1207
|
if (((_a2 = store.state) == null ? void 0 : _a2.isRequireSkillCenter) === true) {
|
1254
|
-
|
1208
|
+
baseColumns2.splice(3, 0, {
|
1255
1209
|
header: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
1256
1210
|
accessorFn: (row) => {
|
1257
1211
|
var _a3;
|
@@ -1259,12 +1213,13 @@ function F_accountManagement_Read() {
|
|
1259
1213
|
}
|
1260
1214
|
});
|
1261
1215
|
}
|
1262
|
-
return
|
1216
|
+
return baseColumns2;
|
1263
1217
|
}, [(_a = store.state) == null ? void 0 : _a.isRequireSkillCenter]);
|
1264
1218
|
return /* @__PURE__ */ jsx13(
|
1265
1219
|
MyDataTable,
|
1266
1220
|
{
|
1267
1221
|
isLoading: AllUserQuery.isLoading,
|
1222
|
+
isError: AllUserQuery.isError,
|
1268
1223
|
rowCount: (_c = (_b = getTotalAccount.data) == null ? void 0 : _b.length) != null ? _c : 0,
|
1269
1224
|
pagination: paginationState[0],
|
1270
1225
|
onPaginationChange: paginationState[1],
|
@@ -1327,7 +1282,7 @@ var mockUserData2 = [
|
|
1327
1282
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
1328
1283
|
function F_accountManagement({ isRequireSkillCenter = false }) {
|
1329
1284
|
const store = useS_accountManagement();
|
1330
|
-
|
1285
|
+
useEffect6(() => {
|
1331
1286
|
store.setProperty("isRequireSkillCenter", isRequireSkillCenter);
|
1332
1287
|
}, []);
|
1333
1288
|
return /* @__PURE__ */ jsx14(F_accountManagement_Read, {});
|
@@ -1335,7 +1290,7 @@ function F_accountManagement({ isRequireSkillCenter = false }) {
|
|
1335
1290
|
|
1336
1291
|
// src/modules-features/admin/core/core12196/F_core12196_Read.tsx
|
1337
1292
|
import { Accordion, Alert, Blockquote, Skeleton } from "@mantine/core";
|
1338
|
-
import { useQuery as
|
1293
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
1339
1294
|
import { useMemo as useMemo5 } from "react";
|
1340
1295
|
import { IconBug } from "@tabler/icons-react";
|
1341
1296
|
|
@@ -1356,12 +1311,12 @@ function F_core12196_Delete({
|
|
1356
1311
|
|
1357
1312
|
// src/modules-features/admin/core/core18256/F_core18256_Select.tsx
|
1358
1313
|
import { Select } from "@mantine/core";
|
1359
|
-
import { useQuery as
|
1314
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
1360
1315
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
1361
1316
|
function F_core18256_Select(_a) {
|
1362
1317
|
var _b = _a, { documentTypeId, label = "", dataMapper } = _b, rest = __objRest(_b, ["documentTypeId", "label", "dataMapper"]);
|
1363
1318
|
var _a2, _b2;
|
1364
|
-
const query =
|
1319
|
+
const query = useQuery4({
|
1365
1320
|
queryKey: [`/DocumentAttribute/GetByType?documentType=${documentTypeId}`],
|
1366
1321
|
queryFn: async () => {
|
1367
1322
|
const result = (await baseAxios_default.get(`/DocumentAttribute/GetByType?documentType=${documentTypeId}`)).data.data;
|
@@ -1474,7 +1429,7 @@ function F_core12196_Update({
|
|
1474
1429
|
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
1475
1430
|
function F_core12196_Read({ FormTypeId }) {
|
1476
1431
|
var _a, _b, _c;
|
1477
|
-
const documentAttributeQuery =
|
1432
|
+
const documentAttributeQuery = useQuery5({
|
1478
1433
|
queryKey: ["F_core12196_Read", FormTypeId],
|
1479
1434
|
queryFn: async () => {
|
1480
1435
|
var _a2;
|
@@ -1516,7 +1471,7 @@ function SubRead({
|
|
1516
1471
|
documentType,
|
1517
1472
|
FormTypeId
|
1518
1473
|
}) {
|
1519
|
-
const documentQuery =
|
1474
|
+
const documentQuery = useQuery5({
|
1520
1475
|
queryKey: ["SF2_3Read" + documentType],
|
1521
1476
|
queryFn: async () => {
|
1522
1477
|
const result = await baseAxios_default.get(
|
@@ -1667,7 +1622,7 @@ function F_core12196({
|
|
1667
1622
|
}
|
1668
1623
|
|
1669
1624
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
1670
|
-
import { useQuery as
|
1625
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
1671
1626
|
import { useMemo as useMemo6 } from "react";
|
1672
1627
|
|
1673
1628
|
// src/modules-features/admin/core/core16209/F_core16209_Create.tsx
|
@@ -1855,7 +1810,7 @@ function F_core16209_Update({ values }) {
|
|
1855
1810
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
1856
1811
|
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
1857
1812
|
function F_core16209({ RefinementTypeId }) {
|
1858
|
-
const query =
|
1813
|
+
const query = useQuery6({
|
1859
1814
|
queryKey: ["F_core16209_Read"],
|
1860
1815
|
queryFn: async () => {
|
1861
1816
|
var _a;
|
@@ -1920,7 +1875,7 @@ function F_core16209({ RefinementTypeId }) {
|
|
1920
1875
|
import { Tabs } from "@mantine/core";
|
1921
1876
|
|
1922
1877
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
1923
|
-
import { useQuery as
|
1878
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
1924
1879
|
import { useMemo as useMemo7 } from "react";
|
1925
1880
|
|
1926
1881
|
// src/modules-features/admin/core/core18256/F_core18256_Create.tsx
|
@@ -1971,7 +1926,7 @@ function F_core18256_Update({ values }) {
|
|
1971
1926
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
1972
1927
|
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
1973
1928
|
function F_core18256_Read({ documentType }) {
|
1974
|
-
const documentAttributeQuery =
|
1929
|
+
const documentAttributeQuery = useQuery7({
|
1975
1930
|
queryKey: ["F_core18256_Read", documentType],
|
1976
1931
|
queryFn: async () => {
|
1977
1932
|
var _a;
|
@@ -2106,7 +2061,7 @@ function F_core26965_Create({
|
|
2106
2061
|
|
2107
2062
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
2108
2063
|
import { Accordion as Accordion2, Alert as Alert2, Blockquote as Blockquote2, Skeleton as Skeleton2 } from "@mantine/core";
|
2109
|
-
import { useQuery as
|
2064
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
2110
2065
|
import { IconBug as IconBug2 } from "@tabler/icons-react";
|
2111
2066
|
import { useMemo as useMemo8 } from "react";
|
2112
2067
|
|
@@ -2212,7 +2167,7 @@ function F_core26965_Read({
|
|
2212
2167
|
RegulationsTypeId
|
2213
2168
|
}) {
|
2214
2169
|
var _a, _b, _c;
|
2215
|
-
const documentAttributeQuery =
|
2170
|
+
const documentAttributeQuery = useQuery8({
|
2216
2171
|
queryKey: ["F_core26965_Read", RegulationsTypeId],
|
2217
2172
|
queryFn: async () => {
|
2218
2173
|
var _a2;
|
@@ -2254,7 +2209,7 @@ function SubRead2({
|
|
2254
2209
|
documentType,
|
2255
2210
|
RegulationsTypeId
|
2256
2211
|
}) {
|
2257
|
-
const documentQuery =
|
2212
|
+
const documentQuery = useQuery8({
|
2258
2213
|
queryKey: ["SubRead" + documentType],
|
2259
2214
|
queryFn: async () => {
|
2260
2215
|
const result = await baseAxios_default.get(
|
@@ -2403,7 +2358,7 @@ function F_core27311_Create({
|
|
2403
2358
|
|
2404
2359
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
2405
2360
|
import { Accordion as Accordion3, Alert as Alert3, Blockquote as Blockquote3, Skeleton as Skeleton3 } from "@mantine/core";
|
2406
|
-
import { useQuery as
|
2361
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
2407
2362
|
import { IconBug as IconBug3 } from "@tabler/icons-react";
|
2408
2363
|
import { useMemo as useMemo9 } from "react";
|
2409
2364
|
|
@@ -2509,7 +2464,7 @@ function F_core27311_Read({
|
|
2509
2464
|
WorkflowTypeId
|
2510
2465
|
}) {
|
2511
2466
|
var _a, _b, _c;
|
2512
|
-
const documentAttributeQuery =
|
2467
|
+
const documentAttributeQuery = useQuery9({
|
2513
2468
|
queryKey: ["F_core27311_Read", WorkflowTypeId],
|
2514
2469
|
queryFn: async () => {
|
2515
2470
|
var _a2;
|
@@ -2551,7 +2506,7 @@ function SubRead3({
|
|
2551
2506
|
documentType,
|
2552
2507
|
WorkflowTypeId
|
2553
2508
|
}) {
|
2554
|
-
const documentQuery =
|
2509
|
+
const documentQuery = useQuery9({
|
2555
2510
|
queryKey: ["SubRead" + documentType],
|
2556
2511
|
queryFn: async () => {
|
2557
2512
|
const result = await baseAxios_default.get(
|
@@ -2647,7 +2602,7 @@ function F_core35923() {
|
|
2647
2602
|
}
|
2648
2603
|
|
2649
2604
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
2650
|
-
import { useQuery as
|
2605
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
2651
2606
|
import { useMemo as useMemo10 } from "react";
|
2652
2607
|
|
2653
2608
|
// src/modules-features/admin/core/core40207/F_core40207_Create.tsx
|
@@ -2778,7 +2733,7 @@ function F_core40207_Update({ values }) {
|
|
2778
2733
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
2779
2734
|
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
2780
2735
|
function F_core40207_Read({ GuidelineTypeId }) {
|
2781
|
-
const query =
|
2736
|
+
const query = useQuery10({
|
2782
2737
|
queryKey: ["F_core40207_Read"],
|
2783
2738
|
queryFn: async () => {
|
2784
2739
|
var _a;
|
@@ -2839,7 +2794,7 @@ function F_core40207({ GuidelineTypeId }) {
|
|
2839
2794
|
|
2840
2795
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
2841
2796
|
import { Group as Group3 } from "@mantine/core";
|
2842
|
-
import { useQuery as
|
2797
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
2843
2798
|
import { useMemo as useMemo11 } from "react";
|
2844
2799
|
|
2845
2800
|
// src/modules-features/admin/core/core47643/F_core47643_Delete.tsx
|
@@ -2907,7 +2862,7 @@ function F_core47643_Read() {
|
|
2907
2862
|
);
|
2908
2863
|
}
|
2909
2864
|
function useQ_core47643_GetAdminRole() {
|
2910
|
-
const query =
|
2865
|
+
const query = useQuery11({
|
2911
2866
|
queryKey: ["useQ_core47643_GetAdminRole"],
|
2912
2867
|
queryFn: async () => {
|
2913
2868
|
const res = await baseAxios_default.get("/Role/GetAdminRole");
|
@@ -2924,7 +2879,7 @@ function F_core47643() {
|
|
2924
2879
|
}
|
2925
2880
|
|
2926
2881
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
2927
|
-
import { useQuery as
|
2882
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
2928
2883
|
import { useMemo as useMemo12 } from "react";
|
2929
2884
|
|
2930
2885
|
// src/modules-features/admin/core/core64229/F_core64229_Delete.tsx
|
@@ -3047,7 +3002,7 @@ function FormInput({ form, emailModule }) {
|
|
3047
3002
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
3048
3003
|
import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
|
3049
3004
|
function F_core64229_Read({ emailModule }) {
|
3050
|
-
const query =
|
3005
|
+
const query = useQuery12({
|
3051
3006
|
queryKey: ["F_core64229_Read"],
|
3052
3007
|
queryFn: async () => {
|
3053
3008
|
const res = await baseAxios_default.get("/EmailConfig/GetAll");
|
@@ -3111,7 +3066,7 @@ function F_core64229() {
|
|
3111
3066
|
}
|
3112
3067
|
|
3113
3068
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
3114
|
-
import { useQuery as
|
3069
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
3115
3070
|
import { useMemo as useMemo13 } from "react";
|
3116
3071
|
|
3117
3072
|
// src/modules-features/admin/core/core76318/F_core76318_Create.tsx
|
@@ -3258,7 +3213,7 @@ function F_core76318_Update({ values }) {
|
|
3258
3213
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
3259
3214
|
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
3260
3215
|
function F_core76318_Read({ SecurityTypeId }) {
|
3261
|
-
const query =
|
3216
|
+
const query = useQuery13({
|
3262
3217
|
queryKey: ["F_core76318_Read"],
|
3263
3218
|
queryFn: async () => {
|
3264
3219
|
var _a;
|
@@ -3400,7 +3355,7 @@ function F_formTemplateDocs_Create({ FormTypeId }) {
|
|
3400
3355
|
|
3401
3356
|
// src/modules-features/admin/core/formTemplateDocs/F_formTemplateDocs_Read.tsx
|
3402
3357
|
import { Accordion as Accordion4, Alert as Alert4, Blockquote as Blockquote4, Skeleton as Skeleton4 } from "@mantine/core";
|
3403
|
-
import { useQuery as
|
3358
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
3404
3359
|
import { useMemo as useMemo14 } from "react";
|
3405
3360
|
import { IconBug as IconBug4 } from "@tabler/icons-react";
|
3406
3361
|
|
@@ -3504,7 +3459,7 @@ function F_formTemplateDocs_Update({
|
|
3504
3459
|
import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
|
3505
3460
|
function F_formTemplateDocs_Read({ FormTypeId }) {
|
3506
3461
|
var _a, _b, _c;
|
3507
|
-
const documentAttributeQuery =
|
3462
|
+
const documentAttributeQuery = useQuery14({
|
3508
3463
|
queryKey: ["F_formTemplateDocs_Read", FormTypeId],
|
3509
3464
|
queryFn: async () => {
|
3510
3465
|
var _a2;
|
@@ -3546,7 +3501,7 @@ function SubRead4({
|
|
3546
3501
|
documentType,
|
3547
3502
|
FormTypeId
|
3548
3503
|
}) {
|
3549
|
-
const documentQuery =
|
3504
|
+
const documentQuery = useQuery14({
|
3550
3505
|
queryKey: ["SF2_3Read" + documentType],
|
3551
3506
|
queryFn: async () => {
|
3552
3507
|
const result = await baseAxios_default.get(
|
@@ -3623,12 +3578,12 @@ function F_formTemplateDocs({
|
|
3623
3578
|
}
|
3624
3579
|
|
3625
3580
|
// src/modules-features/admin/core/moduleConfig/F_moduleConfig.tsx
|
3626
|
-
import { useEffect as
|
3581
|
+
import { useEffect as useEffect8 } from "react";
|
3627
3582
|
|
3628
3583
|
// src/modules-features/admin/core/moduleConfig/F_moduleConfig_Form.tsx
|
3629
3584
|
import { Center, Grid as Grid4, Image, Paper as Paper7 } from "@mantine/core";
|
3630
3585
|
import { useForm as useForm21 } from "@mantine/form";
|
3631
|
-
import { useEffect as
|
3586
|
+
import { useEffect as useEffect7 } from "react";
|
3632
3587
|
|
3633
3588
|
// src/modules-features/admin/core/moduleConfig/F_moduleConfig_Save.tsx
|
3634
3589
|
import { useMutation as useMutation4 } from "@tanstack/react-query";
|
@@ -3699,7 +3654,7 @@ function F_moduleConfig_Form() {
|
|
3699
3654
|
logoFileDetail: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
3700
3655
|
}
|
3701
3656
|
});
|
3702
|
-
|
3657
|
+
useEffect7(() => {
|
3703
3658
|
var _a2, _b2;
|
3704
3659
|
if (!query.data) return;
|
3705
3660
|
const values = {
|
@@ -3806,7 +3761,7 @@ function F_moduleConfig_Form() {
|
|
3806
3761
|
import { jsx as jsx66 } from "react/jsx-runtime";
|
3807
3762
|
function F_moduleConfig({ AQModuleId }) {
|
3808
3763
|
const store = useS_moduleConfig();
|
3809
|
-
|
3764
|
+
useEffect8(() => {
|
3810
3765
|
store.setProperty("AQModuleId", AQModuleId);
|
3811
3766
|
}, []);
|
3812
3767
|
return /* @__PURE__ */ jsx66(F_moduleConfig_Form, {});
|
@@ -3892,7 +3847,7 @@ function F_organizationPolicyDocs_Create({
|
|
3892
3847
|
|
3893
3848
|
// src/modules-features/admin/core/organizationPolicyDocs/F_organizationPolicyDocs_Read.tsx
|
3894
3849
|
import { Accordion as Accordion5, Alert as Alert5, Blockquote as Blockquote5, Skeleton as Skeleton5 } from "@mantine/core";
|
3895
|
-
import { useQuery as
|
3850
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
3896
3851
|
import { IconBug as IconBug5 } from "@tabler/icons-react";
|
3897
3852
|
import { useMemo as useMemo15 } from "react";
|
3898
3853
|
|
@@ -3998,7 +3953,7 @@ function F_organizationPolicyDocs_Read({
|
|
3998
3953
|
RegulationsTypeId
|
3999
3954
|
}) {
|
4000
3955
|
var _a, _b, _c;
|
4001
|
-
const documentAttributeQuery =
|
3956
|
+
const documentAttributeQuery = useQuery15({
|
4002
3957
|
queryKey: ["F_organizationPolicyDocs_Read", RegulationsTypeId],
|
4003
3958
|
queryFn: async () => {
|
4004
3959
|
var _a2;
|
@@ -4040,7 +3995,7 @@ function SubRead5({
|
|
4040
3995
|
documentType,
|
4041
3996
|
RegulationsTypeId
|
4042
3997
|
}) {
|
4043
|
-
const documentQuery =
|
3998
|
+
const documentQuery = useQuery15({
|
4044
3999
|
queryKey: ["SubRead" + documentType],
|
4045
4000
|
queryFn: async () => {
|
4046
4001
|
const result = await baseAxios_default.get(
|
@@ -4112,86 +4067,35 @@ function F_organizationPolicyDocs({ RegulationsTypeId }) {
|
|
4112
4067
|
] });
|
4113
4068
|
}
|
4114
4069
|
|
4115
|
-
// src/api/services/service_PageContent.ts
|
4116
|
-
var CONTROLLER2 = "/eva/PageContent";
|
4117
|
-
var service_PageContent = __spreadValues({}, createBaseApi(CONTROLLER2, baseAxios_default));
|
4118
|
-
|
4119
4070
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
|
4120
|
-
import { Group as Group4 } from "@mantine/core";
|
4121
|
-
import { useMemo as useMemo16 } from "react";
|
4122
|
-
|
4123
|
-
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
|
4124
4071
|
import { jsx as jsx72 } from "react/jsx-runtime";
|
4125
|
-
function
|
4126
|
-
|
4127
|
-
axiosFn: () => {
|
4128
|
-
console.log("value");
|
4129
|
-
return service_PageContent.updateList([{ id: 1 }]);
|
4130
|
-
}
|
4131
|
-
});
|
4132
|
-
return /* @__PURE__ */ jsx72(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
|
4072
|
+
function F_pageContentConfig_ReadMenu() {
|
4073
|
+
return /* @__PURE__ */ jsx72("div", {});
|
4133
4074
|
}
|
4134
4075
|
|
4135
|
-
// src/modules-features/admin/core/pageContentConfig/
|
4076
|
+
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig.tsx
|
4136
4077
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
4137
|
-
function
|
4138
|
-
return /* @__PURE__ */ jsx73(
|
4078
|
+
function F_pageContentConfig() {
|
4079
|
+
return /* @__PURE__ */ jsx73(F_pageContentConfig_ReadMenu, {});
|
4139
4080
|
}
|
4140
4081
|
|
4141
4082
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
|
4142
4083
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
4143
|
-
function F_pageContentConfig_DeleteDescription() {
|
4144
|
-
return /* @__PURE__ */ jsx74(MyButton2, { actionType: "delete" });
|
4145
|
-
}
|
4146
4084
|
|
4147
|
-
// src/modules-features/admin/core/pageContentConfig/
|
4148
|
-
import { jsx as jsx75
|
4149
|
-
function F_pageContentConfig_ReadMenu() {
|
4150
|
-
const pageContentQuery = useMyReactQuery({
|
4151
|
-
queryKey: ["pageContentQuery"],
|
4152
|
-
axiosFn: () => service_PageContent.getAll()
|
4153
|
-
});
|
4154
|
-
const device = useMyDevice();
|
4155
|
-
const columns = useMemo16(() => [
|
4156
|
-
{
|
4157
|
-
header: "Dashboard",
|
4158
|
-
accessorKey: "name"
|
4159
|
-
},
|
4160
|
-
{
|
4161
|
-
header: "M\xF4 t\u1EA3",
|
4162
|
-
accessorKey: "description",
|
4163
|
-
size: device.isPc ? 400 : 0,
|
4164
|
-
Cell: () => {
|
4165
|
-
return /* @__PURE__ */ jsx75(MyTextInput2, { placeholder: "Nh\u1EADp m\xF4 t\u1EA3 menu" });
|
4166
|
-
}
|
4167
|
-
}
|
4168
|
-
], []);
|
4169
|
-
return /* @__PURE__ */ jsx75(
|
4170
|
-
MyDataTable,
|
4171
|
-
{
|
4172
|
-
isLoading: pageContentQuery.isLoading,
|
4173
|
-
isError: pageContentQuery.isError,
|
4174
|
-
data: pageContentQuery.data || [],
|
4175
|
-
columns,
|
4176
|
-
renderTopToolbarCustomActions: (row) => /* @__PURE__ */ jsxs48(Group4, { children: [
|
4177
|
-
/* @__PURE__ */ jsx75(F_pageContentConfig_Save, { menuValues: [] }),
|
4178
|
-
/* @__PURE__ */ jsx75(F_pageContentConfig_Export, {}),
|
4179
|
-
/* @__PURE__ */ jsx75(F_pageContentConfig_DeleteDescription, {})
|
4180
|
-
] })
|
4181
|
-
}
|
4182
|
-
);
|
4183
|
-
}
|
4085
|
+
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
|
4086
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
4184
4087
|
|
4185
|
-
// src/
|
4088
|
+
// src/api/services/service_pageContent.ts
|
4089
|
+
var CONTROLLER4 = "/eva/PageContent";
|
4090
|
+
var service_pageContent = __spreadValues({}, createBaseApi(CONTROLLER4, baseAxios_default));
|
4091
|
+
|
4092
|
+
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
|
4186
4093
|
import { jsx as jsx76 } from "react/jsx-runtime";
|
4187
|
-
function F_pageContentConfig() {
|
4188
|
-
return /* @__PURE__ */ jsx76(F_pageContentConfig_ReadMenu, {});
|
4189
|
-
}
|
4190
4094
|
|
4191
4095
|
// src/modules-features/admin/core/roleCatalog/F_roleCatalog_Read.tsx
|
4192
|
-
import { Group as
|
4193
|
-
import { useQuery as
|
4194
|
-
import { useMemo as
|
4096
|
+
import { Group as Group4 } from "@mantine/core";
|
4097
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
4098
|
+
import { useMemo as useMemo16 } from "react";
|
4195
4099
|
|
4196
4100
|
// src/modules-features/admin/core/roleCatalog/F_roleCatalog_Delete.tsx
|
4197
4101
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
@@ -4208,19 +4112,19 @@ function F_roleCatalog_Delete({ values }) {
|
|
4208
4112
|
|
4209
4113
|
// src/modules-features/admin/core/roleCatalog/F_roleCatalog_Form.tsx
|
4210
4114
|
import { useForm as useForm24 } from "@mantine/form";
|
4211
|
-
import { jsx as jsx78, jsxs as
|
4115
|
+
import { jsx as jsx78, jsxs as jsxs48 } from "react/jsx-runtime";
|
4212
4116
|
function F_roleCatalog_Form({ values }) {
|
4213
4117
|
const form = useForm24({
|
4214
4118
|
mode: "uncontrolled",
|
4215
4119
|
initialValues: values
|
4216
4120
|
});
|
4217
|
-
if (values) return /* @__PURE__ */
|
4121
|
+
if (values) return /* @__PURE__ */ jsxs48(MyActionIconUpdate, { form, onSubmit: async () => {
|
4218
4122
|
return await baseAxios_default.post("/Role/Update", form.getValues());
|
4219
4123
|
}, children: [
|
4220
4124
|
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ readOnly: true, variant: "filled", label: "M\xE3" }, form.getInputProps("code"))),
|
4221
4125
|
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
4222
4126
|
] });
|
4223
|
-
return /* @__PURE__ */
|
4127
|
+
return /* @__PURE__ */ jsxs48(MyButtonCreate, { form, onSubmit: async () => {
|
4224
4128
|
return await baseAxios_default.post("/Role/Create", form.getValues());
|
4225
4129
|
}, children: [
|
4226
4130
|
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ label: "M\xE3" }, form.getInputProps("code"))),
|
@@ -4229,10 +4133,10 @@ function F_roleCatalog_Form({ values }) {
|
|
4229
4133
|
}
|
4230
4134
|
|
4231
4135
|
// src/modules-features/admin/core/roleCatalog/F_roleCatalog_Read.tsx
|
4232
|
-
import { jsx as jsx79, jsxs as
|
4136
|
+
import { jsx as jsx79, jsxs as jsxs49 } from "react/jsx-runtime";
|
4233
4137
|
function F_roleCatalog_Read() {
|
4234
4138
|
const query = useQ_core47643_GetAdminRole2();
|
4235
|
-
const columns =
|
4139
|
+
const columns = useMemo16(() => [
|
4236
4140
|
{
|
4237
4141
|
header: "M\xE3",
|
4238
4142
|
accessorKey: "code"
|
@@ -4249,8 +4153,8 @@ function F_roleCatalog_Read() {
|
|
4249
4153
|
isError: query.isError,
|
4250
4154
|
data: query.data || [],
|
4251
4155
|
columns,
|
4252
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx79(
|
4253
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
4156
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx79(Group4, { children: /* @__PURE__ */ jsx79(F_roleCatalog_Form, {}) }),
|
4157
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs49(MyCenterFull, { children: [
|
4254
4158
|
/* @__PURE__ */ jsx79(F_roleCatalog_Form, { values: row.original }),
|
4255
4159
|
/* @__PURE__ */ jsx79(F_roleCatalog_Delete, { values: row.original })
|
4256
4160
|
] })
|
@@ -4258,7 +4162,7 @@ function F_roleCatalog_Read() {
|
|
4258
4162
|
);
|
4259
4163
|
}
|
4260
4164
|
function useQ_core47643_GetAdminRole2() {
|
4261
|
-
const query =
|
4165
|
+
const query = useQuery16({
|
4262
4166
|
queryKey: ["useQ_core47643_GetAdminRole"],
|
4263
4167
|
queryFn: async () => {
|
4264
4168
|
const res = await baseAxios_default.get("/Role/GetAdminRole");
|
@@ -4310,13 +4214,13 @@ function F_roleCatalog() {
|
|
4310
4214
|
}
|
4311
4215
|
|
4312
4216
|
// src/modules-features/admin/core/securityPolicyDocs/F_securityPolicyDocs_Read.tsx
|
4313
|
-
import { useQuery as
|
4314
|
-
import { useMemo as
|
4217
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
4218
|
+
import { useMemo as useMemo17 } from "react";
|
4315
4219
|
|
4316
4220
|
// src/modules-features/admin/core/securityPolicyDocs/F_securityPolicyDocs_Create.tsx
|
4317
4221
|
import { FileInput as FileInput7 } from "@mantine/core";
|
4318
4222
|
import { useForm as useForm25 } from "@mantine/form";
|
4319
|
-
import { jsx as jsx81, jsxs as
|
4223
|
+
import { jsx as jsx81, jsxs as jsxs50 } from "react/jsx-runtime";
|
4320
4224
|
function F_securityPolicyDocs_Create({ SecurityTypeId }) {
|
4321
4225
|
const form = useForm25({
|
4322
4226
|
mode: "uncontrolled",
|
@@ -4327,7 +4231,7 @@ function F_securityPolicyDocs_Create({ SecurityTypeId }) {
|
|
4327
4231
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
4328
4232
|
}
|
4329
4233
|
});
|
4330
|
-
return /* @__PURE__ */
|
4234
|
+
return /* @__PURE__ */ jsxs50(
|
4331
4235
|
MyButtonCreate,
|
4332
4236
|
{
|
4333
4237
|
objectName: "v\u0103n b\u1EA3n",
|
@@ -4392,7 +4296,7 @@ function F_securityPolicyDocs_Delete({
|
|
4392
4296
|
// src/modules-features/admin/core/securityPolicyDocs/F_securityPolicyDocs_Update.tsx
|
4393
4297
|
import { FileInput as FileInput8, TextInput as TextInput2 } from "@mantine/core";
|
4394
4298
|
import { useForm as useForm26 } from "@mantine/form";
|
4395
|
-
import { jsx as jsx83, jsxs as
|
4299
|
+
import { jsx as jsx83, jsxs as jsxs51 } from "react/jsx-runtime";
|
4396
4300
|
function F_securityPolicyDocs_Update({ values }) {
|
4397
4301
|
var _a;
|
4398
4302
|
const form = useForm26({
|
@@ -4411,7 +4315,7 @@ function F_securityPolicyDocs_Update({ values }) {
|
|
4411
4315
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
4412
4316
|
}
|
4413
4317
|
});
|
4414
|
-
return /* @__PURE__ */
|
4318
|
+
return /* @__PURE__ */ jsxs51(
|
4415
4319
|
MyActionIconUpdate,
|
4416
4320
|
{
|
4417
4321
|
form,
|
@@ -4455,9 +4359,9 @@ function F_securityPolicyDocs_Update({ values }) {
|
|
4455
4359
|
}
|
4456
4360
|
|
4457
4361
|
// src/modules-features/admin/core/securityPolicyDocs/F_securityPolicyDocs_Read.tsx
|
4458
|
-
import { jsx as jsx84, jsxs as
|
4362
|
+
import { jsx as jsx84, jsxs as jsxs52 } from "react/jsx-runtime";
|
4459
4363
|
function F_securityPolicyDocs_Read({ SecurityTypeId }) {
|
4460
|
-
const query =
|
4364
|
+
const query = useQuery17({
|
4461
4365
|
queryKey: ["F_securityPolicyDocs_Read"],
|
4462
4366
|
queryFn: async () => {
|
4463
4367
|
var _a;
|
@@ -4467,7 +4371,7 @@ function F_securityPolicyDocs_Read({ SecurityTypeId }) {
|
|
4467
4371
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
4468
4372
|
}
|
4469
4373
|
});
|
4470
|
-
const columns =
|
4374
|
+
const columns = useMemo17(
|
4471
4375
|
() => [
|
4472
4376
|
{
|
4473
4377
|
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
@@ -4500,7 +4404,7 @@ function F_securityPolicyDocs_Read({ SecurityTypeId }) {
|
|
4500
4404
|
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx84(F_securityPolicyDocs_Create, { SecurityTypeId }),
|
4501
4405
|
renderRowActions: ({ row }) => {
|
4502
4406
|
var _a;
|
4503
|
-
return /* @__PURE__ */
|
4407
|
+
return /* @__PURE__ */ jsxs52(MyCenterFull, { children: [
|
4504
4408
|
/* @__PURE__ */ jsx84(F_securityPolicyDocs_Update, { values: row.original }),
|
4505
4409
|
/* @__PURE__ */ jsx84(
|
4506
4410
|
F_securityPolicyDocs_Delete,
|
@@ -4522,13 +4426,13 @@ function F_securityPolicyDocs({ SecurityTypeId }) {
|
|
4522
4426
|
}
|
4523
4427
|
|
4524
4428
|
// src/modules-features/admin/core/systemUpdateDocs/F_systemUpdateDocs.tsx
|
4525
|
-
import { useQuery as
|
4526
|
-
import { useMemo as
|
4429
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
4430
|
+
import { useMemo as useMemo18 } from "react";
|
4527
4431
|
|
4528
4432
|
// src/modules-features/admin/core/systemUpdateDocs/F_systemUpdateDocs_Create.tsx
|
4529
4433
|
import { FileInput as FileInput9, Textarea as Textarea3 } from "@mantine/core";
|
4530
4434
|
import { useForm as useForm27 } from "@mantine/form";
|
4531
|
-
import { jsx as jsx86, jsxs as
|
4435
|
+
import { jsx as jsx86, jsxs as jsxs53 } from "react/jsx-runtime";
|
4532
4436
|
function F_systemUpdateDocs_Create({
|
4533
4437
|
RefinementTypeId
|
4534
4438
|
}) {
|
@@ -4543,7 +4447,7 @@ function F_systemUpdateDocs_Create({
|
|
4543
4447
|
endDate: (value, values) => value && values.startDate && new Date(value) > new Date(values.startDate) ? null : "Ng\xE0y k\u1EBFt th\xFAc ph\u1EA3i l\u1EDBn h\u01A1n ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
4544
4448
|
}
|
4545
4449
|
});
|
4546
|
-
return /* @__PURE__ */
|
4450
|
+
return /* @__PURE__ */ jsxs53(
|
4547
4451
|
MyButtonCreate,
|
4548
4452
|
{
|
4549
4453
|
objectName: "v\u0103n b\u1EA3n",
|
@@ -4624,7 +4528,7 @@ function F_systemUpdateDocs_Delete({
|
|
4624
4528
|
// src/modules-features/admin/core/systemUpdateDocs/F_systemUpdateDocs_Update.tsx
|
4625
4529
|
import { FileInput as FileInput10, Textarea as Textarea4 } from "@mantine/core";
|
4626
4530
|
import { useForm as useForm28 } from "@mantine/form";
|
4627
|
-
import { jsx as jsx88, jsxs as
|
4531
|
+
import { jsx as jsx88, jsxs as jsxs54 } from "react/jsx-runtime";
|
4628
4532
|
function F_systemUpdateDocs_Update({ values }) {
|
4629
4533
|
var _a;
|
4630
4534
|
const form = useForm28({
|
@@ -4647,7 +4551,7 @@ function F_systemUpdateDocs_Update({ values }) {
|
|
4647
4551
|
endDate: (value, values2) => value && values2.startDate && new Date(value) > new Date(values2.startDate) ? null : "Ng\xE0y k\u1EBFt th\xFAc ph\u1EA3i l\u1EDBn h\u01A1n ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
4648
4552
|
}
|
4649
4553
|
});
|
4650
|
-
return /* @__PURE__ */
|
4554
|
+
return /* @__PURE__ */ jsxs54(
|
4651
4555
|
MyActionIconUpdate,
|
4652
4556
|
{
|
4653
4557
|
form,
|
@@ -4708,9 +4612,9 @@ function F_systemUpdateDocs_Update({ values }) {
|
|
4708
4612
|
}
|
4709
4613
|
|
4710
4614
|
// src/modules-features/admin/core/systemUpdateDocs/F_systemUpdateDocs.tsx
|
4711
|
-
import { jsx as jsx89, jsxs as
|
4615
|
+
import { jsx as jsx89, jsxs as jsxs55 } from "react/jsx-runtime";
|
4712
4616
|
function F_systemUpdateDocs({ RefinementTypeId }) {
|
4713
|
-
const query =
|
4617
|
+
const query = useQuery18({
|
4714
4618
|
queryKey: ["F_systemUpdateDocs_Read"],
|
4715
4619
|
queryFn: async () => {
|
4716
4620
|
var _a;
|
@@ -4720,7 +4624,7 @@ function F_systemUpdateDocs({ RefinementTypeId }) {
|
|
4720
4624
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
4721
4625
|
}
|
4722
4626
|
});
|
4723
|
-
const columns =
|
4627
|
+
const columns = useMemo18(
|
4724
4628
|
() => [
|
4725
4629
|
{
|
4726
4630
|
header: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u",
|
@@ -4756,7 +4660,7 @@ function F_systemUpdateDocs({ RefinementTypeId }) {
|
|
4756
4660
|
data: query.data || [],
|
4757
4661
|
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx89(F_systemUpdateDocs_Create, { RefinementTypeId }),
|
4758
4662
|
renderRowActions: ({ row }) => {
|
4759
|
-
return /* @__PURE__ */
|
4663
|
+
return /* @__PURE__ */ jsxs55(MyCenterFull, { children: [
|
4760
4664
|
/* @__PURE__ */ jsx89(F_systemUpdateDocs_Update, { values: row.original }),
|
4761
4665
|
/* @__PURE__ */ jsx89(
|
4762
4666
|
F_systemUpdateDocs_Delete,
|
@@ -4772,13 +4676,13 @@ function F_systemUpdateDocs({ RefinementTypeId }) {
|
|
4772
4676
|
}
|
4773
4677
|
|
4774
4678
|
// src/modules-features/admin/core/userGuideDocs/F_userGuideDocs_Read.tsx
|
4775
|
-
import { useQuery as
|
4776
|
-
import { useMemo as
|
4679
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
4680
|
+
import { useMemo as useMemo19 } from "react";
|
4777
4681
|
|
4778
4682
|
// src/modules-features/admin/core/userGuideDocs/F_userGuideDocs_Create.tsx
|
4779
4683
|
import { FileInput as FileInput11 } from "@mantine/core";
|
4780
4684
|
import { useForm as useForm29 } from "@mantine/form";
|
4781
|
-
import { jsx as jsx90, jsxs as
|
4685
|
+
import { jsx as jsx90, jsxs as jsxs56 } from "react/jsx-runtime";
|
4782
4686
|
function F_userGuideDocs_Create({ GuidelineTypeId }) {
|
4783
4687
|
const form = useForm29({
|
4784
4688
|
mode: "uncontrolled",
|
@@ -4788,7 +4692,7 @@ function F_userGuideDocs_Create({ GuidelineTypeId }) {
|
|
4788
4692
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
4789
4693
|
}
|
4790
4694
|
});
|
4791
|
-
return /* @__PURE__ */
|
4695
|
+
return /* @__PURE__ */ jsxs56(
|
4792
4696
|
MyButtonCreate,
|
4793
4697
|
{
|
4794
4698
|
objectName: "v\u0103n b\u1EA3n",
|
@@ -4846,7 +4750,7 @@ function F_userGuideDocs_Delete({
|
|
4846
4750
|
// src/modules-features/admin/core/userGuideDocs/F_userGuideDocs_Update.tsx
|
4847
4751
|
import { FileInput as FileInput12 } from "@mantine/core";
|
4848
4752
|
import { useForm as useForm30 } from "@mantine/form";
|
4849
|
-
import { jsx as jsx92, jsxs as
|
4753
|
+
import { jsx as jsx92, jsxs as jsxs57 } from "react/jsx-runtime";
|
4850
4754
|
function F_userGuideDocs_Update({ values }) {
|
4851
4755
|
var _a;
|
4852
4756
|
const form = useForm30({
|
@@ -4863,7 +4767,7 @@ function F_userGuideDocs_Update({ values }) {
|
|
4863
4767
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
4864
4768
|
}
|
4865
4769
|
});
|
4866
|
-
return /* @__PURE__ */
|
4770
|
+
return /* @__PURE__ */ jsxs57(
|
4867
4771
|
MyActionIconUpdate,
|
4868
4772
|
{
|
4869
4773
|
form,
|
@@ -4901,9 +4805,9 @@ function F_userGuideDocs_Update({ values }) {
|
|
4901
4805
|
}
|
4902
4806
|
|
4903
4807
|
// src/modules-features/admin/core/userGuideDocs/F_userGuideDocs_Read.tsx
|
4904
|
-
import { jsx as jsx93, jsxs as
|
4808
|
+
import { jsx as jsx93, jsxs as jsxs58 } from "react/jsx-runtime";
|
4905
4809
|
function F_userGuideDocs_Read({ GuidelineTypeId }) {
|
4906
|
-
const query =
|
4810
|
+
const query = useQuery19({
|
4907
4811
|
queryKey: ["F_userGuideDocs_Read"],
|
4908
4812
|
queryFn: async () => {
|
4909
4813
|
var _a;
|
@@ -4913,7 +4817,7 @@ function F_userGuideDocs_Read({ GuidelineTypeId }) {
|
|
4913
4817
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
4914
4818
|
}
|
4915
4819
|
});
|
4916
|
-
const columns =
|
4820
|
+
const columns = useMemo19(
|
4917
4821
|
() => [
|
4918
4822
|
{
|
4919
4823
|
header: "M\xE3 t\xE0i li\u1EC7u",
|
@@ -4941,7 +4845,7 @@ function F_userGuideDocs_Read({ GuidelineTypeId }) {
|
|
4941
4845
|
data: query.data || [],
|
4942
4846
|
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx93(F_userGuideDocs_Create, { GuidelineTypeId }),
|
4943
4847
|
renderRowActions: ({ row }) => {
|
4944
|
-
return /* @__PURE__ */
|
4848
|
+
return /* @__PURE__ */ jsxs58(MyCenterFull, { children: [
|
4945
4849
|
/* @__PURE__ */ jsx93(F_userGuideDocs_Update, { values: row.original }),
|
4946
4850
|
/* @__PURE__ */ jsx93(
|
4947
4851
|
F_userGuideDocs_Delete,
|
@@ -4967,7 +4871,7 @@ import { Paper as Paper9, Space as Space6 } from "@mantine/core";
|
|
4967
4871
|
|
4968
4872
|
// src/modules-features/admin/core/workflowProcessDocs/F_workflowProcessDocs_Create.tsx
|
4969
4873
|
import { useForm as useForm31 } from "@mantine/form";
|
4970
|
-
import { jsx as jsx95, jsxs as
|
4874
|
+
import { jsx as jsx95, jsxs as jsxs59 } from "react/jsx-runtime";
|
4971
4875
|
function F_workflowProcessDocs_Create({
|
4972
4876
|
WorkflowTypeId
|
4973
4877
|
}) {
|
@@ -4981,7 +4885,7 @@ function F_workflowProcessDocs_Create({
|
|
4981
4885
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
4982
4886
|
}
|
4983
4887
|
});
|
4984
|
-
return /* @__PURE__ */
|
4888
|
+
return /* @__PURE__ */ jsxs59(
|
4985
4889
|
MyButtonCreate,
|
4986
4890
|
{
|
4987
4891
|
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
@@ -5042,9 +4946,9 @@ function F_workflowProcessDocs_Create({
|
|
5042
4946
|
|
5043
4947
|
// src/modules-features/admin/core/workflowProcessDocs/F_workflowProcessDocs_Read.tsx
|
5044
4948
|
import { Accordion as Accordion6, Alert as Alert6, Blockquote as Blockquote6, Skeleton as Skeleton6 } from "@mantine/core";
|
5045
|
-
import { useQuery as
|
4949
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
5046
4950
|
import { IconBug as IconBug6 } from "@tabler/icons-react";
|
5047
|
-
import { useMemo as
|
4951
|
+
import { useMemo as useMemo20 } from "react";
|
5048
4952
|
|
5049
4953
|
// src/modules-features/admin/core/workflowProcessDocs/F_workflowProcessDocs_Delete.tsx
|
5050
4954
|
import { jsx as jsx96 } from "react/jsx-runtime";
|
@@ -5063,7 +4967,7 @@ function F_workflowProcessDocs_Delete({
|
|
5063
4967
|
|
5064
4968
|
// src/modules-features/admin/core/workflowProcessDocs/F_workflowProcessDocs_Update.tsx
|
5065
4969
|
import { useForm as useForm32 } from "@mantine/form";
|
5066
|
-
import { jsx as jsx97, jsxs as
|
4970
|
+
import { jsx as jsx97, jsxs as jsxs60 } from "react/jsx-runtime";
|
5067
4971
|
function F_workflowProcessDocs_Update({
|
5068
4972
|
values,
|
5069
4973
|
WorkflowTypeId
|
@@ -5085,7 +4989,7 @@ function F_workflowProcessDocs_Update({
|
|
5085
4989
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
5086
4990
|
}
|
5087
4991
|
});
|
5088
|
-
return /* @__PURE__ */
|
4992
|
+
return /* @__PURE__ */ jsxs60(
|
5089
4993
|
MyActionIconUpdate,
|
5090
4994
|
{
|
5091
4995
|
form,
|
@@ -5143,12 +5047,12 @@ function F_workflowProcessDocs_Update({
|
|
5143
5047
|
}
|
5144
5048
|
|
5145
5049
|
// src/modules-features/admin/core/workflowProcessDocs/F_workflowProcessDocs_Read.tsx
|
5146
|
-
import { jsx as jsx98, jsxs as
|
5050
|
+
import { jsx as jsx98, jsxs as jsxs61 } from "react/jsx-runtime";
|
5147
5051
|
function F_workflowProcessDocs_Read({
|
5148
5052
|
WorkflowTypeId
|
5149
5053
|
}) {
|
5150
5054
|
var _a, _b, _c;
|
5151
|
-
const documentAttributeQuery =
|
5055
|
+
const documentAttributeQuery = useQuery20({
|
5152
5056
|
queryKey: ["F_workflowProcessDocs_Read", WorkflowTypeId],
|
5153
5057
|
queryFn: async () => {
|
5154
5058
|
var _a2;
|
@@ -5190,7 +5094,7 @@ function SubRead6({
|
|
5190
5094
|
documentType,
|
5191
5095
|
WorkflowTypeId
|
5192
5096
|
}) {
|
5193
|
-
const documentQuery =
|
5097
|
+
const documentQuery = useQuery20({
|
5194
5098
|
queryKey: ["SubRead" + documentType],
|
5195
5099
|
queryFn: async () => {
|
5196
5100
|
const result = await baseAxios_default.get(
|
@@ -5199,7 +5103,7 @@ function SubRead6({
|
|
5199
5103
|
return result.data.data;
|
5200
5104
|
}
|
5201
5105
|
});
|
5202
|
-
const columns =
|
5106
|
+
const columns = useMemo20(
|
5203
5107
|
() => [
|
5204
5108
|
{
|
5205
5109
|
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
@@ -5222,7 +5126,7 @@ function SubRead6({
|
|
5222
5126
|
],
|
5223
5127
|
[]
|
5224
5128
|
);
|
5225
|
-
return /* @__PURE__ */
|
5129
|
+
return /* @__PURE__ */ jsxs61(Accordion6.Item, { value: documentType.toString(), children: [
|
5226
5130
|
/* @__PURE__ */ jsx98(Accordion6.Control, { children: name }),
|
5227
5131
|
/* @__PURE__ */ jsx98(Accordion6.Panel, { children: /* @__PURE__ */ jsx98(
|
5228
5132
|
MyDataTable,
|
@@ -5231,7 +5135,7 @@ function SubRead6({
|
|
5231
5135
|
isError: documentQuery.isError,
|
5232
5136
|
columns,
|
5233
5137
|
data: documentQuery.data || [],
|
5234
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
5138
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs61(MyCenterFull, { children: [
|
5235
5139
|
/* @__PURE__ */ jsx98(
|
5236
5140
|
F_workflowProcessDocs_Update,
|
5237
5141
|
{
|
@@ -5253,11 +5157,11 @@ function SubRead6({
|
|
5253
5157
|
}
|
5254
5158
|
|
5255
5159
|
// src/modules-features/admin/core/workflowProcessDocs/F_workflowProcessDocs.tsx
|
5256
|
-
import { jsx as jsx99, jsxs as
|
5160
|
+
import { jsx as jsx99, jsxs as jsxs62 } from "react/jsx-runtime";
|
5257
5161
|
function F_workflowProcessDocs({
|
5258
5162
|
WorkflowTypeId
|
5259
5163
|
}) {
|
5260
|
-
return /* @__PURE__ */
|
5164
|
+
return /* @__PURE__ */ jsxs62(Paper9, { p: "md", children: [
|
5261
5165
|
/* @__PURE__ */ jsx99(MyFlexEnd, { children: /* @__PURE__ */ jsx99(F_workflowProcessDocs_Create, { WorkflowTypeId }) }),
|
5262
5166
|
/* @__PURE__ */ jsx99(Space6, {}),
|
5263
5167
|
/* @__PURE__ */ jsx99(F_workflowProcessDocs_Read, { WorkflowTypeId })
|
@@ -5266,12 +5170,12 @@ function F_workflowProcessDocs({
|
|
5266
5170
|
|
5267
5171
|
// src/modules-features/authenticate/F_authenticate_SplashPage.tsx
|
5268
5172
|
import { useRouter } from "next/navigation";
|
5269
|
-
import { useEffect as
|
5173
|
+
import { useEffect as useEffect9 } from "react";
|
5270
5174
|
import { jsx as jsx100 } from "react/jsx-runtime";
|
5271
5175
|
function F_authenticate_SplashPage() {
|
5272
5176
|
const router = useRouter();
|
5273
5177
|
const S_Authenticate = useS_authenticate();
|
5274
|
-
|
5178
|
+
useEffect9(() => {
|
5275
5179
|
if (S_Authenticate.state.token == "") {
|
5276
5180
|
router.push("/authenticate/login");
|
5277
5181
|
return;
|
@@ -5289,7 +5193,7 @@ import {
|
|
5289
5193
|
Center as Center2,
|
5290
5194
|
Checkbox as Checkbox3,
|
5291
5195
|
Flex as Flex3,
|
5292
|
-
Group as
|
5196
|
+
Group as Group5,
|
5293
5197
|
Paper as Paper10,
|
5294
5198
|
PasswordInput as PasswordInput2,
|
5295
5199
|
Text as Text3,
|
@@ -5301,13 +5205,13 @@ import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
5301
5205
|
import axios from "axios";
|
5302
5206
|
import Link from "next/link";
|
5303
5207
|
import { useRouter as useRouter2 } from "next/navigation";
|
5304
|
-
import { useEffect as
|
5208
|
+
import { useEffect as useEffect10, useState as useState8 } from "react";
|
5305
5209
|
|
5306
5210
|
// src/modules-features/authenticate/F_authenticate_Login/css.module.css
|
5307
5211
|
var css_default = {};
|
5308
5212
|
|
5309
5213
|
// src/modules-features/authenticate/F_authenticate_Login/F_authenticate_Login.tsx
|
5310
|
-
import { jsx as jsx101, jsxs as
|
5214
|
+
import { jsx as jsx101, jsxs as jsxs63 } from "react/jsx-runtime";
|
5311
5215
|
function F_authenticate_Login({
|
5312
5216
|
header,
|
5313
5217
|
redirectUrlAfterLogin = "/admin/dashboard",
|
@@ -5316,11 +5220,12 @@ function F_authenticate_Login({
|
|
5316
5220
|
onSuccess,
|
5317
5221
|
showLoginButton = true,
|
5318
5222
|
showSaveLogin = true,
|
5319
|
-
showForgotPassword = true
|
5223
|
+
showForgotPassword = true,
|
5224
|
+
customSubmit
|
5320
5225
|
}) {
|
5321
5226
|
const router = useRouter2();
|
5322
5227
|
const authenticate_store = useS_authenticate();
|
5323
|
-
const loadingState =
|
5228
|
+
const loadingState = useState8(false);
|
5324
5229
|
const mutation = useM_Account_Sigin();
|
5325
5230
|
const form = useForm33({
|
5326
5231
|
initialValues: {
|
@@ -5332,7 +5237,7 @@ function F_authenticate_Login({
|
|
5332
5237
|
password: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
5333
5238
|
}
|
5334
5239
|
});
|
5335
|
-
|
5240
|
+
useEffect10(() => {
|
5336
5241
|
var _a;
|
5337
5242
|
form.setValues({
|
5338
5243
|
username: ((_a = authenticate_store.state) == null ? void 0 : _a.username) || "",
|
@@ -5340,6 +5245,9 @@ function F_authenticate_Login({
|
|
5340
5245
|
});
|
5341
5246
|
}, [authenticate_store.state.username]);
|
5342
5247
|
function handleSubmit(userName, passWord) {
|
5248
|
+
if (customSubmit) {
|
5249
|
+
return customSubmit(userName, passWord);
|
5250
|
+
}
|
5343
5251
|
loadingState[1](true);
|
5344
5252
|
mutation.mutate({
|
5345
5253
|
"userName": userName,
|
@@ -5379,15 +5287,15 @@ function F_authenticate_Login({
|
|
5379
5287
|
{
|
5380
5288
|
src: backgroundImage,
|
5381
5289
|
h: "100vh",
|
5382
|
-
children: /* @__PURE__ */ jsx101(Center2, { h: "100vh", children: /* @__PURE__ */
|
5383
|
-
header ? header : /* @__PURE__ */
|
5290
|
+
children: /* @__PURE__ */ jsx101(Center2, { h: "100vh", children: /* @__PURE__ */ jsxs63(Paper10, { withBorder: true, w: 400, m: "md", shadow: "md", p: 30, mt: 30, radius: "md", children: [
|
5291
|
+
header ? header : /* @__PURE__ */ jsxs63(Flex3, { direction: "column", mb: "md", children: [
|
5384
5292
|
/* @__PURE__ */ jsx101(Title, { ta: "center", className: css_default.title, children: "\u0110\u0103ng nh\u1EADp!" }),
|
5385
|
-
/* @__PURE__ */
|
5293
|
+
/* @__PURE__ */ jsxs63(Text3, { c: "dimmed", size: "sm", ta: "center", mt: 5, children: [
|
5386
5294
|
"B\u1EA1n g\u1EB7p v\u1EA5n \u0111\u1EC1 k\u1EF9 thu\u1EADt?\xA0",
|
5387
5295
|
/* @__PURE__ */ jsx101(Anchor, { size: "sm", component: "button", children: "V\xE0o link n\xE0y" })
|
5388
5296
|
] })
|
5389
5297
|
] }),
|
5390
|
-
/* @__PURE__ */ jsx101("form", { onSubmit: form.onSubmit(async (values) => handleSubmit(values.username, values.password)), children: /* @__PURE__ */
|
5298
|
+
/* @__PURE__ */ jsx101("form", { onSubmit: form.onSubmit(async (values) => handleSubmit(values.username, values.password)), children: /* @__PURE__ */ jsxs63(MyFlexColumn, { children: [
|
5391
5299
|
/* @__PURE__ */ jsx101(
|
5392
5300
|
TextInput3,
|
5393
5301
|
__spreadProps(__spreadValues({}, form.getInputProps("username")), {
|
@@ -5404,7 +5312,7 @@ function F_authenticate_Login({
|
|
5404
5312
|
withAsterisk: true
|
5405
5313
|
})
|
5406
5314
|
),
|
5407
|
-
/* @__PURE__ */
|
5315
|
+
/* @__PURE__ */ jsxs63(Group5, { justify: "space-between", children: [
|
5408
5316
|
showSaveLogin && /* @__PURE__ */ jsx101(
|
5409
5317
|
Checkbox3,
|
5410
5318
|
{
|