aq-fe-framework 0.1.232 → 0.1.234
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.
@@ -1048,28 +1048,114 @@ function MyButtonCreate(_a) {
|
|
1048
1048
|
] }) }) }));
|
1049
1049
|
}
|
1050
1050
|
|
1051
|
+
// src/components/Buttons/ButtonCRUD/MyButtonDeleteList.tsx
|
1052
|
+
import { Group as Group5, Highlight as Highlight2 } from "@mantine/core";
|
1053
|
+
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1054
|
+
import { useMutation as useMutation5, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1055
|
+
import { useState as useState7 } from "react";
|
1056
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
1057
|
+
function MyButtonDeleteList(_a) {
|
1058
|
+
var _b = _a, {
|
1059
|
+
onSubmit,
|
1060
|
+
onSuccess,
|
1061
|
+
onError,
|
1062
|
+
contextData
|
1063
|
+
} = _b, rest = __objRest(_b, [
|
1064
|
+
"onSubmit",
|
1065
|
+
"onSuccess",
|
1066
|
+
"onError",
|
1067
|
+
"contextData"
|
1068
|
+
]);
|
1069
|
+
const queryClient = useQueryClient5();
|
1070
|
+
const disc = useDisclosure8();
|
1071
|
+
const loadingState = useState7();
|
1072
|
+
const mutation = useMutation5({
|
1073
|
+
mutationFn: async () => await onSubmit(),
|
1074
|
+
onSuccess: () => {
|
1075
|
+
if (onSuccess) {
|
1076
|
+
onSuccess();
|
1077
|
+
return;
|
1078
|
+
}
|
1079
|
+
loadingState[1](false);
|
1080
|
+
queryClient.invalidateQueries();
|
1081
|
+
utils_notification_show({ crudType: "delete" });
|
1082
|
+
disc[1].close();
|
1083
|
+
},
|
1084
|
+
onError: () => {
|
1085
|
+
if (onError) {
|
1086
|
+
onError();
|
1087
|
+
return;
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
});
|
1091
|
+
function handleCLick() {
|
1092
|
+
loadingState[1](true);
|
1093
|
+
mutation.mutate();
|
1094
|
+
}
|
1095
|
+
return /* @__PURE__ */ jsxs12(
|
1096
|
+
MyButtonModal,
|
1097
|
+
__spreadProps(__spreadValues({
|
1098
|
+
disclosure: disc,
|
1099
|
+
crudType: "delete"
|
1100
|
+
}, rest), {
|
1101
|
+
children: [
|
1102
|
+
/* @__PURE__ */ jsx22(
|
1103
|
+
Highlight2,
|
1104
|
+
{
|
1105
|
+
highlight: contextData || [],
|
1106
|
+
color: "red.6",
|
1107
|
+
highlightStyles: {
|
1108
|
+
fontWeight: 700,
|
1109
|
+
WebkitBackgroundClip: "text",
|
1110
|
+
WebkitTextFillColor: "transparent"
|
1111
|
+
},
|
1112
|
+
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?`
|
1113
|
+
}
|
1114
|
+
),
|
1115
|
+
/* @__PURE__ */ jsxs12(Group5, { grow: true, children: [
|
1116
|
+
/* @__PURE__ */ jsx22(
|
1117
|
+
MyButton,
|
1118
|
+
{
|
1119
|
+
crudType: "delete",
|
1120
|
+
onClick: handleCLick,
|
1121
|
+
loading: loadingState[0]
|
1122
|
+
}
|
1123
|
+
),
|
1124
|
+
/* @__PURE__ */ jsx22(
|
1125
|
+
MyButton,
|
1126
|
+
{
|
1127
|
+
crudType: "cancel",
|
1128
|
+
onClick: disc[1].close
|
1129
|
+
}
|
1130
|
+
)
|
1131
|
+
] })
|
1132
|
+
]
|
1133
|
+
})
|
1134
|
+
);
|
1135
|
+
}
|
1136
|
+
|
1051
1137
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1052
1138
|
import { Button as Button8, Modal as Modal8, useModalsStack as useModalsStack3 } from "@mantine/core";
|
1053
1139
|
import { IconFileImport as IconFileImport2 } from "@tabler/icons-react";
|
1054
1140
|
|
1055
1141
|
// src/components/Combobox/Select/MySelect.tsx
|
1056
1142
|
import { Select } from "@mantine/core";
|
1057
|
-
import { jsx as
|
1143
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
1058
1144
|
function MySelect(_a) {
|
1059
1145
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
1060
|
-
return /* @__PURE__ */
|
1146
|
+
return /* @__PURE__ */ jsx23(Select, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
1061
1147
|
}
|
1062
1148
|
|
1063
1149
|
// src/components/Layouts/FlexEnd/MyFlexEnd.tsx
|
1064
|
-
import { Group as
|
1065
|
-
import { jsx as
|
1150
|
+
import { Group as Group6 } from "@mantine/core";
|
1151
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
1066
1152
|
function MyFlexEnd(_a) {
|
1067
1153
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1068
|
-
return /* @__PURE__ */
|
1154
|
+
return /* @__PURE__ */ jsx24(Group6, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1069
1155
|
}
|
1070
1156
|
|
1071
1157
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1072
|
-
import { Button as Button5, Divider, Fieldset, Group as
|
1158
|
+
import { Button as Button5, Divider, Fieldset, Group as Group7, Modal as Modal6, SimpleGrid, Space as Space2, Table } from "@mantine/core";
|
1073
1159
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
1074
1160
|
|
1075
1161
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
@@ -1223,99 +1309,99 @@ function useS_ButtonImport() {
|
|
1223
1309
|
}
|
1224
1310
|
|
1225
1311
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1226
|
-
import { jsx as
|
1312
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
1227
1313
|
function SelectFieldModal({ stack, onImport }) {
|
1228
1314
|
var _a, _b;
|
1229
1315
|
const store = useS_ButtonImport();
|
1230
|
-
return /* @__PURE__ */
|
1231
|
-
/* @__PURE__ */
|
1232
|
-
/* @__PURE__ */
|
1233
|
-
/* @__PURE__ */
|
1234
|
-
/* @__PURE__ */
|
1235
|
-
/* @__PURE__ */
|
1236
|
-
/* @__PURE__ */
|
1316
|
+
return /* @__PURE__ */ jsxs13(Modal6, __spreadProps(__spreadValues({ fullScreen: true }, stack.register("select-field-page")), { title: "Import", children: [
|
1317
|
+
/* @__PURE__ */ jsxs13(SimpleGrid, { cols: { base: 1, lg: 2 }, children: [
|
1318
|
+
/* @__PURE__ */ jsxs13(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin", children: [
|
1319
|
+
/* @__PURE__ */ jsxs13(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1320
|
+
/* @__PURE__ */ jsx25(Table.Thead, { bg: "cyan", children: /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
1321
|
+
/* @__PURE__ */ jsx25(Table.Th, { children: "M\xE3 field" }),
|
1322
|
+
/* @__PURE__ */ jsx25(Table.Th, { children: "T\xEAn field" })
|
1237
1323
|
] }) }),
|
1238
|
-
/* @__PURE__ */
|
1324
|
+
/* @__PURE__ */ jsx25(Table.Tbody, { children: (_a = store.state.fieldConfig) == null ? void 0 : _a.filter((item) => item.isSelected == false || item.isSelected == void 0).map((item, idx) => /* @__PURE__ */ jsxs13(
|
1239
1325
|
Table.Tr,
|
1240
1326
|
{
|
1241
1327
|
style: { cursor: "pointer" },
|
1242
1328
|
children: [
|
1243
|
-
/* @__PURE__ */
|
1244
|
-
/* @__PURE__ */
|
1329
|
+
/* @__PURE__ */ jsx25(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldKey.toString() }),
|
1330
|
+
/* @__PURE__ */ jsx25(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldName })
|
1245
1331
|
]
|
1246
1332
|
},
|
1247
1333
|
idx
|
1248
1334
|
)) })
|
1249
1335
|
] }),
|
1250
|
-
/* @__PURE__ */
|
1251
|
-
/* @__PURE__ */
|
1336
|
+
/* @__PURE__ */ jsx25(Space2, {}),
|
1337
|
+
/* @__PURE__ */ jsx25(Group7, { children: /* @__PURE__ */ jsx25(
|
1252
1338
|
Button5,
|
1253
1339
|
{
|
1254
1340
|
onClick: () => {
|
1255
1341
|
store.changeAllSelected(true);
|
1256
1342
|
},
|
1257
|
-
leftSection: /* @__PURE__ */
|
1343
|
+
leftSection: /* @__PURE__ */ jsx25(IconArrowBigRight, {}),
|
1258
1344
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3"
|
1259
1345
|
}
|
1260
1346
|
) })
|
1261
1347
|
] }),
|
1262
|
-
/* @__PURE__ */
|
1263
|
-
/* @__PURE__ */
|
1264
|
-
/* @__PURE__ */
|
1265
|
-
/* @__PURE__ */
|
1266
|
-
/* @__PURE__ */
|
1267
|
-
/* @__PURE__ */
|
1348
|
+
/* @__PURE__ */ jsxs13(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin \u0111\u01B0\u1EE3c ch\u1ECDn", children: [
|
1349
|
+
/* @__PURE__ */ jsxs13(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1350
|
+
/* @__PURE__ */ jsx25(Table.Thead, { children: /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
1351
|
+
/* @__PURE__ */ jsx25(Table.Th, { children: "M\xE3 field" }),
|
1352
|
+
/* @__PURE__ */ jsx25(Table.Th, { children: "T\xEAn field" }),
|
1353
|
+
/* @__PURE__ */ jsx25(Table.Th, { children: "C\u1ED9t map" })
|
1268
1354
|
] }) }),
|
1269
|
-
/* @__PURE__ */
|
1355
|
+
/* @__PURE__ */ jsx25(Table.Tbody, { children: (_b = store.state.fieldConfig) == null ? void 0 : _b.filter((item) => item.isSelected == true).map((item, idx) => /* @__PURE__ */ jsxs13(
|
1270
1356
|
Table.Tr,
|
1271
1357
|
{
|
1272
1358
|
style: { cursor: "pointer" },
|
1273
1359
|
children: [
|
1274
|
-
/* @__PURE__ */
|
1275
|
-
/* @__PURE__ */
|
1276
|
-
/* @__PURE__ */
|
1360
|
+
/* @__PURE__ */ jsx25(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldKey.toString() }),
|
1361
|
+
/* @__PURE__ */ jsx25(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldName }),
|
1362
|
+
/* @__PURE__ */ jsx25(Table.Td, { children: /* @__PURE__ */ jsx25(MySelect, { data: store.state.title, value: item.fieldToMap, onChange: (e4) => store.setFieldToMap(item.fieldKey.toString(), e4) }) })
|
1277
1363
|
]
|
1278
1364
|
},
|
1279
1365
|
idx
|
1280
1366
|
)) })
|
1281
1367
|
] }),
|
1282
|
-
/* @__PURE__ */
|
1283
|
-
/* @__PURE__ */
|
1368
|
+
/* @__PURE__ */ jsx25(Space2, {}),
|
1369
|
+
/* @__PURE__ */ jsx25(
|
1284
1370
|
Button5,
|
1285
1371
|
{
|
1286
1372
|
onClick: () => {
|
1287
1373
|
store.changeAllSelected(false);
|
1288
1374
|
},
|
1289
|
-
leftSection: /* @__PURE__ */
|
1375
|
+
leftSection: /* @__PURE__ */ jsx25(IconArrowBigLeft, {}),
|
1290
1376
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3 v\u1EC1"
|
1291
1377
|
}
|
1292
1378
|
)
|
1293
1379
|
] })
|
1294
1380
|
] }),
|
1295
|
-
/* @__PURE__ */
|
1296
|
-
/* @__PURE__ */
|
1297
|
-
/* @__PURE__ */
|
1381
|
+
/* @__PURE__ */ jsx25(Divider, {}),
|
1382
|
+
/* @__PURE__ */ jsxs13(MyFlexEnd, { children: [
|
1383
|
+
/* @__PURE__ */ jsx25(
|
1298
1384
|
Button5,
|
1299
1385
|
{
|
1300
|
-
leftSection: /* @__PURE__ */
|
1386
|
+
leftSection: /* @__PURE__ */ jsx25(IconArrowBackUp, {}),
|
1301
1387
|
onClick: () => stack.close("select-field-page"),
|
1302
1388
|
color: "gray.7",
|
1303
1389
|
children: "Quay l\u1EA1i"
|
1304
1390
|
}
|
1305
1391
|
),
|
1306
|
-
/* @__PURE__ */
|
1392
|
+
/* @__PURE__ */ jsx25(
|
1307
1393
|
Button5,
|
1308
1394
|
{
|
1309
1395
|
color: "blue.8",
|
1310
|
-
leftSection: /* @__PURE__ */
|
1396
|
+
leftSection: /* @__PURE__ */ jsx25(IconArrowBigRight, {}),
|
1311
1397
|
onClick: onImport,
|
1312
1398
|
children: "Ti\u1EBFp t\u1EE5c / Import"
|
1313
1399
|
}
|
1314
1400
|
),
|
1315
|
-
/* @__PURE__ */
|
1401
|
+
/* @__PURE__ */ jsx25(
|
1316
1402
|
Button5,
|
1317
1403
|
{
|
1318
|
-
leftSection: /* @__PURE__ */
|
1404
|
+
leftSection: /* @__PURE__ */ jsx25(IconSquareRoundedX, {}),
|
1319
1405
|
onClick: () => stack.closeAll(),
|
1320
1406
|
color: "red.6",
|
1321
1407
|
children: "\u0110\xF3ng"
|
@@ -1326,7 +1412,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1326
1412
|
}
|
1327
1413
|
|
1328
1414
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1329
|
-
import { Button as Button6, Group as
|
1415
|
+
import { Button as Button6, Group as Group8, Portal } from "@mantine/core";
|
1330
1416
|
import { IconDownload as IconDownload3 } from "@tabler/icons-react";
|
1331
1417
|
import { download, generateCsv, mkConfig } from "export-to-csv";
|
1332
1418
|
import {
|
@@ -1335,7 +1421,7 @@ import {
|
|
1335
1421
|
} from "mantine-react-table";
|
1336
1422
|
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
1337
1423
|
import { useEffect as useEffect5 } from "react";
|
1338
|
-
import { Fragment as Fragment7, jsx as
|
1424
|
+
import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
1339
1425
|
function formatData(data, formats) {
|
1340
1426
|
return data.map((row) => {
|
1341
1427
|
const transformedRow = {};
|
@@ -1376,14 +1462,14 @@ function MyDataTable(_a) {
|
|
1376
1462
|
columns,
|
1377
1463
|
data,
|
1378
1464
|
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1379
|
-
return /* @__PURE__ */
|
1465
|
+
return /* @__PURE__ */ jsxs14(Group8, { children: [
|
1380
1466
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
1381
|
-
exportAble && /* @__PURE__ */
|
1467
|
+
exportAble && /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(
|
1382
1468
|
Button6,
|
1383
1469
|
{
|
1384
1470
|
color: "green.8",
|
1385
1471
|
onClick: () => handleExport(table2.getSelectedRowModel().rows),
|
1386
|
-
leftSection: /* @__PURE__ */
|
1472
|
+
leftSection: /* @__PURE__ */ jsx26(IconDownload3, {}),
|
1387
1473
|
variant: "filled",
|
1388
1474
|
children: "Export"
|
1389
1475
|
}
|
@@ -1435,24 +1521,24 @@ function MyDataTable(_a) {
|
|
1435
1521
|
setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
|
1436
1522
|
}, [table.getState().rowSelection]);
|
1437
1523
|
if (data == void 0) return;
|
1438
|
-
return /* @__PURE__ */
|
1524
|
+
return /* @__PURE__ */ jsx26("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx26(Portal, { children: /* @__PURE__ */ jsx26(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx26(MantineReactTable, { table }) });
|
1439
1525
|
}
|
1440
1526
|
|
1441
1527
|
// src/components/Buttons/ButtonImport/SelectFileModal.tsx
|
1442
1528
|
import { Button as Button7, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal7, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
|
1443
1529
|
import { IconArrowBigRight as IconArrowBigRight2, IconSquareRoundedX as IconSquareRoundedX2 } from "@tabler/icons-react";
|
1444
|
-
import { jsx as
|
1530
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
1445
1531
|
function SelectFileModal({ onExportStructure, stack }) {
|
1446
1532
|
var _a;
|
1447
1533
|
const store = useS_ButtonImport();
|
1448
|
-
return /* @__PURE__ */
|
1534
|
+
return /* @__PURE__ */ jsxs15(
|
1449
1535
|
Modal7,
|
1450
1536
|
__spreadProps(__spreadValues({
|
1451
1537
|
title: "Import",
|
1452
1538
|
fullScreen: true
|
1453
1539
|
}, stack.register("select-file-page")), {
|
1454
1540
|
children: [
|
1455
|
-
/* @__PURE__ */
|
1541
|
+
/* @__PURE__ */ jsx27(
|
1456
1542
|
FileInput2,
|
1457
1543
|
{
|
1458
1544
|
value: store.state.file,
|
@@ -1462,8 +1548,8 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1462
1548
|
clearable: true
|
1463
1549
|
}
|
1464
1550
|
),
|
1465
|
-
/* @__PURE__ */
|
1466
|
-
/* @__PURE__ */
|
1551
|
+
/* @__PURE__ */ jsxs15(SimpleGrid2, { cols: { base: 1, md: 2, lg: 2, xl: 4 }, children: [
|
1552
|
+
/* @__PURE__ */ jsx27(
|
1467
1553
|
NumberInput,
|
1468
1554
|
{
|
1469
1555
|
label: "D\xF2ng ti\xEAu \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1471,7 +1557,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1471
1557
|
onChange: (e4) => store.setProperty("startTitleIndex", e4)
|
1472
1558
|
}
|
1473
1559
|
),
|
1474
|
-
/* @__PURE__ */
|
1560
|
+
/* @__PURE__ */ jsx27(
|
1475
1561
|
NumberInput,
|
1476
1562
|
{
|
1477
1563
|
label: "D\xF2ng d\u1EEF li\u1EC7u b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1479,7 +1565,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1479
1565
|
onChange: (e4) => store.setProperty("startDataIndex", e4)
|
1480
1566
|
}
|
1481
1567
|
),
|
1482
|
-
/* @__PURE__ */
|
1568
|
+
/* @__PURE__ */ jsx27(
|
1483
1569
|
Select2,
|
1484
1570
|
{
|
1485
1571
|
readOnly: true,
|
@@ -1488,7 +1574,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1488
1574
|
defaultValue: "100.000"
|
1489
1575
|
}
|
1490
1576
|
),
|
1491
|
-
/* @__PURE__ */
|
1577
|
+
/* @__PURE__ */ jsx27(
|
1492
1578
|
Select2,
|
1493
1579
|
{
|
1494
1580
|
readOnly: true,
|
@@ -1498,15 +1584,15 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1498
1584
|
}
|
1499
1585
|
)
|
1500
1586
|
] }),
|
1501
|
-
/* @__PURE__ */
|
1587
|
+
/* @__PURE__ */ jsx27(Fieldset2, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin trong file d\u1EEF li\u1EC7u", children: store.state.data && /* @__PURE__ */ jsx27(
|
1502
1588
|
MyDataTable,
|
1503
1589
|
{
|
1504
1590
|
columns: store.columns,
|
1505
1591
|
data: store.state.data
|
1506
1592
|
}
|
1507
1593
|
) }),
|
1508
|
-
/* @__PURE__ */
|
1509
|
-
/* @__PURE__ */
|
1594
|
+
/* @__PURE__ */ jsxs15(MyFlexEnd, { children: [
|
1595
|
+
/* @__PURE__ */ jsx27(
|
1510
1596
|
Button7,
|
1511
1597
|
{
|
1512
1598
|
color: "teal.8",
|
@@ -1514,21 +1600,21 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1514
1600
|
children: "Xu\u1EA5t file c\u1EA5u tr\xFAc"
|
1515
1601
|
}
|
1516
1602
|
),
|
1517
|
-
/* @__PURE__ */
|
1603
|
+
/* @__PURE__ */ jsx27(
|
1518
1604
|
Button7,
|
1519
1605
|
{
|
1520
1606
|
disabled: ((_a = store.state.data) == null ? void 0 : _a.length) == 0,
|
1521
1607
|
color: "blue.8",
|
1522
|
-
leftSection: /* @__PURE__ */
|
1608
|
+
leftSection: /* @__PURE__ */ jsx27(IconArrowBigRight2, {}),
|
1523
1609
|
onClick: () => stack.open("select-field-page"),
|
1524
1610
|
children: "Ti\u1EBFp t\u1EE5c"
|
1525
1611
|
}
|
1526
1612
|
),
|
1527
|
-
/* @__PURE__ */
|
1613
|
+
/* @__PURE__ */ jsx27(
|
1528
1614
|
Button7,
|
1529
1615
|
{
|
1530
1616
|
color: "red.6",
|
1531
|
-
leftSection: /* @__PURE__ */
|
1617
|
+
leftSection: /* @__PURE__ */ jsx27(IconSquareRoundedX2, {}),
|
1532
1618
|
onClick: stack.closeAll,
|
1533
1619
|
children: "\u0110\xF3ng"
|
1534
1620
|
}
|
@@ -1540,26 +1626,26 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1540
1626
|
}
|
1541
1627
|
|
1542
1628
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1543
|
-
import { Fragment as Fragment8, jsx as
|
1629
|
+
import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
1544
1630
|
function MyButtonImport({
|
1545
1631
|
onExportStructure,
|
1546
1632
|
onImport
|
1547
1633
|
}) {
|
1548
1634
|
const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
|
1549
1635
|
const store = useS_ButtonImport();
|
1550
|
-
return /* @__PURE__ */
|
1551
|
-
/* @__PURE__ */
|
1552
|
-
/* @__PURE__ */
|
1553
|
-
/* @__PURE__ */
|
1554
|
-
/* @__PURE__ */
|
1636
|
+
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
1637
|
+
/* @__PURE__ */ jsx28(Button8, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx28(IconFileImport2, {}), title: "Import", children: "Import" }),
|
1638
|
+
/* @__PURE__ */ jsxs16(Modal8.Stack, { children: [
|
1639
|
+
/* @__PURE__ */ jsx28(SelectFileModal, { stack, onExportStructure }),
|
1640
|
+
/* @__PURE__ */ jsx28(SelectFieldModal, { stack, onImport: () => onImport(store.getDataFinal()) })
|
1555
1641
|
] })
|
1556
1642
|
] });
|
1557
1643
|
}
|
1558
1644
|
|
1559
1645
|
// src/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx
|
1560
1646
|
import { Button as Button9, Fieldset as Fieldset3, Modal as Modal9 } from "@mantine/core";
|
1561
|
-
import { useDisclosure as
|
1562
|
-
import { Fragment as Fragment9, jsx as
|
1647
|
+
import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
|
1648
|
+
import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
1563
1649
|
function AQSelectTableByOpenModal(_a) {
|
1564
1650
|
var _b = _a, {
|
1565
1651
|
setSelectedData,
|
@@ -1586,9 +1672,9 @@ function AQSelectTableByOpenModal(_a) {
|
|
1586
1672
|
"fullScreen",
|
1587
1673
|
"closeAfterSelect"
|
1588
1674
|
]);
|
1589
|
-
const disclosure =
|
1590
|
-
return /* @__PURE__ */
|
1591
|
-
/* @__PURE__ */
|
1675
|
+
const disclosure = useDisclosure9(false);
|
1676
|
+
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
1677
|
+
/* @__PURE__ */ jsx29(
|
1592
1678
|
Button9,
|
1593
1679
|
__spreadProps(__spreadValues({
|
1594
1680
|
onClick: disclosure[1].open
|
@@ -1596,7 +1682,7 @@ function AQSelectTableByOpenModal(_a) {
|
|
1596
1682
|
children: label ? label : `Ch\u1ECDn t\u1EEB danh s\xE1ch`
|
1597
1683
|
})
|
1598
1684
|
),
|
1599
|
-
/* @__PURE__ */
|
1685
|
+
/* @__PURE__ */ jsx29(
|
1600
1686
|
Modal9,
|
1601
1687
|
{
|
1602
1688
|
fullScreen,
|
@@ -1604,11 +1690,11 @@ function AQSelectTableByOpenModal(_a) {
|
|
1604
1690
|
title,
|
1605
1691
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1606
1692
|
onClose: disclosure[1].close,
|
1607
|
-
children: /* @__PURE__ */
|
1693
|
+
children: /* @__PURE__ */ jsx29(MyFlexColumn, { children: /* @__PURE__ */ jsx29(Fieldset3, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: /* @__PURE__ */ jsx29(
|
1608
1694
|
MyDataTable,
|
1609
1695
|
__spreadValues({
|
1610
1696
|
renderTopToolbarCustomActions: ({ table }) => {
|
1611
|
-
return /* @__PURE__ */
|
1697
|
+
return /* @__PURE__ */ jsx29(Button9, { onClick: () => {
|
1612
1698
|
setSelectedData(table.getSelectedRowModel().rows.map((row) => row.original));
|
1613
1699
|
closeAfterSelect && disclosure[1].close();
|
1614
1700
|
}, children: "Ch\u1ECDn" });
|
@@ -1628,7 +1714,7 @@ import { useRef as useRef2 } from "react";
|
|
1628
1714
|
import { Button as Button10 } from "@mantine/core";
|
1629
1715
|
import { IconPrinter as IconPrinter2 } from "@tabler/icons-react";
|
1630
1716
|
import { useReactToPrint } from "react-to-print";
|
1631
|
-
import { Fragment as Fragment10, jsx as
|
1717
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
1632
1718
|
function MyButtonPrintPDF(_a) {
|
1633
1719
|
var _b = _a, { contentToPrint, children } = _b, rest = __objRest(_b, ["contentToPrint", "children"]);
|
1634
1720
|
const printRef = useRef2(null);
|
@@ -1642,16 +1728,16 @@ function MyButtonPrintPDF(_a) {
|
|
1642
1728
|
if (!contentToPrint) return;
|
1643
1729
|
handlePrint();
|
1644
1730
|
}
|
1645
|
-
return /* @__PURE__ */
|
1646
|
-
/* @__PURE__ */
|
1647
|
-
/* @__PURE__ */
|
1731
|
+
return /* @__PURE__ */ jsxs18(Fragment10, { children: [
|
1732
|
+
/* @__PURE__ */ jsx30("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx30("div", { ref: printRef, children: contentToPrint }) }),
|
1733
|
+
/* @__PURE__ */ jsx30(Button10, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx30(IconPrinter2, {}) }, rest), { children }))
|
1648
1734
|
] });
|
1649
1735
|
}
|
1650
1736
|
|
1651
1737
|
// src/components/Layouts/HtmlWrapper/MyHtmlWrapper.tsx
|
1652
1738
|
import { ScrollArea, TypographyStylesProvider } from "@mantine/core";
|
1653
1739
|
import pako from "pako";
|
1654
|
-
import { jsx as
|
1740
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
1655
1741
|
function MyHtmlWrapper(_a) {
|
1656
1742
|
var _b = _a, { html, mah, zip = false } = _b, rest = __objRest(_b, ["html", "mah", "zip"]);
|
1657
1743
|
const extractHtmlFromZip = () => {
|
@@ -1660,7 +1746,7 @@ function MyHtmlWrapper(_a) {
|
|
1660
1746
|
const cleanedHtml = decompressedData == null ? void 0 : decompressedData.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
1661
1747
|
return cleanedHtml.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
1662
1748
|
};
|
1663
|
-
return /* @__PURE__ */
|
1749
|
+
return /* @__PURE__ */ jsx31(ScrollArea.Autosize, { mah, children: /* @__PURE__ */ jsx31(TypographyStylesProvider, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx31(
|
1664
1750
|
"div",
|
1665
1751
|
{
|
1666
1752
|
dangerouslySetInnerHTML: {
|
@@ -1672,7 +1758,7 @@ function MyHtmlWrapper(_a) {
|
|
1672
1758
|
|
1673
1759
|
// src/components/Buttons/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx
|
1674
1760
|
import { Box, Table as Table2 } from "@mantine/core";
|
1675
|
-
import { jsx as
|
1761
|
+
import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
1676
1762
|
function MyButtonPrintTablePDF(_a) {
|
1677
1763
|
var _b = _a, {
|
1678
1764
|
printConfig,
|
@@ -1698,8 +1784,8 @@ function MyButtonPrintTablePDF(_a) {
|
|
1698
1784
|
};
|
1699
1785
|
const rows = data == null ? void 0 : data.map((item, index) => {
|
1700
1786
|
if (!(printConfig == null ? void 0 : printConfig.fields)) return null;
|
1701
|
-
return /* @__PURE__ */
|
1702
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
1787
|
+
return /* @__PURE__ */ jsxs19(Table2.Tr, { children: [
|
1788
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx32(Table2.Td, { ta: "center", px: "xs", style: { border: "1px solid lightgray" }, children: index + 1 }),
|
1703
1789
|
printConfig.fields.map((field) => {
|
1704
1790
|
let value = item[field.fieldName];
|
1705
1791
|
if (field.formatFunction) {
|
@@ -1709,30 +1795,30 @@ function MyButtonPrintTablePDF(_a) {
|
|
1709
1795
|
}
|
1710
1796
|
const alignment = field.isCenter === false ? "left" : "center";
|
1711
1797
|
if (typeof value === "string" && (value.includes("<") || value.includes("<"))) {
|
1712
|
-
return /* @__PURE__ */
|
1798
|
+
return /* @__PURE__ */ jsx32(
|
1713
1799
|
Table2.Td,
|
1714
1800
|
{
|
1715
1801
|
px: "xs",
|
1716
1802
|
ta: alignment,
|
1717
1803
|
style: { border: "1px solid lightgray" },
|
1718
|
-
children: /* @__PURE__ */
|
1804
|
+
children: /* @__PURE__ */ jsx32(MyHtmlWrapper, { html: value })
|
1719
1805
|
},
|
1720
1806
|
field.fieldName
|
1721
1807
|
);
|
1722
1808
|
}
|
1723
1809
|
if (value === "true" || value === "false") {
|
1724
|
-
return /* @__PURE__ */
|
1810
|
+
return /* @__PURE__ */ jsx32(
|
1725
1811
|
Table2.Td,
|
1726
1812
|
{
|
1727
1813
|
ta: alignment,
|
1728
1814
|
px: "xs",
|
1729
1815
|
style: { border: "1px solid lightgray" },
|
1730
|
-
children: /* @__PURE__ */
|
1816
|
+
children: /* @__PURE__ */ jsx32("input", { type: "checkbox", checked: value === "true", readOnly: true })
|
1731
1817
|
},
|
1732
1818
|
field.fieldName
|
1733
1819
|
);
|
1734
1820
|
}
|
1735
|
-
return /* @__PURE__ */
|
1821
|
+
return /* @__PURE__ */ jsx32(
|
1736
1822
|
Table2.Td,
|
1737
1823
|
{
|
1738
1824
|
ta: alignment,
|
@@ -1756,18 +1842,18 @@ function MyButtonPrintTablePDF(_a) {
|
|
1756
1842
|
minute: "2-digit"
|
1757
1843
|
});
|
1758
1844
|
const tableTitle = (printConfig == null ? void 0 : printConfig.title) || "B\u1EA3ng d\u1EEF li\u1EC7u";
|
1759
|
-
return /* @__PURE__ */
|
1760
|
-
/* @__PURE__ */
|
1845
|
+
return /* @__PURE__ */ jsxs19(Box, { p: "lg", children: [
|
1846
|
+
/* @__PURE__ */ jsxs19("div", { style: { textAlign: "center", marginTop: "10px", fontStyle: "italic", color: "#666" }, children: [
|
1761
1847
|
"Ng\xE0y in: ",
|
1762
1848
|
formattedDate
|
1763
1849
|
] }),
|
1764
|
-
/* @__PURE__ */
|
1765
|
-
/* @__PURE__ */
|
1766
|
-
/* @__PURE__ */
|
1767
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
1850
|
+
/* @__PURE__ */ jsx32("h2", { style: { textAlign: "center", fontSize: "24px", fontWeight: "bold", marginBottom: "20px" }, children: tableTitle }),
|
1851
|
+
/* @__PURE__ */ jsxs19(Table2, { withColumnBorders: true, highlightOnHover: true, style: { border: "1px solid lightgray" }, children: [
|
1852
|
+
/* @__PURE__ */ jsx32(Table2.Thead, { children: /* @__PURE__ */ jsxs19(Table2.Tr, { children: [
|
1853
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx32(Table2.Th, { style: { border: "1px solid lightgray" }, w: "10%", ta: "center", px: "xs", children: "STT" }),
|
1768
1854
|
printConfig.fields.map((field) => {
|
1769
1855
|
const alignment = field.isCenter === false ? "left" : "center";
|
1770
|
-
return /* @__PURE__ */
|
1856
|
+
return /* @__PURE__ */ jsx32(
|
1771
1857
|
Table2.Th,
|
1772
1858
|
{
|
1773
1859
|
style: { border: "1px solid lightgray" },
|
@@ -1779,11 +1865,11 @@ function MyButtonPrintTablePDF(_a) {
|
|
1779
1865
|
);
|
1780
1866
|
})
|
1781
1867
|
] }) }),
|
1782
|
-
/* @__PURE__ */
|
1868
|
+
/* @__PURE__ */ jsx32(Table2.Tbody, { children: rows })
|
1783
1869
|
] })
|
1784
1870
|
] });
|
1785
1871
|
};
|
1786
|
-
return /* @__PURE__ */
|
1872
|
+
return /* @__PURE__ */ jsx32(
|
1787
1873
|
MyButtonPrintPDF,
|
1788
1874
|
__spreadValues({
|
1789
1875
|
contentToPrint: renderContent()
|
@@ -1795,11 +1881,11 @@ function MyButtonPrintTablePDF(_a) {
|
|
1795
1881
|
import { ActionIcon as ActionIcon9 } from "@mantine/core";
|
1796
1882
|
import { IconArrowBack } from "@tabler/icons-react";
|
1797
1883
|
import { useRouter as useRouter2 } from "next/navigation";
|
1798
|
-
import { jsx as
|
1884
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
1799
1885
|
function MyButtonRouterBack(_a) {
|
1800
1886
|
var _b = _a, { url, label } = _b, rest = __objRest(_b, ["url", "label"]);
|
1801
1887
|
const router = useRouter2();
|
1802
|
-
return /* @__PURE__ */
|
1888
|
+
return /* @__PURE__ */ jsx33(
|
1803
1889
|
ActionIcon9,
|
1804
1890
|
__spreadProps(__spreadValues({
|
1805
1891
|
size: "xl",
|
@@ -1812,7 +1898,7 @@ function MyButtonRouterBack(_a) {
|
|
1812
1898
|
router.back();
|
1813
1899
|
}
|
1814
1900
|
}, rest), {
|
1815
|
-
children: /* @__PURE__ */
|
1901
|
+
children: /* @__PURE__ */ jsx33(IconArrowBack, { stroke: 2 })
|
1816
1902
|
})
|
1817
1903
|
);
|
1818
1904
|
}
|
@@ -1821,18 +1907,18 @@ function MyButtonRouterBack(_a) {
|
|
1821
1907
|
import {
|
1822
1908
|
ActionIcon as ActionIcon10,
|
1823
1909
|
Button as Button11,
|
1824
|
-
Group as
|
1910
|
+
Group as Group9,
|
1825
1911
|
LoadingOverlay,
|
1826
1912
|
Modal as Modal10,
|
1827
1913
|
Paper as Paper3,
|
1828
1914
|
Text as Text6,
|
1829
1915
|
Tooltip as Tooltip4
|
1830
1916
|
} from "@mantine/core";
|
1831
|
-
import { useDisclosure as
|
1917
|
+
import { useDisclosure as useDisclosure10 } from "@mantine/hooks";
|
1832
1918
|
import { IconLivePhoto as IconLivePhoto2, IconMaximize as IconMaximize3, IconMinimize as IconMinimize3 } from "@tabler/icons-react";
|
1833
1919
|
import { useQuery } from "@tanstack/react-query";
|
1834
|
-
import { useState as
|
1835
|
-
import { Fragment as Fragment11, jsx as
|
1920
|
+
import { useState as useState8 } from "react";
|
1921
|
+
import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
1836
1922
|
function MyButtonViewPDF({
|
1837
1923
|
id,
|
1838
1924
|
modalSize = "80%",
|
@@ -1842,9 +1928,9 @@ function MyButtonViewPDF({
|
|
1842
1928
|
filePath
|
1843
1929
|
}) {
|
1844
1930
|
var _a, _b, _c;
|
1845
|
-
const disc =
|
1846
|
-
const fullScreen =
|
1847
|
-
const hSize =
|
1931
|
+
const disc = useDisclosure10(false);
|
1932
|
+
const fullScreen = useState8(false);
|
1933
|
+
const hSize = useState8("80vh");
|
1848
1934
|
const query = useQuery({
|
1849
1935
|
queryKey: ["MyButtonViewPDF", id, filePath],
|
1850
1936
|
queryFn: async () => {
|
@@ -1857,57 +1943,57 @@ function MyButtonViewPDF({
|
|
1857
1943
|
},
|
1858
1944
|
enabled: disc[0] == true
|
1859
1945
|
});
|
1860
|
-
return /* @__PURE__ */
|
1861
|
-
/* @__PURE__ */
|
1946
|
+
return /* @__PURE__ */ jsxs20(Fragment11, { children: [
|
1947
|
+
/* @__PURE__ */ jsx34(Tooltip4, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx34(
|
1862
1948
|
ActionIcon10,
|
1863
1949
|
{
|
1864
1950
|
onClick: () => {
|
1865
1951
|
disc[1].open();
|
1866
1952
|
},
|
1867
|
-
children: /* @__PURE__ */
|
1953
|
+
children: /* @__PURE__ */ jsx34(IconLivePhoto2, {})
|
1868
1954
|
}
|
1869
|
-
) : /* @__PURE__ */
|
1955
|
+
) : /* @__PURE__ */ jsx34(
|
1870
1956
|
Button11,
|
1871
1957
|
{
|
1872
1958
|
color: "cyan",
|
1873
1959
|
onClick: () => {
|
1874
1960
|
disc[1].open();
|
1875
1961
|
},
|
1876
|
-
leftSection: /* @__PURE__ */
|
1962
|
+
leftSection: /* @__PURE__ */ jsx34(IconLivePhoto2, {}),
|
1877
1963
|
children: label
|
1878
1964
|
}
|
1879
1965
|
) }),
|
1880
|
-
/* @__PURE__ */
|
1966
|
+
/* @__PURE__ */ jsx34(
|
1881
1967
|
Modal10,
|
1882
1968
|
{
|
1883
1969
|
fullScreen: fullScreen[0],
|
1884
1970
|
opened: disc[0],
|
1885
1971
|
onClose: disc[1].close,
|
1886
1972
|
size: modalSize,
|
1887
|
-
title: /* @__PURE__ */
|
1888
|
-
/* @__PURE__ */
|
1889
|
-
fullScreen[0] ? /* @__PURE__ */
|
1973
|
+
title: /* @__PURE__ */ jsxs20(Group9, { children: [
|
1974
|
+
/* @__PURE__ */ jsx34(Text6, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
1975
|
+
fullScreen[0] ? /* @__PURE__ */ jsx34(
|
1890
1976
|
ActionIcon10,
|
1891
1977
|
{
|
1892
1978
|
onClick: () => {
|
1893
1979
|
fullScreen[1](false);
|
1894
1980
|
hSize[1]("80vh");
|
1895
1981
|
},
|
1896
|
-
children: /* @__PURE__ */
|
1982
|
+
children: /* @__PURE__ */ jsx34(IconMinimize3, {})
|
1897
1983
|
}
|
1898
|
-
) : /* @__PURE__ */
|
1984
|
+
) : /* @__PURE__ */ jsx34(
|
1899
1985
|
ActionIcon10,
|
1900
1986
|
{
|
1901
1987
|
onClick: () => {
|
1902
1988
|
fullScreen[1](true);
|
1903
1989
|
hSize[1]("90vh");
|
1904
1990
|
},
|
1905
|
-
children: /* @__PURE__ */
|
1991
|
+
children: /* @__PURE__ */ jsx34(IconMaximize3, {})
|
1906
1992
|
}
|
1907
1993
|
)
|
1908
1994
|
] }),
|
1909
|
-
children: /* @__PURE__ */
|
1910
|
-
/* @__PURE__ */
|
1995
|
+
children: /* @__PURE__ */ jsxs20(Paper3, { h: hSize[0], p: "lg", pos: "relative", children: [
|
1996
|
+
/* @__PURE__ */ jsx34(
|
1911
1997
|
LoadingOverlay,
|
1912
1998
|
{
|
1913
1999
|
visible: query.isLoading,
|
@@ -1915,14 +2001,14 @@ function MyButtonViewPDF({
|
|
1915
2001
|
overlayProps: { radius: "sm", blur: 2 }
|
1916
2002
|
}
|
1917
2003
|
),
|
1918
|
-
query.data ? /* @__PURE__ */
|
2004
|
+
query.data ? /* @__PURE__ */ jsx34(
|
1919
2005
|
"iframe",
|
1920
2006
|
{
|
1921
2007
|
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}`,
|
1922
2008
|
width: "100%",
|
1923
2009
|
height: "100%"
|
1924
2010
|
}
|
1925
|
-
) : /* @__PURE__ */
|
2011
|
+
) : /* @__PURE__ */ jsx34("iframe", { src, width: "100%", height: "100%" })
|
1926
2012
|
] })
|
1927
2013
|
}
|
1928
2014
|
)
|
@@ -6225,7 +6311,7 @@ import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
|
6225
6311
|
import { Paper as Paper4, Text as Text7 } from "@mantine/core";
|
6226
6312
|
import "@schedule-x/theme-default/dist/index.css";
|
6227
6313
|
import { useEffect as useEffect6 } from "react";
|
6228
|
-
import { jsx as
|
6314
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
6229
6315
|
function MyCalendar() {
|
6230
6316
|
const plugins = [createEventsServicePlugin(), createEventModalPlugin()];
|
6231
6317
|
const calendar = useNextCalendarApp({
|
@@ -6299,16 +6385,16 @@ function MyCalendar() {
|
|
6299
6385
|
useEffect6(() => {
|
6300
6386
|
calendar == null ? void 0 : calendar.events.getAll();
|
6301
6387
|
}, []);
|
6302
|
-
return /* @__PURE__ */
|
6388
|
+
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ScheduleXCalendar, { calendarApp: calendar, customComponents: {
|
6303
6389
|
timeGridEvent: ({ calendarEvent }) => {
|
6304
6390
|
console.log(calendarEvent);
|
6305
|
-
return /* @__PURE__ */
|
6306
|
-
/* @__PURE__ */
|
6391
|
+
return /* @__PURE__ */ jsx35(Paper4, { h: "100%", bg: calendarEvent.laLichThi ? "violet.2" : "blue.2", p: 4, children: /* @__PURE__ */ jsxs21(MyFlexColumn, { gap: 1, children: [
|
6392
|
+
/* @__PURE__ */ jsxs21(Text7, { size: "sm", fw: "bold", children: [
|
6307
6393
|
calendarEvent.laLichThi ? "(Thi) " : "(H\u1ECDc) ",
|
6308
6394
|
calendarEvent.title
|
6309
6395
|
] }),
|
6310
|
-
calendarEvent.laLichThi == false && /* @__PURE__ */
|
6311
|
-
/* @__PURE__ */
|
6396
|
+
calendarEvent.laLichThi == false && /* @__PURE__ */ jsx35(Text7, { size: "sm", children: calendarEvent.giangvien }),
|
6397
|
+
/* @__PURE__ */ jsx35(Text7, { size: "sm", children: calendarEvent.location })
|
6312
6398
|
] }) });
|
6313
6399
|
}
|
6314
6400
|
// eventModal: ({ calendarEvent }) => {
|
@@ -6322,32 +6408,32 @@ function MyCalendar() {
|
|
6322
6408
|
}
|
6323
6409
|
|
6324
6410
|
// src/components/CenterFull/MyCenterFull.tsx
|
6325
|
-
import { Center as Center2, Group as
|
6326
|
-
import { jsx as
|
6411
|
+
import { Center as Center2, Group as Group10 } from "@mantine/core";
|
6412
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
6327
6413
|
function MyCenterFull({ children }) {
|
6328
|
-
return /* @__PURE__ */
|
6414
|
+
return /* @__PURE__ */ jsx36(Center2, { w: "100%", children: /* @__PURE__ */ jsx36(Group10, { children }) });
|
6329
6415
|
}
|
6330
6416
|
|
6331
6417
|
// src/components/Checkbox/MyCheckbox.tsx
|
6332
6418
|
import { Checkbox as Checkbox2 } from "@mantine/core";
|
6333
|
-
import { jsx as
|
6419
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
6334
6420
|
function MyCheckbox(_a) {
|
6335
6421
|
var rest = __objRest(_a, []);
|
6336
|
-
return /* @__PURE__ */
|
6422
|
+
return /* @__PURE__ */ jsx37(Checkbox2, __spreadValues({}, rest));
|
6337
6423
|
}
|
6338
6424
|
|
6339
6425
|
// src/components/Layouts/FlexRow/MyFlexRow.tsx
|
6340
6426
|
import { Flex as Flex2 } from "@mantine/core";
|
6341
|
-
import { jsx as
|
6427
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
6342
6428
|
function MyFlexRow(_a) {
|
6343
6429
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6344
|
-
return /* @__PURE__ */
|
6430
|
+
return /* @__PURE__ */ jsx38(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
|
6345
6431
|
}
|
6346
6432
|
|
6347
6433
|
// src/components/DataDisplay/Card/AQCard.tsx
|
6348
6434
|
import { Badge as Badge2, Card, Center as Center3, Image, Text as Text8 } from "@mantine/core";
|
6349
6435
|
import Link from "next/link";
|
6350
|
-
import { jsx as
|
6436
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
6351
6437
|
function AQCard({
|
6352
6438
|
imgSrc = "https://raw.githubusercontent.com/mantinedev/mantine/master/.demo/images/bg-8.png",
|
6353
6439
|
title,
|
@@ -6357,8 +6443,8 @@ function AQCard({
|
|
6357
6443
|
status,
|
6358
6444
|
href = ""
|
6359
6445
|
}) {
|
6360
|
-
return /* @__PURE__ */
|
6361
|
-
/* @__PURE__ */
|
6446
|
+
return /* @__PURE__ */ jsxs22(Card, { shadow: "sm", padding: "lg", radius: "md", withBorder: true, component: Link, href, children: [
|
6447
|
+
/* @__PURE__ */ jsx39(Card.Section, { children: /* @__PURE__ */ jsx39(Center3, { children: /* @__PURE__ */ jsx39(
|
6362
6448
|
Image,
|
6363
6449
|
{
|
6364
6450
|
src: imgSrc,
|
@@ -6368,19 +6454,19 @@ function AQCard({
|
|
6368
6454
|
alt: "Norway"
|
6369
6455
|
}
|
6370
6456
|
) }) }),
|
6371
|
-
/* @__PURE__ */
|
6372
|
-
/* @__PURE__ */
|
6373
|
-
status && /* @__PURE__ */
|
6457
|
+
/* @__PURE__ */ jsxs22(MyFlexRow, { justify: "space-between", mt: "md", mb: "xs", children: [
|
6458
|
+
/* @__PURE__ */ jsx39(Text8, { fw: 500, children: title }),
|
6459
|
+
status && /* @__PURE__ */ jsx39(Badge2, { color: "violet.5", w: "150px", children: status })
|
6374
6460
|
] }),
|
6375
|
-
/* @__PURE__ */
|
6461
|
+
/* @__PURE__ */ jsx39(Text8, { size: "sm", c: "dimmed", lineClamp: 2, children: description }),
|
6376
6462
|
children
|
6377
6463
|
] });
|
6378
6464
|
}
|
6379
6465
|
|
6380
6466
|
// src/components/DataDisplay/CardInformation/MyCardInformation.tsx
|
6381
|
-
import { Box as Box2, Flex as Flex3, Group as
|
6467
|
+
import { Box as Box2, Flex as Flex3, Group as Group11, Paper as Paper5, Text as Text9 } from "@mantine/core";
|
6382
6468
|
import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
|
6383
|
-
import { jsx as
|
6469
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
6384
6470
|
function MyCardInformation({
|
6385
6471
|
title,
|
6386
6472
|
value,
|
@@ -6390,16 +6476,16 @@ function MyCardInformation({
|
|
6390
6476
|
diff = 0,
|
6391
6477
|
extraControl
|
6392
6478
|
}) {
|
6393
|
-
return /* @__PURE__ */
|
6479
|
+
return /* @__PURE__ */ jsxs23(
|
6394
6480
|
Paper5,
|
6395
6481
|
{
|
6396
6482
|
withBorder: true,
|
6397
6483
|
p: "md",
|
6398
6484
|
radius: "md",
|
6399
6485
|
children: [
|
6400
|
-
/* @__PURE__ */
|
6401
|
-
/* @__PURE__ */
|
6402
|
-
/* @__PURE__ */
|
6486
|
+
/* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
|
6487
|
+
/* @__PURE__ */ jsxs23(Flex3, { direction: "column", children: [
|
6488
|
+
/* @__PURE__ */ jsx40(
|
6403
6489
|
Text9,
|
6404
6490
|
{
|
6405
6491
|
tt: "uppercase",
|
@@ -6408,24 +6494,24 @@ function MyCardInformation({
|
|
6408
6494
|
children: title
|
6409
6495
|
}
|
6410
6496
|
),
|
6411
|
-
unit == "" ? /* @__PURE__ */
|
6497
|
+
unit == "" ? /* @__PURE__ */ jsxs23(Text9, { size: "xs", style: { visibility: "hidden" }, children: [
|
6412
6498
|
"\u0110\u01A1n v\u1ECB: ",
|
6413
|
-
/* @__PURE__ */
|
6414
|
-
] }) : /* @__PURE__ */
|
6499
|
+
/* @__PURE__ */ jsx40("strong", { children: unit })
|
6500
|
+
] }) : /* @__PURE__ */ jsxs23(Text9, { size: "xs", children: [
|
6415
6501
|
"\u0110\u01A1n v\u1ECB: ",
|
6416
|
-
/* @__PURE__ */
|
6502
|
+
/* @__PURE__ */ jsx40("strong", { children: unit })
|
6417
6503
|
] })
|
6418
6504
|
] }),
|
6419
|
-
/* @__PURE__ */
|
6505
|
+
/* @__PURE__ */ jsx40(Box2, { children: icon })
|
6420
6506
|
] }),
|
6421
|
-
/* @__PURE__ */
|
6422
|
-
|
6507
|
+
/* @__PURE__ */ jsxs23(
|
6508
|
+
Group11,
|
6423
6509
|
{
|
6424
6510
|
mt: "5",
|
6425
6511
|
align: "flex-end",
|
6426
6512
|
gap: "xs",
|
6427
6513
|
children: [
|
6428
|
-
/* @__PURE__ */
|
6514
|
+
/* @__PURE__ */ jsx40(
|
6429
6515
|
Text9,
|
6430
6516
|
{
|
6431
6517
|
fw: 700,
|
@@ -6433,7 +6519,7 @@ function MyCardInformation({
|
|
6433
6519
|
children: value
|
6434
6520
|
}
|
6435
6521
|
),
|
6436
|
-
/* @__PURE__ */
|
6522
|
+
/* @__PURE__ */ jsxs23(
|
6437
6523
|
Text9,
|
6438
6524
|
{
|
6439
6525
|
mb: "2",
|
@@ -6441,19 +6527,19 @@ function MyCardInformation({
|
|
6441
6527
|
fz: "h2",
|
6442
6528
|
fw: 500,
|
6443
6529
|
children: [
|
6444
|
-
/* @__PURE__ */
|
6530
|
+
/* @__PURE__ */ jsxs23("span", { children: [
|
6445
6531
|
diff,
|
6446
6532
|
"%"
|
6447
6533
|
] }),
|
6448
|
-
diff > 0 ? /* @__PURE__ */
|
6534
|
+
diff > 0 ? /* @__PURE__ */ jsx40(IconArrowUpRight, {}) : /* @__PURE__ */ jsx40(IconArrowDownRight, {})
|
6449
6535
|
]
|
6450
6536
|
}
|
6451
6537
|
)
|
6452
6538
|
]
|
6453
6539
|
}
|
6454
6540
|
),
|
6455
|
-
/* @__PURE__ */
|
6456
|
-
/* @__PURE__ */
|
6541
|
+
/* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
|
6542
|
+
/* @__PURE__ */ jsx40(Text9, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6457
6543
|
extraControl
|
6458
6544
|
] })
|
6459
6545
|
]
|
@@ -6463,51 +6549,51 @@ function MyCardInformation({
|
|
6463
6549
|
}
|
6464
6550
|
|
6465
6551
|
// src/components/DataDisplay/IconText/MyIconText.tsx
|
6466
|
-
import { Group as
|
6467
|
-
import { jsx as
|
6552
|
+
import { Group as Group12, Text as Text10 } from "@mantine/core";
|
6553
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
6468
6554
|
function MyIconText({ icon: Icon, text }) {
|
6469
|
-
return /* @__PURE__ */
|
6470
|
-
Icon && /* @__PURE__ */
|
6471
|
-
/* @__PURE__ */
|
6555
|
+
return /* @__PURE__ */ jsxs24(Group12, { wrap: "nowrap", gap: 10, mt: 3, children: [
|
6556
|
+
Icon && /* @__PURE__ */ jsx41(Icon, { stroke: 1.5, size: 16 }),
|
6557
|
+
/* @__PURE__ */ jsx41(Text10, { fz: "lg", c: "dimmed", children: text })
|
6472
6558
|
] });
|
6473
6559
|
}
|
6474
6560
|
|
6475
6561
|
// src/components/DataDisplay/KeyLabel/MyKeyLabel.tsx
|
6476
|
-
import { Group as
|
6477
|
-
import { jsx as
|
6562
|
+
import { Group as Group13, Text as Text11 } from "@mantine/core";
|
6563
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
6478
6564
|
function MyKeyLabel({ keyLabel, label }) {
|
6479
|
-
return /* @__PURE__ */
|
6480
|
-
/* @__PURE__ */
|
6565
|
+
return /* @__PURE__ */ jsxs25(Group13, { gap: 5, children: [
|
6566
|
+
/* @__PURE__ */ jsxs25(Text11, { fw: "bold", children: [
|
6481
6567
|
keyLabel,
|
6482
6568
|
":"
|
6483
6569
|
] }),
|
6484
|
-
/* @__PURE__ */
|
6570
|
+
/* @__PURE__ */ jsx42(Text11, { children: label })
|
6485
6571
|
] });
|
6486
6572
|
}
|
6487
6573
|
|
6488
6574
|
// src/components/DataDisplay/NumberFormatter/MyNumberFormatter.tsx
|
6489
6575
|
import { NumberFormatter } from "@mantine/core";
|
6490
|
-
import { jsx as
|
6576
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
6491
6577
|
function MyNumberFormatter(_a) {
|
6492
6578
|
var rest = __objRest(_a, []);
|
6493
|
-
return /* @__PURE__ */
|
6579
|
+
return /* @__PURE__ */ jsx43(NumberFormatter, __spreadValues({ thousandSeparator: true, suffix: " VN\u0110" }, rest));
|
6494
6580
|
}
|
6495
6581
|
|
6496
6582
|
// src/components/DataDisplay/StatCard/AQStatCard1.tsx
|
6497
|
-
import { Box as Box3, Button as Button13, Flex as Flex4, Group as
|
6583
|
+
import { Box as Box3, Button as Button13, Flex as Flex4, Group as Group14, Paper as Paper6, Text as Text12 } from "@mantine/core";
|
6498
6584
|
import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
|
6499
|
-
import { Fragment as Fragment12, jsx as
|
6585
|
+
import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
6500
6586
|
function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
6501
|
-
return /* @__PURE__ */
|
6587
|
+
return /* @__PURE__ */ jsx44(Fragment12, { children: /* @__PURE__ */ jsxs26(
|
6502
6588
|
Paper6,
|
6503
6589
|
{
|
6504
6590
|
withBorder: true,
|
6505
6591
|
p: "md",
|
6506
6592
|
radius: "md",
|
6507
6593
|
children: [
|
6508
|
-
/* @__PURE__ */
|
6509
|
-
/* @__PURE__ */
|
6510
|
-
/* @__PURE__ */
|
6594
|
+
/* @__PURE__ */ jsxs26(Group14, { justify: "space-between", children: [
|
6595
|
+
/* @__PURE__ */ jsxs26(Flex4, { direction: "column", children: [
|
6596
|
+
/* @__PURE__ */ jsx44(
|
6511
6597
|
Text12,
|
6512
6598
|
{
|
6513
6599
|
tt: "uppercase",
|
@@ -6516,24 +6602,24 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6516
6602
|
children: title
|
6517
6603
|
}
|
6518
6604
|
),
|
6519
|
-
unit == "" ? /* @__PURE__ */
|
6605
|
+
unit == "" ? /* @__PURE__ */ jsxs26(Text12, { size: "xs", style: { visibility: "hidden" }, children: [
|
6520
6606
|
"\u0110\u01A1n v\u1ECB: ",
|
6521
|
-
/* @__PURE__ */
|
6522
|
-
] }) : /* @__PURE__ */
|
6607
|
+
/* @__PURE__ */ jsx44("strong", { children: unit })
|
6608
|
+
] }) : /* @__PURE__ */ jsxs26(Text12, { size: "xs", children: [
|
6523
6609
|
"\u0110\u01A1n v\u1ECB: ",
|
6524
|
-
/* @__PURE__ */
|
6610
|
+
/* @__PURE__ */ jsx44("strong", { children: unit })
|
6525
6611
|
] })
|
6526
6612
|
] }),
|
6527
|
-
/* @__PURE__ */
|
6613
|
+
/* @__PURE__ */ jsx44(Box3, { children: icons })
|
6528
6614
|
] }),
|
6529
|
-
/* @__PURE__ */
|
6530
|
-
|
6615
|
+
/* @__PURE__ */ jsxs26(
|
6616
|
+
Group14,
|
6531
6617
|
{
|
6532
6618
|
mt: "5",
|
6533
6619
|
align: "flex-end",
|
6534
6620
|
gap: "xs",
|
6535
6621
|
children: [
|
6536
|
-
/* @__PURE__ */
|
6622
|
+
/* @__PURE__ */ jsx44(
|
6537
6623
|
Text12,
|
6538
6624
|
{
|
6539
6625
|
fw: 700,
|
@@ -6541,7 +6627,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6541
6627
|
children: value
|
6542
6628
|
}
|
6543
6629
|
),
|
6544
|
-
/* @__PURE__ */
|
6630
|
+
/* @__PURE__ */ jsxs26(
|
6545
6631
|
Text12,
|
6546
6632
|
{
|
6547
6633
|
mb: "2",
|
@@ -6549,20 +6635,20 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6549
6635
|
fz: "h2",
|
6550
6636
|
fw: 500,
|
6551
6637
|
children: [
|
6552
|
-
/* @__PURE__ */
|
6638
|
+
/* @__PURE__ */ jsxs26("span", { children: [
|
6553
6639
|
diff,
|
6554
6640
|
"%"
|
6555
6641
|
] }),
|
6556
|
-
diff > 0 ? /* @__PURE__ */
|
6642
|
+
diff > 0 ? /* @__PURE__ */ jsx44(IconArrowUpRight2, {}) : /* @__PURE__ */ jsx44(IconArrowDownRight2, {})
|
6557
6643
|
]
|
6558
6644
|
}
|
6559
6645
|
)
|
6560
6646
|
]
|
6561
6647
|
}
|
6562
6648
|
),
|
6563
|
-
/* @__PURE__ */
|
6564
|
-
/* @__PURE__ */
|
6565
|
-
/* @__PURE__ */
|
6649
|
+
/* @__PURE__ */ jsxs26(Group14, { justify: "space-between", children: [
|
6650
|
+
/* @__PURE__ */ jsx44(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6651
|
+
/* @__PURE__ */ jsx44(
|
6566
6652
|
Button13,
|
6567
6653
|
{
|
6568
6654
|
variant: "light",
|
@@ -6653,20 +6739,20 @@ function FaviconSetter() {
|
|
6653
6739
|
|
6654
6740
|
// src/components/Inputs/DateInput/MyDateInput.tsx
|
6655
6741
|
import { DateInput } from "@mantine/dates";
|
6656
|
-
import { jsx as
|
6742
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
6657
6743
|
function MyDateInput(_a) {
|
6658
6744
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6659
|
-
return /* @__PURE__ */
|
6745
|
+
return /* @__PURE__ */ jsx45(DateInput, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
6660
6746
|
}
|
6661
6747
|
|
6662
6748
|
// src/components/Inputs/Fieldset/MyFieldset.tsx
|
6663
6749
|
import {
|
6664
6750
|
Fieldset as Fieldset4,
|
6665
|
-
Group as
|
6751
|
+
Group as Group15,
|
6666
6752
|
Text as Text13,
|
6667
6753
|
useMantineColorScheme as useMantineColorScheme2
|
6668
6754
|
} from "@mantine/core";
|
6669
|
-
import { jsx as
|
6755
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
6670
6756
|
function MyFieldset(_a) {
|
6671
6757
|
var _b = _a, {
|
6672
6758
|
children,
|
@@ -6695,10 +6781,10 @@ function MyFieldset(_a) {
|
|
6695
6781
|
const mergedStyles = typeof styles === "function" ? styles : __spreadProps(__spreadValues({}, styles), {
|
6696
6782
|
legend: __spreadValues(__spreadValues({}, defaultLegendStyles), styles == null ? void 0 : styles.legend)
|
6697
6783
|
});
|
6698
|
-
return /* @__PURE__ */
|
6784
|
+
return /* @__PURE__ */ jsx46(
|
6699
6785
|
Fieldset4,
|
6700
6786
|
__spreadProps(__spreadValues({
|
6701
|
-
legend: customLegend != null ? customLegend : /* @__PURE__ */
|
6787
|
+
legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx46(Group15, { gap: "xs", children: /* @__PURE__ */ jsxs27(Text13, { fw: 600, children: [
|
6702
6788
|
" ",
|
6703
6789
|
title,
|
6704
6790
|
" "
|
@@ -6712,18 +6798,26 @@ function MyFieldset(_a) {
|
|
6712
6798
|
|
6713
6799
|
// src/components/Inputs/FileInput/MyFileInput.tsx
|
6714
6800
|
import { FileInput as FileInput3 } from "@mantine/core";
|
6715
|
-
import {
|
6801
|
+
import { IconFile } from "@tabler/icons-react";
|
6802
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
6716
6803
|
function MyFileInput(_a) {
|
6717
6804
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6718
|
-
return /* @__PURE__ */
|
6805
|
+
return /* @__PURE__ */ jsx47(
|
6806
|
+
FileInput3,
|
6807
|
+
__spreadValues({
|
6808
|
+
rightSection: /* @__PURE__ */ jsx47(IconFile, {}),
|
6809
|
+
label,
|
6810
|
+
placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : ""
|
6811
|
+
}, rest)
|
6812
|
+
);
|
6719
6813
|
}
|
6720
6814
|
|
6721
6815
|
// src/components/Inputs/NumberInput/MyNumberInput.tsx
|
6722
6816
|
import { NumberInput as NumberInput2 } from "@mantine/core";
|
6723
|
-
import { jsx as
|
6817
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
6724
6818
|
function MyNumberInput(_a) {
|
6725
6819
|
var _b = _a, { minValue, label } = _b, rest = __objRest(_b, ["minValue", "label"]);
|
6726
|
-
return /* @__PURE__ */
|
6820
|
+
return /* @__PURE__ */ jsx48(
|
6727
6821
|
NumberInput2,
|
6728
6822
|
__spreadValues({
|
6729
6823
|
label,
|
@@ -6735,17 +6829,17 @@ function MyNumberInput(_a) {
|
|
6735
6829
|
|
6736
6830
|
// src/components/Inputs/TextArea/MyTextArea.tsx
|
6737
6831
|
import { Textarea } from "@mantine/core";
|
6738
|
-
import { jsx as
|
6832
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
6739
6833
|
function MyTextArea(_a) {
|
6740
6834
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6741
|
-
return /* @__PURE__ */
|
6835
|
+
return /* @__PURE__ */ jsx49(Textarea, __spreadValues({ label, placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
6742
6836
|
}
|
6743
6837
|
|
6744
6838
|
// src/components/Inputs/TextEditor/MyTextEditor.tsx
|
6745
6839
|
import { Input, ScrollArea as ScrollArea2 } from "@mantine/core";
|
6746
6840
|
import { Link as Link2, RichTextEditor } from "@mantine/tiptap";
|
6747
6841
|
import FileHandler from "@tiptap-pro/extension-file-handler";
|
6748
|
-
import
|
6842
|
+
import Highlight3 from "@tiptap/extension-highlight";
|
6749
6843
|
import Image2 from "@tiptap/extension-image";
|
6750
6844
|
import SubScript from "@tiptap/extension-subscript";
|
6751
6845
|
import Superscript from "@tiptap/extension-superscript";
|
@@ -6753,8 +6847,8 @@ import TextAlign from "@tiptap/extension-text-align";
|
|
6753
6847
|
import Underline from "@tiptap/extension-underline";
|
6754
6848
|
import { useEditor } from "@tiptap/react";
|
6755
6849
|
import StarterKit from "@tiptap/starter-kit";
|
6756
|
-
import { useEffect as useEffect8, useState as
|
6757
|
-
import { jsx as
|
6850
|
+
import { useEffect as useEffect8, useState as useState9 } from "react";
|
6851
|
+
import { jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
6758
6852
|
function MyTextEditor(_a) {
|
6759
6853
|
var _b = _a, {
|
6760
6854
|
autoHiddenToolBar = false,
|
@@ -6773,7 +6867,7 @@ function MyTextEditor(_a) {
|
|
6773
6867
|
"label",
|
6774
6868
|
"withAsterisk"
|
6775
6869
|
]);
|
6776
|
-
const [hiddenToolBar, setHiddenToolBar] =
|
6870
|
+
const [hiddenToolBar, setHiddenToolBar] = useState9(autoHiddenToolBar);
|
6777
6871
|
const editor = useEditor(__spreadValues({
|
6778
6872
|
extensions: [
|
6779
6873
|
StarterKit,
|
@@ -6781,7 +6875,7 @@ function MyTextEditor(_a) {
|
|
6781
6875
|
Link2,
|
6782
6876
|
Superscript,
|
6783
6877
|
SubScript,
|
6784
|
-
|
6878
|
+
Highlight3,
|
6785
6879
|
Image2.extend({
|
6786
6880
|
addAttributes() {
|
6787
6881
|
return {
|
@@ -6856,43 +6950,43 @@ function MyTextEditor(_a) {
|
|
6856
6950
|
editor.commands.setContent(value);
|
6857
6951
|
}
|
6858
6952
|
}, [value, editor]);
|
6859
|
-
return /* @__PURE__ */
|
6860
|
-
/* @__PURE__ */
|
6861
|
-
/* @__PURE__ */
|
6862
|
-
/* @__PURE__ */
|
6863
|
-
/* @__PURE__ */
|
6864
|
-
/* @__PURE__ */
|
6865
|
-
/* @__PURE__ */
|
6866
|
-
/* @__PURE__ */
|
6867
|
-
/* @__PURE__ */
|
6868
|
-
/* @__PURE__ */
|
6953
|
+
return /* @__PURE__ */ jsx50(Input.Wrapper, { label, flex: 1, error, withAsterisk, children: /* @__PURE__ */ jsxs28(RichTextEditor, { editor, style: { border: error && "1px solid #e03131" }, children: [
|
6954
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.Toolbar, { hidden: hiddenToolBar, sticky: true, stickyOffset: 60, children: [
|
6955
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
6956
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Bold, {}),
|
6957
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Italic, {}),
|
6958
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Underline, {}),
|
6959
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Strikethrough, {}),
|
6960
|
+
/* @__PURE__ */ jsx50(RichTextEditor.ClearFormatting, {}),
|
6961
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Highlight, {}),
|
6962
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Code, {})
|
6869
6963
|
] }),
|
6870
|
-
/* @__PURE__ */
|
6871
|
-
/* @__PURE__ */
|
6872
|
-
/* @__PURE__ */
|
6873
|
-
/* @__PURE__ */
|
6874
|
-
/* @__PURE__ */
|
6964
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
6965
|
+
/* @__PURE__ */ jsx50(RichTextEditor.H1, {}),
|
6966
|
+
/* @__PURE__ */ jsx50(RichTextEditor.H2, {}),
|
6967
|
+
/* @__PURE__ */ jsx50(RichTextEditor.H3, {}),
|
6968
|
+
/* @__PURE__ */ jsx50(RichTextEditor.H4, {})
|
6875
6969
|
] }),
|
6876
|
-
/* @__PURE__ */
|
6877
|
-
/* @__PURE__ */
|
6878
|
-
/* @__PURE__ */
|
6879
|
-
/* @__PURE__ */
|
6880
|
-
/* @__PURE__ */
|
6881
|
-
/* @__PURE__ */
|
6882
|
-
/* @__PURE__ */
|
6970
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
6971
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Blockquote, {}),
|
6972
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Hr, {}),
|
6973
|
+
/* @__PURE__ */ jsx50(RichTextEditor.BulletList, {}),
|
6974
|
+
/* @__PURE__ */ jsx50(RichTextEditor.OrderedList, {}),
|
6975
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Subscript, {}),
|
6976
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Superscript, {})
|
6883
6977
|
] }),
|
6884
|
-
/* @__PURE__ */
|
6885
|
-
/* @__PURE__ */
|
6886
|
-
/* @__PURE__ */
|
6978
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
6979
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Link, {}),
|
6980
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Unlink, {})
|
6887
6981
|
] }),
|
6888
|
-
/* @__PURE__ */
|
6889
|
-
/* @__PURE__ */
|
6890
|
-
/* @__PURE__ */
|
6891
|
-
/* @__PURE__ */
|
6892
|
-
/* @__PURE__ */
|
6982
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
6983
|
+
/* @__PURE__ */ jsx50(RichTextEditor.AlignLeft, {}),
|
6984
|
+
/* @__PURE__ */ jsx50(RichTextEditor.AlignCenter, {}),
|
6985
|
+
/* @__PURE__ */ jsx50(RichTextEditor.AlignJustify, {}),
|
6986
|
+
/* @__PURE__ */ jsx50(RichTextEditor.AlignRight, {})
|
6893
6987
|
] })
|
6894
6988
|
] }),
|
6895
|
-
/* @__PURE__ */
|
6989
|
+
/* @__PURE__ */ jsx50(
|
6896
6990
|
ScrollArea2.Autosize,
|
6897
6991
|
{
|
6898
6992
|
onMouseDown: () => {
|
@@ -6907,7 +7001,7 @@ function MyTextEditor(_a) {
|
|
6907
7001
|
setHiddenToolBar(false);
|
6908
7002
|
},
|
6909
7003
|
style: { cursor: "text", maxHeight: "400px" },
|
6910
|
-
children: /* @__PURE__ */
|
7004
|
+
children: /* @__PURE__ */ jsx50(RichTextEditor.Content, { mih: contentHeight })
|
6911
7005
|
}
|
6912
7006
|
)
|
6913
7007
|
] }) });
|
@@ -6929,14 +7023,14 @@ function useS_authenticate() {
|
|
6929
7023
|
}
|
6930
7024
|
|
6931
7025
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
6932
|
-
import { jsx as
|
7026
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
6933
7027
|
function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
6934
7028
|
const router = useRouter3();
|
6935
7029
|
const S_Authenticate = useS_authenticate();
|
6936
|
-
return /* @__PURE__ */
|
7030
|
+
return /* @__PURE__ */ jsx51(Button14, { onClick: () => {
|
6937
7031
|
S_Authenticate.setProperty("token", "");
|
6938
7032
|
router.replace(redirectURL);
|
6939
|
-
}, leftSection: /* @__PURE__ */
|
7033
|
+
}, leftSection: /* @__PURE__ */ jsx51(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
6940
7034
|
}
|
6941
7035
|
|
6942
7036
|
// src/components/Layouts/BasicAppShell/BasicAppShell.tsx
|
@@ -6945,7 +7039,7 @@ import {
|
|
6945
7039
|
AppShell,
|
6946
7040
|
Badge as Badge3,
|
6947
7041
|
Divider as Divider2,
|
6948
|
-
Group as
|
7042
|
+
Group as Group16,
|
6949
7043
|
Image as Image3,
|
6950
7044
|
NavLink,
|
6951
7045
|
ScrollArea as ScrollArea3,
|
@@ -6960,8 +7054,8 @@ import {
|
|
6960
7054
|
} from "@tabler/icons-react";
|
6961
7055
|
import Link3 from "next/link";
|
6962
7056
|
import { usePathname as usePathname2 } from "next/navigation";
|
6963
|
-
import { useEffect as useEffect9, useMemo as useMemo3, useState as
|
6964
|
-
import { Fragment as Fragment13, jsx as
|
7057
|
+
import { useEffect as useEffect9, useMemo as useMemo3, useState as useState10 } from "react";
|
7058
|
+
import { Fragment as Fragment13, jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
|
6965
7059
|
function findBreadcrumbPath(items, currentPath, parents = []) {
|
6966
7060
|
for (const item of items) {
|
6967
7061
|
if (item.link === currentPath) {
|
@@ -6976,13 +7070,13 @@ function findBreadcrumbPath(items, currentPath, parents = []) {
|
|
6976
7070
|
}
|
6977
7071
|
function getRightSection(status) {
|
6978
7072
|
if (status === "Prototype")
|
6979
|
-
return /* @__PURE__ */
|
7073
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
|
6980
7074
|
if (status === "New")
|
6981
|
-
return /* @__PURE__ */
|
7075
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", circle: true, children: "N" });
|
6982
7076
|
if (status === "Menu")
|
6983
|
-
return /* @__PURE__ */
|
7077
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "gray", circle: true, children: "M" });
|
6984
7078
|
if (status === "Change")
|
6985
|
-
return /* @__PURE__ */
|
7079
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
|
6986
7080
|
return null;
|
6987
7081
|
}
|
6988
7082
|
function RenderNavLinks({
|
@@ -6990,14 +7084,14 @@ function RenderNavLinks({
|
|
6990
7084
|
}) {
|
6991
7085
|
const basicAppShellStore = useS_BasicAppShell();
|
6992
7086
|
const pathName = usePathname2();
|
6993
|
-
return /* @__PURE__ */
|
7087
|
+
return /* @__PURE__ */ jsx52(Fragment13, { children: items.map((item, index) => /* @__PURE__ */ jsx52(
|
6994
7088
|
NavLink,
|
6995
7089
|
{
|
6996
7090
|
active: item.link === pathName.split("/")[2],
|
6997
7091
|
component: Link3,
|
6998
7092
|
opened: basicAppShellStore.state.groupMenuOpenId.includes(item.label),
|
6999
7093
|
href: `/${pathName.split("/")[1]}/${item.link}` || "#",
|
7000
|
-
label: /* @__PURE__ */
|
7094
|
+
label: /* @__PURE__ */ jsxs29(MyFlexRow, { justify: "space-between", children: [
|
7001
7095
|
item.label,
|
7002
7096
|
" ",
|
7003
7097
|
getRightSection(item.status)
|
@@ -7009,7 +7103,7 @@ function RenderNavLinks({
|
|
7009
7103
|
return;
|
7010
7104
|
}
|
7011
7105
|
},
|
7012
|
-
children: item.links && /* @__PURE__ */
|
7106
|
+
children: item.links && /* @__PURE__ */ jsx52(RenderNavLinks, { items: item.links })
|
7013
7107
|
},
|
7014
7108
|
index
|
7015
7109
|
)) });
|
@@ -7079,7 +7173,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7079
7173
|
const media = useMediaQuery("(min-width: 72em)");
|
7080
7174
|
const GetAQModule_query = useQ_AQ_GetAQModule();
|
7081
7175
|
const BasicAppShell_store = useS_BasicAppShell();
|
7082
|
-
const [faviconUrl, setFaviconUrl] =
|
7176
|
+
const [faviconUrl, setFaviconUrl] = useState10("");
|
7083
7177
|
const allChildItems = useMemo3(() => {
|
7084
7178
|
const result = [];
|
7085
7179
|
const extractChildren = (items) => {
|
@@ -7132,7 +7226,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7132
7226
|
basicAppShellStore.setProperty("note", linkItem == null ? void 0 : linkItem.note);
|
7133
7227
|
basicAppShellStore.setProperty("status", linkItem == null ? void 0 : linkItem.status);
|
7134
7228
|
}, [pathName]);
|
7135
|
-
return /* @__PURE__ */
|
7229
|
+
return /* @__PURE__ */ jsxs29(
|
7136
7230
|
AppShell,
|
7137
7231
|
{
|
7138
7232
|
header: { height: 60 },
|
@@ -7146,80 +7240,80 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7146
7240
|
},
|
7147
7241
|
padding: "md",
|
7148
7242
|
children: [
|
7149
|
-
/* @__PURE__ */
|
7150
|
-
/* @__PURE__ */
|
7151
|
-
/* @__PURE__ */
|
7243
|
+
/* @__PURE__ */ jsx52(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7244
|
+
/* @__PURE__ */ jsxs29(Group16, { h: "100%", children: [
|
7245
|
+
/* @__PURE__ */ jsx52(
|
7152
7246
|
Tooltip5,
|
7153
7247
|
{
|
7154
7248
|
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7155
|
-
children: /* @__PURE__ */
|
7249
|
+
children: /* @__PURE__ */ jsx52(
|
7156
7250
|
ActionIcon11,
|
7157
7251
|
{
|
7158
7252
|
size: "lg",
|
7159
7253
|
radius: "md",
|
7160
7254
|
variant: "default",
|
7161
7255
|
onClick: basicAppShellStore.toggle,
|
7162
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7256
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx52(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx52(IconLayoutSidebarLeftCollapse, {})
|
7163
7257
|
}
|
7164
7258
|
)
|
7165
7259
|
}
|
7166
7260
|
),
|
7167
|
-
/* @__PURE__ */
|
7261
|
+
/* @__PURE__ */ jsx52(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx52(
|
7168
7262
|
ActionIcon11,
|
7169
7263
|
{
|
7170
7264
|
size: "lg",
|
7171
7265
|
radius: "md",
|
7172
7266
|
variant: "default",
|
7173
7267
|
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7174
|
-
children: /* @__PURE__ */
|
7268
|
+
children: /* @__PURE__ */ jsx52(IconLibraryMinus, {})
|
7175
7269
|
}
|
7176
7270
|
) })
|
7177
7271
|
] }),
|
7178
|
-
/* @__PURE__ */
|
7179
|
-
|
7272
|
+
/* @__PURE__ */ jsx52(
|
7273
|
+
Group16,
|
7180
7274
|
{
|
7181
7275
|
style: {
|
7182
7276
|
position: "absolute",
|
7183
7277
|
left: "50%",
|
7184
7278
|
transform: "translateX(-50%)"
|
7185
7279
|
},
|
7186
|
-
children: /* @__PURE__ */
|
7280
|
+
children: /* @__PURE__ */ jsx52(Text14, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7187
7281
|
}
|
7188
7282
|
),
|
7189
|
-
/* @__PURE__ */
|
7283
|
+
/* @__PURE__ */ jsxs29(Group16, { children: [
|
7190
7284
|
extraTopRight,
|
7191
|
-
/* @__PURE__ */
|
7285
|
+
/* @__PURE__ */ jsx52(MySwitchTheme, {})
|
7192
7286
|
] })
|
7193
7287
|
] }) : (
|
7194
7288
|
// For mobile screens - simplified layout
|
7195
|
-
/* @__PURE__ */
|
7196
|
-
/* @__PURE__ */
|
7289
|
+
/* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", children: [
|
7290
|
+
/* @__PURE__ */ jsx52(
|
7197
7291
|
ActionIcon11,
|
7198
7292
|
{
|
7199
7293
|
size: "lg",
|
7200
7294
|
radius: "md",
|
7201
7295
|
variant: "default",
|
7202
7296
|
onClick: basicAppShellStore.toggle,
|
7203
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7297
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx52(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx52(IconLayoutSidebarLeftCollapse, {})
|
7204
7298
|
}
|
7205
7299
|
),
|
7206
|
-
/* @__PURE__ */
|
7207
|
-
/* @__PURE__ */
|
7300
|
+
/* @__PURE__ */ jsx52(Text14, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7301
|
+
/* @__PURE__ */ jsxs29(Group16, { children: [
|
7208
7302
|
extraTopRight,
|
7209
|
-
/* @__PURE__ */
|
7303
|
+
/* @__PURE__ */ jsx52(MySwitchTheme, {})
|
7210
7304
|
] })
|
7211
7305
|
] })
|
7212
7306
|
) }),
|
7213
|
-
/* @__PURE__ */
|
7214
|
-
/* @__PURE__ */
|
7215
|
-
/* @__PURE__ */
|
7216
|
-
/* @__PURE__ */
|
7217
|
-
/* @__PURE__ */
|
7218
|
-
/* @__PURE__ */
|
7307
|
+
/* @__PURE__ */ jsxs29(AppShell.Navbar, { children: [
|
7308
|
+
/* @__PURE__ */ jsx52(MyAppSpotlight, { menu }),
|
7309
|
+
/* @__PURE__ */ jsxs29(AppShell.Section, { grow: true, component: ScrollArea3, p: 5, children: [
|
7310
|
+
/* @__PURE__ */ jsx52(RenderNavLinks, { items: menu }),
|
7311
|
+
/* @__PURE__ */ jsx52(Divider2, {}),
|
7312
|
+
/* @__PURE__ */ jsx52(F_authenticate_Logout, {})
|
7219
7313
|
] }),
|
7220
|
-
/* @__PURE__ */
|
7221
|
-
/* @__PURE__ */
|
7222
|
-
/* @__PURE__ */
|
7314
|
+
/* @__PURE__ */ jsxs29(AppShell.Section, { p: "md", children: [
|
7315
|
+
/* @__PURE__ */ jsx52(Divider2, {}),
|
7316
|
+
/* @__PURE__ */ jsx52(
|
7223
7317
|
Image3,
|
7224
7318
|
{
|
7225
7319
|
fit: "contain",
|
@@ -7233,7 +7327,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7233
7327
|
)
|
7234
7328
|
] })
|
7235
7329
|
] }),
|
7236
|
-
/* @__PURE__ */
|
7330
|
+
/* @__PURE__ */ jsx52(
|
7237
7331
|
AppShell.Main,
|
7238
7332
|
{
|
7239
7333
|
bg: "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))",
|
@@ -7288,10 +7382,10 @@ function utils_layout_getItemsWithoutLinks(menu) {
|
|
7288
7382
|
|
7289
7383
|
// src/components/Layouts/Container/MyContainer.tsx
|
7290
7384
|
import { Container, Flex as Flex5 } from "@mantine/core";
|
7291
|
-
import { jsx as
|
7385
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
7292
7386
|
function MyContainer(_a) {
|
7293
7387
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
7294
|
-
return /* @__PURE__ */
|
7388
|
+
return /* @__PURE__ */ jsx53(Container, __spreadProps(__spreadValues({ fluid: true }, rest), { children: /* @__PURE__ */ jsx53(Flex5, { direction: "column", children }) }));
|
7295
7389
|
}
|
7296
7390
|
|
7297
7391
|
// src/constants/object/color.ts
|
@@ -7309,7 +7403,7 @@ import {
|
|
7309
7403
|
Container as Container2,
|
7310
7404
|
Divider as Divider3,
|
7311
7405
|
Drawer,
|
7312
|
-
Group as
|
7406
|
+
Group as Group17,
|
7313
7407
|
Image as Image4,
|
7314
7408
|
ScrollArea as ScrollArea4,
|
7315
7409
|
Text as Text15,
|
@@ -7318,7 +7412,7 @@ import {
|
|
7318
7412
|
UnstyledButton,
|
7319
7413
|
useMantineTheme
|
7320
7414
|
} from "@mantine/core";
|
7321
|
-
import { useDisclosure as
|
7415
|
+
import { useDisclosure as useDisclosure11 } from "@mantine/hooks";
|
7322
7416
|
import {
|
7323
7417
|
IconBook,
|
7324
7418
|
IconChartPie3,
|
@@ -7344,7 +7438,7 @@ function useHeaderMegaMenuStore() {
|
|
7344
7438
|
}
|
7345
7439
|
|
7346
7440
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7347
|
-
import { jsx as
|
7441
|
+
import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
7348
7442
|
var mockdata = [
|
7349
7443
|
{
|
7350
7444
|
icon: IconCode,
|
@@ -7378,31 +7472,31 @@ var mockdata = [
|
|
7378
7472
|
}
|
7379
7473
|
];
|
7380
7474
|
function HeaderMegaMenu({ children, menus }) {
|
7381
|
-
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] =
|
7382
|
-
const [linksOpened, { toggle: toggleLinks }] =
|
7475
|
+
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure11(false);
|
7476
|
+
const [linksOpened, { toggle: toggleLinks }] = useDisclosure11(false);
|
7383
7477
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
7384
7478
|
const theme = useMantineTheme();
|
7385
|
-
const links = mockdata.map((item) => /* @__PURE__ */
|
7386
|
-
/* @__PURE__ */
|
7387
|
-
/* @__PURE__ */
|
7388
|
-
/* @__PURE__ */
|
7389
|
-
/* @__PURE__ */
|
7479
|
+
const links = mockdata.map((item) => /* @__PURE__ */ jsx54(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs30(Group17, { wrap: "nowrap", align: "flex-start", children: [
|
7480
|
+
/* @__PURE__ */ jsx54(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx54(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
|
7481
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
7482
|
+
/* @__PURE__ */ jsx54(Text15, { size: "sm", fw: 500, children: item.title }),
|
7483
|
+
/* @__PURE__ */ jsx54(Text15, { size: "xs", c: "dimmed", children: item.description })
|
7390
7484
|
] })
|
7391
7485
|
] }) }, item.title));
|
7392
|
-
return /* @__PURE__ */
|
7393
|
-
/* @__PURE__ */
|
7394
|
-
/* @__PURE__ */
|
7395
|
-
/* @__PURE__ */
|
7396
|
-
/* @__PURE__ */
|
7486
|
+
return /* @__PURE__ */ jsxs30(Box4, { children: [
|
7487
|
+
/* @__PURE__ */ jsx54("header", { className: css_default.header, children: /* @__PURE__ */ jsxs30(Group17, { justify: "space-between", h: "100%", children: [
|
7488
|
+
/* @__PURE__ */ jsxs30(Group17, { children: [
|
7489
|
+
/* @__PURE__ */ jsx54(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
|
7490
|
+
/* @__PURE__ */ jsx54(Group17, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx54(Button15, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
|
7397
7491
|
] }),
|
7398
|
-
/* @__PURE__ */
|
7399
|
-
/* @__PURE__ */
|
7400
|
-
/* @__PURE__ */
|
7492
|
+
/* @__PURE__ */ jsxs30(Group17, { children: [
|
7493
|
+
/* @__PURE__ */ jsx54(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx54(IconSearch2, {}), radius: "xl", w: "250px" }),
|
7494
|
+
/* @__PURE__ */ jsx54(MySwitchTheme, {})
|
7401
7495
|
] }),
|
7402
|
-
/* @__PURE__ */
|
7496
|
+
/* @__PURE__ */ jsx54(Burger, { opened: drawerOpened, onClick: toggleDrawer, hiddenFrom: "sm" })
|
7403
7497
|
] }) }),
|
7404
|
-
/* @__PURE__ */
|
7405
|
-
/* @__PURE__ */
|
7498
|
+
/* @__PURE__ */ jsx54(Container2, { fluid: true, pt: "sm", pb: "md", bg: OBJECT_COlORS.mantineBackgroundSecondary, mih: "93vh", children }),
|
7499
|
+
/* @__PURE__ */ jsx54(
|
7406
7500
|
Drawer,
|
7407
7501
|
{
|
7408
7502
|
opened: drawerOpened,
|
@@ -7412,10 +7506,10 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7412
7506
|
title: "Navigation",
|
7413
7507
|
hiddenFrom: "sm",
|
7414
7508
|
zIndex: 1e6,
|
7415
|
-
children: /* @__PURE__ */
|
7416
|
-
/* @__PURE__ */
|
7417
|
-
/* @__PURE__ */
|
7418
|
-
/* @__PURE__ */
|
7509
|
+
children: /* @__PURE__ */ jsxs30(ScrollArea4, { h: "calc(100vh - 80px", mx: "-md", children: [
|
7510
|
+
/* @__PURE__ */ jsx54(Divider3, { my: "sm" }),
|
7511
|
+
/* @__PURE__ */ jsx54(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx54(Button15, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
|
7512
|
+
/* @__PURE__ */ jsx54(Divider3, { my: "sm" })
|
7419
7513
|
] })
|
7420
7514
|
}
|
7421
7515
|
)
|
@@ -7423,8 +7517,8 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7423
7517
|
}
|
7424
7518
|
|
7425
7519
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
7426
|
-
import { Badge as Badge4, Breadcrumbs, Code, Container as Container3, Divider as Divider4, Group as
|
7427
|
-
import { jsx as
|
7520
|
+
import { Badge as Badge4, Breadcrumbs, Code, Container as Container3, Divider as Divider4, Group as Group18, Text as Text16, Title } from "@mantine/core";
|
7521
|
+
import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
7428
7522
|
var getStatusColor = (status) => {
|
7429
7523
|
switch (status) {
|
7430
7524
|
case "Prototype":
|
@@ -7435,10 +7529,10 @@ var getStatusColor = (status) => {
|
|
7435
7529
|
};
|
7436
7530
|
function PageTitle({ title, status, note }) {
|
7437
7531
|
const color = getStatusColor(status);
|
7438
|
-
return /* @__PURE__ */
|
7439
|
-
/* @__PURE__ */
|
7440
|
-
/* @__PURE__ */
|
7441
|
-
status && /* @__PURE__ */
|
7532
|
+
return /* @__PURE__ */ jsx55(Group18, { children: /* @__PURE__ */ jsxs31(MyFlexColumn, { gap: 0, children: [
|
7533
|
+
/* @__PURE__ */ jsxs31(Group18, { align: "center", children: [
|
7534
|
+
/* @__PURE__ */ jsx55(Title, { order: 3, children: title }),
|
7535
|
+
status && /* @__PURE__ */ jsx55(
|
7442
7536
|
Badge4,
|
7443
7537
|
{
|
7444
7538
|
variant: "gradient",
|
@@ -7449,7 +7543,7 @@ function PageTitle({ title, status, note }) {
|
|
7449
7543
|
}
|
7450
7544
|
)
|
7451
7545
|
] }),
|
7452
|
-
/* @__PURE__ */
|
7546
|
+
/* @__PURE__ */ jsx55(Text16, { size: "lg", c: "dimmed", fs: "italic", children: note })
|
7453
7547
|
] }) });
|
7454
7548
|
}
|
7455
7549
|
function MyPageContent({
|
@@ -7462,11 +7556,11 @@ function MyPageContent({
|
|
7462
7556
|
var _a;
|
7463
7557
|
const basicAppShellStore = useS_BasicAppShell();
|
7464
7558
|
const finalTitle = title || basicAppShellStore.state.title;
|
7465
|
-
return /* @__PURE__ */
|
7466
|
-
/* @__PURE__ */
|
7467
|
-
/* @__PURE__ */
|
7468
|
-
/* @__PURE__ */
|
7469
|
-
/* @__PURE__ */
|
7559
|
+
return /* @__PURE__ */ jsxs31(Container3, { p: 0, fluid: true, children: [
|
7560
|
+
/* @__PURE__ */ jsxs31(Group18, { justify: "space-between", children: [
|
7561
|
+
/* @__PURE__ */ jsxs31(Group18, { children: [
|
7562
|
+
/* @__PURE__ */ jsx55(MyButtonRouterBack, {}),
|
7563
|
+
/* @__PURE__ */ jsx55(
|
7470
7564
|
PageTitle,
|
7471
7565
|
{
|
7472
7566
|
title: finalTitle,
|
@@ -7476,64 +7570,64 @@ function MyPageContent({
|
|
7476
7570
|
),
|
7477
7571
|
leftTopBar
|
7478
7572
|
] }),
|
7479
|
-
/* @__PURE__ */
|
7573
|
+
/* @__PURE__ */ jsxs31(Group18, { p: "md", children: [
|
7480
7574
|
rightTopBar,
|
7481
|
-
/* @__PURE__ */
|
7575
|
+
/* @__PURE__ */ jsx55(Breadcrumbs, { separatorMargin: "7", children: (_a = basicAppShellStore.state.breadcrumb) == null ? void 0 : _a.map((item, idx) => /* @__PURE__ */ jsx55(Text16, { fw: "600", c: "blue", children: item }, idx)) })
|
7482
7576
|
] })
|
7483
7577
|
] }),
|
7484
|
-
/* @__PURE__ */
|
7578
|
+
/* @__PURE__ */ jsx55(Divider4, { my: "xs" }),
|
7485
7579
|
children,
|
7486
|
-
/* @__PURE__ */
|
7487
|
-
/* @__PURE__ */
|
7580
|
+
/* @__PURE__ */ jsx55(Divider4, { my: "xs" }),
|
7581
|
+
/* @__PURE__ */ jsx55(MyFlexEnd, { children: /* @__PURE__ */ jsx55(Code, { color: "var(--mantine-color-blue-light)", children: basicAppShellStore.state.menuCode }) })
|
7488
7582
|
] });
|
7489
7583
|
}
|
7490
7584
|
|
7491
7585
|
// src/components/Layouts/Tab/MyTab.tsx
|
7492
7586
|
import { rem, Space as Space3, Tabs } from "@mantine/core";
|
7493
|
-
import { jsx as
|
7587
|
+
import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
7494
7588
|
function MyTab(_a) {
|
7495
7589
|
var _b = _a, { tabList, children } = _b, rest = __objRest(_b, ["tabList", "children"]);
|
7496
7590
|
const iconStyle = { width: rem(20), height: rem(20) };
|
7497
|
-
return /* @__PURE__ */
|
7498
|
-
/* @__PURE__ */
|
7499
|
-
return /* @__PURE__ */
|
7591
|
+
return /* @__PURE__ */ jsxs32(Tabs, __spreadProps(__spreadValues({ defaultValue: tabList[0].label }, rest), { children: [
|
7592
|
+
/* @__PURE__ */ jsx56(Tabs.List, { children: tabList.map((item, idx) => {
|
7593
|
+
return /* @__PURE__ */ jsx56(Tabs.Tab, { value: item.label, leftSection: item.icon && /* @__PURE__ */ jsx56(item.icon, { style: iconStyle }), children: item.label }, idx);
|
7500
7594
|
}) }),
|
7501
|
-
/* @__PURE__ */
|
7595
|
+
/* @__PURE__ */ jsx56(Space3, { my: "md" }),
|
7502
7596
|
children
|
7503
7597
|
] }));
|
7504
7598
|
}
|
7505
7599
|
|
7506
7600
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
7507
|
-
import { ActionIcon as ActionIcon12, Button as Button16, Fieldset as Fieldset5, Group as
|
7508
|
-
import { useDisclosure as
|
7601
|
+
import { ActionIcon as ActionIcon12, Button as Button16, Fieldset as Fieldset5, Group as Group19, Modal as Modal11 } from "@mantine/core";
|
7602
|
+
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
7509
7603
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
7510
|
-
import { jsx as
|
7604
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
7511
7605
|
function MyDataTableSelect(_a) {
|
7512
7606
|
var _b = _a, { modalSize, renderTopToolbarCustomActions, data, selectButtonlabel, listState, columns, listLabel } = _b, rest = __objRest(_b, ["modalSize", "renderTopToolbarCustomActions", "data", "selectButtonlabel", "listState", "columns", "listLabel"]);
|
7513
|
-
const disc =
|
7607
|
+
const disc = useDisclosure12(false);
|
7514
7608
|
if (data == void 0) return "\u0110ang t\u1EA3i...";
|
7515
|
-
return /* @__PURE__ */
|
7516
|
-
/* @__PURE__ */
|
7609
|
+
return /* @__PURE__ */ jsxs33(Fieldset5, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: [
|
7610
|
+
/* @__PURE__ */ jsx57(
|
7517
7611
|
MyDataTable,
|
7518
7612
|
__spreadValues({
|
7519
7613
|
renderTopToolbarCustomActions: ({ table }) => {
|
7520
|
-
return /* @__PURE__ */
|
7614
|
+
return /* @__PURE__ */ jsxs33(Group19, { children: [
|
7521
7615
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
7522
|
-
/* @__PURE__ */
|
7616
|
+
/* @__PURE__ */ jsx57(Button16, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
7523
7617
|
] });
|
7524
7618
|
},
|
7525
7619
|
columns,
|
7526
7620
|
data: listState[0],
|
7527
7621
|
renderRowActions: ({ row }) => {
|
7528
|
-
return /* @__PURE__ */
|
7622
|
+
return /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(ActionIcon12, { color: "red", onClick: () => listState[1].remove(row.index), children: /* @__PURE__ */ jsx57(IconX2, {}) }) });
|
7529
7623
|
}
|
7530
7624
|
}, rest)
|
7531
7625
|
),
|
7532
|
-
/* @__PURE__ */
|
7626
|
+
/* @__PURE__ */ jsx57(Modal11, { opened: disc[0], onClose: disc[1].close, size: modalSize || "80%", children: /* @__PURE__ */ jsx57(
|
7533
7627
|
MyDataTable,
|
7534
7628
|
__spreadValues({
|
7535
7629
|
renderTopToolbarCustomActions: ({ table }) => {
|
7536
|
-
return /* @__PURE__ */
|
7630
|
+
return /* @__PURE__ */ jsx57(Button16, { onClick: () => {
|
7537
7631
|
table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
|
7538
7632
|
disc[1].close();
|
7539
7633
|
}, children: "Ch\u1ECDn" });
|
@@ -7549,7 +7643,7 @@ function MyDataTableSelect(_a) {
|
|
7549
7643
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
7550
7644
|
import { Select as Select3 } from "@mantine/core";
|
7551
7645
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
7552
|
-
import { jsx as
|
7646
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
7553
7647
|
function MySelectAPIGet(_a) {
|
7554
7648
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
7555
7649
|
var _a2;
|
@@ -7568,7 +7662,7 @@ function MySelectAPIGet(_a) {
|
|
7568
7662
|
label: `${item.code}-${item.name}`
|
7569
7663
|
};
|
7570
7664
|
});
|
7571
|
-
return /* @__PURE__ */
|
7665
|
+
return /* @__PURE__ */ jsx58(
|
7572
7666
|
Select3,
|
7573
7667
|
__spreadValues({
|
7574
7668
|
label,
|
@@ -7581,9 +7675,9 @@ function MySelectAPIGet(_a) {
|
|
7581
7675
|
// src/components/ScheduleX/MyScheduleX.tsx
|
7582
7676
|
import { useNextCalendarApp as useNextCalendarApp2, ScheduleXCalendar as ScheduleXCalendar2 } from "@schedule-x/react";
|
7583
7677
|
import { createEventsServicePlugin as createEventsServicePlugin2 } from "@schedule-x/events-service";
|
7584
|
-
import { useState as
|
7678
|
+
import { useState as useState11 } from "react";
|
7585
7679
|
import { createEventModalPlugin as createEventModalPlugin2 } from "@schedule-x/event-modal";
|
7586
|
-
import { jsx as
|
7680
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
7587
7681
|
function MyScheduleX({
|
7588
7682
|
values,
|
7589
7683
|
timeGridEvent,
|
@@ -7592,8 +7686,8 @@ function MyScheduleX({
|
|
7592
7686
|
startDayBoundaries = "05:00",
|
7593
7687
|
endDayBoundaries = "21:00"
|
7594
7688
|
}) {
|
7595
|
-
const eventsService =
|
7596
|
-
const eventModalPlugin =
|
7689
|
+
const eventsService = useState11(() => createEventsServicePlugin2())[0];
|
7690
|
+
const eventModalPlugin = useState11(() => createEventModalPlugin2())[0];
|
7597
7691
|
const calendar = useNextCalendarApp2({
|
7598
7692
|
locale: "vi-VN",
|
7599
7693
|
dayBoundaries: {
|
@@ -7608,7 +7702,7 @@ function MyScheduleX({
|
|
7608
7702
|
events: values,
|
7609
7703
|
plugins: [eventsService, eventModalPlugin]
|
7610
7704
|
});
|
7611
|
-
return /* @__PURE__ */
|
7705
|
+
return /* @__PURE__ */ jsx59(
|
7612
7706
|
ScheduleXCalendar2,
|
7613
7707
|
{
|
7614
7708
|
calendarApp: calendar,
|
@@ -7622,9 +7716,9 @@ function MyScheduleX({
|
|
7622
7716
|
|
7623
7717
|
// src/components/Skeletons/SkeletonTable/MySkeletonTable.tsx
|
7624
7718
|
import { Skeleton } from "@mantine/core";
|
7625
|
-
import { jsx as
|
7719
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
7626
7720
|
function MySkeletonTable({ h: h4 = 500 }) {
|
7627
|
-
return /* @__PURE__ */
|
7721
|
+
return /* @__PURE__ */ jsx60(Skeleton, { h: h4 });
|
7628
7722
|
}
|
7629
7723
|
|
7630
7724
|
export {
|
@@ -7650,6 +7744,7 @@ export {
|
|
7650
7744
|
AQButtonCreateByImportFile,
|
7651
7745
|
AQButtonExportData,
|
7652
7746
|
MyButtonCreate,
|
7747
|
+
MyButtonDeleteList,
|
7653
7748
|
MySelect,
|
7654
7749
|
MyFlexEnd,
|
7655
7750
|
useS_ButtonImport,
|