aq-fe-framework 0.1.43 → 0.1.44
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.
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
createGenericStore,
|
|
22
22
|
groupToTwoLevels,
|
|
23
23
|
utils_layout_getItemsWithoutLinks
|
|
24
|
-
} from "../../../chunk-
|
|
24
|
+
} from "../../../chunk-D3WAMOI2.mjs";
|
|
25
25
|
import {
|
|
26
26
|
U0DateToDDMMYYYString,
|
|
27
27
|
U0MyValidateEmail,
|
|
@@ -55,6 +55,7 @@ import { useMemo } from "react";
|
|
|
55
55
|
// src/modules-features/admin/core/core18256/F_core18256_Select.tsx
|
|
56
56
|
import { Select } from "@mantine/core";
|
|
57
57
|
import { useQuery } from "@tanstack/react-query";
|
|
58
|
+
import { jsx } from "react/jsx-runtime";
|
|
58
59
|
function F_core18256_Select(_a) {
|
|
59
60
|
var _b = _a, { documentTypeId, label = "", dataMapper } = _b, rest = __objRest(_b, ["documentTypeId", "label", "dataMapper"]);
|
|
60
61
|
var _a2, _b2;
|
|
@@ -74,7 +75,7 @@ function F_core18256_Select(_a) {
|
|
|
74
75
|
label: `${item.code}-${item.name}`
|
|
75
76
|
};
|
|
76
77
|
});
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
78
79
|
Select,
|
|
79
80
|
__spreadProps(__spreadValues({
|
|
80
81
|
label,
|
|
@@ -88,11 +89,12 @@ function F_core18256_Select(_a) {
|
|
|
88
89
|
|
|
89
90
|
// src/modules-features/admin/core/core12196/F_core12196_Create.tsx
|
|
90
91
|
import { useForm } from "@mantine/form";
|
|
92
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
91
93
|
function F_core12196_Create() {
|
|
92
94
|
const form = useForm({
|
|
93
95
|
mode: "uncontrolled"
|
|
94
96
|
});
|
|
95
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ jsxs(MyButtonCreate, { objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", form, onSubmit: async (values) => {
|
|
96
98
|
return await baseAxios_default.post(
|
|
97
99
|
"/Document/create",
|
|
98
100
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -100,16 +102,25 @@ function F_core12196_Create() {
|
|
|
100
102
|
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
101
103
|
})
|
|
102
104
|
);
|
|
103
|
-
}
|
|
105
|
+
}, children: [
|
|
106
|
+
/* @__PURE__ */ jsx2(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
107
|
+
/* @__PURE__ */ jsx2(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
108
|
+
/* @__PURE__ */ jsx2(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
109
|
+
/* @__PURE__ */ jsx2(F_core18256_Select, __spreadValues({ label: "Lo\u1EA1i v\u0103n b\u1EA3n", documentTypeId: OBJECT_DOCUMENT_TYPES.Form }, form.getInputProps("documentAttributeId"))),
|
|
110
|
+
/* @__PURE__ */ jsx2(MyFileInput, __spreadValues({ label: "V\u0103n b\u1EA3n" }, form.getInputProps("file"))),
|
|
111
|
+
/* @__PURE__ */ jsx2(MyNumberInput, __spreadValues({ label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch" }, form.getInputProps("orderBy")))
|
|
112
|
+
] });
|
|
104
113
|
}
|
|
105
114
|
|
|
106
115
|
// src/modules-features/admin/core/core12196/F_core12196_Delete.tsx
|
|
116
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
107
117
|
function F_core12196_Delete({ id }) {
|
|
108
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ jsx3(MyActionIconDelete, { onSubmit: async () => await baseAxios_default.post("/Document/delete", { id }) });
|
|
109
119
|
}
|
|
110
120
|
|
|
111
121
|
// src/modules-features/admin/core/core12196/F_core12196_Update.tsx
|
|
112
122
|
import { useForm as useForm2 } from "@mantine/form";
|
|
123
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
113
124
|
function F_core12196_Update({ values }) {
|
|
114
125
|
var _a;
|
|
115
126
|
const form = useForm2({
|
|
@@ -118,14 +129,22 @@ function F_core12196_Update({ values }) {
|
|
|
118
129
|
promulgateDate: new Date(values.promulgateDate)
|
|
119
130
|
})
|
|
120
131
|
});
|
|
121
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ jsxs2(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
122
133
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
123
134
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
124
135
|
}));
|
|
125
|
-
}
|
|
136
|
+
}, children: [
|
|
137
|
+
/* @__PURE__ */ jsx4(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
138
|
+
/* @__PURE__ */ jsx4(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
139
|
+
/* @__PURE__ */ jsx4(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
140
|
+
/* @__PURE__ */ jsx4(F_core18256_Select, __spreadValues({ label: "Lo\u1EA1i v\u0103n b\u1EA3n", documentTypeId: OBJECT_DOCUMENT_TYPES.Form }, form.getInputProps("documentAttributeId"))),
|
|
141
|
+
/* @__PURE__ */ jsx4(MyFileInput, __spreadValues({ label: "V\u0103n b\u1EA3n" }, form.getInputProps("file"))),
|
|
142
|
+
/* @__PURE__ */ jsx4(MyNumberInput, __spreadValues({ label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch" }, form.getInputProps("orderBy")))
|
|
143
|
+
] });
|
|
126
144
|
}
|
|
127
145
|
|
|
128
146
|
// src/modules-features/admin/core/core12196/F_core12196.tsx
|
|
147
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
129
148
|
function F_core12196() {
|
|
130
149
|
var _a, _b, _c;
|
|
131
150
|
const documentAttributeQuery = useQuery2({
|
|
@@ -138,11 +157,11 @@ function F_core12196() {
|
|
|
138
157
|
});
|
|
139
158
|
if (documentAttributeQuery.isLoading) return "Loading...";
|
|
140
159
|
if (documentAttributeQuery.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
141
|
-
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0) return /* @__PURE__ */
|
|
142
|
-
return /* @__PURE__ */
|
|
160
|
+
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0) return /* @__PURE__ */ jsx5(Blockquote, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
|
161
|
+
return /* @__PURE__ */ jsx5(MyPageContent, { rightTopBar: /* @__PURE__ */ jsx5(F_core12196_Create, {}), children: /* @__PURE__ */ jsx5(MyFlexColumn, { children: /* @__PURE__ */ jsx5(Accordion, { defaultValue: (_b = documentAttributeQuery.data) == null ? void 0 : _b.map((item) => {
|
|
143
162
|
var _a2;
|
|
144
163
|
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
|
145
|
-
}), multiple: true
|
|
164
|
+
}), multiple: true, children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx5(SubRead, { name: item.name, documentType: item.id }, idx)) }) }) });
|
|
146
165
|
}
|
|
147
166
|
function SubRead({ name, documentType }) {
|
|
148
167
|
const documentQuery = useQuery2({
|
|
@@ -169,7 +188,7 @@ function SubRead({ name, documentType }) {
|
|
|
169
188
|
{
|
|
170
189
|
header: "File",
|
|
171
190
|
accessorFn: (row) => {
|
|
172
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ jsx5(MyCenterFull, { children: /* @__PURE__ */ jsx5(MyButtonViewPDF, { id: row.id }) });
|
|
173
192
|
}
|
|
174
193
|
}
|
|
175
194
|
],
|
|
@@ -177,14 +196,20 @@ function SubRead({ name, documentType }) {
|
|
|
177
196
|
);
|
|
178
197
|
if (documentQuery.isLoading) return "Loading...";
|
|
179
198
|
if (documentQuery.isError) return "Error!";
|
|
180
|
-
return /* @__PURE__ */
|
|
181
|
-
|
|
182
|
-
{
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
199
|
+
return /* @__PURE__ */ jsxs3(Accordion.Item, { value: documentType.toString(), children: [
|
|
200
|
+
/* @__PURE__ */ jsx5(Accordion.Control, { children: name }),
|
|
201
|
+
/* @__PURE__ */ jsx5(Accordion.Panel, { children: /* @__PURE__ */ jsx5(
|
|
202
|
+
MyDataTable,
|
|
203
|
+
{
|
|
204
|
+
columns,
|
|
205
|
+
data: documentQuery.data,
|
|
206
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs3(MyCenterFull, { children: [
|
|
207
|
+
/* @__PURE__ */ jsx5(F_core12196_Update, { values: row.original }),
|
|
208
|
+
/* @__PURE__ */ jsx5(F_core12196_Delete, { id: row.original.id })
|
|
209
|
+
] })
|
|
210
|
+
}
|
|
211
|
+
) })
|
|
212
|
+
] });
|
|
188
213
|
}
|
|
189
214
|
|
|
190
215
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
|
@@ -194,11 +219,12 @@ import { useMemo as useMemo2 } from "react";
|
|
|
194
219
|
// src/modules-features/admin/core/core16209/F_core16209_Create.tsx
|
|
195
220
|
import { FileInput } from "@mantine/core";
|
|
196
221
|
import { useForm as useForm3 } from "@mantine/form";
|
|
222
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
197
223
|
function F_core16209_Create() {
|
|
198
224
|
const form = useForm3({
|
|
199
225
|
mode: "uncontrolled"
|
|
200
226
|
});
|
|
201
|
-
return /* @__PURE__ */
|
|
227
|
+
return /* @__PURE__ */ jsxs4(MyButtonCreate, { objectName: "v\u0103n b\u1EA3n", form, onSubmit: async (values) => {
|
|
202
228
|
return await baseAxios_default.post(
|
|
203
229
|
"/Document/create",
|
|
204
230
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -207,17 +233,25 @@ function F_core16209_Create() {
|
|
|
207
233
|
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
208
234
|
})
|
|
209
235
|
);
|
|
210
|
-
}
|
|
236
|
+
}, children: [
|
|
237
|
+
/* @__PURE__ */ jsx6(MyTextInput, __spreadValues({ label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u" }, form.getInputProps("departmentName"))),
|
|
238
|
+
/* @__PURE__ */ jsx6(MyTextInput, __spreadValues({ label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn" }, form.getInputProps("description"))),
|
|
239
|
+
/* @__PURE__ */ jsx6(MyDateInput, __spreadValues({ label: "Ng\xE0y b\u1EAFt \u0111\u1EA7u" }, form.getInputProps("startDate"))),
|
|
240
|
+
/* @__PURE__ */ jsx6(MyDateInput, __spreadValues({ label: "Ng\xE0y k\u1EBFt th\xFAc" }, form.getInputProps("endDate"))),
|
|
241
|
+
/* @__PURE__ */ jsx6(FileInput, __spreadValues({ label: "T\xE0i li\u1EC7u" }, form.getInputProps("file")))
|
|
242
|
+
] });
|
|
211
243
|
}
|
|
212
244
|
|
|
213
245
|
// src/modules-features/admin/core/core16209/F_core16209_Delete.tsx
|
|
246
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
214
247
|
function F_core16209_Delete({ id }) {
|
|
215
|
-
return /* @__PURE__ */
|
|
248
|
+
return /* @__PURE__ */ jsx7(MyActionIconDelete, { onSubmit: () => baseAxios_default.post("/Document/delete", { id }) });
|
|
216
249
|
}
|
|
217
250
|
|
|
218
251
|
// src/modules-features/admin/core/core16209/F_core16209_Update.tsx
|
|
219
252
|
import { FileInput as FileInput2, TextInput } from "@mantine/core";
|
|
220
253
|
import { useForm as useForm4 } from "@mantine/form";
|
|
254
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
221
255
|
function F_core16209_Update({ values }) {
|
|
222
256
|
var _a;
|
|
223
257
|
const form = useForm4({
|
|
@@ -227,14 +261,20 @@ function F_core16209_Update({ values }) {
|
|
|
227
261
|
promulgateDate: new Date(values.promulgateDate)
|
|
228
262
|
})
|
|
229
263
|
});
|
|
230
|
-
return /* @__PURE__ */
|
|
264
|
+
return /* @__PURE__ */ jsxs5(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
231
265
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
232
266
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
233
267
|
}));
|
|
234
|
-
}
|
|
268
|
+
}, children: [
|
|
269
|
+
/* @__PURE__ */ jsx8(TextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
270
|
+
/* @__PURE__ */ jsx8(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
271
|
+
/* @__PURE__ */ jsx8(TextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
272
|
+
/* @__PURE__ */ jsx8(FileInput2, __spreadValues({ label: "Ch\u1ECDn file" }, form.getInputProps("file")))
|
|
273
|
+
] });
|
|
235
274
|
}
|
|
236
275
|
|
|
237
276
|
// src/modules-features/admin/core/core16209/F_core16209.tsx
|
|
277
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
238
278
|
function F_core16209() {
|
|
239
279
|
const query = useQuery3({
|
|
240
280
|
queryKey: ["F_core16209_Read"],
|
|
@@ -265,7 +305,7 @@ function F_core16209() {
|
|
|
265
305
|
{
|
|
266
306
|
header: "File",
|
|
267
307
|
accessorFn: (row) => {
|
|
268
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ jsx9(MyCenterFull, { children: /* @__PURE__ */ jsx9(MyButtonViewPDF, { id: row.id }) });
|
|
269
309
|
}
|
|
270
310
|
}
|
|
271
311
|
],
|
|
@@ -273,17 +313,20 @@ function F_core16209() {
|
|
|
273
313
|
);
|
|
274
314
|
if (query.isLoading) return "Loading...";
|
|
275
315
|
if (query.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
276
|
-
return /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ jsx9(MyPageContent, { children: /* @__PURE__ */ jsx9(
|
|
277
317
|
MyDataTable,
|
|
278
318
|
{
|
|
279
319
|
columns,
|
|
280
320
|
data: query.data,
|
|
281
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
321
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx9(F_core16209_Create, {}),
|
|
282
322
|
renderRowActions: ({ row }) => {
|
|
283
|
-
return /* @__PURE__ */
|
|
323
|
+
return /* @__PURE__ */ jsxs6(MyCenterFull, { children: [
|
|
324
|
+
/* @__PURE__ */ jsx9(F_core16209_Update, { values: row.original }),
|
|
325
|
+
/* @__PURE__ */ jsx9(F_core16209_Delete, { id: row.original.id })
|
|
326
|
+
] });
|
|
284
327
|
}
|
|
285
328
|
}
|
|
286
|
-
));
|
|
329
|
+
) });
|
|
287
330
|
}
|
|
288
331
|
|
|
289
332
|
// src/modules-features/admin/core/core18256/F_core18256.tsx
|
|
@@ -295,6 +338,7 @@ import { useMemo as useMemo3 } from "react";
|
|
|
295
338
|
|
|
296
339
|
// src/modules-features/admin/core/core18256/F_core18256_Create.tsx
|
|
297
340
|
import { useForm as useForm5 } from "@mantine/form";
|
|
341
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
298
342
|
function F_core18256_Create({ documentType }) {
|
|
299
343
|
const form = useForm5({
|
|
300
344
|
mode: "uncontrolled",
|
|
@@ -307,12 +351,16 @@ function F_core18256_Create({ documentType }) {
|
|
|
307
351
|
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
308
352
|
}
|
|
309
353
|
});
|
|
310
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ jsxs7(MyButtonCreate, { objectName: "Lo\u1EA1i v\u0103n b\u1EA3n", form, onSubmit: (values) => baseAxios_default.post("/DocumentAttribute/Create", values), children: [
|
|
355
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "M\xE3 lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("code"))),
|
|
356
|
+
/* @__PURE__ */ jsx10(MyTextInput, __spreadValues({ label: "T\xEAn lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("name")))
|
|
357
|
+
] });
|
|
311
358
|
}
|
|
312
359
|
|
|
313
360
|
// src/modules-features/admin/core/core18256/F_core18256_Delete.tsx
|
|
361
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
314
362
|
function F_core18256_Delete({ id }) {
|
|
315
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ jsx11(
|
|
316
364
|
MyActionIconDelete,
|
|
317
365
|
{
|
|
318
366
|
onSubmit: async () => await baseAxios_default.post("/DocumentAttribute/Delete", { id })
|
|
@@ -322,14 +370,19 @@ function F_core18256_Delete({ id }) {
|
|
|
322
370
|
|
|
323
371
|
// src/modules-features/admin/core/core18256/F_core18256_Update.tsx
|
|
324
372
|
import { useForm as useForm6 } from "@mantine/form";
|
|
373
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
325
374
|
function F_core18256_Update({ values }) {
|
|
326
375
|
const form = useForm6({
|
|
327
376
|
initialValues: values
|
|
328
377
|
});
|
|
329
|
-
return /* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ jsxs8(MyActionIconUpdate, { form, onSubmit: async (values2) => await baseAxios_default.post("/DocumentAttribute/Update", values2), children: [
|
|
379
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ label: "M\xE3 lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("code"))),
|
|
380
|
+
/* @__PURE__ */ jsx12(MyTextInput, __spreadValues({ label: "T\xEAn lo\u1EA1i v\u0103n b\u1EA3n" }, form.getInputProps("name")))
|
|
381
|
+
] });
|
|
330
382
|
}
|
|
331
383
|
|
|
332
384
|
// src/modules-features/admin/core/core18256/F_core18256_Read.tsx
|
|
385
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
333
386
|
function F_core18256_Read({ documentType }) {
|
|
334
387
|
const documentAttributeQuery = useQuery4({
|
|
335
388
|
queryKey: ["F_core18256_Read", documentType],
|
|
@@ -354,37 +407,46 @@ function F_core18256_Read({ documentType }) {
|
|
|
354
407
|
);
|
|
355
408
|
if (documentAttributeQuery.isLoading) return "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...";
|
|
356
409
|
if (documentAttributeQuery.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
357
|
-
return /* @__PURE__ */
|
|
410
|
+
return /* @__PURE__ */ jsx13(
|
|
358
411
|
MyDataTable,
|
|
359
412
|
{
|
|
360
413
|
columns,
|
|
361
414
|
enableRowNumbers: true,
|
|
362
415
|
data: documentAttributeQuery.data,
|
|
363
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
416
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx13(F_core18256_Create, { documentType }),
|
|
364
417
|
renderRowActions: ({ row }) => {
|
|
365
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ jsxs9(MyCenterFull, { children: [
|
|
419
|
+
/* @__PURE__ */ jsx13(F_core18256_Update, { values: row.original }),
|
|
420
|
+
/* @__PURE__ */ jsx13(F_core18256_Delete, { id: row.original.id })
|
|
421
|
+
] });
|
|
366
422
|
}
|
|
367
423
|
}
|
|
368
424
|
);
|
|
369
425
|
}
|
|
370
426
|
|
|
371
427
|
// src/modules-features/admin/core/core18256/F_core18256.tsx
|
|
428
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
372
429
|
var tabData = [
|
|
373
430
|
{ label: "1. V\u0103n b\u1EA3n quy \u0111\u1ECBnh" },
|
|
374
431
|
{ label: "2. Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c" },
|
|
375
432
|
{ label: "3. Danh m\u1EE5c bi\u1EC3u m\u1EABu" }
|
|
376
433
|
];
|
|
377
434
|
function F_core18256() {
|
|
378
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ jsx14(MyPageContent, { children: /* @__PURE__ */ jsxs10(MyTab, { tabList: tabData, children: [
|
|
436
|
+
/* @__PURE__ */ jsx14(Tabs.Panel, { value: "1. V\u0103n b\u1EA3n quy \u0111\u1ECBnh", children: /* @__PURE__ */ jsx14(F_core18256_Read, { documentType: OBJECT_DOCUMENT_TYPES.Regulations }) }),
|
|
437
|
+
/* @__PURE__ */ jsx14(Tabs.Panel, { value: "2. Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", children: /* @__PURE__ */ jsx14(F_core18256_Read, { documentType: OBJECT_DOCUMENT_TYPES.Workflow }) }),
|
|
438
|
+
/* @__PURE__ */ jsx14(Tabs.Panel, { value: "3. Danh m\u1EE5c bi\u1EC3u m\u1EABu", children: /* @__PURE__ */ jsx14(F_core18256_Read, { documentType: OBJECT_DOCUMENT_TYPES.Form }) })
|
|
439
|
+
] }) });
|
|
379
440
|
}
|
|
380
441
|
|
|
381
442
|
// src/modules-features/admin/core/core26965/F_core26965_Create.tsx
|
|
382
443
|
import { useForm as useForm7 } from "@mantine/form";
|
|
444
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
383
445
|
function F_core26965_Create() {
|
|
384
446
|
const form = useForm7({
|
|
385
447
|
mode: "uncontrolled"
|
|
386
448
|
});
|
|
387
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ jsxs11(MyButtonCreate, { objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", form, onSubmit: async (values) => {
|
|
388
450
|
return await baseAxios_default.post(
|
|
389
451
|
"/Document/create",
|
|
390
452
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -392,7 +454,14 @@ function F_core26965_Create() {
|
|
|
392
454
|
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
393
455
|
})
|
|
394
456
|
);
|
|
395
|
-
}
|
|
457
|
+
}, children: [
|
|
458
|
+
/* @__PURE__ */ jsx15(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
459
|
+
/* @__PURE__ */ jsx15(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
460
|
+
/* @__PURE__ */ jsx15(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
461
|
+
/* @__PURE__ */ jsx15(F_core18256_Select, __spreadValues({ label: "Lo\u1EA1i v\u0103n b\u1EA3n", documentTypeId: OBJECT_DOCUMENT_TYPES.Regulations }, form.getInputProps("documentAttributeId"))),
|
|
462
|
+
/* @__PURE__ */ jsx15(MyFileInput, __spreadValues({ label: "V\u0103n b\u1EA3n" }, form.getInputProps("file"))),
|
|
463
|
+
/* @__PURE__ */ jsx15(MyNumberInput, __spreadValues({ label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch" }, form.getInputProps("orderBy")))
|
|
464
|
+
] });
|
|
396
465
|
}
|
|
397
466
|
|
|
398
467
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
|
@@ -401,12 +470,14 @@ import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
|
401
470
|
import { useMemo as useMemo4 } from "react";
|
|
402
471
|
|
|
403
472
|
// src/modules-features/admin/core/core26965/F_core26965_Delete.tsx
|
|
473
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
404
474
|
function F_core26965_Delete({ id }) {
|
|
405
|
-
return /* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ jsx16(MyActionIconDelete, { onSubmit: async () => await baseAxios_default.post("/Document/delete", { id }) });
|
|
406
476
|
}
|
|
407
477
|
|
|
408
478
|
// src/modules-features/admin/core/core26965/F_core26965_Update.tsx
|
|
409
479
|
import { useForm as useForm8 } from "@mantine/form";
|
|
480
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
410
481
|
function F_core26965_Update({ values }) {
|
|
411
482
|
var _a;
|
|
412
483
|
const form = useForm8({
|
|
@@ -415,14 +486,22 @@ function F_core26965_Update({ values }) {
|
|
|
415
486
|
promulgateDate: new Date(values.promulgateDate)
|
|
416
487
|
})
|
|
417
488
|
});
|
|
418
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ jsxs12(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
419
490
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
420
491
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
421
492
|
}));
|
|
422
|
-
}
|
|
493
|
+
}, children: [
|
|
494
|
+
/* @__PURE__ */ jsx17(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
495
|
+
/* @__PURE__ */ jsx17(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
496
|
+
/* @__PURE__ */ jsx17(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
497
|
+
/* @__PURE__ */ jsx17(F_core18256_Select, __spreadValues({ label: "Lo\u1EA1i v\u0103n b\u1EA3n", documentTypeId: OBJECT_DOCUMENT_TYPES.Regulations }, form.getInputProps("documentAttributeId"))),
|
|
498
|
+
/* @__PURE__ */ jsx17(MyFileInput, __spreadValues({ label: "V\u0103n b\u1EA3n" }, form.getInputProps("file"))),
|
|
499
|
+
/* @__PURE__ */ jsx17(MyNumberInput, __spreadValues({ label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch" }, form.getInputProps("orderBy")))
|
|
500
|
+
] });
|
|
423
501
|
}
|
|
424
502
|
|
|
425
503
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
|
504
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
426
505
|
function F_core26965_Read() {
|
|
427
506
|
var _a, _b, _c;
|
|
428
507
|
const documentAttributeQuery = useQuery5({
|
|
@@ -435,11 +514,11 @@ function F_core26965_Read() {
|
|
|
435
514
|
});
|
|
436
515
|
if (documentAttributeQuery.isLoading) return "Loading...";
|
|
437
516
|
if (documentAttributeQuery.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
438
|
-
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0) return /* @__PURE__ */
|
|
439
|
-
return /* @__PURE__ */
|
|
517
|
+
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0) return /* @__PURE__ */ jsx18(Blockquote2, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
|
518
|
+
return /* @__PURE__ */ jsx18(MyFlexColumn, { children: /* @__PURE__ */ jsx18(Accordion2, { defaultValue: (_b = documentAttributeQuery.data) == null ? void 0 : _b.map((item) => {
|
|
440
519
|
var _a2;
|
|
441
520
|
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
|
442
|
-
}), multiple: true
|
|
521
|
+
}), multiple: true, children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx18(SubRead2, { name: item.name, documentType: item.id }, idx)) }) });
|
|
443
522
|
}
|
|
444
523
|
function SubRead2({ name, documentType }) {
|
|
445
524
|
const documentQuery = useQuery5({
|
|
@@ -466,7 +545,7 @@ function SubRead2({ name, documentType }) {
|
|
|
466
545
|
{
|
|
467
546
|
header: "File",
|
|
468
547
|
accessorFn: (row) => {
|
|
469
|
-
return /* @__PURE__ */
|
|
548
|
+
return /* @__PURE__ */ jsx18(MyCenterFull, { children: /* @__PURE__ */ jsx18(MyButtonViewPDF, { id: row.id }) });
|
|
470
549
|
}
|
|
471
550
|
}
|
|
472
551
|
],
|
|
@@ -474,28 +553,36 @@ function SubRead2({ name, documentType }) {
|
|
|
474
553
|
);
|
|
475
554
|
if (documentQuery.isLoading) return "Loading...";
|
|
476
555
|
if (documentQuery.isError) return "Error!";
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
479
|
-
{
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
556
|
+
return /* @__PURE__ */ jsxs13(Accordion2.Item, { value: documentType.toString(), children: [
|
|
557
|
+
/* @__PURE__ */ jsx18(Accordion2.Control, { children: name }),
|
|
558
|
+
/* @__PURE__ */ jsx18(Accordion2.Panel, { children: /* @__PURE__ */ jsx18(
|
|
559
|
+
MyDataTable,
|
|
560
|
+
{
|
|
561
|
+
columns,
|
|
562
|
+
data: documentQuery.data,
|
|
563
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs13(MyCenterFull, { children: [
|
|
564
|
+
/* @__PURE__ */ jsx18(F_core26965_Update, { values: row.original }),
|
|
565
|
+
/* @__PURE__ */ jsx18(F_core26965_Delete, { id: row.original.id })
|
|
566
|
+
] })
|
|
567
|
+
}
|
|
568
|
+
) })
|
|
569
|
+
] });
|
|
485
570
|
}
|
|
486
571
|
|
|
487
572
|
// src/modules-features/admin/core/core26965/F_core26965.tsx
|
|
573
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
488
574
|
function F_core26965() {
|
|
489
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsx19(MyPageContent, { rightTopBar: /* @__PURE__ */ jsx19(F_core26965_Create, {}), children: /* @__PURE__ */ jsx19(F_core26965_Read, {}) });
|
|
490
576
|
}
|
|
491
577
|
|
|
492
578
|
// src/modules-features/admin/core/core27311/F_core27311_Create.tsx
|
|
493
579
|
import { useForm as useForm9 } from "@mantine/form";
|
|
580
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
494
581
|
function F_core27311_Create() {
|
|
495
582
|
const form = useForm9({
|
|
496
583
|
mode: "uncontrolled"
|
|
497
584
|
});
|
|
498
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ jsxs14(MyButtonCreate, { objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", form, onSubmit: async (values) => {
|
|
499
586
|
return await baseAxios_default.post(
|
|
500
587
|
"/Document/create",
|
|
501
588
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -503,7 +590,14 @@ function F_core27311_Create() {
|
|
|
503
590
|
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
504
591
|
})
|
|
505
592
|
);
|
|
506
|
-
}
|
|
593
|
+
}, children: [
|
|
594
|
+
/* @__PURE__ */ jsx20(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
595
|
+
/* @__PURE__ */ jsx20(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
596
|
+
/* @__PURE__ */ jsx20(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
597
|
+
/* @__PURE__ */ jsx20(F_core18256_Select, __spreadValues({ label: "Lo\u1EA1i v\u0103n b\u1EA3n", documentTypeId: OBJECT_DOCUMENT_TYPES.Workflow }, form.getInputProps("documentAttributeId"))),
|
|
598
|
+
/* @__PURE__ */ jsx20(MyFileInput, __spreadValues({ label: "V\u0103n b\u1EA3n" }, form.getInputProps("file"))),
|
|
599
|
+
/* @__PURE__ */ jsx20(MyNumberInput, __spreadValues({ label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch" }, form.getInputProps("orderBy")))
|
|
600
|
+
] });
|
|
507
601
|
}
|
|
508
602
|
|
|
509
603
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
|
@@ -512,12 +606,14 @@ import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
|
512
606
|
import { useMemo as useMemo5 } from "react";
|
|
513
607
|
|
|
514
608
|
// src/modules-features/admin/core/core27311/F_core27311_Delete.tsx
|
|
609
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
515
610
|
function F_core27311_Delete({ id }) {
|
|
516
|
-
return /* @__PURE__ */
|
|
611
|
+
return /* @__PURE__ */ jsx21(MyActionIconDelete, { onSubmit: async () => await baseAxios_default.post("/Document/delete", { id }) });
|
|
517
612
|
}
|
|
518
613
|
|
|
519
614
|
// src/modules-features/admin/core/core27311/F_core27311_Update.tsx
|
|
520
615
|
import { useForm as useForm10 } from "@mantine/form";
|
|
616
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
521
617
|
function F_core27311_Update({ values }) {
|
|
522
618
|
var _a;
|
|
523
619
|
const form = useForm10({
|
|
@@ -526,14 +622,22 @@ function F_core27311_Update({ values }) {
|
|
|
526
622
|
promulgateDate: new Date(values.promulgateDate)
|
|
527
623
|
})
|
|
528
624
|
});
|
|
529
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ jsxs15(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
530
626
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
531
627
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
532
628
|
}));
|
|
533
|
-
}
|
|
629
|
+
}, children: [
|
|
630
|
+
/* @__PURE__ */ jsx22(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
631
|
+
/* @__PURE__ */ jsx22(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
632
|
+
/* @__PURE__ */ jsx22(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
633
|
+
/* @__PURE__ */ jsx22(F_core18256_Select, __spreadValues({ label: "Lo\u1EA1i v\u0103n b\u1EA3n", documentTypeId: OBJECT_DOCUMENT_TYPES.Regulations }, form.getInputProps("documentAttributeId"))),
|
|
634
|
+
/* @__PURE__ */ jsx22(MyFileInput, __spreadValues({ label: "V\u0103n b\u1EA3n" }, form.getInputProps("file"))),
|
|
635
|
+
/* @__PURE__ */ jsx22(MyNumberInput, __spreadValues({ label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch" }, form.getInputProps("orderBy")))
|
|
636
|
+
] });
|
|
534
637
|
}
|
|
535
638
|
|
|
536
639
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
|
640
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
537
641
|
function F_core27311_Read() {
|
|
538
642
|
var _a, _b, _c;
|
|
539
643
|
const documentAttributeQuery = useQuery6({
|
|
@@ -546,11 +650,11 @@ function F_core27311_Read() {
|
|
|
546
650
|
});
|
|
547
651
|
if (documentAttributeQuery.isLoading) return "Loading...";
|
|
548
652
|
if (documentAttributeQuery.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
549
|
-
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0) return /* @__PURE__ */
|
|
550
|
-
return /* @__PURE__ */
|
|
653
|
+
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0) return /* @__PURE__ */ jsx23(Blockquote3, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
|
654
|
+
return /* @__PURE__ */ jsx23(MyFlexColumn, { children: /* @__PURE__ */ jsx23(Accordion3, { defaultValue: (_b = documentAttributeQuery.data) == null ? void 0 : _b.map((item) => {
|
|
551
655
|
var _a2;
|
|
552
656
|
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
|
553
|
-
}), multiple: true
|
|
657
|
+
}), multiple: true, children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx23(SubRead3, { name: item.name, documentType: item.id }, idx)) }) });
|
|
554
658
|
}
|
|
555
659
|
function SubRead3({ name, documentType }) {
|
|
556
660
|
const documentQuery = useQuery6({
|
|
@@ -577,7 +681,7 @@ function SubRead3({ name, documentType }) {
|
|
|
577
681
|
{
|
|
578
682
|
header: "File",
|
|
579
683
|
accessorFn: (row) => {
|
|
580
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsx23(MyCenterFull, { children: /* @__PURE__ */ jsx23(MyButtonViewPDF, { id: row.id }) });
|
|
581
685
|
}
|
|
582
686
|
}
|
|
583
687
|
],
|
|
@@ -585,19 +689,26 @@ function SubRead3({ name, documentType }) {
|
|
|
585
689
|
);
|
|
586
690
|
if (documentQuery.isLoading) return "Loading...";
|
|
587
691
|
if (documentQuery.isError) return "Error!";
|
|
588
|
-
return /* @__PURE__ */
|
|
589
|
-
|
|
590
|
-
{
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
692
|
+
return /* @__PURE__ */ jsxs16(Accordion3.Item, { value: documentType.toString(), children: [
|
|
693
|
+
/* @__PURE__ */ jsx23(Accordion3.Control, { children: name }),
|
|
694
|
+
/* @__PURE__ */ jsx23(Accordion3.Panel, { children: /* @__PURE__ */ jsx23(
|
|
695
|
+
MyDataTable,
|
|
696
|
+
{
|
|
697
|
+
columns,
|
|
698
|
+
data: documentQuery.data,
|
|
699
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs16(MyCenterFull, { children: [
|
|
700
|
+
/* @__PURE__ */ jsx23(F_core27311_Update, { values: row.original }),
|
|
701
|
+
/* @__PURE__ */ jsx23(F_core27311_Delete, { id: row.original.id })
|
|
702
|
+
] })
|
|
703
|
+
}
|
|
704
|
+
) })
|
|
705
|
+
] });
|
|
596
706
|
}
|
|
597
707
|
|
|
598
708
|
// src/modules-features/admin/core/core27311/F_core27311.tsx
|
|
709
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
599
710
|
function F_core27311() {
|
|
600
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ jsx24(MyPageContent, { rightTopBar: /* @__PURE__ */ jsx24(F_core27311_Create, {}), children: /* @__PURE__ */ jsx24(F_core27311_Read, {}) });
|
|
601
712
|
}
|
|
602
713
|
|
|
603
714
|
// src/modules-features/admin/core/core38677/F_core38677.tsx
|
|
@@ -657,6 +768,7 @@ function utils_core83092_mergePage(arr1, arr2) {
|
|
|
657
768
|
}
|
|
658
769
|
|
|
659
770
|
// src/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx
|
|
771
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
660
772
|
function F_core38677_ReadUser() {
|
|
661
773
|
const store = useS_core83092();
|
|
662
774
|
const query = useQ_Account_GetAdminAccount();
|
|
@@ -689,7 +801,7 @@ function F_core38677_ReadUser() {
|
|
|
689
801
|
}, [query.data]);
|
|
690
802
|
if (query.isLoading) return "Loading...";
|
|
691
803
|
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
692
|
-
return /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ jsx25(Container, { fluid: true, children: /* @__PURE__ */ jsx25(
|
|
693
805
|
MyDataTable,
|
|
694
806
|
{
|
|
695
807
|
columns,
|
|
@@ -707,7 +819,7 @@ function F_core38677_ReadUser() {
|
|
|
707
819
|
}),
|
|
708
820
|
state: rowSelection
|
|
709
821
|
}
|
|
710
|
-
));
|
|
822
|
+
) });
|
|
711
823
|
}
|
|
712
824
|
function useQ_Account_GetAdminAccount() {
|
|
713
825
|
const query = useQuery7({
|
|
@@ -725,6 +837,7 @@ function useQ_Account_GetAdminAccount() {
|
|
|
725
837
|
// src/modules-features/admin/core/core38677/F_core38677_Save.tsx
|
|
726
838
|
import { useMutation } from "@tanstack/react-query";
|
|
727
839
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
840
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
728
841
|
function F_core38677_Save() {
|
|
729
842
|
const store = useS_core83092();
|
|
730
843
|
const disable = useState2(false);
|
|
@@ -753,7 +866,7 @@ function F_core38677_Save() {
|
|
|
753
866
|
}
|
|
754
867
|
disable[1](false);
|
|
755
868
|
}, [store.state.rolePermissions]);
|
|
756
|
-
return /* @__PURE__ */
|
|
869
|
+
return /* @__PURE__ */ jsx26(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
|
757
870
|
}
|
|
758
871
|
|
|
759
872
|
// src/data/menuData.ts
|
|
@@ -894,7 +1007,8 @@ var menuData = [
|
|
|
894
1007
|
import { Checkbox, Flex, ScrollArea, Table, Text } from "@mantine/core";
|
|
895
1008
|
import { IconEdit, IconEyeUp, IconFileExport, IconPlus, IconPrinter, IconTrash } from "@tabler/icons-react";
|
|
896
1009
|
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
897
|
-
import
|
|
1010
|
+
import React, { useEffect as useEffect3, useState as useState3 } from "react";
|
|
1011
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
898
1012
|
var title = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
899
1013
|
function F_core38677_ViewMenuPermissions() {
|
|
900
1014
|
var _a, _b;
|
|
@@ -909,107 +1023,173 @@ function F_core38677_ViewMenuPermissions() {
|
|
|
909
1023
|
store.setProperty("rolePermissions", query.data);
|
|
910
1024
|
}, [query.data]);
|
|
911
1025
|
if (((_a = list[0]) == null ? void 0 : _a.length) == 0) return "\u0110ang t\u1EA3i...";
|
|
912
|
-
return /* @__PURE__ */
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
|
916
|
-
style: {
|
|
917
|
-
position: "sticky",
|
|
918
|
-
top: 0,
|
|
919
|
-
zIndex: 1,
|
|
920
|
-
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
921
|
-
border: "1px solid var(--mantine-color-gray-4)"
|
|
922
|
-
}
|
|
923
|
-
},
|
|
924
|
-
/* @__PURE__ */ React2.createElement(Table.Tr, null, /* @__PURE__ */ React2.createElement(Table.Th, null, title), /* @__PURE__ */ React2.createElement(Table.Th, null, /* @__PURE__ */ React2.createElement(Flex, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React2.createElement(Checkbox, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
|
925
|
-
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
|
926
|
-
} }), /* @__PURE__ */ React2.createElement(MyFlexRow, { gap: 3 }, "Xem", /* @__PURE__ */ React2.createElement(IconEyeUp, { color: "gray" })))), /* @__PURE__ */ React2.createElement(Table.Th, null, /* @__PURE__ */ React2.createElement(Flex, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React2.createElement(Checkbox, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
|
927
|
-
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
|
928
|
-
} }), /* @__PURE__ */ React2.createElement(MyFlexRow, { gap: 3 }, "Th\xEAm", /* @__PURE__ */ React2.createElement(IconPlus, { color: "blue" })))), /* @__PURE__ */ React2.createElement(Table.Th, null, /* @__PURE__ */ React2.createElement(Flex, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React2.createElement(Checkbox, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
|
929
|
-
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
|
930
|
-
} }), /* @__PURE__ */ React2.createElement(MyFlexRow, { gap: 3 }, "S\u1EEDa", /* @__PURE__ */ React2.createElement(IconEdit, { color: "var(--mantine-color-yellow-8)" })))), /* @__PURE__ */ React2.createElement(Table.Th, null, /* @__PURE__ */ React2.createElement(Flex, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React2.createElement(Checkbox, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
|
931
|
-
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
|
932
|
-
} }), /* @__PURE__ */ React2.createElement(MyFlexRow, { gap: 3 }, "X\xF3a", /* @__PURE__ */ React2.createElement(IconTrash, { color: "var(--mantine-color-red-8)" })))), /* @__PURE__ */ React2.createElement(Table.Th, null, /* @__PURE__ */ React2.createElement(Flex, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React2.createElement(Checkbox, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
|
933
|
-
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
|
934
|
-
} }), /* @__PURE__ */ React2.createElement(MyFlexRow, { gap: 3 }, "In", /* @__PURE__ */ React2.createElement(IconPrinter, { color: "var(--mantine-color-cyan-8)" })))), /* @__PURE__ */ React2.createElement(Table.Th, null, /* @__PURE__ */ React2.createElement(Flex, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React2.createElement(Checkbox, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
|
935
|
-
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
|
936
|
-
} }), /* @__PURE__ */ React2.createElement(MyFlexRow, { gap: 3 }, "Xu\u1EA5t", /* @__PURE__ */ React2.createElement(IconFileExport, { color: "var(--mantine-color-green-8)" })))))
|
|
937
|
-
), /* @__PURE__ */ React2.createElement(Table.Tbody, { bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))" }, (_b = list[0]) == null ? void 0 : _b.map((item, idx) => {
|
|
938
|
-
if (item.links == void 0) return /* @__PURE__ */ React2.createElement(Table.Tr, { key: idx }, /* @__PURE__ */ React2.createElement(Table.Td, null, item.label), /* @__PURE__ */ React2.createElement(Table.Td, null, /* @__PURE__ */ React2.createElement(MyCenterFull, null, /* @__PURE__ */ React2.createElement(Checkbox, null))), /* @__PURE__ */ React2.createElement(Table.Td, null, /* @__PURE__ */ React2.createElement(MyCenterFull, null, /* @__PURE__ */ React2.createElement(Checkbox, null))), /* @__PURE__ */ React2.createElement(Table.Td, null, /* @__PURE__ */ React2.createElement(MyCenterFull, null, /* @__PURE__ */ React2.createElement(Checkbox, null))), /* @__PURE__ */ React2.createElement(Table.Td, null, /* @__PURE__ */ React2.createElement(MyCenterFull, null, /* @__PURE__ */ React2.createElement(Checkbox, null))), /* @__PURE__ */ React2.createElement(Table.Td, null, /* @__PURE__ */ React2.createElement(MyCenterFull, null, /* @__PURE__ */ React2.createElement(Checkbox, null))), /* @__PURE__ */ React2.createElement(Table.Td, null, /* @__PURE__ */ React2.createElement(MyCenterFull, null, /* @__PURE__ */ React2.createElement(Checkbox, null))));
|
|
939
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, { key: idx }, /* @__PURE__ */ React2.createElement(Table.Tr, { key: item.label }, /* @__PURE__ */ React2.createElement(
|
|
940
|
-
Table.Td,
|
|
1026
|
+
return /* @__PURE__ */ jsx27(ScrollArea.Autosize, { h: "70vh", children: /* @__PURE__ */ jsxs17(Table, { children: [
|
|
1027
|
+
/* @__PURE__ */ jsx27(
|
|
1028
|
+
Table.Thead,
|
|
941
1029
|
{
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
{
|
|
952
|
-
|
|
953
|
-
onChange: (e) => {
|
|
954
|
-
store.
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
{
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
})
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
|
|
1030
|
+
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
|
1031
|
+
style: {
|
|
1032
|
+
position: "sticky",
|
|
1033
|
+
top: 0,
|
|
1034
|
+
zIndex: 1,
|
|
1035
|
+
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
1036
|
+
border: "1px solid var(--mantine-color-gray-4)"
|
|
1037
|
+
},
|
|
1038
|
+
children: /* @__PURE__ */ jsxs17(Table.Tr, { children: [
|
|
1039
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: title }),
|
|
1040
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: /* @__PURE__ */ jsxs17(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
1041
|
+
/* @__PURE__ */ jsx27(Checkbox, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
|
1042
|
+
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
|
1043
|
+
} }),
|
|
1044
|
+
/* @__PURE__ */ jsxs17(MyFlexRow, { gap: 3, children: [
|
|
1045
|
+
"Xem",
|
|
1046
|
+
/* @__PURE__ */ jsx27(IconEyeUp, { color: "gray" })
|
|
1047
|
+
] })
|
|
1048
|
+
] }) }),
|
|
1049
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: /* @__PURE__ */ jsxs17(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
1050
|
+
/* @__PURE__ */ jsx27(Checkbox, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
|
1051
|
+
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
|
1052
|
+
} }),
|
|
1053
|
+
/* @__PURE__ */ jsxs17(MyFlexRow, { gap: 3, children: [
|
|
1054
|
+
"Th\xEAm",
|
|
1055
|
+
/* @__PURE__ */ jsx27(IconPlus, { color: "blue" })
|
|
1056
|
+
] })
|
|
1057
|
+
] }) }),
|
|
1058
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: /* @__PURE__ */ jsxs17(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
1059
|
+
/* @__PURE__ */ jsx27(Checkbox, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
|
1060
|
+
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
|
1061
|
+
} }),
|
|
1062
|
+
/* @__PURE__ */ jsxs17(MyFlexRow, { gap: 3, children: [
|
|
1063
|
+
"S\u1EEDa",
|
|
1064
|
+
/* @__PURE__ */ jsx27(IconEdit, { color: "var(--mantine-color-yellow-8)" })
|
|
1065
|
+
] })
|
|
1066
|
+
] }) }),
|
|
1067
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: /* @__PURE__ */ jsxs17(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
1068
|
+
/* @__PURE__ */ jsx27(Checkbox, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
|
1069
|
+
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
|
1070
|
+
} }),
|
|
1071
|
+
/* @__PURE__ */ jsxs17(MyFlexRow, { gap: 3, children: [
|
|
1072
|
+
"X\xF3a",
|
|
1073
|
+
/* @__PURE__ */ jsx27(IconTrash, { color: "var(--mantine-color-red-8)" })
|
|
1074
|
+
] })
|
|
1075
|
+
] }) }),
|
|
1076
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: /* @__PURE__ */ jsxs17(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
1077
|
+
/* @__PURE__ */ jsx27(Checkbox, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
|
1078
|
+
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
|
1079
|
+
} }),
|
|
1080
|
+
/* @__PURE__ */ jsxs17(MyFlexRow, { gap: 3, children: [
|
|
1081
|
+
"In",
|
|
1082
|
+
/* @__PURE__ */ jsx27(IconPrinter, { color: "var(--mantine-color-cyan-8)" })
|
|
1083
|
+
] })
|
|
1084
|
+
] }) }),
|
|
1085
|
+
/* @__PURE__ */ jsx27(Table.Th, { children: /* @__PURE__ */ jsxs17(Flex, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
1086
|
+
/* @__PURE__ */ jsx27(Checkbox, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
|
1087
|
+
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
|
1088
|
+
} }),
|
|
1089
|
+
/* @__PURE__ */ jsxs17(MyFlexRow, { gap: 3, children: [
|
|
1090
|
+
"Xu\u1EA5t",
|
|
1091
|
+
/* @__PURE__ */ jsx27(IconFileExport, { color: "var(--mantine-color-green-8)" })
|
|
1092
|
+
] })
|
|
1093
|
+
] }) })
|
|
1094
|
+
] })
|
|
1095
|
+
}
|
|
1096
|
+
),
|
|
1097
|
+
/* @__PURE__ */ jsx27(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) => {
|
|
1098
|
+
if (item.links == void 0) return /* @__PURE__ */ jsxs17(Table.Tr, { children: [
|
|
1099
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: item.label }),
|
|
1100
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(Checkbox, {}) }) }),
|
|
1101
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(Checkbox, {}) }) }),
|
|
1102
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(Checkbox, {}) }) }),
|
|
1103
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(Checkbox, {}) }) }),
|
|
1104
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(Checkbox, {}) }) }),
|
|
1105
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(Checkbox, {}) }) })
|
|
1106
|
+
] }, idx);
|
|
1107
|
+
return /* @__PURE__ */ jsxs17(React.Fragment, { children: [
|
|
1108
|
+
/* @__PURE__ */ jsx27(Table.Tr, { children: /* @__PURE__ */ jsx27(
|
|
1109
|
+
Table.Td,
|
|
981
1110
|
{
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
isDelete: e.target.checked
|
|
986
|
-
});
|
|
987
|
-
}
|
|
1111
|
+
colSpan: 7,
|
|
1112
|
+
bg: OBJECT_COlORS.mantineBackgroundBlueLight,
|
|
1113
|
+
children: /* @__PURE__ */ jsx27(Text, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
|
988
1114
|
}
|
|
989
|
-
)
|
|
990
|
-
|
|
991
|
-
{
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1115
|
+
) }, item.label),
|
|
1116
|
+
item.links.map(
|
|
1117
|
+
(item2, idx2) => {
|
|
1118
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
1119
|
+
return /* @__PURE__ */ jsxs17(Table.Tr, { children: [
|
|
1120
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: item2.label }),
|
|
1121
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(
|
|
1122
|
+
Checkbox,
|
|
1123
|
+
{
|
|
1124
|
+
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
|
1125
|
+
onChange: (e) => {
|
|
1126
|
+
store.updatePermission(item2.pageId, {
|
|
1127
|
+
isRead: e.target.checked
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
) }) }),
|
|
1132
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(
|
|
1133
|
+
Checkbox,
|
|
1134
|
+
{
|
|
1135
|
+
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
|
1136
|
+
onChange: (e) => {
|
|
1137
|
+
store.updatePermission(item2.pageId, {
|
|
1138
|
+
isCreate: e.target.checked
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
) }) }),
|
|
1143
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(
|
|
1144
|
+
Checkbox,
|
|
1145
|
+
{
|
|
1146
|
+
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
|
1147
|
+
onChange: (e) => {
|
|
1148
|
+
store.updatePermission(item2.pageId, {
|
|
1149
|
+
isUpdate: e.target.checked
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
) }) }),
|
|
1154
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(
|
|
1155
|
+
Checkbox,
|
|
1156
|
+
{
|
|
1157
|
+
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
|
1158
|
+
onChange: (e) => {
|
|
1159
|
+
store.updatePermission(item2.pageId, {
|
|
1160
|
+
isDelete: e.target.checked
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
) }) }),
|
|
1165
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(
|
|
1166
|
+
Checkbox,
|
|
1167
|
+
{
|
|
1168
|
+
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
|
1169
|
+
onChange: (e) => {
|
|
1170
|
+
store.updatePermission(item2.pageId, {
|
|
1171
|
+
isPrint: e.target.checked
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
) }) }),
|
|
1176
|
+
/* @__PURE__ */ jsx27(Table.Td, { children: /* @__PURE__ */ jsx27(MyCenterFull, { children: /* @__PURE__ */ jsx27(
|
|
1177
|
+
Checkbox,
|
|
1178
|
+
{
|
|
1179
|
+
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
|
1180
|
+
onChange: (e) => {
|
|
1181
|
+
store.updatePermission(item2.pageId, {
|
|
1182
|
+
isExport: e.target.checked
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
) }) })
|
|
1187
|
+
] }, idx2);
|
|
998
1188
|
}
|
|
999
|
-
)
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
onChange: (e) => {
|
|
1004
|
-
store.updatePermission(item2.pageId, {
|
|
1005
|
-
isExport: e.target.checked
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
))));
|
|
1010
|
-
}
|
|
1011
|
-
));
|
|
1012
|
-
}))));
|
|
1189
|
+
)
|
|
1190
|
+
] }, idx);
|
|
1191
|
+
}) })
|
|
1192
|
+
] }) });
|
|
1013
1193
|
}
|
|
1014
1194
|
function useGetUserPermission() {
|
|
1015
1195
|
const store = useS_core83092();
|
|
@@ -1048,6 +1228,9 @@ function useGetUserPermission() {
|
|
|
1048
1228
|
return query;
|
|
1049
1229
|
}
|
|
1050
1230
|
|
|
1231
|
+
// src/modules-features/admin/core/core38677/F_core38677.tsx
|
|
1232
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1233
|
+
|
|
1051
1234
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
1052
1235
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
1053
1236
|
import { useMemo as useMemo7 } from "react";
|
|
@@ -1055,11 +1238,12 @@ import { useMemo as useMemo7 } from "react";
|
|
|
1055
1238
|
// src/modules-features/admin/core/core40207/F_core40207_Create.tsx
|
|
1056
1239
|
import { FileInput as FileInput3 } from "@mantine/core";
|
|
1057
1240
|
import { useForm as useForm11 } from "@mantine/form";
|
|
1241
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1058
1242
|
function F_core40207_Create() {
|
|
1059
1243
|
const form = useForm11({
|
|
1060
1244
|
mode: "uncontrolled"
|
|
1061
1245
|
});
|
|
1062
|
-
return /* @__PURE__ */
|
|
1246
|
+
return /* @__PURE__ */ jsxs19(MyButtonCreate, { objectName: "v\u0103n b\u1EA3n", form, onSubmit: async (values) => {
|
|
1063
1247
|
return await baseAxios_default.post(
|
|
1064
1248
|
"/Document/create",
|
|
1065
1249
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -1068,17 +1252,23 @@ function F_core40207_Create() {
|
|
|
1068
1252
|
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
1069
1253
|
})
|
|
1070
1254
|
);
|
|
1071
|
-
}
|
|
1255
|
+
}, children: [
|
|
1256
|
+
/* @__PURE__ */ jsx29(MyTextInput, __spreadValues({ label: "M\xE3 t\xE0i li\u1EC7u" }, form.getInputProps("code"))),
|
|
1257
|
+
/* @__PURE__ */ jsx29(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
1258
|
+
/* @__PURE__ */ jsx29(FileInput3, __spreadValues({ label: "T\xE0i li\u1EC7u" }, form.getInputProps("file")))
|
|
1259
|
+
] });
|
|
1072
1260
|
}
|
|
1073
1261
|
|
|
1074
1262
|
// src/modules-features/admin/core/core40207/F_core40207_Delete.tsx
|
|
1263
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1075
1264
|
function F_core40207_Delete({ id }) {
|
|
1076
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsx30(MyActionIconDelete, { onSubmit: () => baseAxios_default.post("/Document/delete", { id }) });
|
|
1077
1266
|
}
|
|
1078
1267
|
|
|
1079
1268
|
// src/modules-features/admin/core/core40207/F_core40207_Update.tsx
|
|
1080
1269
|
import { FileInput as FileInput4 } from "@mantine/core";
|
|
1081
1270
|
import { useForm as useForm12 } from "@mantine/form";
|
|
1271
|
+
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1082
1272
|
function F_core40207_Update({ values }) {
|
|
1083
1273
|
var _a;
|
|
1084
1274
|
const form = useForm12({
|
|
@@ -1088,14 +1278,19 @@ function F_core40207_Update({ values }) {
|
|
|
1088
1278
|
promulgateDate: new Date(values.promulgateDate)
|
|
1089
1279
|
})
|
|
1090
1280
|
});
|
|
1091
|
-
return /* @__PURE__ */
|
|
1281
|
+
return /* @__PURE__ */ jsxs20(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
1092
1282
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
1093
1283
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
1094
1284
|
}));
|
|
1095
|
-
}
|
|
1285
|
+
}, children: [
|
|
1286
|
+
/* @__PURE__ */ jsx31(MyTextInput, __spreadValues({ label: "M\xE3 t\xE0i li\u1EC7u" }, form.getInputProps("code"))),
|
|
1287
|
+
/* @__PURE__ */ jsx31(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
1288
|
+
/* @__PURE__ */ jsx31(FileInput4, __spreadValues({ label: "Ch\u1ECDn file" }, form.getInputProps("file")))
|
|
1289
|
+
] });
|
|
1096
1290
|
}
|
|
1097
1291
|
|
|
1098
1292
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
1293
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1099
1294
|
function F_core40207_Read() {
|
|
1100
1295
|
const query = useQuery9({
|
|
1101
1296
|
queryKey: ["F_core40207_Read"],
|
|
@@ -1118,7 +1313,7 @@ function F_core40207_Read() {
|
|
|
1118
1313
|
{
|
|
1119
1314
|
header: "File",
|
|
1120
1315
|
accessorFn: (row) => {
|
|
1121
|
-
return /* @__PURE__ */
|
|
1316
|
+
return /* @__PURE__ */ jsx32(MyCenterFull, { children: /* @__PURE__ */ jsx32(MyButtonViewPDF, { id: row.id }) });
|
|
1122
1317
|
}
|
|
1123
1318
|
}
|
|
1124
1319
|
],
|
|
@@ -1126,22 +1321,26 @@ function F_core40207_Read() {
|
|
|
1126
1321
|
);
|
|
1127
1322
|
if (query.isLoading) return "Loading...";
|
|
1128
1323
|
if (query.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
1129
|
-
return /* @__PURE__ */
|
|
1324
|
+
return /* @__PURE__ */ jsx32(
|
|
1130
1325
|
MyDataTable,
|
|
1131
1326
|
{
|
|
1132
1327
|
columns,
|
|
1133
1328
|
data: query.data,
|
|
1134
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
1329
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx32(F_core40207_Create, {}),
|
|
1135
1330
|
renderRowActions: ({ row }) => {
|
|
1136
|
-
return /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ jsxs21(MyCenterFull, { children: [
|
|
1332
|
+
/* @__PURE__ */ jsx32(F_core40207_Update, { values: row.original }),
|
|
1333
|
+
/* @__PURE__ */ jsx32(F_core40207_Delete, { id: row.original.id })
|
|
1334
|
+
] });
|
|
1137
1335
|
}
|
|
1138
1336
|
}
|
|
1139
1337
|
);
|
|
1140
1338
|
}
|
|
1141
1339
|
|
|
1142
1340
|
// src/modules-features/admin/core/core40207/F_core40207.tsx
|
|
1341
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1143
1342
|
function F_core40207() {
|
|
1144
|
-
return /* @__PURE__ */
|
|
1343
|
+
return /* @__PURE__ */ jsx33(MyPageContent, { children: /* @__PURE__ */ jsx33(F_core40207_Read, {}) });
|
|
1145
1344
|
}
|
|
1146
1345
|
|
|
1147
1346
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
|
@@ -1150,9 +1349,10 @@ import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
|
1150
1349
|
import { useMemo as useMemo8 } from "react";
|
|
1151
1350
|
|
|
1152
1351
|
// src/modules-features/admin/core/core47643/F_core47643_Delete.tsx
|
|
1352
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1153
1353
|
var ENDPOINT = "/Role/Delete";
|
|
1154
1354
|
function F_core47643_Delete({ values }) {
|
|
1155
|
-
return /* @__PURE__ */
|
|
1355
|
+
return /* @__PURE__ */ jsx34(
|
|
1156
1356
|
MyActionIconDelete,
|
|
1157
1357
|
{
|
|
1158
1358
|
contextData: values.code,
|
|
@@ -1163,20 +1363,28 @@ function F_core47643_Delete({ values }) {
|
|
|
1163
1363
|
|
|
1164
1364
|
// src/modules-features/admin/core/core47643/F_core47643_Form.tsx
|
|
1165
1365
|
import { useForm as useForm13 } from "@mantine/form";
|
|
1366
|
+
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1166
1367
|
function F_core47643_Form({ values }) {
|
|
1167
1368
|
const form = useForm13({
|
|
1168
1369
|
mode: "uncontrolled",
|
|
1169
1370
|
initialValues: values
|
|
1170
1371
|
});
|
|
1171
|
-
if (values) return /* @__PURE__ */
|
|
1372
|
+
if (values) return /* @__PURE__ */ jsxs22(MyActionIconUpdate, { form, onSubmit: async () => {
|
|
1172
1373
|
return await baseAxios_default.post("/Role/Update", form.getValues());
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1374
|
+
}, children: [
|
|
1375
|
+
/* @__PURE__ */ jsx35(MyTextInput, __spreadValues({ readOnly: true, variant: "filled", label: "M\xE3" }, form.getInputProps("code"))),
|
|
1376
|
+
/* @__PURE__ */ jsx35(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
|
1377
|
+
] });
|
|
1378
|
+
return /* @__PURE__ */ jsxs22(MyButtonCreate, { form, onSubmit: async () => {
|
|
1175
1379
|
return await baseAxios_default.post("/Role/Create", form.getValues());
|
|
1176
|
-
}
|
|
1380
|
+
}, children: [
|
|
1381
|
+
/* @__PURE__ */ jsx35(MyTextInput, __spreadValues({ label: "M\xE3" }, form.getInputProps("code"))),
|
|
1382
|
+
/* @__PURE__ */ jsx35(MyTextInput, __spreadValues({ label: "Quy\u1EC1n" }, form.getInputProps("name")))
|
|
1383
|
+
] });
|
|
1177
1384
|
}
|
|
1178
1385
|
|
|
1179
1386
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
|
1387
|
+
import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1180
1388
|
function F_core47643_Read() {
|
|
1181
1389
|
const query = useQ_core47643_GetAdminRole();
|
|
1182
1390
|
const columns = useMemo8(() => [
|
|
@@ -1191,13 +1399,16 @@ function F_core47643_Read() {
|
|
|
1191
1399
|
], []);
|
|
1192
1400
|
if (query.isLoading) return "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...";
|
|
1193
1401
|
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
1194
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsx36(
|
|
1195
1403
|
MyDataTable,
|
|
1196
1404
|
{
|
|
1197
1405
|
data: query.data,
|
|
1198
1406
|
columns,
|
|
1199
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
1200
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
|
1407
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx36(Group, { children: /* @__PURE__ */ jsx36(F_core47643_Form, {}) }),
|
|
1408
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs23(MyCenterFull, { children: [
|
|
1409
|
+
/* @__PURE__ */ jsx36(F_core47643_Form, { values: row.original }),
|
|
1410
|
+
/* @__PURE__ */ jsx36(F_core47643_Delete, { values: row.original })
|
|
1411
|
+
] })
|
|
1201
1412
|
}
|
|
1202
1413
|
);
|
|
1203
1414
|
}
|
|
@@ -1213,14 +1424,15 @@ function useQ_core47643_GetAdminRole() {
|
|
|
1213
1424
|
}
|
|
1214
1425
|
|
|
1215
1426
|
// src/modules-features/admin/core/core47643/F_core47643.tsx
|
|
1427
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1216
1428
|
function F_core47643() {
|
|
1217
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ jsx37(MyPageContent, { title: "Danh m\u1EE5c quy\u1EC1n", canBack: true, children: /* @__PURE__ */ jsx37(F_core47643_Read, {}) });
|
|
1218
1430
|
}
|
|
1219
1431
|
|
|
1220
1432
|
// src/modules-features/admin/core/core64229/F_core64229_Delete.tsx
|
|
1221
|
-
import
|
|
1433
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1222
1434
|
function F_core64229_Delete({ values }) {
|
|
1223
|
-
return /* @__PURE__ */
|
|
1435
|
+
return /* @__PURE__ */ jsx38(
|
|
1224
1436
|
MyActionIconDelete,
|
|
1225
1437
|
{
|
|
1226
1438
|
contextData: values == null ? void 0 : values.code,
|
|
@@ -1245,7 +1457,7 @@ var ENUM_EMAILCONFIG_MODULE = /* @__PURE__ */ ((ENUM_EMAILCONFIG_MODULE2) => {
|
|
|
1245
1457
|
// src/modules-features/admin/core/core64229/F_core64229_Form.tsx
|
|
1246
1458
|
import { PasswordInput } from "@mantine/core";
|
|
1247
1459
|
import { useForm as useForm14 } from "@mantine/form";
|
|
1248
|
-
import
|
|
1460
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1249
1461
|
function F_core64229_Form({ values }) {
|
|
1250
1462
|
const form = useForm14({
|
|
1251
1463
|
mode: "uncontrolled",
|
|
@@ -1271,73 +1483,82 @@ function F_core64229_Form({ values }) {
|
|
|
1271
1483
|
"password": formValues.password
|
|
1272
1484
|
});
|
|
1273
1485
|
}
|
|
1274
|
-
if (values) return /* @__PURE__ */
|
|
1486
|
+
if (values) return /* @__PURE__ */ jsx39(
|
|
1275
1487
|
MyActionIconUpdate,
|
|
1276
1488
|
{
|
|
1277
1489
|
form,
|
|
1278
|
-
onSubmit: handleSubmit
|
|
1279
|
-
|
|
1280
|
-
|
|
1490
|
+
onSubmit: handleSubmit,
|
|
1491
|
+
children: /* @__PURE__ */ jsx39(FormInput, { form })
|
|
1492
|
+
}
|
|
1281
1493
|
);
|
|
1282
|
-
return /* @__PURE__ */
|
|
1494
|
+
return /* @__PURE__ */ jsx39(
|
|
1283
1495
|
MyButtonCreate,
|
|
1284
1496
|
{
|
|
1285
1497
|
form,
|
|
1286
|
-
onSubmit: handleSubmit
|
|
1287
|
-
|
|
1288
|
-
|
|
1498
|
+
onSubmit: handleSubmit,
|
|
1499
|
+
children: /* @__PURE__ */ jsx39(FormInput, { form })
|
|
1500
|
+
}
|
|
1289
1501
|
);
|
|
1290
1502
|
}
|
|
1291
1503
|
function FormInput({ form }) {
|
|
1292
1504
|
var _a, _b;
|
|
1293
|
-
return /* @__PURE__ */
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1505
|
+
return /* @__PURE__ */ jsxs24(MyFlexColumn, { children: [
|
|
1506
|
+
/* @__PURE__ */ jsx39(
|
|
1507
|
+
MySelect,
|
|
1508
|
+
__spreadProps(__spreadValues({
|
|
1509
|
+
label: "Ph\xE2n h\u1EC7",
|
|
1510
|
+
data: utils_converter_enumToSelectOptions(ENUM_EMAILCONFIG_MODULE)
|
|
1511
|
+
}, form.getInputProps("emailModule")), {
|
|
1512
|
+
value: (_a = form.getValues().emailModule) == null ? void 0 : _a.toString()
|
|
1513
|
+
})
|
|
1514
|
+
),
|
|
1515
|
+
/* @__PURE__ */ jsx39(
|
|
1516
|
+
MyTextInput,
|
|
1517
|
+
__spreadValues({
|
|
1518
|
+
label: "Host mail server"
|
|
1519
|
+
}, form.getInputProps("hostMailServer"))
|
|
1520
|
+
),
|
|
1521
|
+
/* @__PURE__ */ jsx39(
|
|
1522
|
+
MyNumberInput,
|
|
1523
|
+
__spreadValues({
|
|
1524
|
+
label: "Outgoing port"
|
|
1525
|
+
}, form.getInputProps("outgoingPort"))
|
|
1526
|
+
),
|
|
1527
|
+
/* @__PURE__ */ jsx39(
|
|
1528
|
+
MyNumberInput,
|
|
1529
|
+
__spreadValues({
|
|
1530
|
+
label: "Incoming port"
|
|
1531
|
+
}, form.getInputProps("incomingPort"))
|
|
1532
|
+
),
|
|
1533
|
+
/* @__PURE__ */ jsx39(
|
|
1534
|
+
MySelect,
|
|
1535
|
+
{
|
|
1536
|
+
label: "SSL",
|
|
1537
|
+
data: ["true", "false"],
|
|
1538
|
+
value: (_b = form.getValues().sll) == null ? void 0 : _b.toString(),
|
|
1539
|
+
onChange: (e) => form.setFieldValue("sll", e == "true" ? true : false)
|
|
1540
|
+
}
|
|
1541
|
+
),
|
|
1542
|
+
/* @__PURE__ */ jsx39(
|
|
1543
|
+
MyTextInput,
|
|
1544
|
+
__spreadValues({
|
|
1545
|
+
label: "Username"
|
|
1546
|
+
}, form.getInputProps("userName"))
|
|
1547
|
+
),
|
|
1548
|
+
/* @__PURE__ */ jsx39(
|
|
1549
|
+
PasswordInput,
|
|
1550
|
+
__spreadValues({
|
|
1551
|
+
label: "Password",
|
|
1552
|
+
placeholder: "Nh\u1EADp password"
|
|
1553
|
+
}, form.getInputProps("password"))
|
|
1554
|
+
)
|
|
1555
|
+
] });
|
|
1336
1556
|
}
|
|
1337
1557
|
|
|
1338
1558
|
// src/modules-features/admin/core/core64229/F_core64229_Read.tsx
|
|
1339
1559
|
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
1340
|
-
import
|
|
1560
|
+
import { useMemo as useMemo9 } from "react";
|
|
1561
|
+
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1341
1562
|
function F_core64229_Read() {
|
|
1342
1563
|
const query = useQuery11({
|
|
1343
1564
|
queryKey: ["F_core64229_Read"],
|
|
@@ -1382,13 +1603,16 @@ function F_core64229_Read() {
|
|
|
1382
1603
|
}
|
|
1383
1604
|
], []);
|
|
1384
1605
|
if (query.isLoading) return "\u0110ang t\u1EA3i";
|
|
1385
|
-
return /* @__PURE__ */
|
|
1606
|
+
return /* @__PURE__ */ jsx40(
|
|
1386
1607
|
MyDataTable,
|
|
1387
1608
|
{
|
|
1388
1609
|
columns,
|
|
1389
1610
|
data: query.data,
|
|
1390
|
-
renderTopToolbarCustomActions: () => /* @__PURE__ */
|
|
1391
|
-
renderRowActions: ({ row }) => /* @__PURE__ */
|
|
1611
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx40(F_core64229_Form, {}),
|
|
1612
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs25(MyCenterFull, { children: [
|
|
1613
|
+
/* @__PURE__ */ jsx40(F_core64229_Form, { values: row.original }),
|
|
1614
|
+
/* @__PURE__ */ jsx40(F_core64229_Delete, { values: row.original })
|
|
1615
|
+
] })
|
|
1392
1616
|
}
|
|
1393
1617
|
);
|
|
1394
1618
|
}
|
|
@@ -1405,6 +1629,7 @@ import { Button, Fieldset, Group as Group2, Table as Table2 } from "@mantine/cor
|
|
|
1405
1629
|
import { useDisclosure } from "@mantine/hooks";
|
|
1406
1630
|
import { useMutation as useMutation2, useQuery as useQuery12, useQueryClient } from "@tanstack/react-query";
|
|
1407
1631
|
import { useEffect as useEffect4, useMemo as useMemo10, useState as useState4 } from "react";
|
|
1632
|
+
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1408
1633
|
function F_core71678_ChangePermission({ user }) {
|
|
1409
1634
|
const disc = useDisclosure();
|
|
1410
1635
|
const queryClient = useQueryClient();
|
|
@@ -1451,42 +1676,62 @@ function F_core71678_ChangePermission({ user }) {
|
|
|
1451
1676
|
}, {});
|
|
1452
1677
|
setRowSelection(result);
|
|
1453
1678
|
}, []);
|
|
1454
|
-
return /* @__PURE__ */
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1679
|
+
return /* @__PURE__ */ jsxs26(MyButtonModal, { modalSize: "xl", disclosure: disc, title: "Ch\u1ECDn quy\u1EC1n cho ng\u01B0\u1EDDi d\xF9ng", label: "S\u1EEDa quy\u1EC1n", children: [
|
|
1680
|
+
/* @__PURE__ */ jsx41(
|
|
1681
|
+
Table2,
|
|
1682
|
+
{
|
|
1683
|
+
w: "100%",
|
|
1684
|
+
variant: "vertical",
|
|
1685
|
+
layout: "fixed",
|
|
1686
|
+
children: /* @__PURE__ */ jsxs26(Table2.Tbody, { children: [
|
|
1687
|
+
/* @__PURE__ */ jsxs26(Table2.Tr, { children: [
|
|
1688
|
+
/* @__PURE__ */ jsx41(Table2.Th, { w: 160, children: "H\u1ECD v\xE0 t\xEAn:" }),
|
|
1689
|
+
/* @__PURE__ */ jsx41(Table2.Td, { children: user.fullName })
|
|
1690
|
+
] }),
|
|
1691
|
+
/* @__PURE__ */ jsxs26(Table2.Tr, { children: [
|
|
1692
|
+
/* @__PURE__ */ jsx41(Table2.Th, { children: "T\xEAn \u0111\u0103ng nh\u1EADp:" }),
|
|
1693
|
+
/* @__PURE__ */ jsx41(Table2.Td, { children: user.userName })
|
|
1694
|
+
] }),
|
|
1695
|
+
/* @__PURE__ */ jsxs26(Table2.Tr, { children: [
|
|
1696
|
+
/* @__PURE__ */ jsx41(Table2.Th, { children: "Email:" }),
|
|
1697
|
+
/* @__PURE__ */ jsx41(Table2.Td, { children: user.email })
|
|
1698
|
+
] })
|
|
1699
|
+
] })
|
|
1700
|
+
}
|
|
1701
|
+
),
|
|
1702
|
+
query.isLoading && "\u0110ang t\u1EA3i d\u1EEF li\u1EC7u...",
|
|
1703
|
+
query.isError && "L\u1ED7i khi t\u1EA3i d\u1EEF li\u1EC7u...",
|
|
1704
|
+
/* @__PURE__ */ jsx41(Fieldset, { legend: "Ch\u1ECDn quy\u1EC1n", children: /* @__PURE__ */ jsx41(
|
|
1705
|
+
MyDataTable,
|
|
1706
|
+
{
|
|
1707
|
+
enableRowSelection: true,
|
|
1708
|
+
onRowSelectionChange: setRowSelection,
|
|
1709
|
+
state: { rowSelection },
|
|
1710
|
+
setSelectedRow: rowSelect[1],
|
|
1711
|
+
getRowId: (originalRow) => {
|
|
1712
|
+
var _a;
|
|
1713
|
+
return (_a = originalRow.id) == null ? void 0 : _a.toString();
|
|
1714
|
+
},
|
|
1715
|
+
initialState: {
|
|
1716
|
+
density: "xs",
|
|
1717
|
+
pagination: { pageIndex: 0, pageSize: 10 },
|
|
1718
|
+
columnPinning: { right: ["mrt-row-actions"] },
|
|
1719
|
+
columnVisibility: {
|
|
1720
|
+
nguoiCapNhat: false,
|
|
1721
|
+
ngayCapNhat: false
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
columns: permissionColumns,
|
|
1725
|
+
data: query.data
|
|
1726
|
+
}
|
|
1727
|
+
) }),
|
|
1728
|
+
/* @__PURE__ */ jsx41(Group2, { justify: "flex-end", mt: 24, children: /* @__PURE__ */ jsx41(Button, { onClick: handleSave, children: "L\u01B0u" }) })
|
|
1729
|
+
] });
|
|
1486
1730
|
}
|
|
1487
1731
|
|
|
1488
1732
|
// src/modules-features/admin/core/core71678/F_core71678_Create.tsx
|
|
1489
1733
|
import { useForm as useForm15 } from "@mantine/form";
|
|
1734
|
+
import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1490
1735
|
var ENDPOINT2 = "/Account/create";
|
|
1491
1736
|
function F_core71678_Create() {
|
|
1492
1737
|
const form = useForm15({
|
|
@@ -1514,13 +1759,21 @@ function F_core71678_Create() {
|
|
|
1514
1759
|
AQModuleId: 1002
|
|
1515
1760
|
}));
|
|
1516
1761
|
}
|
|
1517
|
-
return /* @__PURE__ */
|
|
1762
|
+
return /* @__PURE__ */ jsxs27(MyButtonCreate, { form, onSubmit: handleSubmit, objectName: "ng\u01B0\u1EDDi d\xF9ng", children: [
|
|
1763
|
+
/* @__PURE__ */ jsx42(MyTextInput, __spreadValues({ label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
|
1764
|
+
/* @__PURE__ */ jsx42(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
|
1765
|
+
/* @__PURE__ */ jsx42(MyTextInput, __spreadValues({ label: "M\u1EADt kh\u1EA9u" }, form.getInputProps("password"))),
|
|
1766
|
+
/* @__PURE__ */ jsx42(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
|
1767
|
+
/* @__PURE__ */ jsx42(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
|
1768
|
+
/* @__PURE__ */ jsx42(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
|
|
1769
|
+
] });
|
|
1518
1770
|
}
|
|
1519
1771
|
|
|
1520
1772
|
// src/modules-features/admin/core/core71678/F_core71678_Delete.tsx
|
|
1773
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1521
1774
|
var ENDPOINT3 = "/Account/delete";
|
|
1522
1775
|
function F_core71678_Delete({ id, code }) {
|
|
1523
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ jsx43(
|
|
1524
1777
|
MyActionIconDelete,
|
|
1525
1778
|
{
|
|
1526
1779
|
contextData: code,
|
|
@@ -1532,6 +1785,7 @@ function F_core71678_Delete({ id, code }) {
|
|
|
1532
1785
|
// src/modules-features/admin/core/core71678/F_core71678_Update.tsx
|
|
1533
1786
|
import { useForm as useForm16 } from "@mantine/form";
|
|
1534
1787
|
import { useEffect as useEffect5 } from "react";
|
|
1788
|
+
import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1535
1789
|
function F_core71678_Update({ user }) {
|
|
1536
1790
|
const form = useForm16({
|
|
1537
1791
|
initialValues: user
|
|
@@ -1539,7 +1793,7 @@ function F_core71678_Update({ user }) {
|
|
|
1539
1793
|
useEffect5(() => {
|
|
1540
1794
|
console.log(form.values);
|
|
1541
1795
|
}, [form.values]);
|
|
1542
|
-
return /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ jsx44(MyActionIconUpdate, { form, onSubmit: async (values) => {
|
|
1543
1797
|
return await baseAxios_default.post(
|
|
1544
1798
|
"/Account/update",
|
|
1545
1799
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -1551,10 +1805,17 @@ function F_core71678_Update({ user }) {
|
|
|
1551
1805
|
workingUnitId: null
|
|
1552
1806
|
})
|
|
1553
1807
|
);
|
|
1554
|
-
}
|
|
1808
|
+
}, children: /* @__PURE__ */ jsxs28(MyFlexColumn, { children: [
|
|
1809
|
+
/* @__PURE__ */ jsx44(MyTextInput, __spreadValues({ disabled: true, label: "M\xE3 t\xE0i kho\u1EA3n" }, form.getInputProps("code"))),
|
|
1810
|
+
/* @__PURE__ */ jsx44(MyTextInput, __spreadValues({ disabled: true, label: "T\xEAn t\xE0i kho\u1EA3n" }, form.getInputProps("userName"))),
|
|
1811
|
+
/* @__PURE__ */ jsx44(MyTextInput, __spreadValues({ label: "H\u1ECD v\xE0 t\xEAn" }, form.getInputProps("fullName"))),
|
|
1812
|
+
/* @__PURE__ */ jsx44(MyTextInput, __spreadValues({ label: "Email" }, form.getInputProps("email"))),
|
|
1813
|
+
/* @__PURE__ */ jsx44(MyTextInput, __spreadValues({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i" }, form.getInputProps("phoneNumber")))
|
|
1814
|
+
] }) });
|
|
1555
1815
|
}
|
|
1556
1816
|
|
|
1557
1817
|
// src/modules-features/admin/core/core71678/F_core71678_Read.tsx
|
|
1818
|
+
import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1558
1819
|
var ENDPOINT4 = "/Account/GetAdminAccount";
|
|
1559
1820
|
function F_core71678_Read() {
|
|
1560
1821
|
const router = useRouter();
|
|
@@ -1586,37 +1847,46 @@ function F_core71678_Read() {
|
|
|
1586
1847
|
},
|
|
1587
1848
|
{
|
|
1588
1849
|
header: "Quy\u1EC1n",
|
|
1589
|
-
accessorFn: (row) => /* @__PURE__ */
|
|
1850
|
+
accessorFn: (row) => /* @__PURE__ */ jsx45(F_core71678_ChangePermission, { user: row })
|
|
1590
1851
|
}
|
|
1591
1852
|
],
|
|
1592
1853
|
[]
|
|
1593
1854
|
);
|
|
1594
1855
|
if (AllUserQuery.isLoading) return "Loading...";
|
|
1595
|
-
return /* @__PURE__ */
|
|
1856
|
+
return /* @__PURE__ */ jsx45(
|
|
1596
1857
|
MyDataTable,
|
|
1597
1858
|
{
|
|
1598
1859
|
columns,
|
|
1599
1860
|
data: AllUserQuery.data,
|
|
1600
1861
|
renderTopToolbarCustomActions: () => {
|
|
1601
|
-
return /* @__PURE__ */
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1862
|
+
return /* @__PURE__ */ jsxs29(Group3, { children: [
|
|
1863
|
+
/* @__PURE__ */ jsx45(F_core71678_Create, {}),
|
|
1864
|
+
/* @__PURE__ */ jsx45(
|
|
1865
|
+
Button2,
|
|
1866
|
+
{
|
|
1867
|
+
color: "violet",
|
|
1868
|
+
leftSection: /* @__PURE__ */ jsx45(IconShield, {}),
|
|
1869
|
+
onClick: () => {
|
|
1870
|
+
router.push("core47643");
|
|
1871
|
+
},
|
|
1872
|
+
children: "Danh m\u1EE5c quy\u1EC1n"
|
|
1608
1873
|
}
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
));
|
|
1874
|
+
)
|
|
1875
|
+
] });
|
|
1612
1876
|
},
|
|
1613
1877
|
renderRowActions: ({ row }) => {
|
|
1614
|
-
return /* @__PURE__ */
|
|
1878
|
+
return /* @__PURE__ */ jsxs29(MyCenterFull, { children: [
|
|
1879
|
+
/* @__PURE__ */ jsx45(F_core71678_Update, { user: row.original }),
|
|
1880
|
+
/* @__PURE__ */ jsx45(F_core71678_Delete, { id: row.original.id, code: row.original.code })
|
|
1881
|
+
] });
|
|
1615
1882
|
}
|
|
1616
1883
|
}
|
|
1617
1884
|
);
|
|
1618
1885
|
}
|
|
1619
1886
|
|
|
1887
|
+
// src/modules-features/admin/core/core71678/F_core71678.tsx
|
|
1888
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1889
|
+
|
|
1620
1890
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
1621
1891
|
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
1622
1892
|
import { useMemo as useMemo12 } from "react";
|
|
@@ -1624,11 +1894,12 @@ import { useMemo as useMemo12 } from "react";
|
|
|
1624
1894
|
// src/modules-features/admin/core/core76318/F_core76318_Create.tsx
|
|
1625
1895
|
import { FileInput as FileInput5 } from "@mantine/core";
|
|
1626
1896
|
import { useForm as useForm17 } from "@mantine/form";
|
|
1897
|
+
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1627
1898
|
function F_core76318_Create() {
|
|
1628
1899
|
const form = useForm17({
|
|
1629
1900
|
mode: "uncontrolled"
|
|
1630
1901
|
});
|
|
1631
|
-
return /* @__PURE__ */
|
|
1902
|
+
return /* @__PURE__ */ jsxs30(MyButtonCreate, { objectName: "v\u0103n b\u1EA3n", form, onSubmit: async (values) => {
|
|
1632
1903
|
return await baseAxios_default.post(
|
|
1633
1904
|
"/Document/create",
|
|
1634
1905
|
__spreadProps(__spreadValues({}, values), {
|
|
@@ -1637,17 +1908,24 @@ function F_core76318_Create() {
|
|
|
1637
1908
|
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
1638
1909
|
})
|
|
1639
1910
|
);
|
|
1640
|
-
}
|
|
1911
|
+
}, children: [
|
|
1912
|
+
/* @__PURE__ */ jsx47(MyTextInput, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
1913
|
+
/* @__PURE__ */ jsx47(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
1914
|
+
/* @__PURE__ */ jsx47(MyTextInput, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
1915
|
+
/* @__PURE__ */ jsx47(FileInput5, __spreadValues({ label: "T\xE0i li\u1EC7u" }, form.getInputProps("file")))
|
|
1916
|
+
] });
|
|
1641
1917
|
}
|
|
1642
1918
|
|
|
1643
1919
|
// src/modules-features/admin/core/core76318/F_core76318_Delete.tsx
|
|
1920
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1644
1921
|
function F_core76318_Delete({ id }) {
|
|
1645
|
-
return /* @__PURE__ */
|
|
1922
|
+
return /* @__PURE__ */ jsx48(MyActionIconDelete, { onSubmit: () => baseAxios_default.post("/Document/delete", { id }) });
|
|
1646
1923
|
}
|
|
1647
1924
|
|
|
1648
1925
|
// src/modules-features/admin/core/core76318/F_core76318_Update.tsx
|
|
1649
1926
|
import { FileInput as FileInput6, TextInput as TextInput2 } from "@mantine/core";
|
|
1650
1927
|
import { useForm as useForm18 } from "@mantine/form";
|
|
1928
|
+
import { jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1651
1929
|
function F_core76318_Update({ values }) {
|
|
1652
1930
|
var _a;
|
|
1653
1931
|
const form = useForm18({
|
|
@@ -1657,13 +1935,24 @@ function F_core76318_Update({ values }) {
|
|
|
1657
1935
|
promulgateDate: new Date(values.promulgateDate)
|
|
1658
1936
|
})
|
|
1659
1937
|
});
|
|
1660
|
-
return /* @__PURE__ */
|
|
1938
|
+
return /* @__PURE__ */ jsxs31(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
1661
1939
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
1662
1940
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
1663
1941
|
}));
|
|
1664
|
-
}
|
|
1942
|
+
}, children: [
|
|
1943
|
+
/* @__PURE__ */ jsx49(TextInput2, __spreadValues({ label: "S\u1ED1 quy \u0111\u1ECBnh" }, form.getInputProps("decisionCode"))),
|
|
1944
|
+
/* @__PURE__ */ jsx49(MyDateInput, __spreadValues({ label: "Ng\xE0y ban h\xE0nh" }, form.getInputProps("promulgateDate"))),
|
|
1945
|
+
/* @__PURE__ */ jsx49(TextInput2, __spreadValues({ label: "T\xEAn t\xE0i li\u1EC7u" }, form.getInputProps("name"))),
|
|
1946
|
+
/* @__PURE__ */ jsx49(FileInput6, __spreadValues({ label: "Ch\u1ECDn file" }, form.getInputProps("file")))
|
|
1947
|
+
] });
|
|
1665
1948
|
}
|
|
1666
1949
|
|
|
1950
|
+
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
1951
|
+
import { jsx as jsx50, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
1952
|
+
|
|
1953
|
+
// src/modules-features/admin/core/core76318/F_core76318.tsx
|
|
1954
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1955
|
+
|
|
1667
1956
|
// src/modules-features/admin/core/core83092/F_core83092.tsx
|
|
1668
1957
|
import { Grid as Grid2, Paper as Paper2, ScrollArea as ScrollArea4 } from "@mantine/core";
|
|
1669
1958
|
|
|
@@ -1671,6 +1960,7 @@ import { Grid as Grid2, Paper as Paper2, ScrollArea as ScrollArea4 } from "@mant
|
|
|
1671
1960
|
import { Container as Container2 } from "@mantine/core";
|
|
1672
1961
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
1673
1962
|
import { useEffect as useEffect6, useMemo as useMemo13, useState as useState6 } from "react";
|
|
1963
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1674
1964
|
function F_core83092_ReadUser() {
|
|
1675
1965
|
const store = useS_core83092();
|
|
1676
1966
|
const query = useQ_core83092_Account_GetAdminAccount();
|
|
@@ -1703,7 +1993,7 @@ function F_core83092_ReadUser() {
|
|
|
1703
1993
|
}, [query.data]);
|
|
1704
1994
|
if (query.isLoading) return "Loading...";
|
|
1705
1995
|
if (query.isError) return "C\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
1706
|
-
return /* @__PURE__ */
|
|
1996
|
+
return /* @__PURE__ */ jsx52(Container2, { fluid: true, w: "100%", children: /* @__PURE__ */ jsx52(
|
|
1707
1997
|
MyDataTable,
|
|
1708
1998
|
{
|
|
1709
1999
|
columns,
|
|
@@ -1721,7 +2011,7 @@ function F_core83092_ReadUser() {
|
|
|
1721
2011
|
}),
|
|
1722
2012
|
state: rowSelection
|
|
1723
2013
|
}
|
|
1724
|
-
));
|
|
2014
|
+
) });
|
|
1725
2015
|
}
|
|
1726
2016
|
function useQ_core83092_Account_GetAdminAccount() {
|
|
1727
2017
|
const query = useQuery15({
|
|
@@ -1739,6 +2029,7 @@ function useQ_core83092_Account_GetAdminAccount() {
|
|
|
1739
2029
|
// src/modules-features/admin/core/core83092/F_core83092_Save.tsx
|
|
1740
2030
|
import { useMutation as useMutation3 } from "@tanstack/react-query";
|
|
1741
2031
|
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
2032
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
1742
2033
|
function F_core83092_Save() {
|
|
1743
2034
|
const store = useS_core83092();
|
|
1744
2035
|
const disable = useState7(false);
|
|
@@ -1767,14 +2058,15 @@ function F_core83092_Save() {
|
|
|
1767
2058
|
}
|
|
1768
2059
|
disable[1](false);
|
|
1769
2060
|
}, [store.state.rolePermissions]);
|
|
1770
|
-
return /* @__PURE__ */
|
|
2061
|
+
return /* @__PURE__ */ jsx53(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
|
1771
2062
|
}
|
|
1772
2063
|
|
|
1773
2064
|
// src/modules-features/admin/core/core83092/F_core83092_ViewMenuPermissions.tsx
|
|
1774
2065
|
import { Checkbox as Checkbox2, Flex as Flex2, ScrollArea as ScrollArea3, Table as Table3, Text as Text2 } from "@mantine/core";
|
|
1775
2066
|
import { IconEdit as IconEdit2, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport2, IconPlus as IconPlus2, IconPrinter as IconPrinter2, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
|
1776
2067
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
1777
|
-
import
|
|
2068
|
+
import React3, { useEffect as useEffect8, useState as useState8 } from "react";
|
|
2069
|
+
import { jsx as jsx54, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1778
2070
|
var title2 = "Danh s\xE1ch ch\u1EE9c n\u0103ng";
|
|
1779
2071
|
function F_core83092_ViewMenuPermissions() {
|
|
1780
2072
|
var _a, _b;
|
|
@@ -1789,107 +2081,173 @@ function F_core83092_ViewMenuPermissions() {
|
|
|
1789
2081
|
store.setProperty("rolePermissions", query.data);
|
|
1790
2082
|
}, [query.data]);
|
|
1791
2083
|
if (((_a = list[0]) == null ? void 0 : _a.length) == 0) return "\u0110ang t\u1EA3i...";
|
|
1792
|
-
return /* @__PURE__ */
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
|
1796
|
-
style: {
|
|
1797
|
-
position: "sticky",
|
|
1798
|
-
top: 0,
|
|
1799
|
-
zIndex: 1,
|
|
1800
|
-
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
1801
|
-
border: "1px solid var(--mantine-color-gray-4)"
|
|
1802
|
-
}
|
|
1803
|
-
},
|
|
1804
|
-
/* @__PURE__ */ React6.createElement(Table3.Tr, null, /* @__PURE__ */ React6.createElement(Table3.Th, null, title2), /* @__PURE__ */ React6.createElement(Table3.Th, null, /* @__PURE__ */ React6.createElement(Flex2, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React6.createElement(Checkbox2, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
|
1805
|
-
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
|
1806
|
-
} }), /* @__PURE__ */ React6.createElement(MyFlexRow, { gap: 3 }, "Xem", /* @__PURE__ */ React6.createElement(IconEyeUp2, { color: "gray" })))), /* @__PURE__ */ React6.createElement(Table3.Th, null, /* @__PURE__ */ React6.createElement(Flex2, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React6.createElement(Checkbox2, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
|
1807
|
-
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
|
1808
|
-
} }), /* @__PURE__ */ React6.createElement(MyFlexRow, { gap: 3 }, "Th\xEAm", /* @__PURE__ */ React6.createElement(IconPlus2, { color: "blue" })))), /* @__PURE__ */ React6.createElement(Table3.Th, null, /* @__PURE__ */ React6.createElement(Flex2, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React6.createElement(Checkbox2, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
|
1809
|
-
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
|
1810
|
-
} }), /* @__PURE__ */ React6.createElement(MyFlexRow, { gap: 3 }, "S\u1EEDa", /* @__PURE__ */ React6.createElement(IconEdit2, { color: "var(--mantine-color-yellow-8)" })))), /* @__PURE__ */ React6.createElement(Table3.Th, null, /* @__PURE__ */ React6.createElement(Flex2, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React6.createElement(Checkbox2, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
|
1811
|
-
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
|
1812
|
-
} }), /* @__PURE__ */ React6.createElement(MyFlexRow, { gap: 3 }, "X\xF3a", /* @__PURE__ */ React6.createElement(IconTrash2, { color: "var(--mantine-color-red-8)" })))), /* @__PURE__ */ React6.createElement(Table3.Th, null, /* @__PURE__ */ React6.createElement(Flex2, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React6.createElement(Checkbox2, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
|
1813
|
-
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
|
1814
|
-
} }), /* @__PURE__ */ React6.createElement(MyFlexRow, { gap: 3 }, "In", /* @__PURE__ */ React6.createElement(IconPrinter2, { color: "var(--mantine-color-cyan-8)" })))), /* @__PURE__ */ React6.createElement(Table3.Th, null, /* @__PURE__ */ React6.createElement(Flex2, { gap: 3, direction: "column", justify: "center", align: "center" }, /* @__PURE__ */ React6.createElement(Checkbox2, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
|
1815
|
-
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
|
1816
|
-
} }), /* @__PURE__ */ React6.createElement(MyFlexRow, { gap: 3 }, "Xu\u1EA5t", /* @__PURE__ */ React6.createElement(IconFileExport2, { color: "var(--mantine-color-green-8)" })))))
|
|
1817
|
-
), /* @__PURE__ */ React6.createElement(Table3.Tbody, { bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))" }, (_b = list[0]) == null ? void 0 : _b.map((item, idx) => {
|
|
1818
|
-
if (item.links == void 0) return /* @__PURE__ */ React6.createElement(Table3.Tr, { key: idx }, /* @__PURE__ */ React6.createElement(Table3.Td, null, item.label), /* @__PURE__ */ React6.createElement(Table3.Td, null, /* @__PURE__ */ React6.createElement(MyCenterFull, null, /* @__PURE__ */ React6.createElement(Checkbox2, null))), /* @__PURE__ */ React6.createElement(Table3.Td, null, /* @__PURE__ */ React6.createElement(MyCenterFull, null, /* @__PURE__ */ React6.createElement(Checkbox2, null))), /* @__PURE__ */ React6.createElement(Table3.Td, null, /* @__PURE__ */ React6.createElement(MyCenterFull, null, /* @__PURE__ */ React6.createElement(Checkbox2, null))), /* @__PURE__ */ React6.createElement(Table3.Td, null, /* @__PURE__ */ React6.createElement(MyCenterFull, null, /* @__PURE__ */ React6.createElement(Checkbox2, null))), /* @__PURE__ */ React6.createElement(Table3.Td, null, /* @__PURE__ */ React6.createElement(MyCenterFull, null, /* @__PURE__ */ React6.createElement(Checkbox2, null))), /* @__PURE__ */ React6.createElement(Table3.Td, null, /* @__PURE__ */ React6.createElement(MyCenterFull, null, /* @__PURE__ */ React6.createElement(Checkbox2, null))));
|
|
1819
|
-
return /* @__PURE__ */ React6.createElement(React6.Fragment, { key: idx }, /* @__PURE__ */ React6.createElement(Table3.Tr, { key: item.label }, /* @__PURE__ */ React6.createElement(
|
|
1820
|
-
Table3.Td,
|
|
2084
|
+
return /* @__PURE__ */ jsx54(ScrollArea3.Autosize, { h: "70vh", children: /* @__PURE__ */ jsxs33(Table3, { children: [
|
|
2085
|
+
/* @__PURE__ */ jsx54(
|
|
2086
|
+
Table3.Thead,
|
|
1821
2087
|
{
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
{
|
|
1832
|
-
|
|
1833
|
-
onChange: (e) => {
|
|
1834
|
-
store.
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
{
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
})
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2088
|
+
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-8))",
|
|
2089
|
+
style: {
|
|
2090
|
+
position: "sticky",
|
|
2091
|
+
top: 0,
|
|
2092
|
+
zIndex: 1,
|
|
2093
|
+
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
2094
|
+
border: "1px solid var(--mantine-color-gray-4)"
|
|
2095
|
+
},
|
|
2096
|
+
children: /* @__PURE__ */ jsxs33(Table3.Tr, { children: [
|
|
2097
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: title2 }),
|
|
2098
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: /* @__PURE__ */ jsxs33(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
2099
|
+
/* @__PURE__ */ jsx54(Checkbox2, { checked: store.isAllPermission("isRead"), onChange: (e) => {
|
|
2100
|
+
store.toogleAllPermissionWithType("isRead", e.target.checked);
|
|
2101
|
+
} }),
|
|
2102
|
+
/* @__PURE__ */ jsxs33(MyFlexRow, { gap: 3, children: [
|
|
2103
|
+
"Xem",
|
|
2104
|
+
/* @__PURE__ */ jsx54(IconEyeUp2, { color: "gray" })
|
|
2105
|
+
] })
|
|
2106
|
+
] }) }),
|
|
2107
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: /* @__PURE__ */ jsxs33(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
2108
|
+
/* @__PURE__ */ jsx54(Checkbox2, { checked: store.isAllPermission("isCreate"), onChange: (e) => {
|
|
2109
|
+
store.toogleAllPermissionWithType("isCreate", e.target.checked);
|
|
2110
|
+
} }),
|
|
2111
|
+
/* @__PURE__ */ jsxs33(MyFlexRow, { gap: 3, children: [
|
|
2112
|
+
"Th\xEAm",
|
|
2113
|
+
/* @__PURE__ */ jsx54(IconPlus2, { color: "blue" })
|
|
2114
|
+
] })
|
|
2115
|
+
] }) }),
|
|
2116
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: /* @__PURE__ */ jsxs33(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
2117
|
+
/* @__PURE__ */ jsx54(Checkbox2, { checked: store.isAllPermission("isUpdate"), onChange: (e) => {
|
|
2118
|
+
store.toogleAllPermissionWithType("isUpdate", e.target.checked);
|
|
2119
|
+
} }),
|
|
2120
|
+
/* @__PURE__ */ jsxs33(MyFlexRow, { gap: 3, children: [
|
|
2121
|
+
"S\u1EEDa",
|
|
2122
|
+
/* @__PURE__ */ jsx54(IconEdit2, { color: "var(--mantine-color-yellow-8)" })
|
|
2123
|
+
] })
|
|
2124
|
+
] }) }),
|
|
2125
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: /* @__PURE__ */ jsxs33(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
2126
|
+
/* @__PURE__ */ jsx54(Checkbox2, { checked: store.isAllPermission("isDelete"), onChange: (e) => {
|
|
2127
|
+
store.toogleAllPermissionWithType("isDelete", e.target.checked);
|
|
2128
|
+
} }),
|
|
2129
|
+
/* @__PURE__ */ jsxs33(MyFlexRow, { gap: 3, children: [
|
|
2130
|
+
"X\xF3a",
|
|
2131
|
+
/* @__PURE__ */ jsx54(IconTrash2, { color: "var(--mantine-color-red-8)" })
|
|
2132
|
+
] })
|
|
2133
|
+
] }) }),
|
|
2134
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: /* @__PURE__ */ jsxs33(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
2135
|
+
/* @__PURE__ */ jsx54(Checkbox2, { checked: store.isAllPermission("isPrint"), onChange: (e) => {
|
|
2136
|
+
store.toogleAllPermissionWithType("isPrint", e.target.checked);
|
|
2137
|
+
} }),
|
|
2138
|
+
/* @__PURE__ */ jsxs33(MyFlexRow, { gap: 3, children: [
|
|
2139
|
+
"In",
|
|
2140
|
+
/* @__PURE__ */ jsx54(IconPrinter2, { color: "var(--mantine-color-cyan-8)" })
|
|
2141
|
+
] })
|
|
2142
|
+
] }) }),
|
|
2143
|
+
/* @__PURE__ */ jsx54(Table3.Th, { children: /* @__PURE__ */ jsxs33(Flex2, { gap: 3, direction: "column", justify: "center", align: "center", children: [
|
|
2144
|
+
/* @__PURE__ */ jsx54(Checkbox2, { checked: store.isAllPermission("isExport"), onChange: (e) => {
|
|
2145
|
+
store.toogleAllPermissionWithType("isExport", e.target.checked);
|
|
2146
|
+
} }),
|
|
2147
|
+
/* @__PURE__ */ jsxs33(MyFlexRow, { gap: 3, children: [
|
|
2148
|
+
"Xu\u1EA5t",
|
|
2149
|
+
/* @__PURE__ */ jsx54(IconFileExport2, { color: "var(--mantine-color-green-8)" })
|
|
2150
|
+
] })
|
|
2151
|
+
] }) })
|
|
2152
|
+
] })
|
|
2153
|
+
}
|
|
2154
|
+
),
|
|
2155
|
+
/* @__PURE__ */ jsx54(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) => {
|
|
2156
|
+
if (item.links == void 0) return /* @__PURE__ */ jsxs33(Table3.Tr, { children: [
|
|
2157
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: item.label }),
|
|
2158
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(Checkbox2, {}) }) }),
|
|
2159
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(Checkbox2, {}) }) }),
|
|
2160
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(Checkbox2, {}) }) }),
|
|
2161
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(Checkbox2, {}) }) }),
|
|
2162
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(Checkbox2, {}) }) }),
|
|
2163
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(Checkbox2, {}) }) })
|
|
2164
|
+
] }, idx);
|
|
2165
|
+
return /* @__PURE__ */ jsxs33(React3.Fragment, { children: [
|
|
2166
|
+
/* @__PURE__ */ jsx54(Table3.Tr, { children: /* @__PURE__ */ jsx54(
|
|
2167
|
+
Table3.Td,
|
|
1871
2168
|
{
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
isPrint: e.target.checked
|
|
1876
|
-
});
|
|
1877
|
-
}
|
|
2169
|
+
colSpan: 7,
|
|
2170
|
+
bg: OBJECT_COlORS.mantineBackgroundBlueLight,
|
|
2171
|
+
children: /* @__PURE__ */ jsx54(Text2, { fs: "oblique", size: "sm", fw: "bold", children: item.label })
|
|
1878
2172
|
}
|
|
1879
|
-
)
|
|
1880
|
-
|
|
1881
|
-
{
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
2173
|
+
) }, item.label),
|
|
2174
|
+
item.links.map(
|
|
2175
|
+
(item2, idx2) => {
|
|
2176
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
2177
|
+
return /* @__PURE__ */ jsxs33(Table3.Tr, { children: [
|
|
2178
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: item2.label }),
|
|
2179
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(
|
|
2180
|
+
Checkbox2,
|
|
2181
|
+
{
|
|
2182
|
+
checked: ((_a2 = store.findByPageId(item2.pageId)) == null ? void 0 : _a2.isRead) || false,
|
|
2183
|
+
onChange: (e) => {
|
|
2184
|
+
store.updatePermission(item2.pageId, {
|
|
2185
|
+
isRead: e.target.checked
|
|
2186
|
+
});
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
) }) }),
|
|
2190
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(
|
|
2191
|
+
Checkbox2,
|
|
2192
|
+
{
|
|
2193
|
+
checked: ((_b2 = store.findByPageId(item2.pageId)) == null ? void 0 : _b2.isCreate) || false,
|
|
2194
|
+
onChange: (e) => {
|
|
2195
|
+
store.updatePermission(item2.pageId, {
|
|
2196
|
+
isCreate: e.target.checked
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
) }) }),
|
|
2201
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(
|
|
2202
|
+
Checkbox2,
|
|
2203
|
+
{
|
|
2204
|
+
checked: ((_c = store.findByPageId(item2.pageId)) == null ? void 0 : _c.isUpdate) || false,
|
|
2205
|
+
onChange: (e) => {
|
|
2206
|
+
store.updatePermission(item2.pageId, {
|
|
2207
|
+
isUpdate: e.target.checked
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
) }) }),
|
|
2212
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(
|
|
2213
|
+
Checkbox2,
|
|
2214
|
+
{
|
|
2215
|
+
checked: ((_d = store.findByPageId(item2.pageId)) == null ? void 0 : _d.isDelete) || false,
|
|
2216
|
+
onChange: (e) => {
|
|
2217
|
+
store.updatePermission(item2.pageId, {
|
|
2218
|
+
isDelete: e.target.checked
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
) }) }),
|
|
2223
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(
|
|
2224
|
+
Checkbox2,
|
|
2225
|
+
{
|
|
2226
|
+
checked: ((_e = store.findByPageId(item2.pageId)) == null ? void 0 : _e.isPrint) || false,
|
|
2227
|
+
onChange: (e) => {
|
|
2228
|
+
store.updatePermission(item2.pageId, {
|
|
2229
|
+
isPrint: e.target.checked
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
) }) }),
|
|
2234
|
+
/* @__PURE__ */ jsx54(Table3.Td, { children: /* @__PURE__ */ jsx54(MyCenterFull, { children: /* @__PURE__ */ jsx54(
|
|
2235
|
+
Checkbox2,
|
|
2236
|
+
{
|
|
2237
|
+
checked: ((_f = store.findByPageId(item2.pageId)) == null ? void 0 : _f.isExport) || false,
|
|
2238
|
+
onChange: (e) => {
|
|
2239
|
+
store.updatePermission(item2.pageId, {
|
|
2240
|
+
isExport: e.target.checked
|
|
2241
|
+
});
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
) }) })
|
|
2245
|
+
] }, idx2);
|
|
1888
2246
|
}
|
|
1889
|
-
)
|
|
1890
|
-
}
|
|
1891
|
-
))
|
|
1892
|
-
}))
|
|
2247
|
+
)
|
|
2248
|
+
] }, idx);
|
|
2249
|
+
}) })
|
|
2250
|
+
] }) });
|
|
1893
2251
|
}
|
|
1894
2252
|
function useGetUserPermission2() {
|
|
1895
2253
|
const store = useS_core83092();
|
|
@@ -1929,54 +2287,72 @@ function useGetUserPermission2() {
|
|
|
1929
2287
|
}
|
|
1930
2288
|
|
|
1931
2289
|
// src/modules-features/admin/core/core83092/F_core83092.tsx
|
|
2290
|
+
import { jsx as jsx55, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
1932
2291
|
function F_core83092() {
|
|
1933
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsx55(MyPageContent, { children: /* @__PURE__ */ jsxs34(Grid2, { grow: true, children: [
|
|
2293
|
+
/* @__PURE__ */ jsx55(Grid2.Col, { span: 4, children: /* @__PURE__ */ jsx55(F_core83092_ReadUser, {}) }),
|
|
2294
|
+
/* @__PURE__ */ jsx55(Grid2.Col, { span: 8, children: /* @__PURE__ */ jsxs34(MyFlexColumn, { h: "80vh", flex: 1, children: [
|
|
2295
|
+
/* @__PURE__ */ jsx55(ScrollArea4.Autosize, { h: "100%", children: /* @__PURE__ */ jsx55(Paper2, { p: "md", bg: OBJECT_COlORS.mantineBackgroundSecondary, children: /* @__PURE__ */ jsx55(F_core83092_ViewMenuPermissions, {}) }) }),
|
|
2296
|
+
/* @__PURE__ */ jsx55(F_core83092_Save, {})
|
|
2297
|
+
] }) })
|
|
2298
|
+
] }) });
|
|
1934
2299
|
}
|
|
1935
2300
|
|
|
1936
2301
|
// src/modules-features/admin/core/MainDashboard/BarChart_CourseStatus.tsx
|
|
1937
2302
|
import { BarChart } from "@mantine/charts";
|
|
1938
2303
|
import { Group as Group4, Paper as Paper3, Text as Text3, useMantineColorScheme } from "@mantine/core";
|
|
2304
|
+
import { Fragment, jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
1939
2305
|
|
|
1940
2306
|
// src/modules-features/admin/core/MainDashboard/BarChart_ExamStatus.tsx
|
|
1941
2307
|
import { BarChart as BarChart2 } from "@mantine/charts";
|
|
1942
2308
|
import { Group as Group5, Paper as Paper4, Text as Text4, useMantineColorScheme as useMantineColorScheme2 } from "@mantine/core";
|
|
2309
|
+
import { Fragment as Fragment2, jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
1943
2310
|
|
|
1944
2311
|
// src/modules-features/admin/core/MainDashboard/BarChart_RevenueByAcademicYear.tsx
|
|
1945
2312
|
import { BarChart as BarChart3 } from "@mantine/charts";
|
|
1946
2313
|
import { Group as Group6, Paper as Paper5, Text as Text5, useMantineColorScheme as useMantineColorScheme3 } from "@mantine/core";
|
|
2314
|
+
import { Fragment as Fragment3, jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
1947
2315
|
|
|
1948
2316
|
// src/modules-features/admin/core/MainDashboard/BarChart_StudentStatusIn30Days.tsx
|
|
1949
2317
|
import { BarChart as BarChart4 } from "@mantine/charts";
|
|
1950
2318
|
import { Group as Group7, Paper as Paper6, Text as Text6, useMantineColorScheme as useMantineColorScheme4 } from "@mantine/core";
|
|
2319
|
+
import { Fragment as Fragment4, jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
1951
2320
|
|
|
1952
2321
|
// src/modules-features/admin/core/MainDashboard/HBarChart_CourseDropOutPercentage.tsx
|
|
1953
2322
|
import { BarChart as BarChart5 } from "@mantine/charts";
|
|
1954
2323
|
import { Group as Group8, Paper as Paper7, Text as Text7, useMantineColorScheme as useMantineColorScheme5 } from "@mantine/core";
|
|
2324
|
+
import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
1955
2325
|
|
|
1956
2326
|
// src/modules-features/admin/core/MainDashboard/HBarChart_CourseProgressPercentage.tsx
|
|
1957
2327
|
import { BarChart as BarChart6 } from "@mantine/charts";
|
|
1958
2328
|
import { Group as Group9, Paper as Paper8, Text as Text8, useMantineColorScheme as useMantineColorScheme6 } from "@mantine/core";
|
|
2329
|
+
import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
1959
2330
|
|
|
1960
2331
|
// src/modules-features/admin/core/MainDashboard/LineChart_RevenueIn12Months.tsx
|
|
1961
2332
|
import { LineChart } from "@mantine/charts";
|
|
1962
2333
|
import { Group as Group10, Paper as Paper9, Text as Text9 } from "@mantine/core";
|
|
2334
|
+
import { Fragment as Fragment5, jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
1963
2335
|
|
|
1964
2336
|
// src/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByDiscountIn3Months.tsx
|
|
1965
2337
|
import { LineChart as LineChart2 } from "@mantine/charts";
|
|
1966
2338
|
import { Group as Group11, Paper as Paper10, Text as Text10 } from "@mantine/core";
|
|
2339
|
+
import { Fragment as Fragment6, jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
1967
2340
|
|
|
1968
2341
|
// src/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByVoucherIn3Months.tsx
|
|
1969
2342
|
import { LineChart as LineChart3 } from "@mantine/charts";
|
|
1970
2343
|
import { Group as Group12, Paper as Paper11, Text as Text11 } from "@mantine/core";
|
|
2344
|
+
import { Fragment as Fragment7, jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
1971
2345
|
|
|
1972
2346
|
// src/modules-features/admin/core/MainDashboard/LineChart_TotalStudentIn12Months.tsx
|
|
1973
2347
|
import { LineChart as LineChart4 } from "@mantine/charts";
|
|
1974
2348
|
import { Group as Group13, Paper as Paper12, Text as Text12 } from "@mantine/core";
|
|
2349
|
+
import { Fragment as Fragment8, jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
1975
2350
|
|
|
1976
2351
|
// src/modules-features/admin/core/MainDashboard/ViewDiscountStat.tsx
|
|
1977
2352
|
import { Center, Progress, Space, Text as Text13 } from "@mantine/core";
|
|
1978
2353
|
import { PieChart } from "@mantine/charts";
|
|
1979
2354
|
import { useMemo as useMemo14 } from "react";
|
|
2355
|
+
import { Fragment as Fragment9, jsx as jsx66, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
1980
2356
|
function getRandomColor(seed) {
|
|
1981
2357
|
const random = Math.sin(seed) * 1e4;
|
|
1982
2358
|
const color = `#${Math.floor((random - Math.floor(random)) * 16777215).toString(16).padStart(6, "0")}`;
|
|
@@ -2154,7 +2530,7 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
2154
2530
|
header: "M\xE0u",
|
|
2155
2531
|
accessorKey: "color",
|
|
2156
2532
|
accessorFn(originalRow) {
|
|
2157
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsx66("div", { style: { width: 20, height: 20, backgroundColor: originalRow.color } });
|
|
2158
2534
|
},
|
|
2159
2535
|
minSize: 30,
|
|
2160
2536
|
maxSize: 30
|
|
@@ -2169,7 +2545,10 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
2169
2545
|
header: "%",
|
|
2170
2546
|
accessorKey: "used",
|
|
2171
2547
|
accessorFn(originalRow) {
|
|
2172
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ jsx66(Fragment9, { children: /* @__PURE__ */ jsx66(Center, { children: /* @__PURE__ */ jsxs45(Text13, { children: [
|
|
2549
|
+
(originalRow.used / totalDisountCode * 100).toFixed(0),
|
|
2550
|
+
"%"
|
|
2551
|
+
] }) }) });
|
|
2173
2552
|
},
|
|
2174
2553
|
minSize: 64,
|
|
2175
2554
|
maxSize: 64
|
|
@@ -2181,7 +2560,20 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
2181
2560
|
return originalRow.used;
|
|
2182
2561
|
},
|
|
2183
2562
|
Cell: ({ row }) => {
|
|
2184
|
-
return /* @__PURE__ */
|
|
2563
|
+
return /* @__PURE__ */ jsxs45(Fragment9, { children: [
|
|
2564
|
+
/* @__PURE__ */ jsx66(Center, { children: /* @__PURE__ */ jsxs45(Text13, { children: [
|
|
2565
|
+
"\u0110\xE3 s\u1EED d\u1EE5ng: ",
|
|
2566
|
+
/* @__PURE__ */ jsxs45("strong", { children: [
|
|
2567
|
+
row.original.used,
|
|
2568
|
+
" / ",
|
|
2569
|
+
row.original.total
|
|
2570
|
+
] }),
|
|
2571
|
+
" - (",
|
|
2572
|
+
(row.original.used / row.original.total * 100).toFixed(2),
|
|
2573
|
+
"%)"
|
|
2574
|
+
] }) }),
|
|
2575
|
+
/* @__PURE__ */ jsx66(Progress, { color: "yellow", radius: "xs", size: "lg", value: row.original.used / row.original.total * 100 })
|
|
2576
|
+
] });
|
|
2185
2577
|
},
|
|
2186
2578
|
minSize: 50,
|
|
2187
2579
|
maxSize: 50
|
|
@@ -2189,35 +2581,41 @@ function PieChart_DiscountUsedPercentage() {
|
|
|
2189
2581
|
],
|
|
2190
2582
|
[]
|
|
2191
2583
|
);
|
|
2192
|
-
return /* @__PURE__ */
|
|
2193
|
-
|
|
2194
|
-
{
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
MyDataTable,
|
|
2206
|
-
{
|
|
2207
|
-
data: mockData,
|
|
2208
|
-
columns,
|
|
2209
|
-
initialState: {
|
|
2210
|
-
density: "xs",
|
|
2211
|
-
pagination: { pageIndex: 0, pageSize: 5 }
|
|
2584
|
+
return /* @__PURE__ */ jsx66(Fragment9, { children: /* @__PURE__ */ jsxs45(MyFlexColumn, { children: [
|
|
2585
|
+
/* @__PURE__ */ jsx66(Text13, { mb: "20", children: "Bi\u1EC3u \u0111\u1ED3 ph\u1EA7n tr\u0103m s\u1EED d\u1EE5ng chi\u1EBFt kh\u1EA5u h\u1ECDc vi\xEAn trong 60 ng\xE0y qua" }),
|
|
2586
|
+
/* @__PURE__ */ jsx66(Center, { children: /* @__PURE__ */ jsx66(
|
|
2587
|
+
PieChart,
|
|
2588
|
+
{
|
|
2589
|
+
startAngle: 90,
|
|
2590
|
+
endAngle: -270,
|
|
2591
|
+
strokeWidth: 0,
|
|
2592
|
+
withLabelsLine: true,
|
|
2593
|
+
labelsPosition: "outside",
|
|
2594
|
+
withLabels: true,
|
|
2595
|
+
labelsType: "percent",
|
|
2596
|
+
data: data_used_discountCode
|
|
2212
2597
|
}
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2598
|
+
) }),
|
|
2599
|
+
/* @__PURE__ */ jsx66(Space, { mt: 5 }),
|
|
2600
|
+
/* @__PURE__ */ jsx66(
|
|
2601
|
+
MyDataTable,
|
|
2602
|
+
{
|
|
2603
|
+
data: mockData,
|
|
2604
|
+
columns,
|
|
2605
|
+
initialState: {
|
|
2606
|
+
density: "xs",
|
|
2607
|
+
pagination: { pageIndex: 0, pageSize: 5 }
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
)
|
|
2611
|
+
] }) });
|
|
2215
2612
|
}
|
|
2216
2613
|
|
|
2217
2614
|
// src/modules-features/admin/core/MainDashboard/ViewVoucherStat.tsx
|
|
2218
2615
|
import { Center as Center2, Progress as Progress2, Space as Space2, Text as Text14 } from "@mantine/core";
|
|
2219
2616
|
import { PieChart as PieChart2 } from "@mantine/charts";
|
|
2220
2617
|
import { useMemo as useMemo15 } from "react";
|
|
2618
|
+
import { Fragment as Fragment10, jsx as jsx67, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
2221
2619
|
function getRandomColor2(seed) {
|
|
2222
2620
|
const random = Math.sin(seed) * 1e4;
|
|
2223
2621
|
const color = `#${Math.floor((random - Math.floor(random)) * 16777215).toString(16).padStart(6, "0")}`;
|
|
@@ -2395,7 +2793,7 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
2395
2793
|
header: "M\xE0u",
|
|
2396
2794
|
accessorKey: "color",
|
|
2397
2795
|
accessorFn(originalRow) {
|
|
2398
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ jsx67("div", { style: { width: 20, height: 20, backgroundColor: originalRow.color } });
|
|
2399
2797
|
},
|
|
2400
2798
|
minSize: 30,
|
|
2401
2799
|
maxSize: 30
|
|
@@ -2410,7 +2808,10 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
2410
2808
|
header: "%",
|
|
2411
2809
|
accessorKey: "used",
|
|
2412
2810
|
accessorFn(originalRow) {
|
|
2413
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ jsx67(Fragment10, { children: /* @__PURE__ */ jsx67(Center2, { children: /* @__PURE__ */ jsxs46(Text14, { children: [
|
|
2812
|
+
(originalRow.used / totalVoucherCode * 100).toFixed(0),
|
|
2813
|
+
"%"
|
|
2814
|
+
] }) }) });
|
|
2414
2815
|
},
|
|
2415
2816
|
minSize: 64,
|
|
2416
2817
|
maxSize: 64
|
|
@@ -2422,7 +2823,20 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
2422
2823
|
return originalRow.used;
|
|
2423
2824
|
},
|
|
2424
2825
|
Cell: ({ row }) => {
|
|
2425
|
-
return /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ jsxs46(Fragment10, { children: [
|
|
2827
|
+
/* @__PURE__ */ jsx67(Center2, { children: /* @__PURE__ */ jsxs46(Text14, { children: [
|
|
2828
|
+
"\u0110\xE3 s\u1EED d\u1EE5ng: ",
|
|
2829
|
+
/* @__PURE__ */ jsxs46("strong", { children: [
|
|
2830
|
+
row.original.used,
|
|
2831
|
+
" / ",
|
|
2832
|
+
row.original.total
|
|
2833
|
+
] }),
|
|
2834
|
+
" - (",
|
|
2835
|
+
(row.original.used / row.original.total * 100).toFixed(2),
|
|
2836
|
+
"%)"
|
|
2837
|
+
] }) }),
|
|
2838
|
+
/* @__PURE__ */ jsx67(Progress2, { color: "yellow", radius: "xs", size: "lg", value: row.original.used / row.original.total * 100 })
|
|
2839
|
+
] });
|
|
2426
2840
|
},
|
|
2427
2841
|
minSize: 50,
|
|
2428
2842
|
maxSize: 50
|
|
@@ -2430,29 +2844,34 @@ function PieChart_VoucherUsedPercentage() {
|
|
|
2430
2844
|
],
|
|
2431
2845
|
[]
|
|
2432
2846
|
);
|
|
2433
|
-
return /* @__PURE__ */
|
|
2434
|
-
|
|
2435
|
-
{
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
MyDataTable,
|
|
2447
|
-
{
|
|
2448
|
-
data: mockData2,
|
|
2449
|
-
columns,
|
|
2450
|
-
initialState: {
|
|
2451
|
-
density: "xs",
|
|
2452
|
-
pagination: { pageIndex: 0, pageSize: 5 }
|
|
2847
|
+
return /* @__PURE__ */ jsx67(Fragment10, { children: /* @__PURE__ */ jsxs46(MyFlexColumn, { children: [
|
|
2848
|
+
/* @__PURE__ */ jsx67(Text14, { mb: "20", children: "Bi\u1EC3u \u0111\u1ED3 ph\u1EA7n tr\u0103m s\u1EED d\u1EE5ng m\xE3 gi\u1EA3m gi\xE1 h\u1ECDc vi\xEAn trong 60 ng\xE0y qua" }),
|
|
2849
|
+
/* @__PURE__ */ jsx67(Center2, { children: /* @__PURE__ */ jsx67(
|
|
2850
|
+
PieChart2,
|
|
2851
|
+
{
|
|
2852
|
+
startAngle: 90,
|
|
2853
|
+
endAngle: -270,
|
|
2854
|
+
strokeWidth: 0,
|
|
2855
|
+
withLabelsLine: true,
|
|
2856
|
+
labelsPosition: "outside",
|
|
2857
|
+
withLabels: true,
|
|
2858
|
+
labelsType: "percent",
|
|
2859
|
+
data: data_used_discountCode2
|
|
2453
2860
|
}
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2861
|
+
) }),
|
|
2862
|
+
/* @__PURE__ */ jsx67(Space2, { mt: 5 }),
|
|
2863
|
+
/* @__PURE__ */ jsx67(
|
|
2864
|
+
MyDataTable,
|
|
2865
|
+
{
|
|
2866
|
+
data: mockData2,
|
|
2867
|
+
columns,
|
|
2868
|
+
initialState: {
|
|
2869
|
+
density: "xs",
|
|
2870
|
+
pagination: { pageIndex: 0, pageSize: 5 }
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
)
|
|
2874
|
+
] }) });
|
|
2456
2875
|
}
|
|
2457
2876
|
export {
|
|
2458
2877
|
F_core12196,
|