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