aq-fe-framework 0.1.316 → 0.1.318
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.
@@ -6,23 +6,12 @@ import {
|
|
6
6
|
utils_converter_enumToSelectOptions,
|
7
7
|
utils_file_fileToAQDocumentType
|
8
8
|
} from "../chunk-VECMRDKG.mjs";
|
9
|
-
import {
|
10
|
-
const_object_documentTypes
|
11
|
-
} from "../chunk-GFEMKKFH.mjs";
|
12
|
-
import {
|
13
|
-
MyButton,
|
14
|
-
MyTextInput
|
15
|
-
} from "../chunk-PSV5MULK.mjs";
|
16
|
-
import {
|
17
|
-
enum_emailConfigModule
|
18
|
-
} from "../chunk-VH4ZAD6M.mjs";
|
19
|
-
import "../chunk-K6S7R6LU.mjs";
|
20
9
|
import {
|
21
10
|
F_authenticate_Logout,
|
22
11
|
MyActionIconDelete,
|
23
12
|
MyActionIconUpdate,
|
24
13
|
MyBoxesBackground,
|
25
|
-
MyButton
|
14
|
+
MyButton,
|
26
15
|
MyButtonCreate,
|
27
16
|
MyButtonModal,
|
28
17
|
MyButtonViewPDF,
|
@@ -36,16 +25,27 @@ import {
|
|
36
25
|
MyPageContent,
|
37
26
|
MySelect,
|
38
27
|
MyTab,
|
39
|
-
MyTextInput
|
28
|
+
MyTextInput,
|
40
29
|
groupToTwoLevels,
|
41
30
|
useS_authenticate,
|
42
31
|
utils_layout_getItemsWithoutLinks
|
43
32
|
} from "../chunk-FUHOV7NB.mjs";
|
44
33
|
import "../chunk-5U2JSHSJ.mjs";
|
34
|
+
import {
|
35
|
+
MyButton as MyButton2,
|
36
|
+
MyTextInput as MyTextInput2
|
37
|
+
} from "../chunk-ZZ7S4EA4.mjs";
|
45
38
|
import {
|
46
39
|
MyFlexColumn,
|
47
40
|
MyFlexRow
|
48
41
|
} from "../chunk-HHJFKKE7.mjs";
|
42
|
+
import {
|
43
|
+
enum_emailConfigModule
|
44
|
+
} from "../chunk-VH4ZAD6M.mjs";
|
45
|
+
import "../chunk-K6S7R6LU.mjs";
|
46
|
+
import {
|
47
|
+
const_object_documentTypes
|
48
|
+
} from "../chunk-GFEMKKFH.mjs";
|
49
49
|
import {
|
50
50
|
const_object_colors
|
51
51
|
} from "../chunk-NWBLJ3W3.mjs";
|
@@ -71,478 +71,1297 @@ import {
|
|
71
71
|
__spreadValues
|
72
72
|
} from "../chunk-FWCSY2DS.mjs";
|
73
73
|
|
74
|
-
// src/modules-features/admin/core/
|
75
|
-
import {
|
76
|
-
|
77
|
-
// src/api/services/accountService.ts
|
78
|
-
var CONTROLLER = "/account";
|
79
|
-
var apiData_Account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER, baseAxios_default)), {
|
80
|
-
// Các hàm custom
|
81
|
-
getCoeAccountById: (id) => {
|
82
|
-
return baseAxios_default.post(CONTROLLER + `/getCOEAccount`, { userId: id });
|
83
|
-
},
|
84
|
-
getAdminAccount: (paging) => {
|
85
|
-
return baseAxios_default.get(CONTROLLER + `/GetAdminAccount`, {
|
86
|
-
params: paging
|
87
|
-
});
|
88
|
-
}
|
89
|
-
});
|
74
|
+
// src/modules-features/admin/core/accessControl/F_accessControl.tsx
|
75
|
+
import { Grid, Paper, ScrollArea as ScrollArea2 } from "@mantine/core";
|
90
76
|
|
91
|
-
// src/modules-features/admin/core/
|
92
|
-
import {
|
93
|
-
import {
|
94
|
-
import { useMemo as useMemo2, useState as useState3 } from "react";
|
77
|
+
// src/modules-features/admin/core/accessControl/F_accessControl_ReadUser.tsx
|
78
|
+
import { useQuery } from "@tanstack/react-query";
|
79
|
+
import { useEffect, useMemo, useState } from "react";
|
95
80
|
|
96
|
-
// src/modules-features/admin/core/
|
81
|
+
// src/modules-features/admin/core/accessControl/useS_accessControl.tsx
|
97
82
|
var useStore = createGenericStore({
|
98
|
-
initialState: {}
|
83
|
+
initialState: { roleId: 0 },
|
84
|
+
storageKey: "useS_core83092"
|
99
85
|
});
|
100
|
-
function
|
86
|
+
function useS_accessControl() {
|
101
87
|
const store = useStore();
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
88
|
+
function toogleAllPermissionWithType(field, isCheck) {
|
89
|
+
var _a;
|
90
|
+
const updatedData = (_a = store.state.rolePermissions) == null ? void 0 : _a.map((item) => __spreadProps(__spreadValues({}, item), {
|
91
|
+
[field]: isCheck
|
92
|
+
}));
|
93
|
+
store.setProperty("rolePermissions", updatedData);
|
94
|
+
}
|
95
|
+
function findByPageId(pageId) {
|
96
|
+
var _a;
|
97
|
+
const rolePermission = (_a = store.state.rolePermissions) == null ? void 0 : _a.find((item) => item.pageId == pageId);
|
98
|
+
return rolePermission;
|
99
|
+
}
|
100
|
+
function updatePermission(pageId, updatedPermission) {
|
101
|
+
var _a;
|
102
|
+
const updatedData = (_a = store.state.rolePermissions) == null ? void 0 : _a.map(
|
103
|
+
(item) => item.pageId === pageId ? __spreadValues(__spreadValues({}, item), updatedPermission) : item
|
104
|
+
);
|
105
|
+
store.setProperty("rolePermissions", updatedData);
|
106
|
+
}
|
107
|
+
function isAllPermission(field) {
|
108
|
+
var _a, _b;
|
109
|
+
return (_b = (_a = store.state.rolePermissions) == null ? void 0 : _a.every((item) => item[field] === true)) != null ? _b : false;
|
110
|
+
}
|
111
|
+
return __spreadProps(__spreadValues({}, store), {
|
112
|
+
toogleAllPermissionWithType,
|
113
|
+
findByPageId,
|
114
|
+
updatePermission,
|
115
|
+
isAllPermission
|
123
116
|
});
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
117
|
+
}
|
118
|
+
function utils_accessControl_mergePage(arr1, arr2) {
|
119
|
+
const pageMap = /* @__PURE__ */ new Map();
|
120
|
+
arr1.forEach((page) => pageMap.set(page.pageId, page));
|
121
|
+
arr2.forEach((page) => {
|
122
|
+
if (pageMap.has(page.pageId)) {
|
123
|
+
pageMap.set(page.pageId, page);
|
128
124
|
}
|
129
125
|
});
|
130
|
-
|
126
|
+
return Array.from(pageMap.values());
|
127
|
+
}
|
128
|
+
|
129
|
+
// src/modules-features/admin/core/accessControl/F_accessControl_ReadUser.tsx
|
130
|
+
import { jsx } from "react/jsx-runtime";
|
131
|
+
function F_accessControl_ReadUser() {
|
132
|
+
const store = useS_accessControl();
|
133
|
+
const query = useQ_core83092_Account_GetAdminAccount();
|
134
|
+
const [rowSelection, setRowSelection] = useState({});
|
135
|
+
const columns = useMemo(
|
131
136
|
() => [
|
132
137
|
{
|
133
|
-
header: "
|
134
|
-
accessorKey: "
|
138
|
+
header: "H\u1ECD v\xE0 t\xEAn",
|
139
|
+
accessorKey: "fullName"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
header: "Email",
|
143
|
+
accessorKey: "email"
|
135
144
|
}
|
136
145
|
],
|
137
146
|
[]
|
138
147
|
);
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
return;
|
144
|
-
}
|
145
|
-
mutation.mutate(Object.keys(rowSelection).map(Number), {
|
146
|
-
onSuccess: () => {
|
147
|
-
utils_notification_show({ crudType: "update" });
|
148
|
-
disc[1].close();
|
149
|
-
queryClient.invalidateQueries();
|
150
|
-
}
|
151
|
-
});
|
152
|
-
}
|
148
|
+
const handleRowClick = (rowId) => {
|
149
|
+
setRowSelection({ [rowId]: true });
|
150
|
+
store.setProperty("roleId", parseInt(rowId));
|
151
|
+
};
|
153
152
|
useEffect(() => {
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
/* @__PURE__ */ jsx(Table.Td, { children: user == null ? void 0 : user.email })
|
183
|
-
] })
|
184
|
-
] })
|
185
|
-
}
|
186
|
-
),
|
187
|
-
query.isLoading && "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...",
|
188
|
-
query.isError && "L\u1ED7i khi t\u1EA3i d\u1EEF li\u1EC7u...",
|
189
|
-
/* @__PURE__ */ jsx(Fieldset, { legend: "Ch\u1ECDn quy\u1EC1n", children: /* @__PURE__ */ jsx(
|
190
|
-
MyDataTable,
|
191
|
-
{
|
192
|
-
enableRowSelection: true,
|
193
|
-
onRowSelectionChange: setRowSelection,
|
194
|
-
state: { rowSelection },
|
195
|
-
setSelectedRow: rowSelect[1],
|
196
|
-
getRowId: (originalRow) => {
|
197
|
-
var _a;
|
198
|
-
return (_a = originalRow.id) == null ? void 0 : _a.toString();
|
199
|
-
},
|
200
|
-
initialState: {
|
201
|
-
density: "xs",
|
202
|
-
pagination: { pageIndex: 0, pageSize: 10 },
|
203
|
-
columnPinning: { right: ["mrt-row-actions"] },
|
204
|
-
columnVisibility: {
|
205
|
-
nguoiCapNhat: false,
|
206
|
-
ngayCapNhat: false
|
207
|
-
}
|
208
|
-
},
|
209
|
-
columns: permissionColumns,
|
210
|
-
data: query.data || []
|
211
|
-
}
|
212
|
-
) }),
|
213
|
-
/* @__PURE__ */ jsx(Group, { justify: "flex-end", mt: 24, children: /* @__PURE__ */ jsx(Button, { onClick: handleSave, children: "L\u01B0u" }) })
|
214
|
-
] });
|
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!";
|
162
|
+
return /* @__PURE__ */ jsx(
|
163
|
+
MyDataTable,
|
164
|
+
{
|
165
|
+
columns,
|
166
|
+
data: query.data,
|
167
|
+
getRowId: (row) => {
|
168
|
+
var _a;
|
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
|
179
|
+
}
|
180
|
+
);
|
215
181
|
}
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
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
|
+
var mockUserData = [
|
196
|
+
{
|
197
|
+
userName: "nguyenvana",
|
198
|
+
fullName: "Nguy\u1EC5n V\u0103n A",
|
199
|
+
email: "vana@example.com"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
userName: "tranthib",
|
203
|
+
fullName: "Tr\u1EA7n Th\u1ECB B",
|
204
|
+
email: "thib@example.com"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
userName: "leminhc",
|
208
|
+
fullName: "L\xEA Minh C",
|
209
|
+
email: "minhc@example.com"
|
210
|
+
},
|
211
|
+
{
|
212
|
+
userName: "phamthid",
|
213
|
+
fullName: "Ph\u1EA1m Th\u1ECB D",
|
214
|
+
email: "thid@example.com"
|
215
|
+
},
|
216
|
+
{
|
217
|
+
userName: "doanvanh",
|
218
|
+
fullName: "Do\xE3n V\u0103n H",
|
219
|
+
email: "vanh@example.com"
|
220
|
+
}
|
221
221
|
];
|
222
222
|
|
223
|
-
// src/modules-features/admin/core/
|
224
|
-
import {
|
225
|
-
import {
|
226
|
-
import {
|
227
|
-
|
228
|
-
|
223
|
+
// src/modules-features/admin/core/accessControl/F_accessControl_ViewMenuPermissions.tsx
|
224
|
+
import { Checkbox, Flex, ScrollArea, Table, Text } from "@mantine/core";
|
225
|
+
import { IconEdit, IconEyeUp, IconFileExport, IconPlus, IconPrinter, IconTrash } from "@tabler/icons-react";
|
226
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
227
|
+
import React, { useEffect as useEffect2, useState as useState2 } from "react";
|
228
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
229
|
+
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
230
|
+
function F_accessControl_ViewMenuPermissions({ menuData: menuData2 }) {
|
229
231
|
var _a, _b;
|
230
|
-
const store =
|
231
|
-
const
|
232
|
-
const
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
});
|
245
|
-
async function handleSubmit() {
|
246
|
-
return await baseAxios_default.post(ENDPOINT, __spreadProps(__spreadValues({}, form.getValues()), {
|
247
|
-
passwordHash: "",
|
248
|
-
id: 0,
|
249
|
-
address: "",
|
250
|
-
concurrencyStamp: "",
|
251
|
-
isBlocked: false,
|
252
|
-
isEnabled: true,
|
253
|
-
workingUnitId: void 0,
|
254
|
-
AQModuleId: 1002,
|
255
|
-
avatarFileDetail: {
|
256
|
-
fileName: "",
|
257
|
-
fileExtension: "",
|
258
|
-
fileBase64String: ""
|
259
|
-
}
|
260
|
-
}));
|
261
|
-
}
|
262
|
-
return /* @__PURE__ */ jsxs2(MyButtonCreate, { form, onSubmit: handleSubmit, objectName: "ng\u01B0\u1EDDi d\xF9ng", children: [
|
263
|
-
/* @__PURE__ */ jsx2(MyTextInput2, __spreadValues({ label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
264
|
-
/* @__PURE__ */ jsx2(MyTextInput2, __spreadValues({ label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
265
|
-
/* @__PURE__ */ jsx2(MyTextInput2, __spreadValues({ label: "M\u1EADt kh\u1EA9u" }, form.getInputProps("password"))),
|
266
|
-
/* @__PURE__ */ jsx2(MyTextInput2, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
267
|
-
/* @__PURE__ */ jsx2(MyTextInput2, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
268
|
-
/* @__PURE__ */ jsx2(MyTextInput2, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
|
269
|
-
skillCenter_getAll_query.data && store.state.isRequireSkillCenter == true && /* @__PURE__ */ jsx2(
|
270
|
-
MultiSelect,
|
232
|
+
const store = useS_accessControl();
|
233
|
+
const query = useGetUserPermission({ menuData: menuData2 });
|
234
|
+
const list = useState2([]);
|
235
|
+
useEffect2(() => {
|
236
|
+
list[1](groupToTwoLevels(menuData2));
|
237
|
+
}, []);
|
238
|
+
useEffect2(() => {
|
239
|
+
if (!query.data) return;
|
240
|
+
store.setProperty("rolePermissions", query.data);
|
241
|
+
}, [query.data]);
|
242
|
+
if (((_a = list[0]) == null ? void 0 : _a.length) == 0) return "\u0110ang t\u1EA3i...";
|
243
|
+
return /* @__PURE__ */ jsx2(ScrollArea.Autosize, { h: "70vh", children: /* @__PURE__ */ jsxs(Table, { children: [
|
244
|
+
/* @__PURE__ */ jsx2(
|
245
|
+
Table.Thead,
|
271
246
|
{
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
};
|
280
|
-
}),
|
281
|
-
onChange: (e) => {
|
282
|
-
form.setFieldValue("userSkillCenters", e.map((item, idx) => ({
|
283
|
-
idField: idx.toString(),
|
284
|
-
id: 0,
|
285
|
-
code: "string",
|
286
|
-
name: "string",
|
287
|
-
concurrencyStamp: "string",
|
288
|
-
isEnabled: true,
|
289
|
-
skillCenterId: parseInt(item.toString())
|
290
|
-
})));
|
247
|
+
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
248
|
+
style: {
|
249
|
+
position: "sticky",
|
250
|
+
top: 0,
|
251
|
+
zIndex: 1,
|
252
|
+
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
253
|
+
border: "1px solid var(--mantine-color-gray-4)"
|
291
254
|
},
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
255
|
+
children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
256
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: title }),
|
257
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: /* @__PURE__ */ jsxs(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
258
|
+
/* @__PURE__ */ jsx2(Checkbox, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
259
|
+
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
260
|
+
} }),
|
261
|
+
/* @__PURE__ */ jsxs(MyFlexRow, { gap: 3, children: [
|
262
|
+
"Xem",
|
263
|
+
/* @__PURE__ */ jsx2(IconEyeUp, { color: "gray" })
|
264
|
+
] })
|
265
|
+
] }) }),
|
266
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: /* @__PURE__ */ jsxs(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
267
|
+
/* @__PURE__ */ jsx2(Checkbox, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
268
|
+
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
269
|
+
} }),
|
270
|
+
/* @__PURE__ */ jsxs(MyFlexRow, { gap: 3, children: [
|
271
|
+
"Th\xEAm",
|
272
|
+
/* @__PURE__ */ jsx2(IconPlus, { color: "blue" })
|
273
|
+
] })
|
274
|
+
] }) }),
|
275
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: /* @__PURE__ */ jsxs(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
276
|
+
/* @__PURE__ */ jsx2(Checkbox, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
277
|
+
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
278
|
+
} }),
|
279
|
+
/* @__PURE__ */ jsxs(MyFlexRow, { gap: 3, children: [
|
280
|
+
"S\u1EEDa",
|
281
|
+
/* @__PURE__ */ jsx2(IconEdit, { color: "var(--mantine-color-yellow-8)" })
|
282
|
+
] })
|
283
|
+
] }) }),
|
284
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: /* @__PURE__ */ jsxs(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
285
|
+
/* @__PURE__ */ jsx2(Checkbox, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
286
|
+
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
287
|
+
} }),
|
288
|
+
/* @__PURE__ */ jsxs(MyFlexRow, { gap: 3, children: [
|
289
|
+
"X\xF3a",
|
290
|
+
/* @__PURE__ */ jsx2(IconTrash, { color: "var(--mantine-color-red-8)" })
|
291
|
+
] })
|
292
|
+
] }) }),
|
293
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: /* @__PURE__ */ jsxs(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
294
|
+
/* @__PURE__ */ jsx2(Checkbox, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
295
|
+
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
296
|
+
} }),
|
297
|
+
/* @__PURE__ */ jsxs(MyFlexRow, { gap: 3, children: [
|
298
|
+
"In",
|
299
|
+
/* @__PURE__ */ jsx2(IconPrinter, { color: "var(--mantine-color-cyan-8)" })
|
300
|
+
] })
|
301
|
+
] }) }),
|
302
|
+
/* @__PURE__ */ jsx2(Table.Th, { children: /* @__PURE__ */ jsxs(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
303
|
+
/* @__PURE__ */ jsx2(Checkbox, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
304
|
+
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
305
|
+
} }),
|
306
|
+
/* @__PURE__ */ jsxs(MyFlexRow, { gap: 3, children: [
|
307
|
+
"Xu\u1EA5t",
|
308
|
+
/* @__PURE__ */ jsx2(IconFileExport, { color: "var(--mantine-color-green-8)" })
|
309
|
+
] })
|
310
|
+
] }) })
|
311
|
+
] })
|
296
312
|
}
|
297
|
-
)
|
298
|
-
|
313
|
+
),
|
314
|
+
/* @__PURE__ */ jsx2(Table.Tbody, { bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))", children: (_b = list[0]) == null ? void 0 : _b.map((item, idx) => {
|
315
|
+
if (item.links == void 0) return /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
316
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: item.label }),
|
317
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(Checkbox, {}) }) }),
|
318
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(Checkbox, {}) }) }),
|
319
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(Checkbox, {}) }) }),
|
320
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(Checkbox, {}) }) }),
|
321
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(Checkbox, {}) }) }),
|
322
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(Checkbox, {}) }) })
|
323
|
+
] }, idx);
|
324
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
325
|
+
/* @__PURE__ */ jsx2(Table.Tr, { children: /* @__PURE__ */ jsx2(
|
326
|
+
Table.Td,
|
327
|
+
{
|
328
|
+
colSpan: 7,
|
329
|
+
bg: const_object_colors.mantineBackgroundBlueLight,
|
330
|
+
children: /* @__PURE__ */ jsx2(Text, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
331
|
+
}
|
332
|
+
) }, item.label),
|
333
|
+
item.links.map(
|
334
|
+
(item2, idx2) => {
|
335
|
+
var _a2, _b2, _c, _d, _e, _f;
|
336
|
+
return /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
337
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: item2.label }),
|
338
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(
|
339
|
+
Checkbox,
|
340
|
+
{
|
341
|
+
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
342
|
+
onChange: (e) => {
|
343
|
+
store.updatePermission(item2.pageId, {
|
344
|
+
isRead: e.target.checked
|
345
|
+
});
|
346
|
+
}
|
347
|
+
}
|
348
|
+
) }) }),
|
349
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(
|
350
|
+
Checkbox,
|
351
|
+
{
|
352
|
+
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
353
|
+
onChange: (e) => {
|
354
|
+
store.updatePermission(item2.pageId, {
|
355
|
+
isCreate: e.target.checked
|
356
|
+
});
|
357
|
+
}
|
358
|
+
}
|
359
|
+
) }) }),
|
360
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(
|
361
|
+
Checkbox,
|
362
|
+
{
|
363
|
+
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
364
|
+
onChange: (e) => {
|
365
|
+
store.updatePermission(item2.pageId, {
|
366
|
+
isUpdate: e.target.checked
|
367
|
+
});
|
368
|
+
}
|
369
|
+
}
|
370
|
+
) }) }),
|
371
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(
|
372
|
+
Checkbox,
|
373
|
+
{
|
374
|
+
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
375
|
+
onChange: (e) => {
|
376
|
+
store.updatePermission(item2.pageId, {
|
377
|
+
isDelete: e.target.checked
|
378
|
+
});
|
379
|
+
}
|
380
|
+
}
|
381
|
+
) }) }),
|
382
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(
|
383
|
+
Checkbox,
|
384
|
+
{
|
385
|
+
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
386
|
+
onChange: (e) => {
|
387
|
+
store.updatePermission(item2.pageId, {
|
388
|
+
isPrint: e.target.checked
|
389
|
+
});
|
390
|
+
}
|
391
|
+
}
|
392
|
+
) }) }),
|
393
|
+
/* @__PURE__ */ jsx2(Table.Td, { children: /* @__PURE__ */ jsx2(MyCenterFull, { children: /* @__PURE__ */ jsx2(
|
394
|
+
Checkbox,
|
395
|
+
{
|
396
|
+
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
397
|
+
onChange: (e) => {
|
398
|
+
store.updatePermission(item2.pageId, {
|
399
|
+
isExport: e.target.checked
|
400
|
+
});
|
401
|
+
}
|
402
|
+
}
|
403
|
+
) }) })
|
404
|
+
] }, idx2);
|
405
|
+
}
|
406
|
+
)
|
407
|
+
] }, idx);
|
408
|
+
}) })
|
409
|
+
] }) });
|
410
|
+
}
|
411
|
+
function useGetUserPermission({ menuData: menuData2 }) {
|
412
|
+
const store = useS_accessControl();
|
413
|
+
const query = useQuery2({
|
414
|
+
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
415
|
+
queryFn: async () => {
|
416
|
+
const result = await baseAxios_default.get("/Role/GetUserPermission?userId=" + store.state.roleId);
|
417
|
+
const menudataFinal = utils_layout_getItemsWithoutLinks(menuData2);
|
418
|
+
if (result.data.data.length == 0) {
|
419
|
+
const final = menudataFinal.map((item) => ({
|
420
|
+
pageId: item.pageId,
|
421
|
+
isRead: false,
|
422
|
+
isCreate: false,
|
423
|
+
isUpdate: false,
|
424
|
+
isDelete: false,
|
425
|
+
isExport: false,
|
426
|
+
isPrint: false
|
427
|
+
}));
|
428
|
+
return final.filter((item) => item.pageId != void 0);
|
429
|
+
}
|
430
|
+
const menuDataFromAPI = result.data.data;
|
431
|
+
const mergedArray = utils_accessControl_mergePage(menudataFinal, menuDataFromAPI).map((item) => ({
|
432
|
+
pageId: item.pageId,
|
433
|
+
isCreate: item.isCreate || false,
|
434
|
+
isRead: item.isRead || false,
|
435
|
+
isUpdate: item.isUpdate || false || false,
|
436
|
+
isDelete: item.isDelete,
|
437
|
+
isPrint: item.isPrint || false,
|
438
|
+
isExport: item.isExport || false
|
439
|
+
})).filter((item) => item.pageId != void 0);
|
440
|
+
return mergedArray;
|
441
|
+
},
|
442
|
+
enabled: store.state.roleId != 0,
|
443
|
+
refetchOnWindowFocus: false
|
444
|
+
});
|
445
|
+
return query;
|
299
446
|
}
|
300
447
|
|
301
|
-
// src/modules-features/admin/core/
|
448
|
+
// src/modules-features/admin/core/accessControl/F_accessControl_Save.tsx
|
449
|
+
import { useMutation } from "@tanstack/react-query";
|
450
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
302
451
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
{
|
308
|
-
|
309
|
-
|
310
|
-
|
452
|
+
function F_accessControl_Save() {
|
453
|
+
const store = useS_accessControl();
|
454
|
+
const disable = useState3(false);
|
455
|
+
const mutation = useMutation({
|
456
|
+
mutationFn: async (body) => {
|
457
|
+
const res = await baseAxios_default.put("/Role/UpdateUserPermission", body);
|
458
|
+
return res;
|
459
|
+
}
|
460
|
+
});
|
461
|
+
function handleSave() {
|
462
|
+
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") {
|
463
|
+
utils_notification_show({
|
464
|
+
crudType: "update"
|
465
|
+
});
|
466
|
+
return;
|
467
|
+
}
|
468
|
+
mutation.mutate({
|
469
|
+
pagePermissions: store.state.rolePermissions,
|
470
|
+
userId: store.state.roleId
|
471
|
+
}, {
|
472
|
+
onSuccess: () => {
|
473
|
+
utils_notification_show({
|
474
|
+
crudType: "update"
|
475
|
+
});
|
311
476
|
}
|
477
|
+
});
|
478
|
+
}
|
479
|
+
useEffect3(() => {
|
480
|
+
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
481
|
+
disable[1](true);
|
482
|
+
return;
|
312
483
|
}
|
313
|
-
|
484
|
+
disable[1](false);
|
485
|
+
}, [store.state.rolePermissions]);
|
486
|
+
return /* @__PURE__ */ jsx3(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
314
487
|
}
|
315
488
|
|
316
|
-
// src/modules-features/admin/core/
|
317
|
-
import {
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
initialValues: __spreadProps(__spreadValues({}, user), {
|
327
|
-
userSkillCenters: (_a = user.userSkillCenters) != null ? _a : []
|
328
|
-
})
|
329
|
-
});
|
330
|
-
const [editedUserSkillCentersState, setEditedUserSkillCentersState] = useState2(
|
331
|
-
(_b = user.userSkillCenters) != null ? _b : []
|
332
|
-
);
|
333
|
-
return /* @__PURE__ */ jsx4(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
334
|
-
return await baseAxios_default.post(
|
335
|
-
"/Account/update",
|
336
|
-
__spreadProps(__spreadValues({}, values), {
|
337
|
-
id: values.id,
|
338
|
-
address: "",
|
339
|
-
concurrencyStamp: "",
|
340
|
-
isBlocked: false,
|
341
|
-
isEnabled: true,
|
342
|
-
workingUnitId: null,
|
343
|
-
userSkillCenters: editedUserSkillCentersState
|
344
|
-
})
|
345
|
-
);
|
346
|
-
}, children: /* @__PURE__ */ jsxs3(MyFlexColumn, { children: [
|
347
|
-
/* @__PURE__ */ jsx4(MyTextInput2, __spreadValues({ disabled: true, label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
348
|
-
/* @__PURE__ */ jsx4(MyTextInput2, __spreadValues({ disabled: true, label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
349
|
-
/* @__PURE__ */ jsx4(MyTextInput2, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
350
|
-
/* @__PURE__ */ jsx4(MyTextInput2, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
351
|
-
/* @__PURE__ */ jsx4(MyTextInput2, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
|
352
|
-
skillCenter_getAll_query.data && store.state.isRequireSkillCenter == true && /* @__PURE__ */ jsx4(
|
353
|
-
MultiSelect2,
|
354
|
-
{
|
355
|
-
label: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
356
|
-
placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
|
357
|
-
data: (_c = skillCenter_getAll_query.data) == null ? void 0 : _c.map((item) => {
|
358
|
-
var _a2;
|
359
|
-
return {
|
360
|
-
label: item.name,
|
361
|
-
value: (_a2 = item.id) == null ? void 0 : _a2.toString()
|
362
|
-
};
|
363
|
-
}),
|
364
|
-
value: (_d = form.getValues().userSkillCenters) == null ? void 0 : _d.map((item) => {
|
365
|
-
var _a2;
|
366
|
-
return (_a2 = item.skillCenterId) == null ? void 0 : _a2.toString();
|
367
|
-
}),
|
368
|
-
onChange: (selectedValues) => {
|
369
|
-
const selectedIds = selectedValues.map(Number);
|
370
|
-
form.setFieldValue("userSkillCenters", selectedValues.map((item, idx) => ({
|
371
|
-
idField: idx.toString(),
|
372
|
-
id: 0,
|
373
|
-
code: "string",
|
374
|
-
name: "string",
|
375
|
-
concurrencyStamp: "string",
|
376
|
-
isEnabled: true,
|
377
|
-
skillCenterId: parseInt(item.toString())
|
378
|
-
})));
|
379
|
-
setEditedUserSkillCentersState(
|
380
|
-
(prev) => updateEnableList(
|
381
|
-
prev,
|
382
|
-
selectedIds,
|
383
|
-
(item) => item.skillCenterId,
|
384
|
-
(id) => ({ id: 0, skillCenterId: id, isEnabled: true })
|
385
|
-
)
|
386
|
-
);
|
387
|
-
}
|
388
|
-
}
|
389
|
-
)
|
390
|
-
] }) });
|
489
|
+
// src/modules-features/admin/core/accessControl/F_accessControl.tsx
|
490
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
491
|
+
function F_accessControl({ menuData: menuData2 }) {
|
492
|
+
return /* @__PURE__ */ jsxs2(Grid, { children: [
|
493
|
+
/* @__PURE__ */ jsx4(Grid.Col, { span: { base: 12, sm: 5 }, children: /* @__PURE__ */ jsx4(ScrollArea2.Autosize, { children: /* @__PURE__ */ jsx4(F_accessControl_ReadUser, {}) }) }),
|
494
|
+
/* @__PURE__ */ jsx4(Grid.Col, { span: { base: 12, sm: 7 }, children: /* @__PURE__ */ jsxs2(MyFlexColumn, { h: "80vh", flex: 1, children: [
|
495
|
+
/* @__PURE__ */ jsx4(ScrollArea2.Autosize, { h: "100%", children: /* @__PURE__ */ jsx4(Paper, { p: "md", bg: const_object_colors.mantineBackgroundSecondary, children: /* @__PURE__ */ jsx4(F_accessControl_ViewMenuPermissions, { menuData: menuData2 }) }) }),
|
496
|
+
/* @__PURE__ */ jsx4(F_accessControl_Save, {})
|
497
|
+
] }) })
|
498
|
+
] });
|
391
499
|
}
|
392
500
|
|
393
|
-
// src/modules-features/admin/core/
|
394
|
-
import {
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
});
|
407
|
-
},
|
408
|
-
mockData: mockUserData
|
409
|
-
});
|
410
|
-
const getTotalAccount = useMyReactQuery({
|
411
|
-
queryKey: ["getTotalAccount"],
|
412
|
-
axiosFn: async () => apiData_Account.getAdminAccount()
|
413
|
-
});
|
414
|
-
const columns = useMemo2(() => {
|
415
|
-
var _a2;
|
416
|
-
const baseColumns = [
|
417
|
-
{
|
418
|
-
header: "T\xEAn t\xE0i kho\u1EA3n",
|
419
|
-
accessorKey: "userName"
|
420
|
-
},
|
421
|
-
{
|
422
|
-
header: "H\u1ECD v\xE0 t\xEAn",
|
423
|
-
accessorKey: "fullName"
|
424
|
-
},
|
501
|
+
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel.tsx
|
502
|
+
import { Grid as Grid2, Paper as Paper2, ScrollArea as ScrollArea4 } from "@mantine/core";
|
503
|
+
|
504
|
+
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel_ReadUser.tsx
|
505
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
506
|
+
import { useEffect as useEffect4, useMemo as useMemo2, useState as useState4 } from "react";
|
507
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
508
|
+
function F_accessControlLevel_ReadUser() {
|
509
|
+
const store = useS_accessControl();
|
510
|
+
const query = useQ_Account_GetAdminAccount();
|
511
|
+
const [rowSelection, setRowSelection] = useState4({});
|
512
|
+
const columns = useMemo2(
|
513
|
+
() => [
|
425
514
|
{
|
426
|
-
header: "
|
427
|
-
accessorKey: "
|
515
|
+
header: "M\xE3",
|
516
|
+
accessorKey: "code",
|
517
|
+
size: 60
|
428
518
|
},
|
429
519
|
{
|
430
|
-
header: "
|
431
|
-
|
520
|
+
header: "T\xEAn quy\u1EC1n",
|
521
|
+
accessorKey: "name"
|
432
522
|
}
|
433
|
-
]
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
}
|
443
|
-
|
444
|
-
|
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!";
|
445
540
|
return /* @__PURE__ */ jsx5(
|
446
541
|
MyDataTable,
|
447
542
|
{
|
448
|
-
isLoading: AllUserQuery.isLoading,
|
449
|
-
rowCount: (_c = (_b = getTotalAccount.data) == null ? void 0 : _b.length) != null ? _c : 0,
|
450
|
-
pagination: paginationState[0],
|
451
|
-
onPaginationChange: paginationState[1],
|
452
543
|
columns,
|
453
|
-
data:
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
/* @__PURE__ */ jsx5(
|
458
|
-
Button2,
|
459
|
-
{
|
460
|
-
color: "violet",
|
461
|
-
leftSection: /* @__PURE__ */ jsx5(IconShield, {}),
|
462
|
-
onClick: () => {
|
463
|
-
router.push("roleCatalog");
|
464
|
-
},
|
465
|
-
children: "Danh m\u1EE5c quy\u1EC1n"
|
466
|
-
}
|
467
|
-
)
|
468
|
-
] });
|
544
|
+
data: query.data,
|
545
|
+
getRowId: (row) => {
|
546
|
+
var _a;
|
547
|
+
return (_a = row.id) == null ? void 0 : _a.toString();
|
469
548
|
},
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
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
|
476
557
|
}
|
477
558
|
);
|
478
559
|
}
|
479
|
-
|
480
|
-
{
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
}
|
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
|
+
var mockData = [
|
574
|
+
{ id: 1, code: "GV", name: "Gi\u1EA3ng vi\xEAn" },
|
575
|
+
{ id: 2, code: "STU", name: "Student" },
|
576
|
+
{ id: 3, code: "FACU", name: "Faculty" },
|
577
|
+
{ id: 4, code: "ADMIN", name: "Admin" }
|
578
|
+
];
|
579
|
+
|
580
|
+
// src/data/menuData.ts
|
581
|
+
var menuData = [
|
490
582
|
{
|
491
|
-
|
492
|
-
|
493
|
-
|
583
|
+
label: "Qu\u1EA3n l\xED h\u1EC7 th\u1ED1ng",
|
584
|
+
links: [
|
585
|
+
{ pageId: 1, name: "accountManagement", label: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n", link: "accountManagement", note: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n c\u1EE7a ng\u01B0\u1EDDi d\xF9ng" },
|
586
|
+
//core71678
|
587
|
+
{ pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "accessControlLevel", note: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n c\u1EE7a ng\u01B0\u1EDDi d\xF9ng" },
|
588
|
+
//core38677
|
589
|
+
{ pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "accessControl", note: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n c\u1EE7a ng\u01B0\u1EDDi d\xF9ng" },
|
590
|
+
//core83092
|
591
|
+
{ pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "core76318" },
|
592
|
+
{ 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: "core16209" },
|
593
|
+
{ pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "core40207" }
|
594
|
+
]
|
494
595
|
},
|
495
596
|
{
|
496
|
-
|
497
|
-
|
498
|
-
|
597
|
+
label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
|
598
|
+
links: [
|
599
|
+
{ pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "core26965" },
|
600
|
+
{ pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "core27311" },
|
601
|
+
{ pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "core12196" }
|
602
|
+
]
|
499
603
|
},
|
500
604
|
{
|
501
|
-
|
502
|
-
|
503
|
-
|
605
|
+
label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng ",
|
606
|
+
links: [
|
607
|
+
{ pageId: 0, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "core18256" },
|
608
|
+
{ pageId: 0, name: "", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "core64229" },
|
609
|
+
{ pageId: 0, name: "", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" },
|
610
|
+
{ pageId: 0, name: "", label: "Danh m\u1EE5c Page Content", link: "pageContentConfig" }
|
611
|
+
]
|
504
612
|
}
|
505
613
|
];
|
506
614
|
|
507
|
-
// src/modules-features/admin/core/
|
508
|
-
import {
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
615
|
+
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel_ViewMenuPermissions.tsx
|
616
|
+
import { Checkbox as Checkbox2, Flex as Flex2, ScrollArea as ScrollArea3, Table as Table2, Text as Text2 } from "@mantine/core";
|
617
|
+
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 useQuery4 } from "@tanstack/react-query";
|
619
|
+
import React2, { useEffect as useEffect5, useState as useState5 } from "react";
|
620
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
621
|
+
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
622
|
+
function F_accessControlLevel_ViewMenuPermissions({ menuData: menuData2 }) {
|
623
|
+
var _a, _b;
|
624
|
+
const store = useS_accessControl();
|
625
|
+
const query = useGetUserPermission2();
|
626
|
+
const list = useState5([]);
|
627
|
+
useEffect5(() => {
|
628
|
+
list[1](groupToTwoLevels(menuData2));
|
513
629
|
}, []);
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
}
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
630
|
+
useEffect5(() => {
|
631
|
+
if (!query.data) return;
|
632
|
+
store.setProperty("rolePermissions", query.data);
|
633
|
+
}, [query.data]);
|
634
|
+
if (((_a = list[0]) == null ? void 0 : _a.length) == 0) return "\u0110ang t\u1EA3i...";
|
635
|
+
return /* @__PURE__ */ jsx6(ScrollArea3.Autosize, { h: "70vh", children: /* @__PURE__ */ jsxs3(Table2, { children: [
|
636
|
+
/* @__PURE__ */ jsx6(
|
637
|
+
Table2.Thead,
|
638
|
+
{
|
639
|
+
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
640
|
+
style: {
|
641
|
+
position: "sticky",
|
642
|
+
top: 0,
|
643
|
+
zIndex: 1,
|
644
|
+
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
645
|
+
border: "1px solid var(--mantine-color-gray-4)"
|
646
|
+
},
|
647
|
+
children: /* @__PURE__ */ jsxs3(Table2.Tr, { children: [
|
648
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: title2 }),
|
649
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: /* @__PURE__ */ jsxs3(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
650
|
+
/* @__PURE__ */ jsx6(Checkbox2, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
651
|
+
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
652
|
+
} }),
|
653
|
+
/* @__PURE__ */ jsxs3(MyFlexRow, { gap: 3, children: [
|
654
|
+
"Xem",
|
655
|
+
/* @__PURE__ */ jsx6(IconEyeUp2, { color: "gray" })
|
656
|
+
] })
|
657
|
+
] }) }),
|
658
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: /* @__PURE__ */ jsxs3(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
659
|
+
/* @__PURE__ */ jsx6(Checkbox2, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
660
|
+
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
661
|
+
} }),
|
662
|
+
/* @__PURE__ */ jsxs3(MyFlexRow, { gap: 3, children: [
|
663
|
+
"Th\xEAm",
|
664
|
+
/* @__PURE__ */ jsx6(IconPlus2, { color: "blue" })
|
665
|
+
] })
|
666
|
+
] }) }),
|
667
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: /* @__PURE__ */ jsxs3(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
668
|
+
/* @__PURE__ */ jsx6(Checkbox2, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
669
|
+
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
670
|
+
} }),
|
671
|
+
/* @__PURE__ */ jsxs3(MyFlexRow, { gap: 3, children: [
|
672
|
+
"S\u1EEDa",
|
673
|
+
/* @__PURE__ */ jsx6(IconEdit2, { color: "var(--mantine-color-yellow-8)" })
|
674
|
+
] })
|
675
|
+
] }) }),
|
676
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: /* @__PURE__ */ jsxs3(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
677
|
+
/* @__PURE__ */ jsx6(Checkbox2, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
678
|
+
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
679
|
+
} }),
|
680
|
+
/* @__PURE__ */ jsxs3(MyFlexRow, { gap: 3, children: [
|
681
|
+
"X\xF3a",
|
682
|
+
/* @__PURE__ */ jsx6(IconTrash2, { color: "var(--mantine-color-red-8)" })
|
683
|
+
] })
|
684
|
+
] }) }),
|
685
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: /* @__PURE__ */ jsxs3(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
686
|
+
/* @__PURE__ */ jsx6(Checkbox2, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
687
|
+
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
688
|
+
} }),
|
689
|
+
/* @__PURE__ */ jsxs3(MyFlexRow, { gap: 3, children: [
|
690
|
+
"In",
|
691
|
+
/* @__PURE__ */ jsx6(IconPrinter2, { color: "var(--mantine-color-cyan-8)" })
|
692
|
+
] })
|
693
|
+
] }) }),
|
694
|
+
/* @__PURE__ */ jsx6(Table2.Th, { children: /* @__PURE__ */ jsxs3(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
695
|
+
/* @__PURE__ */ jsx6(Checkbox2, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
696
|
+
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
697
|
+
} }),
|
698
|
+
/* @__PURE__ */ jsxs3(MyFlexRow, { gap: 3, children: [
|
699
|
+
"Xu\u1EA5t",
|
700
|
+
/* @__PURE__ */ jsx6(IconFileExport2, { color: "var(--mantine-color-green-8)" })
|
701
|
+
] })
|
702
|
+
] }) })
|
703
|
+
] })
|
704
|
+
}
|
705
|
+
),
|
706
|
+
/* @__PURE__ */ jsx6(Table2.Tbody, { bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))", children: (_b = list[0]) == null ? void 0 : _b.map((item, idx) => {
|
707
|
+
if (item.links == void 0) return /* @__PURE__ */ jsxs3(Table2.Tr, { children: [
|
708
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: item.label }),
|
709
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(Checkbox2, {}) }) }),
|
710
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(Checkbox2, {}) }) }),
|
711
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(Checkbox2, {}) }) }),
|
712
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(Checkbox2, {}) }) }),
|
713
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(Checkbox2, {}) }) }),
|
714
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(Checkbox2, {}) }) })
|
715
|
+
] }, idx);
|
716
|
+
return /* @__PURE__ */ jsxs3(React2.Fragment, { children: [
|
717
|
+
/* @__PURE__ */ jsx6(Table2.Tr, { children: /* @__PURE__ */ jsx6(
|
718
|
+
Table2.Td,
|
719
|
+
{
|
720
|
+
colSpan: 7,
|
721
|
+
bg: const_object_colors.mantineBackgroundBlueLight,
|
722
|
+
children: /* @__PURE__ */ jsx6(Text2, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
723
|
+
}
|
724
|
+
) }, item.label),
|
725
|
+
item.links.map(
|
726
|
+
(item2, idx2) => {
|
727
|
+
var _a2, _b2, _c, _d, _e, _f;
|
728
|
+
return /* @__PURE__ */ jsxs3(Table2.Tr, { children: [
|
729
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: item2.label }),
|
730
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(
|
731
|
+
Checkbox2,
|
732
|
+
{
|
733
|
+
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
734
|
+
onChange: (e) => {
|
735
|
+
store.updatePermission(item2.pageId, {
|
736
|
+
isRead: e.target.checked
|
737
|
+
});
|
738
|
+
}
|
739
|
+
}
|
740
|
+
) }) }),
|
741
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(
|
742
|
+
Checkbox2,
|
743
|
+
{
|
744
|
+
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
745
|
+
onChange: (e) => {
|
746
|
+
store.updatePermission(item2.pageId, {
|
747
|
+
isCreate: e.target.checked
|
748
|
+
});
|
749
|
+
}
|
750
|
+
}
|
751
|
+
) }) }),
|
752
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(
|
753
|
+
Checkbox2,
|
754
|
+
{
|
755
|
+
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
756
|
+
onChange: (e) => {
|
757
|
+
store.updatePermission(item2.pageId, {
|
758
|
+
isUpdate: e.target.checked
|
759
|
+
});
|
760
|
+
}
|
761
|
+
}
|
762
|
+
) }) }),
|
763
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(
|
764
|
+
Checkbox2,
|
765
|
+
{
|
766
|
+
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
767
|
+
onChange: (e) => {
|
768
|
+
store.updatePermission(item2.pageId, {
|
769
|
+
isDelete: e.target.checked
|
770
|
+
});
|
771
|
+
}
|
772
|
+
}
|
773
|
+
) }) }),
|
774
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(
|
775
|
+
Checkbox2,
|
776
|
+
{
|
777
|
+
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
778
|
+
onChange: (e) => {
|
779
|
+
store.updatePermission(item2.pageId, {
|
780
|
+
isPrint: e.target.checked
|
781
|
+
});
|
782
|
+
}
|
783
|
+
}
|
784
|
+
) }) }),
|
785
|
+
/* @__PURE__ */ jsx6(Table2.Td, { children: /* @__PURE__ */ jsx6(MyCenterFull, { children: /* @__PURE__ */ jsx6(
|
786
|
+
Checkbox2,
|
787
|
+
{
|
788
|
+
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
789
|
+
onChange: (e) => {
|
790
|
+
store.updatePermission(item2.pageId, {
|
791
|
+
isExport: e.target.checked
|
792
|
+
});
|
793
|
+
}
|
794
|
+
}
|
795
|
+
) }) })
|
796
|
+
] }, idx2);
|
797
|
+
}
|
798
|
+
)
|
799
|
+
] }, idx);
|
800
|
+
}) })
|
801
|
+
] }) });
|
802
|
+
}
|
803
|
+
function useGetUserPermission2() {
|
804
|
+
const store = useS_accessControl();
|
805
|
+
const query = useQuery4({
|
806
|
+
queryKey: ["F_7p4mh9d75x_AuthorizationTable", store.state.roleId],
|
807
|
+
queryFn: async () => {
|
808
|
+
const result = await baseAxios_default.get("/Role/GetRolePermission?roleId=" + store.state.roleId);
|
809
|
+
const menudataFinal = utils_layout_getItemsWithoutLinks(menuData);
|
810
|
+
if (result.data.data.length == 0) {
|
811
|
+
const final = menudataFinal.map((item) => ({
|
812
|
+
pageId: item.pageId,
|
813
|
+
isRead: false,
|
814
|
+
isCreate: false,
|
815
|
+
isUpdate: false,
|
816
|
+
isDelete: false,
|
817
|
+
isExport: false,
|
818
|
+
isPrint: false
|
819
|
+
}));
|
820
|
+
return final.filter((item) => item.pageId != void 0);
|
821
|
+
}
|
822
|
+
const menuDataFromAPI = result.data.data;
|
823
|
+
const mergedArray = utils_accessControl_mergePage(menudataFinal, menuDataFromAPI).map((item) => ({
|
824
|
+
pageId: item.pageId,
|
825
|
+
isCreate: item.isCreate || false,
|
826
|
+
isRead: item.isRead || false,
|
827
|
+
isUpdate: item.isUpdate || false || false,
|
828
|
+
isDelete: item.isDelete,
|
829
|
+
isPrint: item.isPrint || false,
|
830
|
+
isExport: item.isExport || false
|
831
|
+
})).filter((item) => item.pageId != void 0);
|
832
|
+
return mergedArray;
|
833
|
+
},
|
834
|
+
enabled: store.state.roleId != 0,
|
835
|
+
refetchOnWindowFocus: false
|
836
|
+
});
|
837
|
+
return query;
|
838
|
+
}
|
839
|
+
|
840
|
+
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel_Save.tsx
|
841
|
+
import { useMutation as useMutation2 } from "@tanstack/react-query";
|
842
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
843
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
844
|
+
function F_accessControlLevel_Save() {
|
845
|
+
const store = useS_accessControl();
|
846
|
+
const disable = useState6(false);
|
847
|
+
const mutation = useMutation2({
|
848
|
+
mutationFn: async (body) => {
|
849
|
+
const res = await baseAxios_default.put("/Role/UpdatePermission", body);
|
850
|
+
return res;
|
851
|
+
}
|
852
|
+
});
|
853
|
+
function handleSave() {
|
854
|
+
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") {
|
855
|
+
utils_notification_show({
|
856
|
+
crudType: "update"
|
857
|
+
});
|
858
|
+
return;
|
859
|
+
}
|
860
|
+
mutation.mutate({
|
861
|
+
pagePermissions: store.state.rolePermissions,
|
862
|
+
roleId: store.state.roleId
|
863
|
+
}, {
|
864
|
+
onSuccess: () => {
|
865
|
+
utils_notification_show({
|
866
|
+
crudType: "update"
|
867
|
+
});
|
868
|
+
}
|
869
|
+
});
|
870
|
+
}
|
871
|
+
useEffect6(() => {
|
872
|
+
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
873
|
+
disable[1](true);
|
874
|
+
return;
|
875
|
+
}
|
876
|
+
disable[1](false);
|
877
|
+
}, [store.state.rolePermissions]);
|
878
|
+
return /* @__PURE__ */ jsx7(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
879
|
+
}
|
880
|
+
|
881
|
+
// src/modules-features/admin/core/accessControlLevel/F_accessControlLevel.tsx
|
882
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
883
|
+
function F_accessControlLevel({ menuData: menuData2 }) {
|
884
|
+
return /* @__PURE__ */ jsxs4(Grid2, { children: [
|
885
|
+
/* @__PURE__ */ jsx8(Grid2.Col, { span: { base: 12, sm: 5 }, children: /* @__PURE__ */ jsx8(ScrollArea4.Autosize, { children: /* @__PURE__ */ jsx8(F_accessControlLevel_ReadUser, {}) }) }),
|
886
|
+
/* @__PURE__ */ jsx8(Grid2.Col, { span: { base: 12, sm: 7 }, children: /* @__PURE__ */ jsxs4(MyFlexColumn, { h: "80vh", flex: 1, children: [
|
887
|
+
/* @__PURE__ */ jsx8(ScrollArea4.Autosize, { h: "100%", children: /* @__PURE__ */ jsx8(Paper2, { p: "md", bg: const_object_colors.mantineBackgroundSecondary, children: /* @__PURE__ */ jsx8(F_accessControlLevel_ViewMenuPermissions, { menuData: menuData2 }) }) }),
|
888
|
+
/* @__PURE__ */ jsx8(F_accessControlLevel_Save, {})
|
889
|
+
] }) })
|
890
|
+
] });
|
891
|
+
}
|
892
|
+
|
893
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement.tsx
|
894
|
+
import { useEffect as useEffect8 } from "react";
|
895
|
+
|
896
|
+
// src/api/services/accountService.ts
|
897
|
+
var CONTROLLER = "/account";
|
898
|
+
var apiData_Account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER, baseAxios_default)), {
|
899
|
+
// Các hàm custom
|
900
|
+
getCoeAccountById: (id) => {
|
901
|
+
return baseAxios_default.post(CONTROLLER + `/getCOEAccount`, { userId: id });
|
902
|
+
},
|
903
|
+
getAdminAccount: (paging) => {
|
904
|
+
return baseAxios_default.get(CONTROLLER + `/GetAdminAccount`, {
|
905
|
+
params: paging
|
906
|
+
});
|
907
|
+
}
|
908
|
+
});
|
909
|
+
|
910
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement_Read.tsx
|
911
|
+
import { Button as Button2, Group as Group2 } from "@mantine/core";
|
912
|
+
import { IconShield } from "@tabler/icons-react";
|
913
|
+
import { useMemo as useMemo4, useState as useState9 } from "react";
|
914
|
+
|
915
|
+
// src/modules-features/admin/core/accountManagement/useS_accountManagement.ts
|
916
|
+
var useStore2 = createGenericStore({
|
917
|
+
initialState: {}
|
918
|
+
});
|
919
|
+
function useS_accountManagement() {
|
920
|
+
const store = useStore2();
|
921
|
+
return __spreadValues({}, store);
|
922
|
+
}
|
923
|
+
|
924
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement_ChangePermission.tsx
|
925
|
+
import { Button, Fieldset, Group, Table as Table3 } from "@mantine/core";
|
926
|
+
import { useDisclosure } from "@mantine/hooks";
|
927
|
+
import { useMutation as useMutation3, useQuery as useQuery5, useQueryClient } from "@tanstack/react-query";
|
928
|
+
import { useEffect as useEffect7, useMemo as useMemo3, useState as useState7 } from "react";
|
929
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
930
|
+
function F_accountManagement_ChangePermission({ user }) {
|
931
|
+
const disc = useDisclosure();
|
932
|
+
const queryClient = useQueryClient();
|
933
|
+
const [rowSelection, setRowSelection] = useState7({});
|
934
|
+
const rowSelect = useState7();
|
935
|
+
const query = useQuery5({
|
936
|
+
queryKey: [`F1_1ChangePermission`],
|
937
|
+
queryFn: async () => {
|
938
|
+
const response = await baseAxios_default.get("/Role/GetAdminRole");
|
939
|
+
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") return mockData2;
|
940
|
+
return response.data.data;
|
941
|
+
}
|
942
|
+
});
|
943
|
+
const mutation = useMutation3({
|
944
|
+
mutationFn: async (roleIds) => {
|
945
|
+
const res = await baseAxios_default.post("/Role/AddUser?userId=" + (user == null ? void 0 : user.id), roleIds);
|
946
|
+
return res;
|
947
|
+
}
|
948
|
+
});
|
949
|
+
const permissionColumns = useMemo3(
|
950
|
+
() => [
|
951
|
+
{
|
952
|
+
header: "Quy\u1EC1n",
|
953
|
+
accessorKey: "name"
|
954
|
+
}
|
955
|
+
],
|
956
|
+
[]
|
957
|
+
);
|
958
|
+
function handleSave() {
|
959
|
+
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") {
|
960
|
+
utils_notification_show({ crudType: "update" });
|
961
|
+
disc[1].close();
|
962
|
+
return;
|
963
|
+
}
|
964
|
+
mutation.mutate(Object.keys(rowSelection).map(Number), {
|
965
|
+
onSuccess: () => {
|
966
|
+
utils_notification_show({ crudType: "update" });
|
967
|
+
disc[1].close();
|
968
|
+
queryClient.invalidateQueries();
|
969
|
+
}
|
970
|
+
});
|
971
|
+
}
|
972
|
+
useEffect7(() => {
|
973
|
+
var _a;
|
974
|
+
if ((user == null ? void 0 : user.roles) == void 0) return;
|
975
|
+
const result = (_a = user == null ? void 0 : user.roles) == null ? void 0 : _a.reduce((acc, item) => {
|
976
|
+
if (item.id !== void 0) {
|
977
|
+
acc[item.id] = true;
|
978
|
+
}
|
979
|
+
return acc;
|
980
|
+
}, {});
|
981
|
+
setRowSelection(result);
|
982
|
+
}, []);
|
983
|
+
return /* @__PURE__ */ jsxs5(MyButtonModal, { modalSize: "xl", disclosure: disc, title: "Ch\u1ECDn quy\u1EC1n cho ng\u01B0\u1EDDi d\xF9ng", label: "S\u1EEDa quy\u1EC1n", children: [
|
984
|
+
/* @__PURE__ */ jsx9(
|
985
|
+
Table3,
|
986
|
+
{
|
987
|
+
w: "100%",
|
988
|
+
variant: "vertical",
|
989
|
+
layout: "fixed",
|
990
|
+
children: /* @__PURE__ */ jsxs5(Table3.Tbody, { children: [
|
991
|
+
/* @__PURE__ */ jsxs5(Table3.Tr, { children: [
|
992
|
+
/* @__PURE__ */ jsx9(Table3.Th, { w: 160, children: "H\u1ECD v\xE0 t\xEAn:" }),
|
993
|
+
/* @__PURE__ */ jsx9(Table3.Td, { children: user == null ? void 0 : user.fullName })
|
994
|
+
] }),
|
995
|
+
/* @__PURE__ */ jsxs5(Table3.Tr, { children: [
|
996
|
+
/* @__PURE__ */ jsx9(Table3.Th, { children: "T\xEAn \u0111\u0103ng nh\u1EADp:" }),
|
997
|
+
/* @__PURE__ */ jsx9(Table3.Td, { children: user == null ? void 0 : user.userName })
|
998
|
+
] }),
|
999
|
+
/* @__PURE__ */ jsxs5(Table3.Tr, { children: [
|
1000
|
+
/* @__PURE__ */ jsx9(Table3.Th, { children: "Email:" }),
|
1001
|
+
/* @__PURE__ */ jsx9(Table3.Td, { children: user == null ? void 0 : user.email })
|
1002
|
+
] })
|
1003
|
+
] })
|
1004
|
+
}
|
1005
|
+
),
|
1006
|
+
query.isLoading && "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...",
|
1007
|
+
query.isError && "L\u1ED7i khi t\u1EA3i d\u1EEF li\u1EC7u...",
|
1008
|
+
/* @__PURE__ */ jsx9(Fieldset, { legend: "Ch\u1ECDn quy\u1EC1n", children: /* @__PURE__ */ jsx9(
|
1009
|
+
MyDataTable,
|
1010
|
+
{
|
1011
|
+
enableRowSelection: true,
|
1012
|
+
onRowSelectionChange: setRowSelection,
|
1013
|
+
state: { rowSelection },
|
1014
|
+
setSelectedRow: rowSelect[1],
|
1015
|
+
getRowId: (originalRow) => {
|
1016
|
+
var _a;
|
1017
|
+
return (_a = originalRow.id) == null ? void 0 : _a.toString();
|
1018
|
+
},
|
1019
|
+
initialState: {
|
1020
|
+
density: "xs",
|
1021
|
+
pagination: { pageIndex: 0, pageSize: 10 },
|
1022
|
+
columnPinning: { right: ["mrt-row-actions"] },
|
1023
|
+
columnVisibility: {
|
1024
|
+
nguoiCapNhat: false,
|
1025
|
+
ngayCapNhat: false
|
1026
|
+
}
|
1027
|
+
},
|
1028
|
+
columns: permissionColumns,
|
1029
|
+
data: query.data || []
|
1030
|
+
}
|
1031
|
+
) }),
|
1032
|
+
/* @__PURE__ */ jsx9(Group, { justify: "flex-end", mt: 24, children: /* @__PURE__ */ jsx9(Button, { onClick: handleSave, children: "L\u01B0u" }) })
|
1033
|
+
] });
|
1034
|
+
}
|
1035
|
+
var mockData2 = [
|
1036
|
+
{ id: 1, code: "GV", name: "Gi\u1EA3ng vi\xEAn" },
|
1037
|
+
{ id: 2, code: "STU", name: "Student" },
|
1038
|
+
{ id: 3, code: "FACU", name: "Faculty" },
|
1039
|
+
{ id: 4, code: "ADMIN", name: "Admin" }
|
1040
|
+
];
|
1041
|
+
|
1042
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement_Create.tsx
|
1043
|
+
import { MultiSelect } from "@mantine/core";
|
1044
|
+
import { useForm } from "@mantine/form";
|
1045
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
1046
|
+
var ENDPOINT = "/Account/create";
|
1047
|
+
function F_accountManagement_Create() {
|
1048
|
+
var _a, _b;
|
1049
|
+
const store = useS_accountManagement();
|
1050
|
+
const skillCenter_getAll_query = useQ_SkillCenter_GetAll();
|
1051
|
+
const form = useForm({
|
1052
|
+
initialValues: {
|
1053
|
+
fullName: "",
|
1054
|
+
code: "",
|
1055
|
+
userName: "",
|
1056
|
+
password: "",
|
1057
|
+
email: "",
|
1058
|
+
phoneNumber: ""
|
1059
|
+
},
|
1060
|
+
validate: {
|
1061
|
+
email: (value) => U0MyValidateEmail(value)
|
1062
|
+
}
|
1063
|
+
});
|
1064
|
+
async function handleSubmit() {
|
1065
|
+
return await baseAxios_default.post(ENDPOINT, __spreadProps(__spreadValues({}, form.getValues()), {
|
1066
|
+
passwordHash: "",
|
1067
|
+
id: 0,
|
1068
|
+
address: "",
|
1069
|
+
concurrencyStamp: "",
|
1070
|
+
isBlocked: false,
|
1071
|
+
isEnabled: true,
|
1072
|
+
workingUnitId: void 0,
|
1073
|
+
AQModuleId: 1002,
|
1074
|
+
avatarFileDetail: {
|
1075
|
+
fileName: "",
|
1076
|
+
fileExtension: "",
|
1077
|
+
fileBase64String: ""
|
1078
|
+
}
|
1079
|
+
}));
|
1080
|
+
}
|
1081
|
+
return /* @__PURE__ */ jsxs6(MyButtonCreate, { form, onSubmit: handleSubmit, objectName: "ng\u01B0\u1EDDi d\xF9ng", children: [
|
1082
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
1083
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
1084
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "M\u1EADt kh\u1EA9u" }, form.getInputProps("password"))),
|
1085
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
1086
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
1087
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
|
1088
|
+
skillCenter_getAll_query.data && store.state.isRequireSkillCenter == true && /* @__PURE__ */ jsx10(
|
1089
|
+
MultiSelect,
|
1090
|
+
{
|
1091
|
+
label: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
1092
|
+
placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
|
1093
|
+
data: (_a = skillCenter_getAll_query.data) == null ? void 0 : _a.map((item) => {
|
1094
|
+
var _a2;
|
1095
|
+
return {
|
1096
|
+
label: item.name,
|
1097
|
+
value: (_a2 = item.id) == null ? void 0 : _a2.toString()
|
1098
|
+
};
|
1099
|
+
}),
|
1100
|
+
onChange: (e) => {
|
1101
|
+
form.setFieldValue("userSkillCenters", e.map((item, idx) => ({
|
1102
|
+
idField: idx.toString(),
|
1103
|
+
id: 0,
|
1104
|
+
code: "string",
|
1105
|
+
name: "string",
|
1106
|
+
concurrencyStamp: "string",
|
1107
|
+
isEnabled: true,
|
1108
|
+
skillCenterId: parseInt(item.toString())
|
1109
|
+
})));
|
1110
|
+
},
|
1111
|
+
value: (_b = form.getValues().userSkillCenters) == null ? void 0 : _b.map((item) => {
|
1112
|
+
var _a2;
|
1113
|
+
return (_a2 = item.skillCenterId) == null ? void 0 : _a2.toString();
|
1114
|
+
})
|
1115
|
+
}
|
1116
|
+
)
|
1117
|
+
] });
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement_Delete.tsx
|
1121
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
1122
|
+
var ENDPOINT2 = "/Account/delete";
|
1123
|
+
function F_accountManagement_Delete({ id, code }) {
|
1124
|
+
return /* @__PURE__ */ jsx11(
|
1125
|
+
MyActionIconDelete,
|
1126
|
+
{
|
1127
|
+
contextData: code,
|
1128
|
+
onSubmit: () => {
|
1129
|
+
return baseAxios_default.post(ENDPOINT2, { id });
|
1130
|
+
}
|
1131
|
+
}
|
1132
|
+
);
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement_Update.tsx
|
1136
|
+
import { MultiSelect as MultiSelect2 } from "@mantine/core";
|
1137
|
+
import { useForm as useForm2 } from "@mantine/form";
|
1138
|
+
import { useState as useState8 } from "react";
|
1139
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
1140
|
+
function F_accountManagement_Update({ user }) {
|
1141
|
+
var _a, _b, _c, _d;
|
1142
|
+
const store = useS_accountManagement();
|
1143
|
+
const skillCenter_getAll_query = useQ_SkillCenter_GetAll();
|
1144
|
+
const form = useForm2({
|
1145
|
+
initialValues: __spreadProps(__spreadValues({}, user), {
|
1146
|
+
userSkillCenters: (_a = user.userSkillCenters) != null ? _a : []
|
1147
|
+
})
|
1148
|
+
});
|
1149
|
+
const [editedUserSkillCentersState, setEditedUserSkillCentersState] = useState8(
|
1150
|
+
(_b = user.userSkillCenters) != null ? _b : []
|
1151
|
+
);
|
1152
|
+
return /* @__PURE__ */ jsx12(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
1153
|
+
return await baseAxios_default.post(
|
1154
|
+
"/Account/update",
|
1155
|
+
__spreadProps(__spreadValues({}, values), {
|
1156
|
+
id: values.id,
|
1157
|
+
address: "",
|
1158
|
+
concurrencyStamp: "",
|
1159
|
+
isBlocked: false,
|
1160
|
+
isEnabled: true,
|
1161
|
+
workingUnitId: null,
|
1162
|
+
userSkillCenters: editedUserSkillCentersState
|
1163
|
+
})
|
1164
|
+
);
|
1165
|
+
}, children: /* @__PURE__ */ jsxs7(MyFlexColumn, { children: [
|
1166
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ disabled: true, label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
1167
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ disabled: true, label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
1168
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
1169
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
1170
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber"))),
|
1171
|
+
skillCenter_getAll_query.data && store.state.isRequireSkillCenter == true && /* @__PURE__ */ jsx12(
|
1172
|
+
MultiSelect2,
|
1173
|
+
{
|
1174
|
+
label: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
1175
|
+
placeholder: "Ch\u1ECDn trung t\xE2m k\u1EF9 n\u0103ng",
|
1176
|
+
data: (_c = skillCenter_getAll_query.data) == null ? void 0 : _c.map((item) => {
|
1177
|
+
var _a2;
|
1178
|
+
return {
|
1179
|
+
label: item.name,
|
1180
|
+
value: (_a2 = item.id) == null ? void 0 : _a2.toString()
|
1181
|
+
};
|
1182
|
+
}),
|
1183
|
+
value: (_d = form.getValues().userSkillCenters) == null ? void 0 : _d.map((item) => {
|
1184
|
+
var _a2;
|
1185
|
+
return (_a2 = item.skillCenterId) == null ? void 0 : _a2.toString();
|
1186
|
+
}),
|
1187
|
+
onChange: (selectedValues) => {
|
1188
|
+
const selectedIds = selectedValues.map(Number);
|
1189
|
+
form.setFieldValue("userSkillCenters", selectedValues.map((item, idx) => ({
|
1190
|
+
idField: idx.toString(),
|
1191
|
+
id: 0,
|
1192
|
+
code: "string",
|
1193
|
+
name: "string",
|
1194
|
+
concurrencyStamp: "string",
|
1195
|
+
isEnabled: true,
|
1196
|
+
skillCenterId: parseInt(item.toString())
|
1197
|
+
})));
|
1198
|
+
setEditedUserSkillCentersState(
|
1199
|
+
(prev) => updateEnableList(
|
1200
|
+
prev,
|
1201
|
+
selectedIds,
|
1202
|
+
(item) => item.skillCenterId,
|
1203
|
+
(id) => ({ id: 0, skillCenterId: id, isEnabled: true })
|
1204
|
+
)
|
1205
|
+
);
|
1206
|
+
}
|
1207
|
+
}
|
1208
|
+
)
|
1209
|
+
] }) });
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement_Read.tsx
|
1213
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
1214
|
+
function F_accountManagement_Read() {
|
1215
|
+
var _a, _b, _c;
|
1216
|
+
const paginationState = useState9({ pageIndex: 0, pageSize: 10 });
|
1217
|
+
const router = useMyRouter();
|
1218
|
+
const store = useS_accountManagement();
|
1219
|
+
const AllUserQuery = useMyReactQuery({
|
1220
|
+
queryKey: ["AllUserQuery", paginationState[0].pageIndex + 1, paginationState[0].pageSize],
|
1221
|
+
axiosFn: async () => {
|
1222
|
+
return apiData_Account.getAdminAccount({
|
1223
|
+
pageNumber: paginationState[0].pageIndex + 1,
|
1224
|
+
pageSize: paginationState[0].pageSize
|
1225
|
+
});
|
1226
|
+
},
|
1227
|
+
mockData: mockUserData2
|
1228
|
+
});
|
1229
|
+
const getTotalAccount = useMyReactQuery({
|
1230
|
+
queryKey: ["getTotalAccount"],
|
1231
|
+
axiosFn: async () => apiData_Account.getAdminAccount()
|
1232
|
+
});
|
1233
|
+
const columns = useMemo4(() => {
|
1234
|
+
var _a2;
|
1235
|
+
const baseColumns = [
|
1236
|
+
{
|
1237
|
+
header: "T\xEAn t\xE0i kho\u1EA3n",
|
1238
|
+
accessorKey: "userName"
|
1239
|
+
},
|
1240
|
+
{
|
1241
|
+
header: "H\u1ECD v\xE0 t\xEAn",
|
1242
|
+
accessorKey: "fullName"
|
1243
|
+
},
|
1244
|
+
{
|
1245
|
+
header: "Email",
|
1246
|
+
accessorKey: "email"
|
1247
|
+
},
|
1248
|
+
{
|
1249
|
+
header: "Quy\u1EC1n",
|
1250
|
+
accessorFn: (row) => /* @__PURE__ */ jsx13(F_accountManagement_ChangePermission, { user: row })
|
1251
|
+
}
|
1252
|
+
];
|
1253
|
+
if (((_a2 = store.state) == null ? void 0 : _a2.isRequireSkillCenter) === true) {
|
1254
|
+
baseColumns.splice(3, 0, {
|
1255
|
+
header: "Trung t\xE2m k\u1EF9 n\u0103ng",
|
1256
|
+
accessorFn: (row) => {
|
1257
|
+
var _a3;
|
1258
|
+
return (_a3 = row.userSkillCenters) == null ? void 0 : _a3.map((item) => item.name + ", ");
|
1259
|
+
}
|
1260
|
+
});
|
1261
|
+
}
|
1262
|
+
return baseColumns;
|
1263
|
+
}, [(_a = store.state) == null ? void 0 : _a.isRequireSkillCenter]);
|
1264
|
+
return /* @__PURE__ */ jsx13(
|
1265
|
+
MyDataTable,
|
1266
|
+
{
|
1267
|
+
isLoading: AllUserQuery.isLoading,
|
1268
|
+
rowCount: (_c = (_b = getTotalAccount.data) == null ? void 0 : _b.length) != null ? _c : 0,
|
1269
|
+
pagination: paginationState[0],
|
1270
|
+
onPaginationChange: paginationState[1],
|
1271
|
+
columns,
|
1272
|
+
data: AllUserQuery.data || [],
|
1273
|
+
renderTopToolbarCustomActions: () => {
|
1274
|
+
return /* @__PURE__ */ jsxs8(Group2, { children: [
|
1275
|
+
/* @__PURE__ */ jsx13(F_accountManagement_Create, {}),
|
1276
|
+
/* @__PURE__ */ jsx13(
|
1277
|
+
Button2,
|
1278
|
+
{
|
1279
|
+
color: "violet",
|
1280
|
+
leftSection: /* @__PURE__ */ jsx13(IconShield, {}),
|
1281
|
+
onClick: () => {
|
1282
|
+
router.push("roleCatalog");
|
1283
|
+
},
|
1284
|
+
children: "Danh m\u1EE5c quy\u1EC1n"
|
1285
|
+
}
|
1286
|
+
)
|
1287
|
+
] });
|
1288
|
+
},
|
1289
|
+
renderRowActions: ({ row }) => {
|
1290
|
+
return /* @__PURE__ */ jsxs8(MyCenterFull, { children: [
|
1291
|
+
/* @__PURE__ */ jsx13(F_accountManagement_Update, { user: row.original }),
|
1292
|
+
/* @__PURE__ */ jsx13(F_accountManagement_Delete, { id: row.original.id, code: row.original.code })
|
1293
|
+
] });
|
1294
|
+
}
|
1295
|
+
}
|
1296
|
+
);
|
1297
|
+
}
|
1298
|
+
var mockUserData2 = [
|
1299
|
+
{
|
1300
|
+
userName: "nguyenvana",
|
1301
|
+
fullName: "Nguy\u1EC5n V\u0103n A",
|
1302
|
+
email: "vana@example.com"
|
1303
|
+
},
|
1304
|
+
{
|
1305
|
+
userName: "tranthib",
|
1306
|
+
fullName: "Tr\u1EA7n Th\u1ECB B",
|
1307
|
+
email: "thib@example.com"
|
1308
|
+
},
|
1309
|
+
{
|
1310
|
+
userName: "leminhc",
|
1311
|
+
fullName: "L\xEA Minh C",
|
1312
|
+
email: "minhc@example.com"
|
1313
|
+
},
|
1314
|
+
{
|
1315
|
+
userName: "phamthid",
|
1316
|
+
fullName: "Ph\u1EA1m Th\u1ECB D",
|
1317
|
+
email: "thid@example.com"
|
1318
|
+
},
|
1319
|
+
{
|
1320
|
+
userName: "doanvanh",
|
1321
|
+
fullName: "Do\xE3n V\u0103n H",
|
1322
|
+
email: "vanh@example.com"
|
1323
|
+
}
|
1324
|
+
];
|
1325
|
+
|
1326
|
+
// src/modules-features/admin/core/accountManagement/F_accountManagement.tsx
|
1327
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
1328
|
+
function F_accountManagement({ isRequireSkillCenter = false }) {
|
1329
|
+
const store = useS_accountManagement();
|
1330
|
+
useEffect8(() => {
|
1331
|
+
store.setProperty("isRequireSkillCenter", isRequireSkillCenter);
|
1332
|
+
}, []);
|
1333
|
+
return /* @__PURE__ */ jsx14(F_accountManagement_Read, {});
|
1334
|
+
}
|
1335
|
+
|
1336
|
+
// src/modules-features/admin/core/core12196/F_core12196_Read.tsx
|
1337
|
+
import { Accordion, Alert, Blockquote, Skeleton } from "@mantine/core";
|
1338
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
1339
|
+
import { useMemo as useMemo5 } from "react";
|
1340
|
+
import { IconBug } from "@tabler/icons-react";
|
1341
|
+
|
1342
|
+
// src/modules-features/admin/core/core12196/F_core12196_Delete.tsx
|
1343
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
1344
|
+
function F_core12196_Delete({
|
1345
|
+
id,
|
1346
|
+
contextData
|
1347
|
+
}) {
|
1348
|
+
return /* @__PURE__ */ jsx15(
|
1349
|
+
MyActionIconDelete,
|
1350
|
+
{
|
1351
|
+
contextData,
|
1352
|
+
onSubmit: async () => await baseAxios_default.post("/Document/delete", { id })
|
1353
|
+
}
|
1354
|
+
);
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
// src/modules-features/admin/core/core18256/F_core18256_Select.tsx
|
1358
|
+
import { Select } from "@mantine/core";
|
1359
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
1360
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
542
1361
|
function F_core18256_Select(_a) {
|
543
1362
|
var _b = _a, { documentTypeId, label = "", dataMapper } = _b, rest = __objRest(_b, ["documentTypeId", "label", "dataMapper"]);
|
544
1363
|
var _a2, _b2;
|
545
|
-
const query =
|
1364
|
+
const query = useQuery6({
|
546
1365
|
queryKey: [`/DocumentAttribute/GetByType?documentType=${documentTypeId}`],
|
547
1366
|
queryFn: async () => {
|
548
1367
|
const result = (await baseAxios_default.get(`/DocumentAttribute/GetByType?documentType=${documentTypeId}`)).data.data;
|
@@ -558,7 +1377,7 @@ function F_core18256_Select(_a) {
|
|
558
1377
|
label: `${item.code}-${item.name}`
|
559
1378
|
};
|
560
1379
|
});
|
561
|
-
return /* @__PURE__ */
|
1380
|
+
return /* @__PURE__ */ jsx16(
|
562
1381
|
Select,
|
563
1382
|
__spreadProps(__spreadValues({
|
564
1383
|
label,
|
@@ -572,7 +1391,7 @@ function F_core18256_Select(_a) {
|
|
572
1391
|
|
573
1392
|
// src/modules-features/admin/core/core12196/F_core12196_Update.tsx
|
574
1393
|
import { useForm as useForm3 } from "@mantine/form";
|
575
|
-
import { jsx as
|
1394
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
576
1395
|
function F_core12196_Update({
|
577
1396
|
values,
|
578
1397
|
FormTypeId
|
@@ -594,7 +1413,7 @@ function F_core12196_Update({
|
|
594
1413
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
595
1414
|
}
|
596
1415
|
});
|
597
|
-
return /* @__PURE__ */
|
1416
|
+
return /* @__PURE__ */ jsxs9(
|
598
1417
|
MyActionIconUpdate,
|
599
1418
|
{
|
600
1419
|
form,
|
@@ -604,28 +1423,28 @@ function F_core12196_Update({
|
|
604
1423
|
}));
|
605
1424
|
},
|
606
1425
|
children: [
|
607
|
-
/* @__PURE__ */
|
608
|
-
|
1426
|
+
/* @__PURE__ */ jsx17(
|
1427
|
+
MyTextInput,
|
609
1428
|
__spreadValues({
|
610
1429
|
withAsterisk: true,
|
611
1430
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
612
1431
|
}, form.getInputProps("decisionCode"))
|
613
1432
|
),
|
614
|
-
/* @__PURE__ */
|
1433
|
+
/* @__PURE__ */ jsx17(
|
615
1434
|
MyDateInput,
|
616
1435
|
__spreadValues({
|
617
1436
|
withAsterisk: true,
|
618
1437
|
label: "Ng\xE0y ban h\xE0nh"
|
619
1438
|
}, form.getInputProps("promulgateDate"))
|
620
1439
|
),
|
621
|
-
/* @__PURE__ */
|
622
|
-
|
1440
|
+
/* @__PURE__ */ jsx17(
|
1441
|
+
MyTextInput,
|
623
1442
|
__spreadValues({
|
624
1443
|
withAsterisk: true,
|
625
1444
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
626
1445
|
}, form.getInputProps("name"))
|
627
1446
|
),
|
628
|
-
/* @__PURE__ */
|
1447
|
+
/* @__PURE__ */ jsx17(
|
629
1448
|
F_core18256_Select,
|
630
1449
|
__spreadValues({
|
631
1450
|
withAsterisk: true,
|
@@ -633,14 +1452,14 @@ function F_core12196_Update({
|
|
633
1452
|
documentTypeId: FormTypeId
|
634
1453
|
}, form.getInputProps("documentAttributeId"))
|
635
1454
|
),
|
636
|
-
/* @__PURE__ */
|
1455
|
+
/* @__PURE__ */ jsx17(
|
637
1456
|
MyFileInput,
|
638
1457
|
__spreadValues({
|
639
1458
|
withAsterisk: true,
|
640
1459
|
label: "V\u0103n b\u1EA3n"
|
641
1460
|
}, form.getInputProps("file"))
|
642
1461
|
),
|
643
|
-
/* @__PURE__ */
|
1462
|
+
/* @__PURE__ */ jsx17(
|
644
1463
|
MyNumberInput,
|
645
1464
|
__spreadValues({
|
646
1465
|
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
@@ -652,10 +1471,10 @@ function F_core12196_Update({
|
|
652
1471
|
}
|
653
1472
|
|
654
1473
|
// src/modules-features/admin/core/core12196/F_core12196_Read.tsx
|
655
|
-
import { jsx as
|
1474
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
656
1475
|
function F_core12196_Read({ FormTypeId }) {
|
657
1476
|
var _a, _b, _c;
|
658
|
-
const documentAttributeQuery =
|
1477
|
+
const documentAttributeQuery = useQuery7({
|
659
1478
|
queryKey: ["F_core12196_Read", FormTypeId],
|
660
1479
|
queryFn: async () => {
|
661
1480
|
var _a2;
|
@@ -666,10 +1485,10 @@ function F_core12196_Read({ FormTypeId }) {
|
|
666
1485
|
}
|
667
1486
|
});
|
668
1487
|
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
669
|
-
return /* @__PURE__ */
|
1488
|
+
return /* @__PURE__ */ jsx18(Blockquote, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
670
1489
|
if (documentAttributeQuery.isError)
|
671
|
-
return /* @__PURE__ */
|
672
|
-
return /* @__PURE__ */
|
1490
|
+
return /* @__PURE__ */ jsx18(Alert, { icon: /* @__PURE__ */ jsx18(IconBug, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" });
|
1491
|
+
return /* @__PURE__ */ jsx18(Skeleton, { h: 500, visible: documentAttributeQuery.isLoading, children: /* @__PURE__ */ jsx18(MyFlexColumn, { children: /* @__PURE__ */ jsx18(
|
673
1492
|
Accordion,
|
674
1493
|
{
|
675
1494
|
variant: "contained",
|
@@ -680,7 +1499,7 @@ function F_core12196_Read({ FormTypeId }) {
|
|
680
1499
|
}
|
681
1500
|
),
|
682
1501
|
multiple: true,
|
683
|
-
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */
|
1502
|
+
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx18(
|
684
1503
|
SubRead,
|
685
1504
|
{
|
686
1505
|
name: item.name,
|
@@ -697,7 +1516,7 @@ function SubRead({
|
|
697
1516
|
documentType,
|
698
1517
|
FormTypeId
|
699
1518
|
}) {
|
700
|
-
const documentQuery =
|
1519
|
+
const documentQuery = useQuery7({
|
701
1520
|
queryKey: ["SF2_3Read" + documentType],
|
702
1521
|
queryFn: async () => {
|
703
1522
|
const result = await baseAxios_default.get(
|
@@ -706,7 +1525,7 @@ function SubRead({
|
|
706
1525
|
return result.data.data;
|
707
1526
|
}
|
708
1527
|
});
|
709
|
-
const columns =
|
1528
|
+
const columns = useMemo5(
|
710
1529
|
() => [
|
711
1530
|
{
|
712
1531
|
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
@@ -723,7 +1542,7 @@ function SubRead({
|
|
723
1542
|
{
|
724
1543
|
header: "File",
|
725
1544
|
accessorFn: (row) => {
|
726
|
-
return /* @__PURE__ */
|
1545
|
+
return /* @__PURE__ */ jsx18(MyCenterFull, { children: /* @__PURE__ */ jsx18(MyButtonViewPDF, { id: row.id }) });
|
727
1546
|
}
|
728
1547
|
}
|
729
1548
|
],
|
@@ -731,24 +1550,24 @@ function SubRead({
|
|
731
1550
|
);
|
732
1551
|
if (documentQuery.isLoading) return "Loading...";
|
733
1552
|
if (documentQuery.isError) return "Error!";
|
734
|
-
return /* @__PURE__ */
|
735
|
-
/* @__PURE__ */
|
736
|
-
/* @__PURE__ */
|
1553
|
+
return /* @__PURE__ */ jsxs10(Accordion.Item, { value: documentType.toString(), children: [
|
1554
|
+
/* @__PURE__ */ jsx18(Accordion.Control, { children: name }),
|
1555
|
+
/* @__PURE__ */ jsx18(Accordion.Panel, { children: /* @__PURE__ */ jsx18(
|
737
1556
|
MyDataTable,
|
738
1557
|
{
|
739
1558
|
isLoading: documentQuery.isLoading,
|
740
1559
|
isError: documentQuery.isError,
|
741
1560
|
columns,
|
742
1561
|
data: documentQuery.data || [],
|
743
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
744
|
-
/* @__PURE__ */
|
1562
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs10(MyCenterFull, { children: [
|
1563
|
+
/* @__PURE__ */ jsx18(
|
745
1564
|
F_core12196_Update,
|
746
1565
|
{
|
747
1566
|
FormTypeId,
|
748
1567
|
values: row.original
|
749
1568
|
}
|
750
1569
|
),
|
751
|
-
/* @__PURE__ */
|
1570
|
+
/* @__PURE__ */ jsx18(
|
752
1571
|
F_core12196_Delete,
|
753
1572
|
{
|
754
1573
|
id: row.original.id,
|
@@ -763,7 +1582,7 @@ function SubRead({
|
|
763
1582
|
|
764
1583
|
// src/modules-features/admin/core/core12196/F_core12196_Create.tsx
|
765
1584
|
import { useForm as useForm4 } from "@mantine/form";
|
766
|
-
import { jsx as
|
1585
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
767
1586
|
function F_core12196_Create({ FormTypeId }) {
|
768
1587
|
const form = useForm4({
|
769
1588
|
mode: "uncontrolled",
|
@@ -775,7 +1594,7 @@ function F_core12196_Create({ FormTypeId }) {
|
|
775
1594
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
776
1595
|
}
|
777
1596
|
});
|
778
|
-
return /* @__PURE__ */
|
1597
|
+
return /* @__PURE__ */ jsxs11(
|
779
1598
|
MyButtonCreate,
|
780
1599
|
{
|
781
1600
|
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
@@ -787,28 +1606,28 @@ function F_core12196_Create({ FormTypeId }) {
|
|
787
1606
|
}));
|
788
1607
|
},
|
789
1608
|
children: [
|
790
|
-
/* @__PURE__ */
|
791
|
-
|
1609
|
+
/* @__PURE__ */ jsx19(
|
1610
|
+
MyTextInput,
|
792
1611
|
__spreadValues({
|
793
1612
|
withAsterisk: true,
|
794
1613
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
795
1614
|
}, form.getInputProps("decisionCode"))
|
796
1615
|
),
|
797
|
-
/* @__PURE__ */
|
1616
|
+
/* @__PURE__ */ jsx19(
|
798
1617
|
MyDateInput,
|
799
1618
|
__spreadValues({
|
800
1619
|
withAsterisk: true,
|
801
1620
|
label: "Ng\xE0y ban h\xE0nh"
|
802
1621
|
}, form.getInputProps("promulgateDate"))
|
803
1622
|
),
|
804
|
-
/* @__PURE__ */
|
805
|
-
|
1623
|
+
/* @__PURE__ */ jsx19(
|
1624
|
+
MyTextInput,
|
806
1625
|
__spreadValues({
|
807
1626
|
withAsterisk: true,
|
808
1627
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
809
1628
|
}, form.getInputProps("name"))
|
810
1629
|
),
|
811
|
-
/* @__PURE__ */
|
1630
|
+
/* @__PURE__ */ jsx19(
|
812
1631
|
F_core18256_Select,
|
813
1632
|
__spreadValues({
|
814
1633
|
withAsterisk: true,
|
@@ -816,14 +1635,14 @@ function F_core12196_Create({ FormTypeId }) {
|
|
816
1635
|
documentTypeId: FormTypeId
|
817
1636
|
}, form.getInputProps("documentAttributeId"))
|
818
1637
|
),
|
819
|
-
/* @__PURE__ */
|
1638
|
+
/* @__PURE__ */ jsx19(
|
820
1639
|
MyFileInput,
|
821
1640
|
__spreadValues({
|
822
1641
|
withAsterisk: true,
|
823
1642
|
label: "V\u0103n b\u1EA3n"
|
824
1643
|
}, form.getInputProps("file"))
|
825
1644
|
),
|
826
|
-
/* @__PURE__ */
|
1645
|
+
/* @__PURE__ */ jsx19(
|
827
1646
|
MyNumberInput,
|
828
1647
|
__spreadValues({
|
829
1648
|
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
@@ -835,26 +1654,26 @@ function F_core12196_Create({ FormTypeId }) {
|
|
835
1654
|
}
|
836
1655
|
|
837
1656
|
// src/modules-features/admin/core/core12196/F_core12196.tsx
|
838
|
-
import { Paper, Space } from "@mantine/core";
|
839
|
-
import { jsx as
|
1657
|
+
import { Paper as Paper3, Space } from "@mantine/core";
|
1658
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
840
1659
|
function F_core12196({
|
841
1660
|
FormTypeId
|
842
1661
|
}) {
|
843
|
-
return /* @__PURE__ */
|
844
|
-
/* @__PURE__ */
|
845
|
-
/* @__PURE__ */
|
846
|
-
/* @__PURE__ */
|
1662
|
+
return /* @__PURE__ */ jsxs12(Paper3, { p: "md", children: [
|
1663
|
+
/* @__PURE__ */ jsx20(MyFlexEnd, { children: /* @__PURE__ */ jsx20(F_core12196_Create, { FormTypeId }) }),
|
1664
|
+
/* @__PURE__ */ jsx20(Space, {}),
|
1665
|
+
/* @__PURE__ */ jsx20(F_core12196_Read, { FormTypeId })
|
847
1666
|
] });
|
848
1667
|
}
|
849
1668
|
|
850
1669
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
851
|
-
import { useQuery as
|
852
|
-
import { useMemo as
|
1670
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
1671
|
+
import { useMemo as useMemo6 } from "react";
|
853
1672
|
|
854
1673
|
// src/modules-features/admin/core/core16209/F_core16209_Create.tsx
|
855
1674
|
import { FileInput, Textarea } from "@mantine/core";
|
856
1675
|
import { useForm as useForm5 } from "@mantine/form";
|
857
|
-
import { jsx as
|
1676
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
858
1677
|
function F_core16209_Create({
|
859
1678
|
RefinementTypeId
|
860
1679
|
}) {
|
@@ -869,7 +1688,7 @@ function F_core16209_Create({
|
|
869
1688
|
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"
|
870
1689
|
}
|
871
1690
|
});
|
872
|
-
return /* @__PURE__ */
|
1691
|
+
return /* @__PURE__ */ jsxs13(
|
873
1692
|
MyButtonCreate,
|
874
1693
|
{
|
875
1694
|
objectName: "v\u0103n b\u1EA3n",
|
@@ -882,43 +1701,43 @@ function F_core16209_Create({
|
|
882
1701
|
}));
|
883
1702
|
},
|
884
1703
|
children: [
|
885
|
-
/* @__PURE__ */
|
1704
|
+
/* @__PURE__ */ jsx21(
|
886
1705
|
MyDateInput,
|
887
1706
|
__spreadValues({
|
888
1707
|
withAsterisk: true,
|
889
1708
|
label: "Ng\xE0y h\u1ECDp"
|
890
1709
|
}, form.getInputProps("meetingDate"))
|
891
1710
|
),
|
892
|
-
/* @__PURE__ */
|
893
|
-
|
1711
|
+
/* @__PURE__ */ jsx21(
|
1712
|
+
MyTextInput,
|
894
1713
|
__spreadValues({
|
895
1714
|
withAsterisk: true,
|
896
1715
|
label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u"
|
897
1716
|
}, form.getInputProps("departmentName"))
|
898
1717
|
),
|
899
|
-
/* @__PURE__ */
|
900
|
-
|
1718
|
+
/* @__PURE__ */ jsx21(
|
1719
|
+
MyTextInput,
|
901
1720
|
__spreadValues({
|
902
1721
|
withAsterisk: true,
|
903
1722
|
label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn"
|
904
1723
|
}, form.getInputProps("description"))
|
905
1724
|
),
|
906
|
-
/* @__PURE__ */
|
907
|
-
/* @__PURE__ */
|
1725
|
+
/* @__PURE__ */ jsx21(MyTextInput, __spreadValues({ label: "K\u1EBFt lu\u1EADn" }, form.getInputProps("conclusion"))),
|
1726
|
+
/* @__PURE__ */ jsx21(
|
908
1727
|
MyDateInput,
|
909
1728
|
__spreadValues({
|
910
1729
|
withAsterisk: true,
|
911
1730
|
label: "Ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
912
1731
|
}, form.getInputProps("startDate"))
|
913
1732
|
),
|
914
|
-
/* @__PURE__ */
|
1733
|
+
/* @__PURE__ */ jsx21(
|
915
1734
|
MyDateInput,
|
916
1735
|
__spreadValues({
|
917
1736
|
withAsterisk: true,
|
918
1737
|
label: "Ng\xE0y k\u1EBFt th\xFAc"
|
919
1738
|
}, form.getInputProps("endDate"))
|
920
1739
|
),
|
921
|
-
/* @__PURE__ */
|
1740
|
+
/* @__PURE__ */ jsx21(
|
922
1741
|
FileInput,
|
923
1742
|
__spreadValues({
|
924
1743
|
placeholder: "T\u1EA3i l\xEAn t\xE0i li\u1EC7u",
|
@@ -926,19 +1745,19 @@ function F_core16209_Create({
|
|
926
1745
|
label: "T\xE0i li\u1EC7u"
|
927
1746
|
}, form.getInputProps("file"))
|
928
1747
|
),
|
929
|
-
/* @__PURE__ */
|
1748
|
+
/* @__PURE__ */ jsx21(Textarea, __spreadValues({ label: "Ghi ch\xFA" }, form.getInputProps("note")))
|
930
1749
|
]
|
931
1750
|
}
|
932
1751
|
);
|
933
1752
|
}
|
934
1753
|
|
935
1754
|
// src/modules-features/admin/core/core16209/F_core16209_Delete.tsx
|
936
|
-
import { jsx as
|
1755
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
937
1756
|
function F_core16209_Delete({
|
938
1757
|
id,
|
939
1758
|
contextData
|
940
1759
|
}) {
|
941
|
-
return /* @__PURE__ */
|
1760
|
+
return /* @__PURE__ */ jsx22(
|
942
1761
|
MyActionIconDelete,
|
943
1762
|
{
|
944
1763
|
contextData,
|
@@ -950,7 +1769,7 @@ function F_core16209_Delete({
|
|
950
1769
|
// src/modules-features/admin/core/core16209/F_core16209_Update.tsx
|
951
1770
|
import { FileInput as FileInput2, Textarea as Textarea2 } from "@mantine/core";
|
952
1771
|
import { useForm as useForm6 } from "@mantine/form";
|
953
|
-
import { jsx as
|
1772
|
+
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
954
1773
|
function F_core16209_Update({ values }) {
|
955
1774
|
var _a;
|
956
1775
|
const form = useForm6({
|
@@ -973,7 +1792,7 @@ function F_core16209_Update({ values }) {
|
|
973
1792
|
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"
|
974
1793
|
}
|
975
1794
|
});
|
976
|
-
return /* @__PURE__ */
|
1795
|
+
return /* @__PURE__ */ jsxs14(
|
977
1796
|
MyActionIconUpdate,
|
978
1797
|
{
|
979
1798
|
form,
|
@@ -983,43 +1802,43 @@ function F_core16209_Update({ values }) {
|
|
983
1802
|
}));
|
984
1803
|
},
|
985
1804
|
children: [
|
986
|
-
/* @__PURE__ */
|
1805
|
+
/* @__PURE__ */ jsx23(
|
987
1806
|
MyDateInput,
|
988
1807
|
__spreadValues({
|
989
1808
|
withAsterisk: true,
|
990
1809
|
label: "Ng\xE0y h\u1ECDp"
|
991
1810
|
}, form.getInputProps("meetingDate"))
|
992
1811
|
),
|
993
|
-
/* @__PURE__ */
|
994
|
-
|
1812
|
+
/* @__PURE__ */ jsx23(
|
1813
|
+
MyTextInput,
|
995
1814
|
__spreadValues({
|
996
1815
|
withAsterisk: true,
|
997
1816
|
label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u"
|
998
1817
|
}, form.getInputProps("departmentName"))
|
999
1818
|
),
|
1000
|
-
/* @__PURE__ */
|
1001
|
-
|
1819
|
+
/* @__PURE__ */ jsx23(
|
1820
|
+
MyTextInput,
|
1002
1821
|
__spreadValues({
|
1003
1822
|
withAsterisk: true,
|
1004
1823
|
label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn"
|
1005
1824
|
}, form.getInputProps("description"))
|
1006
1825
|
),
|
1007
|
-
/* @__PURE__ */
|
1008
|
-
/* @__PURE__ */
|
1826
|
+
/* @__PURE__ */ jsx23(MyTextInput, __spreadValues({ label: "K\u1EBFt lu\u1EADn" }, form.getInputProps("conclusion"))),
|
1827
|
+
/* @__PURE__ */ jsx23(
|
1009
1828
|
MyDateInput,
|
1010
1829
|
__spreadValues({
|
1011
1830
|
withAsterisk: true,
|
1012
1831
|
label: "Ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
1013
1832
|
}, form.getInputProps("startDate"))
|
1014
1833
|
),
|
1015
|
-
/* @__PURE__ */
|
1834
|
+
/* @__PURE__ */ jsx23(
|
1016
1835
|
MyDateInput,
|
1017
1836
|
__spreadValues({
|
1018
1837
|
withAsterisk: true,
|
1019
1838
|
label: "Ng\xE0y k\u1EBFt th\xFAc"
|
1020
1839
|
}, form.getInputProps("endDate"))
|
1021
1840
|
),
|
1022
|
-
/* @__PURE__ */
|
1841
|
+
/* @__PURE__ */ jsx23(
|
1023
1842
|
FileInput2,
|
1024
1843
|
__spreadValues({
|
1025
1844
|
placeholder: "T\u1EA3i l\xEAn t\xE0i li\u1EC7u",
|
@@ -1027,16 +1846,16 @@ function F_core16209_Update({ values }) {
|
|
1027
1846
|
label: "T\xE0i li\u1EC7u"
|
1028
1847
|
}, form.getInputProps("file"))
|
1029
1848
|
),
|
1030
|
-
/* @__PURE__ */
|
1849
|
+
/* @__PURE__ */ jsx23(Textarea2, __spreadValues({ label: "Ghi ch\xFA" }, form.getInputProps("note")))
|
1031
1850
|
]
|
1032
1851
|
}
|
1033
1852
|
);
|
1034
1853
|
}
|
1035
1854
|
|
1036
1855
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
1037
|
-
import { jsx as
|
1856
|
+
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
1038
1857
|
function F_core16209({ RefinementTypeId }) {
|
1039
|
-
const query =
|
1858
|
+
const query = useQuery8({
|
1040
1859
|
queryKey: ["F_core16209_Read"],
|
1041
1860
|
queryFn: async () => {
|
1042
1861
|
var _a;
|
@@ -1046,7 +1865,7 @@ function F_core16209({ RefinementTypeId }) {
|
|
1046
1865
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
1047
1866
|
}
|
1048
1867
|
});
|
1049
|
-
const columns =
|
1868
|
+
const columns = useMemo6(
|
1050
1869
|
() => [
|
1051
1870
|
{
|
1052
1871
|
header: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u",
|
@@ -1067,24 +1886,24 @@ function F_core16209({ RefinementTypeId }) {
|
|
1067
1886
|
{
|
1068
1887
|
header: "File",
|
1069
1888
|
accessorFn: (row) => {
|
1070
|
-
return /* @__PURE__ */
|
1889
|
+
return /* @__PURE__ */ jsx24(MyCenterFull, { children: /* @__PURE__ */ jsx24(MyButtonViewPDF, { id: row.id }) });
|
1071
1890
|
}
|
1072
1891
|
}
|
1073
1892
|
],
|
1074
1893
|
[]
|
1075
1894
|
);
|
1076
|
-
return /* @__PURE__ */
|
1895
|
+
return /* @__PURE__ */ jsx24(
|
1077
1896
|
MyDataTable,
|
1078
1897
|
{
|
1079
1898
|
isLoading: query.isLoading,
|
1080
1899
|
isError: query.isError,
|
1081
1900
|
columns,
|
1082
1901
|
data: query.data || [],
|
1083
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
1902
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx24(F_core16209_Create, { RefinementTypeId }),
|
1084
1903
|
renderRowActions: ({ row }) => {
|
1085
|
-
return /* @__PURE__ */
|
1086
|
-
/* @__PURE__ */
|
1087
|
-
/* @__PURE__ */
|
1904
|
+
return /* @__PURE__ */ jsxs15(MyCenterFull, { children: [
|
1905
|
+
/* @__PURE__ */ jsx24(F_core16209_Update, { values: row.original }),
|
1906
|
+
/* @__PURE__ */ jsx24(
|
1088
1907
|
F_core16209_Delete,
|
1089
1908
|
{
|
1090
1909
|
id: row.original.id,
|
@@ -1101,12 +1920,12 @@ function F_core16209({ RefinementTypeId }) {
|
|
1101
1920
|
import { Tabs } from "@mantine/core";
|
1102
1921
|
|
1103
1922
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
1104
|
-
import { useQuery as
|
1105
|
-
import { useMemo as
|
1923
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
1924
|
+
import { useMemo as useMemo7 } from "react";
|
1106
1925
|
|
1107
1926
|
// src/modules-features/admin/core/core18256/F_core18256_Create.tsx
|
1108
1927
|
import { useForm as useForm7 } from "@mantine/form";
|
1109
|
-
import { jsx as
|
1928
|
+
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
1110
1929
|
function F_core18256_Create({ documentType }) {
|
1111
1930
|
const form = useForm7({
|
1112
1931
|
mode: "uncontrolled",
|
@@ -1119,16 +1938,16 @@ function F_core18256_Create({ documentType }) {
|
|
1119
1938
|
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
1120
1939
|
}
|
1121
1940
|
});
|
1122
|
-
return /* @__PURE__ */
|
1123
|
-
/* @__PURE__ */
|
1124
|
-
/* @__PURE__ */
|
1941
|
+
return /* @__PURE__ */ jsxs16(MyButtonCreate, { objectName: "Lo\u1EA1i v\u0103n b\u1EA3n", form, onSubmit: (values) => baseAxios_default.post("/DocumentAttribute/Create", values), children: [
|
1942
|
+
/* @__PURE__ */ jsx25(MyTextInput, __spreadValues({ label: "M\xE3 lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("code"))),
|
1943
|
+
/* @__PURE__ */ jsx25(MyTextInput, __spreadValues({ label: "T\xEAn lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("name")))
|
1125
1944
|
] });
|
1126
1945
|
}
|
1127
1946
|
|
1128
1947
|
// src/modules-features/admin/core/core18256/F_core18256_Delete.tsx
|
1129
|
-
import { jsx as
|
1948
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
1130
1949
|
function F_core18256_Delete({ id }) {
|
1131
|
-
return /* @__PURE__ */
|
1950
|
+
return /* @__PURE__ */ jsx26(
|
1132
1951
|
MyActionIconDelete,
|
1133
1952
|
{
|
1134
1953
|
onSubmit: async () => await baseAxios_default.post("/DocumentAttribute/Delete", { id })
|
@@ -1138,21 +1957,21 @@ function F_core18256_Delete({ id }) {
|
|
1138
1957
|
|
1139
1958
|
// src/modules-features/admin/core/core18256/F_core18256_Update.tsx
|
1140
1959
|
import { useForm as useForm8 } from "@mantine/form";
|
1141
|
-
import { jsx as
|
1960
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
1142
1961
|
function F_core18256_Update({ values }) {
|
1143
1962
|
const form = useForm8({
|
1144
1963
|
initialValues: values
|
1145
1964
|
});
|
1146
|
-
return /* @__PURE__ */
|
1147
|
-
/* @__PURE__ */
|
1148
|
-
/* @__PURE__ */
|
1965
|
+
return /* @__PURE__ */ jsxs17(MyActionIconUpdate, { form, onSubmit: async (values2) => await baseAxios_default.post("/DocumentAttribute/Update", values2), children: [
|
1966
|
+
/* @__PURE__ */ jsx27(MyTextInput, __spreadValues({ label: "M\xE3 lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("code"))),
|
1967
|
+
/* @__PURE__ */ jsx27(MyTextInput, __spreadValues({ label: "T\xEAn lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("name")))
|
1149
1968
|
] });
|
1150
1969
|
}
|
1151
1970
|
|
1152
1971
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
1153
|
-
import { jsx as
|
1972
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
1154
1973
|
function F_core18256_Read({ documentType }) {
|
1155
|
-
const documentAttributeQuery =
|
1974
|
+
const documentAttributeQuery = useQuery9({
|
1156
1975
|
queryKey: ["F_core18256_Read", documentType],
|
1157
1976
|
queryFn: async () => {
|
1158
1977
|
var _a;
|
@@ -1160,7 +1979,7 @@ function F_core18256_Read({ documentType }) {
|
|
1160
1979
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
1161
1980
|
}
|
1162
1981
|
});
|
1163
|
-
const columns =
|
1982
|
+
const columns = useMemo7(
|
1164
1983
|
() => [
|
1165
1984
|
{
|
1166
1985
|
header: "M\xE3 lo\u1EA1i v\u0103n b\u1EA3n",
|
@@ -1173,7 +1992,7 @@ function F_core18256_Read({ documentType }) {
|
|
1173
1992
|
],
|
1174
1993
|
[]
|
1175
1994
|
);
|
1176
|
-
return /* @__PURE__ */
|
1995
|
+
return /* @__PURE__ */ jsx28(
|
1177
1996
|
MyDataTable,
|
1178
1997
|
{
|
1179
1998
|
isLoading: documentAttributeQuery.isLoading,
|
@@ -1181,11 +2000,11 @@ function F_core18256_Read({ documentType }) {
|
|
1181
2000
|
columns,
|
1182
2001
|
enableRowNumbers: true,
|
1183
2002
|
data: documentAttributeQuery.data || [],
|
1184
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
2003
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx28(F_core18256_Create, { documentType }),
|
1185
2004
|
renderRowActions: ({ row }) => {
|
1186
|
-
return /* @__PURE__ */
|
1187
|
-
/* @__PURE__ */
|
1188
|
-
/* @__PURE__ */
|
2005
|
+
return /* @__PURE__ */ jsxs18(MyCenterFull, { children: [
|
2006
|
+
/* @__PURE__ */ jsx28(F_core18256_Update, { values: row.original }),
|
2007
|
+
/* @__PURE__ */ jsx28(F_core18256_Delete, { id: row.original.id })
|
1189
2008
|
] });
|
1190
2009
|
}
|
1191
2010
|
}
|
@@ -1193,26 +2012,26 @@ function F_core18256_Read({ documentType }) {
|
|
1193
2012
|
}
|
1194
2013
|
|
1195
2014
|
// src/modules-features/admin/core/core18256/F_core18256.tsx
|
1196
|
-
import { jsx as
|
2015
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
1197
2016
|
var tabData = [
|
1198
2017
|
{ label: "1. V\u0103n b\u1EA3n quy \u0111\u1ECBnh" },
|
1199
2018
|
{ label: "2. Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c" },
|
1200
2019
|
{ label: "3. Danh m\u1EE5c bi\u1EC3u m\u1EABu" }
|
1201
2020
|
];
|
1202
2021
|
function F_core18256() {
|
1203
|
-
return /* @__PURE__ */
|
1204
|
-
/* @__PURE__ */
|
1205
|
-
/* @__PURE__ */
|
1206
|
-
/* @__PURE__ */
|
2022
|
+
return /* @__PURE__ */ jsxs19(MyTab, { tabList: tabData, children: [
|
2023
|
+
/* @__PURE__ */ jsx29(Tabs.Panel, { value: "1. V\u0103n b\u1EA3n quy \u0111\u1ECBnh", children: /* @__PURE__ */ jsx29(F_core18256_Read, { documentType: const_object_documentTypes.Regulations }) }),
|
2024
|
+
/* @__PURE__ */ jsx29(Tabs.Panel, { value: "2. Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", children: /* @__PURE__ */ jsx29(F_core18256_Read, { documentType: const_object_documentTypes.Workflow }) }),
|
2025
|
+
/* @__PURE__ */ jsx29(Tabs.Panel, { value: "3. Danh m\u1EE5c bi\u1EC3u m\u1EABu", children: /* @__PURE__ */ jsx29(F_core18256_Read, { documentType: const_object_documentTypes.Form }) })
|
1207
2026
|
] });
|
1208
2027
|
}
|
1209
2028
|
|
1210
2029
|
// src/modules-features/admin/core/core26965/F_core26965.tsx
|
1211
|
-
import { Paper as
|
2030
|
+
import { Paper as Paper4, Space as Space2 } from "@mantine/core";
|
1212
2031
|
|
1213
2032
|
// src/modules-features/admin/core/core26965/F_core26965_Create.tsx
|
1214
2033
|
import { useForm as useForm9 } from "@mantine/form";
|
1215
|
-
import { jsx as
|
2034
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
1216
2035
|
function F_core26965_Create({
|
1217
2036
|
RegulationsTypeId
|
1218
2037
|
}) {
|
@@ -1226,7 +2045,7 @@ function F_core26965_Create({
|
|
1226
2045
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
1227
2046
|
}
|
1228
2047
|
});
|
1229
|
-
return /* @__PURE__ */
|
2048
|
+
return /* @__PURE__ */ jsxs20(
|
1230
2049
|
MyButtonCreate,
|
1231
2050
|
{
|
1232
2051
|
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
@@ -1238,28 +2057,28 @@ function F_core26965_Create({
|
|
1238
2057
|
}));
|
1239
2058
|
},
|
1240
2059
|
children: [
|
1241
|
-
/* @__PURE__ */
|
1242
|
-
|
2060
|
+
/* @__PURE__ */ jsx30(
|
2061
|
+
MyTextInput,
|
1243
2062
|
__spreadValues({
|
1244
2063
|
withAsterisk: true,
|
1245
2064
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
1246
2065
|
}, form.getInputProps("decisionCode"))
|
1247
2066
|
),
|
1248
|
-
/* @__PURE__ */
|
2067
|
+
/* @__PURE__ */ jsx30(
|
1249
2068
|
MyDateInput,
|
1250
2069
|
__spreadValues({
|
1251
2070
|
withAsterisk: true,
|
1252
2071
|
label: "Ng\xE0y ban h\xE0nh"
|
1253
2072
|
}, form.getInputProps("promulgateDate"))
|
1254
2073
|
),
|
1255
|
-
/* @__PURE__ */
|
1256
|
-
|
2074
|
+
/* @__PURE__ */ jsx30(
|
2075
|
+
MyTextInput,
|
1257
2076
|
__spreadValues({
|
1258
2077
|
withAsterisk: true,
|
1259
2078
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
1260
2079
|
}, form.getInputProps("name"))
|
1261
2080
|
),
|
1262
|
-
/* @__PURE__ */
|
2081
|
+
/* @__PURE__ */ jsx30(
|
1263
2082
|
F_core18256_Select,
|
1264
2083
|
__spreadValues({
|
1265
2084
|
withAsterisk: true,
|
@@ -1267,14 +2086,14 @@ function F_core26965_Create({
|
|
1267
2086
|
documentTypeId: RegulationsTypeId
|
1268
2087
|
}, form.getInputProps("documentAttributeId"))
|
1269
2088
|
),
|
1270
|
-
/* @__PURE__ */
|
2089
|
+
/* @__PURE__ */ jsx30(
|
1271
2090
|
MyFileInput,
|
1272
2091
|
__spreadValues({
|
1273
2092
|
withAsterisk: true,
|
1274
2093
|
label: "V\u0103n b\u1EA3n"
|
1275
2094
|
}, form.getInputProps("file"))
|
1276
2095
|
),
|
1277
|
-
/* @__PURE__ */
|
2096
|
+
/* @__PURE__ */ jsx30(
|
1278
2097
|
MyNumberInput,
|
1279
2098
|
__spreadValues({
|
1280
2099
|
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
@@ -1287,17 +2106,17 @@ function F_core26965_Create({
|
|
1287
2106
|
|
1288
2107
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
1289
2108
|
import { Accordion as Accordion2, Alert as Alert2, Blockquote as Blockquote2, Skeleton as Skeleton2 } from "@mantine/core";
|
1290
|
-
import { useQuery as
|
2109
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
1291
2110
|
import { IconBug as IconBug2 } from "@tabler/icons-react";
|
1292
|
-
import { useMemo as
|
2111
|
+
import { useMemo as useMemo8 } from "react";
|
1293
2112
|
|
1294
2113
|
// src/modules-features/admin/core/core26965/F_core26965_Delete.tsx
|
1295
|
-
import { jsx as
|
2114
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
1296
2115
|
function F_core26965_Delete({
|
1297
2116
|
id,
|
1298
2117
|
contextData
|
1299
2118
|
}) {
|
1300
|
-
return /* @__PURE__ */
|
2119
|
+
return /* @__PURE__ */ jsx31(
|
1301
2120
|
MyActionIconDelete,
|
1302
2121
|
{
|
1303
2122
|
contextData,
|
@@ -1308,7 +2127,7 @@ function F_core26965_Delete({
|
|
1308
2127
|
|
1309
2128
|
// src/modules-features/admin/core/core26965/F_core26965_Update.tsx
|
1310
2129
|
import { useForm as useForm10 } from "@mantine/form";
|
1311
|
-
import { jsx as
|
2130
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
1312
2131
|
function F_core26965_Update({
|
1313
2132
|
values,
|
1314
2133
|
RegulationsTypeId
|
@@ -1330,7 +2149,7 @@ function F_core26965_Update({
|
|
1330
2149
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
1331
2150
|
}
|
1332
2151
|
});
|
1333
|
-
return /* @__PURE__ */
|
2152
|
+
return /* @__PURE__ */ jsxs21(
|
1334
2153
|
MyActionIconUpdate,
|
1335
2154
|
{
|
1336
2155
|
form,
|
@@ -1340,28 +2159,28 @@ function F_core26965_Update({
|
|
1340
2159
|
}));
|
1341
2160
|
},
|
1342
2161
|
children: [
|
1343
|
-
/* @__PURE__ */
|
1344
|
-
|
2162
|
+
/* @__PURE__ */ jsx32(
|
2163
|
+
MyTextInput,
|
1345
2164
|
__spreadValues({
|
1346
2165
|
withAsterisk: true,
|
1347
2166
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
1348
2167
|
}, form.getInputProps("decisionCode"))
|
1349
2168
|
),
|
1350
|
-
/* @__PURE__ */
|
2169
|
+
/* @__PURE__ */ jsx32(
|
1351
2170
|
MyDateInput,
|
1352
2171
|
__spreadValues({
|
1353
2172
|
withAsterisk: true,
|
1354
2173
|
label: "Ng\xE0y ban h\xE0nh"
|
1355
2174
|
}, form.getInputProps("promulgateDate"))
|
1356
2175
|
),
|
1357
|
-
/* @__PURE__ */
|
1358
|
-
|
2176
|
+
/* @__PURE__ */ jsx32(
|
2177
|
+
MyTextInput,
|
1359
2178
|
__spreadValues({
|
1360
2179
|
withAsterisk: true,
|
1361
2180
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
1362
2181
|
}, form.getInputProps("name"))
|
1363
2182
|
),
|
1364
|
-
/* @__PURE__ */
|
2183
|
+
/* @__PURE__ */ jsx32(
|
1365
2184
|
F_core18256_Select,
|
1366
2185
|
__spreadValues({
|
1367
2186
|
withAsterisk: true,
|
@@ -1369,14 +2188,14 @@ function F_core26965_Update({
|
|
1369
2188
|
documentTypeId: RegulationsTypeId
|
1370
2189
|
}, form.getInputProps("documentAttributeId"))
|
1371
2190
|
),
|
1372
|
-
/* @__PURE__ */
|
2191
|
+
/* @__PURE__ */ jsx32(
|
1373
2192
|
MyFileInput,
|
1374
2193
|
__spreadValues({
|
1375
2194
|
withAsterisk: true,
|
1376
2195
|
label: "V\u0103n b\u1EA3n"
|
1377
2196
|
}, form.getInputProps("file"))
|
1378
2197
|
),
|
1379
|
-
/* @__PURE__ */
|
2198
|
+
/* @__PURE__ */ jsx32(
|
1380
2199
|
MyNumberInput,
|
1381
2200
|
__spreadValues({
|
1382
2201
|
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
@@ -1388,12 +2207,12 @@ function F_core26965_Update({
|
|
1388
2207
|
}
|
1389
2208
|
|
1390
2209
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
1391
|
-
import { jsx as
|
2210
|
+
import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
1392
2211
|
function F_core26965_Read({
|
1393
2212
|
RegulationsTypeId
|
1394
2213
|
}) {
|
1395
2214
|
var _a, _b, _c;
|
1396
|
-
const documentAttributeQuery =
|
2215
|
+
const documentAttributeQuery = useQuery10({
|
1397
2216
|
queryKey: ["F_core26965_Read", RegulationsTypeId],
|
1398
2217
|
queryFn: async () => {
|
1399
2218
|
var _a2;
|
@@ -1404,10 +2223,10 @@ function F_core26965_Read({
|
|
1404
2223
|
}
|
1405
2224
|
});
|
1406
2225
|
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
1407
|
-
return /* @__PURE__ */
|
2226
|
+
return /* @__PURE__ */ jsx33(Blockquote2, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
1408
2227
|
if (documentAttributeQuery.isError)
|
1409
|
-
return /* @__PURE__ */
|
1410
|
-
return /* @__PURE__ */
|
2228
|
+
return /* @__PURE__ */ jsx33(Alert2, { icon: /* @__PURE__ */ jsx33(IconBug2, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" });
|
2229
|
+
return /* @__PURE__ */ jsx33(Skeleton2, { h: 500, visible: documentAttributeQuery.isLoading, children: /* @__PURE__ */ jsx33(MyFlexColumn, { children: /* @__PURE__ */ jsx33(
|
1411
2230
|
Accordion2,
|
1412
2231
|
{
|
1413
2232
|
variant: "contained",
|
@@ -1418,7 +2237,7 @@ function F_core26965_Read({
|
|
1418
2237
|
}
|
1419
2238
|
),
|
1420
2239
|
multiple: true,
|
1421
|
-
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */
|
2240
|
+
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx33(
|
1422
2241
|
SubRead2,
|
1423
2242
|
{
|
1424
2243
|
name: item.name,
|
@@ -1435,7 +2254,7 @@ function SubRead2({
|
|
1435
2254
|
documentType,
|
1436
2255
|
RegulationsTypeId
|
1437
2256
|
}) {
|
1438
|
-
const documentQuery =
|
2257
|
+
const documentQuery = useQuery10({
|
1439
2258
|
queryKey: ["SubRead" + documentType],
|
1440
2259
|
queryFn: async () => {
|
1441
2260
|
const result = await baseAxios_default.get(
|
@@ -1444,7 +2263,7 @@ function SubRead2({
|
|
1444
2263
|
return result.data.data;
|
1445
2264
|
}
|
1446
2265
|
});
|
1447
|
-
const columns =
|
2266
|
+
const columns = useMemo8(
|
1448
2267
|
() => [
|
1449
2268
|
{
|
1450
2269
|
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
@@ -1461,30 +2280,30 @@ function SubRead2({
|
|
1461
2280
|
{
|
1462
2281
|
header: "File",
|
1463
2282
|
accessorFn: (row) => {
|
1464
|
-
return /* @__PURE__ */
|
2283
|
+
return /* @__PURE__ */ jsx33(MyCenterFull, { children: /* @__PURE__ */ jsx33(MyButtonViewPDF, { id: row.id }) });
|
1465
2284
|
}
|
1466
2285
|
}
|
1467
2286
|
],
|
1468
2287
|
[]
|
1469
2288
|
);
|
1470
|
-
return /* @__PURE__ */
|
1471
|
-
/* @__PURE__ */
|
1472
|
-
/* @__PURE__ */
|
2289
|
+
return /* @__PURE__ */ jsxs22(Accordion2.Item, { value: documentType.toString(), children: [
|
2290
|
+
/* @__PURE__ */ jsx33(Accordion2.Control, { children: name }),
|
2291
|
+
/* @__PURE__ */ jsx33(Accordion2.Panel, { children: /* @__PURE__ */ jsx33(
|
1473
2292
|
MyDataTable,
|
1474
2293
|
{
|
1475
2294
|
isLoading: documentQuery.isLoading,
|
1476
2295
|
isError: documentQuery.isError,
|
1477
2296
|
columns,
|
1478
2297
|
data: documentQuery.data || [],
|
1479
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
1480
|
-
/* @__PURE__ */
|
2298
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs22(MyCenterFull, { children: [
|
2299
|
+
/* @__PURE__ */ jsx33(
|
1481
2300
|
F_core26965_Update,
|
1482
2301
|
{
|
1483
2302
|
RegulationsTypeId,
|
1484
2303
|
values: row.original
|
1485
2304
|
}
|
1486
2305
|
),
|
1487
|
-
/* @__PURE__ */
|
2306
|
+
/* @__PURE__ */ jsx33(
|
1488
2307
|
F_core26965_Delete,
|
1489
2308
|
{
|
1490
2309
|
id: row.original.id,
|
@@ -1498,18 +2317,18 @@ function SubRead2({
|
|
1498
2317
|
}
|
1499
2318
|
|
1500
2319
|
// src/modules-features/admin/core/core26965/F_core26965.tsx
|
1501
|
-
import { jsx as
|
2320
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
1502
2321
|
function F_core26965({ RegulationsTypeId }) {
|
1503
|
-
return /* @__PURE__ */
|
1504
|
-
/* @__PURE__ */
|
1505
|
-
/* @__PURE__ */
|
1506
|
-
/* @__PURE__ */
|
2322
|
+
return /* @__PURE__ */ jsxs23(Paper4, { p: "md", children: [
|
2323
|
+
/* @__PURE__ */ jsx34(MyFlexEnd, { children: /* @__PURE__ */ jsx34(F_core26965_Create, { RegulationsTypeId }) }),
|
2324
|
+
/* @__PURE__ */ jsx34(Space2, {}),
|
2325
|
+
/* @__PURE__ */ jsx34(F_core26965_Read, { RegulationsTypeId })
|
1507
2326
|
] });
|
1508
2327
|
}
|
1509
2328
|
|
1510
2329
|
// src/modules-features/admin/core/core27311/F_core27311_Create.tsx
|
1511
2330
|
import { useForm as useForm11 } from "@mantine/form";
|
1512
|
-
import { jsx as
|
2331
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
1513
2332
|
function F_core27311_Create({
|
1514
2333
|
WorkflowTypeId
|
1515
2334
|
}) {
|
@@ -1523,7 +2342,7 @@ function F_core27311_Create({
|
|
1523
2342
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
1524
2343
|
}
|
1525
2344
|
});
|
1526
|
-
return /* @__PURE__ */
|
2345
|
+
return /* @__PURE__ */ jsxs24(
|
1527
2346
|
MyButtonCreate,
|
1528
2347
|
{
|
1529
2348
|
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
@@ -1535,28 +2354,28 @@ function F_core27311_Create({
|
|
1535
2354
|
}));
|
1536
2355
|
},
|
1537
2356
|
children: [
|
1538
|
-
/* @__PURE__ */
|
1539
|
-
|
2357
|
+
/* @__PURE__ */ jsx35(
|
2358
|
+
MyTextInput,
|
1540
2359
|
__spreadValues({
|
1541
2360
|
withAsterisk: true,
|
1542
2361
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
1543
2362
|
}, form.getInputProps("decisionCode"))
|
1544
2363
|
),
|
1545
|
-
/* @__PURE__ */
|
2364
|
+
/* @__PURE__ */ jsx35(
|
1546
2365
|
MyDateInput,
|
1547
2366
|
__spreadValues({
|
1548
2367
|
withAsterisk: true,
|
1549
2368
|
label: "Ng\xE0y ban h\xE0nh"
|
1550
2369
|
}, form.getInputProps("promulgateDate"))
|
1551
2370
|
),
|
1552
|
-
/* @__PURE__ */
|
1553
|
-
|
2371
|
+
/* @__PURE__ */ jsx35(
|
2372
|
+
MyTextInput,
|
1554
2373
|
__spreadValues({
|
1555
2374
|
withAsterisk: true,
|
1556
2375
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
1557
2376
|
}, form.getInputProps("name"))
|
1558
2377
|
),
|
1559
|
-
/* @__PURE__ */
|
2378
|
+
/* @__PURE__ */ jsx35(
|
1560
2379
|
F_core18256_Select,
|
1561
2380
|
__spreadValues({
|
1562
2381
|
withAsterisk: true,
|
@@ -1564,14 +2383,14 @@ function F_core27311_Create({
|
|
1564
2383
|
documentTypeId: WorkflowTypeId
|
1565
2384
|
}, form.getInputProps("documentAttributeId"))
|
1566
2385
|
),
|
1567
|
-
/* @__PURE__ */
|
2386
|
+
/* @__PURE__ */ jsx35(
|
1568
2387
|
MyFileInput,
|
1569
2388
|
__spreadValues({
|
1570
2389
|
withAsterisk: true,
|
1571
2390
|
label: "V\u0103n b\u1EA3n"
|
1572
2391
|
}, form.getInputProps("file"))
|
1573
2392
|
),
|
1574
|
-
/* @__PURE__ */
|
2393
|
+
/* @__PURE__ */ jsx35(
|
1575
2394
|
MyNumberInput,
|
1576
2395
|
__spreadValues({
|
1577
2396
|
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
@@ -1584,17 +2403,17 @@ function F_core27311_Create({
|
|
1584
2403
|
|
1585
2404
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
1586
2405
|
import { Accordion as Accordion3, Alert as Alert3, Blockquote as Blockquote3, Skeleton as Skeleton3 } from "@mantine/core";
|
1587
|
-
import { useQuery as
|
2406
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
1588
2407
|
import { IconBug as IconBug3 } from "@tabler/icons-react";
|
1589
|
-
import { useMemo as
|
2408
|
+
import { useMemo as useMemo9 } from "react";
|
1590
2409
|
|
1591
2410
|
// src/modules-features/admin/core/core27311/F_core27311_Delete.tsx
|
1592
|
-
import { jsx as
|
2411
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
1593
2412
|
function F_core27311_Delete({
|
1594
2413
|
id,
|
1595
2414
|
contextData
|
1596
2415
|
}) {
|
1597
|
-
return /* @__PURE__ */
|
2416
|
+
return /* @__PURE__ */ jsx36(
|
1598
2417
|
MyActionIconDelete,
|
1599
2418
|
{
|
1600
2419
|
contextData,
|
@@ -1605,7 +2424,7 @@ function F_core27311_Delete({
|
|
1605
2424
|
|
1606
2425
|
// src/modules-features/admin/core/core27311/F_core27311_Update.tsx
|
1607
2426
|
import { useForm as useForm12 } from "@mantine/form";
|
1608
|
-
import { jsx as
|
2427
|
+
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
1609
2428
|
function F_core27311_Update({
|
1610
2429
|
values,
|
1611
2430
|
WorkflowTypeId
|
@@ -1627,7 +2446,7 @@ function F_core27311_Update({
|
|
1627
2446
|
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
1628
2447
|
}
|
1629
2448
|
});
|
1630
|
-
return /* @__PURE__ */
|
2449
|
+
return /* @__PURE__ */ jsxs25(
|
1631
2450
|
MyActionIconUpdate,
|
1632
2451
|
{
|
1633
2452
|
form,
|
@@ -1637,28 +2456,28 @@ function F_core27311_Update({
|
|
1637
2456
|
}));
|
1638
2457
|
},
|
1639
2458
|
children: [
|
1640
|
-
/* @__PURE__ */
|
1641
|
-
|
2459
|
+
/* @__PURE__ */ jsx37(
|
2460
|
+
MyTextInput,
|
1642
2461
|
__spreadValues({
|
1643
2462
|
withAsterisk: true,
|
1644
2463
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
1645
2464
|
}, form.getInputProps("decisionCode"))
|
1646
2465
|
),
|
1647
|
-
/* @__PURE__ */
|
2466
|
+
/* @__PURE__ */ jsx37(
|
1648
2467
|
MyDateInput,
|
1649
2468
|
__spreadValues({
|
1650
2469
|
withAsterisk: true,
|
1651
2470
|
label: "Ng\xE0y ban h\xE0nh"
|
1652
2471
|
}, form.getInputProps("promulgateDate"))
|
1653
2472
|
),
|
1654
|
-
/* @__PURE__ */
|
1655
|
-
|
2473
|
+
/* @__PURE__ */ jsx37(
|
2474
|
+
MyTextInput,
|
1656
2475
|
__spreadValues({
|
1657
2476
|
withAsterisk: true,
|
1658
2477
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
1659
2478
|
}, form.getInputProps("name"))
|
1660
2479
|
),
|
1661
|
-
/* @__PURE__ */
|
2480
|
+
/* @__PURE__ */ jsx37(
|
1662
2481
|
F_core18256_Select,
|
1663
2482
|
__spreadValues({
|
1664
2483
|
withAsterisk: true,
|
@@ -1666,14 +2485,14 @@ function F_core27311_Update({
|
|
1666
2485
|
documentTypeId: WorkflowTypeId
|
1667
2486
|
}, form.getInputProps("documentAttributeId"))
|
1668
2487
|
),
|
1669
|
-
/* @__PURE__ */
|
2488
|
+
/* @__PURE__ */ jsx37(
|
1670
2489
|
MyFileInput,
|
1671
2490
|
__spreadValues({
|
1672
2491
|
withAsterisk: true,
|
1673
2492
|
label: "V\u0103n b\u1EA3n"
|
1674
2493
|
}, form.getInputProps("file"))
|
1675
2494
|
),
|
1676
|
-
/* @__PURE__ */
|
2495
|
+
/* @__PURE__ */ jsx37(
|
1677
2496
|
MyNumberInput,
|
1678
2497
|
__spreadValues({
|
1679
2498
|
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
@@ -1685,12 +2504,12 @@ function F_core27311_Update({
|
|
1685
2504
|
}
|
1686
2505
|
|
1687
2506
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
1688
|
-
import { jsx as
|
2507
|
+
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
1689
2508
|
function F_core27311_Read({
|
1690
2509
|
WorkflowTypeId
|
1691
2510
|
}) {
|
1692
2511
|
var _a, _b, _c;
|
1693
|
-
const documentAttributeQuery =
|
2512
|
+
const documentAttributeQuery = useQuery11({
|
1694
2513
|
queryKey: ["F_core27311_Read", WorkflowTypeId],
|
1695
2514
|
queryFn: async () => {
|
1696
2515
|
var _a2;
|
@@ -1701,10 +2520,10 @@ function F_core27311_Read({
|
|
1701
2520
|
}
|
1702
2521
|
});
|
1703
2522
|
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
1704
|
-
return /* @__PURE__ */
|
2523
|
+
return /* @__PURE__ */ jsx38(Blockquote3, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
1705
2524
|
if (documentAttributeQuery.isError)
|
1706
|
-
return /* @__PURE__ */
|
1707
|
-
return /* @__PURE__ */
|
2525
|
+
return /* @__PURE__ */ jsx38(Alert3, { icon: /* @__PURE__ */ jsx38(IconBug3, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" });
|
2526
|
+
return /* @__PURE__ */ jsx38(Skeleton3, { h: 500, visible: documentAttributeQuery.isLoading, children: /* @__PURE__ */ jsx38(MyFlexColumn, { children: /* @__PURE__ */ jsx38(
|
1708
2527
|
Accordion3,
|
1709
2528
|
{
|
1710
2529
|
variant: "contained",
|
@@ -1715,7 +2534,7 @@ function F_core27311_Read({
|
|
1715
2534
|
}
|
1716
2535
|
),
|
1717
2536
|
multiple: true,
|
1718
|
-
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */
|
2537
|
+
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx38(
|
1719
2538
|
SubRead3,
|
1720
2539
|
{
|
1721
2540
|
name: item.name,
|
@@ -1732,7 +2551,7 @@ function SubRead3({
|
|
1732
2551
|
documentType,
|
1733
2552
|
WorkflowTypeId
|
1734
2553
|
}) {
|
1735
|
-
const documentQuery =
|
2554
|
+
const documentQuery = useQuery11({
|
1736
2555
|
queryKey: ["SubRead" + documentType],
|
1737
2556
|
queryFn: async () => {
|
1738
2557
|
const result = await baseAxios_default.get(
|
@@ -1741,7 +2560,7 @@ function SubRead3({
|
|
1741
2560
|
return result.data.data;
|
1742
2561
|
}
|
1743
2562
|
});
|
1744
|
-
const columns =
|
2563
|
+
const columns = useMemo9(
|
1745
2564
|
() => [
|
1746
2565
|
{
|
1747
2566
|
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
@@ -1758,522 +2577,83 @@ function SubRead3({
|
|
1758
2577
|
{
|
1759
2578
|
header: "File",
|
1760
2579
|
accessorFn: (row) => {
|
1761
|
-
return /* @__PURE__ */
|
1762
|
-
}
|
1763
|
-
}
|
1764
|
-
],
|
1765
|
-
[]
|
1766
|
-
);
|
1767
|
-
return /* @__PURE__ */ jsxs22(Accordion3.Item, { value: documentType.toString(), children: [
|
1768
|
-
/* @__PURE__ */ jsx30(Accordion3.Control, { children: name }),
|
1769
|
-
/* @__PURE__ */ jsx30(Accordion3.Panel, { children: /* @__PURE__ */ jsx30(
|
1770
|
-
MyDataTable,
|
1771
|
-
{
|
1772
|
-
isLoading: documentQuery.isLoading,
|
1773
|
-
isError: documentQuery.isError,
|
1774
|
-
columns,
|
1775
|
-
data: documentQuery.data || [],
|
1776
|
-
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs22(MyCenterFull, { children: [
|
1777
|
-
/* @__PURE__ */ jsx30(
|
1778
|
-
F_core27311_Update,
|
1779
|
-
{
|
1780
|
-
WorkflowTypeId,
|
1781
|
-
values: row.original
|
1782
|
-
}
|
1783
|
-
),
|
1784
|
-
/* @__PURE__ */ jsx30(
|
1785
|
-
F_core27311_Delete,
|
1786
|
-
{
|
1787
|
-
id: row.original.id,
|
1788
|
-
contextData: row.original.decisionCode
|
1789
|
-
}
|
1790
|
-
)
|
1791
|
-
] })
|
1792
|
-
}
|
1793
|
-
) })
|
1794
|
-
] });
|
1795
|
-
}
|
1796
|
-
|
1797
|
-
// src/modules-features/admin/core/core27311/F_core27311.tsx
|
1798
|
-
import { Paper as Paper3, Space as Space3 } from "@mantine/core";
|
1799
|
-
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
1800
|
-
function F_core27311({
|
1801
|
-
WorkflowTypeId
|
1802
|
-
}) {
|
1803
|
-
return /* @__PURE__ */ jsxs23(Paper3, { p: "md", children: [
|
1804
|
-
/* @__PURE__ */ jsx31(MyFlexEnd, { children: /* @__PURE__ */ jsx31(F_core27311_Create, { WorkflowTypeId }) }),
|
1805
|
-
/* @__PURE__ */ jsx31(Space3, {}),
|
1806
|
-
/* @__PURE__ */ jsx31(F_core27311_Read, { WorkflowTypeId })
|
1807
|
-
] });
|
1808
|
-
}
|
1809
|
-
|
1810
|
-
// src/modules-features/admin/core/core35923/F_core35923.tsx
|
1811
|
-
import { Grid } from "@mantine/core";
|
1812
|
-
import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
1813
|
-
function F_core35923() {
|
1814
|
-
return /* @__PURE__ */ jsxs24(MyFieldset, { title: "C\u1EADp nh\u1EADt th\xF4ng tin \u0111\u01A1n v\u1ECB ch\u1EE7 qu\u1EA3n", children: [
|
1815
|
-
/* @__PURE__ */ jsxs24(Grid, { children: [
|
1816
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 5 }, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "M\xE3 module", disabled: true }) }),
|
1817
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 7 }, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "T\xEAn module" }) }),
|
1818
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: 12, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "T\xEAn \u0111\u01A1n v\u1ECB ch\u1EE7 qu\u1EA3n" }) }),
|
1819
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "Email" }) }),
|
1820
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }) }),
|
1821
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "Ng\xE0y \u0111\u0103ng k\xFD" }) }),
|
1822
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx32(MyTextInput2, { label: "Ng\xE0y h\u1EBFt h\u1EA1n" }) }),
|
1823
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx32(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
|
1824
|
-
/* @__PURE__ */ jsx32(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx32(MyFileInput, { label: "Logo (330px x 115px)" }) })
|
1825
|
-
] }),
|
1826
|
-
/* @__PURE__ */ jsx32(MyFlexEnd, { children: /* @__PURE__ */ jsx32(MyButton2, { crudType: "save" }) })
|
1827
|
-
] });
|
1828
|
-
}
|
1829
|
-
|
1830
|
-
// src/modules-features/admin/core/core38677/F_core38677.tsx
|
1831
|
-
import { Grid as Grid2, Paper as Paper4, ScrollArea as ScrollArea2 } from "@mantine/core";
|
1832
|
-
|
1833
|
-
// src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
|
1834
|
-
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
1835
|
-
import { useEffect as useEffect3, useMemo as useMemo8, useState as useState4 } from "react";
|
1836
|
-
|
1837
|
-
// src/modules-features/admin/core/core83092/useS_core83092.tsx
|
1838
|
-
var useStore2 = createGenericStore({
|
1839
|
-
initialState: { roleId: 0 },
|
1840
|
-
storageKey: "useS_core83092"
|
1841
|
-
});
|
1842
|
-
function useS_core83092() {
|
1843
|
-
const store = useStore2();
|
1844
|
-
function toogleAllPermissionWithType(field, isCheck) {
|
1845
|
-
var _a;
|
1846
|
-
const updatedData = (_a = store.state.rolePermissions) == null ? void 0 : _a.map((item) => __spreadProps(__spreadValues({}, item), {
|
1847
|
-
[field]: isCheck
|
1848
|
-
}));
|
1849
|
-
store.setProperty("rolePermissions", updatedData);
|
1850
|
-
}
|
1851
|
-
function findByPageId(pageId) {
|
1852
|
-
var _a;
|
1853
|
-
const rolePermission = (_a = store.state.rolePermissions) == null ? void 0 : _a.find((item) => item.pageId == pageId);
|
1854
|
-
return rolePermission;
|
1855
|
-
}
|
1856
|
-
function updatePermission(pageId, updatedPermission) {
|
1857
|
-
var _a;
|
1858
|
-
const updatedData = (_a = store.state.rolePermissions) == null ? void 0 : _a.map(
|
1859
|
-
(item) => item.pageId === pageId ? __spreadValues(__spreadValues({}, item), updatedPermission) : item
|
1860
|
-
);
|
1861
|
-
store.setProperty("rolePermissions", updatedData);
|
1862
|
-
}
|
1863
|
-
function isAllPermission(field) {
|
1864
|
-
var _a, _b;
|
1865
|
-
return (_b = (_a = store.state.rolePermissions) == null ? void 0 : _a.every((item) => item[field] === true)) != null ? _b : false;
|
1866
|
-
}
|
1867
|
-
return __spreadProps(__spreadValues({}, store), {
|
1868
|
-
toogleAllPermissionWithType,
|
1869
|
-
findByPageId,
|
1870
|
-
updatePermission,
|
1871
|
-
isAllPermission
|
1872
|
-
});
|
1873
|
-
}
|
1874
|
-
function utils_core83092_mergePage(arr1, arr2) {
|
1875
|
-
const pageMap = /* @__PURE__ */ new Map();
|
1876
|
-
arr1.forEach((page) => pageMap.set(page.pageId, page));
|
1877
|
-
arr2.forEach((page) => {
|
1878
|
-
if (pageMap.has(page.pageId)) {
|
1879
|
-
pageMap.set(page.pageId, page);
|
1880
|
-
}
|
1881
|
-
});
|
1882
|
-
return Array.from(pageMap.values());
|
1883
|
-
}
|
1884
|
-
|
1885
|
-
// src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
|
1886
|
-
import { jsx as jsx33 } from "react/jsx-runtime";
|
1887
|
-
function F_core38677_ReadUser() {
|
1888
|
-
const store = useS_core83092();
|
1889
|
-
const query = useQ_Account_GetAdminAccount();
|
1890
|
-
const [rowSelection, setRowSelection] = useState4({});
|
1891
|
-
const columns = useMemo8(
|
1892
|
-
() => [
|
1893
|
-
{
|
1894
|
-
header: "M\xE3",
|
1895
|
-
accessorKey: "code",
|
1896
|
-
size: 60
|
1897
|
-
},
|
1898
|
-
{
|
1899
|
-
header: "T\xEAn quy\u1EC1n",
|
1900
|
-
accessorKey: "name"
|
1901
|
-
}
|
1902
|
-
],
|
1903
|
-
[]
|
1904
|
-
);
|
1905
|
-
const handleRowClick = (rowId) => {
|
1906
|
-
setRowSelection({ [rowId]: true });
|
1907
|
-
store.setProperty("roleId", parseInt(rowId));
|
1908
|
-
};
|
1909
|
-
useEffect3(() => {
|
1910
|
-
if (store.state.roleId == 0) return;
|
1911
|
-
setRowSelection({ [store.state.roleId]: true });
|
1912
|
-
}, [store.state.roleId]);
|
1913
|
-
useEffect3(() => {
|
1914
|
-
if (!query.data) return;
|
1915
|
-
store.setProperty("roleId", query.data[0].id);
|
1916
|
-
}, [query.data]);
|
1917
|
-
if (query.isLoading) return "Loading...";
|
1918
|
-
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
1919
|
-
return /* @__PURE__ */ jsx33(
|
1920
|
-
MyDataTable,
|
1921
|
-
{
|
1922
|
-
columns,
|
1923
|
-
data: query.data,
|
1924
|
-
getRowId: (row) => {
|
1925
|
-
var _a;
|
1926
|
-
return (_a = row.id) == null ? void 0 : _a.toString();
|
1927
|
-
},
|
1928
|
-
mantineTableBodyRowProps: ({ row }) => ({
|
1929
|
-
onClick: () => handleRowClick(row.id),
|
1930
|
-
style: {
|
1931
|
-
cursor: "pointer",
|
1932
|
-
backgroundColor: rowSelection[row.id] ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
1933
|
-
}
|
1934
|
-
}),
|
1935
|
-
state: rowSelection
|
1936
|
-
}
|
1937
|
-
);
|
1938
|
-
}
|
1939
|
-
function useQ_Account_GetAdminAccount() {
|
1940
|
-
const query = useQuery8({
|
1941
|
-
queryKey: ["useQ_Role_GetAdminRole"],
|
1942
|
-
queryFn: async () => {
|
1943
|
-
var _a;
|
1944
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") return mockData2;
|
1945
|
-
const result = await baseAxios_default.get(`/Role/GetAdminRole`);
|
1946
|
-
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
1947
|
-
},
|
1948
|
-
refetchOnWindowFocus: false
|
1949
|
-
});
|
1950
|
-
return query;
|
1951
|
-
}
|
1952
|
-
var mockData2 = [
|
1953
|
-
{ id: 1, code: "GV", name: "Gi\u1EA3ng vi\xEAn" },
|
1954
|
-
{ id: 2, code: "STU", name: "Student" },
|
1955
|
-
{ id: 3, code: "FACU", name: "Faculty" },
|
1956
|
-
{ id: 4, code: "ADMIN", name: "Admin" }
|
1957
|
-
];
|
1958
|
-
|
1959
|
-
// src/modules-features/admin/core/core38677/F_core38677_Save.tsx
|
1960
|
-
import { useMutation as useMutation2 } from "@tanstack/react-query";
|
1961
|
-
import { useEffect as useEffect4, useState as useState5 } from "react";
|
1962
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
1963
|
-
function F_core38677_Save() {
|
1964
|
-
const store = useS_core83092();
|
1965
|
-
const disable = useState5(false);
|
1966
|
-
const mutation = useMutation2({
|
1967
|
-
mutationFn: async (body) => {
|
1968
|
-
const res = await baseAxios_default.put("/Role/UpdatePermission", body);
|
1969
|
-
return res;
|
1970
|
-
}
|
1971
|
-
});
|
1972
|
-
function handleSave() {
|
1973
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") {
|
1974
|
-
utils_notification_show({
|
1975
|
-
crudType: "update"
|
1976
|
-
});
|
1977
|
-
return;
|
1978
|
-
}
|
1979
|
-
mutation.mutate({
|
1980
|
-
pagePermissions: store.state.rolePermissions,
|
1981
|
-
roleId: store.state.roleId
|
1982
|
-
}, {
|
1983
|
-
onSuccess: () => {
|
1984
|
-
utils_notification_show({
|
1985
|
-
crudType: "update"
|
1986
|
-
});
|
2580
|
+
return /* @__PURE__ */ jsx38(MyCenterFull, { children: /* @__PURE__ */ jsx38(MyButtonViewPDF, { id: row.id }) });
|
2581
|
+
}
|
1987
2582
|
}
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
1995
|
-
disable[1](false);
|
1996
|
-
}, [store.state.rolePermissions]);
|
1997
|
-
return /* @__PURE__ */ jsx34(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
1998
|
-
}
|
1999
|
-
|
2000
|
-
// src/data/menuData.ts
|
2001
|
-
var menuData = [
|
2002
|
-
{
|
2003
|
-
label: "Qu\u1EA3n l\xED h\u1EC7 th\u1ED1ng",
|
2004
|
-
links: [
|
2005
|
-
{ pageId: 1, name: "accountManagement", label: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n", link: "accountManagement", note: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n c\u1EE7a ng\u01B0\u1EDDi d\xF9ng" },
|
2006
|
-
{ pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "core38677", note: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n c\u1EE7a ng\u01B0\u1EDDi d\xF9ng" },
|
2007
|
-
{ pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "core83092", note: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n c\u1EE7a ng\u01B0\u1EDDi d\xF9ng" },
|
2008
|
-
{ pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "core76318" },
|
2009
|
-
{ 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: "core16209" },
|
2010
|
-
{ pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "core40207" }
|
2011
|
-
]
|
2012
|
-
},
|
2013
|
-
{
|
2014
|
-
label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
|
2015
|
-
links: [
|
2016
|
-
{ pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "core26965" },
|
2017
|
-
{ pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "core27311" },
|
2018
|
-
{ pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "core12196" }
|
2019
|
-
]
|
2020
|
-
},
|
2021
|
-
{
|
2022
|
-
label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng ",
|
2023
|
-
links: [
|
2024
|
-
{ pageId: 0, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "core18256" },
|
2025
|
-
{ pageId: 0, name: "", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "core64229" },
|
2026
|
-
{ pageId: 0, name: "", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" },
|
2027
|
-
{ pageId: 0, name: "", label: "Danh m\u1EE5c Page Content", link: "pageContentConfig" }
|
2028
|
-
]
|
2029
|
-
}
|
2030
|
-
];
|
2031
|
-
|
2032
|
-
// src/modules-features/admin/core/core38677/F_core38677_ViewMenuPermissions.tsx
|
2033
|
-
import { Checkbox, Flex, ScrollArea, Table as Table2, Text } from "@mantine/core";
|
2034
|
-
import { IconEdit, IconEyeUp, IconFileExport, IconPlus, IconPrinter, IconTrash } from "@tabler/icons-react";
|
2035
|
-
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
2036
|
-
import React, { useEffect as useEffect5, useState as useState6 } from "react";
|
2037
|
-
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
2038
|
-
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
2039
|
-
function F_core38677_ViewMenuPermissions({ menuData: menuData2 }) {
|
2040
|
-
var _a, _b;
|
2041
|
-
const store = useS_core83092();
|
2042
|
-
const query = useGetUserPermission();
|
2043
|
-
const list = useState6([]);
|
2044
|
-
useEffect5(() => {
|
2045
|
-
list[1](groupToTwoLevels(menuData2));
|
2046
|
-
}, []);
|
2047
|
-
useEffect5(() => {
|
2048
|
-
if (!query.data) return;
|
2049
|
-
store.setProperty("rolePermissions", query.data);
|
2050
|
-
}, [query.data]);
|
2051
|
-
if (((_a = list[0]) == null ? void 0 : _a.length) == 0) return "\u0110ang t\u1EA3i...";
|
2052
|
-
return /* @__PURE__ */ jsx35(ScrollArea.Autosize, { h: "70vh", children: /* @__PURE__ */ jsxs25(Table2, { children: [
|
2053
|
-
/* @__PURE__ */ jsx35(
|
2054
|
-
Table2.Thead,
|
2583
|
+
],
|
2584
|
+
[]
|
2585
|
+
);
|
2586
|
+
return /* @__PURE__ */ jsxs26(Accordion3.Item, { value: documentType.toString(), children: [
|
2587
|
+
/* @__PURE__ */ jsx38(Accordion3.Control, { children: name }),
|
2588
|
+
/* @__PURE__ */ jsx38(Accordion3.Panel, { children: /* @__PURE__ */ jsx38(
|
2589
|
+
MyDataTable,
|
2055
2590
|
{
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2075
|
-
/* @__PURE__ */ jsx35(Table2.Th, { children: /* @__PURE__ */ jsxs25(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
2076
|
-
/* @__PURE__ */ jsx35(Checkbox, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
2077
|
-
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
2078
|
-
} }),
|
2079
|
-
/* @__PURE__ */ jsxs25(MyFlexRow, { gap: 3, children: [
|
2080
|
-
"Th\xEAm",
|
2081
|
-
/* @__PURE__ */ jsx35(IconPlus, { color: "blue" })
|
2082
|
-
] })
|
2083
|
-
] }) }),
|
2084
|
-
/* @__PURE__ */ jsx35(Table2.Th, { children: /* @__PURE__ */ jsxs25(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
2085
|
-
/* @__PURE__ */ jsx35(Checkbox, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
2086
|
-
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
2087
|
-
} }),
|
2088
|
-
/* @__PURE__ */ jsxs25(MyFlexRow, { gap: 3, children: [
|
2089
|
-
"S\u1EEDa",
|
2090
|
-
/* @__PURE__ */ jsx35(IconEdit, { color: "var(--mantine-color-yellow-8)" })
|
2091
|
-
] })
|
2092
|
-
] }) }),
|
2093
|
-
/* @__PURE__ */ jsx35(Table2.Th, { children: /* @__PURE__ */ jsxs25(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
2094
|
-
/* @__PURE__ */ jsx35(Checkbox, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
2095
|
-
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
2096
|
-
} }),
|
2097
|
-
/* @__PURE__ */ jsxs25(MyFlexRow, { gap: 3, children: [
|
2098
|
-
"X\xF3a",
|
2099
|
-
/* @__PURE__ */ jsx35(IconTrash, { color: "var(--mantine-color-red-8)" })
|
2100
|
-
] })
|
2101
|
-
] }) }),
|
2102
|
-
/* @__PURE__ */ jsx35(Table2.Th, { children: /* @__PURE__ */ jsxs25(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
2103
|
-
/* @__PURE__ */ jsx35(Checkbox, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
2104
|
-
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
2105
|
-
} }),
|
2106
|
-
/* @__PURE__ */ jsxs25(MyFlexRow, { gap: 3, children: [
|
2107
|
-
"In",
|
2108
|
-
/* @__PURE__ */ jsx35(IconPrinter, { color: "var(--mantine-color-cyan-8)" })
|
2109
|
-
] })
|
2110
|
-
] }) }),
|
2111
|
-
/* @__PURE__ */ jsx35(Table2.Th, { children: /* @__PURE__ */ jsxs25(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
2112
|
-
/* @__PURE__ */ jsx35(Checkbox, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
2113
|
-
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
2114
|
-
} }),
|
2115
|
-
/* @__PURE__ */ jsxs25(MyFlexRow, { gap: 3, children: [
|
2116
|
-
"Xu\u1EA5t",
|
2117
|
-
/* @__PURE__ */ jsx35(IconFileExport, { color: "var(--mantine-color-green-8)" })
|
2118
|
-
] })
|
2119
|
-
] }) })
|
2591
|
+
isLoading: documentQuery.isLoading,
|
2592
|
+
isError: documentQuery.isError,
|
2593
|
+
columns,
|
2594
|
+
data: documentQuery.data || [],
|
2595
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs26(MyCenterFull, { children: [
|
2596
|
+
/* @__PURE__ */ jsx38(
|
2597
|
+
F_core27311_Update,
|
2598
|
+
{
|
2599
|
+
WorkflowTypeId,
|
2600
|
+
values: row.original
|
2601
|
+
}
|
2602
|
+
),
|
2603
|
+
/* @__PURE__ */ jsx38(
|
2604
|
+
F_core27311_Delete,
|
2605
|
+
{
|
2606
|
+
id: row.original.id,
|
2607
|
+
contextData: row.original.decisionCode
|
2608
|
+
}
|
2609
|
+
)
|
2120
2610
|
] })
|
2121
2611
|
}
|
2122
|
-
)
|
2123
|
-
|
2124
|
-
if (item.links == void 0) return /* @__PURE__ */ jsxs25(Table2.Tr, { children: [
|
2125
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: item.label }),
|
2126
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(Checkbox, {}) }) }),
|
2127
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(Checkbox, {}) }) }),
|
2128
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(Checkbox, {}) }) }),
|
2129
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(Checkbox, {}) }) }),
|
2130
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(Checkbox, {}) }) }),
|
2131
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(Checkbox, {}) }) })
|
2132
|
-
] }, idx);
|
2133
|
-
return /* @__PURE__ */ jsxs25(React.Fragment, { children: [
|
2134
|
-
/* @__PURE__ */ jsx35(Table2.Tr, { children: /* @__PURE__ */ jsx35(
|
2135
|
-
Table2.Td,
|
2136
|
-
{
|
2137
|
-
colSpan: 7,
|
2138
|
-
bg: const_object_colors.mantineBackgroundBlueLight,
|
2139
|
-
children: /* @__PURE__ */ jsx35(Text, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
2140
|
-
}
|
2141
|
-
) }, item.label),
|
2142
|
-
item.links.map(
|
2143
|
-
(item2, idx2) => {
|
2144
|
-
var _a2, _b2, _c, _d, _e, _f;
|
2145
|
-
return /* @__PURE__ */ jsxs25(Table2.Tr, { children: [
|
2146
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: item2.label }),
|
2147
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(
|
2148
|
-
Checkbox,
|
2149
|
-
{
|
2150
|
-
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
2151
|
-
onChange: (e) => {
|
2152
|
-
store.updatePermission(item2.pageId, {
|
2153
|
-
isRead: e.target.checked
|
2154
|
-
});
|
2155
|
-
}
|
2156
|
-
}
|
2157
|
-
) }) }),
|
2158
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(
|
2159
|
-
Checkbox,
|
2160
|
-
{
|
2161
|
-
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
2162
|
-
onChange: (e) => {
|
2163
|
-
store.updatePermission(item2.pageId, {
|
2164
|
-
isCreate: e.target.checked
|
2165
|
-
});
|
2166
|
-
}
|
2167
|
-
}
|
2168
|
-
) }) }),
|
2169
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(
|
2170
|
-
Checkbox,
|
2171
|
-
{
|
2172
|
-
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
2173
|
-
onChange: (e) => {
|
2174
|
-
store.updatePermission(item2.pageId, {
|
2175
|
-
isUpdate: e.target.checked
|
2176
|
-
});
|
2177
|
-
}
|
2178
|
-
}
|
2179
|
-
) }) }),
|
2180
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(
|
2181
|
-
Checkbox,
|
2182
|
-
{
|
2183
|
-
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
2184
|
-
onChange: (e) => {
|
2185
|
-
store.updatePermission(item2.pageId, {
|
2186
|
-
isDelete: e.target.checked
|
2187
|
-
});
|
2188
|
-
}
|
2189
|
-
}
|
2190
|
-
) }) }),
|
2191
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(
|
2192
|
-
Checkbox,
|
2193
|
-
{
|
2194
|
-
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
2195
|
-
onChange: (e) => {
|
2196
|
-
store.updatePermission(item2.pageId, {
|
2197
|
-
isPrint: e.target.checked
|
2198
|
-
});
|
2199
|
-
}
|
2200
|
-
}
|
2201
|
-
) }) }),
|
2202
|
-
/* @__PURE__ */ jsx35(Table2.Td, { children: /* @__PURE__ */ jsx35(MyCenterFull, { children: /* @__PURE__ */ jsx35(
|
2203
|
-
Checkbox,
|
2204
|
-
{
|
2205
|
-
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
2206
|
-
onChange: (e) => {
|
2207
|
-
store.updatePermission(item2.pageId, {
|
2208
|
-
isExport: e.target.checked
|
2209
|
-
});
|
2210
|
-
}
|
2211
|
-
}
|
2212
|
-
) }) })
|
2213
|
-
] }, idx2);
|
2214
|
-
}
|
2215
|
-
)
|
2216
|
-
] }, idx);
|
2217
|
-
}) })
|
2218
|
-
] }) });
|
2612
|
+
) })
|
2613
|
+
] });
|
2219
2614
|
}
|
2220
|
-
|
2221
|
-
|
2222
|
-
|
2223
|
-
|
2224
|
-
|
2225
|
-
|
2226
|
-
|
2227
|
-
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2231
|
-
|
2232
|
-
isUpdate: false,
|
2233
|
-
isDelete: false,
|
2234
|
-
isExport: false,
|
2235
|
-
isPrint: false
|
2236
|
-
}));
|
2237
|
-
return final.filter((item) => item.pageId != void 0);
|
2238
|
-
}
|
2239
|
-
const menuDataFromAPI = result.data.data;
|
2240
|
-
const mergedArray = utils_core83092_mergePage(menudataFinal, menuDataFromAPI).map((item) => ({
|
2241
|
-
pageId: item.pageId,
|
2242
|
-
isCreate: item.isCreate || false,
|
2243
|
-
isRead: item.isRead || false,
|
2244
|
-
isUpdate: item.isUpdate || false || false,
|
2245
|
-
isDelete: item.isDelete,
|
2246
|
-
isPrint: item.isPrint || false,
|
2247
|
-
isExport: item.isExport || false
|
2248
|
-
})).filter((item) => item.pageId != void 0);
|
2249
|
-
return mergedArray;
|
2250
|
-
},
|
2251
|
-
enabled: store.state.roleId != 0,
|
2252
|
-
refetchOnWindowFocus: false
|
2253
|
-
});
|
2254
|
-
return query;
|
2615
|
+
|
2616
|
+
// src/modules-features/admin/core/core27311/F_core27311.tsx
|
2617
|
+
import { Paper as Paper5, Space as Space3 } from "@mantine/core";
|
2618
|
+
import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
2619
|
+
function F_core27311({
|
2620
|
+
WorkflowTypeId
|
2621
|
+
}) {
|
2622
|
+
return /* @__PURE__ */ jsxs27(Paper5, { p: "md", children: [
|
2623
|
+
/* @__PURE__ */ jsx39(MyFlexEnd, { children: /* @__PURE__ */ jsx39(F_core27311_Create, { WorkflowTypeId }) }),
|
2624
|
+
/* @__PURE__ */ jsx39(Space3, {}),
|
2625
|
+
/* @__PURE__ */ jsx39(F_core27311_Read, { WorkflowTypeId })
|
2626
|
+
] });
|
2255
2627
|
}
|
2256
2628
|
|
2257
|
-
// src/modules-features/admin/core/
|
2258
|
-
import {
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
/* @__PURE__ */
|
2263
|
-
/* @__PURE__ */
|
2264
|
-
/* @__PURE__ */
|
2265
|
-
|
2629
|
+
// src/modules-features/admin/core/core35923/F_core35923.tsx
|
2630
|
+
import { Grid as Grid3 } from "@mantine/core";
|
2631
|
+
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
2632
|
+
function F_core35923() {
|
2633
|
+
return /* @__PURE__ */ jsxs28(MyFieldset, { title: "C\u1EADp nh\u1EADt th\xF4ng tin \u0111\u01A1n v\u1ECB ch\u1EE7 qu\u1EA3n", children: [
|
2634
|
+
/* @__PURE__ */ jsxs28(Grid3, { children: [
|
2635
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 5 }, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "M\xE3 module", disabled: true }) }),
|
2636
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 7 }, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "T\xEAn module" }) }),
|
2637
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: 12, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "T\xEAn \u0111\u01A1n v\u1ECB ch\u1EE7 qu\u1EA3n" }) }),
|
2638
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "Email" }) }),
|
2639
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }) }),
|
2640
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "Ng\xE0y \u0111\u0103ng k\xFD" }) }),
|
2641
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx40(MyTextInput, { label: "Ng\xE0y h\u1EBFt h\u1EA1n" }) }),
|
2642
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx40(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
|
2643
|
+
/* @__PURE__ */ jsx40(Grid3.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx40(MyFileInput, { label: "Logo (330px x 115px)" }) })
|
2644
|
+
] }),
|
2645
|
+
/* @__PURE__ */ jsx40(MyFlexEnd, { children: /* @__PURE__ */ jsx40(MyButton, { crudType: "save" }) })
|
2266
2646
|
] });
|
2267
2647
|
}
|
2268
2648
|
|
2269
2649
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
2270
|
-
import { useQuery as
|
2271
|
-
import { useMemo as
|
2650
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
2651
|
+
import { useMemo as useMemo10 } from "react";
|
2272
2652
|
|
2273
2653
|
// src/modules-features/admin/core/core40207/F_core40207_Create.tsx
|
2274
2654
|
import { FileInput as FileInput3 } from "@mantine/core";
|
2275
2655
|
import { useForm as useForm13 } from "@mantine/form";
|
2276
|
-
import { jsx as
|
2656
|
+
import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
2277
2657
|
function F_core40207_Create({ GuidelineTypeId }) {
|
2278
2658
|
const form = useForm13({
|
2279
2659
|
mode: "uncontrolled",
|
@@ -2283,7 +2663,7 @@ function F_core40207_Create({ GuidelineTypeId }) {
|
|
2283
2663
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
2284
2664
|
}
|
2285
2665
|
});
|
2286
|
-
return /* @__PURE__ */
|
2666
|
+
return /* @__PURE__ */ jsxs29(
|
2287
2667
|
MyButtonCreate,
|
2288
2668
|
{
|
2289
2669
|
objectName: "v\u0103n b\u1EA3n",
|
@@ -2296,21 +2676,21 @@ function F_core40207_Create({ GuidelineTypeId }) {
|
|
2296
2676
|
}));
|
2297
2677
|
},
|
2298
2678
|
children: [
|
2299
|
-
/* @__PURE__ */
|
2300
|
-
|
2679
|
+
/* @__PURE__ */ jsx41(
|
2680
|
+
MyTextInput,
|
2301
2681
|
__spreadValues({
|
2302
2682
|
withAsterisk: true,
|
2303
2683
|
label: "M\xE3 t\xE0i li\u1EC7u"
|
2304
2684
|
}, form.getInputProps("code"))
|
2305
2685
|
),
|
2306
|
-
/* @__PURE__ */
|
2307
|
-
|
2686
|
+
/* @__PURE__ */ jsx41(
|
2687
|
+
MyTextInput,
|
2308
2688
|
__spreadValues({
|
2309
2689
|
withAsterisk: true,
|
2310
2690
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
2311
2691
|
}, form.getInputProps("name"))
|
2312
2692
|
),
|
2313
|
-
/* @__PURE__ */
|
2693
|
+
/* @__PURE__ */ jsx41(
|
2314
2694
|
FileInput3,
|
2315
2695
|
__spreadValues({
|
2316
2696
|
withAsterisk: true,
|
@@ -2324,12 +2704,12 @@ function F_core40207_Create({ GuidelineTypeId }) {
|
|
2324
2704
|
}
|
2325
2705
|
|
2326
2706
|
// src/modules-features/admin/core/core40207/F_core40207_Delete.tsx
|
2327
|
-
import { jsx as
|
2707
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
2328
2708
|
function F_core40207_Delete({
|
2329
2709
|
id,
|
2330
2710
|
contextData
|
2331
2711
|
}) {
|
2332
|
-
return /* @__PURE__ */
|
2712
|
+
return /* @__PURE__ */ jsx42(
|
2333
2713
|
MyActionIconDelete,
|
2334
2714
|
{
|
2335
2715
|
contextData,
|
@@ -2341,7 +2721,7 @@ function F_core40207_Delete({
|
|
2341
2721
|
// src/modules-features/admin/core/core40207/F_core40207_Update.tsx
|
2342
2722
|
import { FileInput as FileInput4 } from "@mantine/core";
|
2343
2723
|
import { useForm as useForm14 } from "@mantine/form";
|
2344
|
-
import { jsx as
|
2724
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
2345
2725
|
function F_core40207_Update({ values }) {
|
2346
2726
|
var _a;
|
2347
2727
|
const form = useForm14({
|
@@ -2358,7 +2738,7 @@ function F_core40207_Update({ values }) {
|
|
2358
2738
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
2359
2739
|
}
|
2360
2740
|
});
|
2361
|
-
return /* @__PURE__ */
|
2741
|
+
return /* @__PURE__ */ jsxs30(
|
2362
2742
|
MyActionIconUpdate,
|
2363
2743
|
{
|
2364
2744
|
form,
|
@@ -2368,21 +2748,21 @@ function F_core40207_Update({ values }) {
|
|
2368
2748
|
}));
|
2369
2749
|
},
|
2370
2750
|
children: [
|
2371
|
-
/* @__PURE__ */
|
2372
|
-
|
2751
|
+
/* @__PURE__ */ jsx43(
|
2752
|
+
MyTextInput,
|
2373
2753
|
__spreadValues({
|
2374
2754
|
withAsterisk: true,
|
2375
2755
|
label: "M\xE3 t\xE0i li\u1EC7u"
|
2376
2756
|
}, form.getInputProps("code"))
|
2377
2757
|
),
|
2378
|
-
/* @__PURE__ */
|
2379
|
-
|
2758
|
+
/* @__PURE__ */ jsx43(
|
2759
|
+
MyTextInput,
|
2380
2760
|
__spreadValues({
|
2381
2761
|
withAsterisk: true,
|
2382
2762
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
2383
2763
|
}, form.getInputProps("name"))
|
2384
2764
|
),
|
2385
|
-
/* @__PURE__ */
|
2765
|
+
/* @__PURE__ */ jsx43(
|
2386
2766
|
FileInput4,
|
2387
2767
|
__spreadValues({
|
2388
2768
|
withAsterisk: true,
|
@@ -2396,9 +2776,9 @@ function F_core40207_Update({ values }) {
|
|
2396
2776
|
}
|
2397
2777
|
|
2398
2778
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
2399
|
-
import { jsx as
|
2779
|
+
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
2400
2780
|
function F_core40207_Read({ GuidelineTypeId }) {
|
2401
|
-
const query =
|
2781
|
+
const query = useQuery12({
|
2402
2782
|
queryKey: ["F_core40207_Read"],
|
2403
2783
|
queryFn: async () => {
|
2404
2784
|
var _a;
|
@@ -2408,7 +2788,7 @@ function F_core40207_Read({ GuidelineTypeId }) {
|
|
2408
2788
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
2409
2789
|
}
|
2410
2790
|
});
|
2411
|
-
const columns =
|
2791
|
+
const columns = useMemo10(
|
2412
2792
|
() => [
|
2413
2793
|
{
|
2414
2794
|
header: "M\xE3 t\xE0i li\u1EC7u",
|
@@ -2421,24 +2801,24 @@ function F_core40207_Read({ GuidelineTypeId }) {
|
|
2421
2801
|
{
|
2422
2802
|
header: "File",
|
2423
2803
|
accessorFn: (row) => {
|
2424
|
-
return /* @__PURE__ */
|
2804
|
+
return /* @__PURE__ */ jsx44(MyCenterFull, { children: /* @__PURE__ */ jsx44(MyButtonViewPDF, { id: row.id }) });
|
2425
2805
|
}
|
2426
2806
|
}
|
2427
2807
|
],
|
2428
2808
|
[]
|
2429
2809
|
);
|
2430
|
-
return /* @__PURE__ */
|
2810
|
+
return /* @__PURE__ */ jsx44(
|
2431
2811
|
MyDataTable,
|
2432
2812
|
{
|
2433
2813
|
isLoading: query.isLoading,
|
2434
2814
|
isError: query.isError,
|
2435
2815
|
columns,
|
2436
2816
|
data: query.data || [],
|
2437
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
2817
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx44(F_core40207_Create, { GuidelineTypeId }),
|
2438
2818
|
renderRowActions: ({ row }) => {
|
2439
|
-
return /* @__PURE__ */
|
2440
|
-
/* @__PURE__ */
|
2441
|
-
/* @__PURE__ */
|
2819
|
+
return /* @__PURE__ */ jsxs31(MyCenterFull, { children: [
|
2820
|
+
/* @__PURE__ */ jsx44(F_core40207_Update, { values: row.original }),
|
2821
|
+
/* @__PURE__ */ jsx44(
|
2442
2822
|
F_core40207_Delete,
|
2443
2823
|
{
|
2444
2824
|
id: row.original.id,
|
@@ -2452,21 +2832,21 @@ function F_core40207_Read({ GuidelineTypeId }) {
|
|
2452
2832
|
}
|
2453
2833
|
|
2454
2834
|
// src/modules-features/admin/core/core40207/F_core40207.tsx
|
2455
|
-
import { jsx as
|
2835
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
2456
2836
|
function F_core40207({ GuidelineTypeId }) {
|
2457
|
-
return /* @__PURE__ */
|
2837
|
+
return /* @__PURE__ */ jsx45(F_core40207_Read, { GuidelineTypeId });
|
2458
2838
|
}
|
2459
2839
|
|
2460
2840
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
2461
2841
|
import { Group as Group3 } from "@mantine/core";
|
2462
|
-
import { useQuery as
|
2463
|
-
import { useMemo as
|
2842
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
2843
|
+
import { useMemo as useMemo11 } from "react";
|
2464
2844
|
|
2465
2845
|
// src/modules-features/admin/core/core47643/F_core47643_Delete.tsx
|
2466
|
-
import { jsx as
|
2846
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
2467
2847
|
var ENDPOINT3 = "/Role/Delete";
|
2468
2848
|
function F_core47643_Delete({ values }) {
|
2469
|
-
return /* @__PURE__ */
|
2849
|
+
return /* @__PURE__ */ jsx46(
|
2470
2850
|
MyActionIconDelete,
|
2471
2851
|
{
|
2472
2852
|
contextData: values.code,
|
@@ -2477,31 +2857,31 @@ function F_core47643_Delete({ values }) {
|
|
2477
2857
|
|
2478
2858
|
// src/modules-features/admin/core/core47643/F_core47643_Form.tsx
|
2479
2859
|
import { useForm as useForm15 } from "@mantine/form";
|
2480
|
-
import { jsx as
|
2860
|
+
import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
|
2481
2861
|
function F_core47643_Form({ values }) {
|
2482
2862
|
const form = useForm15({
|
2483
2863
|
mode: "uncontrolled",
|
2484
2864
|
initialValues: values
|
2485
2865
|
});
|
2486
|
-
if (values) return /* @__PURE__ */
|
2866
|
+
if (values) return /* @__PURE__ */ jsxs32(MyActionIconUpdate, { form, onSubmit: async () => {
|
2487
2867
|
return await baseAxios_default.post("/Role/Update", form.getValues());
|
2488
2868
|
}, children: [
|
2489
|
-
/* @__PURE__ */
|
2490
|
-
/* @__PURE__ */
|
2869
|
+
/* @__PURE__ */ jsx47(MyTextInput, __spreadValues({ readOnly: true, variant: "filled", label: "M\xE3" }, form.getInputProps("code"))),
|
2870
|
+
/* @__PURE__ */ jsx47(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
2491
2871
|
] });
|
2492
|
-
return /* @__PURE__ */
|
2872
|
+
return /* @__PURE__ */ jsxs32(MyButtonCreate, { form, onSubmit: async () => {
|
2493
2873
|
return await baseAxios_default.post("/Role/Create", form.getValues());
|
2494
2874
|
}, children: [
|
2495
|
-
/* @__PURE__ */
|
2496
|
-
/* @__PURE__ */
|
2875
|
+
/* @__PURE__ */ jsx47(MyTextInput, __spreadValues({ label: "M\xE3" }, form.getInputProps("code"))),
|
2876
|
+
/* @__PURE__ */ jsx47(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
2497
2877
|
] });
|
2498
2878
|
}
|
2499
2879
|
|
2500
2880
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
2501
|
-
import { jsx as
|
2881
|
+
import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
|
2502
2882
|
function F_core47643_Read() {
|
2503
2883
|
const query = useQ_core47643_GetAdminRole();
|
2504
|
-
const columns =
|
2884
|
+
const columns = useMemo11(() => [
|
2505
2885
|
{
|
2506
2886
|
header: "M\xE3",
|
2507
2887
|
accessorKey: "code"
|
@@ -2513,21 +2893,21 @@ function F_core47643_Read() {
|
|
2513
2893
|
], []);
|
2514
2894
|
if (query.isLoading) return "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...";
|
2515
2895
|
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
2516
|
-
return /* @__PURE__ */
|
2896
|
+
return /* @__PURE__ */ jsx48(
|
2517
2897
|
MyDataTable,
|
2518
2898
|
{
|
2519
2899
|
data: query.data,
|
2520
2900
|
columns,
|
2521
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
2522
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
2523
|
-
/* @__PURE__ */
|
2524
|
-
/* @__PURE__ */
|
2901
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx48(Group3, { children: /* @__PURE__ */ jsx48(F_core47643_Form, {}) }),
|
2902
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs33(MyCenterFull, { children: [
|
2903
|
+
/* @__PURE__ */ jsx48(F_core47643_Form, { values: row.original }),
|
2904
|
+
/* @__PURE__ */ jsx48(F_core47643_Delete, { values: row.original })
|
2525
2905
|
] })
|
2526
2906
|
}
|
2527
2907
|
);
|
2528
2908
|
}
|
2529
2909
|
function useQ_core47643_GetAdminRole() {
|
2530
|
-
const query =
|
2910
|
+
const query = useQuery13({
|
2531
2911
|
queryKey: ["useQ_core47643_GetAdminRole"],
|
2532
2912
|
queryFn: async () => {
|
2533
2913
|
const res = await baseAxios_default.get("/Role/GetAdminRole");
|
@@ -2538,19 +2918,19 @@ function useQ_core47643_GetAdminRole() {
|
|
2538
2918
|
}
|
2539
2919
|
|
2540
2920
|
// src/modules-features/admin/core/core47643/F_core47643.tsx
|
2541
|
-
import { jsx as
|
2921
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
2542
2922
|
function F_core47643() {
|
2543
|
-
return /* @__PURE__ */
|
2923
|
+
return /* @__PURE__ */ jsx49(MyPageContent, { title: "Danh m\u1EE5c quy\u1EC1n", canBack: true, children: /* @__PURE__ */ jsx49(F_core47643_Read, {}) });
|
2544
2924
|
}
|
2545
2925
|
|
2546
2926
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
2547
|
-
import { useQuery as
|
2548
|
-
import { useMemo as
|
2927
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
2928
|
+
import { useMemo as useMemo12 } from "react";
|
2549
2929
|
|
2550
2930
|
// src/modules-features/admin/core/core64229/F_core64229_Delete.tsx
|
2551
|
-
import { jsx as
|
2931
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
2552
2932
|
function F_core64229_Delete({ values }) {
|
2553
|
-
return /* @__PURE__ */
|
2933
|
+
return /* @__PURE__ */ jsx50(
|
2554
2934
|
MyActionIconDelete,
|
2555
2935
|
{
|
2556
2936
|
contextData: values == null ? void 0 : values.code,
|
@@ -2566,7 +2946,7 @@ function F_core64229_Delete({ values }) {
|
|
2566
2946
|
// src/modules-features/admin/core/core64229/F_core64229_Form.tsx
|
2567
2947
|
import { PasswordInput } from "@mantine/core";
|
2568
2948
|
import { useForm as useForm16 } from "@mantine/form";
|
2569
|
-
import { jsx as
|
2949
|
+
import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
|
2570
2950
|
function F_core64229_Form({ values, emailModule }) {
|
2571
2951
|
const form = useForm16({
|
2572
2952
|
mode: "uncontrolled",
|
@@ -2592,27 +2972,27 @@ function F_core64229_Form({ values, emailModule }) {
|
|
2592
2972
|
"password": formValues.password
|
2593
2973
|
});
|
2594
2974
|
}
|
2595
|
-
if (values) return /* @__PURE__ */
|
2975
|
+
if (values) return /* @__PURE__ */ jsx51(
|
2596
2976
|
MyActionIconUpdate,
|
2597
2977
|
{
|
2598
2978
|
form,
|
2599
2979
|
onSubmit: handleSubmit,
|
2600
|
-
children: /* @__PURE__ */
|
2980
|
+
children: /* @__PURE__ */ jsx51(FormInput, { form, emailModule })
|
2601
2981
|
}
|
2602
2982
|
);
|
2603
|
-
return /* @__PURE__ */
|
2983
|
+
return /* @__PURE__ */ jsx51(
|
2604
2984
|
MyButtonCreate,
|
2605
2985
|
{
|
2606
2986
|
form,
|
2607
2987
|
onSubmit: handleSubmit,
|
2608
|
-
children: /* @__PURE__ */
|
2988
|
+
children: /* @__PURE__ */ jsx51(FormInput, { form, emailModule })
|
2609
2989
|
}
|
2610
2990
|
);
|
2611
2991
|
}
|
2612
2992
|
function FormInput({ form, emailModule }) {
|
2613
2993
|
var _a, _b;
|
2614
|
-
return /* @__PURE__ */
|
2615
|
-
/* @__PURE__ */
|
2994
|
+
return /* @__PURE__ */ jsxs34(MyFlexColumn, { children: [
|
2995
|
+
/* @__PURE__ */ jsx51(
|
2616
2996
|
MySelect,
|
2617
2997
|
__spreadProps(__spreadValues({
|
2618
2998
|
label: "Ph\xE2n h\u1EC7",
|
@@ -2621,25 +3001,25 @@ function FormInput({ form, emailModule }) {
|
|
2621
3001
|
value: (_a = form.getValues().emailModule) == null ? void 0 : _a.toString()
|
2622
3002
|
})
|
2623
3003
|
),
|
2624
|
-
/* @__PURE__ */
|
2625
|
-
|
3004
|
+
/* @__PURE__ */ jsx51(
|
3005
|
+
MyTextInput,
|
2626
3006
|
__spreadValues({
|
2627
3007
|
label: "Host mail server"
|
2628
3008
|
}, form.getInputProps("hostMailServer"))
|
2629
3009
|
),
|
2630
|
-
/* @__PURE__ */
|
3010
|
+
/* @__PURE__ */ jsx51(
|
2631
3011
|
MyNumberInput,
|
2632
3012
|
__spreadValues({
|
2633
3013
|
label: "Outgoing port"
|
2634
3014
|
}, form.getInputProps("outgoingPort"))
|
2635
3015
|
),
|
2636
|
-
/* @__PURE__ */
|
3016
|
+
/* @__PURE__ */ jsx51(
|
2637
3017
|
MyNumberInput,
|
2638
3018
|
__spreadValues({
|
2639
3019
|
label: "Incoming port"
|
2640
3020
|
}, form.getInputProps("incomingPort"))
|
2641
3021
|
),
|
2642
|
-
/* @__PURE__ */
|
3022
|
+
/* @__PURE__ */ jsx51(
|
2643
3023
|
MySelect,
|
2644
3024
|
{
|
2645
3025
|
label: "SSL",
|
@@ -2648,13 +3028,13 @@ function FormInput({ form, emailModule }) {
|
|
2648
3028
|
onChange: (e) => form.setFieldValue("sll", e == "true" ? true : false)
|
2649
3029
|
}
|
2650
3030
|
),
|
2651
|
-
/* @__PURE__ */
|
2652
|
-
|
3031
|
+
/* @__PURE__ */ jsx51(
|
3032
|
+
MyTextInput,
|
2653
3033
|
__spreadValues({
|
2654
3034
|
label: "Username"
|
2655
3035
|
}, form.getInputProps("userName"))
|
2656
3036
|
),
|
2657
|
-
/* @__PURE__ */
|
3037
|
+
/* @__PURE__ */ jsx51(
|
2658
3038
|
PasswordInput,
|
2659
3039
|
__spreadValues({
|
2660
3040
|
label: "Password",
|
@@ -2665,16 +3045,16 @@ function FormInput({ form, emailModule }) {
|
|
2665
3045
|
}
|
2666
3046
|
|
2667
3047
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
2668
|
-
import { jsx as
|
3048
|
+
import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
|
2669
3049
|
function F_core64229_Read({ emailModule }) {
|
2670
|
-
const query =
|
3050
|
+
const query = useQuery14({
|
2671
3051
|
queryKey: ["F_core64229_Read"],
|
2672
3052
|
queryFn: async () => {
|
2673
3053
|
const res = await baseAxios_default.get("/EmailConfig/GetAll");
|
2674
3054
|
return res.data.data;
|
2675
3055
|
}
|
2676
3056
|
});
|
2677
|
-
const columns =
|
3057
|
+
const columns = useMemo12(() => [
|
2678
3058
|
{
|
2679
3059
|
header: "Ph\xE2n h\u1EC7",
|
2680
3060
|
accessorFn: (row) => {
|
@@ -2710,34 +3090,34 @@ function F_core64229_Read({ emailModule }) {
|
|
2710
3090
|
}
|
2711
3091
|
], []);
|
2712
3092
|
if (query.isLoading) return "\u0110ang t\u1EA3i";
|
2713
|
-
return /* @__PURE__ */
|
3093
|
+
return /* @__PURE__ */ jsx52(
|
2714
3094
|
MyDataTable,
|
2715
3095
|
{
|
2716
3096
|
columns,
|
2717
3097
|
data: query.data,
|
2718
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
2719
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
2720
|
-
/* @__PURE__ */
|
2721
|
-
/* @__PURE__ */
|
3098
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx52(F_core64229_Form, { emailModule }),
|
3099
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs35(MyCenterFull, { children: [
|
3100
|
+
/* @__PURE__ */ jsx52(F_core64229_Form, { values: row.original, emailModule }),
|
3101
|
+
/* @__PURE__ */ jsx52(F_core64229_Delete, { values: row.original })
|
2722
3102
|
] })
|
2723
3103
|
}
|
2724
3104
|
);
|
2725
3105
|
}
|
2726
3106
|
|
2727
3107
|
// src/modules-features/admin/core/core64229/F_core64229.tsx
|
2728
|
-
import { jsx as
|
3108
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
2729
3109
|
function F_core64229() {
|
2730
|
-
return /* @__PURE__ */
|
3110
|
+
return /* @__PURE__ */ jsx53(F_core64229_Read, { emailModule: utils_converter_enumToSelectOptions(enum_emailConfigModule) });
|
2731
3111
|
}
|
2732
3112
|
|
2733
3113
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
2734
|
-
import { useQuery as
|
2735
|
-
import { useMemo as
|
3114
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
3115
|
+
import { useMemo as useMemo13 } from "react";
|
2736
3116
|
|
2737
3117
|
// src/modules-features/admin/core/core76318/F_core76318_Create.tsx
|
2738
3118
|
import { FileInput as FileInput5 } from "@mantine/core";
|
2739
3119
|
import { useForm as useForm17 } from "@mantine/form";
|
2740
|
-
import { jsx as
|
3120
|
+
import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
|
2741
3121
|
function F_core76318_Create({ SecurityTypeId }) {
|
2742
3122
|
const form = useForm17({
|
2743
3123
|
mode: "uncontrolled",
|
@@ -2748,7 +3128,7 @@ function F_core76318_Create({ SecurityTypeId }) {
|
|
2748
3128
|
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
2749
3129
|
}
|
2750
3130
|
});
|
2751
|
-
return /* @__PURE__ */
|
3131
|
+
return /* @__PURE__ */ jsxs36(
|
2752
3132
|
MyButtonCreate,
|
2753
3133
|
{
|
2754
3134
|
objectName: "v\u0103n b\u1EA3n",
|
@@ -2761,28 +3141,28 @@ function F_core76318_Create({ SecurityTypeId }) {
|
|
2761
3141
|
}));
|
2762
3142
|
},
|
2763
3143
|
children: [
|
2764
|
-
/* @__PURE__ */
|
2765
|
-
|
3144
|
+
/* @__PURE__ */ jsx54(
|
3145
|
+
MyTextInput,
|
2766
3146
|
__spreadValues({
|
2767
3147
|
withAsterisk: true,
|
2768
3148
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
2769
3149
|
}, form.getInputProps("decisionCode"))
|
2770
3150
|
),
|
2771
|
-
/* @__PURE__ */
|
3151
|
+
/* @__PURE__ */ jsx54(
|
2772
3152
|
MyDateInput,
|
2773
3153
|
__spreadValues({
|
2774
3154
|
withAsterisk: true,
|
2775
3155
|
label: "Ng\xE0y ban h\xE0nh"
|
2776
3156
|
}, form.getInputProps("promulgateDate"))
|
2777
3157
|
),
|
2778
|
-
/* @__PURE__ */
|
2779
|
-
|
3158
|
+
/* @__PURE__ */ jsx54(
|
3159
|
+
MyTextInput,
|
2780
3160
|
__spreadValues({
|
2781
3161
|
withAsterisk: true,
|
2782
3162
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
2783
3163
|
}, form.getInputProps("name"))
|
2784
3164
|
),
|
2785
|
-
/* @__PURE__ */
|
3165
|
+
/* @__PURE__ */ jsx54(
|
2786
3166
|
FileInput5,
|
2787
3167
|
__spreadValues({
|
2788
3168
|
withAsterisk: true,
|
@@ -2796,12 +3176,12 @@ function F_core76318_Create({ SecurityTypeId }) {
|
|
2796
3176
|
}
|
2797
3177
|
|
2798
3178
|
// src/modules-features/admin/core/core76318/F_core76318_Delete.tsx
|
2799
|
-
import { jsx as
|
3179
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
2800
3180
|
function F_core76318_Delete({
|
2801
3181
|
id,
|
2802
3182
|
contextData
|
2803
3183
|
}) {
|
2804
|
-
return /* @__PURE__ */
|
3184
|
+
return /* @__PURE__ */ jsx55(
|
2805
3185
|
MyActionIconDelete,
|
2806
3186
|
{
|
2807
3187
|
contextData,
|
@@ -2813,7 +3193,7 @@ function F_core76318_Delete({
|
|
2813
3193
|
// src/modules-features/admin/core/core76318/F_core76318_Update.tsx
|
2814
3194
|
import { FileInput as FileInput6, TextInput } from "@mantine/core";
|
2815
3195
|
import { useForm as useForm18 } from "@mantine/form";
|
2816
|
-
import { jsx as
|
3196
|
+
import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
|
2817
3197
|
function F_core76318_Update({ values }) {
|
2818
3198
|
var _a;
|
2819
3199
|
const form = useForm18({
|
@@ -2825,498 +3205,121 @@ function F_core76318_Update({ values }) {
|
|
2825
3205
|
),
|
2826
3206
|
promulgateDate: new Date(values.promulgateDate)
|
2827
3207
|
}),
|
2828
|
-
validate: {
|
2829
|
-
decisionCode: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
2830
|
-
promulgateDate: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
2831
|
-
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
2832
|
-
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
2833
|
-
}
|
2834
|
-
});
|
2835
|
-
return /* @__PURE__ */ jsxs35(
|
2836
|
-
MyActionIconUpdate,
|
2837
|
-
{
|
2838
|
-
form,
|
2839
|
-
onSubmit: async (values2) => {
|
2840
|
-
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
2841
|
-
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
2842
|
-
}));
|
2843
|
-
},
|
2844
|
-
children: [
|
2845
|
-
/* @__PURE__ */ jsx52(
|
2846
|
-
TextInput,
|
2847
|
-
__spreadValues({
|
2848
|
-
withAsterisk: true,
|
2849
|
-
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
2850
|
-
}, form.getInputProps("decisionCode"))
|
2851
|
-
),
|
2852
|
-
/* @__PURE__ */ jsx52(
|
2853
|
-
MyDateInput,
|
2854
|
-
__spreadValues({
|
2855
|
-
withAsterisk: true,
|
2856
|
-
label: "Ng\xE0y ban h\xE0nh"
|
2857
|
-
}, form.getInputProps("promulgateDate"))
|
2858
|
-
),
|
2859
|
-
/* @__PURE__ */ jsx52(
|
2860
|
-
TextInput,
|
2861
|
-
__spreadValues({
|
2862
|
-
withAsterisk: true,
|
2863
|
-
label: "T\xEAn t\xE0i li\u1EC7u"
|
2864
|
-
}, form.getInputProps("name"))
|
2865
|
-
),
|
2866
|
-
/* @__PURE__ */ jsx52(
|
2867
|
-
FileInput6,
|
2868
|
-
__spreadValues({
|
2869
|
-
withAsterisk: true,
|
2870
|
-
label: "Ch\u1ECDn file"
|
2871
|
-
}, form.getInputProps("file"))
|
2872
|
-
)
|
2873
|
-
]
|
2874
|
-
}
|
2875
|
-
);
|
2876
|
-
}
|
2877
|
-
|
2878
|
-
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
2879
|
-
import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
|
2880
|
-
function F_core76318_Read({ SecurityTypeId }) {
|
2881
|
-
const query = useQuery13({
|
2882
|
-
queryKey: ["F_core76318_Read"],
|
2883
|
-
queryFn: async () => {
|
2884
|
-
var _a;
|
2885
|
-
const result = await baseAxios_default.get(
|
2886
|
-
`/Document/GetByType?documentType=${SecurityTypeId}`
|
2887
|
-
);
|
2888
|
-
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
2889
|
-
}
|
2890
|
-
});
|
2891
|
-
const columns = useMemo12(
|
2892
|
-
() => [
|
2893
|
-
{
|
2894
|
-
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
2895
|
-
accessorKey: "decisionCode"
|
2896
|
-
},
|
2897
|
-
{
|
2898
|
-
header: "Ng\xE0y ban h\xE0nh",
|
2899
|
-
accessorFn: (row) => U0DateToDDMMYYYString(new Date(row.promulgateDate))
|
2900
|
-
},
|
2901
|
-
{
|
2902
|
-
header: "T\xEAn t\xE0i li\u1EC7u",
|
2903
|
-
accessorKey: "name"
|
2904
|
-
},
|
2905
|
-
{
|
2906
|
-
header: "File",
|
2907
|
-
accessorFn: (row) => {
|
2908
|
-
return /* @__PURE__ */ jsx53(MyCenterFull, { children: /* @__PURE__ */ jsx53(MyButtonViewPDF, { id: row.id }) });
|
2909
|
-
}
|
2910
|
-
}
|
2911
|
-
],
|
2912
|
-
[]
|
2913
|
-
);
|
2914
|
-
return /* @__PURE__ */ jsx53(
|
2915
|
-
MyDataTable,
|
2916
|
-
{
|
2917
|
-
isLoading: query.isLoading,
|
2918
|
-
isError: query.isError,
|
2919
|
-
columns,
|
2920
|
-
data: query.data || [],
|
2921
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx53(F_core76318_Create, { SecurityTypeId }),
|
2922
|
-
renderRowActions: ({ row }) => {
|
2923
|
-
var _a;
|
2924
|
-
return /* @__PURE__ */ jsxs36(MyCenterFull, { children: [
|
2925
|
-
/* @__PURE__ */ jsx53(F_core76318_Update, { values: row.original }),
|
2926
|
-
/* @__PURE__ */ jsx53(
|
2927
|
-
F_core76318_Delete,
|
2928
|
-
{
|
2929
|
-
id: row.original.id,
|
2930
|
-
contextData: (_a = row.original.decisionCode) == null ? void 0 : _a.toString()
|
2931
|
-
}
|
2932
|
-
)
|
2933
|
-
] });
|
2934
|
-
}
|
2935
|
-
}
|
2936
|
-
);
|
2937
|
-
}
|
2938
|
-
|
2939
|
-
// src/modules-features/admin/core/core76318/F_core76318.tsx
|
2940
|
-
import { jsx as jsx54 } from "react/jsx-runtime";
|
2941
|
-
function F_core76318({ SecurityTypeId }) {
|
2942
|
-
return /* @__PURE__ */ jsx54(F_core76318_Read, { SecurityTypeId });
|
2943
|
-
}
|
2944
|
-
|
2945
|
-
// src/modules-features/admin/core/core83092/F_core83092.tsx
|
2946
|
-
import { Grid as Grid3, Paper as Paper5, ScrollArea as ScrollArea4 } from "@mantine/core";
|
2947
|
-
|
2948
|
-
// src/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx
|
2949
|
-
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
2950
|
-
import { useEffect as useEffect6, useMemo as useMemo13, useState as useState7 } from "react";
|
2951
|
-
import { jsx as jsx55 } from "react/jsx-runtime";
|
2952
|
-
function F_core83092_ReadUser() {
|
2953
|
-
const store = useS_core83092();
|
2954
|
-
const query = useQ_core83092_Account_GetAdminAccount();
|
2955
|
-
const [rowSelection, setRowSelection] = useState7({});
|
2956
|
-
const columns = useMemo13(
|
2957
|
-
() => [
|
2958
|
-
{
|
2959
|
-
header: "H\u1ECD v\xE0 t\xEAn",
|
2960
|
-
accessorKey: "fullName"
|
2961
|
-
},
|
2962
|
-
{
|
2963
|
-
header: "Email",
|
2964
|
-
accessorKey: "email"
|
2965
|
-
}
|
2966
|
-
],
|
2967
|
-
[]
|
2968
|
-
);
|
2969
|
-
const handleRowClick = (rowId) => {
|
2970
|
-
setRowSelection({ [rowId]: true });
|
2971
|
-
store.setProperty("roleId", parseInt(rowId));
|
2972
|
-
};
|
2973
|
-
useEffect6(() => {
|
2974
|
-
if (store.state.roleId == 0) return;
|
2975
|
-
setRowSelection({ [store.state.roleId]: true });
|
2976
|
-
}, [store.state.roleId]);
|
2977
|
-
useEffect6(() => {
|
2978
|
-
if (!query.data) return;
|
2979
|
-
store.setProperty("roleId", query.data[0].id);
|
2980
|
-
}, [query.data]);
|
2981
|
-
if (query.isLoading) return "Loading...";
|
2982
|
-
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
2983
|
-
return /* @__PURE__ */ jsx55(
|
2984
|
-
MyDataTable,
|
2985
|
-
{
|
2986
|
-
columns,
|
2987
|
-
data: query.data,
|
2988
|
-
getRowId: (row) => {
|
2989
|
-
var _a;
|
2990
|
-
return (_a = row.id) == null ? void 0 : _a.toString();
|
2991
|
-
},
|
2992
|
-
mantineTableBodyRowProps: ({ row }) => ({
|
2993
|
-
onClick: () => handleRowClick(row.id),
|
2994
|
-
style: {
|
2995
|
-
cursor: "pointer",
|
2996
|
-
backgroundColor: rowSelection[row.id] ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
2997
|
-
}
|
2998
|
-
}),
|
2999
|
-
state: rowSelection
|
3000
|
-
}
|
3001
|
-
);
|
3002
|
-
}
|
3003
|
-
function useQ_core83092_Account_GetAdminAccount() {
|
3004
|
-
const query = useQuery14({
|
3005
|
-
queryKey: ["useQ_core83092_Account_GetAdminAccount"],
|
3006
|
-
queryFn: async () => {
|
3007
|
-
var _a;
|
3008
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") return mockUserData2;
|
3009
|
-
const result = await baseAxios_default.get(`/Account/GetAdminAccount`, { params: { page: 5, pageNumber: 1 } });
|
3010
|
-
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
3011
|
-
},
|
3012
|
-
refetchOnWindowFocus: false
|
3013
|
-
});
|
3014
|
-
return query;
|
3015
|
-
}
|
3016
|
-
var mockUserData2 = [
|
3017
|
-
{
|
3018
|
-
userName: "nguyenvana",
|
3019
|
-
fullName: "Nguy\u1EC5n V\u0103n A",
|
3020
|
-
email: "vana@example.com"
|
3021
|
-
},
|
3022
|
-
{
|
3023
|
-
userName: "tranthib",
|
3024
|
-
fullName: "Tr\u1EA7n Th\u1ECB B",
|
3025
|
-
email: "thib@example.com"
|
3026
|
-
},
|
3027
|
-
{
|
3028
|
-
userName: "leminhc",
|
3029
|
-
fullName: "L\xEA Minh C",
|
3030
|
-
email: "minhc@example.com"
|
3031
|
-
},
|
3032
|
-
{
|
3033
|
-
userName: "phamthid",
|
3034
|
-
fullName: "Ph\u1EA1m Th\u1ECB D",
|
3035
|
-
email: "thid@example.com"
|
3036
|
-
},
|
3037
|
-
{
|
3038
|
-
userName: "doanvanh",
|
3039
|
-
fullName: "Do\xE3n V\u0103n H",
|
3040
|
-
email: "vanh@example.com"
|
3041
|
-
}
|
3042
|
-
];
|
3043
|
-
|
3044
|
-
// src/modules-features/admin/core/core83092/F_core83092_Save.tsx
|
3045
|
-
import { useMutation as useMutation3 } from "@tanstack/react-query";
|
3046
|
-
import { useEffect as useEffect7, useState as useState8 } from "react";
|
3047
|
-
import { jsx as jsx56 } from "react/jsx-runtime";
|
3048
|
-
function F_core83092_Save() {
|
3049
|
-
const store = useS_core83092();
|
3050
|
-
const disable = useState8(false);
|
3051
|
-
const mutation = useMutation3({
|
3052
|
-
mutationFn: async (body) => {
|
3053
|
-
const res = await baseAxios_default.put("/Role/UpdateUserPermission", body);
|
3054
|
-
return res;
|
3055
|
-
}
|
3056
|
-
});
|
3057
|
-
function handleSave() {
|
3058
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") {
|
3059
|
-
utils_notification_show({
|
3060
|
-
crudType: "update"
|
3061
|
-
});
|
3062
|
-
return;
|
3063
|
-
}
|
3064
|
-
mutation.mutate({
|
3065
|
-
pagePermissions: store.state.rolePermissions,
|
3066
|
-
userId: store.state.roleId
|
3067
|
-
}, {
|
3068
|
-
onSuccess: () => {
|
3069
|
-
utils_notification_show({
|
3070
|
-
crudType: "update"
|
3071
|
-
});
|
3072
|
-
}
|
3073
|
-
});
|
3074
|
-
}
|
3075
|
-
useEffect7(() => {
|
3076
|
-
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
3077
|
-
disable[1](true);
|
3078
|
-
return;
|
3208
|
+
validate: {
|
3209
|
+
decisionCode: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
3210
|
+
promulgateDate: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
3211
|
+
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
3212
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
3079
3213
|
}
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3083
|
-
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3092
|
-
|
3093
|
-
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
|
3105
|
-
|
3106
|
-
|
3107
|
-
|
3108
|
-
|
3109
|
-
|
3110
|
-
|
3111
|
-
|
3112
|
-
|
3113
|
-
|
3114
|
-
|
3115
|
-
|
3116
|
-
|
3117
|
-
|
3118
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: title2 }),
|
3119
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: /* @__PURE__ */ jsxs37(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
3120
|
-
/* @__PURE__ */ jsx57(Checkbox2, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
3121
|
-
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
3122
|
-
} }),
|
3123
|
-
/* @__PURE__ */ jsxs37(MyFlexRow, { gap: 3, children: [
|
3124
|
-
"Xem",
|
3125
|
-
/* @__PURE__ */ jsx57(IconEyeUp2, { color: "gray" })
|
3126
|
-
] })
|
3127
|
-
] }) }),
|
3128
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: /* @__PURE__ */ jsxs37(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
3129
|
-
/* @__PURE__ */ jsx57(Checkbox2, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
3130
|
-
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
3131
|
-
} }),
|
3132
|
-
/* @__PURE__ */ jsxs37(MyFlexRow, { gap: 3, children: [
|
3133
|
-
"Th\xEAm",
|
3134
|
-
/* @__PURE__ */ jsx57(IconPlus2, { color: "blue" })
|
3135
|
-
] })
|
3136
|
-
] }) }),
|
3137
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: /* @__PURE__ */ jsxs37(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
3138
|
-
/* @__PURE__ */ jsx57(Checkbox2, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
3139
|
-
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
3140
|
-
} }),
|
3141
|
-
/* @__PURE__ */ jsxs37(MyFlexRow, { gap: 3, children: [
|
3142
|
-
"S\u1EEDa",
|
3143
|
-
/* @__PURE__ */ jsx57(IconEdit2, { color: "var(--mantine-color-yellow-8)" })
|
3144
|
-
] })
|
3145
|
-
] }) }),
|
3146
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: /* @__PURE__ */ jsxs37(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
3147
|
-
/* @__PURE__ */ jsx57(Checkbox2, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
3148
|
-
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
3149
|
-
} }),
|
3150
|
-
/* @__PURE__ */ jsxs37(MyFlexRow, { gap: 3, children: [
|
3151
|
-
"X\xF3a",
|
3152
|
-
/* @__PURE__ */ jsx57(IconTrash2, { color: "var(--mantine-color-red-8)" })
|
3153
|
-
] })
|
3154
|
-
] }) }),
|
3155
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: /* @__PURE__ */ jsxs37(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
3156
|
-
/* @__PURE__ */ jsx57(Checkbox2, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
3157
|
-
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
3158
|
-
} }),
|
3159
|
-
/* @__PURE__ */ jsxs37(MyFlexRow, { gap: 3, children: [
|
3160
|
-
"In",
|
3161
|
-
/* @__PURE__ */ jsx57(IconPrinter2, { color: "var(--mantine-color-cyan-8)" })
|
3162
|
-
] })
|
3163
|
-
] }) }),
|
3164
|
-
/* @__PURE__ */ jsx57(Table3.Th, { children: /* @__PURE__ */ jsxs37(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
3165
|
-
/* @__PURE__ */ jsx57(Checkbox2, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
3166
|
-
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
3167
|
-
} }),
|
3168
|
-
/* @__PURE__ */ jsxs37(MyFlexRow, { gap: 3, children: [
|
3169
|
-
"Xu\u1EA5t",
|
3170
|
-
/* @__PURE__ */ jsx57(IconFileExport2, { color: "var(--mantine-color-green-8)" })
|
3171
|
-
] })
|
3172
|
-
] }) })
|
3173
|
-
] })
|
3174
|
-
}
|
3175
|
-
),
|
3176
|
-
/* @__PURE__ */ jsx57(Table3.Tbody, { bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))", children: (_b = list[0]) == null ? void 0 : _b.map((item, idx) => {
|
3177
|
-
if (item.links == void 0) return /* @__PURE__ */ jsxs37(Table3.Tr, { children: [
|
3178
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: item.label }),
|
3179
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(Checkbox2, {}) }) }),
|
3180
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(Checkbox2, {}) }) }),
|
3181
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(Checkbox2, {}) }) }),
|
3182
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(Checkbox2, {}) }) }),
|
3183
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(Checkbox2, {}) }) }),
|
3184
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(Checkbox2, {}) }) })
|
3185
|
-
] }, idx);
|
3186
|
-
return /* @__PURE__ */ jsxs37(React2.Fragment, { children: [
|
3187
|
-
/* @__PURE__ */ jsx57(Table3.Tr, { children: /* @__PURE__ */ jsx57(
|
3188
|
-
Table3.Td,
|
3189
|
-
{
|
3190
|
-
colSpan: 7,
|
3191
|
-
bg: const_object_colors.mantineBackgroundBlueLight,
|
3192
|
-
children: /* @__PURE__ */ jsx57(Text2, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
3193
|
-
}
|
3194
|
-
) }, item.label),
|
3195
|
-
item.links.map(
|
3196
|
-
(item2, idx2) => {
|
3197
|
-
var _a2, _b2, _c, _d, _e, _f;
|
3198
|
-
return /* @__PURE__ */ jsxs37(Table3.Tr, { children: [
|
3199
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: item2.label }),
|
3200
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(
|
3201
|
-
Checkbox2,
|
3202
|
-
{
|
3203
|
-
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
3204
|
-
onChange: (e) => {
|
3205
|
-
store.updatePermission(item2.pageId, {
|
3206
|
-
isRead: e.target.checked
|
3207
|
-
});
|
3208
|
-
}
|
3209
|
-
}
|
3210
|
-
) }) }),
|
3211
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(
|
3212
|
-
Checkbox2,
|
3213
|
-
{
|
3214
|
-
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
3215
|
-
onChange: (e) => {
|
3216
|
-
store.updatePermission(item2.pageId, {
|
3217
|
-
isCreate: e.target.checked
|
3218
|
-
});
|
3219
|
-
}
|
3220
|
-
}
|
3221
|
-
) }) }),
|
3222
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(
|
3223
|
-
Checkbox2,
|
3224
|
-
{
|
3225
|
-
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
3226
|
-
onChange: (e) => {
|
3227
|
-
store.updatePermission(item2.pageId, {
|
3228
|
-
isUpdate: e.target.checked
|
3229
|
-
});
|
3230
|
-
}
|
3231
|
-
}
|
3232
|
-
) }) }),
|
3233
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(
|
3234
|
-
Checkbox2,
|
3235
|
-
{
|
3236
|
-
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
3237
|
-
onChange: (e) => {
|
3238
|
-
store.updatePermission(item2.pageId, {
|
3239
|
-
isDelete: e.target.checked
|
3240
|
-
});
|
3241
|
-
}
|
3242
|
-
}
|
3243
|
-
) }) }),
|
3244
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(
|
3245
|
-
Checkbox2,
|
3246
|
-
{
|
3247
|
-
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
3248
|
-
onChange: (e) => {
|
3249
|
-
store.updatePermission(item2.pageId, {
|
3250
|
-
isPrint: e.target.checked
|
3251
|
-
});
|
3252
|
-
}
|
3253
|
-
}
|
3254
|
-
) }) }),
|
3255
|
-
/* @__PURE__ */ jsx57(Table3.Td, { children: /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(
|
3256
|
-
Checkbox2,
|
3257
|
-
{
|
3258
|
-
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
3259
|
-
onChange: (e) => {
|
3260
|
-
store.updatePermission(item2.pageId, {
|
3261
|
-
isExport: e.target.checked
|
3262
|
-
});
|
3263
|
-
}
|
3264
|
-
}
|
3265
|
-
) }) })
|
3266
|
-
] }, idx2);
|
3267
|
-
}
|
3214
|
+
});
|
3215
|
+
return /* @__PURE__ */ jsxs37(
|
3216
|
+
MyActionIconUpdate,
|
3217
|
+
{
|
3218
|
+
form,
|
3219
|
+
onSubmit: async (values2) => {
|
3220
|
+
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
3221
|
+
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
3222
|
+
}));
|
3223
|
+
},
|
3224
|
+
children: [
|
3225
|
+
/* @__PURE__ */ jsx56(
|
3226
|
+
TextInput,
|
3227
|
+
__spreadValues({
|
3228
|
+
withAsterisk: true,
|
3229
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
3230
|
+
}, form.getInputProps("decisionCode"))
|
3231
|
+
),
|
3232
|
+
/* @__PURE__ */ jsx56(
|
3233
|
+
MyDateInput,
|
3234
|
+
__spreadValues({
|
3235
|
+
withAsterisk: true,
|
3236
|
+
label: "Ng\xE0y ban h\xE0nh"
|
3237
|
+
}, form.getInputProps("promulgateDate"))
|
3238
|
+
),
|
3239
|
+
/* @__PURE__ */ jsx56(
|
3240
|
+
TextInput,
|
3241
|
+
__spreadValues({
|
3242
|
+
withAsterisk: true,
|
3243
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
3244
|
+
}, form.getInputProps("name"))
|
3245
|
+
),
|
3246
|
+
/* @__PURE__ */ jsx56(
|
3247
|
+
FileInput6,
|
3248
|
+
__spreadValues({
|
3249
|
+
withAsterisk: true,
|
3250
|
+
label: "Ch\u1ECDn file"
|
3251
|
+
}, form.getInputProps("file"))
|
3268
3252
|
)
|
3269
|
-
]
|
3270
|
-
}
|
3271
|
-
|
3253
|
+
]
|
3254
|
+
}
|
3255
|
+
);
|
3272
3256
|
}
|
3273
|
-
|
3274
|
-
|
3257
|
+
|
3258
|
+
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
3259
|
+
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
3260
|
+
function F_core76318_Read({ SecurityTypeId }) {
|
3275
3261
|
const query = useQuery15({
|
3276
|
-
queryKey: ["
|
3262
|
+
queryKey: ["F_core76318_Read"],
|
3277
3263
|
queryFn: async () => {
|
3278
|
-
|
3279
|
-
const
|
3280
|
-
|
3281
|
-
|
3282
|
-
|
3283
|
-
|
3284
|
-
isCreate: false,
|
3285
|
-
isUpdate: false,
|
3286
|
-
isDelete: false,
|
3287
|
-
isExport: false,
|
3288
|
-
isPrint: false
|
3289
|
-
}));
|
3290
|
-
return final.filter((item) => item.pageId != void 0);
|
3291
|
-
}
|
3292
|
-
const menuDataFromAPI = result.data.data;
|
3293
|
-
const mergedArray = utils_core83092_mergePage(menudataFinal, menuDataFromAPI).map((item) => ({
|
3294
|
-
pageId: item.pageId,
|
3295
|
-
isCreate: item.isCreate || false,
|
3296
|
-
isRead: item.isRead || false,
|
3297
|
-
isUpdate: item.isUpdate || false || false,
|
3298
|
-
isDelete: item.isDelete,
|
3299
|
-
isPrint: item.isPrint || false,
|
3300
|
-
isExport: item.isExport || false
|
3301
|
-
})).filter((item) => item.pageId != void 0);
|
3302
|
-
return mergedArray;
|
3303
|
-
},
|
3304
|
-
enabled: store.state.roleId != 0,
|
3305
|
-
refetchOnWindowFocus: false
|
3264
|
+
var _a;
|
3265
|
+
const result = await baseAxios_default.get(
|
3266
|
+
`/Document/GetByType?documentType=${SecurityTypeId}`
|
3267
|
+
);
|
3268
|
+
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
3269
|
+
}
|
3306
3270
|
});
|
3307
|
-
|
3271
|
+
const columns = useMemo13(
|
3272
|
+
() => [
|
3273
|
+
{
|
3274
|
+
header: "S\u1ED1 quy \u0111\u1ECBnh",
|
3275
|
+
accessorKey: "decisionCode"
|
3276
|
+
},
|
3277
|
+
{
|
3278
|
+
header: "Ng\xE0y ban h\xE0nh",
|
3279
|
+
accessorFn: (row) => U0DateToDDMMYYYString(new Date(row.promulgateDate))
|
3280
|
+
},
|
3281
|
+
{
|
3282
|
+
header: "T\xEAn t\xE0i li\u1EC7u",
|
3283
|
+
accessorKey: "name"
|
3284
|
+
},
|
3285
|
+
{
|
3286
|
+
header: "File",
|
3287
|
+
accessorFn: (row) => {
|
3288
|
+
return /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(MyButtonViewPDF, { id: row.id }) });
|
3289
|
+
}
|
3290
|
+
}
|
3291
|
+
],
|
3292
|
+
[]
|
3293
|
+
);
|
3294
|
+
return /* @__PURE__ */ jsx57(
|
3295
|
+
MyDataTable,
|
3296
|
+
{
|
3297
|
+
isLoading: query.isLoading,
|
3298
|
+
isError: query.isError,
|
3299
|
+
columns,
|
3300
|
+
data: query.data || [],
|
3301
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx57(F_core76318_Create, { SecurityTypeId }),
|
3302
|
+
renderRowActions: ({ row }) => {
|
3303
|
+
var _a;
|
3304
|
+
return /* @__PURE__ */ jsxs38(MyCenterFull, { children: [
|
3305
|
+
/* @__PURE__ */ jsx57(F_core76318_Update, { values: row.original }),
|
3306
|
+
/* @__PURE__ */ jsx57(
|
3307
|
+
F_core76318_Delete,
|
3308
|
+
{
|
3309
|
+
id: row.original.id,
|
3310
|
+
contextData: (_a = row.original.decisionCode) == null ? void 0 : _a.toString()
|
3311
|
+
}
|
3312
|
+
)
|
3313
|
+
] });
|
3314
|
+
}
|
3315
|
+
}
|
3316
|
+
);
|
3308
3317
|
}
|
3309
3318
|
|
3310
|
-
// src/modules-features/admin/core/
|
3311
|
-
import { jsx as jsx58
|
3312
|
-
function
|
3313
|
-
return /* @__PURE__ */
|
3314
|
-
/* @__PURE__ */ jsx58(Grid3.Col, { span: { base: 12, sm: 5 }, children: /* @__PURE__ */ jsx58(ScrollArea4.Autosize, { children: /* @__PURE__ */ jsx58(F_core83092_ReadUser, {}) }) }),
|
3315
|
-
/* @__PURE__ */ jsx58(Grid3.Col, { span: { base: 12, sm: 7 }, children: /* @__PURE__ */ jsxs38(MyFlexColumn, { h: "80vh", flex: 1, children: [
|
3316
|
-
/* @__PURE__ */ jsx58(ScrollArea4.Autosize, { h: "100%", children: /* @__PURE__ */ jsx58(Paper5, { p: "md", bg: const_object_colors.mantineBackgroundSecondary, children: /* @__PURE__ */ jsx58(F_core83092_ViewMenuPermissions, { menuData: menuData2 }) }) }),
|
3317
|
-
/* @__PURE__ */ jsx58(F_core83092_Save, {})
|
3318
|
-
] }) })
|
3319
|
-
] });
|
3319
|
+
// src/modules-features/admin/core/core76318/F_core76318.tsx
|
3320
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
3321
|
+
function F_core76318({ SecurityTypeId }) {
|
3322
|
+
return /* @__PURE__ */ jsx58(F_core76318_Read, { SecurityTypeId });
|
3320
3323
|
}
|
3321
3324
|
|
3322
3325
|
// src/modules-features/admin/core/formTemplateDocs/F_formTemplateDocs.tsx
|
@@ -3349,7 +3352,7 @@ function F_formTemplateDocs_Create({ FormTypeId }) {
|
|
3349
3352
|
},
|
3350
3353
|
children: [
|
3351
3354
|
/* @__PURE__ */ jsx59(
|
3352
|
-
|
3355
|
+
MyTextInput,
|
3353
3356
|
__spreadValues({
|
3354
3357
|
withAsterisk: true,
|
3355
3358
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -3363,7 +3366,7 @@ function F_formTemplateDocs_Create({ FormTypeId }) {
|
|
3363
3366
|
}, form.getInputProps("promulgateDate"))
|
3364
3367
|
),
|
3365
3368
|
/* @__PURE__ */ jsx59(
|
3366
|
-
|
3369
|
+
MyTextInput,
|
3367
3370
|
__spreadValues({
|
3368
3371
|
withAsterisk: true,
|
3369
3372
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -3451,7 +3454,7 @@ function F_formTemplateDocs_Update({
|
|
3451
3454
|
},
|
3452
3455
|
children: [
|
3453
3456
|
/* @__PURE__ */ jsx61(
|
3454
|
-
|
3457
|
+
MyTextInput,
|
3455
3458
|
__spreadValues({
|
3456
3459
|
withAsterisk: true,
|
3457
3460
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -3465,7 +3468,7 @@ function F_formTemplateDocs_Update({
|
|
3465
3468
|
}, form.getInputProps("promulgateDate"))
|
3466
3469
|
),
|
3467
3470
|
/* @__PURE__ */ jsx61(
|
3468
|
-
|
3471
|
+
MyTextInput,
|
3469
3472
|
__spreadValues({
|
3470
3473
|
withAsterisk: true,
|
3471
3474
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -3675,7 +3678,7 @@ function F_moduleConfig_Save({
|
|
3675
3678
|
});
|
3676
3679
|
}
|
3677
3680
|
return /* @__PURE__ */ jsx64(
|
3678
|
-
|
3681
|
+
MyButton,
|
3679
3682
|
{
|
3680
3683
|
disabled: !form.isDirty(),
|
3681
3684
|
crudType: "save",
|
@@ -3719,11 +3722,11 @@ function F_moduleConfig_Form() {
|
|
3719
3722
|
}, [query.data]);
|
3720
3723
|
return /* @__PURE__ */ jsxs43(Paper7, { p: "md", children: [
|
3721
3724
|
/* @__PURE__ */ jsxs43(Grid4, { children: [
|
3722
|
-
/* @__PURE__ */ jsx65(Grid4.Col, { span: 5, children: /* @__PURE__ */ jsx65(
|
3723
|
-
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 7 }, children: /* @__PURE__ */ jsx65(
|
3724
|
-
/* @__PURE__ */ jsx65(Grid4.Col, { span: 12, children: /* @__PURE__ */ jsx65(
|
3725
|
-
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx65(
|
3726
|
-
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx65(
|
3725
|
+
/* @__PURE__ */ jsx65(Grid4.Col, { span: 5, children: /* @__PURE__ */ jsx65(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("code")), { label: "M\xE3 module", disabled: true })) }),
|
3726
|
+
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 7 }, children: /* @__PURE__ */ jsx65(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("name")), { label: "T\xEAn module" })) }),
|
3727
|
+
/* @__PURE__ */ jsx65(Grid4.Col, { span: 12, children: /* @__PURE__ */ jsx65(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("officelName")), { label: "T\xEAn \u0111\u01A1n v\u1ECB ch\u1EE7 qu\u1EA3n" })) }),
|
3728
|
+
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx65(MyTextInput, __spreadProps(__spreadValues({}, form.getInputProps("email")), { label: "Email" })) }),
|
3729
|
+
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx65(MyTextInput, __spreadProps(__spreadValues({ isPhoneNumber: true }, form.getInputProps("phoneNumber")), { label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" })) }),
|
3727
3730
|
/* @__PURE__ */ jsx65(Grid4.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx65(
|
3728
3731
|
MyDateInput,
|
3729
3732
|
{
|
@@ -3841,7 +3844,7 @@ function F_organizationPolicyDocs_Create({
|
|
3841
3844
|
},
|
3842
3845
|
children: [
|
3843
3846
|
/* @__PURE__ */ jsx67(
|
3844
|
-
|
3847
|
+
MyTextInput,
|
3845
3848
|
__spreadValues({
|
3846
3849
|
withAsterisk: true,
|
3847
3850
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -3855,7 +3858,7 @@ function F_organizationPolicyDocs_Create({
|
|
3855
3858
|
}, form.getInputProps("promulgateDate"))
|
3856
3859
|
),
|
3857
3860
|
/* @__PURE__ */ jsx67(
|
3858
|
-
|
3861
|
+
MyTextInput,
|
3859
3862
|
__spreadValues({
|
3860
3863
|
withAsterisk: true,
|
3861
3864
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -3943,7 +3946,7 @@ function F_organizationPolicyDocs_Update({
|
|
3943
3946
|
},
|
3944
3947
|
children: [
|
3945
3948
|
/* @__PURE__ */ jsx69(
|
3946
|
-
|
3949
|
+
MyTextInput,
|
3947
3950
|
__spreadValues({
|
3948
3951
|
withAsterisk: true,
|
3949
3952
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -3957,7 +3960,7 @@ function F_organizationPolicyDocs_Update({
|
|
3957
3960
|
}, form.getInputProps("promulgateDate"))
|
3958
3961
|
),
|
3959
3962
|
/* @__PURE__ */ jsx69(
|
3960
|
-
|
3963
|
+
MyTextInput,
|
3961
3964
|
__spreadValues({
|
3962
3965
|
withAsterisk: true,
|
3963
3966
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -4126,19 +4129,19 @@ function F_pageContentConfig_Save({ menuValues }) {
|
|
4126
4129
|
return service_PageContent.updateList([{ id: 1 }]);
|
4127
4130
|
}
|
4128
4131
|
});
|
4129
|
-
return /* @__PURE__ */ jsx72(
|
4132
|
+
return /* @__PURE__ */ jsx72(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
|
4130
4133
|
}
|
4131
4134
|
|
4132
4135
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
|
4133
4136
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
4134
4137
|
function F_pageContentConfig_Export() {
|
4135
|
-
return /* @__PURE__ */ jsx73(
|
4138
|
+
return /* @__PURE__ */ jsx73(MyButton2, { actionType: "export" });
|
4136
4139
|
}
|
4137
4140
|
|
4138
4141
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
|
4139
4142
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
4140
4143
|
function F_pageContentConfig_DeleteDescription() {
|
4141
|
-
return /* @__PURE__ */ jsx74(
|
4144
|
+
return /* @__PURE__ */ jsx74(MyButton2, { actionType: "delete" });
|
4142
4145
|
}
|
4143
4146
|
|
4144
4147
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
|
@@ -4159,7 +4162,7 @@ function F_pageContentConfig_ReadMenu() {
|
|
4159
4162
|
accessorKey: "description",
|
4160
4163
|
size: device.isPc ? 400 : 0,
|
4161
4164
|
Cell: () => {
|
4162
|
-
return /* @__PURE__ */ jsx75(
|
4165
|
+
return /* @__PURE__ */ jsx75(MyTextInput2, { placeholder: "Nh\u1EADp m\xF4 t\u1EA3 menu" });
|
4163
4166
|
}
|
4164
4167
|
}
|
4165
4168
|
], []);
|
@@ -4214,14 +4217,14 @@ function F_roleCatalog_Form({ values }) {
|
|
4214
4217
|
if (values) return /* @__PURE__ */ jsxs49(MyActionIconUpdate, { form, onSubmit: async () => {
|
4215
4218
|
return await baseAxios_default.post("/Role/Update", form.getValues());
|
4216
4219
|
}, children: [
|
4217
|
-
/* @__PURE__ */ jsx78(
|
4218
|
-
/* @__PURE__ */ jsx78(
|
4220
|
+
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ readOnly: true, variant: "filled", label: "M\xE3" }, form.getInputProps("code"))),
|
4221
|
+
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
4219
4222
|
] });
|
4220
4223
|
return /* @__PURE__ */ jsxs49(MyButtonCreate, { form, onSubmit: async () => {
|
4221
4224
|
return await baseAxios_default.post("/Role/Create", form.getValues());
|
4222
4225
|
}, children: [
|
4223
|
-
/* @__PURE__ */ jsx78(
|
4224
|
-
/* @__PURE__ */ jsx78(
|
4226
|
+
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ label: "M\xE3" }, form.getInputProps("code"))),
|
4227
|
+
/* @__PURE__ */ jsx78(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
4225
4228
|
] });
|
4226
4229
|
}
|
4227
4230
|
|
@@ -4338,7 +4341,7 @@ function F_securityPolicyDocs_Create({ SecurityTypeId }) {
|
|
4338
4341
|
},
|
4339
4342
|
children: [
|
4340
4343
|
/* @__PURE__ */ jsx81(
|
4341
|
-
|
4344
|
+
MyTextInput,
|
4342
4345
|
__spreadValues({
|
4343
4346
|
withAsterisk: true,
|
4344
4347
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -4352,7 +4355,7 @@ function F_securityPolicyDocs_Create({ SecurityTypeId }) {
|
|
4352
4355
|
}, form.getInputProps("promulgateDate"))
|
4353
4356
|
),
|
4354
4357
|
/* @__PURE__ */ jsx81(
|
4355
|
-
|
4358
|
+
MyTextInput,
|
4356
4359
|
__spreadValues({
|
4357
4360
|
withAsterisk: true,
|
4358
4361
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -4561,20 +4564,20 @@ function F_systemUpdateDocs_Create({
|
|
4561
4564
|
}, form.getInputProps("meetingDate"))
|
4562
4565
|
),
|
4563
4566
|
/* @__PURE__ */ jsx86(
|
4564
|
-
|
4567
|
+
MyTextInput,
|
4565
4568
|
__spreadValues({
|
4566
4569
|
withAsterisk: true,
|
4567
4570
|
label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u"
|
4568
4571
|
}, form.getInputProps("departmentName"))
|
4569
4572
|
),
|
4570
4573
|
/* @__PURE__ */ jsx86(
|
4571
|
-
|
4574
|
+
MyTextInput,
|
4572
4575
|
__spreadValues({
|
4573
4576
|
withAsterisk: true,
|
4574
4577
|
label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn"
|
4575
4578
|
}, form.getInputProps("description"))
|
4576
4579
|
),
|
4577
|
-
/* @__PURE__ */ jsx86(
|
4580
|
+
/* @__PURE__ */ jsx86(MyTextInput, __spreadValues({ label: "K\u1EBFt lu\u1EADn" }, form.getInputProps("conclusion"))),
|
4578
4581
|
/* @__PURE__ */ jsx86(
|
4579
4582
|
MyDateInput,
|
4580
4583
|
__spreadValues({
|
@@ -4662,20 +4665,20 @@ function F_systemUpdateDocs_Update({ values }) {
|
|
4662
4665
|
}, form.getInputProps("meetingDate"))
|
4663
4666
|
),
|
4664
4667
|
/* @__PURE__ */ jsx88(
|
4665
|
-
|
4668
|
+
MyTextInput,
|
4666
4669
|
__spreadValues({
|
4667
4670
|
withAsterisk: true,
|
4668
4671
|
label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u"
|
4669
4672
|
}, form.getInputProps("departmentName"))
|
4670
4673
|
),
|
4671
4674
|
/* @__PURE__ */ jsx88(
|
4672
|
-
|
4675
|
+
MyTextInput,
|
4673
4676
|
__spreadValues({
|
4674
4677
|
withAsterisk: true,
|
4675
4678
|
label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn"
|
4676
4679
|
}, form.getInputProps("description"))
|
4677
4680
|
),
|
4678
|
-
/* @__PURE__ */ jsx88(
|
4681
|
+
/* @__PURE__ */ jsx88(MyTextInput, __spreadValues({ label: "K\u1EBFt lu\u1EADn" }, form.getInputProps("conclusion"))),
|
4679
4682
|
/* @__PURE__ */ jsx88(
|
4680
4683
|
MyDateInput,
|
4681
4684
|
__spreadValues({
|
@@ -4799,14 +4802,14 @@ function F_userGuideDocs_Create({ GuidelineTypeId }) {
|
|
4799
4802
|
},
|
4800
4803
|
children: [
|
4801
4804
|
/* @__PURE__ */ jsx90(
|
4802
|
-
|
4805
|
+
MyTextInput,
|
4803
4806
|
__spreadValues({
|
4804
4807
|
withAsterisk: true,
|
4805
4808
|
label: "M\xE3 t\xE0i li\u1EC7u"
|
4806
4809
|
}, form.getInputProps("code"))
|
4807
4810
|
),
|
4808
4811
|
/* @__PURE__ */ jsx90(
|
4809
|
-
|
4812
|
+
MyTextInput,
|
4810
4813
|
__spreadValues({
|
4811
4814
|
withAsterisk: true,
|
4812
4815
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -4871,14 +4874,14 @@ function F_userGuideDocs_Update({ values }) {
|
|
4871
4874
|
},
|
4872
4875
|
children: [
|
4873
4876
|
/* @__PURE__ */ jsx92(
|
4874
|
-
|
4877
|
+
MyTextInput,
|
4875
4878
|
__spreadValues({
|
4876
4879
|
withAsterisk: true,
|
4877
4880
|
label: "M\xE3 t\xE0i li\u1EC7u"
|
4878
4881
|
}, form.getInputProps("code"))
|
4879
4882
|
),
|
4880
4883
|
/* @__PURE__ */ jsx92(
|
4881
|
-
|
4884
|
+
MyTextInput,
|
4882
4885
|
__spreadValues({
|
4883
4886
|
withAsterisk: true,
|
4884
4887
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -4991,7 +4994,7 @@ function F_workflowProcessDocs_Create({
|
|
4991
4994
|
},
|
4992
4995
|
children: [
|
4993
4996
|
/* @__PURE__ */ jsx95(
|
4994
|
-
|
4997
|
+
MyTextInput,
|
4995
4998
|
__spreadValues({
|
4996
4999
|
withAsterisk: true,
|
4997
5000
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -5005,7 +5008,7 @@ function F_workflowProcessDocs_Create({
|
|
5005
5008
|
}, form.getInputProps("promulgateDate"))
|
5006
5009
|
),
|
5007
5010
|
/* @__PURE__ */ jsx95(
|
5008
|
-
|
5011
|
+
MyTextInput,
|
5009
5012
|
__spreadValues({
|
5010
5013
|
withAsterisk: true,
|
5011
5014
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -5093,7 +5096,7 @@ function F_workflowProcessDocs_Update({
|
|
5093
5096
|
},
|
5094
5097
|
children: [
|
5095
5098
|
/* @__PURE__ */ jsx97(
|
5096
|
-
|
5099
|
+
MyTextInput,
|
5097
5100
|
__spreadValues({
|
5098
5101
|
withAsterisk: true,
|
5099
5102
|
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
@@ -5107,7 +5110,7 @@ function F_workflowProcessDocs_Update({
|
|
5107
5110
|
}, form.getInputProps("promulgateDate"))
|
5108
5111
|
),
|
5109
5112
|
/* @__PURE__ */ jsx97(
|
5110
|
-
|
5113
|
+
MyTextInput,
|
5111
5114
|
__spreadValues({
|
5112
5115
|
withAsterisk: true,
|
5113
5116
|
label: "T\xEAn t\xE0i li\u1EC7u"
|
@@ -5438,6 +5441,14 @@ function useM_Account_Sigin() {
|
|
5438
5441
|
return mutation;
|
5439
5442
|
}
|
5440
5443
|
export {
|
5444
|
+
F_accessControl,
|
5445
|
+
F_accessControlLevel,
|
5446
|
+
F_accessControlLevel_ReadUser,
|
5447
|
+
F_accessControlLevel_Save,
|
5448
|
+
F_accessControlLevel_ViewMenuPermissions,
|
5449
|
+
F_accessControl_ReadUser,
|
5450
|
+
F_accessControl_Save,
|
5451
|
+
F_accessControl_ViewMenuPermissions,
|
5441
5452
|
F_accountManagement,
|
5442
5453
|
F_accountManagement_ChangePermission,
|
5443
5454
|
F_accountManagement_Create,
|
@@ -5472,10 +5483,6 @@ export {
|
|
5472
5483
|
F_core27311_Read,
|
5473
5484
|
F_core27311_Update,
|
5474
5485
|
F_core35923,
|
5475
|
-
F_core38677,
|
5476
|
-
F_core38677_ReadUser,
|
5477
|
-
F_core38677_Save,
|
5478
|
-
F_core38677_ViewMenuPermissions,
|
5479
5486
|
F_core40207,
|
5480
5487
|
F_core40207_Create,
|
5481
5488
|
F_core40207_Delete,
|
@@ -5493,10 +5500,6 @@ export {
|
|
5493
5500
|
F_core76318_Create,
|
5494
5501
|
F_core76318_Delete,
|
5495
5502
|
F_core76318_Update,
|
5496
|
-
F_core83092,
|
5497
|
-
F_core83092_ReadUser,
|
5498
|
-
F_core83092_Save,
|
5499
|
-
F_core83092_ViewMenuPermissions,
|
5500
5503
|
F_formTemplateDocs,
|
5501
5504
|
F_formTemplateDocs_Create,
|
5502
5505
|
F_formTemplateDocs_Delete,
|
@@ -5530,8 +5533,8 @@ export {
|
|
5530
5533
|
F_workflowProcessDocs_Delete,
|
5531
5534
|
F_workflowProcessDocs_Read,
|
5532
5535
|
F_workflowProcessDocs_Update,
|
5536
|
+
useS_accessControl,
|
5533
5537
|
useS_authenticate,
|
5534
|
-
useS_core83092,
|
5535
5538
|
useS_moduleConfig,
|
5536
|
-
|
5539
|
+
utils_accessControl_mergePage
|
5537
5540
|
};
|