aq-fe-framework 0.1.271 → 0.1.275
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.
@@ -399,7 +399,23 @@ function MyActionIconDelete(_a) {
|
|
399
399
|
const disc = useDisclosure2();
|
400
400
|
const loadingState = useState2();
|
401
401
|
const mutation = useMyReactMutation({
|
402
|
-
axiosFn: () =>
|
402
|
+
axiosFn: () => {
|
403
|
+
const result = onSubmit();
|
404
|
+
if (result === void 0) {
|
405
|
+
return Promise.resolve({
|
406
|
+
data: {
|
407
|
+
message: "X\xF3a th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
|
408
|
+
data: {},
|
409
|
+
isSuccess: 1
|
410
|
+
},
|
411
|
+
status: 200,
|
412
|
+
statusText: "OK",
|
413
|
+
headers: {},
|
414
|
+
config: {}
|
415
|
+
});
|
416
|
+
}
|
417
|
+
return result;
|
418
|
+
},
|
403
419
|
options: __spreadValues(__spreadValues({
|
404
420
|
onSuccess: () => {
|
405
421
|
queryClient.invalidateQueries();
|
@@ -486,7 +502,23 @@ function MyActionIconUpdate(_a) {
|
|
486
502
|
const disc = useDisclosure3();
|
487
503
|
const queryClient = useQueryClient2();
|
488
504
|
const mutation = useMyReactMutation({
|
489
|
-
axiosFn: (values) =>
|
505
|
+
axiosFn: (values) => {
|
506
|
+
const result = onSubmit(values);
|
507
|
+
if (result === void 0) {
|
508
|
+
return Promise.resolve({
|
509
|
+
data: {
|
510
|
+
message: "S\u1EEDa th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
|
511
|
+
data: {},
|
512
|
+
isSuccess: 1
|
513
|
+
},
|
514
|
+
status: 200,
|
515
|
+
statusText: "OK",
|
516
|
+
headers: {},
|
517
|
+
config: {}
|
518
|
+
});
|
519
|
+
}
|
520
|
+
return result;
|
521
|
+
},
|
490
522
|
options: __spreadValues(__spreadValues({
|
491
523
|
onSuccess: () => {
|
492
524
|
queryClient.invalidateQueries();
|
@@ -1030,7 +1062,23 @@ function MyButtonCreate(_a) {
|
|
1030
1062
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1031
1063
|
const queryClient = useQueryClient4();
|
1032
1064
|
const mutation = useMyReactMutation({
|
1033
|
-
axiosFn: (values) =>
|
1065
|
+
axiosFn: (values) => {
|
1066
|
+
const result = onSubmit(values);
|
1067
|
+
if (result === void 0) {
|
1068
|
+
return Promise.resolve({
|
1069
|
+
data: {
|
1070
|
+
message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
|
1071
|
+
data: {},
|
1072
|
+
isSuccess: 1
|
1073
|
+
},
|
1074
|
+
status: 200,
|
1075
|
+
statusText: "OK",
|
1076
|
+
headers: {},
|
1077
|
+
config: {}
|
1078
|
+
});
|
1079
|
+
}
|
1080
|
+
return result;
|
1081
|
+
},
|
1034
1082
|
options: __spreadValues(__spreadValues({
|
1035
1083
|
onSuccess: () => {
|
1036
1084
|
queryClient.invalidateQueries();
|
@@ -1061,12 +1109,75 @@ function MyButtonCreate(_a) {
|
|
1061
1109
|
] }) }) }));
|
1062
1110
|
}
|
1063
1111
|
|
1112
|
+
// src/components/Buttons/ButtonCRUD/MyButtonCreateUpdate.tsx
|
1113
|
+
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1114
|
+
import { useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1115
|
+
import { ActionIcon as ActionIcon9, Button as Button5, Modal as Modal6 } from "@mantine/core";
|
1116
|
+
import { IconEdit as IconEdit5, IconPlus as IconPlus5 } from "@tabler/icons-react";
|
1117
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
1118
|
+
function MyButtonCreateUpdate({
|
1119
|
+
modalProps,
|
1120
|
+
actionIconProps,
|
1121
|
+
buttonProps,
|
1122
|
+
form,
|
1123
|
+
onSubmit,
|
1124
|
+
onSuccess,
|
1125
|
+
onError,
|
1126
|
+
closeModalWhenSubmit = true,
|
1127
|
+
resetFormWhenSubmit = true,
|
1128
|
+
children,
|
1129
|
+
disclosure: externalDisclosure,
|
1130
|
+
isCreate = true
|
1131
|
+
}) {
|
1132
|
+
const defaultDisclosure = useDisclosure8();
|
1133
|
+
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1134
|
+
const queryClient = useQueryClient5();
|
1135
|
+
const mutation = useMyReactMutation({
|
1136
|
+
axiosFn: (values) => onSubmit(values),
|
1137
|
+
options: __spreadValues(__spreadValues({
|
1138
|
+
onSuccess: () => {
|
1139
|
+
queryClient.invalidateQueries();
|
1140
|
+
utils_notification_show({ crudType: "create" });
|
1141
|
+
disclosure[1].close();
|
1142
|
+
if (closeModalWhenSubmit) disclosure[1].close();
|
1143
|
+
if (resetFormWhenSubmit) form.reset();
|
1144
|
+
}
|
1145
|
+
}, onSuccess && {
|
1146
|
+
onSuccess: () => {
|
1147
|
+
onSuccess();
|
1148
|
+
}
|
1149
|
+
}), onError && {
|
1150
|
+
onError: () => {
|
1151
|
+
onError();
|
1152
|
+
}
|
1153
|
+
})
|
1154
|
+
});
|
1155
|
+
return /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
1156
|
+
isCreate ? /* @__PURE__ */ jsx22(Button5, __spreadValues({ onClick: disclosure[1].open, children: "Th\xEAm", leftSection: /* @__PURE__ */ jsx22(IconPlus5, {}) }, buttonProps)) : /* @__PURE__ */ jsx22(ActionIcon9, __spreadValues({ color: "yellow", onClick: disclosure[1].open, children: /* @__PURE__ */ jsx22(IconEdit5, {}) }, actionIconProps)),
|
1157
|
+
/* @__PURE__ */ jsx22(
|
1158
|
+
Modal6,
|
1159
|
+
__spreadProps(__spreadValues({
|
1160
|
+
title: isCreate ? "Th\xEAm d\u1EEF li\u1EC7u" : "S\u1EEDa d\u1EEF li\u1EC7u",
|
1161
|
+
opened: disclosure[0],
|
1162
|
+
onClose: disclosure[1].close
|
1163
|
+
}, modalProps), {
|
1164
|
+
children: /* @__PURE__ */ jsx22("form", { onSubmit: form.onSubmit((values) => {
|
1165
|
+
mutation.mutate(values);
|
1166
|
+
}), children: /* @__PURE__ */ jsxs12(MyFlexColumn, { children: [
|
1167
|
+
children,
|
1168
|
+
/* @__PURE__ */ jsx22(Button5, { children: "L\u01B0u" })
|
1169
|
+
] }) })
|
1170
|
+
})
|
1171
|
+
)
|
1172
|
+
] });
|
1173
|
+
}
|
1174
|
+
|
1064
1175
|
// src/components/Buttons/ButtonCRUD/MyButtonDeleteList.tsx
|
1065
1176
|
import { Group as Group5, Highlight as Highlight2 } from "@mantine/core";
|
1066
|
-
import { useDisclosure as
|
1067
|
-
import { useMutation as useMutation2, useQueryClient as
|
1177
|
+
import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
|
1178
|
+
import { useMutation as useMutation2, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
1068
1179
|
import { useState as useState7 } from "react";
|
1069
|
-
import { jsx as
|
1180
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
1070
1181
|
function MyButtonDeleteList(_a) {
|
1071
1182
|
var _b = _a, {
|
1072
1183
|
onSubmit,
|
@@ -1079,8 +1190,8 @@ function MyButtonDeleteList(_a) {
|
|
1079
1190
|
"onError",
|
1080
1191
|
"contextData"
|
1081
1192
|
]);
|
1082
|
-
const queryClient =
|
1083
|
-
const disc =
|
1193
|
+
const queryClient = useQueryClient6();
|
1194
|
+
const disc = useDisclosure9();
|
1084
1195
|
const loadingState = useState7();
|
1085
1196
|
const mutation = useMutation2({
|
1086
1197
|
mutationFn: async () => await onSubmit(),
|
@@ -1105,7 +1216,7 @@ function MyButtonDeleteList(_a) {
|
|
1105
1216
|
loadingState[1](true);
|
1106
1217
|
mutation.mutate();
|
1107
1218
|
}
|
1108
|
-
return /* @__PURE__ */
|
1219
|
+
return /* @__PURE__ */ jsxs13(
|
1109
1220
|
MyButtonModal,
|
1110
1221
|
__spreadProps(__spreadValues({
|
1111
1222
|
disclosure: disc,
|
@@ -1113,7 +1224,7 @@ function MyButtonDeleteList(_a) {
|
|
1113
1224
|
disabled: contextData == void 0 || contextData.length == 0
|
1114
1225
|
}, rest), {
|
1115
1226
|
children: [
|
1116
|
-
/* @__PURE__ */
|
1227
|
+
/* @__PURE__ */ jsx23(
|
1117
1228
|
Highlight2,
|
1118
1229
|
{
|
1119
1230
|
highlight: contextData || [],
|
@@ -1126,8 +1237,8 @@ function MyButtonDeleteList(_a) {
|
|
1126
1237
|
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?`
|
1127
1238
|
}
|
1128
1239
|
),
|
1129
|
-
/* @__PURE__ */
|
1130
|
-
/* @__PURE__ */
|
1240
|
+
/* @__PURE__ */ jsxs13(Group5, { grow: true, children: [
|
1241
|
+
/* @__PURE__ */ jsx23(
|
1131
1242
|
MyButton,
|
1132
1243
|
{
|
1133
1244
|
crudType: "delete",
|
@@ -1135,7 +1246,7 @@ function MyButtonDeleteList(_a) {
|
|
1135
1246
|
loading: loadingState[0]
|
1136
1247
|
}
|
1137
1248
|
),
|
1138
|
-
/* @__PURE__ */
|
1249
|
+
/* @__PURE__ */ jsx23(
|
1139
1250
|
MyButton,
|
1140
1251
|
{
|
1141
1252
|
crudType: "cancel",
|
@@ -1149,27 +1260,27 @@ function MyButtonDeleteList(_a) {
|
|
1149
1260
|
}
|
1150
1261
|
|
1151
1262
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1152
|
-
import { Button as
|
1263
|
+
import { Button as Button9, Modal as Modal9, useModalsStack as useModalsStack3 } from "@mantine/core";
|
1153
1264
|
import { IconFileImport as IconFileImport2 } from "@tabler/icons-react";
|
1154
1265
|
|
1155
1266
|
// src/components/Combobox/Select/MySelect.tsx
|
1156
1267
|
import { Select } from "@mantine/core";
|
1157
|
-
import { jsx as
|
1268
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
1158
1269
|
function MySelect(_a) {
|
1159
1270
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
1160
|
-
return /* @__PURE__ */
|
1271
|
+
return /* @__PURE__ */ jsx24(Select, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
1161
1272
|
}
|
1162
1273
|
|
1163
1274
|
// src/components/Layouts/FlexEnd/MyFlexEnd.tsx
|
1164
1275
|
import { Group as Group6 } from "@mantine/core";
|
1165
|
-
import { jsx as
|
1276
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
1166
1277
|
function MyFlexEnd(_a) {
|
1167
1278
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1168
|
-
return /* @__PURE__ */
|
1279
|
+
return /* @__PURE__ */ jsx25(Group6, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1169
1280
|
}
|
1170
1281
|
|
1171
1282
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1172
|
-
import { Button as
|
1283
|
+
import { Button as Button6, Divider, Fieldset, Group as Group7, Modal as Modal7, SimpleGrid, Space as Space2, Table } from "@mantine/core";
|
1173
1284
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
1174
1285
|
|
1175
1286
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
@@ -1323,99 +1434,99 @@ function useS_ButtonImport() {
|
|
1323
1434
|
}
|
1324
1435
|
|
1325
1436
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1326
|
-
import { jsx as
|
1437
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
1327
1438
|
function SelectFieldModal({ stack, onImport }) {
|
1328
1439
|
var _a, _b;
|
1329
1440
|
const store = useS_ButtonImport();
|
1330
|
-
return /* @__PURE__ */
|
1331
|
-
/* @__PURE__ */
|
1332
|
-
/* @__PURE__ */
|
1333
|
-
/* @__PURE__ */
|
1334
|
-
/* @__PURE__ */
|
1335
|
-
/* @__PURE__ */
|
1336
|
-
/* @__PURE__ */
|
1441
|
+
return /* @__PURE__ */ jsxs14(Modal7, __spreadProps(__spreadValues({ fullScreen: true }, stack.register("select-field-page")), { title: "Import", children: [
|
1442
|
+
/* @__PURE__ */ jsxs14(SimpleGrid, { cols: { base: 1, lg: 2 }, children: [
|
1443
|
+
/* @__PURE__ */ jsxs14(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin", children: [
|
1444
|
+
/* @__PURE__ */ jsxs14(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1445
|
+
/* @__PURE__ */ jsx26(Table.Thead, { bg: "cyan", children: /* @__PURE__ */ jsxs14(Table.Tr, { children: [
|
1446
|
+
/* @__PURE__ */ jsx26(Table.Th, { children: "M\xE3 field" }),
|
1447
|
+
/* @__PURE__ */ jsx26(Table.Th, { children: "T\xEAn field" })
|
1337
1448
|
] }) }),
|
1338
|
-
/* @__PURE__ */
|
1449
|
+
/* @__PURE__ */ jsx26(Table.Tbody, { children: (_a = store.state.fieldConfig) == null ? void 0 : _a.filter((item) => item.isSelected == false || item.isSelected == void 0).map((item, idx) => /* @__PURE__ */ jsxs14(
|
1339
1450
|
Table.Tr,
|
1340
1451
|
{
|
1341
1452
|
style: { cursor: "pointer" },
|
1342
1453
|
children: [
|
1343
|
-
/* @__PURE__ */
|
1344
|
-
/* @__PURE__ */
|
1454
|
+
/* @__PURE__ */ jsx26(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldKey.toString() }),
|
1455
|
+
/* @__PURE__ */ jsx26(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldName })
|
1345
1456
|
]
|
1346
1457
|
},
|
1347
1458
|
idx
|
1348
1459
|
)) })
|
1349
1460
|
] }),
|
1350
|
-
/* @__PURE__ */
|
1351
|
-
/* @__PURE__ */
|
1352
|
-
|
1461
|
+
/* @__PURE__ */ jsx26(Space2, {}),
|
1462
|
+
/* @__PURE__ */ jsx26(Group7, { children: /* @__PURE__ */ jsx26(
|
1463
|
+
Button6,
|
1353
1464
|
{
|
1354
1465
|
onClick: () => {
|
1355
1466
|
store.changeAllSelected(true);
|
1356
1467
|
},
|
1357
|
-
leftSection: /* @__PURE__ */
|
1468
|
+
leftSection: /* @__PURE__ */ jsx26(IconArrowBigRight, {}),
|
1358
1469
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3"
|
1359
1470
|
}
|
1360
1471
|
) })
|
1361
1472
|
] }),
|
1362
|
-
/* @__PURE__ */
|
1363
|
-
/* @__PURE__ */
|
1364
|
-
/* @__PURE__ */
|
1365
|
-
/* @__PURE__ */
|
1366
|
-
/* @__PURE__ */
|
1367
|
-
/* @__PURE__ */
|
1473
|
+
/* @__PURE__ */ jsxs14(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin \u0111\u01B0\u1EE3c ch\u1ECDn", children: [
|
1474
|
+
/* @__PURE__ */ jsxs14(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1475
|
+
/* @__PURE__ */ jsx26(Table.Thead, { children: /* @__PURE__ */ jsxs14(Table.Tr, { children: [
|
1476
|
+
/* @__PURE__ */ jsx26(Table.Th, { children: "M\xE3 field" }),
|
1477
|
+
/* @__PURE__ */ jsx26(Table.Th, { children: "T\xEAn field" }),
|
1478
|
+
/* @__PURE__ */ jsx26(Table.Th, { children: "C\u1ED9t map" })
|
1368
1479
|
] }) }),
|
1369
|
-
/* @__PURE__ */
|
1480
|
+
/* @__PURE__ */ jsx26(Table.Tbody, { children: (_b = store.state.fieldConfig) == null ? void 0 : _b.filter((item) => item.isSelected == true).map((item, idx) => /* @__PURE__ */ jsxs14(
|
1370
1481
|
Table.Tr,
|
1371
1482
|
{
|
1372
1483
|
style: { cursor: "pointer" },
|
1373
1484
|
children: [
|
1374
|
-
/* @__PURE__ */
|
1375
|
-
/* @__PURE__ */
|
1376
|
-
/* @__PURE__ */
|
1485
|
+
/* @__PURE__ */ jsx26(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldKey.toString() }),
|
1486
|
+
/* @__PURE__ */ jsx26(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldName }),
|
1487
|
+
/* @__PURE__ */ jsx26(Table.Td, { children: /* @__PURE__ */ jsx26(MySelect, { data: store.state.title, value: item.fieldToMap, onChange: (e4) => store.setFieldToMap(item.fieldKey.toString(), e4) }) })
|
1377
1488
|
]
|
1378
1489
|
},
|
1379
1490
|
idx
|
1380
1491
|
)) })
|
1381
1492
|
] }),
|
1382
|
-
/* @__PURE__ */
|
1383
|
-
/* @__PURE__ */
|
1384
|
-
|
1493
|
+
/* @__PURE__ */ jsx26(Space2, {}),
|
1494
|
+
/* @__PURE__ */ jsx26(
|
1495
|
+
Button6,
|
1385
1496
|
{
|
1386
1497
|
onClick: () => {
|
1387
1498
|
store.changeAllSelected(false);
|
1388
1499
|
},
|
1389
|
-
leftSection: /* @__PURE__ */
|
1500
|
+
leftSection: /* @__PURE__ */ jsx26(IconArrowBigLeft, {}),
|
1390
1501
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3 v\u1EC1"
|
1391
1502
|
}
|
1392
1503
|
)
|
1393
1504
|
] })
|
1394
1505
|
] }),
|
1395
|
-
/* @__PURE__ */
|
1396
|
-
/* @__PURE__ */
|
1397
|
-
/* @__PURE__ */
|
1398
|
-
|
1506
|
+
/* @__PURE__ */ jsx26(Divider, {}),
|
1507
|
+
/* @__PURE__ */ jsxs14(MyFlexEnd, { children: [
|
1508
|
+
/* @__PURE__ */ jsx26(
|
1509
|
+
Button6,
|
1399
1510
|
{
|
1400
|
-
leftSection: /* @__PURE__ */
|
1511
|
+
leftSection: /* @__PURE__ */ jsx26(IconArrowBackUp, {}),
|
1401
1512
|
onClick: () => stack.close("select-field-page"),
|
1402
1513
|
color: "gray.7",
|
1403
1514
|
children: "Quay l\u1EA1i"
|
1404
1515
|
}
|
1405
1516
|
),
|
1406
|
-
/* @__PURE__ */
|
1407
|
-
|
1517
|
+
/* @__PURE__ */ jsx26(
|
1518
|
+
Button6,
|
1408
1519
|
{
|
1409
1520
|
color: "blue.8",
|
1410
|
-
leftSection: /* @__PURE__ */
|
1521
|
+
leftSection: /* @__PURE__ */ jsx26(IconArrowBigRight, {}),
|
1411
1522
|
onClick: onImport,
|
1412
1523
|
children: "Ti\u1EBFp t\u1EE5c / Import"
|
1413
1524
|
}
|
1414
1525
|
),
|
1415
|
-
/* @__PURE__ */
|
1416
|
-
|
1526
|
+
/* @__PURE__ */ jsx26(
|
1527
|
+
Button6,
|
1417
1528
|
{
|
1418
|
-
leftSection: /* @__PURE__ */
|
1529
|
+
leftSection: /* @__PURE__ */ jsx26(IconSquareRoundedX, {}),
|
1419
1530
|
onClick: () => stack.closeAll(),
|
1420
1531
|
color: "red.6",
|
1421
1532
|
children: "\u0110\xF3ng"
|
@@ -1426,7 +1537,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1426
1537
|
}
|
1427
1538
|
|
1428
1539
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1429
|
-
import { Alert, Button as
|
1540
|
+
import { Alert, Button as Button7, Group as Group8, Portal } from "@mantine/core";
|
1430
1541
|
import { IconBug, IconDownload as IconDownload3, IconInfoCircle } from "@tabler/icons-react";
|
1431
1542
|
import { download, generateCsv, mkConfig } from "export-to-csv";
|
1432
1543
|
import {
|
@@ -1435,7 +1546,7 @@ import {
|
|
1435
1546
|
} from "mantine-react-table";
|
1436
1547
|
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
1437
1548
|
import { useEffect as useEffect5 } from "react";
|
1438
|
-
import { Fragment as
|
1549
|
+
import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
1439
1550
|
function formatData(data, formats) {
|
1440
1551
|
return data.map((row) => {
|
1441
1552
|
const transformedRow = {};
|
@@ -1498,14 +1609,14 @@ function MyDataTable(_a) {
|
|
1498
1609
|
columns,
|
1499
1610
|
data,
|
1500
1611
|
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1501
|
-
return /* @__PURE__ */
|
1612
|
+
return /* @__PURE__ */ jsxs15(Group8, { children: [
|
1502
1613
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
1503
|
-
exportAble && /* @__PURE__ */
|
1504
|
-
|
1614
|
+
exportAble && /* @__PURE__ */ jsx27(Fragment8, { children: /* @__PURE__ */ jsx27(
|
1615
|
+
Button7,
|
1505
1616
|
{
|
1506
1617
|
color: "green.8",
|
1507
1618
|
onClick: () => handleExport(table2.getSelectedRowModel().rows),
|
1508
|
-
leftSection: /* @__PURE__ */
|
1619
|
+
leftSection: /* @__PURE__ */ jsx27(IconDownload3, {}),
|
1509
1620
|
variant: "filled",
|
1510
1621
|
children: "Export"
|
1511
1622
|
}
|
@@ -1552,7 +1663,7 @@ function MyDataTable(_a) {
|
|
1552
1663
|
}
|
1553
1664
|
},
|
1554
1665
|
localization: MRT_Localization_VI,
|
1555
|
-
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */
|
1666
|
+
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */ jsx27(Alert, { icon: /* @__PURE__ */ jsx27(IconBug, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" }) : /* @__PURE__ */ jsx27(Alert, { icon: /* @__PURE__ */ jsx27(IconInfoCircle, {}), color: "gray", title: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u!", m: "md" }),
|
1556
1667
|
state: {
|
1557
1668
|
showSkeletons: isLoading
|
1558
1669
|
},
|
@@ -1563,24 +1674,24 @@ function MyDataTable(_a) {
|
|
1563
1674
|
setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
|
1564
1675
|
}, [table.getState().rowSelection]);
|
1565
1676
|
if (data == void 0) return;
|
1566
|
-
return /* @__PURE__ */
|
1677
|
+
return /* @__PURE__ */ jsx27("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx27(Portal, { children: /* @__PURE__ */ jsx27(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx27(MantineReactTable, { table }) });
|
1567
1678
|
}
|
1568
1679
|
|
1569
1680
|
// src/components/Buttons/ButtonImport/SelectFileModal.tsx
|
1570
|
-
import { Button as
|
1681
|
+
import { Button as Button8, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal8, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
|
1571
1682
|
import { IconArrowBigRight as IconArrowBigRight2, IconSquareRoundedX as IconSquareRoundedX2 } from "@tabler/icons-react";
|
1572
|
-
import { jsx as
|
1683
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
1573
1684
|
function SelectFileModal({ onExportStructure, stack }) {
|
1574
1685
|
var _a;
|
1575
1686
|
const store = useS_ButtonImport();
|
1576
|
-
return /* @__PURE__ */
|
1577
|
-
|
1687
|
+
return /* @__PURE__ */ jsxs16(
|
1688
|
+
Modal8,
|
1578
1689
|
__spreadProps(__spreadValues({
|
1579
1690
|
title: "Import",
|
1580
1691
|
fullScreen: true
|
1581
1692
|
}, stack.register("select-file-page")), {
|
1582
1693
|
children: [
|
1583
|
-
/* @__PURE__ */
|
1694
|
+
/* @__PURE__ */ jsx28(
|
1584
1695
|
FileInput2,
|
1585
1696
|
{
|
1586
1697
|
value: store.state.file,
|
@@ -1590,8 +1701,8 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1590
1701
|
clearable: true
|
1591
1702
|
}
|
1592
1703
|
),
|
1593
|
-
/* @__PURE__ */
|
1594
|
-
/* @__PURE__ */
|
1704
|
+
/* @__PURE__ */ jsxs16(SimpleGrid2, { cols: { base: 1, md: 2, lg: 2, xl: 4 }, children: [
|
1705
|
+
/* @__PURE__ */ jsx28(
|
1595
1706
|
NumberInput,
|
1596
1707
|
{
|
1597
1708
|
label: "D\xF2ng ti\xEAu \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1599,7 +1710,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1599
1710
|
onChange: (e4) => store.setProperty("startTitleIndex", e4)
|
1600
1711
|
}
|
1601
1712
|
),
|
1602
|
-
/* @__PURE__ */
|
1713
|
+
/* @__PURE__ */ jsx28(
|
1603
1714
|
NumberInput,
|
1604
1715
|
{
|
1605
1716
|
label: "D\xF2ng d\u1EEF li\u1EC7u b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1607,7 +1718,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1607
1718
|
onChange: (e4) => store.setProperty("startDataIndex", e4)
|
1608
1719
|
}
|
1609
1720
|
),
|
1610
|
-
/* @__PURE__ */
|
1721
|
+
/* @__PURE__ */ jsx28(
|
1611
1722
|
Select2,
|
1612
1723
|
{
|
1613
1724
|
readOnly: true,
|
@@ -1616,7 +1727,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1616
1727
|
defaultValue: "100.000"
|
1617
1728
|
}
|
1618
1729
|
),
|
1619
|
-
/* @__PURE__ */
|
1730
|
+
/* @__PURE__ */ jsx28(
|
1620
1731
|
Select2,
|
1621
1732
|
{
|
1622
1733
|
readOnly: true,
|
@@ -1626,37 +1737,37 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1626
1737
|
}
|
1627
1738
|
)
|
1628
1739
|
] }),
|
1629
|
-
/* @__PURE__ */
|
1740
|
+
/* @__PURE__ */ jsx28(Fieldset2, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin trong file d\u1EEF li\u1EC7u", children: store.state.data && /* @__PURE__ */ jsx28(
|
1630
1741
|
MyDataTable,
|
1631
1742
|
{
|
1632
1743
|
columns: store.columns,
|
1633
1744
|
data: store.state.data
|
1634
1745
|
}
|
1635
1746
|
) }),
|
1636
|
-
/* @__PURE__ */
|
1637
|
-
/* @__PURE__ */
|
1638
|
-
|
1747
|
+
/* @__PURE__ */ jsxs16(MyFlexEnd, { children: [
|
1748
|
+
/* @__PURE__ */ jsx28(
|
1749
|
+
Button8,
|
1639
1750
|
{
|
1640
1751
|
color: "teal.8",
|
1641
1752
|
onClick: onExportStructure,
|
1642
1753
|
children: "Xu\u1EA5t file c\u1EA5u tr\xFAc"
|
1643
1754
|
}
|
1644
1755
|
),
|
1645
|
-
/* @__PURE__ */
|
1646
|
-
|
1756
|
+
/* @__PURE__ */ jsx28(
|
1757
|
+
Button8,
|
1647
1758
|
{
|
1648
1759
|
disabled: ((_a = store.state.data) == null ? void 0 : _a.length) == 0,
|
1649
1760
|
color: "blue.8",
|
1650
|
-
leftSection: /* @__PURE__ */
|
1761
|
+
leftSection: /* @__PURE__ */ jsx28(IconArrowBigRight2, {}),
|
1651
1762
|
onClick: () => stack.open("select-field-page"),
|
1652
1763
|
children: "Ti\u1EBFp t\u1EE5c"
|
1653
1764
|
}
|
1654
1765
|
),
|
1655
|
-
/* @__PURE__ */
|
1656
|
-
|
1766
|
+
/* @__PURE__ */ jsx28(
|
1767
|
+
Button8,
|
1657
1768
|
{
|
1658
1769
|
color: "red.6",
|
1659
|
-
leftSection: /* @__PURE__ */
|
1770
|
+
leftSection: /* @__PURE__ */ jsx28(IconSquareRoundedX2, {}),
|
1660
1771
|
onClick: stack.closeAll,
|
1661
1772
|
children: "\u0110\xF3ng"
|
1662
1773
|
}
|
@@ -1668,26 +1779,26 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1668
1779
|
}
|
1669
1780
|
|
1670
1781
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1671
|
-
import { Fragment as
|
1782
|
+
import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
1672
1783
|
function MyButtonImport({
|
1673
1784
|
onExportStructure,
|
1674
1785
|
onImport
|
1675
1786
|
}) {
|
1676
1787
|
const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
|
1677
1788
|
const store = useS_ButtonImport();
|
1678
|
-
return /* @__PURE__ */
|
1679
|
-
/* @__PURE__ */
|
1680
|
-
/* @__PURE__ */
|
1681
|
-
/* @__PURE__ */
|
1682
|
-
/* @__PURE__ */
|
1789
|
+
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
1790
|
+
/* @__PURE__ */ jsx29(Button9, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx29(IconFileImport2, {}), title: "Import", children: "Import" }),
|
1791
|
+
/* @__PURE__ */ jsxs17(Modal9.Stack, { children: [
|
1792
|
+
/* @__PURE__ */ jsx29(SelectFileModal, { stack, onExportStructure }),
|
1793
|
+
/* @__PURE__ */ jsx29(SelectFieldModal, { stack, onImport: () => onImport(store.getDataFinal()) })
|
1683
1794
|
] })
|
1684
1795
|
] });
|
1685
1796
|
}
|
1686
1797
|
|
1687
1798
|
// src/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx
|
1688
|
-
import { Button as
|
1689
|
-
import { useDisclosure as
|
1690
|
-
import { Fragment as
|
1799
|
+
import { Button as Button10, Fieldset as Fieldset3, Modal as Modal10 } from "@mantine/core";
|
1800
|
+
import { useDisclosure as useDisclosure10 } from "@mantine/hooks";
|
1801
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
1691
1802
|
function AQSelectTableByOpenModal(_a) {
|
1692
1803
|
var _b = _a, {
|
1693
1804
|
setSelectedData,
|
@@ -1714,29 +1825,29 @@ function AQSelectTableByOpenModal(_a) {
|
|
1714
1825
|
"fullScreen",
|
1715
1826
|
"closeAfterSelect"
|
1716
1827
|
]);
|
1717
|
-
const disclosure =
|
1718
|
-
return /* @__PURE__ */
|
1719
|
-
/* @__PURE__ */
|
1720
|
-
|
1828
|
+
const disclosure = useDisclosure10(false);
|
1829
|
+
return /* @__PURE__ */ jsxs18(Fragment10, { children: [
|
1830
|
+
/* @__PURE__ */ jsx30(
|
1831
|
+
Button10,
|
1721
1832
|
__spreadProps(__spreadValues({
|
1722
1833
|
onClick: disclosure[1].open
|
1723
1834
|
}, rest), {
|
1724
1835
|
children: label ? label : `Ch\u1ECDn t\u1EEB danh s\xE1ch`
|
1725
1836
|
})
|
1726
1837
|
),
|
1727
|
-
/* @__PURE__ */
|
1728
|
-
|
1838
|
+
/* @__PURE__ */ jsx30(
|
1839
|
+
Modal10,
|
1729
1840
|
{
|
1730
1841
|
fullScreen,
|
1731
1842
|
size: modalSize,
|
1732
1843
|
title,
|
1733
1844
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1734
1845
|
onClose: disclosure[1].close,
|
1735
|
-
children: /* @__PURE__ */
|
1846
|
+
children: /* @__PURE__ */ jsx30(MyFlexColumn, { children: /* @__PURE__ */ jsx30(Fieldset3, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: /* @__PURE__ */ jsx30(
|
1736
1847
|
MyDataTable,
|
1737
1848
|
__spreadValues({
|
1738
1849
|
renderTopToolbarCustomActions: ({ table }) => {
|
1739
|
-
return /* @__PURE__ */
|
1850
|
+
return /* @__PURE__ */ jsx30(Button10, { onClick: () => {
|
1740
1851
|
setSelectedData(table.getSelectedRowModel().rows.map((row) => row.original));
|
1741
1852
|
closeAfterSelect && disclosure[1].close();
|
1742
1853
|
}, children: "Ch\u1ECDn" });
|
@@ -1753,10 +1864,10 @@ function AQSelectTableByOpenModal(_a) {
|
|
1753
1864
|
|
1754
1865
|
// src/components/Buttons/ButtonPrintPDF/MyButtonPrintPDF.tsx
|
1755
1866
|
import { useRef as useRef2 } from "react";
|
1756
|
-
import { Button as
|
1867
|
+
import { Button as Button11 } from "@mantine/core";
|
1757
1868
|
import { IconPrinter as IconPrinter2 } from "@tabler/icons-react";
|
1758
1869
|
import { useReactToPrint } from "react-to-print";
|
1759
|
-
import { Fragment as
|
1870
|
+
import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
|
1760
1871
|
function MyButtonPrintPDF(_a) {
|
1761
1872
|
var _b = _a, { contentToPrint, children } = _b, rest = __objRest(_b, ["contentToPrint", "children"]);
|
1762
1873
|
const printRef = useRef2(null);
|
@@ -1770,16 +1881,16 @@ function MyButtonPrintPDF(_a) {
|
|
1770
1881
|
if (!contentToPrint) return;
|
1771
1882
|
handlePrint();
|
1772
1883
|
}
|
1773
|
-
return /* @__PURE__ */
|
1774
|
-
/* @__PURE__ */
|
1775
|
-
/* @__PURE__ */
|
1884
|
+
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
1885
|
+
/* @__PURE__ */ jsx31("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx31("div", { ref: printRef, children: contentToPrint }) }),
|
1886
|
+
/* @__PURE__ */ jsx31(Button11, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx31(IconPrinter2, {}) }, rest), { children }))
|
1776
1887
|
] });
|
1777
1888
|
}
|
1778
1889
|
|
1779
1890
|
// src/components/Layouts/HtmlWrapper/MyHtmlWrapper.tsx
|
1780
1891
|
import { ScrollArea, TypographyStylesProvider } from "@mantine/core";
|
1781
1892
|
import pako from "pako";
|
1782
|
-
import { jsx as
|
1893
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
1783
1894
|
function MyHtmlWrapper(_a) {
|
1784
1895
|
var _b = _a, { html, mah, zip = false } = _b, rest = __objRest(_b, ["html", "mah", "zip"]);
|
1785
1896
|
const extractHtmlFromZip = () => {
|
@@ -1788,7 +1899,7 @@ function MyHtmlWrapper(_a) {
|
|
1788
1899
|
const cleanedHtml = decompressedData == null ? void 0 : decompressedData.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
1789
1900
|
return cleanedHtml.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
1790
1901
|
};
|
1791
|
-
return /* @__PURE__ */
|
1902
|
+
return /* @__PURE__ */ jsx32(ScrollArea.Autosize, { mah, children: /* @__PURE__ */ jsx32(TypographyStylesProvider, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx32(
|
1792
1903
|
"div",
|
1793
1904
|
{
|
1794
1905
|
dangerouslySetInnerHTML: {
|
@@ -1800,7 +1911,7 @@ function MyHtmlWrapper(_a) {
|
|
1800
1911
|
|
1801
1912
|
// src/components/Buttons/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx
|
1802
1913
|
import { Box, Table as Table2 } from "@mantine/core";
|
1803
|
-
import { jsx as
|
1914
|
+
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
1804
1915
|
function MyButtonPrintTablePDF(_a) {
|
1805
1916
|
var _b = _a, {
|
1806
1917
|
printConfig,
|
@@ -1826,8 +1937,8 @@ function MyButtonPrintTablePDF(_a) {
|
|
1826
1937
|
};
|
1827
1938
|
const rows = data == null ? void 0 : data.map((item, index) => {
|
1828
1939
|
if (!(printConfig == null ? void 0 : printConfig.fields)) return null;
|
1829
|
-
return /* @__PURE__ */
|
1830
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
1940
|
+
return /* @__PURE__ */ jsxs20(Table2.Tr, { children: [
|
1941
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx33(Table2.Td, { ta: "center", px: "xs", style: { border: "1px solid lightgray" }, children: index + 1 }),
|
1831
1942
|
printConfig.fields.map((field) => {
|
1832
1943
|
let value = item[field.fieldName];
|
1833
1944
|
if (field.formatFunction) {
|
@@ -1837,30 +1948,30 @@ function MyButtonPrintTablePDF(_a) {
|
|
1837
1948
|
}
|
1838
1949
|
const alignment = field.isCenter === false ? "left" : "center";
|
1839
1950
|
if (typeof value === "string" && (value.includes("<") || value.includes("<"))) {
|
1840
|
-
return /* @__PURE__ */
|
1951
|
+
return /* @__PURE__ */ jsx33(
|
1841
1952
|
Table2.Td,
|
1842
1953
|
{
|
1843
1954
|
px: "xs",
|
1844
1955
|
ta: alignment,
|
1845
1956
|
style: { border: "1px solid lightgray" },
|
1846
|
-
children: /* @__PURE__ */
|
1957
|
+
children: /* @__PURE__ */ jsx33(MyHtmlWrapper, { html: value })
|
1847
1958
|
},
|
1848
1959
|
field.fieldName
|
1849
1960
|
);
|
1850
1961
|
}
|
1851
1962
|
if (value === "true" || value === "false") {
|
1852
|
-
return /* @__PURE__ */
|
1963
|
+
return /* @__PURE__ */ jsx33(
|
1853
1964
|
Table2.Td,
|
1854
1965
|
{
|
1855
1966
|
ta: alignment,
|
1856
1967
|
px: "xs",
|
1857
1968
|
style: { border: "1px solid lightgray" },
|
1858
|
-
children: /* @__PURE__ */
|
1969
|
+
children: /* @__PURE__ */ jsx33("input", { type: "checkbox", checked: value === "true", readOnly: true })
|
1859
1970
|
},
|
1860
1971
|
field.fieldName
|
1861
1972
|
);
|
1862
1973
|
}
|
1863
|
-
return /* @__PURE__ */
|
1974
|
+
return /* @__PURE__ */ jsx33(
|
1864
1975
|
Table2.Td,
|
1865
1976
|
{
|
1866
1977
|
ta: alignment,
|
@@ -1884,18 +1995,18 @@ function MyButtonPrintTablePDF(_a) {
|
|
1884
1995
|
minute: "2-digit"
|
1885
1996
|
});
|
1886
1997
|
const tableTitle = (printConfig == null ? void 0 : printConfig.title) || "B\u1EA3ng d\u1EEF li\u1EC7u";
|
1887
|
-
return /* @__PURE__ */
|
1888
|
-
/* @__PURE__ */
|
1998
|
+
return /* @__PURE__ */ jsxs20(Box, { p: "lg", children: [
|
1999
|
+
/* @__PURE__ */ jsxs20("div", { style: { textAlign: "center", marginTop: "10px", fontStyle: "italic", color: "#666" }, children: [
|
1889
2000
|
"Ng\xE0y in: ",
|
1890
2001
|
formattedDate
|
1891
2002
|
] }),
|
1892
|
-
/* @__PURE__ */
|
1893
|
-
/* @__PURE__ */
|
1894
|
-
/* @__PURE__ */
|
1895
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
2003
|
+
/* @__PURE__ */ jsx33("h2", { style: { textAlign: "center", fontSize: "24px", fontWeight: "bold", marginBottom: "20px" }, children: tableTitle }),
|
2004
|
+
/* @__PURE__ */ jsxs20(Table2, { withColumnBorders: true, highlightOnHover: true, style: { border: "1px solid lightgray" }, children: [
|
2005
|
+
/* @__PURE__ */ jsx33(Table2.Thead, { children: /* @__PURE__ */ jsxs20(Table2.Tr, { children: [
|
2006
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx33(Table2.Th, { style: { border: "1px solid lightgray" }, w: "10%", ta: "center", px: "xs", children: "STT" }),
|
1896
2007
|
printConfig.fields.map((field) => {
|
1897
2008
|
const alignment = field.isCenter === false ? "left" : "center";
|
1898
|
-
return /* @__PURE__ */
|
2009
|
+
return /* @__PURE__ */ jsx33(
|
1899
2010
|
Table2.Th,
|
1900
2011
|
{
|
1901
2012
|
style: { border: "1px solid lightgray" },
|
@@ -1907,11 +2018,11 @@ function MyButtonPrintTablePDF(_a) {
|
|
1907
2018
|
);
|
1908
2019
|
})
|
1909
2020
|
] }) }),
|
1910
|
-
/* @__PURE__ */
|
2021
|
+
/* @__PURE__ */ jsx33(Table2.Tbody, { children: rows })
|
1911
2022
|
] })
|
1912
2023
|
] });
|
1913
2024
|
};
|
1914
|
-
return /* @__PURE__ */
|
2025
|
+
return /* @__PURE__ */ jsx33(
|
1915
2026
|
MyButtonPrintPDF,
|
1916
2027
|
__spreadValues({
|
1917
2028
|
contentToPrint: renderContent()
|
@@ -1920,15 +2031,15 @@ function MyButtonPrintTablePDF(_a) {
|
|
1920
2031
|
}
|
1921
2032
|
|
1922
2033
|
// src/components/Buttons/ButtonRouterBack/MyButtonRouterBack.tsx
|
1923
|
-
import { ActionIcon as
|
2034
|
+
import { ActionIcon as ActionIcon10 } from "@mantine/core";
|
1924
2035
|
import { IconArrowBack } from "@tabler/icons-react";
|
1925
2036
|
import { useRouter as useRouter2 } from "next/navigation";
|
1926
|
-
import { jsx as
|
2037
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
1927
2038
|
function MyButtonRouterBack(_a) {
|
1928
2039
|
var _b = _a, { url, label } = _b, rest = __objRest(_b, ["url", "label"]);
|
1929
2040
|
const router = useRouter2();
|
1930
|
-
return /* @__PURE__ */
|
1931
|
-
|
2041
|
+
return /* @__PURE__ */ jsx34(
|
2042
|
+
ActionIcon10,
|
1932
2043
|
__spreadProps(__spreadValues({
|
1933
2044
|
size: "xl",
|
1934
2045
|
variant: "light",
|
@@ -1940,27 +2051,27 @@ function MyButtonRouterBack(_a) {
|
|
1940
2051
|
router.back();
|
1941
2052
|
}
|
1942
2053
|
}, rest), {
|
1943
|
-
children: /* @__PURE__ */
|
2054
|
+
children: /* @__PURE__ */ jsx34(IconArrowBack, { stroke: 2 })
|
1944
2055
|
})
|
1945
2056
|
);
|
1946
2057
|
}
|
1947
2058
|
|
1948
2059
|
// src/components/Buttons/ButtonViewPDF/MyButtonViewPDF.tsx
|
1949
2060
|
import {
|
1950
|
-
ActionIcon as
|
1951
|
-
Button as
|
2061
|
+
ActionIcon as ActionIcon11,
|
2062
|
+
Button as Button12,
|
1952
2063
|
Group as Group9,
|
1953
2064
|
LoadingOverlay,
|
1954
|
-
Modal as
|
2065
|
+
Modal as Modal11,
|
1955
2066
|
Paper as Paper3,
|
1956
2067
|
Text as Text6,
|
1957
2068
|
Tooltip as Tooltip4
|
1958
2069
|
} from "@mantine/core";
|
1959
|
-
import { useDisclosure as
|
2070
|
+
import { useDisclosure as useDisclosure11 } from "@mantine/hooks";
|
1960
2071
|
import { IconLivePhoto as IconLivePhoto2, IconMaximize as IconMaximize3, IconMinimize as IconMinimize3 } from "@tabler/icons-react";
|
1961
2072
|
import { useQuery } from "@tanstack/react-query";
|
1962
2073
|
import { useState as useState8 } from "react";
|
1963
|
-
import { Fragment as
|
2074
|
+
import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
1964
2075
|
function MyButtonViewPDF({
|
1965
2076
|
id,
|
1966
2077
|
modalSize = "80%",
|
@@ -1970,7 +2081,7 @@ function MyButtonViewPDF({
|
|
1970
2081
|
filePath
|
1971
2082
|
}) {
|
1972
2083
|
var _a, _b, _c;
|
1973
|
-
const disc =
|
2084
|
+
const disc = useDisclosure11(false);
|
1974
2085
|
const fullScreen = useState8(false);
|
1975
2086
|
const hSize = useState8("80vh");
|
1976
2087
|
const query = useQuery({
|
@@ -1985,57 +2096,57 @@ function MyButtonViewPDF({
|
|
1985
2096
|
},
|
1986
2097
|
enabled: disc[0] == true
|
1987
2098
|
});
|
1988
|
-
return /* @__PURE__ */
|
1989
|
-
/* @__PURE__ */
|
1990
|
-
|
2099
|
+
return /* @__PURE__ */ jsxs21(Fragment12, { children: [
|
2100
|
+
/* @__PURE__ */ jsx35(Tooltip4, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx35(
|
2101
|
+
ActionIcon11,
|
1991
2102
|
{
|
1992
2103
|
onClick: () => {
|
1993
2104
|
disc[1].open();
|
1994
2105
|
},
|
1995
|
-
children: /* @__PURE__ */
|
2106
|
+
children: /* @__PURE__ */ jsx35(IconLivePhoto2, {})
|
1996
2107
|
}
|
1997
|
-
) : /* @__PURE__ */
|
1998
|
-
|
2108
|
+
) : /* @__PURE__ */ jsx35(
|
2109
|
+
Button12,
|
1999
2110
|
{
|
2000
2111
|
color: "cyan",
|
2001
2112
|
onClick: () => {
|
2002
2113
|
disc[1].open();
|
2003
2114
|
},
|
2004
|
-
leftSection: /* @__PURE__ */
|
2115
|
+
leftSection: /* @__PURE__ */ jsx35(IconLivePhoto2, {}),
|
2005
2116
|
children: label
|
2006
2117
|
}
|
2007
2118
|
) }),
|
2008
|
-
/* @__PURE__ */
|
2009
|
-
|
2119
|
+
/* @__PURE__ */ jsx35(
|
2120
|
+
Modal11,
|
2010
2121
|
{
|
2011
2122
|
fullScreen: fullScreen[0],
|
2012
2123
|
opened: disc[0],
|
2013
2124
|
onClose: disc[1].close,
|
2014
2125
|
size: modalSize,
|
2015
|
-
title: /* @__PURE__ */
|
2016
|
-
/* @__PURE__ */
|
2017
|
-
fullScreen[0] ? /* @__PURE__ */
|
2018
|
-
|
2126
|
+
title: /* @__PURE__ */ jsxs21(Group9, { children: [
|
2127
|
+
/* @__PURE__ */ jsx35(Text6, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
2128
|
+
fullScreen[0] ? /* @__PURE__ */ jsx35(
|
2129
|
+
ActionIcon11,
|
2019
2130
|
{
|
2020
2131
|
onClick: () => {
|
2021
2132
|
fullScreen[1](false);
|
2022
2133
|
hSize[1]("80vh");
|
2023
2134
|
},
|
2024
|
-
children: /* @__PURE__ */
|
2135
|
+
children: /* @__PURE__ */ jsx35(IconMinimize3, {})
|
2025
2136
|
}
|
2026
|
-
) : /* @__PURE__ */
|
2027
|
-
|
2137
|
+
) : /* @__PURE__ */ jsx35(
|
2138
|
+
ActionIcon11,
|
2028
2139
|
{
|
2029
2140
|
onClick: () => {
|
2030
2141
|
fullScreen[1](true);
|
2031
2142
|
hSize[1]("90vh");
|
2032
2143
|
},
|
2033
|
-
children: /* @__PURE__ */
|
2144
|
+
children: /* @__PURE__ */ jsx35(IconMaximize3, {})
|
2034
2145
|
}
|
2035
2146
|
)
|
2036
2147
|
] }),
|
2037
|
-
children: /* @__PURE__ */
|
2038
|
-
/* @__PURE__ */
|
2148
|
+
children: /* @__PURE__ */ jsxs21(Paper3, { h: hSize[0], p: "lg", pos: "relative", children: [
|
2149
|
+
/* @__PURE__ */ jsx35(
|
2039
2150
|
LoadingOverlay,
|
2040
2151
|
{
|
2041
2152
|
visible: query.isLoading,
|
@@ -2043,14 +2154,14 @@ function MyButtonViewPDF({
|
|
2043
2154
|
overlayProps: { radius: "sm", blur: 2 }
|
2044
2155
|
}
|
2045
2156
|
),
|
2046
|
-
query.data ? /* @__PURE__ */
|
2157
|
+
query.data ? /* @__PURE__ */ jsx35(
|
2047
2158
|
"iframe",
|
2048
2159
|
{
|
2049
2160
|
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}`,
|
2050
2161
|
width: "100%",
|
2051
2162
|
height: "100%"
|
2052
2163
|
}
|
2053
|
-
) : /* @__PURE__ */
|
2164
|
+
) : /* @__PURE__ */ jsx35("iframe", { src, width: "100%", height: "100%" })
|
2054
2165
|
] })
|
2055
2166
|
}
|
2056
2167
|
)
|
@@ -6353,7 +6464,7 @@ import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
|
6353
6464
|
import { Paper as Paper4, Text as Text7 } from "@mantine/core";
|
6354
6465
|
import "@schedule-x/theme-default/dist/index.css";
|
6355
6466
|
import { useEffect as useEffect6 } from "react";
|
6356
|
-
import { jsx as
|
6467
|
+
import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
6357
6468
|
function MyCalendar() {
|
6358
6469
|
const plugins = [createEventsServicePlugin(), createEventModalPlugin()];
|
6359
6470
|
const calendar = useNextCalendarApp({
|
@@ -6427,16 +6538,16 @@ function MyCalendar() {
|
|
6427
6538
|
useEffect6(() => {
|
6428
6539
|
calendar == null ? void 0 : calendar.events.getAll();
|
6429
6540
|
}, []);
|
6430
|
-
return /* @__PURE__ */
|
6541
|
+
return /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ScheduleXCalendar, { calendarApp: calendar, customComponents: {
|
6431
6542
|
timeGridEvent: ({ calendarEvent }) => {
|
6432
6543
|
console.log(calendarEvent);
|
6433
|
-
return /* @__PURE__ */
|
6434
|
-
/* @__PURE__ */
|
6544
|
+
return /* @__PURE__ */ jsx36(Paper4, { h: "100%", bg: calendarEvent.laLichThi ? "violet.2" : "blue.2", p: 4, children: /* @__PURE__ */ jsxs22(MyFlexColumn, { gap: 1, children: [
|
6545
|
+
/* @__PURE__ */ jsxs22(Text7, { size: "sm", fw: "bold", children: [
|
6435
6546
|
calendarEvent.laLichThi ? "(Thi) " : "(H\u1ECDc) ",
|
6436
6547
|
calendarEvent.title
|
6437
6548
|
] }),
|
6438
|
-
calendarEvent.laLichThi == false && /* @__PURE__ */
|
6439
|
-
/* @__PURE__ */
|
6549
|
+
calendarEvent.laLichThi == false && /* @__PURE__ */ jsx36(Text7, { size: "sm", children: calendarEvent.giangvien }),
|
6550
|
+
/* @__PURE__ */ jsx36(Text7, { size: "sm", children: calendarEvent.location })
|
6440
6551
|
] }) });
|
6441
6552
|
}
|
6442
6553
|
// eventModal: ({ calendarEvent }) => {
|
@@ -6451,31 +6562,31 @@ function MyCalendar() {
|
|
6451
6562
|
|
6452
6563
|
// src/components/CenterFull/MyCenterFull.tsx
|
6453
6564
|
import { Center as Center2, Group as Group10 } from "@mantine/core";
|
6454
|
-
import { jsx as
|
6565
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
6455
6566
|
function MyCenterFull({ children }) {
|
6456
|
-
return /* @__PURE__ */
|
6567
|
+
return /* @__PURE__ */ jsx37(Center2, { w: "100%", children: /* @__PURE__ */ jsx37(Group10, { children }) });
|
6457
6568
|
}
|
6458
6569
|
|
6459
6570
|
// src/components/Checkbox/MyCheckbox.tsx
|
6460
6571
|
import { Checkbox as Checkbox2 } from "@mantine/core";
|
6461
|
-
import { jsx as
|
6572
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
6462
6573
|
function MyCheckbox(_a) {
|
6463
6574
|
var rest = __objRest(_a, []);
|
6464
|
-
return /* @__PURE__ */
|
6575
|
+
return /* @__PURE__ */ jsx38(Checkbox2, __spreadValues({}, rest));
|
6465
6576
|
}
|
6466
6577
|
|
6467
6578
|
// src/components/Layouts/FlexRow/MyFlexRow.tsx
|
6468
6579
|
import { Flex as Flex2 } from "@mantine/core";
|
6469
|
-
import { jsx as
|
6580
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
6470
6581
|
function MyFlexRow(_a) {
|
6471
6582
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6472
|
-
return /* @__PURE__ */
|
6583
|
+
return /* @__PURE__ */ jsx39(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
|
6473
6584
|
}
|
6474
6585
|
|
6475
6586
|
// src/components/DataDisplay/Card/AQCard.tsx
|
6476
6587
|
import { Badge as Badge2, Card, Center as Center3, Image, Text as Text8 } from "@mantine/core";
|
6477
6588
|
import Link from "next/link";
|
6478
|
-
import { jsx as
|
6589
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
6479
6590
|
function AQCard({
|
6480
6591
|
imgSrc = "https://raw.githubusercontent.com/mantinedev/mantine/master/.demo/images/bg-8.png",
|
6481
6592
|
title,
|
@@ -6485,8 +6596,8 @@ function AQCard({
|
|
6485
6596
|
status,
|
6486
6597
|
href = ""
|
6487
6598
|
}) {
|
6488
|
-
return /* @__PURE__ */
|
6489
|
-
/* @__PURE__ */
|
6599
|
+
return /* @__PURE__ */ jsxs23(Card, { shadow: "sm", padding: "lg", radius: "md", withBorder: true, component: Link, href, children: [
|
6600
|
+
/* @__PURE__ */ jsx40(Card.Section, { children: /* @__PURE__ */ jsx40(Center3, { children: /* @__PURE__ */ jsx40(
|
6490
6601
|
Image,
|
6491
6602
|
{
|
6492
6603
|
src: imgSrc,
|
@@ -6496,11 +6607,11 @@ function AQCard({
|
|
6496
6607
|
alt: "Norway"
|
6497
6608
|
}
|
6498
6609
|
) }) }),
|
6499
|
-
/* @__PURE__ */
|
6500
|
-
/* @__PURE__ */
|
6501
|
-
status && /* @__PURE__ */
|
6610
|
+
/* @__PURE__ */ jsxs23(MyFlexRow, { justify: "space-between", mt: "md", mb: "xs", children: [
|
6611
|
+
/* @__PURE__ */ jsx40(Text8, { fw: 500, children: title }),
|
6612
|
+
status && /* @__PURE__ */ jsx40(Badge2, { color: "violet.5", w: "150px", children: status })
|
6502
6613
|
] }),
|
6503
|
-
/* @__PURE__ */
|
6614
|
+
/* @__PURE__ */ jsx40(Text8, { size: "sm", c: "dimmed", lineClamp: 2, children: description }),
|
6504
6615
|
children
|
6505
6616
|
] });
|
6506
6617
|
}
|
@@ -6508,7 +6619,7 @@ function AQCard({
|
|
6508
6619
|
// src/components/DataDisplay/CardInformation/MyCardInformation.tsx
|
6509
6620
|
import { Box as Box2, Flex as Flex3, Group as Group11, Paper as Paper5, Text as Text9 } from "@mantine/core";
|
6510
6621
|
import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
|
6511
|
-
import { jsx as
|
6622
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
6512
6623
|
function MyCardInformation({
|
6513
6624
|
title,
|
6514
6625
|
value,
|
@@ -6518,16 +6629,16 @@ function MyCardInformation({
|
|
6518
6629
|
diff = 0,
|
6519
6630
|
extraControl
|
6520
6631
|
}) {
|
6521
|
-
return /* @__PURE__ */
|
6632
|
+
return /* @__PURE__ */ jsxs24(
|
6522
6633
|
Paper5,
|
6523
6634
|
{
|
6524
6635
|
withBorder: true,
|
6525
6636
|
p: "md",
|
6526
6637
|
radius: "md",
|
6527
6638
|
children: [
|
6528
|
-
/* @__PURE__ */
|
6529
|
-
/* @__PURE__ */
|
6530
|
-
/* @__PURE__ */
|
6639
|
+
/* @__PURE__ */ jsxs24(Group11, { justify: "space-between", children: [
|
6640
|
+
/* @__PURE__ */ jsxs24(Flex3, { direction: "column", children: [
|
6641
|
+
/* @__PURE__ */ jsx41(
|
6531
6642
|
Text9,
|
6532
6643
|
{
|
6533
6644
|
tt: "uppercase",
|
@@ -6536,24 +6647,24 @@ function MyCardInformation({
|
|
6536
6647
|
children: title
|
6537
6648
|
}
|
6538
6649
|
),
|
6539
|
-
unit == "" ? /* @__PURE__ */
|
6650
|
+
unit == "" ? /* @__PURE__ */ jsxs24(Text9, { size: "xs", style: { visibility: "hidden" }, children: [
|
6540
6651
|
"\u0110\u01A1n v\u1ECB: ",
|
6541
|
-
/* @__PURE__ */
|
6542
|
-
] }) : /* @__PURE__ */
|
6652
|
+
/* @__PURE__ */ jsx41("strong", { children: unit })
|
6653
|
+
] }) : /* @__PURE__ */ jsxs24(Text9, { size: "xs", children: [
|
6543
6654
|
"\u0110\u01A1n v\u1ECB: ",
|
6544
|
-
/* @__PURE__ */
|
6655
|
+
/* @__PURE__ */ jsx41("strong", { children: unit })
|
6545
6656
|
] })
|
6546
6657
|
] }),
|
6547
|
-
/* @__PURE__ */
|
6658
|
+
/* @__PURE__ */ jsx41(Box2, { children: icon })
|
6548
6659
|
] }),
|
6549
|
-
/* @__PURE__ */
|
6660
|
+
/* @__PURE__ */ jsxs24(
|
6550
6661
|
Group11,
|
6551
6662
|
{
|
6552
6663
|
mt: "5",
|
6553
6664
|
align: "flex-end",
|
6554
6665
|
gap: "xs",
|
6555
6666
|
children: [
|
6556
|
-
/* @__PURE__ */
|
6667
|
+
/* @__PURE__ */ jsx41(
|
6557
6668
|
Text9,
|
6558
6669
|
{
|
6559
6670
|
fw: 700,
|
@@ -6561,7 +6672,7 @@ function MyCardInformation({
|
|
6561
6672
|
children: value
|
6562
6673
|
}
|
6563
6674
|
),
|
6564
|
-
/* @__PURE__ */
|
6675
|
+
/* @__PURE__ */ jsxs24(
|
6565
6676
|
Text9,
|
6566
6677
|
{
|
6567
6678
|
mb: "2",
|
@@ -6569,19 +6680,19 @@ function MyCardInformation({
|
|
6569
6680
|
fz: "h2",
|
6570
6681
|
fw: 500,
|
6571
6682
|
children: [
|
6572
|
-
/* @__PURE__ */
|
6683
|
+
/* @__PURE__ */ jsxs24("span", { children: [
|
6573
6684
|
diff,
|
6574
6685
|
"%"
|
6575
6686
|
] }),
|
6576
|
-
diff > 0 ? /* @__PURE__ */
|
6687
|
+
diff > 0 ? /* @__PURE__ */ jsx41(IconArrowUpRight, {}) : /* @__PURE__ */ jsx41(IconArrowDownRight, {})
|
6577
6688
|
]
|
6578
6689
|
}
|
6579
6690
|
)
|
6580
6691
|
]
|
6581
6692
|
}
|
6582
6693
|
),
|
6583
|
-
/* @__PURE__ */
|
6584
|
-
/* @__PURE__ */
|
6694
|
+
/* @__PURE__ */ jsxs24(Group11, { justify: "space-between", children: [
|
6695
|
+
/* @__PURE__ */ jsx41(Text9, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6585
6696
|
extraControl
|
6586
6697
|
] })
|
6587
6698
|
]
|
@@ -6592,50 +6703,50 @@ function MyCardInformation({
|
|
6592
6703
|
|
6593
6704
|
// src/components/DataDisplay/IconText/MyIconText.tsx
|
6594
6705
|
import { Group as Group12, Text as Text10 } from "@mantine/core";
|
6595
|
-
import { jsx as
|
6706
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
6596
6707
|
function MyIconText({ icon: Icon, text }) {
|
6597
|
-
return /* @__PURE__ */
|
6598
|
-
Icon && /* @__PURE__ */
|
6599
|
-
/* @__PURE__ */
|
6708
|
+
return /* @__PURE__ */ jsxs25(Group12, { wrap: "nowrap", gap: 10, mt: 3, children: [
|
6709
|
+
Icon && /* @__PURE__ */ jsx42(Icon, { stroke: 1.5, size: 16 }),
|
6710
|
+
/* @__PURE__ */ jsx42(Text10, { fz: "lg", c: "dimmed", children: text })
|
6600
6711
|
] });
|
6601
6712
|
}
|
6602
6713
|
|
6603
6714
|
// src/components/DataDisplay/KeyLabel/MyKeyLabel.tsx
|
6604
6715
|
import { Group as Group13, Text as Text11 } from "@mantine/core";
|
6605
|
-
import { jsx as
|
6716
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
6606
6717
|
function MyKeyLabel({ keyLabel, label }) {
|
6607
|
-
return /* @__PURE__ */
|
6608
|
-
/* @__PURE__ */
|
6718
|
+
return /* @__PURE__ */ jsxs26(Group13, { gap: 5, children: [
|
6719
|
+
/* @__PURE__ */ jsxs26(Text11, { fw: "bold", children: [
|
6609
6720
|
keyLabel,
|
6610
6721
|
":"
|
6611
6722
|
] }),
|
6612
|
-
/* @__PURE__ */
|
6723
|
+
/* @__PURE__ */ jsx43(Text11, { children: label })
|
6613
6724
|
] });
|
6614
6725
|
}
|
6615
6726
|
|
6616
6727
|
// src/components/DataDisplay/NumberFormatter/MyNumberFormatter.tsx
|
6617
6728
|
import { NumberFormatter } from "@mantine/core";
|
6618
|
-
import { jsx as
|
6729
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
6619
6730
|
function MyNumberFormatter(_a) {
|
6620
6731
|
var rest = __objRest(_a, []);
|
6621
|
-
return /* @__PURE__ */
|
6732
|
+
return /* @__PURE__ */ jsx44(NumberFormatter, __spreadValues({ thousandSeparator: true, suffix: " VN\u0110" }, rest));
|
6622
6733
|
}
|
6623
6734
|
|
6624
6735
|
// src/components/DataDisplay/StatCard/AQStatCard1.tsx
|
6625
|
-
import { Box as Box3, Button as
|
6736
|
+
import { Box as Box3, Button as Button14, Flex as Flex4, Group as Group14, Paper as Paper6, Text as Text12 } from "@mantine/core";
|
6626
6737
|
import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
|
6627
|
-
import { Fragment as
|
6738
|
+
import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
6628
6739
|
function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
6629
|
-
return /* @__PURE__ */
|
6740
|
+
return /* @__PURE__ */ jsx45(Fragment13, { children: /* @__PURE__ */ jsxs27(
|
6630
6741
|
Paper6,
|
6631
6742
|
{
|
6632
6743
|
withBorder: true,
|
6633
6744
|
p: "md",
|
6634
6745
|
radius: "md",
|
6635
6746
|
children: [
|
6636
|
-
/* @__PURE__ */
|
6637
|
-
/* @__PURE__ */
|
6638
|
-
/* @__PURE__ */
|
6747
|
+
/* @__PURE__ */ jsxs27(Group14, { justify: "space-between", children: [
|
6748
|
+
/* @__PURE__ */ jsxs27(Flex4, { direction: "column", children: [
|
6749
|
+
/* @__PURE__ */ jsx45(
|
6639
6750
|
Text12,
|
6640
6751
|
{
|
6641
6752
|
tt: "uppercase",
|
@@ -6644,24 +6755,24 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6644
6755
|
children: title
|
6645
6756
|
}
|
6646
6757
|
),
|
6647
|
-
unit == "" ? /* @__PURE__ */
|
6758
|
+
unit == "" ? /* @__PURE__ */ jsxs27(Text12, { size: "xs", style: { visibility: "hidden" }, children: [
|
6648
6759
|
"\u0110\u01A1n v\u1ECB: ",
|
6649
|
-
/* @__PURE__ */
|
6650
|
-
] }) : /* @__PURE__ */
|
6760
|
+
/* @__PURE__ */ jsx45("strong", { children: unit })
|
6761
|
+
] }) : /* @__PURE__ */ jsxs27(Text12, { size: "xs", children: [
|
6651
6762
|
"\u0110\u01A1n v\u1ECB: ",
|
6652
|
-
/* @__PURE__ */
|
6763
|
+
/* @__PURE__ */ jsx45("strong", { children: unit })
|
6653
6764
|
] })
|
6654
6765
|
] }),
|
6655
|
-
/* @__PURE__ */
|
6766
|
+
/* @__PURE__ */ jsx45(Box3, { children: icons })
|
6656
6767
|
] }),
|
6657
|
-
/* @__PURE__ */
|
6768
|
+
/* @__PURE__ */ jsxs27(
|
6658
6769
|
Group14,
|
6659
6770
|
{
|
6660
6771
|
mt: "5",
|
6661
6772
|
align: "flex-end",
|
6662
6773
|
gap: "xs",
|
6663
6774
|
children: [
|
6664
|
-
/* @__PURE__ */
|
6775
|
+
/* @__PURE__ */ jsx45(
|
6665
6776
|
Text12,
|
6666
6777
|
{
|
6667
6778
|
fw: 700,
|
@@ -6669,7 +6780,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6669
6780
|
children: value
|
6670
6781
|
}
|
6671
6782
|
),
|
6672
|
-
/* @__PURE__ */
|
6783
|
+
/* @__PURE__ */ jsxs27(
|
6673
6784
|
Text12,
|
6674
6785
|
{
|
6675
6786
|
mb: "2",
|
@@ -6677,21 +6788,21 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6677
6788
|
fz: "h2",
|
6678
6789
|
fw: 500,
|
6679
6790
|
children: [
|
6680
|
-
/* @__PURE__ */
|
6791
|
+
/* @__PURE__ */ jsxs27("span", { children: [
|
6681
6792
|
diff,
|
6682
6793
|
"%"
|
6683
6794
|
] }),
|
6684
|
-
diff > 0 ? /* @__PURE__ */
|
6795
|
+
diff > 0 ? /* @__PURE__ */ jsx45(IconArrowUpRight2, {}) : /* @__PURE__ */ jsx45(IconArrowDownRight2, {})
|
6685
6796
|
]
|
6686
6797
|
}
|
6687
6798
|
)
|
6688
6799
|
]
|
6689
6800
|
}
|
6690
6801
|
),
|
6691
|
-
/* @__PURE__ */
|
6692
|
-
/* @__PURE__ */
|
6693
|
-
/* @__PURE__ */
|
6694
|
-
|
6802
|
+
/* @__PURE__ */ jsxs27(Group14, { justify: "space-between", children: [
|
6803
|
+
/* @__PURE__ */ jsx45(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6804
|
+
/* @__PURE__ */ jsx45(
|
6805
|
+
Button14,
|
6695
6806
|
{
|
6696
6807
|
variant: "light",
|
6697
6808
|
size: "xs",
|
@@ -6781,15 +6892,15 @@ function FaviconSetter() {
|
|
6781
6892
|
|
6782
6893
|
// src/components/Inputs/DateInput/MyDateInput.tsx
|
6783
6894
|
import { DateInput } from "@mantine/dates";
|
6784
|
-
import { jsx as
|
6895
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
6785
6896
|
function MyDateInput(_a) {
|
6786
6897
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6787
|
-
return /* @__PURE__ */
|
6898
|
+
return /* @__PURE__ */ jsx46(DateInput, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
6788
6899
|
}
|
6789
6900
|
|
6790
6901
|
// src/components/Inputs/DayOfWeekPicker/MyDayOfWeekPicker.tsx
|
6791
6902
|
import { Badge as Badge3, Group as Group15, Text as Text13 } from "@mantine/core";
|
6792
|
-
import { jsx as
|
6903
|
+
import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
6793
6904
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
6794
6905
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
6795
6906
|
const toggle = (val) => {
|
@@ -6797,9 +6908,9 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
6797
6908
|
const newValue = value.includes(val) ? value.filter((v5) => v5 !== val) : [...value, val];
|
6798
6909
|
onChange(newValue);
|
6799
6910
|
};
|
6800
|
-
return /* @__PURE__ */
|
6801
|
-
/* @__PURE__ */
|
6802
|
-
/* @__PURE__ */
|
6911
|
+
return /* @__PURE__ */ jsxs28(MyFlexRow, { align: "center", children: [
|
6912
|
+
/* @__PURE__ */ jsx47(Text13, { children: "Danh s\xE1ch th\u1EE9: " }),
|
6913
|
+
/* @__PURE__ */ jsx47(Group15, { gap: "xs", children: days.map((d5) => /* @__PURE__ */ jsx47(
|
6803
6914
|
Badge3,
|
6804
6915
|
{
|
6805
6916
|
variant: value.includes(d5.value) ? "filled" : "outline",
|
@@ -6822,7 +6933,7 @@ import {
|
|
6822
6933
|
Text as Text14,
|
6823
6934
|
useMantineColorScheme as useMantineColorScheme2
|
6824
6935
|
} from "@mantine/core";
|
6825
|
-
import { jsx as
|
6936
|
+
import { jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
|
6826
6937
|
function MyFieldset(_a) {
|
6827
6938
|
var _b = _a, {
|
6828
6939
|
children,
|
@@ -6851,10 +6962,10 @@ function MyFieldset(_a) {
|
|
6851
6962
|
const mergedStyles = typeof styles === "function" ? styles : __spreadProps(__spreadValues({}, styles), {
|
6852
6963
|
legend: __spreadValues(__spreadValues({}, defaultLegendStyles), styles == null ? void 0 : styles.legend)
|
6853
6964
|
});
|
6854
|
-
return /* @__PURE__ */
|
6965
|
+
return /* @__PURE__ */ jsx48(
|
6855
6966
|
Fieldset4,
|
6856
6967
|
__spreadProps(__spreadValues({
|
6857
|
-
legend: customLegend != null ? customLegend : /* @__PURE__ */
|
6968
|
+
legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx48(Group16, { gap: "xs", children: /* @__PURE__ */ jsxs29(Text14, { fw: 600, children: [
|
6858
6969
|
" ",
|
6859
6970
|
title,
|
6860
6971
|
" "
|
@@ -6869,13 +6980,13 @@ function MyFieldset(_a) {
|
|
6869
6980
|
// src/components/Inputs/FileInput/MyFileInput.tsx
|
6870
6981
|
import { FileInput as FileInput3 } from "@mantine/core";
|
6871
6982
|
import { IconFile } from "@tabler/icons-react";
|
6872
|
-
import { jsx as
|
6983
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
6873
6984
|
function MyFileInput(_a) {
|
6874
6985
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6875
|
-
return /* @__PURE__ */
|
6986
|
+
return /* @__PURE__ */ jsx49(
|
6876
6987
|
FileInput3,
|
6877
6988
|
__spreadValues({
|
6878
|
-
rightSection: /* @__PURE__ */
|
6989
|
+
rightSection: /* @__PURE__ */ jsx49(IconFile, {}),
|
6879
6990
|
label,
|
6880
6991
|
placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : ""
|
6881
6992
|
}, rest)
|
@@ -6884,10 +6995,10 @@ function MyFileInput(_a) {
|
|
6884
6995
|
|
6885
6996
|
// src/components/Inputs/NumberInput/MyNumberInput.tsx
|
6886
6997
|
import { NumberInput as NumberInput2 } from "@mantine/core";
|
6887
|
-
import { jsx as
|
6998
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
6888
6999
|
function MyNumberInput(_a) {
|
6889
7000
|
var _b = _a, { minValue, label } = _b, rest = __objRest(_b, ["minValue", "label"]);
|
6890
|
-
return /* @__PURE__ */
|
7001
|
+
return /* @__PURE__ */ jsx50(
|
6891
7002
|
NumberInput2,
|
6892
7003
|
__spreadValues({
|
6893
7004
|
label,
|
@@ -6899,10 +7010,10 @@ function MyNumberInput(_a) {
|
|
6899
7010
|
|
6900
7011
|
// src/components/Inputs/TextArea/MyTextArea.tsx
|
6901
7012
|
import { Textarea } from "@mantine/core";
|
6902
|
-
import { jsx as
|
7013
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
6903
7014
|
function MyTextArea(_a) {
|
6904
7015
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6905
|
-
return /* @__PURE__ */
|
7016
|
+
return /* @__PURE__ */ jsx51(Textarea, __spreadValues({ label, placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
6906
7017
|
}
|
6907
7018
|
|
6908
7019
|
// src/components/Inputs/TextEditor/MyTextEditor.tsx
|
@@ -6918,7 +7029,7 @@ import Underline from "@tiptap/extension-underline";
|
|
6918
7029
|
import { useEditor } from "@tiptap/react";
|
6919
7030
|
import StarterKit from "@tiptap/starter-kit";
|
6920
7031
|
import { useEffect as useEffect8, useState as useState9 } from "react";
|
6921
|
-
import { jsx as
|
7032
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
6922
7033
|
function MyTextEditor(_a) {
|
6923
7034
|
var _b = _a, {
|
6924
7035
|
autoHiddenToolBar = false,
|
@@ -7020,43 +7131,43 @@ function MyTextEditor(_a) {
|
|
7020
7131
|
editor.commands.setContent(value);
|
7021
7132
|
}
|
7022
7133
|
}, [value, editor]);
|
7023
|
-
return /* @__PURE__ */
|
7024
|
-
/* @__PURE__ */
|
7025
|
-
/* @__PURE__ */
|
7026
|
-
/* @__PURE__ */
|
7027
|
-
/* @__PURE__ */
|
7028
|
-
/* @__PURE__ */
|
7029
|
-
/* @__PURE__ */
|
7030
|
-
/* @__PURE__ */
|
7031
|
-
/* @__PURE__ */
|
7032
|
-
/* @__PURE__ */
|
7134
|
+
return /* @__PURE__ */ jsx52(Input.Wrapper, { label, flex: 1, error, withAsterisk, children: /* @__PURE__ */ jsxs30(RichTextEditor, { editor, style: { border: error && "1px solid #e03131" }, children: [
|
7135
|
+
/* @__PURE__ */ jsxs30(RichTextEditor.Toolbar, { hidden: hiddenToolBar, sticky: true, stickyOffset: 60, children: [
|
7136
|
+
/* @__PURE__ */ jsxs30(RichTextEditor.ControlsGroup, { children: [
|
7137
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Bold, {}),
|
7138
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Italic, {}),
|
7139
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Underline, {}),
|
7140
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Strikethrough, {}),
|
7141
|
+
/* @__PURE__ */ jsx52(RichTextEditor.ClearFormatting, {}),
|
7142
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Highlight, {}),
|
7143
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Code, {})
|
7033
7144
|
] }),
|
7034
|
-
/* @__PURE__ */
|
7035
|
-
/* @__PURE__ */
|
7036
|
-
/* @__PURE__ */
|
7037
|
-
/* @__PURE__ */
|
7038
|
-
/* @__PURE__ */
|
7145
|
+
/* @__PURE__ */ jsxs30(RichTextEditor.ControlsGroup, { children: [
|
7146
|
+
/* @__PURE__ */ jsx52(RichTextEditor.H1, {}),
|
7147
|
+
/* @__PURE__ */ jsx52(RichTextEditor.H2, {}),
|
7148
|
+
/* @__PURE__ */ jsx52(RichTextEditor.H3, {}),
|
7149
|
+
/* @__PURE__ */ jsx52(RichTextEditor.H4, {})
|
7039
7150
|
] }),
|
7040
|
-
/* @__PURE__ */
|
7041
|
-
/* @__PURE__ */
|
7042
|
-
/* @__PURE__ */
|
7043
|
-
/* @__PURE__ */
|
7044
|
-
/* @__PURE__ */
|
7045
|
-
/* @__PURE__ */
|
7046
|
-
/* @__PURE__ */
|
7151
|
+
/* @__PURE__ */ jsxs30(RichTextEditor.ControlsGroup, { children: [
|
7152
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Blockquote, {}),
|
7153
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Hr, {}),
|
7154
|
+
/* @__PURE__ */ jsx52(RichTextEditor.BulletList, {}),
|
7155
|
+
/* @__PURE__ */ jsx52(RichTextEditor.OrderedList, {}),
|
7156
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Subscript, {}),
|
7157
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Superscript, {})
|
7047
7158
|
] }),
|
7048
|
-
/* @__PURE__ */
|
7049
|
-
/* @__PURE__ */
|
7050
|
-
/* @__PURE__ */
|
7159
|
+
/* @__PURE__ */ jsxs30(RichTextEditor.ControlsGroup, { children: [
|
7160
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Link, {}),
|
7161
|
+
/* @__PURE__ */ jsx52(RichTextEditor.Unlink, {})
|
7051
7162
|
] }),
|
7052
|
-
/* @__PURE__ */
|
7053
|
-
/* @__PURE__ */
|
7054
|
-
/* @__PURE__ */
|
7055
|
-
/* @__PURE__ */
|
7056
|
-
/* @__PURE__ */
|
7163
|
+
/* @__PURE__ */ jsxs30(RichTextEditor.ControlsGroup, { children: [
|
7164
|
+
/* @__PURE__ */ jsx52(RichTextEditor.AlignLeft, {}),
|
7165
|
+
/* @__PURE__ */ jsx52(RichTextEditor.AlignCenter, {}),
|
7166
|
+
/* @__PURE__ */ jsx52(RichTextEditor.AlignJustify, {}),
|
7167
|
+
/* @__PURE__ */ jsx52(RichTextEditor.AlignRight, {})
|
7057
7168
|
] })
|
7058
7169
|
] }),
|
7059
|
-
/* @__PURE__ */
|
7170
|
+
/* @__PURE__ */ jsx52(
|
7060
7171
|
ScrollArea2.Autosize,
|
7061
7172
|
{
|
7062
7173
|
onMouseDown: () => {
|
@@ -7071,7 +7182,7 @@ function MyTextEditor(_a) {
|
|
7071
7182
|
setHiddenToolBar(false);
|
7072
7183
|
},
|
7073
7184
|
style: { cursor: "text", maxHeight: "400px" },
|
7074
|
-
children: /* @__PURE__ */
|
7185
|
+
children: /* @__PURE__ */ jsx52(RichTextEditor.Content, { mih: contentHeight })
|
7075
7186
|
}
|
7076
7187
|
)
|
7077
7188
|
] }) });
|
@@ -7079,7 +7190,7 @@ function MyTextEditor(_a) {
|
|
7079
7190
|
|
7080
7191
|
// src/components/Inputs/WeeklySessionSchedulerPicker/MyWeeklySessionSchedulerPicker.tsx
|
7081
7192
|
import {
|
7082
|
-
Button as
|
7193
|
+
Button as Button15,
|
7083
7194
|
Center as Center4,
|
7084
7195
|
Divider as Divider2,
|
7085
7196
|
Group as Group17,
|
@@ -7088,9 +7199,9 @@ import {
|
|
7088
7199
|
ScrollArea as ScrollArea3,
|
7089
7200
|
Text as Text15
|
7090
7201
|
} from "@mantine/core";
|
7091
|
-
import { IconPlus as
|
7202
|
+
import { IconPlus as IconPlus6, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
7092
7203
|
import { useState as useState10 } from "react";
|
7093
|
-
import { jsx as
|
7204
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
7094
7205
|
function MyWeeklySessionSchedulerPicker({
|
7095
7206
|
value = [],
|
7096
7207
|
onChange
|
@@ -7121,8 +7232,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
7121
7232
|
return acc;
|
7122
7233
|
}, {});
|
7123
7234
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
7124
|
-
return /* @__PURE__ */
|
7125
|
-
/* @__PURE__ */
|
7235
|
+
return /* @__PURE__ */ jsx53(Paper7, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs31(MyFlexColumn, { children: [
|
7236
|
+
/* @__PURE__ */ jsx53(Center4, { children: /* @__PURE__ */ jsx53(
|
7126
7237
|
MyDayOfWeekPicker,
|
7127
7238
|
{
|
7128
7239
|
value: selectedDays,
|
@@ -7132,41 +7243,41 @@ function MyWeeklySessionSchedulerPicker({
|
|
7132
7243
|
}
|
7133
7244
|
}
|
7134
7245
|
) }),
|
7135
|
-
/* @__PURE__ */
|
7136
|
-
/* @__PURE__ */
|
7246
|
+
/* @__PURE__ */ jsx53(Divider2, { my: "xs" }),
|
7247
|
+
/* @__PURE__ */ jsx53(Center4, { children: /* @__PURE__ */ jsx53(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx53(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
7137
7248
|
var _a;
|
7138
|
-
return /* @__PURE__ */
|
7249
|
+
return /* @__PURE__ */ jsxs31(
|
7139
7250
|
Paper7,
|
7140
7251
|
{
|
7141
7252
|
w: "100%",
|
7142
7253
|
p: "md",
|
7143
7254
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
7144
7255
|
children: [
|
7145
|
-
/* @__PURE__ */
|
7146
|
-
/* @__PURE__ */
|
7147
|
-
/* @__PURE__ */
|
7148
|
-
|
7256
|
+
/* @__PURE__ */ jsxs31(Group17, { gap: "apart", children: [
|
7257
|
+
/* @__PURE__ */ jsx53(Text15, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
7258
|
+
/* @__PURE__ */ jsx53(
|
7259
|
+
Button15,
|
7149
7260
|
{
|
7150
7261
|
color: "teal.5",
|
7151
|
-
leftSection: /* @__PURE__ */
|
7262
|
+
leftSection: /* @__PURE__ */ jsx53(IconPlus6, { size: 14 }),
|
7152
7263
|
onClick: () => handleAddSession(dayOfWeek),
|
7153
7264
|
children: "Th\xEAm bu\u1ED5i"
|
7154
7265
|
}
|
7155
7266
|
)
|
7156
7267
|
] }),
|
7157
|
-
/* @__PURE__ */
|
7268
|
+
/* @__PURE__ */ jsx53(Divider2, { my: "sm" }),
|
7158
7269
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
7159
7270
|
const globalIndex = value.findIndex(
|
7160
7271
|
(v5) => v5 === item
|
7161
7272
|
);
|
7162
|
-
return /* @__PURE__ */
|
7273
|
+
return /* @__PURE__ */ jsxs31(
|
7163
7274
|
Group17,
|
7164
7275
|
{
|
7165
7276
|
mt: "xs",
|
7166
7277
|
gap: "xs",
|
7167
7278
|
align: "flex-end",
|
7168
7279
|
children: [
|
7169
|
-
/* @__PURE__ */
|
7280
|
+
/* @__PURE__ */ jsx53(
|
7170
7281
|
NumberInput3,
|
7171
7282
|
{
|
7172
7283
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -7178,7 +7289,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7178
7289
|
)
|
7179
7290
|
}
|
7180
7291
|
),
|
7181
|
-
/* @__PURE__ */
|
7292
|
+
/* @__PURE__ */ jsx53(
|
7182
7293
|
NumberInput3,
|
7183
7294
|
{
|
7184
7295
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -7190,7 +7301,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7190
7301
|
)
|
7191
7302
|
}
|
7192
7303
|
),
|
7193
|
-
/* @__PURE__ */
|
7304
|
+
/* @__PURE__ */ jsx53(
|
7194
7305
|
NumberInput3,
|
7195
7306
|
{
|
7196
7307
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -7199,13 +7310,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
7199
7310
|
value: item.durationMinutes
|
7200
7311
|
}
|
7201
7312
|
),
|
7202
|
-
/* @__PURE__ */
|
7203
|
-
|
7313
|
+
/* @__PURE__ */ jsx53(
|
7314
|
+
Button15,
|
7204
7315
|
{
|
7205
7316
|
variant: "light",
|
7206
7317
|
color: "red",
|
7207
7318
|
onClick: () => handleRemove(globalIndex),
|
7208
|
-
leftSection: /* @__PURE__ */
|
7319
|
+
leftSection: /* @__PURE__ */ jsx53(IconTrash5, { size: 14 }),
|
7209
7320
|
children: "X\xF3a bu\u1ED5i"
|
7210
7321
|
}
|
7211
7322
|
)
|
@@ -7223,7 +7334,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7223
7334
|
}
|
7224
7335
|
|
7225
7336
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
7226
|
-
import { Button as
|
7337
|
+
import { Button as Button16 } from "@mantine/core";
|
7227
7338
|
import { IconLogout } from "@tabler/icons-react";
|
7228
7339
|
import { useRouter as useRouter3 } from "next/navigation";
|
7229
7340
|
|
@@ -7238,19 +7349,19 @@ function useS_authenticate() {
|
|
7238
7349
|
}
|
7239
7350
|
|
7240
7351
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
7241
|
-
import { jsx as
|
7352
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
7242
7353
|
function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
7243
7354
|
const router = useRouter3();
|
7244
7355
|
const S_Authenticate = useS_authenticate();
|
7245
|
-
return /* @__PURE__ */
|
7356
|
+
return /* @__PURE__ */ jsx54(Button16, { onClick: () => {
|
7246
7357
|
S_Authenticate.setProperty("token", "");
|
7247
7358
|
router.replace(redirectURL);
|
7248
|
-
}, leftSection: /* @__PURE__ */
|
7359
|
+
}, leftSection: /* @__PURE__ */ jsx54(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
7249
7360
|
}
|
7250
7361
|
|
7251
7362
|
// src/components/Layouts/BasicAppShell/BasicAppShell.tsx
|
7252
7363
|
import {
|
7253
|
-
ActionIcon as
|
7364
|
+
ActionIcon as ActionIcon12,
|
7254
7365
|
AppShell,
|
7255
7366
|
Badge as Badge4,
|
7256
7367
|
Divider as Divider3,
|
@@ -7270,7 +7381,7 @@ import {
|
|
7270
7381
|
import Link3 from "next/link";
|
7271
7382
|
import { usePathname as usePathname2 } from "next/navigation";
|
7272
7383
|
import { useEffect as useEffect9, useMemo as useMemo3, useState as useState11 } from "react";
|
7273
|
-
import { Fragment as
|
7384
|
+
import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
|
7274
7385
|
function findBreadcrumbPath(items, currentPath, parents = []) {
|
7275
7386
|
for (const item of items) {
|
7276
7387
|
if (item.link === currentPath) {
|
@@ -7285,13 +7396,13 @@ function findBreadcrumbPath(items, currentPath, parents = []) {
|
|
7285
7396
|
}
|
7286
7397
|
function getRightSection(status) {
|
7287
7398
|
if (status === "Prototype")
|
7288
|
-
return /* @__PURE__ */
|
7399
|
+
return /* @__PURE__ */ jsx55(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
|
7289
7400
|
if (status === "New")
|
7290
|
-
return /* @__PURE__ */
|
7401
|
+
return /* @__PURE__ */ jsx55(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", circle: true, children: "N" });
|
7291
7402
|
if (status === "Menu")
|
7292
|
-
return /* @__PURE__ */
|
7403
|
+
return /* @__PURE__ */ jsx55(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "gray", circle: true, children: "M" });
|
7293
7404
|
if (status === "Change")
|
7294
|
-
return /* @__PURE__ */
|
7405
|
+
return /* @__PURE__ */ jsx55(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
|
7295
7406
|
return null;
|
7296
7407
|
}
|
7297
7408
|
function RenderNavLinks({
|
@@ -7299,14 +7410,14 @@ function RenderNavLinks({
|
|
7299
7410
|
}) {
|
7300
7411
|
const basicAppShellStore = useS_BasicAppShell();
|
7301
7412
|
const pathName = usePathname2();
|
7302
|
-
return /* @__PURE__ */
|
7413
|
+
return /* @__PURE__ */ jsx55(Fragment14, { children: items.map((item, index) => /* @__PURE__ */ jsx55(
|
7303
7414
|
NavLink,
|
7304
7415
|
{
|
7305
7416
|
active: item.link === pathName.split("/")[2],
|
7306
7417
|
component: Link3,
|
7307
7418
|
opened: basicAppShellStore.state.groupMenuOpenId.includes(item.label),
|
7308
7419
|
href: `/${pathName.split("/")[1]}/${item.link}` || "#",
|
7309
|
-
label: /* @__PURE__ */
|
7420
|
+
label: /* @__PURE__ */ jsxs32(MyFlexRow, { justify: "space-between", children: [
|
7310
7421
|
item.label,
|
7311
7422
|
" ",
|
7312
7423
|
getRightSection(item.status)
|
@@ -7318,7 +7429,7 @@ function RenderNavLinks({
|
|
7318
7429
|
return;
|
7319
7430
|
}
|
7320
7431
|
},
|
7321
|
-
children: item.links && /* @__PURE__ */
|
7432
|
+
children: item.links && /* @__PURE__ */ jsx55(RenderNavLinks, { items: item.links })
|
7322
7433
|
},
|
7323
7434
|
index
|
7324
7435
|
)) });
|
@@ -7441,7 +7552,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7441
7552
|
basicAppShellStore.setProperty("note", linkItem == null ? void 0 : linkItem.note);
|
7442
7553
|
basicAppShellStore.setProperty("status", linkItem == null ? void 0 : linkItem.status);
|
7443
7554
|
}, [pathName]);
|
7444
|
-
return /* @__PURE__ */
|
7555
|
+
return /* @__PURE__ */ jsxs32(
|
7445
7556
|
AppShell,
|
7446
7557
|
{
|
7447
7558
|
header: { height: 60 },
|
@@ -7455,36 +7566,36 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7455
7566
|
},
|
7456
7567
|
padding: "md",
|
7457
7568
|
children: [
|
7458
|
-
/* @__PURE__ */
|
7459
|
-
/* @__PURE__ */
|
7460
|
-
/* @__PURE__ */
|
7569
|
+
/* @__PURE__ */ jsx55(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs32(Group18, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7570
|
+
/* @__PURE__ */ jsxs32(Group18, { h: "100%", children: [
|
7571
|
+
/* @__PURE__ */ jsx55(
|
7461
7572
|
Tooltip5,
|
7462
7573
|
{
|
7463
7574
|
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7464
|
-
children: /* @__PURE__ */
|
7465
|
-
|
7575
|
+
children: /* @__PURE__ */ jsx55(
|
7576
|
+
ActionIcon12,
|
7466
7577
|
{
|
7467
7578
|
size: "lg",
|
7468
7579
|
radius: "md",
|
7469
7580
|
variant: "default",
|
7470
7581
|
onClick: basicAppShellStore.toggle,
|
7471
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7582
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx55(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx55(IconLayoutSidebarLeftCollapse, {})
|
7472
7583
|
}
|
7473
7584
|
)
|
7474
7585
|
}
|
7475
7586
|
),
|
7476
|
-
/* @__PURE__ */
|
7477
|
-
|
7587
|
+
/* @__PURE__ */ jsx55(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx55(
|
7588
|
+
ActionIcon12,
|
7478
7589
|
{
|
7479
7590
|
size: "lg",
|
7480
7591
|
radius: "md",
|
7481
7592
|
variant: "default",
|
7482
7593
|
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7483
|
-
children: /* @__PURE__ */
|
7594
|
+
children: /* @__PURE__ */ jsx55(IconLibraryMinus, {})
|
7484
7595
|
}
|
7485
7596
|
) })
|
7486
7597
|
] }),
|
7487
|
-
/* @__PURE__ */
|
7598
|
+
/* @__PURE__ */ jsx55(
|
7488
7599
|
Group18,
|
7489
7600
|
{
|
7490
7601
|
style: {
|
@@ -7492,43 +7603,43 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7492
7603
|
left: "50%",
|
7493
7604
|
transform: "translateX(-50%)"
|
7494
7605
|
},
|
7495
|
-
children: /* @__PURE__ */
|
7606
|
+
children: /* @__PURE__ */ jsx55(Text16, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7496
7607
|
}
|
7497
7608
|
),
|
7498
|
-
/* @__PURE__ */
|
7609
|
+
/* @__PURE__ */ jsxs32(Group18, { children: [
|
7499
7610
|
extraTopRight,
|
7500
|
-
/* @__PURE__ */
|
7611
|
+
/* @__PURE__ */ jsx55(MySwitchTheme, {})
|
7501
7612
|
] })
|
7502
7613
|
] }) : (
|
7503
7614
|
// For mobile screens - simplified layout
|
7504
|
-
/* @__PURE__ */
|
7505
|
-
/* @__PURE__ */
|
7506
|
-
|
7615
|
+
/* @__PURE__ */ jsxs32(Group18, { h: "100%", px: "md", justify: "space-between", children: [
|
7616
|
+
/* @__PURE__ */ jsx55(
|
7617
|
+
ActionIcon12,
|
7507
7618
|
{
|
7508
7619
|
size: "lg",
|
7509
7620
|
radius: "md",
|
7510
7621
|
variant: "default",
|
7511
7622
|
onClick: basicAppShellStore.toggle,
|
7512
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7623
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx55(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx55(IconLayoutSidebarLeftCollapse, {})
|
7513
7624
|
}
|
7514
7625
|
),
|
7515
|
-
/* @__PURE__ */
|
7516
|
-
/* @__PURE__ */
|
7626
|
+
/* @__PURE__ */ jsx55(Text16, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7627
|
+
/* @__PURE__ */ jsxs32(Group18, { children: [
|
7517
7628
|
extraTopRight,
|
7518
|
-
/* @__PURE__ */
|
7629
|
+
/* @__PURE__ */ jsx55(MySwitchTheme, {})
|
7519
7630
|
] })
|
7520
7631
|
] })
|
7521
7632
|
) }),
|
7522
|
-
/* @__PURE__ */
|
7523
|
-
/* @__PURE__ */
|
7524
|
-
/* @__PURE__ */
|
7525
|
-
/* @__PURE__ */
|
7526
|
-
/* @__PURE__ */
|
7527
|
-
/* @__PURE__ */
|
7633
|
+
/* @__PURE__ */ jsxs32(AppShell.Navbar, { children: [
|
7634
|
+
/* @__PURE__ */ jsx55(MyAppSpotlight, { menu }),
|
7635
|
+
/* @__PURE__ */ jsxs32(AppShell.Section, { grow: true, component: ScrollArea4, p: 5, children: [
|
7636
|
+
/* @__PURE__ */ jsx55(RenderNavLinks, { items: menu }),
|
7637
|
+
/* @__PURE__ */ jsx55(Divider3, {}),
|
7638
|
+
/* @__PURE__ */ jsx55(F_authenticate_Logout, {})
|
7528
7639
|
] }),
|
7529
|
-
/* @__PURE__ */
|
7530
|
-
/* @__PURE__ */
|
7531
|
-
/* @__PURE__ */
|
7640
|
+
/* @__PURE__ */ jsxs32(AppShell.Section, { p: "md", children: [
|
7641
|
+
/* @__PURE__ */ jsx55(Divider3, {}),
|
7642
|
+
/* @__PURE__ */ jsx55(
|
7532
7643
|
Image3,
|
7533
7644
|
{
|
7534
7645
|
fit: "contain",
|
@@ -7542,7 +7653,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7542
7653
|
)
|
7543
7654
|
] })
|
7544
7655
|
] }),
|
7545
|
-
/* @__PURE__ */
|
7656
|
+
/* @__PURE__ */ jsx55(
|
7546
7657
|
AppShell.Main,
|
7547
7658
|
{
|
7548
7659
|
bg: "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))",
|
@@ -7597,17 +7708,17 @@ function utils_layout_getItemsWithoutLinks(menu) {
|
|
7597
7708
|
|
7598
7709
|
// src/components/Layouts/Container/MyContainer.tsx
|
7599
7710
|
import { Container, Flex as Flex5 } from "@mantine/core";
|
7600
|
-
import { jsx as
|
7711
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
7601
7712
|
function MyContainer(_a) {
|
7602
7713
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
7603
|
-
return /* @__PURE__ */
|
7714
|
+
return /* @__PURE__ */ jsx56(Container, __spreadProps(__spreadValues({ fluid: true }, rest), { children: /* @__PURE__ */ jsx56(Flex5, { direction: "column", children }) }));
|
7604
7715
|
}
|
7605
7716
|
|
7606
7717
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7607
7718
|
import {
|
7608
7719
|
Box as Box4,
|
7609
7720
|
Burger,
|
7610
|
-
Button as
|
7721
|
+
Button as Button17,
|
7611
7722
|
Container as Container2,
|
7612
7723
|
Divider as Divider4,
|
7613
7724
|
Drawer,
|
@@ -7620,7 +7731,7 @@ import {
|
|
7620
7731
|
UnstyledButton,
|
7621
7732
|
useMantineTheme
|
7622
7733
|
} from "@mantine/core";
|
7623
|
-
import { useDisclosure as
|
7734
|
+
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
7624
7735
|
import {
|
7625
7736
|
IconBook,
|
7626
7737
|
IconChartPie3,
|
@@ -7646,7 +7757,7 @@ function useHeaderMegaMenuStore() {
|
|
7646
7757
|
}
|
7647
7758
|
|
7648
7759
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7649
|
-
import { jsx as
|
7760
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
7650
7761
|
var mockdata = [
|
7651
7762
|
{
|
7652
7763
|
icon: IconCode,
|
@@ -7680,31 +7791,31 @@ var mockdata = [
|
|
7680
7791
|
}
|
7681
7792
|
];
|
7682
7793
|
function HeaderMegaMenu({ children, menus }) {
|
7683
|
-
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] =
|
7684
|
-
const [linksOpened, { toggle: toggleLinks }] =
|
7794
|
+
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure12(false);
|
7795
|
+
const [linksOpened, { toggle: toggleLinks }] = useDisclosure12(false);
|
7685
7796
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
7686
7797
|
const theme = useMantineTheme();
|
7687
|
-
const links = mockdata.map((item) => /* @__PURE__ */
|
7688
|
-
/* @__PURE__ */
|
7689
|
-
/* @__PURE__ */
|
7690
|
-
/* @__PURE__ */
|
7691
|
-
/* @__PURE__ */
|
7798
|
+
const links = mockdata.map((item) => /* @__PURE__ */ jsx57(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs33(Group19, { wrap: "nowrap", align: "flex-start", children: [
|
7799
|
+
/* @__PURE__ */ jsx57(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx57(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
|
7800
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
7801
|
+
/* @__PURE__ */ jsx57(Text17, { size: "sm", fw: 500, children: item.title }),
|
7802
|
+
/* @__PURE__ */ jsx57(Text17, { size: "xs", c: "dimmed", children: item.description })
|
7692
7803
|
] })
|
7693
7804
|
] }) }, item.title));
|
7694
|
-
return /* @__PURE__ */
|
7695
|
-
/* @__PURE__ */
|
7696
|
-
/* @__PURE__ */
|
7697
|
-
/* @__PURE__ */
|
7698
|
-
/* @__PURE__ */
|
7805
|
+
return /* @__PURE__ */ jsxs33(Box4, { children: [
|
7806
|
+
/* @__PURE__ */ jsx57("header", { className: css_default.header, children: /* @__PURE__ */ jsxs33(Group19, { justify: "space-between", h: "100%", children: [
|
7807
|
+
/* @__PURE__ */ jsxs33(Group19, { children: [
|
7808
|
+
/* @__PURE__ */ jsx57(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
|
7809
|
+
/* @__PURE__ */ jsx57(Group19, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx57(Button17, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
|
7699
7810
|
] }),
|
7700
|
-
/* @__PURE__ */
|
7701
|
-
/* @__PURE__ */
|
7702
|
-
/* @__PURE__ */
|
7811
|
+
/* @__PURE__ */ jsxs33(Group19, { children: [
|
7812
|
+
/* @__PURE__ */ jsx57(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx57(IconSearch2, {}), radius: "xl", w: "250px" }),
|
7813
|
+
/* @__PURE__ */ jsx57(MySwitchTheme, {})
|
7703
7814
|
] }),
|
7704
|
-
/* @__PURE__ */
|
7815
|
+
/* @__PURE__ */ jsx57(Burger, { opened: drawerOpened, onClick: toggleDrawer, hiddenFrom: "sm" })
|
7705
7816
|
] }) }),
|
7706
|
-
/* @__PURE__ */
|
7707
|
-
/* @__PURE__ */
|
7817
|
+
/* @__PURE__ */ jsx57(Container2, { fluid: true, pt: "sm", pb: "md", bg: const_object_colors.mantineBackgroundSecondary, mih: "93vh", children }),
|
7818
|
+
/* @__PURE__ */ jsx57(
|
7708
7819
|
Drawer,
|
7709
7820
|
{
|
7710
7821
|
opened: drawerOpened,
|
@@ -7714,10 +7825,10 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7714
7825
|
title: "Navigation",
|
7715
7826
|
hiddenFrom: "sm",
|
7716
7827
|
zIndex: 1e6,
|
7717
|
-
children: /* @__PURE__ */
|
7718
|
-
/* @__PURE__ */
|
7719
|
-
/* @__PURE__ */
|
7720
|
-
/* @__PURE__ */
|
7828
|
+
children: /* @__PURE__ */ jsxs33(ScrollArea5, { h: "calc(100vh - 80px", mx: "-md", children: [
|
7829
|
+
/* @__PURE__ */ jsx57(Divider4, { my: "sm" }),
|
7830
|
+
/* @__PURE__ */ jsx57(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx57(Button17, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
|
7831
|
+
/* @__PURE__ */ jsx57(Divider4, { my: "sm" })
|
7721
7832
|
] })
|
7722
7833
|
}
|
7723
7834
|
)
|
@@ -7726,7 +7837,7 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7726
7837
|
|
7727
7838
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
7728
7839
|
import { Badge as Badge5, Breadcrumbs, Code, Container as Container3, Divider as Divider5, Group as Group20, Text as Text18, Title } from "@mantine/core";
|
7729
|
-
import { jsx as
|
7840
|
+
import { jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
|
7730
7841
|
var getStatusColor = (status) => {
|
7731
7842
|
switch (status) {
|
7732
7843
|
case "Prototype":
|
@@ -7737,10 +7848,10 @@ var getStatusColor = (status) => {
|
|
7737
7848
|
};
|
7738
7849
|
function PageTitle({ title, status, note }) {
|
7739
7850
|
const color = getStatusColor(status);
|
7740
|
-
return /* @__PURE__ */
|
7741
|
-
/* @__PURE__ */
|
7742
|
-
/* @__PURE__ */
|
7743
|
-
status && /* @__PURE__ */
|
7851
|
+
return /* @__PURE__ */ jsx58(Group20, { children: /* @__PURE__ */ jsxs34(MyFlexColumn, { gap: 0, children: [
|
7852
|
+
/* @__PURE__ */ jsxs34(Group20, { align: "center", children: [
|
7853
|
+
/* @__PURE__ */ jsx58(Title, { order: 3, children: title }),
|
7854
|
+
status && /* @__PURE__ */ jsx58(
|
7744
7855
|
Badge5,
|
7745
7856
|
{
|
7746
7857
|
variant: "gradient",
|
@@ -7751,7 +7862,7 @@ function PageTitle({ title, status, note }) {
|
|
7751
7862
|
}
|
7752
7863
|
)
|
7753
7864
|
] }),
|
7754
|
-
/* @__PURE__ */
|
7865
|
+
/* @__PURE__ */ jsx58(Text18, { size: "lg", c: "dimmed", fs: "italic", children: note })
|
7755
7866
|
] }) });
|
7756
7867
|
}
|
7757
7868
|
function MyPageContent({
|
@@ -7764,11 +7875,11 @@ function MyPageContent({
|
|
7764
7875
|
var _a;
|
7765
7876
|
const basicAppShellStore = useS_BasicAppShell();
|
7766
7877
|
const finalTitle = title || basicAppShellStore.state.title;
|
7767
|
-
return /* @__PURE__ */
|
7768
|
-
/* @__PURE__ */
|
7769
|
-
/* @__PURE__ */
|
7770
|
-
/* @__PURE__ */
|
7771
|
-
/* @__PURE__ */
|
7878
|
+
return /* @__PURE__ */ jsxs34(Container3, { p: 0, fluid: true, children: [
|
7879
|
+
/* @__PURE__ */ jsxs34(Group20, { justify: "space-between", children: [
|
7880
|
+
/* @__PURE__ */ jsxs34(Group20, { children: [
|
7881
|
+
/* @__PURE__ */ jsx58(MyButtonRouterBack, {}),
|
7882
|
+
/* @__PURE__ */ jsx58(
|
7772
7883
|
PageTitle,
|
7773
7884
|
{
|
7774
7885
|
title: finalTitle,
|
@@ -7778,64 +7889,64 @@ function MyPageContent({
|
|
7778
7889
|
),
|
7779
7890
|
leftTopBar
|
7780
7891
|
] }),
|
7781
|
-
/* @__PURE__ */
|
7892
|
+
/* @__PURE__ */ jsxs34(Group20, { p: "md", children: [
|
7782
7893
|
rightTopBar,
|
7783
|
-
/* @__PURE__ */
|
7894
|
+
/* @__PURE__ */ jsx58(Breadcrumbs, { separatorMargin: "7", children: (_a = basicAppShellStore.state.breadcrumb) == null ? void 0 : _a.map((item, idx) => /* @__PURE__ */ jsx58(Text18, { fw: "600", c: "blue", children: item }, idx)) })
|
7784
7895
|
] })
|
7785
7896
|
] }),
|
7786
|
-
/* @__PURE__ */
|
7897
|
+
/* @__PURE__ */ jsx58(Divider5, { my: "xs" }),
|
7787
7898
|
children,
|
7788
|
-
/* @__PURE__ */
|
7789
|
-
/* @__PURE__ */
|
7899
|
+
/* @__PURE__ */ jsx58(Divider5, { my: "xs" }),
|
7900
|
+
/* @__PURE__ */ jsx58(MyFlexEnd, { children: /* @__PURE__ */ jsx58(Code, { color: "var(--mantine-color-blue-light)", children: basicAppShellStore.state.menuCode }) })
|
7790
7901
|
] });
|
7791
7902
|
}
|
7792
7903
|
|
7793
7904
|
// src/components/Layouts/Tab/MyTab.tsx
|
7794
7905
|
import { rem, Space as Space3, Tabs } from "@mantine/core";
|
7795
|
-
import { jsx as
|
7906
|
+
import { jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
|
7796
7907
|
function MyTab(_a) {
|
7797
7908
|
var _b = _a, { tabList, children } = _b, rest = __objRest(_b, ["tabList", "children"]);
|
7798
7909
|
const iconStyle = { width: rem(20), height: rem(20) };
|
7799
|
-
return /* @__PURE__ */
|
7800
|
-
/* @__PURE__ */
|
7801
|
-
return /* @__PURE__ */
|
7910
|
+
return /* @__PURE__ */ jsxs35(Tabs, __spreadProps(__spreadValues({ defaultValue: tabList[0].label }, rest), { children: [
|
7911
|
+
/* @__PURE__ */ jsx59(Tabs.List, { children: tabList.map((item, idx) => {
|
7912
|
+
return /* @__PURE__ */ jsx59(Tabs.Tab, { value: item.label, leftSection: item.icon && /* @__PURE__ */ jsx59(item.icon, { style: iconStyle }), children: item.label }, idx);
|
7802
7913
|
}) }),
|
7803
|
-
/* @__PURE__ */
|
7914
|
+
/* @__PURE__ */ jsx59(Space3, { my: "md" }),
|
7804
7915
|
children
|
7805
7916
|
] }));
|
7806
7917
|
}
|
7807
7918
|
|
7808
7919
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
7809
|
-
import { ActionIcon as
|
7810
|
-
import { useDisclosure as
|
7920
|
+
import { ActionIcon as ActionIcon13, Button as Button18, Fieldset as Fieldset5, Group as Group21, Modal as Modal12 } from "@mantine/core";
|
7921
|
+
import { useDisclosure as useDisclosure13 } from "@mantine/hooks";
|
7811
7922
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
7812
|
-
import { jsx as
|
7923
|
+
import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
|
7813
7924
|
function MyDataTableSelect(_a) {
|
7814
7925
|
var _b = _a, { modalSize, renderTopToolbarCustomActions, data, selectButtonlabel, listState, columns, listLabel } = _b, rest = __objRest(_b, ["modalSize", "renderTopToolbarCustomActions", "data", "selectButtonlabel", "listState", "columns", "listLabel"]);
|
7815
|
-
const disc =
|
7926
|
+
const disc = useDisclosure13(false);
|
7816
7927
|
if (data == void 0) return "\u0110ang t\u1EA3i...";
|
7817
|
-
return /* @__PURE__ */
|
7818
|
-
/* @__PURE__ */
|
7928
|
+
return /* @__PURE__ */ jsxs36(Fieldset5, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: [
|
7929
|
+
/* @__PURE__ */ jsx60(
|
7819
7930
|
MyDataTable,
|
7820
7931
|
__spreadValues({
|
7821
7932
|
renderTopToolbarCustomActions: ({ table }) => {
|
7822
|
-
return /* @__PURE__ */
|
7933
|
+
return /* @__PURE__ */ jsxs36(Group21, { children: [
|
7823
7934
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
7824
|
-
/* @__PURE__ */
|
7935
|
+
/* @__PURE__ */ jsx60(Button18, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
7825
7936
|
] });
|
7826
7937
|
},
|
7827
7938
|
columns,
|
7828
7939
|
data: listState[0],
|
7829
7940
|
renderRowActions: ({ row }) => {
|
7830
|
-
return /* @__PURE__ */
|
7941
|
+
return /* @__PURE__ */ jsx60(MyCenterFull, { children: /* @__PURE__ */ jsx60(ActionIcon13, { color: "red", onClick: () => listState[1].remove(row.index), children: /* @__PURE__ */ jsx60(IconX2, {}) }) });
|
7831
7942
|
}
|
7832
7943
|
}, rest)
|
7833
7944
|
),
|
7834
|
-
/* @__PURE__ */
|
7945
|
+
/* @__PURE__ */ jsx60(Modal12, { opened: disc[0], onClose: disc[1].close, size: modalSize || "80%", children: /* @__PURE__ */ jsx60(
|
7835
7946
|
MyDataTable,
|
7836
7947
|
__spreadValues({
|
7837
7948
|
renderTopToolbarCustomActions: ({ table }) => {
|
7838
|
-
return /* @__PURE__ */
|
7949
|
+
return /* @__PURE__ */ jsx60(Button18, { onClick: () => {
|
7839
7950
|
table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
|
7840
7951
|
disc[1].close();
|
7841
7952
|
}, children: "Ch\u1ECDn" });
|
@@ -7851,7 +7962,7 @@ function MyDataTableSelect(_a) {
|
|
7851
7962
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
7852
7963
|
import { Select as Select3 } from "@mantine/core";
|
7853
7964
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
7854
|
-
import { jsx as
|
7965
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
7855
7966
|
function MySelectAPIGet(_a) {
|
7856
7967
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
7857
7968
|
var _a2;
|
@@ -7870,7 +7981,7 @@ function MySelectAPIGet(_a) {
|
|
7870
7981
|
label: `${item.code}-${item.name}`
|
7871
7982
|
};
|
7872
7983
|
});
|
7873
|
-
return /* @__PURE__ */
|
7984
|
+
return /* @__PURE__ */ jsx61(
|
7874
7985
|
Select3,
|
7875
7986
|
__spreadValues({
|
7876
7987
|
label,
|
@@ -7885,7 +7996,7 @@ import { useNextCalendarApp as useNextCalendarApp2, ScheduleXCalendar as Schedul
|
|
7885
7996
|
import { createEventsServicePlugin as createEventsServicePlugin2 } from "@schedule-x/events-service";
|
7886
7997
|
import { useState as useState12 } from "react";
|
7887
7998
|
import { createEventModalPlugin as createEventModalPlugin2 } from "@schedule-x/event-modal";
|
7888
|
-
import { jsx as
|
7999
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
7889
8000
|
function MyScheduleX({
|
7890
8001
|
values,
|
7891
8002
|
timeGridEvent,
|
@@ -7910,7 +8021,7 @@ function MyScheduleX({
|
|
7910
8021
|
events: values,
|
7911
8022
|
plugins: [eventsService, eventModalPlugin]
|
7912
8023
|
});
|
7913
|
-
return /* @__PURE__ */
|
8024
|
+
return /* @__PURE__ */ jsx62(
|
7914
8025
|
ScheduleXCalendar2,
|
7915
8026
|
{
|
7916
8027
|
calendarApp: calendar,
|
@@ -7924,9 +8035,9 @@ function MyScheduleX({
|
|
7924
8035
|
|
7925
8036
|
// src/components/Skeletons/SkeletonTable/MySkeletonTable.tsx
|
7926
8037
|
import { Skeleton } from "@mantine/core";
|
7927
|
-
import { jsx as
|
8038
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
7928
8039
|
function MySkeletonTable({ h: h4 = 500 }) {
|
7929
|
-
return /* @__PURE__ */
|
8040
|
+
return /* @__PURE__ */ jsx63(Skeleton, { h: h4 });
|
7930
8041
|
}
|
7931
8042
|
|
7932
8043
|
export {
|
@@ -7952,6 +8063,7 @@ export {
|
|
7952
8063
|
AQButtonCreateByImportFile,
|
7953
8064
|
AQButtonExportData,
|
7954
8065
|
MyButtonCreate,
|
8066
|
+
MyButtonCreateUpdate,
|
7955
8067
|
MyButtonDeleteList,
|
7956
8068
|
MySelect,
|
7957
8069
|
MyFlexEnd,
|