aq-fe-framework 0.1.302 → 0.1.303
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-EBLXYOGZ.mjs → chunk-KOCCXYVV.mjs} +564 -871
- package/dist/chunk-RK2XUPT6.mjs +55 -0
- package/dist/components/index.d.mts +3 -46
- package/dist/components/index.mjs +7 -15
- package/dist/core/index.d.mts +52 -0
- package/dist/core/index.mjs +287 -0
- package/dist/modules-features/index.mjs +17 -15
- package/dist/types-CxfyEk70.d.mts +6 -0
- package/package.json +5 -1
@@ -1,6 +1,14 @@
|
|
1
|
+
import {
|
2
|
+
utils_pdf_download
|
3
|
+
} from "./chunk-5U2JSHSJ.mjs";
|
1
4
|
import {
|
2
5
|
const_object_colors
|
3
6
|
} from "./chunk-NWBLJ3W3.mjs";
|
7
|
+
import {
|
8
|
+
CoreDayOfWeekPicker,
|
9
|
+
MyFlexColumn,
|
10
|
+
MyFlexRow
|
11
|
+
} from "./chunk-RK2XUPT6.mjs";
|
4
12
|
import {
|
5
13
|
enum_daysOfWeek
|
6
14
|
} from "./chunk-K6S7R6LU.mjs";
|
@@ -9,15 +17,12 @@ import {
|
|
9
17
|
useMyReactMutation,
|
10
18
|
useQ_AQ_GetAQModule
|
11
19
|
} from "./chunk-KKJ3OEEW.mjs";
|
12
|
-
import {
|
13
|
-
createGenericStore
|
14
|
-
} from "./chunk-Y3YGC5IH.mjs";
|
15
|
-
import {
|
16
|
-
utils_pdf_download
|
17
|
-
} from "./chunk-5U2JSHSJ.mjs";
|
18
20
|
import {
|
19
21
|
utils_notification_show
|
20
22
|
} from "./chunk-7ZCOFATU.mjs";
|
23
|
+
import {
|
24
|
+
createGenericStore
|
25
|
+
} from "./chunk-Y3YGC5IH.mjs";
|
21
26
|
import {
|
22
27
|
__objRest,
|
23
28
|
__spreadProps,
|
@@ -182,27 +187,19 @@ function MyTextInput(_a) {
|
|
182
187
|
);
|
183
188
|
}
|
184
189
|
|
185
|
-
// src/components/Layouts/FlexColumn/MyFlexColumn.tsx
|
186
|
-
import { Flex } from "@mantine/core";
|
187
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
188
|
-
function MyFlexColumn(_a) {
|
189
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
190
|
-
return /* @__PURE__ */ jsx6(Flex, __spreadProps(__spreadValues({ direction: "column", gap: "md" }, rest), { children }));
|
191
|
-
}
|
192
|
-
|
193
190
|
// src/components/ActionIcons/ActionIconCheck/MyActionIconCheck.tsx
|
194
191
|
import { ActionIcon as ActionIcon2, Button, Checkbox, Modal, Switch, Text as Text2, Tooltip } from "@mantine/core";
|
195
192
|
import { useDisclosure } from "@mantine/hooks";
|
196
193
|
import { IconChecklist } from "@tabler/icons-react";
|
197
194
|
import { useState } from "react";
|
198
|
-
import { Fragment, jsx as
|
195
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
199
196
|
function MyActionIconCheck(_a) {
|
200
197
|
var _b = _a, { modalSize = "50%", comment = "" } = _b, rest = __objRest(_b, ["modalSize", "comment"]);
|
201
198
|
const disc = useDisclosure(false);
|
202
199
|
const fullScreen = useState(false);
|
203
200
|
const hSize = useState("50vh");
|
204
201
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
205
|
-
/* @__PURE__ */
|
202
|
+
/* @__PURE__ */ jsx6(Tooltip, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: /* @__PURE__ */ jsx6(ActionIcon2, __spreadProps(__spreadValues({ color: "cyan", onClick: disc[1].open }, rest), { children: /* @__PURE__ */ jsx6(IconChecklist, { size: 24, color: "blue" }) })) }),
|
206
203
|
/* @__PURE__ */ jsxs2(
|
207
204
|
Modal,
|
208
205
|
{
|
@@ -210,9 +207,9 @@ function MyActionIconCheck(_a) {
|
|
210
207
|
opened: disc[0],
|
211
208
|
onClose: disc[1].close,
|
212
209
|
size: modalSize,
|
213
|
-
title: /* @__PURE__ */
|
210
|
+
title: /* @__PURE__ */ jsx6(Text2, { children: "Ki\u1EC3m tra h\u1ED3 s\u01A1 \u0111\xE3 \u0111\u0103ng k\xFD" }),
|
214
211
|
children: [
|
215
|
-
/* @__PURE__ */
|
212
|
+
/* @__PURE__ */ jsx6(
|
216
213
|
Switch,
|
217
214
|
{
|
218
215
|
defaultChecked: true,
|
@@ -220,9 +217,9 @@ function MyActionIconCheck(_a) {
|
|
220
217
|
}
|
221
218
|
),
|
222
219
|
/* @__PURE__ */ jsxs2(MyFlexColumn, { children: [
|
223
|
-
/* @__PURE__ */
|
224
|
-
/* @__PURE__ */
|
225
|
-
/* @__PURE__ */
|
220
|
+
/* @__PURE__ */ jsx6(MyTextInput, { label: "Nh\u1EADn x\xE9t" }),
|
221
|
+
/* @__PURE__ */ jsx6(Checkbox, { label: "G\u1EEDi mail th\xF4ng b\xE1o" }),
|
222
|
+
/* @__PURE__ */ jsx6(Button, { children: "C\u1EADp nh\u1EADp" })
|
226
223
|
] })
|
227
224
|
]
|
228
225
|
}
|
@@ -233,41 +230,41 @@ function MyActionIconCheck(_a) {
|
|
233
230
|
// src/components/Button/Button/MyButton.tsx
|
234
231
|
import { Button as Button2 } from "@mantine/core";
|
235
232
|
import { IconDeviceFloppy as IconDeviceFloppy2, IconEdit as IconEdit2, IconFileExport, IconFileImport, IconPlus as IconPlus2, IconPrinter, IconTrash as IconTrash2, IconX } from "@tabler/icons-react";
|
236
|
-
import { jsx as
|
233
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
237
234
|
function MyButton(_a) {
|
238
235
|
var _b = _a, { children, crudType } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
239
236
|
if (!crudType) {
|
240
|
-
return /* @__PURE__ */
|
237
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "indigo" }, rest), { children }));
|
241
238
|
}
|
242
239
|
if (crudType == "create") {
|
243
|
-
return /* @__PURE__ */
|
240
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "indigo", type: "submit", leftSection: /* @__PURE__ */ jsx7(IconPlus2, {}) }, rest), { children: children ? children : "L\u01B0u" }));
|
244
241
|
}
|
245
242
|
if (crudType == "createMultiple") {
|
246
|
-
return /* @__PURE__ */
|
243
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "green", type: "submit", leftSection: /* @__PURE__ */ jsx7(IconPlus2, {}) }, rest), { children: children ? children : "Th\xEAm danh s\xE1ch" }));
|
247
244
|
}
|
248
245
|
if (crudType == "delete") {
|
249
|
-
return /* @__PURE__ */
|
246
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "red", leftSection: /* @__PURE__ */ jsx7(IconTrash2, {}) }, rest), { children: children ? children : "X\xE1c nh\u1EADn x\xF3a" }));
|
250
247
|
}
|
251
248
|
if (crudType == "update") {
|
252
|
-
return /* @__PURE__ */
|
249
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "yellow", type: "submit", leftSection: /* @__PURE__ */ jsx7(IconEdit2, {}) }, rest), { children: children ? children : "Ch\u1EC9nh s\u1EEDa" }));
|
253
250
|
}
|
254
251
|
if (crudType == "save") {
|
255
|
-
return /* @__PURE__ */
|
252
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "blue", type: "submit", leftSection: /* @__PURE__ */ jsx7(IconDeviceFloppy2, {}) }, rest), { children: children ? children : "L\u01B0u" }));
|
256
253
|
}
|
257
254
|
if (crudType == "import") {
|
258
|
-
return /* @__PURE__ */
|
255
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "green.8", leftSection: /* @__PURE__ */ jsx7(IconFileImport, {}) }, rest), { children: children ? children : "Import" }));
|
259
256
|
}
|
260
257
|
if (crudType == "print") {
|
261
|
-
return /* @__PURE__ */
|
258
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "orange.7", leftSection: /* @__PURE__ */ jsx7(IconPrinter, {}) }, rest), { children: children ? children : "In" }));
|
262
259
|
}
|
263
260
|
if (crudType == "export") {
|
264
|
-
return /* @__PURE__ */
|
261
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "green.8", leftSection: /* @__PURE__ */ jsx7(IconFileExport, {}) }, rest), { children: children ? children : "Export" }));
|
265
262
|
}
|
266
263
|
if (crudType == "cancel") {
|
267
|
-
return /* @__PURE__ */
|
264
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({ color: "gray", leftSection: /* @__PURE__ */ jsx7(IconX, {}) }, rest), { children: children ? children : "H\u1EE7y thao t\xE1c" }));
|
268
265
|
}
|
269
266
|
if (crudType == "select") {
|
270
|
-
return /* @__PURE__ */
|
267
|
+
return /* @__PURE__ */ jsx7(Button2, __spreadProps(__spreadValues({}, rest), { children: children ? children : "Ch\u1ECDn" }));
|
271
268
|
}
|
272
269
|
}
|
273
270
|
|
@@ -280,7 +277,7 @@ import { useState as useState2 } from "react";
|
|
280
277
|
// src/components/ActionIcons/ActionIconModal/MyActionIconModal.tsx
|
281
278
|
import { ActionIcon as ActionIcon3, Modal as Modal2 } from "@mantine/core";
|
282
279
|
import { IconEdit as IconEdit3, IconPlus as IconPlus3, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
283
|
-
import { Fragment as Fragment2, jsx as
|
280
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
284
281
|
function MyActionIconModal(_a) {
|
285
282
|
var _b = _a, {
|
286
283
|
fullScreen = false,
|
@@ -301,8 +298,8 @@ function MyActionIconModal(_a) {
|
|
301
298
|
]);
|
302
299
|
if (!crudType) {
|
303
300
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
304
|
-
/* @__PURE__ */
|
305
|
-
/* @__PURE__ */
|
301
|
+
/* @__PURE__ */ jsx8(ActionIcon3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: icon })),
|
302
|
+
/* @__PURE__ */ jsx8(
|
306
303
|
Modal2,
|
307
304
|
{
|
308
305
|
fullScreen,
|
@@ -310,15 +307,15 @@ function MyActionIconModal(_a) {
|
|
310
307
|
title,
|
311
308
|
opened: disclosure == null ? void 0 : disclosure[0],
|
312
309
|
onClose: disclosure[1].close,
|
313
|
-
children: /* @__PURE__ */
|
310
|
+
children: /* @__PURE__ */ jsx8(MyFlexColumn, { children })
|
314
311
|
}
|
315
312
|
)
|
316
313
|
] });
|
317
314
|
}
|
318
315
|
if (crudType == "create") {
|
319
316
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
320
|
-
/* @__PURE__ */
|
321
|
-
/* @__PURE__ */
|
317
|
+
/* @__PURE__ */ jsx8(ActionIcon3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open }, rest), { children: icon ? icon : /* @__PURE__ */ jsx8(IconPlus3, {}) })),
|
318
|
+
/* @__PURE__ */ jsx8(
|
322
319
|
Modal2,
|
323
320
|
{
|
324
321
|
fullScreen,
|
@@ -326,15 +323,15 @@ function MyActionIconModal(_a) {
|
|
326
323
|
title: title ? title : "T\u1EA1o d\u1EEF li\u1EC7u m\u1EDBi",
|
327
324
|
opened: disclosure == null ? void 0 : disclosure[0],
|
328
325
|
onClose: disclosure[1].close,
|
329
|
-
children: /* @__PURE__ */
|
326
|
+
children: /* @__PURE__ */ jsx8(MyFlexColumn, { children })
|
330
327
|
}
|
331
328
|
)
|
332
329
|
] });
|
333
330
|
}
|
334
331
|
if (crudType == "update") {
|
335
332
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
336
|
-
/* @__PURE__ */
|
337
|
-
/* @__PURE__ */
|
333
|
+
/* @__PURE__ */ jsx8(ActionIcon3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "yellow" }, rest), { children: icon ? icon : /* @__PURE__ */ jsx8(IconEdit3, {}) })),
|
334
|
+
/* @__PURE__ */ jsx8(
|
338
335
|
Modal2,
|
339
336
|
{
|
340
337
|
fullScreen,
|
@@ -342,15 +339,15 @@ function MyActionIconModal(_a) {
|
|
342
339
|
title: title ? title : "S\u1EEDa d\u1EEF li\u1EC7u",
|
343
340
|
opened: disclosure == null ? void 0 : disclosure[0],
|
344
341
|
onClose: disclosure[1].close,
|
345
|
-
children: /* @__PURE__ */
|
342
|
+
children: /* @__PURE__ */ jsx8(MyFlexColumn, { children })
|
346
343
|
}
|
347
344
|
)
|
348
345
|
] });
|
349
346
|
}
|
350
347
|
if (crudType == "delete") {
|
351
348
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
352
|
-
/* @__PURE__ */
|
353
|
-
/* @__PURE__ */
|
349
|
+
/* @__PURE__ */ jsx8(ActionIcon3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "red" }, rest), { children: icon ? icon : /* @__PURE__ */ jsx8(IconTrash3, {}) })),
|
350
|
+
/* @__PURE__ */ jsx8(
|
354
351
|
Modal2,
|
355
352
|
{
|
356
353
|
fullScreen,
|
@@ -358,15 +355,15 @@ function MyActionIconModal(_a) {
|
|
358
355
|
title: title ? title : "X\xF3a d\u1EEF li\u1EC7u",
|
359
356
|
opened: disclosure == null ? void 0 : disclosure[0],
|
360
357
|
onClose: disclosure[1].close,
|
361
|
-
children: /* @__PURE__ */
|
358
|
+
children: /* @__PURE__ */ jsx8(MyFlexColumn, { children })
|
362
359
|
}
|
363
360
|
)
|
364
361
|
] });
|
365
362
|
}
|
366
363
|
if (crudType == "check") {
|
367
364
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
368
|
-
/* @__PURE__ */
|
369
|
-
/* @__PURE__ */
|
365
|
+
/* @__PURE__ */ jsx8(ActionIcon3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "green" }, rest), { children: icon ? icon : /* @__PURE__ */ jsx8(IconTrash3, {}) })),
|
366
|
+
/* @__PURE__ */ jsx8(
|
370
367
|
Modal2,
|
371
368
|
{
|
372
369
|
fullScreen,
|
@@ -374,7 +371,7 @@ function MyActionIconModal(_a) {
|
|
374
371
|
title: title ? title : "Ki\u1EC3m tra",
|
375
372
|
opened: disclosure == null ? void 0 : disclosure[0],
|
376
373
|
onClose: disclosure[1].close,
|
377
|
-
children: /* @__PURE__ */
|
374
|
+
children: /* @__PURE__ */ jsx8(MyFlexColumn, { children })
|
378
375
|
}
|
379
376
|
)
|
380
377
|
] });
|
@@ -382,7 +379,7 @@ function MyActionIconModal(_a) {
|
|
382
379
|
}
|
383
380
|
|
384
381
|
// src/components/ActionIcons/ActionIconCRUD/MyActionIconDelete.tsx
|
385
|
-
import { jsx as
|
382
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
386
383
|
function MyActionIconDelete(_a) {
|
387
384
|
var _b = _a, {
|
388
385
|
onSubmit,
|
@@ -443,7 +440,7 @@ function MyActionIconDelete(_a) {
|
|
443
440
|
crudType: "delete"
|
444
441
|
}, rest), {
|
445
442
|
children: [
|
446
|
-
/* @__PURE__ */
|
443
|
+
/* @__PURE__ */ jsx9(
|
447
444
|
Highlight,
|
448
445
|
{
|
449
446
|
highlight: contextData || [],
|
@@ -457,7 +454,7 @@ function MyActionIconDelete(_a) {
|
|
457
454
|
}
|
458
455
|
),
|
459
456
|
/* @__PURE__ */ jsxs4(Group, { grow: true, children: [
|
460
|
-
/* @__PURE__ */
|
457
|
+
/* @__PURE__ */ jsx9(
|
461
458
|
MyButton,
|
462
459
|
{
|
463
460
|
crudType: "delete",
|
@@ -465,7 +462,7 @@ function MyActionIconDelete(_a) {
|
|
465
462
|
loading: loadingState[0]
|
466
463
|
}
|
467
464
|
),
|
468
|
-
/* @__PURE__ */
|
465
|
+
/* @__PURE__ */ jsx9(
|
469
466
|
MyButton,
|
470
467
|
{
|
471
468
|
crudType: "cancel",
|
@@ -482,7 +479,7 @@ function MyActionIconDelete(_a) {
|
|
482
479
|
import { useDisclosure as useDisclosure3 } from "@mantine/hooks";
|
483
480
|
import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
|
484
481
|
import { useEffect as useEffect2 } from "react";
|
485
|
-
import { jsx as
|
482
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
486
483
|
function MyActionIconUpdate(_a) {
|
487
484
|
var _b = _a, {
|
488
485
|
resetFormWhenclose,
|
@@ -540,11 +537,11 @@ function MyActionIconUpdate(_a) {
|
|
540
537
|
if (disc[0] == true) return;
|
541
538
|
form.reset();
|
542
539
|
}, [disc[0]]);
|
543
|
-
return /* @__PURE__ */
|
540
|
+
return /* @__PURE__ */ jsx10(MyActionIconModal, __spreadProps(__spreadValues({ disclosure: disc, crudType: "update" }, rest), { children: /* @__PURE__ */ jsx10("form", { onSubmit: form.onSubmit((values) => {
|
544
541
|
mutation.mutate(values);
|
545
542
|
}), children: /* @__PURE__ */ jsxs5(MyFlexColumn, { children: [
|
546
543
|
children,
|
547
|
-
/* @__PURE__ */
|
544
|
+
/* @__PURE__ */ jsx10(
|
548
545
|
MyButton,
|
549
546
|
{
|
550
547
|
type: "submit",
|
@@ -557,9 +554,9 @@ function MyActionIconUpdate(_a) {
|
|
557
554
|
// src/components/ActionIcons/ActionIconDownloadPDF/MyActionIconDownloadPDF.tsx
|
558
555
|
import { ActionIcon as ActionIcon4, Tooltip as Tooltip2 } from "@mantine/core";
|
559
556
|
import { IconDownload } from "@tabler/icons-react";
|
560
|
-
import { jsx as
|
557
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
561
558
|
function MyActionIconDownloadPDF({ pdfLink = "https://datafiles.chinhphu.vn/cpp/files/vbpq/2021/07/17-bgd.signed.pdf" }) {
|
562
|
-
return /* @__PURE__ */
|
559
|
+
return /* @__PURE__ */ jsx11(Tooltip2, { label: "Nh\u1EA5p \u0111\u1EC3 t\u1EA3i xu\u1ED1ng", children: /* @__PURE__ */ jsx11(ActionIcon4, { onClick: async () => await utils_pdf_download(pdfLink), color: "red", children: /* @__PURE__ */ jsx11(IconDownload, {}) }) });
|
563
560
|
}
|
564
561
|
|
565
562
|
// src/components/ActionIcons/ActionIconUpload/MyActionIconUpload.tsx
|
@@ -567,10 +564,10 @@ import { ActionIcon as ActionIcon5 } from "@mantine/core";
|
|
567
564
|
import { Dropzone, MIME_TYPES } from "@mantine/dropzone";
|
568
565
|
import { IconCloudUpload } from "@tabler/icons-react";
|
569
566
|
import { useRef } from "react";
|
570
|
-
import { jsx as
|
567
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
571
568
|
function MyActionIconUpload() {
|
572
569
|
const openRef = useRef(null);
|
573
|
-
return /* @__PURE__ */
|
570
|
+
return /* @__PURE__ */ jsx12(
|
574
571
|
Dropzone,
|
575
572
|
{
|
576
573
|
openRef,
|
@@ -578,7 +575,7 @@ function MyActionIconUpload() {
|
|
578
575
|
},
|
579
576
|
radius: "md",
|
580
577
|
accept: [MIME_TYPES.pdf],
|
581
|
-
children: /* @__PURE__ */
|
578
|
+
children: /* @__PURE__ */ jsx12(ActionIcon5, { children: /* @__PURE__ */ jsx12(IconCloudUpload, {}) })
|
582
579
|
}
|
583
580
|
);
|
584
581
|
}
|
@@ -588,7 +585,7 @@ import { ActionIcon as ActionIcon6, Group as Group2, Modal as Modal3, Paper, Tex
|
|
588
585
|
import { useDisclosure as useDisclosure4 } from "@mantine/hooks";
|
589
586
|
import { IconLivePhoto, IconMaximize, IconMinimize } from "@tabler/icons-react";
|
590
587
|
import { useState as useState3 } from "react";
|
591
|
-
import { Fragment as Fragment3, jsx as
|
588
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
592
589
|
function MyActionIconViewPDF(_a) {
|
593
590
|
var _b = _a, {
|
594
591
|
modalSize = "80%",
|
@@ -601,8 +598,8 @@ function MyActionIconViewPDF(_a) {
|
|
601
598
|
const fullScreen = useState3(false);
|
602
599
|
const hSize = useState3("80vh");
|
603
600
|
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
604
|
-
/* @__PURE__ */
|
605
|
-
/* @__PURE__ */
|
601
|
+
/* @__PURE__ */ jsx13(Tooltip3, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: /* @__PURE__ */ jsx13(ActionIcon6, __spreadProps(__spreadValues({ color: "cyan", onClick: disc[1].open }, rest), { children: /* @__PURE__ */ jsx13(IconLivePhoto, {}) })) }),
|
602
|
+
/* @__PURE__ */ jsx13(
|
606
603
|
Modal3,
|
607
604
|
{
|
608
605
|
fullScreen: fullScreen[0],
|
@@ -610,28 +607,28 @@ function MyActionIconViewPDF(_a) {
|
|
610
607
|
onClose: disc[1].close,
|
611
608
|
size: modalSize,
|
612
609
|
title: /* @__PURE__ */ jsxs6(Group2, { children: [
|
613
|
-
/* @__PURE__ */
|
614
|
-
fullScreen[0] ? /* @__PURE__ */
|
610
|
+
/* @__PURE__ */ jsx13(Text3, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
611
|
+
fullScreen[0] ? /* @__PURE__ */ jsx13(
|
615
612
|
ActionIcon6,
|
616
613
|
{
|
617
614
|
onClick: () => {
|
618
615
|
fullScreen[1](false);
|
619
616
|
hSize[1]("80vh");
|
620
617
|
},
|
621
|
-
children: /* @__PURE__ */
|
618
|
+
children: /* @__PURE__ */ jsx13(IconMinimize, {})
|
622
619
|
}
|
623
|
-
) : /* @__PURE__ */
|
620
|
+
) : /* @__PURE__ */ jsx13(
|
624
621
|
ActionIcon6,
|
625
622
|
{
|
626
623
|
onClick: () => {
|
627
624
|
fullScreen[1](true);
|
628
625
|
hSize[1]("90vh");
|
629
626
|
},
|
630
|
-
children: /* @__PURE__ */
|
627
|
+
children: /* @__PURE__ */ jsx13(IconMaximize, {})
|
631
628
|
}
|
632
629
|
)
|
633
630
|
] }),
|
634
|
-
children: /* @__PURE__ */
|
631
|
+
children: /* @__PURE__ */ jsx13(Paper, { h: hSize[0], p: "lg", children: /* @__PURE__ */ jsx13("iframe", { src: pdfLink, width: "100%", height: "100%" }) })
|
635
632
|
}
|
636
633
|
)
|
637
634
|
] });
|
@@ -641,7 +638,7 @@ function MyActionIconViewPDF(_a) {
|
|
641
638
|
import { useEffect as useEffect3, useState as useState4 } from "react";
|
642
639
|
import { ActionIcon as ActionIcon7, useComputedColorScheme, useMantineColorScheme } from "@mantine/core";
|
643
640
|
import { IconMoon, IconSun } from "@tabler/icons-react";
|
644
|
-
import { jsx as
|
641
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
645
642
|
function MySwitchTheme() {
|
646
643
|
const { setColorScheme } = useMantineColorScheme();
|
647
644
|
const computedColorScheme = useComputedColorScheme("light", {
|
@@ -652,7 +649,7 @@ function MySwitchTheme() {
|
|
652
649
|
setMounted(true);
|
653
650
|
}, []);
|
654
651
|
if (!mounted) return null;
|
655
|
-
return /* @__PURE__ */
|
652
|
+
return /* @__PURE__ */ jsx14(
|
656
653
|
ActionIcon7,
|
657
654
|
{
|
658
655
|
onClick: () => setColorScheme(computedColorScheme === "light" ? "dark" : "light"),
|
@@ -660,7 +657,7 @@ function MySwitchTheme() {
|
|
660
657
|
size: "lg",
|
661
658
|
radius: "md",
|
662
659
|
"aria-label": "Toggle color scheme",
|
663
|
-
children: computedColorScheme === "dark" ? /* @__PURE__ */
|
660
|
+
children: computedColorScheme === "dark" ? /* @__PURE__ */ jsx14(IconSun, { width: "22px", height: "22px", stroke: 1.5 }) : /* @__PURE__ */ jsx14(IconMoon, { width: "22px", height: "22px", stroke: 1.5 })
|
664
661
|
}
|
665
662
|
);
|
666
663
|
}
|
@@ -676,7 +673,7 @@ import { Spotlight, spotlight } from "@mantine/spotlight";
|
|
676
673
|
import { IconSearch } from "@tabler/icons-react";
|
677
674
|
import { usePathname, useRouter } from "next/navigation";
|
678
675
|
import { useMemo, useState as useState5 } from "react";
|
679
|
-
import { Fragment as Fragment4, jsx as
|
676
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
680
677
|
function MyAppSpotlight({ menu }) {
|
681
678
|
const router = useRouter();
|
682
679
|
const pathName = usePathname();
|
@@ -702,7 +699,7 @@ function MyAppSpotlight({ menu }) {
|
|
702
699
|
return item.label.toLowerCase().includes(lowerQuery) || ((_a = item.note) == null ? void 0 : _a.toLowerCase().includes(lowerQuery)) || ((_b = item.link) == null ? void 0 : _b.toLowerCase().includes(lowerQuery));
|
703
700
|
});
|
704
701
|
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
705
|
-
/* @__PURE__ */
|
702
|
+
/* @__PURE__ */ jsx15(
|
706
703
|
TextInput2,
|
707
704
|
{
|
708
705
|
mt: "md",
|
@@ -710,7 +707,7 @@ function MyAppSpotlight({ menu }) {
|
|
710
707
|
mx: 10,
|
711
708
|
component: "button",
|
712
709
|
onClick: spotlight.open,
|
713
|
-
leftSection: /* @__PURE__ */
|
710
|
+
leftSection: /* @__PURE__ */ jsx15(IconSearch, {}),
|
714
711
|
children: "T\xECm ki\u1EBFm (Ctrl + K)"
|
715
712
|
}
|
716
713
|
),
|
@@ -720,14 +717,14 @@ function MyAppSpotlight({ menu }) {
|
|
720
717
|
query,
|
721
718
|
onQueryChange: setQuery,
|
722
719
|
children: [
|
723
|
-
/* @__PURE__ */
|
720
|
+
/* @__PURE__ */ jsx15(
|
724
721
|
Spotlight.Search,
|
725
722
|
{
|
726
723
|
placeholder: "T\xECm ki\u1EBFm menu...",
|
727
|
-
leftSection: /* @__PURE__ */
|
724
|
+
leftSection: /* @__PURE__ */ jsx15(IconSearch, { stroke: 1.5 })
|
728
725
|
}
|
729
726
|
),
|
730
|
-
/* @__PURE__ */
|
727
|
+
/* @__PURE__ */ jsx15(Spotlight.ActionsList, { mah: "800px", children: filteredItems.length > 0 ? filteredItems.map((item, idx) => /* @__PURE__ */ jsx15(
|
731
728
|
Spotlight.Action,
|
732
729
|
{
|
733
730
|
onClick: () => {
|
@@ -738,9 +735,9 @@ function MyAppSpotlight({ menu }) {
|
|
738
735
|
},
|
739
736
|
children: /* @__PURE__ */ jsxs7(Group3, { wrap: "nowrap", w: "100%", children: [
|
740
737
|
/* @__PURE__ */ jsxs7("div", { style: { flex: 1 }, children: [
|
741
|
-
/* @__PURE__ */
|
738
|
+
/* @__PURE__ */ jsx15(Text4, { children: item.label }),
|
742
739
|
/* @__PURE__ */ jsxs7(Group3, { gap: 5, children: [
|
743
|
-
item.note && /* @__PURE__ */
|
740
|
+
item.note && /* @__PURE__ */ jsx15(Text4, { opacity: 0.6, size: "xs", children: item.note }),
|
744
741
|
/* @__PURE__ */ jsxs7(Text4, { opacity: 0.6, size: "xs", children: [
|
745
742
|
"(",
|
746
743
|
item.link,
|
@@ -748,323 +745,59 @@ function MyAppSpotlight({ menu }) {
|
|
748
745
|
] })
|
749
746
|
] })
|
750
747
|
] }),
|
751
|
-
item.status && item.status != "Default" && /* @__PURE__ */
|
748
|
+
item.status && item.status != "Default" && /* @__PURE__ */ jsx15(Badge, { variant: "default", children: item.status })
|
752
749
|
] })
|
753
750
|
},
|
754
751
|
idx
|
755
|
-
)) : /* @__PURE__ */
|
752
|
+
)) : /* @__PURE__ */ jsx15(Spotlight.Empty, { children: "Kh\xF4ng t\xECm th\u1EA5y trang..." }) })
|
756
753
|
]
|
757
754
|
}
|
758
755
|
)
|
759
756
|
] });
|
760
757
|
}
|
761
758
|
|
762
|
-
// src/components/Button/CoreActionIcon.tsx
|
763
|
-
import { ActionIcon as ActionIcon8 } from "@mantine/core";
|
764
|
-
import {
|
765
|
-
IconDeviceFloppy as IconDeviceFloppy3,
|
766
|
-
IconEdit as IconEdit4,
|
767
|
-
IconFileExport as IconFileExport2,
|
768
|
-
IconFileImport as IconFileImport2,
|
769
|
-
IconPlus as IconPlus4,
|
770
|
-
IconPrinter as IconPrinter2,
|
771
|
-
IconTrash as IconTrash4,
|
772
|
-
IconX as IconX2
|
773
|
-
} from "@tabler/icons-react";
|
774
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
775
|
-
var actionConfig = {
|
776
|
-
create: {
|
777
|
-
color: "indigo",
|
778
|
-
type: "submit",
|
779
|
-
icon: /* @__PURE__ */ jsx17(IconPlus4, {})
|
780
|
-
},
|
781
|
-
createMultiple: {
|
782
|
-
color: "green",
|
783
|
-
type: "submit",
|
784
|
-
icon: /* @__PURE__ */ jsx17(IconPlus4, {})
|
785
|
-
},
|
786
|
-
delete: {
|
787
|
-
color: "red",
|
788
|
-
icon: /* @__PURE__ */ jsx17(IconTrash4, {})
|
789
|
-
},
|
790
|
-
update: {
|
791
|
-
color: "yellow",
|
792
|
-
type: "submit",
|
793
|
-
icon: /* @__PURE__ */ jsx17(IconEdit4, {})
|
794
|
-
},
|
795
|
-
save: {
|
796
|
-
color: "blue",
|
797
|
-
type: "submit",
|
798
|
-
icon: /* @__PURE__ */ jsx17(IconDeviceFloppy3, {})
|
799
|
-
},
|
800
|
-
import: {
|
801
|
-
color: "green.8",
|
802
|
-
icon: /* @__PURE__ */ jsx17(IconFileImport2, {})
|
803
|
-
},
|
804
|
-
print: {
|
805
|
-
color: "orange.7",
|
806
|
-
icon: /* @__PURE__ */ jsx17(IconPrinter2, {})
|
807
|
-
},
|
808
|
-
export: {
|
809
|
-
color: "green.8",
|
810
|
-
icon: /* @__PURE__ */ jsx17(IconFileExport2, {})
|
811
|
-
},
|
812
|
-
cancel: {
|
813
|
-
color: "gray",
|
814
|
-
icon: /* @__PURE__ */ jsx17(IconX2, {})
|
815
|
-
},
|
816
|
-
select: {},
|
817
|
-
check: {}
|
818
|
-
};
|
819
|
-
function CoreActionIcon(_a) {
|
820
|
-
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
821
|
-
if (!actionType) {
|
822
|
-
return /* @__PURE__ */ jsx17(ActionIcon8, __spreadProps(__spreadValues({}, rest), { children }));
|
823
|
-
}
|
824
|
-
const config2 = actionConfig[actionType];
|
825
|
-
return /* @__PURE__ */ jsx17(
|
826
|
-
ActionIcon8,
|
827
|
-
__spreadProps(__spreadValues({
|
828
|
-
color: config2.color,
|
829
|
-
type: config2.type
|
830
|
-
}, rest), {
|
831
|
-
children: config2.icon
|
832
|
-
})
|
833
|
-
);
|
834
|
-
}
|
835
|
-
|
836
|
-
// src/components/Button/CoreButton.tsx
|
837
|
-
import { Button as Button4 } from "@mantine/core";
|
838
|
-
import {
|
839
|
-
IconDeviceFloppy as IconDeviceFloppy4,
|
840
|
-
IconEdit as IconEdit5,
|
841
|
-
IconFileExport as IconFileExport3,
|
842
|
-
IconFileImport as IconFileImport3,
|
843
|
-
IconPlus as IconPlus5,
|
844
|
-
IconPrinter as IconPrinter3,
|
845
|
-
IconTrash as IconTrash5,
|
846
|
-
IconX as IconX3
|
847
|
-
} from "@tabler/icons-react";
|
848
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
849
|
-
var actionConfig2 = {
|
850
|
-
create: {
|
851
|
-
color: "blue",
|
852
|
-
type: "submit",
|
853
|
-
icon: /* @__PURE__ */ jsx18(IconDeviceFloppy4, {}),
|
854
|
-
defaultText: "L\u01B0u"
|
855
|
-
},
|
856
|
-
createMultiple: {
|
857
|
-
color: "green",
|
858
|
-
type: "submit",
|
859
|
-
icon: /* @__PURE__ */ jsx18(IconPlus5, {}),
|
860
|
-
defaultText: "Th\xEAm danh s\xE1ch"
|
861
|
-
},
|
862
|
-
delete: {
|
863
|
-
color: "red",
|
864
|
-
icon: /* @__PURE__ */ jsx18(IconTrash5, {}),
|
865
|
-
defaultText: "X\xF3a"
|
866
|
-
},
|
867
|
-
update: {
|
868
|
-
color: "yellow",
|
869
|
-
type: "submit",
|
870
|
-
icon: /* @__PURE__ */ jsx18(IconEdit5, {}),
|
871
|
-
defaultText: "Ch\u1EC9nh s\u1EEDa"
|
872
|
-
},
|
873
|
-
save: {
|
874
|
-
color: "blue",
|
875
|
-
type: "submit",
|
876
|
-
icon: /* @__PURE__ */ jsx18(IconDeviceFloppy4, {}),
|
877
|
-
defaultText: "L\u01B0u"
|
878
|
-
},
|
879
|
-
import: {
|
880
|
-
color: "green.8",
|
881
|
-
icon: /* @__PURE__ */ jsx18(IconFileImport3, {}),
|
882
|
-
defaultText: "Import"
|
883
|
-
},
|
884
|
-
print: {
|
885
|
-
color: "orange.7",
|
886
|
-
icon: /* @__PURE__ */ jsx18(IconPrinter3, {}),
|
887
|
-
defaultText: "In"
|
888
|
-
},
|
889
|
-
export: {
|
890
|
-
color: "green.8",
|
891
|
-
icon: /* @__PURE__ */ jsx18(IconFileExport3, {}),
|
892
|
-
defaultText: "Export"
|
893
|
-
},
|
894
|
-
cancel: {
|
895
|
-
color: "gray",
|
896
|
-
icon: /* @__PURE__ */ jsx18(IconX3, {}),
|
897
|
-
defaultText: "H\u1EE7y thao t\xE1c"
|
898
|
-
},
|
899
|
-
select: {
|
900
|
-
defaultText: "Ch\u1ECDn"
|
901
|
-
},
|
902
|
-
check: {
|
903
|
-
defaultText: "Ch\u1ECDn"
|
904
|
-
}
|
905
|
-
};
|
906
|
-
function CoreButton(_a) {
|
907
|
-
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
908
|
-
if (!actionType) {
|
909
|
-
return /* @__PURE__ */ jsx18(Button4, __spreadProps(__spreadValues({}, rest), { children }));
|
910
|
-
}
|
911
|
-
const config2 = actionConfig2[actionType];
|
912
|
-
return /* @__PURE__ */ jsx18(
|
913
|
-
Button4,
|
914
|
-
__spreadProps(__spreadValues({
|
915
|
-
color: config2.color,
|
916
|
-
type: config2.type,
|
917
|
-
leftSection: config2.icon
|
918
|
-
}, rest), {
|
919
|
-
children: children != null ? children : config2.defaultText
|
920
|
-
})
|
921
|
-
);
|
922
|
-
}
|
923
|
-
|
924
|
-
// src/components/Button/CoreButtonCreateUpdate.tsx
|
925
|
-
import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
|
926
|
-
import { useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
927
|
-
import { ActionIcon as ActionIcon9, Button as Button5, Modal as Modal4 } from "@mantine/core";
|
928
|
-
import { IconEdit as IconEdit6, IconPlus as IconPlus6 } from "@tabler/icons-react";
|
929
|
-
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
930
|
-
function CoreButtonCreateUpdate({
|
931
|
-
modalProps,
|
932
|
-
actionIconProps,
|
933
|
-
buttonProps,
|
934
|
-
form,
|
935
|
-
onSubmit,
|
936
|
-
onSuccess,
|
937
|
-
onError,
|
938
|
-
closeModalWhenSubmit = true,
|
939
|
-
resetFormWhenSubmit = true,
|
940
|
-
children,
|
941
|
-
disclosure: externalDisclosure,
|
942
|
-
isUpdate = false
|
943
|
-
}) {
|
944
|
-
const defaultDisclosure = useDisclosure5();
|
945
|
-
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
946
|
-
const queryClient = useQueryClient3();
|
947
|
-
const mutation = useMyReactMutation({
|
948
|
-
axiosFn: (values) => onSubmit(values),
|
949
|
-
options: __spreadValues(__spreadValues({
|
950
|
-
onSuccess: () => {
|
951
|
-
queryClient.invalidateQueries();
|
952
|
-
utils_notification_show({ crudType: isUpdate ? "update" : "create" });
|
953
|
-
disclosure[1].close();
|
954
|
-
if (closeModalWhenSubmit) disclosure[1].close();
|
955
|
-
if (resetFormWhenSubmit) form.reset();
|
956
|
-
}
|
957
|
-
}, onSuccess && {
|
958
|
-
onSuccess: () => {
|
959
|
-
onSuccess();
|
960
|
-
}
|
961
|
-
}), onError && {
|
962
|
-
onError: () => {
|
963
|
-
onError();
|
964
|
-
}
|
965
|
-
})
|
966
|
-
});
|
967
|
-
return /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
968
|
-
isUpdate == true ? /* @__PURE__ */ jsx19(
|
969
|
-
ActionIcon9,
|
970
|
-
__spreadProps(__spreadValues({
|
971
|
-
color: "yellow",
|
972
|
-
onClick: disclosure[1].open
|
973
|
-
}, actionIconProps), {
|
974
|
-
children: /* @__PURE__ */ jsx19(IconEdit6, {})
|
975
|
-
})
|
976
|
-
) : /* @__PURE__ */ jsx19(
|
977
|
-
Button5,
|
978
|
-
__spreadProps(__spreadValues({
|
979
|
-
onClick: disclosure[1].open,
|
980
|
-
leftSection: /* @__PURE__ */ jsx19(IconPlus6, {})
|
981
|
-
}, buttonProps), {
|
982
|
-
children: "Th\xEAm"
|
983
|
-
})
|
984
|
-
),
|
985
|
-
/* @__PURE__ */ jsx19(
|
986
|
-
Modal4,
|
987
|
-
__spreadProps(__spreadValues({
|
988
|
-
title: isUpdate ? "S\u1EEDa d\u1EEF li\u1EC7u" : "Th\xEAm d\u1EEF li\u1EC7u",
|
989
|
-
opened: disclosure[0],
|
990
|
-
onClose: disclosure[1].close
|
991
|
-
}, modalProps), {
|
992
|
-
children: /* @__PURE__ */ jsx19("form", { onSubmit: form.onSubmit((values) => {
|
993
|
-
mutation.mutate(values);
|
994
|
-
}), children: /* @__PURE__ */ jsxs8(MyFlexColumn, { children: [
|
995
|
-
children,
|
996
|
-
/* @__PURE__ */ jsx19(CoreButton, { actionType: "create" })
|
997
|
-
] }) })
|
998
|
-
})
|
999
|
-
)
|
1000
|
-
] });
|
1001
|
-
}
|
1002
|
-
|
1003
|
-
// src/components/Button/CoreButtonModal.tsx
|
1004
|
-
import { Button as Button6, Modal as Modal5 } from "@mantine/core";
|
1005
|
-
import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
1006
|
-
function CoreButtonModal({
|
1007
|
-
disclosure,
|
1008
|
-
children,
|
1009
|
-
buttonProps,
|
1010
|
-
modalProps
|
1011
|
-
}) {
|
1012
|
-
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
1013
|
-
/* @__PURE__ */ jsx20(Button6, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
|
1014
|
-
/* @__PURE__ */ jsx20(
|
1015
|
-
Modal5,
|
1016
|
-
__spreadProps(__spreadValues({
|
1017
|
-
opened: disclosure == null ? void 0 : disclosure[0],
|
1018
|
-
onClose: disclosure[1].close
|
1019
|
-
}, modalProps), {
|
1020
|
-
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
1021
|
-
})
|
1022
|
-
)
|
1023
|
-
] });
|
1024
|
-
}
|
1025
|
-
|
1026
759
|
// src/components/Button/Anchor/MyAnchorViewPDF.tsx
|
1027
|
-
import { ActionIcon as
|
1028
|
-
import { useDisclosure as
|
760
|
+
import { ActionIcon as ActionIcon8, Anchor, Group as Group4, Modal as Modal4, Paper as Paper2, Text as Text5 } from "@mantine/core";
|
761
|
+
import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
|
1029
762
|
import { IconMaximize as IconMaximize2, IconMinimize as IconMinimize2 } from "@tabler/icons-react";
|
1030
763
|
import { useState as useState6 } from "react";
|
1031
|
-
import { Fragment as
|
764
|
+
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
1032
765
|
function MyAnchorViewPDF({ label, pdfLink }) {
|
1033
|
-
const disc =
|
766
|
+
const disc = useDisclosure5(false);
|
1034
767
|
const fullScreen = useState6(false);
|
1035
768
|
const hSize = useState6("80vh");
|
1036
|
-
return /* @__PURE__ */
|
1037
|
-
/* @__PURE__ */
|
1038
|
-
/* @__PURE__ */
|
1039
|
-
|
769
|
+
return /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
770
|
+
/* @__PURE__ */ jsx16(Anchor, { onClick: disc[1].open, children: label }),
|
771
|
+
/* @__PURE__ */ jsx16(
|
772
|
+
Modal4,
|
1040
773
|
{
|
1041
774
|
fullScreen: fullScreen[0],
|
1042
775
|
opened: disc[0],
|
1043
776
|
onClose: disc[1].close,
|
1044
777
|
size: "80%",
|
1045
|
-
title: /* @__PURE__ */
|
1046
|
-
/* @__PURE__ */
|
1047
|
-
fullScreen[0] ? /* @__PURE__ */
|
1048
|
-
|
778
|
+
title: /* @__PURE__ */ jsxs8(Group4, { children: [
|
779
|
+
/* @__PURE__ */ jsx16(Text5, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
780
|
+
fullScreen[0] ? /* @__PURE__ */ jsx16(
|
781
|
+
ActionIcon8,
|
1049
782
|
{
|
1050
783
|
onClick: () => {
|
1051
784
|
fullScreen[1](false);
|
1052
785
|
hSize[1]("80vh");
|
1053
786
|
},
|
1054
|
-
children: /* @__PURE__ */
|
787
|
+
children: /* @__PURE__ */ jsx16(IconMinimize2, {})
|
1055
788
|
}
|
1056
|
-
) : /* @__PURE__ */
|
1057
|
-
|
789
|
+
) : /* @__PURE__ */ jsx16(
|
790
|
+
ActionIcon8,
|
1058
791
|
{
|
1059
792
|
onClick: () => {
|
1060
793
|
fullScreen[1](true);
|
1061
794
|
hSize[1]("90vh");
|
1062
795
|
},
|
1063
|
-
children: /* @__PURE__ */
|
796
|
+
children: /* @__PURE__ */ jsx16(IconMaximize2, {})
|
1064
797
|
}
|
1065
798
|
)
|
1066
799
|
] }),
|
1067
|
-
children: /* @__PURE__ */
|
800
|
+
children: /* @__PURE__ */ jsx16(Paper2, { h: hSize[0], children: /* @__PURE__ */ jsx16("iframe", { src: pdfLink, width: "100%", height: "100%" }) })
|
1068
801
|
}
|
1069
802
|
)
|
1070
803
|
] });
|
@@ -1072,15 +805,15 @@ function MyAnchorViewPDF({ label, pdfLink }) {
|
|
1072
805
|
|
1073
806
|
// src/components/Button/ButtonCRUD/AQButtonCreateByImportFile.tsx
|
1074
807
|
import { FileInput } from "@mantine/core";
|
1075
|
-
import { useDisclosure as
|
808
|
+
import { useDisclosure as useDisclosure6 } from "@mantine/hooks";
|
1076
809
|
import { IconFileTypeXls } from "@tabler/icons-react";
|
1077
|
-
import { useMutation, useQueryClient as
|
810
|
+
import { useMutation, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
1078
811
|
import * as XLSX from "xlsx";
|
1079
812
|
|
1080
813
|
// src/components/Button/ButtonModal/MyButtonModal.tsx
|
1081
|
-
import { Button as
|
1082
|
-
import { IconEdit as
|
1083
|
-
import { Fragment as
|
814
|
+
import { Button as Button3, Modal as Modal5 } from "@mantine/core";
|
815
|
+
import { IconEdit as IconEdit4, IconPlus as IconPlus4, IconTrash as IconTrash4 } from "@tabler/icons-react";
|
816
|
+
import { Fragment as Fragment6, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
1084
817
|
function MyButtonModal(_a) {
|
1085
818
|
var _b = _a, {
|
1086
819
|
fullScreen = false,
|
@@ -1103,81 +836,81 @@ function MyButtonModal(_a) {
|
|
1103
836
|
]);
|
1104
837
|
const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
|
1105
838
|
if (!crudType) {
|
1106
|
-
return /* @__PURE__ */
|
1107
|
-
/* @__PURE__ */
|
1108
|
-
/* @__PURE__ */
|
1109
|
-
|
839
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
840
|
+
/* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: label })),
|
841
|
+
/* @__PURE__ */ jsx17(
|
842
|
+
Modal5,
|
1110
843
|
{
|
1111
844
|
fullScreen,
|
1112
845
|
size: modalSize,
|
1113
846
|
title,
|
1114
847
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1115
848
|
onClose: disclosure[1].close,
|
1116
|
-
children: /* @__PURE__ */
|
849
|
+
children: /* @__PURE__ */ jsx17(MyFlexColumn, { children })
|
1117
850
|
}
|
1118
851
|
)
|
1119
852
|
] });
|
1120
853
|
}
|
1121
854
|
if (crudType == "create") {
|
1122
|
-
return /* @__PURE__ */
|
1123
|
-
/* @__PURE__ */
|
1124
|
-
/* @__PURE__ */
|
1125
|
-
|
855
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
856
|
+
/* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, leftSection: /* @__PURE__ */ jsx17(IconPlus4, {}) }, rest), { children: label ? label : `Th\xEAm` })),
|
857
|
+
/* @__PURE__ */ jsx17(
|
858
|
+
Modal5,
|
1126
859
|
{
|
1127
860
|
fullScreen,
|
1128
861
|
size: modalSize,
|
1129
862
|
title: title ? title : `T\u1EA1o ${objectNameLower} m\u1EDBi`,
|
1130
863
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1131
864
|
onClose: disclosure[1].close,
|
1132
|
-
children: /* @__PURE__ */
|
865
|
+
children: /* @__PURE__ */ jsx17(MyFlexColumn, { children })
|
1133
866
|
}
|
1134
867
|
)
|
1135
868
|
] });
|
1136
869
|
}
|
1137
870
|
if (crudType == "createMultiple") {
|
1138
|
-
return /* @__PURE__ */
|
1139
|
-
/* @__PURE__ */
|
1140
|
-
/* @__PURE__ */
|
1141
|
-
|
871
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
872
|
+
/* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "green", leftSection: /* @__PURE__ */ jsx17(IconPlus4, {}) }, rest), { children: label ? label : `Import ${objectNameLower}` })),
|
873
|
+
/* @__PURE__ */ jsx17(
|
874
|
+
Modal5,
|
1142
875
|
{
|
1143
876
|
fullScreen,
|
1144
877
|
size: modalSize,
|
1145
878
|
title: title ? title : `Th\xEAm danh s\xE1ch ${objectNameLower}`,
|
1146
879
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1147
880
|
onClose: disclosure[1].close,
|
1148
|
-
children: /* @__PURE__ */
|
881
|
+
children: /* @__PURE__ */ jsx17(MyFlexColumn, { children })
|
1149
882
|
}
|
1150
883
|
)
|
1151
884
|
] });
|
1152
885
|
}
|
1153
886
|
if (crudType == "update") {
|
1154
|
-
return /* @__PURE__ */
|
1155
|
-
/* @__PURE__ */
|
1156
|
-
/* @__PURE__ */
|
1157
|
-
|
887
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
888
|
+
/* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "yellow", leftSection: /* @__PURE__ */ jsx17(IconEdit4, {}) }, rest), { children: label ? label : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}` })),
|
889
|
+
/* @__PURE__ */ jsx17(
|
890
|
+
Modal5,
|
1158
891
|
{
|
1159
892
|
fullScreen,
|
1160
893
|
size: modalSize,
|
1161
894
|
title: title ? title : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}`,
|
1162
895
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1163
896
|
onClose: disclosure[1].close,
|
1164
|
-
children: /* @__PURE__ */
|
897
|
+
children: /* @__PURE__ */ jsx17(MyFlexColumn, { children })
|
1165
898
|
}
|
1166
899
|
)
|
1167
900
|
] });
|
1168
901
|
}
|
1169
902
|
if (crudType == "delete") {
|
1170
|
-
return /* @__PURE__ */
|
1171
|
-
/* @__PURE__ */
|
1172
|
-
/* @__PURE__ */
|
1173
|
-
|
903
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
904
|
+
/* @__PURE__ */ jsx17(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "red", leftSection: /* @__PURE__ */ jsx17(IconTrash4, {}) }, rest), { children: label ? label : `X\xF3a ${objectNameLower}` })),
|
905
|
+
/* @__PURE__ */ jsx17(
|
906
|
+
Modal5,
|
1174
907
|
{
|
1175
908
|
fullScreen,
|
1176
909
|
size: modalSize,
|
1177
910
|
title: title ? title : `X\xF3a ${objectNameLower}`,
|
1178
911
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1179
912
|
onClose: disclosure[1].close,
|
1180
|
-
children: /* @__PURE__ */
|
913
|
+
children: /* @__PURE__ */ jsx17(MyFlexColumn, { children })
|
1181
914
|
}
|
1182
915
|
)
|
1183
916
|
] });
|
@@ -1185,7 +918,7 @@ function MyButtonModal(_a) {
|
|
1185
918
|
}
|
1186
919
|
|
1187
920
|
// src/components/Button/ButtonCRUD/AQButtonCreateByImportFile.tsx
|
1188
|
-
import { jsx as
|
921
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
1189
922
|
function AQButtonCreateByImportFile(_a) {
|
1190
923
|
var _b = _a, {
|
1191
924
|
form,
|
@@ -1201,8 +934,8 @@ function AQButtonCreateByImportFile(_a) {
|
|
1201
934
|
// children,
|
1202
935
|
"setImportedData"
|
1203
936
|
]);
|
1204
|
-
const disc =
|
1205
|
-
const queryClient =
|
937
|
+
const disc = useDisclosure6();
|
938
|
+
const queryClient = useQueryClient3();
|
1206
939
|
const mutation = useMutation({
|
1207
940
|
mutationFn: async () => {
|
1208
941
|
return await onSubmit();
|
@@ -1234,12 +967,12 @@ function AQButtonCreateByImportFile(_a) {
|
|
1234
967
|
};
|
1235
968
|
reader.readAsArrayBuffer(file);
|
1236
969
|
};
|
1237
|
-
return /* @__PURE__ */
|
1238
|
-
}), children: /* @__PURE__ */
|
1239
|
-
/* @__PURE__ */
|
970
|
+
return /* @__PURE__ */ jsx18(MyButtonModal, __spreadProps(__spreadValues({ disclosure: disc, crudType: "createMultiple" }, rest), { children: /* @__PURE__ */ jsx18("form", { onSubmit: form.onSubmit((values) => {
|
971
|
+
}), children: /* @__PURE__ */ jsxs10(MyFlexColumn, { children: [
|
972
|
+
/* @__PURE__ */ jsx18(
|
1240
973
|
FileInput,
|
1241
974
|
{
|
1242
|
-
leftSection: /* @__PURE__ */
|
975
|
+
leftSection: /* @__PURE__ */ jsx18(IconFileTypeXls, {}),
|
1243
976
|
accept: ".xlsx",
|
1244
977
|
description: "\u0110\u1ECBnh d\u1EA1ng h\u1EE3p l\u1EC7: .xlsx",
|
1245
978
|
label: "Ch\u1ECDn file",
|
@@ -1248,15 +981,15 @@ function AQButtonCreateByImportFile(_a) {
|
|
1248
981
|
placeholder: "Ch\u1ECDn file"
|
1249
982
|
}
|
1250
983
|
),
|
1251
|
-
/* @__PURE__ */
|
984
|
+
/* @__PURE__ */ jsx18(MyButton, { type: "submit", crudType: "createMultiple" })
|
1252
985
|
] }) }) }));
|
1253
986
|
}
|
1254
987
|
|
1255
988
|
// src/components/Button/ButtonCRUD/AQButtonExportData.tsx
|
1256
|
-
import { Button as
|
989
|
+
import { Button as Button4 } from "@mantine/core";
|
1257
990
|
import { IconDownload as IconDownload2 } from "@tabler/icons-react";
|
1258
991
|
import * as XLSX2 from "xlsx";
|
1259
|
-
import { jsx as
|
992
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
1260
993
|
function AQButtonExportData({
|
1261
994
|
isAllData,
|
1262
995
|
objectName,
|
@@ -1282,8 +1015,8 @@ function AQButtonExportData({
|
|
1282
1015
|
XLSX2.utils.book_append_sheet(workbook, worksheet, "Exported Data");
|
1283
1016
|
XLSX2.writeFile(workbook, `${objectName}.xlsx`);
|
1284
1017
|
};
|
1285
|
-
return /* @__PURE__ */
|
1286
|
-
|
1018
|
+
return /* @__PURE__ */ jsx19(
|
1019
|
+
Button4,
|
1287
1020
|
{
|
1288
1021
|
disabled: data.length === 0,
|
1289
1022
|
variant: "filled",
|
@@ -1292,16 +1025,16 @@ function AQButtonExportData({
|
|
1292
1025
|
event.preventDefault();
|
1293
1026
|
handleExport();
|
1294
1027
|
},
|
1295
|
-
leftSection: /* @__PURE__ */
|
1028
|
+
leftSection: /* @__PURE__ */ jsx19(IconDownload2, {}),
|
1296
1029
|
children: "Export"
|
1297
1030
|
}
|
1298
1031
|
);
|
1299
1032
|
}
|
1300
1033
|
|
1301
1034
|
// src/components/Button/ButtonCRUD/MyButtonCreate.tsx
|
1302
|
-
import { useDisclosure as
|
1303
|
-
import { useQueryClient as
|
1304
|
-
import { jsx as
|
1035
|
+
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
1036
|
+
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
1037
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
1305
1038
|
function MyButtonCreate(_a) {
|
1306
1039
|
var _b = _a, {
|
1307
1040
|
form,
|
@@ -1322,9 +1055,9 @@ function MyButtonCreate(_a) {
|
|
1322
1055
|
"children",
|
1323
1056
|
"disclosure"
|
1324
1057
|
]);
|
1325
|
-
const defaultDisclosure =
|
1058
|
+
const defaultDisclosure = useDisclosure7();
|
1326
1059
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1327
|
-
const queryClient =
|
1060
|
+
const queryClient = useQueryClient4();
|
1328
1061
|
const mutation = useMyReactMutation({
|
1329
1062
|
axiosFn: (values) => {
|
1330
1063
|
const result = onSubmit(values);
|
@@ -1365,20 +1098,20 @@ function MyButtonCreate(_a) {
|
|
1365
1098
|
}
|
1366
1099
|
})
|
1367
1100
|
});
|
1368
|
-
return /* @__PURE__ */
|
1101
|
+
return /* @__PURE__ */ jsx20(MyButtonModal, __spreadProps(__spreadValues({ disclosure, crudType: "create" }, rest), { children: /* @__PURE__ */ jsx20("form", { onSubmit: form.onSubmit((values) => {
|
1369
1102
|
mutation.mutate(values);
|
1370
|
-
}), children: /* @__PURE__ */
|
1103
|
+
}), children: /* @__PURE__ */ jsxs11(MyFlexColumn, { children: [
|
1371
1104
|
children,
|
1372
|
-
/* @__PURE__ */
|
1105
|
+
/* @__PURE__ */ jsx20(MyButton, { type: "submit", crudType: "save" })
|
1373
1106
|
] }) }) }));
|
1374
1107
|
}
|
1375
1108
|
|
1376
1109
|
// src/components/Button/ButtonCRUD/MyButtonDeleteList.tsx
|
1377
1110
|
import { Group as Group5, Highlight as Highlight2 } from "@mantine/core";
|
1378
|
-
import { useDisclosure as
|
1379
|
-
import { useMutation as useMutation2, useQueryClient as
|
1111
|
+
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1112
|
+
import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1380
1113
|
import { useState as useState7 } from "react";
|
1381
|
-
import { jsx as
|
1114
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
1382
1115
|
function MyButtonDeleteList(_a) {
|
1383
1116
|
var _b = _a, {
|
1384
1117
|
onSubmit,
|
@@ -1391,8 +1124,8 @@ function MyButtonDeleteList(_a) {
|
|
1391
1124
|
"onError",
|
1392
1125
|
"contextData"
|
1393
1126
|
]);
|
1394
|
-
const queryClient =
|
1395
|
-
const disc =
|
1127
|
+
const queryClient = useQueryClient5();
|
1128
|
+
const disc = useDisclosure8();
|
1396
1129
|
const loadingState = useState7();
|
1397
1130
|
const mutation = useMutation2({
|
1398
1131
|
mutationFn: async () => await onSubmit(),
|
@@ -1417,7 +1150,7 @@ function MyButtonDeleteList(_a) {
|
|
1417
1150
|
loadingState[1](true);
|
1418
1151
|
mutation.mutate();
|
1419
1152
|
}
|
1420
|
-
return /* @__PURE__ */
|
1153
|
+
return /* @__PURE__ */ jsxs12(
|
1421
1154
|
MyButtonModal,
|
1422
1155
|
__spreadProps(__spreadValues({
|
1423
1156
|
disclosure: disc,
|
@@ -1425,7 +1158,7 @@ function MyButtonDeleteList(_a) {
|
|
1425
1158
|
disabled: contextData == void 0 || contextData.length == 0
|
1426
1159
|
}, rest), {
|
1427
1160
|
children: [
|
1428
|
-
/* @__PURE__ */
|
1161
|
+
/* @__PURE__ */ jsx21(
|
1429
1162
|
Highlight2,
|
1430
1163
|
{
|
1431
1164
|
highlight: contextData || [],
|
@@ -1438,8 +1171,8 @@ function MyButtonDeleteList(_a) {
|
|
1438
1171
|
children: `B\u1EA1n s\u1EAFp x\xF3a d\u1EEF li\u1EC7u ${contextData || ""}. H\xE0nh \u0111\u1ED9ng n\xE0y kh\xF4ng th\u1EC3 ho\xE0n t\xE1c. B\u1EA1n c\xF3 ch\u1EAFc ch\u1EAFn mu\u1ED1n ti\u1EBFp t\u1EE5c?`
|
1439
1172
|
}
|
1440
1173
|
),
|
1441
|
-
/* @__PURE__ */
|
1442
|
-
/* @__PURE__ */
|
1174
|
+
/* @__PURE__ */ jsxs12(Group5, { grow: true, children: [
|
1175
|
+
/* @__PURE__ */ jsx21(
|
1443
1176
|
MyButton,
|
1444
1177
|
{
|
1445
1178
|
crudType: "delete",
|
@@ -1447,7 +1180,7 @@ function MyButtonDeleteList(_a) {
|
|
1447
1180
|
loading: loadingState[0]
|
1448
1181
|
}
|
1449
1182
|
),
|
1450
|
-
/* @__PURE__ */
|
1183
|
+
/* @__PURE__ */ jsx21(
|
1451
1184
|
MyButton,
|
1452
1185
|
{
|
1453
1186
|
crudType: "cancel",
|
@@ -1461,27 +1194,27 @@ function MyButtonDeleteList(_a) {
|
|
1461
1194
|
}
|
1462
1195
|
|
1463
1196
|
// src/components/Button/ButtonImport/MyButtonImport.tsx
|
1464
|
-
import { Button as
|
1465
|
-
import { IconFileImport as
|
1197
|
+
import { Button as Button8, Modal as Modal8, useModalsStack as useModalsStack3 } from "@mantine/core";
|
1198
|
+
import { IconFileImport as IconFileImport2 } from "@tabler/icons-react";
|
1466
1199
|
|
1467
1200
|
// src/components/Combobox/Select/MySelect.tsx
|
1468
1201
|
import { Select } from "@mantine/core";
|
1469
|
-
import { jsx as
|
1202
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
1470
1203
|
function MySelect(_a) {
|
1471
1204
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
1472
|
-
return /* @__PURE__ */
|
1205
|
+
return /* @__PURE__ */ jsx22(Select, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
1473
1206
|
}
|
1474
1207
|
|
1475
1208
|
// src/components/Layouts/FlexEnd/MyFlexEnd.tsx
|
1476
1209
|
import { Group as Group6 } from "@mantine/core";
|
1477
|
-
import { jsx as
|
1210
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
1478
1211
|
function MyFlexEnd(_a) {
|
1479
1212
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1480
|
-
return /* @__PURE__ */
|
1213
|
+
return /* @__PURE__ */ jsx23(Group6, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1481
1214
|
}
|
1482
1215
|
|
1483
1216
|
// src/components/Button/ButtonImport/SelectFieldModal.tsx
|
1484
|
-
import { Button as
|
1217
|
+
import { Button as Button5, Divider, Fieldset, Group as Group7, Modal as Modal6, SimpleGrid, Space as Space2, Table } from "@mantine/core";
|
1485
1218
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
1486
1219
|
|
1487
1220
|
// src/components/Button/ButtonImport/useS_ButtonImport.ts
|
@@ -1635,99 +1368,99 @@ function useS_ButtonImport() {
|
|
1635
1368
|
}
|
1636
1369
|
|
1637
1370
|
// src/components/Button/ButtonImport/SelectFieldModal.tsx
|
1638
|
-
import { jsx as
|
1371
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
1639
1372
|
function SelectFieldModal({ stack, onImport }) {
|
1640
1373
|
var _a, _b;
|
1641
1374
|
const store = useS_ButtonImport();
|
1642
|
-
return /* @__PURE__ */
|
1643
|
-
/* @__PURE__ */
|
1644
|
-
/* @__PURE__ */
|
1645
|
-
/* @__PURE__ */
|
1646
|
-
/* @__PURE__ */
|
1647
|
-
/* @__PURE__ */
|
1648
|
-
/* @__PURE__ */
|
1375
|
+
return /* @__PURE__ */ jsxs13(Modal6, __spreadProps(__spreadValues({ fullScreen: true }, stack.register("select-field-page")), { title: "Import", children: [
|
1376
|
+
/* @__PURE__ */ jsxs13(SimpleGrid, { cols: { base: 1, lg: 2 }, children: [
|
1377
|
+
/* @__PURE__ */ jsxs13(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin", children: [
|
1378
|
+
/* @__PURE__ */ jsxs13(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1379
|
+
/* @__PURE__ */ jsx24(Table.Thead, { bg: "cyan", children: /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
1380
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "M\xE3 field" }),
|
1381
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "T\xEAn field" })
|
1649
1382
|
] }) }),
|
1650
|
-
/* @__PURE__ */
|
1383
|
+
/* @__PURE__ */ jsx24(Table.Tbody, { children: (_a = store.state.fieldConfig) == null ? void 0 : _a.filter((item) => item.isSelected == false || item.isSelected == void 0).map((item, idx) => /* @__PURE__ */ jsxs13(
|
1651
1384
|
Table.Tr,
|
1652
1385
|
{
|
1653
1386
|
style: { cursor: "pointer" },
|
1654
1387
|
children: [
|
1655
|
-
/* @__PURE__ */
|
1656
|
-
/* @__PURE__ */
|
1388
|
+
/* @__PURE__ */ jsx24(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldKey.toString() }),
|
1389
|
+
/* @__PURE__ */ jsx24(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldName })
|
1657
1390
|
]
|
1658
1391
|
},
|
1659
1392
|
idx
|
1660
1393
|
)) })
|
1661
1394
|
] }),
|
1662
|
-
/* @__PURE__ */
|
1663
|
-
/* @__PURE__ */
|
1664
|
-
|
1395
|
+
/* @__PURE__ */ jsx24(Space2, {}),
|
1396
|
+
/* @__PURE__ */ jsx24(Group7, { children: /* @__PURE__ */ jsx24(
|
1397
|
+
Button5,
|
1665
1398
|
{
|
1666
1399
|
onClick: () => {
|
1667
1400
|
store.changeAllSelected(true);
|
1668
1401
|
},
|
1669
|
-
leftSection: /* @__PURE__ */
|
1402
|
+
leftSection: /* @__PURE__ */ jsx24(IconArrowBigRight, {}),
|
1670
1403
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3"
|
1671
1404
|
}
|
1672
1405
|
) })
|
1673
1406
|
] }),
|
1674
|
-
/* @__PURE__ */
|
1675
|
-
/* @__PURE__ */
|
1676
|
-
/* @__PURE__ */
|
1677
|
-
/* @__PURE__ */
|
1678
|
-
/* @__PURE__ */
|
1679
|
-
/* @__PURE__ */
|
1407
|
+
/* @__PURE__ */ jsxs13(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin \u0111\u01B0\u1EE3c ch\u1ECDn", children: [
|
1408
|
+
/* @__PURE__ */ jsxs13(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1409
|
+
/* @__PURE__ */ jsx24(Table.Thead, { children: /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
1410
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "M\xE3 field" }),
|
1411
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "T\xEAn field" }),
|
1412
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "C\u1ED9t map" })
|
1680
1413
|
] }) }),
|
1681
|
-
/* @__PURE__ */
|
1414
|
+
/* @__PURE__ */ jsx24(Table.Tbody, { children: (_b = store.state.fieldConfig) == null ? void 0 : _b.filter((item) => item.isSelected == true).map((item, idx) => /* @__PURE__ */ jsxs13(
|
1682
1415
|
Table.Tr,
|
1683
1416
|
{
|
1684
1417
|
style: { cursor: "pointer" },
|
1685
1418
|
children: [
|
1686
|
-
/* @__PURE__ */
|
1687
|
-
/* @__PURE__ */
|
1688
|
-
/* @__PURE__ */
|
1419
|
+
/* @__PURE__ */ jsx24(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldKey.toString() }),
|
1420
|
+
/* @__PURE__ */ jsx24(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldName }),
|
1421
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: /* @__PURE__ */ jsx24(MySelect, { data: store.state.title, value: item.fieldToMap, onChange: (e4) => store.setFieldToMap(item.fieldKey.toString(), e4) }) })
|
1689
1422
|
]
|
1690
1423
|
},
|
1691
1424
|
idx
|
1692
1425
|
)) })
|
1693
1426
|
] }),
|
1694
|
-
/* @__PURE__ */
|
1695
|
-
/* @__PURE__ */
|
1696
|
-
|
1427
|
+
/* @__PURE__ */ jsx24(Space2, {}),
|
1428
|
+
/* @__PURE__ */ jsx24(
|
1429
|
+
Button5,
|
1697
1430
|
{
|
1698
1431
|
onClick: () => {
|
1699
1432
|
store.changeAllSelected(false);
|
1700
1433
|
},
|
1701
|
-
leftSection: /* @__PURE__ */
|
1434
|
+
leftSection: /* @__PURE__ */ jsx24(IconArrowBigLeft, {}),
|
1702
1435
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3 v\u1EC1"
|
1703
1436
|
}
|
1704
1437
|
)
|
1705
1438
|
] })
|
1706
1439
|
] }),
|
1707
|
-
/* @__PURE__ */
|
1708
|
-
/* @__PURE__ */
|
1709
|
-
/* @__PURE__ */
|
1710
|
-
|
1440
|
+
/* @__PURE__ */ jsx24(Divider, {}),
|
1441
|
+
/* @__PURE__ */ jsxs13(MyFlexEnd, { children: [
|
1442
|
+
/* @__PURE__ */ jsx24(
|
1443
|
+
Button5,
|
1711
1444
|
{
|
1712
|
-
leftSection: /* @__PURE__ */
|
1445
|
+
leftSection: /* @__PURE__ */ jsx24(IconArrowBackUp, {}),
|
1713
1446
|
onClick: () => stack.close("select-field-page"),
|
1714
1447
|
color: "gray.7",
|
1715
1448
|
children: "Quay l\u1EA1i"
|
1716
1449
|
}
|
1717
1450
|
),
|
1718
|
-
/* @__PURE__ */
|
1719
|
-
|
1451
|
+
/* @__PURE__ */ jsx24(
|
1452
|
+
Button5,
|
1720
1453
|
{
|
1721
1454
|
color: "blue.8",
|
1722
|
-
leftSection: /* @__PURE__ */
|
1455
|
+
leftSection: /* @__PURE__ */ jsx24(IconArrowBigRight, {}),
|
1723
1456
|
onClick: onImport,
|
1724
1457
|
children: "Ti\u1EBFp t\u1EE5c / Import"
|
1725
1458
|
}
|
1726
1459
|
),
|
1727
|
-
/* @__PURE__ */
|
1728
|
-
|
1460
|
+
/* @__PURE__ */ jsx24(
|
1461
|
+
Button5,
|
1729
1462
|
{
|
1730
|
-
leftSection: /* @__PURE__ */
|
1463
|
+
leftSection: /* @__PURE__ */ jsx24(IconSquareRoundedX, {}),
|
1731
1464
|
onClick: () => stack.closeAll(),
|
1732
1465
|
color: "red.6",
|
1733
1466
|
children: "\u0110\xF3ng"
|
@@ -1738,7 +1471,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1738
1471
|
}
|
1739
1472
|
|
1740
1473
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1741
|
-
import { Alert, Button as
|
1474
|
+
import { Alert, Button as Button6, Group as Group8, Portal } from "@mantine/core";
|
1742
1475
|
import { IconBug, IconDownload as IconDownload3, IconInfoCircle } from "@tabler/icons-react";
|
1743
1476
|
import { download, generateCsv, mkConfig } from "export-to-csv";
|
1744
1477
|
import {
|
@@ -1747,7 +1480,7 @@ import {
|
|
1747
1480
|
} from "mantine-react-table";
|
1748
1481
|
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
1749
1482
|
import { useEffect as useEffect5 } from "react";
|
1750
|
-
import { Fragment as
|
1483
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
1751
1484
|
function formatData(data, formats) {
|
1752
1485
|
return data.map((row) => {
|
1753
1486
|
const transformedRow = {};
|
@@ -1810,14 +1543,14 @@ function MyDataTable(_a) {
|
|
1810
1543
|
columns,
|
1811
1544
|
data,
|
1812
1545
|
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1813
|
-
return /* @__PURE__ */
|
1546
|
+
return /* @__PURE__ */ jsxs14(Group8, { children: [
|
1814
1547
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
1815
|
-
exportAble && /* @__PURE__ */
|
1816
|
-
|
1548
|
+
exportAble && /* @__PURE__ */ jsx25(Fragment7, { children: /* @__PURE__ */ jsx25(
|
1549
|
+
Button6,
|
1817
1550
|
{
|
1818
1551
|
color: "green.8",
|
1819
1552
|
onClick: () => handleExport(table2.getSelectedRowModel().rows),
|
1820
|
-
leftSection: /* @__PURE__ */
|
1553
|
+
leftSection: /* @__PURE__ */ jsx25(IconDownload3, {}),
|
1821
1554
|
variant: "filled",
|
1822
1555
|
children: "Export"
|
1823
1556
|
}
|
@@ -1864,7 +1597,7 @@ function MyDataTable(_a) {
|
|
1864
1597
|
}
|
1865
1598
|
},
|
1866
1599
|
localization: MRT_Localization_VI,
|
1867
|
-
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */
|
1600
|
+
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */ jsx25(Alert, { icon: /* @__PURE__ */ jsx25(IconBug, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" }) : /* @__PURE__ */ jsx25(Alert, { icon: /* @__PURE__ */ jsx25(IconInfoCircle, {}), color: "gray", title: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u!", m: "md" }),
|
1868
1601
|
state: {
|
1869
1602
|
showSkeletons: isLoading
|
1870
1603
|
},
|
@@ -1875,24 +1608,24 @@ function MyDataTable(_a) {
|
|
1875
1608
|
setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
|
1876
1609
|
}, [table.getState().rowSelection]);
|
1877
1610
|
if (data == void 0) return;
|
1878
|
-
return /* @__PURE__ */
|
1611
|
+
return /* @__PURE__ */ jsx25("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx25(Portal, { children: /* @__PURE__ */ jsx25(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx25(MantineReactTable, { table }) });
|
1879
1612
|
}
|
1880
1613
|
|
1881
1614
|
// src/components/Button/ButtonImport/SelectFileModal.tsx
|
1882
|
-
import { Button as
|
1615
|
+
import { Button as Button7, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal7, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
|
1883
1616
|
import { IconArrowBigRight as IconArrowBigRight2, IconSquareRoundedX as IconSquareRoundedX2 } from "@tabler/icons-react";
|
1884
|
-
import { jsx as
|
1617
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
1885
1618
|
function SelectFileModal({ onExportStructure, stack }) {
|
1886
1619
|
var _a;
|
1887
1620
|
const store = useS_ButtonImport();
|
1888
|
-
return /* @__PURE__ */
|
1889
|
-
|
1621
|
+
return /* @__PURE__ */ jsxs15(
|
1622
|
+
Modal7,
|
1890
1623
|
__spreadProps(__spreadValues({
|
1891
1624
|
title: "Import",
|
1892
1625
|
fullScreen: true
|
1893
1626
|
}, stack.register("select-file-page")), {
|
1894
1627
|
children: [
|
1895
|
-
/* @__PURE__ */
|
1628
|
+
/* @__PURE__ */ jsx26(
|
1896
1629
|
FileInput2,
|
1897
1630
|
{
|
1898
1631
|
value: store.state.file,
|
@@ -1902,8 +1635,8 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1902
1635
|
clearable: true
|
1903
1636
|
}
|
1904
1637
|
),
|
1905
|
-
/* @__PURE__ */
|
1906
|
-
/* @__PURE__ */
|
1638
|
+
/* @__PURE__ */ jsxs15(SimpleGrid2, { cols: { base: 1, md: 2, lg: 2, xl: 4 }, children: [
|
1639
|
+
/* @__PURE__ */ jsx26(
|
1907
1640
|
NumberInput,
|
1908
1641
|
{
|
1909
1642
|
label: "D\xF2ng ti\xEAu \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1911,7 +1644,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1911
1644
|
onChange: (e4) => store.setProperty("startTitleIndex", e4)
|
1912
1645
|
}
|
1913
1646
|
),
|
1914
|
-
/* @__PURE__ */
|
1647
|
+
/* @__PURE__ */ jsx26(
|
1915
1648
|
NumberInput,
|
1916
1649
|
{
|
1917
1650
|
label: "D\xF2ng d\u1EEF li\u1EC7u b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1919,7 +1652,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1919
1652
|
onChange: (e4) => store.setProperty("startDataIndex", e4)
|
1920
1653
|
}
|
1921
1654
|
),
|
1922
|
-
/* @__PURE__ */
|
1655
|
+
/* @__PURE__ */ jsx26(
|
1923
1656
|
Select2,
|
1924
1657
|
{
|
1925
1658
|
readOnly: true,
|
@@ -1928,7 +1661,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1928
1661
|
defaultValue: "100.000"
|
1929
1662
|
}
|
1930
1663
|
),
|
1931
|
-
/* @__PURE__ */
|
1664
|
+
/* @__PURE__ */ jsx26(
|
1932
1665
|
Select2,
|
1933
1666
|
{
|
1934
1667
|
readOnly: true,
|
@@ -1938,37 +1671,37 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1938
1671
|
}
|
1939
1672
|
)
|
1940
1673
|
] }),
|
1941
|
-
/* @__PURE__ */
|
1674
|
+
/* @__PURE__ */ jsx26(Fieldset2, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin trong file d\u1EEF li\u1EC7u", children: store.state.data && /* @__PURE__ */ jsx26(
|
1942
1675
|
MyDataTable,
|
1943
1676
|
{
|
1944
1677
|
columns: store.columns,
|
1945
1678
|
data: store.state.data
|
1946
1679
|
}
|
1947
1680
|
) }),
|
1948
|
-
/* @__PURE__ */
|
1949
|
-
/* @__PURE__ */
|
1950
|
-
|
1681
|
+
/* @__PURE__ */ jsxs15(MyFlexEnd, { children: [
|
1682
|
+
/* @__PURE__ */ jsx26(
|
1683
|
+
Button7,
|
1951
1684
|
{
|
1952
1685
|
color: "teal.8",
|
1953
1686
|
onClick: onExportStructure,
|
1954
1687
|
children: "Xu\u1EA5t file c\u1EA5u tr\xFAc"
|
1955
1688
|
}
|
1956
1689
|
),
|
1957
|
-
/* @__PURE__ */
|
1958
|
-
|
1690
|
+
/* @__PURE__ */ jsx26(
|
1691
|
+
Button7,
|
1959
1692
|
{
|
1960
1693
|
disabled: ((_a = store.state.data) == null ? void 0 : _a.length) == 0,
|
1961
1694
|
color: "blue.8",
|
1962
|
-
leftSection: /* @__PURE__ */
|
1695
|
+
leftSection: /* @__PURE__ */ jsx26(IconArrowBigRight2, {}),
|
1963
1696
|
onClick: () => stack.open("select-field-page"),
|
1964
1697
|
children: "Ti\u1EBFp t\u1EE5c"
|
1965
1698
|
}
|
1966
1699
|
),
|
1967
|
-
/* @__PURE__ */
|
1968
|
-
|
1700
|
+
/* @__PURE__ */ jsx26(
|
1701
|
+
Button7,
|
1969
1702
|
{
|
1970
1703
|
color: "red.6",
|
1971
|
-
leftSection: /* @__PURE__ */
|
1704
|
+
leftSection: /* @__PURE__ */ jsx26(IconSquareRoundedX2, {}),
|
1972
1705
|
onClick: stack.closeAll,
|
1973
1706
|
children: "\u0110\xF3ng"
|
1974
1707
|
}
|
@@ -1980,26 +1713,26 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1980
1713
|
}
|
1981
1714
|
|
1982
1715
|
// src/components/Button/ButtonImport/MyButtonImport.tsx
|
1983
|
-
import { Fragment as
|
1716
|
+
import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
|
1984
1717
|
function MyButtonImport({
|
1985
1718
|
onExportStructure,
|
1986
1719
|
onImport
|
1987
1720
|
}) {
|
1988
1721
|
const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
|
1989
1722
|
const store = useS_ButtonImport();
|
1990
|
-
return /* @__PURE__ */
|
1991
|
-
/* @__PURE__ */
|
1992
|
-
/* @__PURE__ */
|
1993
|
-
/* @__PURE__ */
|
1994
|
-
/* @__PURE__ */
|
1723
|
+
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
1724
|
+
/* @__PURE__ */ jsx27(Button8, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx27(IconFileImport2, {}), title: "Import", children: "Import" }),
|
1725
|
+
/* @__PURE__ */ jsxs16(Modal8.Stack, { children: [
|
1726
|
+
/* @__PURE__ */ jsx27(SelectFileModal, { stack, onExportStructure }),
|
1727
|
+
/* @__PURE__ */ jsx27(SelectFieldModal, { stack, onImport: () => onImport(store.getDataFinal()) })
|
1995
1728
|
] })
|
1996
1729
|
] });
|
1997
1730
|
}
|
1998
1731
|
|
1999
1732
|
// src/components/Button/ButtonModal/AQSelectTableByOpenModal.tsx
|
2000
|
-
import { Button as
|
2001
|
-
import { useDisclosure as
|
2002
|
-
import { Fragment as
|
1733
|
+
import { Button as Button9, Fieldset as Fieldset3, Modal as Modal9 } from "@mantine/core";
|
1734
|
+
import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
|
1735
|
+
import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
|
2003
1736
|
function AQSelectTableByOpenModal(_a) {
|
2004
1737
|
var _b = _a, {
|
2005
1738
|
setSelectedData,
|
@@ -2026,29 +1759,29 @@ function AQSelectTableByOpenModal(_a) {
|
|
2026
1759
|
"fullScreen",
|
2027
1760
|
"closeAfterSelect"
|
2028
1761
|
]);
|
2029
|
-
const disclosure =
|
2030
|
-
return /* @__PURE__ */
|
2031
|
-
/* @__PURE__ */
|
2032
|
-
|
1762
|
+
const disclosure = useDisclosure9(false);
|
1763
|
+
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
1764
|
+
/* @__PURE__ */ jsx28(
|
1765
|
+
Button9,
|
2033
1766
|
__spreadProps(__spreadValues({
|
2034
1767
|
onClick: disclosure[1].open
|
2035
1768
|
}, rest), {
|
2036
1769
|
children: label ? label : `Ch\u1ECDn t\u1EEB danh s\xE1ch`
|
2037
1770
|
})
|
2038
1771
|
),
|
2039
|
-
/* @__PURE__ */
|
2040
|
-
|
1772
|
+
/* @__PURE__ */ jsx28(
|
1773
|
+
Modal9,
|
2041
1774
|
{
|
2042
1775
|
fullScreen,
|
2043
1776
|
size: modalSize,
|
2044
1777
|
title,
|
2045
1778
|
opened: disclosure == null ? void 0 : disclosure[0],
|
2046
1779
|
onClose: disclosure[1].close,
|
2047
|
-
children: /* @__PURE__ */
|
1780
|
+
children: /* @__PURE__ */ jsx28(MyFlexColumn, { children: /* @__PURE__ */ jsx28(Fieldset3, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: /* @__PURE__ */ jsx28(
|
2048
1781
|
MyDataTable,
|
2049
1782
|
__spreadValues({
|
2050
1783
|
renderTopToolbarCustomActions: ({ table }) => {
|
2051
|
-
return /* @__PURE__ */
|
1784
|
+
return /* @__PURE__ */ jsx28(Button9, { onClick: () => {
|
2052
1785
|
setSelectedData(table.getSelectedRowModel().rows.map((row) => row.original));
|
2053
1786
|
closeAfterSelect && disclosure[1].close();
|
2054
1787
|
}, children: "Ch\u1ECDn" });
|
@@ -2065,10 +1798,10 @@ function AQSelectTableByOpenModal(_a) {
|
|
2065
1798
|
|
2066
1799
|
// src/components/Button/ButtonPrintPDF/MyButtonPrintPDF.tsx
|
2067
1800
|
import { useRef as useRef2 } from "react";
|
2068
|
-
import { Button as
|
2069
|
-
import { IconPrinter as
|
1801
|
+
import { Button as Button10 } from "@mantine/core";
|
1802
|
+
import { IconPrinter as IconPrinter2 } from "@tabler/icons-react";
|
2070
1803
|
import { useReactToPrint } from "react-to-print";
|
2071
|
-
import { Fragment as
|
1804
|
+
import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
2072
1805
|
function MyButtonPrintPDF(_a) {
|
2073
1806
|
var _b = _a, { contentToPrint, children } = _b, rest = __objRest(_b, ["contentToPrint", "children"]);
|
2074
1807
|
const printRef = useRef2(null);
|
@@ -2082,16 +1815,16 @@ function MyButtonPrintPDF(_a) {
|
|
2082
1815
|
if (!contentToPrint) return;
|
2083
1816
|
handlePrint();
|
2084
1817
|
}
|
2085
|
-
return /* @__PURE__ */
|
2086
|
-
/* @__PURE__ */
|
2087
|
-
/* @__PURE__ */
|
1818
|
+
return /* @__PURE__ */ jsxs18(Fragment10, { children: [
|
1819
|
+
/* @__PURE__ */ jsx29("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx29("div", { ref: printRef, children: contentToPrint }) }),
|
1820
|
+
/* @__PURE__ */ jsx29(Button10, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx29(IconPrinter2, {}) }, rest), { children }))
|
2088
1821
|
] });
|
2089
1822
|
}
|
2090
1823
|
|
2091
1824
|
// src/components/Layouts/HtmlWrapper/MyHtmlWrapper.tsx
|
2092
1825
|
import { ScrollArea, TypographyStylesProvider } from "@mantine/core";
|
2093
1826
|
import pako from "pako";
|
2094
|
-
import { jsx as
|
1827
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
2095
1828
|
function MyHtmlWrapper(_a) {
|
2096
1829
|
var _b = _a, { html, mah, zip = false } = _b, rest = __objRest(_b, ["html", "mah", "zip"]);
|
2097
1830
|
const extractHtmlFromZip = () => {
|
@@ -2100,7 +1833,7 @@ function MyHtmlWrapper(_a) {
|
|
2100
1833
|
const cleanedHtml = decompressedData == null ? void 0 : decompressedData.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
2101
1834
|
return cleanedHtml.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
2102
1835
|
};
|
2103
|
-
return /* @__PURE__ */
|
1836
|
+
return /* @__PURE__ */ jsx30(ScrollArea.Autosize, { mah, children: /* @__PURE__ */ jsx30(TypographyStylesProvider, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx30(
|
2104
1837
|
"div",
|
2105
1838
|
{
|
2106
1839
|
dangerouslySetInnerHTML: {
|
@@ -2112,7 +1845,7 @@ function MyHtmlWrapper(_a) {
|
|
2112
1845
|
|
2113
1846
|
// src/components/Button/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx
|
2114
1847
|
import { Box, Table as Table2 } from "@mantine/core";
|
2115
|
-
import { jsx as
|
1848
|
+
import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
|
2116
1849
|
function MyButtonPrintTablePDF(_a) {
|
2117
1850
|
var _b = _a, {
|
2118
1851
|
printConfig,
|
@@ -2138,8 +1871,8 @@ function MyButtonPrintTablePDF(_a) {
|
|
2138
1871
|
};
|
2139
1872
|
const rows = data == null ? void 0 : data.map((item, index) => {
|
2140
1873
|
if (!(printConfig == null ? void 0 : printConfig.fields)) return null;
|
2141
|
-
return /* @__PURE__ */
|
2142
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
1874
|
+
return /* @__PURE__ */ jsxs19(Table2.Tr, { children: [
|
1875
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx31(Table2.Td, { ta: "center", px: "xs", style: { border: "1px solid lightgray" }, children: index + 1 }),
|
2143
1876
|
printConfig.fields.map((field) => {
|
2144
1877
|
let value = item[field.fieldName];
|
2145
1878
|
if (field.formatFunction) {
|
@@ -2149,30 +1882,30 @@ function MyButtonPrintTablePDF(_a) {
|
|
2149
1882
|
}
|
2150
1883
|
const alignment = field.isCenter === false ? "left" : "center";
|
2151
1884
|
if (typeof value === "string" && (value.includes("<") || value.includes("<"))) {
|
2152
|
-
return /* @__PURE__ */
|
1885
|
+
return /* @__PURE__ */ jsx31(
|
2153
1886
|
Table2.Td,
|
2154
1887
|
{
|
2155
1888
|
px: "xs",
|
2156
1889
|
ta: alignment,
|
2157
1890
|
style: { border: "1px solid lightgray" },
|
2158
|
-
children: /* @__PURE__ */
|
1891
|
+
children: /* @__PURE__ */ jsx31(MyHtmlWrapper, { html: value })
|
2159
1892
|
},
|
2160
1893
|
field.fieldName
|
2161
1894
|
);
|
2162
1895
|
}
|
2163
1896
|
if (value === "true" || value === "false") {
|
2164
|
-
return /* @__PURE__ */
|
1897
|
+
return /* @__PURE__ */ jsx31(
|
2165
1898
|
Table2.Td,
|
2166
1899
|
{
|
2167
1900
|
ta: alignment,
|
2168
1901
|
px: "xs",
|
2169
1902
|
style: { border: "1px solid lightgray" },
|
2170
|
-
children: /* @__PURE__ */
|
1903
|
+
children: /* @__PURE__ */ jsx31("input", { type: "checkbox", checked: value === "true", readOnly: true })
|
2171
1904
|
},
|
2172
1905
|
field.fieldName
|
2173
1906
|
);
|
2174
1907
|
}
|
2175
|
-
return /* @__PURE__ */
|
1908
|
+
return /* @__PURE__ */ jsx31(
|
2176
1909
|
Table2.Td,
|
2177
1910
|
{
|
2178
1911
|
ta: alignment,
|
@@ -2196,18 +1929,18 @@ function MyButtonPrintTablePDF(_a) {
|
|
2196
1929
|
minute: "2-digit"
|
2197
1930
|
});
|
2198
1931
|
const tableTitle = (printConfig == null ? void 0 : printConfig.title) || "B\u1EA3ng d\u1EEF li\u1EC7u";
|
2199
|
-
return /* @__PURE__ */
|
2200
|
-
/* @__PURE__ */
|
1932
|
+
return /* @__PURE__ */ jsxs19(Box, { p: "lg", children: [
|
1933
|
+
/* @__PURE__ */ jsxs19("div", { style: { textAlign: "center", marginTop: "10px", fontStyle: "italic", color: "#666" }, children: [
|
2201
1934
|
"Ng\xE0y in: ",
|
2202
1935
|
formattedDate
|
2203
1936
|
] }),
|
2204
|
-
/* @__PURE__ */
|
2205
|
-
/* @__PURE__ */
|
2206
|
-
/* @__PURE__ */
|
2207
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
1937
|
+
/* @__PURE__ */ jsx31("h2", { style: { textAlign: "center", fontSize: "24px", fontWeight: "bold", marginBottom: "20px" }, children: tableTitle }),
|
1938
|
+
/* @__PURE__ */ jsxs19(Table2, { withColumnBorders: true, highlightOnHover: true, style: { border: "1px solid lightgray" }, children: [
|
1939
|
+
/* @__PURE__ */ jsx31(Table2.Thead, { children: /* @__PURE__ */ jsxs19(Table2.Tr, { children: [
|
1940
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx31(Table2.Th, { style: { border: "1px solid lightgray" }, w: "10%", ta: "center", px: "xs", children: "STT" }),
|
2208
1941
|
printConfig.fields.map((field) => {
|
2209
1942
|
const alignment = field.isCenter === false ? "left" : "center";
|
2210
|
-
return /* @__PURE__ */
|
1943
|
+
return /* @__PURE__ */ jsx31(
|
2211
1944
|
Table2.Th,
|
2212
1945
|
{
|
2213
1946
|
style: { border: "1px solid lightgray" },
|
@@ -2219,11 +1952,11 @@ function MyButtonPrintTablePDF(_a) {
|
|
2219
1952
|
);
|
2220
1953
|
})
|
2221
1954
|
] }) }),
|
2222
|
-
/* @__PURE__ */
|
1955
|
+
/* @__PURE__ */ jsx31(Table2.Tbody, { children: rows })
|
2223
1956
|
] })
|
2224
1957
|
] });
|
2225
1958
|
};
|
2226
|
-
return /* @__PURE__ */
|
1959
|
+
return /* @__PURE__ */ jsx31(
|
2227
1960
|
MyButtonPrintPDF,
|
2228
1961
|
__spreadValues({
|
2229
1962
|
contentToPrint: renderContent()
|
@@ -2232,15 +1965,15 @@ function MyButtonPrintTablePDF(_a) {
|
|
2232
1965
|
}
|
2233
1966
|
|
2234
1967
|
// src/components/Button/ButtonRouterBack/MyButtonRouterBack.tsx
|
2235
|
-
import { ActionIcon as
|
1968
|
+
import { ActionIcon as ActionIcon9 } from "@mantine/core";
|
2236
1969
|
import { IconArrowBack } from "@tabler/icons-react";
|
2237
1970
|
import { useRouter as useRouter2 } from "next/navigation";
|
2238
|
-
import { jsx as
|
1971
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
2239
1972
|
function MyButtonRouterBack(_a) {
|
2240
1973
|
var _b = _a, { url, label } = _b, rest = __objRest(_b, ["url", "label"]);
|
2241
1974
|
const router = useRouter2();
|
2242
|
-
return /* @__PURE__ */
|
2243
|
-
|
1975
|
+
return /* @__PURE__ */ jsx32(
|
1976
|
+
ActionIcon9,
|
2244
1977
|
__spreadProps(__spreadValues({
|
2245
1978
|
size: "xl",
|
2246
1979
|
variant: "light",
|
@@ -2252,27 +1985,27 @@ function MyButtonRouterBack(_a) {
|
|
2252
1985
|
router.back();
|
2253
1986
|
}
|
2254
1987
|
}, rest), {
|
2255
|
-
children: /* @__PURE__ */
|
1988
|
+
children: /* @__PURE__ */ jsx32(IconArrowBack, { stroke: 2 })
|
2256
1989
|
})
|
2257
1990
|
);
|
2258
1991
|
}
|
2259
1992
|
|
2260
1993
|
// src/components/Button/ButtonViewPDF/MyButtonViewPDF.tsx
|
2261
1994
|
import {
|
2262
|
-
ActionIcon as
|
2263
|
-
Button as
|
1995
|
+
ActionIcon as ActionIcon10,
|
1996
|
+
Button as Button11,
|
2264
1997
|
Group as Group9,
|
2265
1998
|
LoadingOverlay,
|
2266
|
-
Modal as
|
1999
|
+
Modal as Modal10,
|
2267
2000
|
Paper as Paper3,
|
2268
2001
|
Text as Text6,
|
2269
2002
|
Tooltip as Tooltip4
|
2270
2003
|
} from "@mantine/core";
|
2271
|
-
import { useDisclosure as
|
2004
|
+
import { useDisclosure as useDisclosure10 } from "@mantine/hooks";
|
2272
2005
|
import { IconLivePhoto as IconLivePhoto2, IconMaximize as IconMaximize3, IconMinimize as IconMinimize3 } from "@tabler/icons-react";
|
2273
2006
|
import { useQuery } from "@tanstack/react-query";
|
2274
2007
|
import { useState as useState8 } from "react";
|
2275
|
-
import { Fragment as
|
2008
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
2276
2009
|
function MyButtonViewPDF({
|
2277
2010
|
id,
|
2278
2011
|
modalSize = "80%",
|
@@ -2282,7 +2015,7 @@ function MyButtonViewPDF({
|
|
2282
2015
|
filePath
|
2283
2016
|
}) {
|
2284
2017
|
var _a, _b, _c;
|
2285
|
-
const disc =
|
2018
|
+
const disc = useDisclosure10(false);
|
2286
2019
|
const fullScreen = useState8(false);
|
2287
2020
|
const hSize = useState8("80vh");
|
2288
2021
|
const query = useQuery({
|
@@ -2297,57 +2030,57 @@ function MyButtonViewPDF({
|
|
2297
2030
|
},
|
2298
2031
|
enabled: disc[0] == true
|
2299
2032
|
});
|
2300
|
-
return /* @__PURE__ */
|
2301
|
-
/* @__PURE__ */
|
2302
|
-
|
2033
|
+
return /* @__PURE__ */ jsxs20(Fragment11, { children: [
|
2034
|
+
/* @__PURE__ */ jsx33(Tooltip4, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx33(
|
2035
|
+
ActionIcon10,
|
2303
2036
|
{
|
2304
2037
|
onClick: () => {
|
2305
2038
|
disc[1].open();
|
2306
2039
|
},
|
2307
|
-
children: /* @__PURE__ */
|
2040
|
+
children: /* @__PURE__ */ jsx33(IconLivePhoto2, {})
|
2308
2041
|
}
|
2309
|
-
) : /* @__PURE__ */
|
2310
|
-
|
2042
|
+
) : /* @__PURE__ */ jsx33(
|
2043
|
+
Button11,
|
2311
2044
|
{
|
2312
2045
|
color: "cyan",
|
2313
2046
|
onClick: () => {
|
2314
2047
|
disc[1].open();
|
2315
2048
|
},
|
2316
|
-
leftSection: /* @__PURE__ */
|
2049
|
+
leftSection: /* @__PURE__ */ jsx33(IconLivePhoto2, {}),
|
2317
2050
|
children: label
|
2318
2051
|
}
|
2319
2052
|
) }),
|
2320
|
-
/* @__PURE__ */
|
2321
|
-
|
2053
|
+
/* @__PURE__ */ jsx33(
|
2054
|
+
Modal10,
|
2322
2055
|
{
|
2323
2056
|
fullScreen: fullScreen[0],
|
2324
2057
|
opened: disc[0],
|
2325
2058
|
onClose: disc[1].close,
|
2326
2059
|
size: modalSize,
|
2327
|
-
title: /* @__PURE__ */
|
2328
|
-
/* @__PURE__ */
|
2329
|
-
fullScreen[0] ? /* @__PURE__ */
|
2330
|
-
|
2060
|
+
title: /* @__PURE__ */ jsxs20(Group9, { children: [
|
2061
|
+
/* @__PURE__ */ jsx33(Text6, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
2062
|
+
fullScreen[0] ? /* @__PURE__ */ jsx33(
|
2063
|
+
ActionIcon10,
|
2331
2064
|
{
|
2332
2065
|
onClick: () => {
|
2333
2066
|
fullScreen[1](false);
|
2334
2067
|
hSize[1]("80vh");
|
2335
2068
|
},
|
2336
|
-
children: /* @__PURE__ */
|
2069
|
+
children: /* @__PURE__ */ jsx33(IconMinimize3, {})
|
2337
2070
|
}
|
2338
|
-
) : /* @__PURE__ */
|
2339
|
-
|
2071
|
+
) : /* @__PURE__ */ jsx33(
|
2072
|
+
ActionIcon10,
|
2340
2073
|
{
|
2341
2074
|
onClick: () => {
|
2342
2075
|
fullScreen[1](true);
|
2343
2076
|
hSize[1]("90vh");
|
2344
2077
|
},
|
2345
|
-
children: /* @__PURE__ */
|
2078
|
+
children: /* @__PURE__ */ jsx33(IconMaximize3, {})
|
2346
2079
|
}
|
2347
2080
|
)
|
2348
2081
|
] }),
|
2349
|
-
children: /* @__PURE__ */
|
2350
|
-
/* @__PURE__ */
|
2082
|
+
children: /* @__PURE__ */ jsxs20(Paper3, { h: hSize[0], p: "lg", pos: "relative", children: [
|
2083
|
+
/* @__PURE__ */ jsx33(
|
2351
2084
|
LoadingOverlay,
|
2352
2085
|
{
|
2353
2086
|
visible: query.isLoading,
|
@@ -2355,14 +2088,14 @@ function MyButtonViewPDF({
|
|
2355
2088
|
overlayProps: { radius: "sm", blur: 2 }
|
2356
2089
|
}
|
2357
2090
|
),
|
2358
|
-
query.data ? /* @__PURE__ */
|
2091
|
+
query.data ? /* @__PURE__ */ jsx33(
|
2359
2092
|
"iframe",
|
2360
2093
|
{
|
2361
2094
|
src: `data:application/pdf;base64, ${filePath ? (_a = query.data) == null ? void 0 : _a.fileBase64String : (_c = (_b = query.data) == null ? void 0 : _b.fileDetail) == null ? void 0 : _c.fileBase64String}`,
|
2362
2095
|
width: "100%",
|
2363
2096
|
height: "100%"
|
2364
2097
|
}
|
2365
|
-
) : /* @__PURE__ */
|
2098
|
+
) : /* @__PURE__ */ jsx33("iframe", { src, width: "100%", height: "100%" })
|
2366
2099
|
] })
|
2367
2100
|
}
|
2368
2101
|
)
|
@@ -6717,7 +6450,7 @@ import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
|
6717
6450
|
import { Paper as Paper4, Text as Text7 } from "@mantine/core";
|
6718
6451
|
import "@schedule-x/theme-default/dist/index.css";
|
6719
6452
|
import { useEffect as useEffect6 } from "react";
|
6720
|
-
import { jsx as
|
6453
|
+
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
6721
6454
|
function MyCalendar() {
|
6722
6455
|
const plugins = [createEventsServicePlugin(), createEventModalPlugin()];
|
6723
6456
|
const calendar = useNextCalendarApp({
|
@@ -6791,16 +6524,16 @@ function MyCalendar() {
|
|
6791
6524
|
useEffect6(() => {
|
6792
6525
|
calendar == null ? void 0 : calendar.events.getAll();
|
6793
6526
|
}, []);
|
6794
|
-
return /* @__PURE__ */
|
6527
|
+
return /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ScheduleXCalendar, { calendarApp: calendar, customComponents: {
|
6795
6528
|
timeGridEvent: ({ calendarEvent }) => {
|
6796
6529
|
console.log(calendarEvent);
|
6797
|
-
return /* @__PURE__ */
|
6798
|
-
/* @__PURE__ */
|
6530
|
+
return /* @__PURE__ */ jsx34(Paper4, { h: "100%", bg: calendarEvent.laLichThi ? "violet.2" : "blue.2", p: 4, children: /* @__PURE__ */ jsxs21(MyFlexColumn, { gap: 1, children: [
|
6531
|
+
/* @__PURE__ */ jsxs21(Text7, { size: "sm", fw: "bold", children: [
|
6799
6532
|
calendarEvent.laLichThi ? "(Thi) " : "(H\u1ECDc) ",
|
6800
6533
|
calendarEvent.title
|
6801
6534
|
] }),
|
6802
|
-
calendarEvent.laLichThi == false && /* @__PURE__ */
|
6803
|
-
/* @__PURE__ */
|
6535
|
+
calendarEvent.laLichThi == false && /* @__PURE__ */ jsx34(Text7, { size: "sm", children: calendarEvent.giangvien }),
|
6536
|
+
/* @__PURE__ */ jsx34(Text7, { size: "sm", children: calendarEvent.location })
|
6804
6537
|
] }) });
|
6805
6538
|
}
|
6806
6539
|
// eventModal: ({ calendarEvent }) => {
|
@@ -6815,31 +6548,23 @@ function MyCalendar() {
|
|
6815
6548
|
|
6816
6549
|
// src/components/CenterFull/MyCenterFull.tsx
|
6817
6550
|
import { Center as Center2, Group as Group10 } from "@mantine/core";
|
6818
|
-
import { jsx as
|
6551
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
6819
6552
|
function MyCenterFull({ children }) {
|
6820
|
-
return /* @__PURE__ */
|
6553
|
+
return /* @__PURE__ */ jsx35(Center2, { w: "100%", children: /* @__PURE__ */ jsx35(Group10, { children }) });
|
6821
6554
|
}
|
6822
6555
|
|
6823
6556
|
// src/components/Checkbox/MyCheckbox.tsx
|
6824
6557
|
import { Checkbox as Checkbox2 } from "@mantine/core";
|
6825
|
-
import { jsx as
|
6558
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
6826
6559
|
function MyCheckbox(_a) {
|
6827
6560
|
var rest = __objRest(_a, []);
|
6828
|
-
return /* @__PURE__ */
|
6829
|
-
}
|
6830
|
-
|
6831
|
-
// src/components/Layouts/FlexRow/MyFlexRow.tsx
|
6832
|
-
import { Flex as Flex2 } from "@mantine/core";
|
6833
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
6834
|
-
function MyFlexRow(_a) {
|
6835
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6836
|
-
return /* @__PURE__ */ jsx42(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
|
6561
|
+
return /* @__PURE__ */ jsx36(Checkbox2, __spreadValues({}, rest));
|
6837
6562
|
}
|
6838
6563
|
|
6839
6564
|
// src/components/DataDisplay/Card/AQCard.tsx
|
6840
6565
|
import { Badge as Badge2, Card, Center as Center3, Image, Text as Text8 } from "@mantine/core";
|
6841
6566
|
import Link from "next/link";
|
6842
|
-
import { jsx as
|
6567
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
6843
6568
|
function AQCard({
|
6844
6569
|
imgSrc = "https://raw.githubusercontent.com/mantinedev/mantine/master/.demo/images/bg-8.png",
|
6845
6570
|
title,
|
@@ -6849,8 +6574,8 @@ function AQCard({
|
|
6849
6574
|
status,
|
6850
6575
|
href = ""
|
6851
6576
|
}) {
|
6852
|
-
return /* @__PURE__ */
|
6853
|
-
/* @__PURE__ */
|
6577
|
+
return /* @__PURE__ */ jsxs22(Card, { shadow: "sm", padding: "lg", radius: "md", withBorder: true, component: Link, href, children: [
|
6578
|
+
/* @__PURE__ */ jsx37(Card.Section, { children: /* @__PURE__ */ jsx37(Center3, { children: /* @__PURE__ */ jsx37(
|
6854
6579
|
Image,
|
6855
6580
|
{
|
6856
6581
|
src: imgSrc,
|
@@ -6860,19 +6585,19 @@ function AQCard({
|
|
6860
6585
|
alt: "Norway"
|
6861
6586
|
}
|
6862
6587
|
) }) }),
|
6863
|
-
/* @__PURE__ */
|
6864
|
-
/* @__PURE__ */
|
6865
|
-
status && /* @__PURE__ */
|
6588
|
+
/* @__PURE__ */ jsxs22(MyFlexRow, { justify: "space-between", mt: "md", mb: "xs", children: [
|
6589
|
+
/* @__PURE__ */ jsx37(Text8, { fw: 500, children: title }),
|
6590
|
+
status && /* @__PURE__ */ jsx37(Badge2, { color: "violet.5", w: "150px", children: status })
|
6866
6591
|
] }),
|
6867
|
-
/* @__PURE__ */
|
6592
|
+
/* @__PURE__ */ jsx37(Text8, { size: "sm", c: "dimmed", lineClamp: 2, children: description }),
|
6868
6593
|
children
|
6869
6594
|
] });
|
6870
6595
|
}
|
6871
6596
|
|
6872
6597
|
// src/components/DataDisplay/CardInformation/MyCardInformation.tsx
|
6873
|
-
import { Box as Box2, Flex
|
6598
|
+
import { Box as Box2, Flex, Group as Group11, Paper as Paper5, Text as Text9 } from "@mantine/core";
|
6874
6599
|
import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
|
6875
|
-
import { jsx as
|
6600
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
6876
6601
|
function MyCardInformation({
|
6877
6602
|
title,
|
6878
6603
|
value,
|
@@ -6882,16 +6607,16 @@ function MyCardInformation({
|
|
6882
6607
|
diff = 0,
|
6883
6608
|
extraControl
|
6884
6609
|
}) {
|
6885
|
-
return /* @__PURE__ */
|
6610
|
+
return /* @__PURE__ */ jsxs23(
|
6886
6611
|
Paper5,
|
6887
6612
|
{
|
6888
6613
|
withBorder: true,
|
6889
6614
|
p: "md",
|
6890
6615
|
radius: "md",
|
6891
6616
|
children: [
|
6892
|
-
/* @__PURE__ */
|
6893
|
-
/* @__PURE__ */
|
6894
|
-
/* @__PURE__ */
|
6617
|
+
/* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
|
6618
|
+
/* @__PURE__ */ jsxs23(Flex, { direction: "column", children: [
|
6619
|
+
/* @__PURE__ */ jsx38(
|
6895
6620
|
Text9,
|
6896
6621
|
{
|
6897
6622
|
tt: "uppercase",
|
@@ -6900,24 +6625,24 @@ function MyCardInformation({
|
|
6900
6625
|
children: title
|
6901
6626
|
}
|
6902
6627
|
),
|
6903
|
-
unit == "" ? /* @__PURE__ */
|
6628
|
+
unit == "" ? /* @__PURE__ */ jsxs23(Text9, { size: "xs", style: { visibility: "hidden" }, children: [
|
6904
6629
|
"\u0110\u01A1n v\u1ECB: ",
|
6905
|
-
/* @__PURE__ */
|
6906
|
-
] }) : /* @__PURE__ */
|
6630
|
+
/* @__PURE__ */ jsx38("strong", { children: unit })
|
6631
|
+
] }) : /* @__PURE__ */ jsxs23(Text9, { size: "xs", children: [
|
6907
6632
|
"\u0110\u01A1n v\u1ECB: ",
|
6908
|
-
/* @__PURE__ */
|
6633
|
+
/* @__PURE__ */ jsx38("strong", { children: unit })
|
6909
6634
|
] })
|
6910
6635
|
] }),
|
6911
|
-
/* @__PURE__ */
|
6636
|
+
/* @__PURE__ */ jsx38(Box2, { children: icon })
|
6912
6637
|
] }),
|
6913
|
-
/* @__PURE__ */
|
6638
|
+
/* @__PURE__ */ jsxs23(
|
6914
6639
|
Group11,
|
6915
6640
|
{
|
6916
6641
|
mt: "5",
|
6917
6642
|
align: "flex-end",
|
6918
6643
|
gap: "xs",
|
6919
6644
|
children: [
|
6920
|
-
/* @__PURE__ */
|
6645
|
+
/* @__PURE__ */ jsx38(
|
6921
6646
|
Text9,
|
6922
6647
|
{
|
6923
6648
|
fw: 700,
|
@@ -6925,7 +6650,7 @@ function MyCardInformation({
|
|
6925
6650
|
children: value
|
6926
6651
|
}
|
6927
6652
|
),
|
6928
|
-
/* @__PURE__ */
|
6653
|
+
/* @__PURE__ */ jsxs23(
|
6929
6654
|
Text9,
|
6930
6655
|
{
|
6931
6656
|
mb: "2",
|
@@ -6933,19 +6658,19 @@ function MyCardInformation({
|
|
6933
6658
|
fz: "h2",
|
6934
6659
|
fw: 500,
|
6935
6660
|
children: [
|
6936
|
-
/* @__PURE__ */
|
6661
|
+
/* @__PURE__ */ jsxs23("span", { children: [
|
6937
6662
|
diff,
|
6938
6663
|
"%"
|
6939
6664
|
] }),
|
6940
|
-
diff > 0 ? /* @__PURE__ */
|
6665
|
+
diff > 0 ? /* @__PURE__ */ jsx38(IconArrowUpRight, {}) : /* @__PURE__ */ jsx38(IconArrowDownRight, {})
|
6941
6666
|
]
|
6942
6667
|
}
|
6943
6668
|
)
|
6944
6669
|
]
|
6945
6670
|
}
|
6946
6671
|
),
|
6947
|
-
/* @__PURE__ */
|
6948
|
-
/* @__PURE__ */
|
6672
|
+
/* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
|
6673
|
+
/* @__PURE__ */ jsx38(Text9, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6949
6674
|
extraControl
|
6950
6675
|
] })
|
6951
6676
|
]
|
@@ -6956,50 +6681,50 @@ function MyCardInformation({
|
|
6956
6681
|
|
6957
6682
|
// src/components/DataDisplay/IconText/MyIconText.tsx
|
6958
6683
|
import { Group as Group12, Text as Text10 } from "@mantine/core";
|
6959
|
-
import { jsx as
|
6684
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
6960
6685
|
function MyIconText({ icon: Icon, text }) {
|
6961
|
-
return /* @__PURE__ */
|
6962
|
-
Icon && /* @__PURE__ */
|
6963
|
-
/* @__PURE__ */
|
6686
|
+
return /* @__PURE__ */ jsxs24(Group12, { wrap: "nowrap", gap: 10, mt: 3, children: [
|
6687
|
+
Icon && /* @__PURE__ */ jsx39(Icon, { stroke: 1.5, size: 16 }),
|
6688
|
+
/* @__PURE__ */ jsx39(Text10, { fz: "lg", c: "dimmed", children: text })
|
6964
6689
|
] });
|
6965
6690
|
}
|
6966
6691
|
|
6967
6692
|
// src/components/DataDisplay/KeyLabel/MyKeyLabel.tsx
|
6968
6693
|
import { Group as Group13, Text as Text11 } from "@mantine/core";
|
6969
|
-
import { jsx as
|
6694
|
+
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
6970
6695
|
function MyKeyLabel({ keyLabel, label }) {
|
6971
|
-
return /* @__PURE__ */
|
6972
|
-
/* @__PURE__ */
|
6696
|
+
return /* @__PURE__ */ jsxs25(Group13, { gap: 5, children: [
|
6697
|
+
/* @__PURE__ */ jsxs25(Text11, { fw: "bold", children: [
|
6973
6698
|
keyLabel,
|
6974
6699
|
":"
|
6975
6700
|
] }),
|
6976
|
-
/* @__PURE__ */
|
6701
|
+
/* @__PURE__ */ jsx40(Text11, { children: label })
|
6977
6702
|
] });
|
6978
6703
|
}
|
6979
6704
|
|
6980
6705
|
// src/components/DataDisplay/NumberFormatter/MyNumberFormatter.tsx
|
6981
6706
|
import { NumberFormatter } from "@mantine/core";
|
6982
|
-
import { jsx as
|
6707
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
6983
6708
|
function MyNumberFormatter(_a) {
|
6984
6709
|
var rest = __objRest(_a, []);
|
6985
|
-
return /* @__PURE__ */
|
6710
|
+
return /* @__PURE__ */ jsx41(NumberFormatter, __spreadValues({ thousandSeparator: true, suffix: " VN\u0110" }, rest));
|
6986
6711
|
}
|
6987
6712
|
|
6988
6713
|
// src/components/DataDisplay/StatCard/AQStatCard1.tsx
|
6989
|
-
import { Box as Box3, Button as
|
6714
|
+
import { Box as Box3, Button as Button13, Flex as Flex2, Group as Group14, Paper as Paper6, Text as Text12 } from "@mantine/core";
|
6990
6715
|
import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
|
6991
|
-
import { Fragment as
|
6716
|
+
import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
6992
6717
|
function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
6993
|
-
return /* @__PURE__ */
|
6718
|
+
return /* @__PURE__ */ jsx42(Fragment12, { children: /* @__PURE__ */ jsxs26(
|
6994
6719
|
Paper6,
|
6995
6720
|
{
|
6996
6721
|
withBorder: true,
|
6997
6722
|
p: "md",
|
6998
6723
|
radius: "md",
|
6999
6724
|
children: [
|
7000
|
-
/* @__PURE__ */
|
7001
|
-
/* @__PURE__ */
|
7002
|
-
/* @__PURE__ */
|
6725
|
+
/* @__PURE__ */ jsxs26(Group14, { justify: "space-between", children: [
|
6726
|
+
/* @__PURE__ */ jsxs26(Flex2, { direction: "column", children: [
|
6727
|
+
/* @__PURE__ */ jsx42(
|
7003
6728
|
Text12,
|
7004
6729
|
{
|
7005
6730
|
tt: "uppercase",
|
@@ -7008,24 +6733,24 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
7008
6733
|
children: title
|
7009
6734
|
}
|
7010
6735
|
),
|
7011
|
-
unit == "" ? /* @__PURE__ */
|
6736
|
+
unit == "" ? /* @__PURE__ */ jsxs26(Text12, { size: "xs", style: { visibility: "hidden" }, children: [
|
7012
6737
|
"\u0110\u01A1n v\u1ECB: ",
|
7013
|
-
/* @__PURE__ */
|
7014
|
-
] }) : /* @__PURE__ */
|
6738
|
+
/* @__PURE__ */ jsx42("strong", { children: unit })
|
6739
|
+
] }) : /* @__PURE__ */ jsxs26(Text12, { size: "xs", children: [
|
7015
6740
|
"\u0110\u01A1n v\u1ECB: ",
|
7016
|
-
/* @__PURE__ */
|
6741
|
+
/* @__PURE__ */ jsx42("strong", { children: unit })
|
7017
6742
|
] })
|
7018
6743
|
] }),
|
7019
|
-
/* @__PURE__ */
|
6744
|
+
/* @__PURE__ */ jsx42(Box3, { children: icons })
|
7020
6745
|
] }),
|
7021
|
-
/* @__PURE__ */
|
6746
|
+
/* @__PURE__ */ jsxs26(
|
7022
6747
|
Group14,
|
7023
6748
|
{
|
7024
6749
|
mt: "5",
|
7025
6750
|
align: "flex-end",
|
7026
6751
|
gap: "xs",
|
7027
6752
|
children: [
|
7028
|
-
/* @__PURE__ */
|
6753
|
+
/* @__PURE__ */ jsx42(
|
7029
6754
|
Text12,
|
7030
6755
|
{
|
7031
6756
|
fw: 700,
|
@@ -7033,7 +6758,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
7033
6758
|
children: value
|
7034
6759
|
}
|
7035
6760
|
),
|
7036
|
-
/* @__PURE__ */
|
6761
|
+
/* @__PURE__ */ jsxs26(
|
7037
6762
|
Text12,
|
7038
6763
|
{
|
7039
6764
|
mb: "2",
|
@@ -7041,21 +6766,21 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
7041
6766
|
fz: "h2",
|
7042
6767
|
fw: 500,
|
7043
6768
|
children: [
|
7044
|
-
/* @__PURE__ */
|
6769
|
+
/* @__PURE__ */ jsxs26("span", { children: [
|
7045
6770
|
diff,
|
7046
6771
|
"%"
|
7047
6772
|
] }),
|
7048
|
-
diff > 0 ? /* @__PURE__ */
|
6773
|
+
diff > 0 ? /* @__PURE__ */ jsx42(IconArrowUpRight2, {}) : /* @__PURE__ */ jsx42(IconArrowDownRight2, {})
|
7049
6774
|
]
|
7050
6775
|
}
|
7051
6776
|
)
|
7052
6777
|
]
|
7053
6778
|
}
|
7054
6779
|
),
|
7055
|
-
/* @__PURE__ */
|
7056
|
-
/* @__PURE__ */
|
7057
|
-
/* @__PURE__ */
|
7058
|
-
|
6780
|
+
/* @__PURE__ */ jsxs26(Group14, { justify: "space-between", children: [
|
6781
|
+
/* @__PURE__ */ jsx42(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6782
|
+
/* @__PURE__ */ jsx42(
|
6783
|
+
Button13,
|
7059
6784
|
{
|
7060
6785
|
variant: "light",
|
7061
6786
|
size: "xs",
|
@@ -7145,45 +6870,20 @@ function FaviconSetter() {
|
|
7145
6870
|
|
7146
6871
|
// src/components/Inputs/DateInput/MyDateInput.tsx
|
7147
6872
|
import { DateInput } from "@mantine/dates";
|
7148
|
-
import { jsx as
|
6873
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
7149
6874
|
function MyDateInput(_a) {
|
7150
6875
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
7151
|
-
return /* @__PURE__ */
|
7152
|
-
}
|
7153
|
-
|
7154
|
-
// src/components/Inputs/DayOfWeekPicker/CoreDayOfWeekPicker.tsx
|
7155
|
-
import { Badge as Badge3, Group as Group15 } from "@mantine/core";
|
7156
|
-
import { jsx as jsx50 } from "react/jsx-runtime";
|
7157
|
-
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
7158
|
-
function CoreDayOfWeekPicker({ value = [], onChange }) {
|
7159
|
-
const toggle = (val) => {
|
7160
|
-
if (!onChange) return;
|
7161
|
-
const newValue = value.includes(val) ? value.filter((v5) => v5 !== val) : [...value, val].sort((a5, b4) => a5 - b4);
|
7162
|
-
onChange(newValue);
|
7163
|
-
};
|
7164
|
-
return /* @__PURE__ */ jsx50(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx50(Group15, { gap: "xs", children: days.map((d5) => /* @__PURE__ */ jsx50(
|
7165
|
-
Badge3,
|
7166
|
-
{
|
7167
|
-
variant: value.includes(d5.value) ? "filled" : "outline",
|
7168
|
-
color: "blue",
|
7169
|
-
radius: "sm",
|
7170
|
-
size: "lg",
|
7171
|
-
onClick: () => toggle(d5.value),
|
7172
|
-
style: { cursor: onChange ? "pointer" : "default", userSelect: "none" },
|
7173
|
-
children: d5.label
|
7174
|
-
},
|
7175
|
-
d5.value
|
7176
|
-
)) }) });
|
6876
|
+
return /* @__PURE__ */ jsx43(DateInput, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
7177
6877
|
}
|
7178
6878
|
|
7179
6879
|
// src/components/Inputs/Fieldset/MyFieldset.tsx
|
7180
6880
|
import {
|
7181
6881
|
Fieldset as Fieldset4,
|
7182
|
-
Group as
|
7183
|
-
Text as
|
6882
|
+
Group as Group15,
|
6883
|
+
Text as Text13,
|
7184
6884
|
useMantineColorScheme as useMantineColorScheme2
|
7185
6885
|
} from "@mantine/core";
|
7186
|
-
import { jsx as
|
6886
|
+
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
7187
6887
|
function MyFieldset(_a) {
|
7188
6888
|
var _b = _a, {
|
7189
6889
|
children,
|
@@ -7212,10 +6912,10 @@ function MyFieldset(_a) {
|
|
7212
6912
|
const mergedStyles = typeof styles === "function" ? styles : __spreadProps(__spreadValues({}, styles), {
|
7213
6913
|
legend: __spreadValues(__spreadValues({}, defaultLegendStyles), styles == null ? void 0 : styles.legend)
|
7214
6914
|
});
|
7215
|
-
return /* @__PURE__ */
|
6915
|
+
return /* @__PURE__ */ jsx44(
|
7216
6916
|
Fieldset4,
|
7217
6917
|
__spreadProps(__spreadValues({
|
7218
|
-
legend: customLegend != null ? customLegend : /* @__PURE__ */
|
6918
|
+
legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx44(Group15, { gap: "xs", children: /* @__PURE__ */ jsxs27(Text13, { fw: 600, children: [
|
7219
6919
|
" ",
|
7220
6920
|
title,
|
7221
6921
|
" "
|
@@ -7230,13 +6930,13 @@ function MyFieldset(_a) {
|
|
7230
6930
|
// src/components/Inputs/FileInput/MyFileInput.tsx
|
7231
6931
|
import { FileInput as FileInput3 } from "@mantine/core";
|
7232
6932
|
import { IconFile } from "@tabler/icons-react";
|
7233
|
-
import { jsx as
|
6933
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
7234
6934
|
function MyFileInput(_a) {
|
7235
6935
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
7236
|
-
return /* @__PURE__ */
|
6936
|
+
return /* @__PURE__ */ jsx45(
|
7237
6937
|
FileInput3,
|
7238
6938
|
__spreadValues({
|
7239
|
-
rightSection: /* @__PURE__ */
|
6939
|
+
rightSection: /* @__PURE__ */ jsx45(IconFile, {}),
|
7240
6940
|
label,
|
7241
6941
|
placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : ""
|
7242
6942
|
}, rest)
|
@@ -7245,10 +6945,10 @@ function MyFileInput(_a) {
|
|
7245
6945
|
|
7246
6946
|
// src/components/Inputs/NumberInput/MyNumberInput.tsx
|
7247
6947
|
import { NumberInput as NumberInput2 } from "@mantine/core";
|
7248
|
-
import { jsx as
|
6948
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
7249
6949
|
function MyNumberInput(_a) {
|
7250
6950
|
var _b = _a, { minValue, label } = _b, rest = __objRest(_b, ["minValue", "label"]);
|
7251
|
-
return /* @__PURE__ */
|
6951
|
+
return /* @__PURE__ */ jsx46(
|
7252
6952
|
NumberInput2,
|
7253
6953
|
__spreadValues({
|
7254
6954
|
label,
|
@@ -7260,10 +6960,10 @@ function MyNumberInput(_a) {
|
|
7260
6960
|
|
7261
6961
|
// src/components/Inputs/TextArea/MyTextArea.tsx
|
7262
6962
|
import { Textarea } from "@mantine/core";
|
7263
|
-
import { jsx as
|
6963
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
7264
6964
|
function MyTextArea(_a) {
|
7265
6965
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
7266
|
-
return /* @__PURE__ */
|
6966
|
+
return /* @__PURE__ */ jsx47(Textarea, __spreadValues({ label, placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
7267
6967
|
}
|
7268
6968
|
|
7269
6969
|
// src/components/Inputs/TextEditor/MyTextEditor.tsx
|
@@ -7279,7 +6979,7 @@ import Underline from "@tiptap/extension-underline";
|
|
7279
6979
|
import { useEditor } from "@tiptap/react";
|
7280
6980
|
import StarterKit from "@tiptap/starter-kit";
|
7281
6981
|
import { useEffect as useEffect8, useState as useState9 } from "react";
|
7282
|
-
import { jsx as
|
6982
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
7283
6983
|
function MyTextEditor(_a) {
|
7284
6984
|
var _b = _a, {
|
7285
6985
|
autoHiddenToolBar = false,
|
@@ -7385,43 +7085,43 @@ function MyTextEditor(_a) {
|
|
7385
7085
|
editor.commands.setContent(value);
|
7386
7086
|
}
|
7387
7087
|
}, [value, editor]);
|
7388
|
-
return /* @__PURE__ */
|
7389
|
-
/* @__PURE__ */
|
7390
|
-
/* @__PURE__ */
|
7391
|
-
/* @__PURE__ */
|
7392
|
-
/* @__PURE__ */
|
7393
|
-
/* @__PURE__ */
|
7394
|
-
/* @__PURE__ */
|
7395
|
-
/* @__PURE__ */
|
7396
|
-
/* @__PURE__ */
|
7397
|
-
/* @__PURE__ */
|
7088
|
+
return /* @__PURE__ */ jsx48(Input.Wrapper, __spreadProps(__spreadValues({ label, flex: 1, error, withAsterisk }, inputWrapperProps), { children: /* @__PURE__ */ jsxs28(RichTextEditor, __spreadProps(__spreadValues({ editor, style: { border: error && "1px solid #e03131" } }, richTextEditorProps), { children: [
|
7089
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.Toolbar, { hidden: hiddenToolBar, sticky: true, stickyOffset: 60, children: [
|
7090
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
7091
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Bold, {}),
|
7092
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Italic, {}),
|
7093
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Underline, {}),
|
7094
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Strikethrough, {}),
|
7095
|
+
/* @__PURE__ */ jsx48(RichTextEditor.ClearFormatting, {}),
|
7096
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Highlight, {}),
|
7097
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Code, {})
|
7398
7098
|
] }),
|
7399
|
-
/* @__PURE__ */
|
7400
|
-
/* @__PURE__ */
|
7401
|
-
/* @__PURE__ */
|
7402
|
-
/* @__PURE__ */
|
7403
|
-
/* @__PURE__ */
|
7099
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
7100
|
+
/* @__PURE__ */ jsx48(RichTextEditor.H1, {}),
|
7101
|
+
/* @__PURE__ */ jsx48(RichTextEditor.H2, {}),
|
7102
|
+
/* @__PURE__ */ jsx48(RichTextEditor.H3, {}),
|
7103
|
+
/* @__PURE__ */ jsx48(RichTextEditor.H4, {})
|
7404
7104
|
] }),
|
7405
|
-
/* @__PURE__ */
|
7406
|
-
/* @__PURE__ */
|
7407
|
-
/* @__PURE__ */
|
7408
|
-
/* @__PURE__ */
|
7409
|
-
/* @__PURE__ */
|
7410
|
-
/* @__PURE__ */
|
7411
|
-
/* @__PURE__ */
|
7105
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
7106
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Blockquote, {}),
|
7107
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Hr, {}),
|
7108
|
+
/* @__PURE__ */ jsx48(RichTextEditor.BulletList, {}),
|
7109
|
+
/* @__PURE__ */ jsx48(RichTextEditor.OrderedList, {}),
|
7110
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Subscript, {}),
|
7111
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Superscript, {})
|
7412
7112
|
] }),
|
7413
|
-
/* @__PURE__ */
|
7414
|
-
/* @__PURE__ */
|
7415
|
-
/* @__PURE__ */
|
7113
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
7114
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Link, {}),
|
7115
|
+
/* @__PURE__ */ jsx48(RichTextEditor.Unlink, {})
|
7416
7116
|
] }),
|
7417
|
-
/* @__PURE__ */
|
7418
|
-
/* @__PURE__ */
|
7419
|
-
/* @__PURE__ */
|
7420
|
-
/* @__PURE__ */
|
7421
|
-
/* @__PURE__ */
|
7117
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
7118
|
+
/* @__PURE__ */ jsx48(RichTextEditor.AlignLeft, {}),
|
7119
|
+
/* @__PURE__ */ jsx48(RichTextEditor.AlignCenter, {}),
|
7120
|
+
/* @__PURE__ */ jsx48(RichTextEditor.AlignJustify, {}),
|
7121
|
+
/* @__PURE__ */ jsx48(RichTextEditor.AlignRight, {})
|
7422
7122
|
] })
|
7423
7123
|
] }),
|
7424
|
-
/* @__PURE__ */
|
7124
|
+
/* @__PURE__ */ jsx48(
|
7425
7125
|
ScrollArea2.Autosize,
|
7426
7126
|
{
|
7427
7127
|
onMouseDown: () => {
|
@@ -7436,7 +7136,7 @@ function MyTextEditor(_a) {
|
|
7436
7136
|
setHiddenToolBar(false);
|
7437
7137
|
},
|
7438
7138
|
style: { cursor: "text", maxHeight: "400px" },
|
7439
|
-
children: /* @__PURE__ */
|
7139
|
+
children: /* @__PURE__ */ jsx48(RichTextEditor.Content, { mih: contentHeight })
|
7440
7140
|
}
|
7441
7141
|
)
|
7442
7142
|
] })) }));
|
@@ -7444,18 +7144,18 @@ function MyTextEditor(_a) {
|
|
7444
7144
|
|
7445
7145
|
// src/components/Inputs/WeeklySessionSchedulerPicker/MyWeeklySessionSchedulerPicker.tsx
|
7446
7146
|
import {
|
7447
|
-
Button as
|
7147
|
+
Button as Button14,
|
7448
7148
|
Center as Center4,
|
7449
7149
|
Divider as Divider2,
|
7450
|
-
Group as
|
7150
|
+
Group as Group16,
|
7451
7151
|
NumberInput as NumberInput3,
|
7452
7152
|
Paper as Paper7,
|
7453
7153
|
ScrollArea as ScrollArea3,
|
7454
|
-
Text as
|
7154
|
+
Text as Text14
|
7455
7155
|
} from "@mantine/core";
|
7456
|
-
import { IconPlus as
|
7156
|
+
import { IconPlus as IconPlus5, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
7457
7157
|
import { useState as useState10 } from "react";
|
7458
|
-
import { jsx as
|
7158
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
7459
7159
|
function MyWeeklySessionSchedulerPicker({
|
7460
7160
|
value = [],
|
7461
7161
|
onChange
|
@@ -7486,52 +7186,52 @@ function MyWeeklySessionSchedulerPicker({
|
|
7486
7186
|
return acc;
|
7487
7187
|
}, {});
|
7488
7188
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
7489
|
-
return /* @__PURE__ */
|
7490
|
-
/* @__PURE__ */
|
7189
|
+
return /* @__PURE__ */ jsx49(Paper7, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs29(MyFlexColumn, { children: [
|
7190
|
+
/* @__PURE__ */ jsx49(Center4, { children: /* @__PURE__ */ jsx49(
|
7491
7191
|
CoreDayOfWeekPicker,
|
7492
7192
|
{
|
7493
7193
|
value: selectedDays,
|
7494
|
-
onChange: (
|
7495
|
-
const sorted = [...
|
7194
|
+
onChange: (days) => {
|
7195
|
+
const sorted = [...days].sort((a5, b4) => a5 - b4);
|
7496
7196
|
setSelectedDays(sorted);
|
7497
7197
|
}
|
7498
7198
|
}
|
7499
7199
|
) }),
|
7500
|
-
/* @__PURE__ */
|
7501
|
-
/* @__PURE__ */
|
7200
|
+
/* @__PURE__ */ jsx49(Divider2, { my: "xs" }),
|
7201
|
+
/* @__PURE__ */ jsx49(Center4, { children: /* @__PURE__ */ jsx49(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx49(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
7502
7202
|
var _a;
|
7503
|
-
return /* @__PURE__ */
|
7203
|
+
return /* @__PURE__ */ jsxs29(
|
7504
7204
|
Paper7,
|
7505
7205
|
{
|
7506
7206
|
w: "100%",
|
7507
7207
|
p: "md",
|
7508
7208
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
7509
7209
|
children: [
|
7510
|
-
/* @__PURE__ */
|
7511
|
-
/* @__PURE__ */
|
7512
|
-
/* @__PURE__ */
|
7513
|
-
|
7210
|
+
/* @__PURE__ */ jsxs29(Group16, { gap: "apart", children: [
|
7211
|
+
/* @__PURE__ */ jsx49(Text14, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
7212
|
+
/* @__PURE__ */ jsx49(
|
7213
|
+
Button14,
|
7514
7214
|
{
|
7515
7215
|
color: "teal.5",
|
7516
|
-
leftSection: /* @__PURE__ */
|
7216
|
+
leftSection: /* @__PURE__ */ jsx49(IconPlus5, { size: 14 }),
|
7517
7217
|
onClick: () => handleAddSession(dayOfWeek),
|
7518
7218
|
children: "Th\xEAm bu\u1ED5i"
|
7519
7219
|
}
|
7520
7220
|
)
|
7521
7221
|
] }),
|
7522
|
-
/* @__PURE__ */
|
7222
|
+
/* @__PURE__ */ jsx49(Divider2, { my: "sm" }),
|
7523
7223
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
7524
7224
|
const globalIndex = value.findIndex(
|
7525
7225
|
(v5) => v5 === item
|
7526
7226
|
);
|
7527
|
-
return /* @__PURE__ */
|
7528
|
-
|
7227
|
+
return /* @__PURE__ */ jsxs29(
|
7228
|
+
Group16,
|
7529
7229
|
{
|
7530
7230
|
mt: "xs",
|
7531
7231
|
gap: "xs",
|
7532
7232
|
align: "flex-end",
|
7533
7233
|
children: [
|
7534
|
-
/* @__PURE__ */
|
7234
|
+
/* @__PURE__ */ jsx49(
|
7535
7235
|
NumberInput3,
|
7536
7236
|
{
|
7537
7237
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -7543,7 +7243,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7543
7243
|
)
|
7544
7244
|
}
|
7545
7245
|
),
|
7546
|
-
/* @__PURE__ */
|
7246
|
+
/* @__PURE__ */ jsx49(
|
7547
7247
|
NumberInput3,
|
7548
7248
|
{
|
7549
7249
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -7555,7 +7255,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7555
7255
|
)
|
7556
7256
|
}
|
7557
7257
|
),
|
7558
|
-
/* @__PURE__ */
|
7258
|
+
/* @__PURE__ */ jsx49(
|
7559
7259
|
NumberInput3,
|
7560
7260
|
{
|
7561
7261
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -7564,13 +7264,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
7564
7264
|
value: item.durationMinutes
|
7565
7265
|
}
|
7566
7266
|
),
|
7567
|
-
/* @__PURE__ */
|
7568
|
-
|
7267
|
+
/* @__PURE__ */ jsx49(
|
7268
|
+
Button14,
|
7569
7269
|
{
|
7570
7270
|
variant: "light",
|
7571
7271
|
color: "red",
|
7572
7272
|
onClick: () => handleRemove(globalIndex),
|
7573
|
-
leftSection: /* @__PURE__ */
|
7273
|
+
leftSection: /* @__PURE__ */ jsx49(IconTrash5, { size: 14 }),
|
7574
7274
|
children: "X\xF3a bu\u1ED5i"
|
7575
7275
|
}
|
7576
7276
|
)
|
@@ -7588,7 +7288,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7588
7288
|
}
|
7589
7289
|
|
7590
7290
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
7591
|
-
import { Button as
|
7291
|
+
import { Button as Button15 } from "@mantine/core";
|
7592
7292
|
import { IconLogout } from "@tabler/icons-react";
|
7593
7293
|
import { useRouter as useRouter3 } from "next/navigation";
|
7594
7294
|
|
@@ -7603,27 +7303,27 @@ function useS_authenticate() {
|
|
7603
7303
|
}
|
7604
7304
|
|
7605
7305
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
7606
|
-
import { jsx as
|
7306
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
7607
7307
|
function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
7608
7308
|
const router = useRouter3();
|
7609
7309
|
const S_Authenticate = useS_authenticate();
|
7610
|
-
return /* @__PURE__ */
|
7310
|
+
return /* @__PURE__ */ jsx50(Button15, { onClick: () => {
|
7611
7311
|
S_Authenticate.setProperty("token", "");
|
7612
7312
|
router.replace(redirectURL);
|
7613
|
-
}, leftSection: /* @__PURE__ */
|
7313
|
+
}, leftSection: /* @__PURE__ */ jsx50(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
7614
7314
|
}
|
7615
7315
|
|
7616
7316
|
// src/components/Layouts/BasicAppShell/BasicAppShell.tsx
|
7617
7317
|
import {
|
7618
|
-
ActionIcon as
|
7318
|
+
ActionIcon as ActionIcon11,
|
7619
7319
|
AppShell,
|
7620
|
-
Badge as
|
7320
|
+
Badge as Badge3,
|
7621
7321
|
Divider as Divider3,
|
7622
|
-
Group as
|
7322
|
+
Group as Group17,
|
7623
7323
|
Image as Image3,
|
7624
7324
|
NavLink,
|
7625
7325
|
ScrollArea as ScrollArea4,
|
7626
|
-
Text as
|
7326
|
+
Text as Text15,
|
7627
7327
|
Tooltip as Tooltip5
|
7628
7328
|
} from "@mantine/core";
|
7629
7329
|
import { useFavicon, useMediaQuery } from "@mantine/hooks";
|
@@ -7635,7 +7335,7 @@ import {
|
|
7635
7335
|
import Link3 from "next/link";
|
7636
7336
|
import { usePathname as usePathname2 } from "next/navigation";
|
7637
7337
|
import { useEffect as useEffect9, useMemo as useMemo3, useState as useState11 } from "react";
|
7638
|
-
import { Fragment as
|
7338
|
+
import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
7639
7339
|
function findBreadcrumbPath(items, currentPath, parents = []) {
|
7640
7340
|
for (const item of items) {
|
7641
7341
|
if (item.link === currentPath) {
|
@@ -7650,13 +7350,13 @@ function findBreadcrumbPath(items, currentPath, parents = []) {
|
|
7650
7350
|
}
|
7651
7351
|
function getRightSection(status) {
|
7652
7352
|
if (status === "Prototype")
|
7653
|
-
return /* @__PURE__ */
|
7353
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
|
7654
7354
|
if (status === "New")
|
7655
|
-
return /* @__PURE__ */
|
7355
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", circle: true, children: "N" });
|
7656
7356
|
if (status === "Menu")
|
7657
|
-
return /* @__PURE__ */
|
7357
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "gray", circle: true, children: "M" });
|
7658
7358
|
if (status === "Change")
|
7659
|
-
return /* @__PURE__ */
|
7359
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
|
7660
7360
|
return null;
|
7661
7361
|
}
|
7662
7362
|
function RenderNavLinks({
|
@@ -7664,14 +7364,14 @@ function RenderNavLinks({
|
|
7664
7364
|
}) {
|
7665
7365
|
const basicAppShellStore = useS_BasicAppShell();
|
7666
7366
|
const pathName = usePathname2();
|
7667
|
-
return /* @__PURE__ */
|
7367
|
+
return /* @__PURE__ */ jsx51(Fragment13, { children: items.map((item, index) => /* @__PURE__ */ jsx51(
|
7668
7368
|
NavLink,
|
7669
7369
|
{
|
7670
7370
|
active: item.link === pathName.split("/")[2],
|
7671
7371
|
component: Link3,
|
7672
7372
|
opened: basicAppShellStore.state.groupMenuOpenId.includes(item.label),
|
7673
7373
|
href: `/${pathName.split("/")[1]}/${item.link}` || "#",
|
7674
|
-
label: /* @__PURE__ */
|
7374
|
+
label: /* @__PURE__ */ jsxs30(MyFlexRow, { justify: "space-between", children: [
|
7675
7375
|
item.label,
|
7676
7376
|
" ",
|
7677
7377
|
getRightSection(item.status)
|
@@ -7683,7 +7383,7 @@ function RenderNavLinks({
|
|
7683
7383
|
return;
|
7684
7384
|
}
|
7685
7385
|
},
|
7686
|
-
children: item.links && /* @__PURE__ */
|
7386
|
+
children: item.links && /* @__PURE__ */ jsx51(RenderNavLinks, { items: item.links })
|
7687
7387
|
},
|
7688
7388
|
index
|
7689
7389
|
)) });
|
@@ -7806,7 +7506,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7806
7506
|
basicAppShellStore.setProperty("note", linkItem == null ? void 0 : linkItem.note);
|
7807
7507
|
basicAppShellStore.setProperty("status", linkItem == null ? void 0 : linkItem.status);
|
7808
7508
|
}, [pathName]);
|
7809
|
-
return /* @__PURE__ */
|
7509
|
+
return /* @__PURE__ */ jsxs30(
|
7810
7510
|
AppShell,
|
7811
7511
|
{
|
7812
7512
|
header: { height: 60 },
|
@@ -7820,80 +7520,80 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7820
7520
|
},
|
7821
7521
|
padding: "md",
|
7822
7522
|
children: [
|
7823
|
-
/* @__PURE__ */
|
7824
|
-
/* @__PURE__ */
|
7825
|
-
/* @__PURE__ */
|
7523
|
+
/* @__PURE__ */ jsx51(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs30(Group17, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7524
|
+
/* @__PURE__ */ jsxs30(Group17, { h: "100%", children: [
|
7525
|
+
/* @__PURE__ */ jsx51(
|
7826
7526
|
Tooltip5,
|
7827
7527
|
{
|
7828
7528
|
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7829
|
-
children: /* @__PURE__ */
|
7830
|
-
|
7529
|
+
children: /* @__PURE__ */ jsx51(
|
7530
|
+
ActionIcon11,
|
7831
7531
|
{
|
7832
7532
|
size: "lg",
|
7833
7533
|
radius: "md",
|
7834
7534
|
variant: "default",
|
7835
7535
|
onClick: basicAppShellStore.toggle,
|
7836
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7536
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx51(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx51(IconLayoutSidebarLeftCollapse, {})
|
7837
7537
|
}
|
7838
7538
|
)
|
7839
7539
|
}
|
7840
7540
|
),
|
7841
|
-
/* @__PURE__ */
|
7842
|
-
|
7541
|
+
/* @__PURE__ */ jsx51(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx51(
|
7542
|
+
ActionIcon11,
|
7843
7543
|
{
|
7844
7544
|
size: "lg",
|
7845
7545
|
radius: "md",
|
7846
7546
|
variant: "default",
|
7847
7547
|
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7848
|
-
children: /* @__PURE__ */
|
7548
|
+
children: /* @__PURE__ */ jsx51(IconLibraryMinus, {})
|
7849
7549
|
}
|
7850
7550
|
) })
|
7851
7551
|
] }),
|
7852
|
-
/* @__PURE__ */
|
7853
|
-
|
7552
|
+
/* @__PURE__ */ jsx51(
|
7553
|
+
Group17,
|
7854
7554
|
{
|
7855
7555
|
style: {
|
7856
7556
|
position: "absolute",
|
7857
7557
|
left: "50%",
|
7858
7558
|
transform: "translateX(-50%)"
|
7859
7559
|
},
|
7860
|
-
children: /* @__PURE__ */
|
7560
|
+
children: /* @__PURE__ */ jsx51(Text15, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7861
7561
|
}
|
7862
7562
|
),
|
7863
|
-
/* @__PURE__ */
|
7563
|
+
/* @__PURE__ */ jsxs30(Group17, { children: [
|
7864
7564
|
extraTopRight,
|
7865
|
-
/* @__PURE__ */
|
7565
|
+
/* @__PURE__ */ jsx51(MySwitchTheme, {})
|
7866
7566
|
] })
|
7867
7567
|
] }) : (
|
7868
7568
|
// For mobile screens - simplified layout
|
7869
|
-
/* @__PURE__ */
|
7870
|
-
/* @__PURE__ */
|
7871
|
-
|
7569
|
+
/* @__PURE__ */ jsxs30(Group17, { h: "100%", px: "md", justify: "space-between", children: [
|
7570
|
+
/* @__PURE__ */ jsx51(
|
7571
|
+
ActionIcon11,
|
7872
7572
|
{
|
7873
7573
|
size: "lg",
|
7874
7574
|
radius: "md",
|
7875
7575
|
variant: "default",
|
7876
7576
|
onClick: basicAppShellStore.toggle,
|
7877
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7577
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx51(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx51(IconLayoutSidebarLeftCollapse, {})
|
7878
7578
|
}
|
7879
7579
|
),
|
7880
|
-
/* @__PURE__ */
|
7881
|
-
/* @__PURE__ */
|
7580
|
+
/* @__PURE__ */ jsx51(Text15, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7581
|
+
/* @__PURE__ */ jsxs30(Group17, { children: [
|
7882
7582
|
extraTopRight,
|
7883
|
-
/* @__PURE__ */
|
7583
|
+
/* @__PURE__ */ jsx51(MySwitchTheme, {})
|
7884
7584
|
] })
|
7885
7585
|
] })
|
7886
7586
|
) }),
|
7887
|
-
/* @__PURE__ */
|
7888
|
-
/* @__PURE__ */
|
7889
|
-
/* @__PURE__ */
|
7890
|
-
/* @__PURE__ */
|
7891
|
-
/* @__PURE__ */
|
7892
|
-
/* @__PURE__ */
|
7587
|
+
/* @__PURE__ */ jsxs30(AppShell.Navbar, { children: [
|
7588
|
+
/* @__PURE__ */ jsx51(MyAppSpotlight, { menu }),
|
7589
|
+
/* @__PURE__ */ jsxs30(AppShell.Section, { grow: true, component: ScrollArea4, p: 5, children: [
|
7590
|
+
/* @__PURE__ */ jsx51(RenderNavLinks, { items: menu }),
|
7591
|
+
/* @__PURE__ */ jsx51(Divider3, {}),
|
7592
|
+
/* @__PURE__ */ jsx51(F_authenticate_Logout, {})
|
7893
7593
|
] }),
|
7894
|
-
/* @__PURE__ */
|
7895
|
-
/* @__PURE__ */
|
7896
|
-
/* @__PURE__ */
|
7594
|
+
/* @__PURE__ */ jsxs30(AppShell.Section, { p: "md", children: [
|
7595
|
+
/* @__PURE__ */ jsx51(Divider3, {}),
|
7596
|
+
/* @__PURE__ */ jsx51(
|
7897
7597
|
Image3,
|
7898
7598
|
{
|
7899
7599
|
fit: "contain",
|
@@ -7907,7 +7607,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7907
7607
|
)
|
7908
7608
|
] })
|
7909
7609
|
] }),
|
7910
|
-
/* @__PURE__ */
|
7610
|
+
/* @__PURE__ */ jsx51(
|
7911
7611
|
AppShell.Main,
|
7912
7612
|
{
|
7913
7613
|
bg: "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))",
|
@@ -7961,31 +7661,31 @@ function utils_layout_getItemsWithoutLinks(menu) {
|
|
7961
7661
|
}
|
7962
7662
|
|
7963
7663
|
// src/components/Layouts/Container/MyContainer.tsx
|
7964
|
-
import { Container, Flex as
|
7965
|
-
import { jsx as
|
7664
|
+
import { Container, Flex as Flex3 } from "@mantine/core";
|
7665
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
7966
7666
|
function MyContainer(_a) {
|
7967
7667
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
7968
|
-
return /* @__PURE__ */
|
7668
|
+
return /* @__PURE__ */ jsx52(Container, __spreadProps(__spreadValues({ fluid: true }, rest), { children: /* @__PURE__ */ jsx52(Flex3, { direction: "column", children }) }));
|
7969
7669
|
}
|
7970
7670
|
|
7971
7671
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7972
7672
|
import {
|
7973
7673
|
Box as Box4,
|
7974
7674
|
Burger,
|
7975
|
-
Button as
|
7675
|
+
Button as Button16,
|
7976
7676
|
Container as Container2,
|
7977
7677
|
Divider as Divider4,
|
7978
7678
|
Drawer,
|
7979
|
-
Group as
|
7679
|
+
Group as Group18,
|
7980
7680
|
Image as Image4,
|
7981
7681
|
ScrollArea as ScrollArea5,
|
7982
|
-
Text as
|
7682
|
+
Text as Text16,
|
7983
7683
|
TextInput as TextInput3,
|
7984
7684
|
ThemeIcon,
|
7985
7685
|
UnstyledButton,
|
7986
7686
|
useMantineTheme
|
7987
7687
|
} from "@mantine/core";
|
7988
|
-
import { useDisclosure as
|
7688
|
+
import { useDisclosure as useDisclosure11 } from "@mantine/hooks";
|
7989
7689
|
import {
|
7990
7690
|
IconBook,
|
7991
7691
|
IconChartPie3,
|
@@ -8011,7 +7711,7 @@ function useHeaderMegaMenuStore() {
|
|
8011
7711
|
}
|
8012
7712
|
|
8013
7713
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
8014
|
-
import { jsx as
|
7714
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
8015
7715
|
var mockdata = [
|
8016
7716
|
{
|
8017
7717
|
icon: IconCode,
|
@@ -8045,31 +7745,31 @@ var mockdata = [
|
|
8045
7745
|
}
|
8046
7746
|
];
|
8047
7747
|
function HeaderMegaMenu({ children, menus }) {
|
8048
|
-
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] =
|
8049
|
-
const [linksOpened, { toggle: toggleLinks }] =
|
7748
|
+
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure11(false);
|
7749
|
+
const [linksOpened, { toggle: toggleLinks }] = useDisclosure11(false);
|
8050
7750
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
8051
7751
|
const theme = useMantineTheme();
|
8052
|
-
const links = mockdata.map((item) => /* @__PURE__ */
|
8053
|
-
/* @__PURE__ */
|
8054
|
-
/* @__PURE__ */
|
8055
|
-
/* @__PURE__ */
|
8056
|
-
/* @__PURE__ */
|
7752
|
+
const links = mockdata.map((item) => /* @__PURE__ */ jsx53(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs31(Group18, { wrap: "nowrap", align: "flex-start", children: [
|
7753
|
+
/* @__PURE__ */ jsx53(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx53(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
|
7754
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
7755
|
+
/* @__PURE__ */ jsx53(Text16, { size: "sm", fw: 500, children: item.title }),
|
7756
|
+
/* @__PURE__ */ jsx53(Text16, { size: "xs", c: "dimmed", children: item.description })
|
8057
7757
|
] })
|
8058
7758
|
] }) }, item.title));
|
8059
|
-
return /* @__PURE__ */
|
8060
|
-
/* @__PURE__ */
|
8061
|
-
/* @__PURE__ */
|
8062
|
-
/* @__PURE__ */
|
8063
|
-
/* @__PURE__ */
|
7759
|
+
return /* @__PURE__ */ jsxs31(Box4, { children: [
|
7760
|
+
/* @__PURE__ */ jsx53("header", { className: css_default.header, children: /* @__PURE__ */ jsxs31(Group18, { justify: "space-between", h: "100%", children: [
|
7761
|
+
/* @__PURE__ */ jsxs31(Group18, { children: [
|
7762
|
+
/* @__PURE__ */ jsx53(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
|
7763
|
+
/* @__PURE__ */ jsx53(Group18, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx53(Button16, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
|
8064
7764
|
] }),
|
8065
|
-
/* @__PURE__ */
|
8066
|
-
/* @__PURE__ */
|
8067
|
-
/* @__PURE__ */
|
7765
|
+
/* @__PURE__ */ jsxs31(Group18, { children: [
|
7766
|
+
/* @__PURE__ */ jsx53(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx53(IconSearch2, {}), radius: "xl", w: "250px" }),
|
7767
|
+
/* @__PURE__ */ jsx53(MySwitchTheme, {})
|
8068
7768
|
] }),
|
8069
|
-
/* @__PURE__ */
|
7769
|
+
/* @__PURE__ */ jsx53(Burger, { opened: drawerOpened, onClick: toggleDrawer, hiddenFrom: "sm" })
|
8070
7770
|
] }) }),
|
8071
|
-
/* @__PURE__ */
|
8072
|
-
/* @__PURE__ */
|
7771
|
+
/* @__PURE__ */ jsx53(Container2, { fluid: true, pt: "sm", pb: "md", bg: const_object_colors.mantineBackgroundSecondary, mih: "93vh", children }),
|
7772
|
+
/* @__PURE__ */ jsx53(
|
8073
7773
|
Drawer,
|
8074
7774
|
{
|
8075
7775
|
opened: drawerOpened,
|
@@ -8079,10 +7779,10 @@ function HeaderMegaMenu({ children, menus }) {
|
|
8079
7779
|
title: "Navigation",
|
8080
7780
|
hiddenFrom: "sm",
|
8081
7781
|
zIndex: 1e6,
|
8082
|
-
children: /* @__PURE__ */
|
8083
|
-
/* @__PURE__ */
|
8084
|
-
/* @__PURE__ */
|
8085
|
-
/* @__PURE__ */
|
7782
|
+
children: /* @__PURE__ */ jsxs31(ScrollArea5, { h: "calc(100vh - 80px", mx: "-md", children: [
|
7783
|
+
/* @__PURE__ */ jsx53(Divider4, { my: "sm" }),
|
7784
|
+
/* @__PURE__ */ jsx53(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx53(Button16, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
|
7785
|
+
/* @__PURE__ */ jsx53(Divider4, { my: "sm" })
|
8086
7786
|
] })
|
8087
7787
|
}
|
8088
7788
|
)
|
@@ -8090,8 +7790,8 @@ function HeaderMegaMenu({ children, menus }) {
|
|
8090
7790
|
}
|
8091
7791
|
|
8092
7792
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
8093
|
-
import { Badge as
|
8094
|
-
import { jsx as
|
7793
|
+
import { Badge as Badge4, Breadcrumbs, Code, Container as Container3, Divider as Divider5, Group as Group19, Text as Text17, Title } from "@mantine/core";
|
7794
|
+
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
8095
7795
|
var getStatusColor = (status) => {
|
8096
7796
|
switch (status) {
|
8097
7797
|
case "Prototype":
|
@@ -8102,11 +7802,11 @@ var getStatusColor = (status) => {
|
|
8102
7802
|
};
|
8103
7803
|
function PageTitle({ title, status, note }) {
|
8104
7804
|
const color = getStatusColor(status);
|
8105
|
-
return /* @__PURE__ */
|
8106
|
-
/* @__PURE__ */
|
8107
|
-
/* @__PURE__ */
|
8108
|
-
status && /* @__PURE__ */
|
8109
|
-
|
7805
|
+
return /* @__PURE__ */ jsx54(Group19, { children: /* @__PURE__ */ jsxs32(MyFlexColumn, { gap: 0, children: [
|
7806
|
+
/* @__PURE__ */ jsxs32(Group19, { align: "center", children: [
|
7807
|
+
/* @__PURE__ */ jsx54(Title, { order: 3, children: title }),
|
7808
|
+
status && /* @__PURE__ */ jsx54(
|
7809
|
+
Badge4,
|
8110
7810
|
{
|
8111
7811
|
variant: "gradient",
|
8112
7812
|
gradient: { from: color, to: `${color}.5` },
|
@@ -8116,7 +7816,7 @@ function PageTitle({ title, status, note }) {
|
|
8116
7816
|
}
|
8117
7817
|
)
|
8118
7818
|
] }),
|
8119
|
-
/* @__PURE__ */
|
7819
|
+
/* @__PURE__ */ jsx54(Text17, { size: "lg", c: "dimmed", fs: "italic", children: note })
|
8120
7820
|
] }) });
|
8121
7821
|
}
|
8122
7822
|
function MyPageContent({
|
@@ -8129,11 +7829,11 @@ function MyPageContent({
|
|
8129
7829
|
var _a;
|
8130
7830
|
const basicAppShellStore = useS_BasicAppShell();
|
8131
7831
|
const finalTitle = title || basicAppShellStore.state.title;
|
8132
|
-
return /* @__PURE__ */
|
8133
|
-
/* @__PURE__ */
|
8134
|
-
/* @__PURE__ */
|
8135
|
-
/* @__PURE__ */
|
8136
|
-
/* @__PURE__ */
|
7832
|
+
return /* @__PURE__ */ jsxs32(Container3, { p: 0, fluid: true, children: [
|
7833
|
+
/* @__PURE__ */ jsxs32(Group19, { justify: "space-between", children: [
|
7834
|
+
/* @__PURE__ */ jsxs32(Group19, { children: [
|
7835
|
+
/* @__PURE__ */ jsx54(MyButtonRouterBack, {}),
|
7836
|
+
/* @__PURE__ */ jsx54(
|
8137
7837
|
PageTitle,
|
8138
7838
|
{
|
8139
7839
|
title: finalTitle,
|
@@ -8143,64 +7843,64 @@ function MyPageContent({
|
|
8143
7843
|
),
|
8144
7844
|
leftTopBar
|
8145
7845
|
] }),
|
8146
|
-
/* @__PURE__ */
|
7846
|
+
/* @__PURE__ */ jsxs32(Group19, { p: "md", children: [
|
8147
7847
|
rightTopBar,
|
8148
|
-
/* @__PURE__ */
|
7848
|
+
/* @__PURE__ */ jsx54(Breadcrumbs, { separatorMargin: "7", children: (_a = basicAppShellStore.state.breadcrumb) == null ? void 0 : _a.map((item, idx) => /* @__PURE__ */ jsx54(Text17, { fw: "600", c: "blue", children: item }, idx)) })
|
8149
7849
|
] })
|
8150
7850
|
] }),
|
8151
|
-
/* @__PURE__ */
|
7851
|
+
/* @__PURE__ */ jsx54(Divider5, { my: "xs" }),
|
8152
7852
|
children,
|
8153
|
-
/* @__PURE__ */
|
8154
|
-
/* @__PURE__ */
|
7853
|
+
/* @__PURE__ */ jsx54(Divider5, { my: "xs" }),
|
7854
|
+
/* @__PURE__ */ jsx54(MyFlexEnd, { children: /* @__PURE__ */ jsx54(Code, { color: "var(--mantine-color-blue-light)", children: basicAppShellStore.state.menuCode }) })
|
8155
7855
|
] });
|
8156
7856
|
}
|
8157
7857
|
|
8158
7858
|
// src/components/Layouts/Tab/MyTab.tsx
|
8159
7859
|
import { rem, Space as Space3, Tabs } from "@mantine/core";
|
8160
|
-
import { jsx as
|
7860
|
+
import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
8161
7861
|
function MyTab(_a) {
|
8162
7862
|
var _b = _a, { tabList, children } = _b, rest = __objRest(_b, ["tabList", "children"]);
|
8163
7863
|
const iconStyle = { width: rem(20), height: rem(20) };
|
8164
|
-
return /* @__PURE__ */
|
8165
|
-
/* @__PURE__ */
|
8166
|
-
return /* @__PURE__ */
|
7864
|
+
return /* @__PURE__ */ jsxs33(Tabs, __spreadProps(__spreadValues({ defaultValue: tabList[0].label }, rest), { children: [
|
7865
|
+
/* @__PURE__ */ jsx55(Tabs.List, { children: tabList.map((item, idx) => {
|
7866
|
+
return /* @__PURE__ */ jsx55(Tabs.Tab, { value: item.label, leftSection: item.icon && /* @__PURE__ */ jsx55(item.icon, { style: iconStyle }), children: item.label }, idx);
|
8167
7867
|
}) }),
|
8168
|
-
/* @__PURE__ */
|
7868
|
+
/* @__PURE__ */ jsx55(Space3, { my: "md" }),
|
8169
7869
|
children
|
8170
7870
|
] }));
|
8171
7871
|
}
|
8172
7872
|
|
8173
7873
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
8174
|
-
import { ActionIcon as
|
8175
|
-
import { useDisclosure as
|
8176
|
-
import { IconX as
|
8177
|
-
import { jsx as
|
7874
|
+
import { ActionIcon as ActionIcon12, Button as Button17, Fieldset as Fieldset5, Group as Group20, Modal as Modal11 } from "@mantine/core";
|
7875
|
+
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
7876
|
+
import { IconX as IconX2 } from "@tabler/icons-react";
|
7877
|
+
import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
8178
7878
|
function MyDataTableSelect(_a) {
|
8179
7879
|
var _b = _a, { modalSize, renderTopToolbarCustomActions, data, selectButtonlabel, listState, columns, listLabel } = _b, rest = __objRest(_b, ["modalSize", "renderTopToolbarCustomActions", "data", "selectButtonlabel", "listState", "columns", "listLabel"]);
|
8180
|
-
const disc =
|
7880
|
+
const disc = useDisclosure12(false);
|
8181
7881
|
if (data == void 0) return "\u0110ang t\u1EA3i...";
|
8182
|
-
return /* @__PURE__ */
|
8183
|
-
/* @__PURE__ */
|
7882
|
+
return /* @__PURE__ */ jsxs34(Fieldset5, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: [
|
7883
|
+
/* @__PURE__ */ jsx56(
|
8184
7884
|
MyDataTable,
|
8185
7885
|
__spreadValues({
|
8186
7886
|
renderTopToolbarCustomActions: ({ table }) => {
|
8187
|
-
return /* @__PURE__ */
|
7887
|
+
return /* @__PURE__ */ jsxs34(Group20, { children: [
|
8188
7888
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
8189
|
-
/* @__PURE__ */
|
7889
|
+
/* @__PURE__ */ jsx56(Button17, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
8190
7890
|
] });
|
8191
7891
|
},
|
8192
7892
|
columns,
|
8193
7893
|
data: listState[0],
|
8194
7894
|
renderRowActions: ({ row }) => {
|
8195
|
-
return /* @__PURE__ */
|
7895
|
+
return /* @__PURE__ */ jsx56(MyCenterFull, { children: /* @__PURE__ */ jsx56(ActionIcon12, { color: "red", onClick: () => listState[1].remove(row.index), children: /* @__PURE__ */ jsx56(IconX2, {}) }) });
|
8196
7896
|
}
|
8197
7897
|
}, rest)
|
8198
7898
|
),
|
8199
|
-
/* @__PURE__ */
|
7899
|
+
/* @__PURE__ */ jsx56(Modal11, { opened: disc[0], onClose: disc[1].close, size: modalSize || "80%", children: /* @__PURE__ */ jsx56(
|
8200
7900
|
MyDataTable,
|
8201
7901
|
__spreadValues({
|
8202
7902
|
renderTopToolbarCustomActions: ({ table }) => {
|
8203
|
-
return /* @__PURE__ */
|
7903
|
+
return /* @__PURE__ */ jsx56(Button17, { onClick: () => {
|
8204
7904
|
table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
|
8205
7905
|
disc[1].close();
|
8206
7906
|
}, children: "Ch\u1ECDn" });
|
@@ -8216,7 +7916,7 @@ function MyDataTableSelect(_a) {
|
|
8216
7916
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
8217
7917
|
import { Select as Select3 } from "@mantine/core";
|
8218
7918
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
8219
|
-
import { jsx as
|
7919
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
8220
7920
|
function MySelectAPIGet(_a) {
|
8221
7921
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
8222
7922
|
var _a2;
|
@@ -8235,7 +7935,7 @@ function MySelectAPIGet(_a) {
|
|
8235
7935
|
label: `${item.code}-${item.name}`
|
8236
7936
|
};
|
8237
7937
|
});
|
8238
|
-
return /* @__PURE__ */
|
7938
|
+
return /* @__PURE__ */ jsx57(
|
8239
7939
|
Select3,
|
8240
7940
|
__spreadValues({
|
8241
7941
|
label,
|
@@ -8250,7 +7950,7 @@ import { useNextCalendarApp as useNextCalendarApp2, ScheduleXCalendar as Schedul
|
|
8250
7950
|
import { createEventsServicePlugin as createEventsServicePlugin2 } from "@schedule-x/events-service";
|
8251
7951
|
import { useState as useState12 } from "react";
|
8252
7952
|
import { createEventModalPlugin as createEventModalPlugin2 } from "@schedule-x/event-modal";
|
8253
|
-
import { jsx as
|
7953
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
8254
7954
|
function MyScheduleX({
|
8255
7955
|
values,
|
8256
7956
|
timeGridEvent,
|
@@ -8275,7 +7975,7 @@ function MyScheduleX({
|
|
8275
7975
|
events: values,
|
8276
7976
|
plugins: [eventsService, eventModalPlugin]
|
8277
7977
|
});
|
8278
|
-
return /* @__PURE__ */
|
7978
|
+
return /* @__PURE__ */ jsx58(
|
8279
7979
|
ScheduleXCalendar2,
|
8280
7980
|
{
|
8281
7981
|
calendarApp: calendar,
|
@@ -8289,9 +7989,9 @@ function MyScheduleX({
|
|
8289
7989
|
|
8290
7990
|
// src/components/Skeletons/SkeletonTable/MySkeletonTable.tsx
|
8291
7991
|
import { Skeleton } from "@mantine/core";
|
8292
|
-
import { jsx as
|
7992
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
8293
7993
|
function MySkeletonTable({ h: h4 = 500 }) {
|
8294
|
-
return /* @__PURE__ */
|
7994
|
+
return /* @__PURE__ */ jsx59(Skeleton, { h: h4 });
|
8295
7995
|
}
|
8296
7996
|
|
8297
7997
|
export {
|
@@ -8301,7 +8001,6 @@ export {
|
|
8301
8001
|
MyBoxesBackground,
|
8302
8002
|
MyActionIcon,
|
8303
8003
|
MyTextInput,
|
8304
|
-
MyFlexColumn,
|
8305
8004
|
MyActionIconCheck,
|
8306
8005
|
MyButton,
|
8307
8006
|
MyActionIconModal,
|
@@ -8312,10 +8011,6 @@ export {
|
|
8312
8011
|
MyActionIconViewPDF,
|
8313
8012
|
MySwitchTheme,
|
8314
8013
|
MyAppSpotlight,
|
8315
|
-
CoreActionIcon,
|
8316
|
-
CoreButton,
|
8317
|
-
CoreButtonCreateUpdate,
|
8318
|
-
CoreButtonModal,
|
8319
8014
|
MyAnchorViewPDF,
|
8320
8015
|
MyButtonModal,
|
8321
8016
|
AQButtonCreateByImportFile,
|
@@ -8338,7 +8033,6 @@ export {
|
|
8338
8033
|
MyCalendar,
|
8339
8034
|
MyCenterFull,
|
8340
8035
|
MyCheckbox,
|
8341
|
-
MyFlexRow,
|
8342
8036
|
AQCard,
|
8343
8037
|
MyCardInformation,
|
8344
8038
|
MyIconText,
|
@@ -8348,7 +8042,6 @@ export {
|
|
8348
8042
|
useS_BasicAppShell,
|
8349
8043
|
FaviconSetter,
|
8350
8044
|
MyDateInput,
|
8351
|
-
CoreDayOfWeekPicker,
|
8352
8045
|
MyFieldset,
|
8353
8046
|
MyFileInput,
|
8354
8047
|
MyNumberInput,
|