aq-fe-framework 0.1.233 → 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
|
" "
|
@@ -6713,13 +6799,13 @@ function MyFieldset(_a) {
|
|
6713
6799
|
// src/components/Inputs/FileInput/MyFileInput.tsx
|
6714
6800
|
import { FileInput as FileInput3 } from "@mantine/core";
|
6715
6801
|
import { IconFile } from "@tabler/icons-react";
|
6716
|
-
import { jsx as
|
6802
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
6717
6803
|
function MyFileInput(_a) {
|
6718
6804
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6719
|
-
return /* @__PURE__ */
|
6805
|
+
return /* @__PURE__ */ jsx47(
|
6720
6806
|
FileInput3,
|
6721
6807
|
__spreadValues({
|
6722
|
-
rightSection: /* @__PURE__ */
|
6808
|
+
rightSection: /* @__PURE__ */ jsx47(IconFile, {}),
|
6723
6809
|
label,
|
6724
6810
|
placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : ""
|
6725
6811
|
}, rest)
|
@@ -6728,10 +6814,10 @@ function MyFileInput(_a) {
|
|
6728
6814
|
|
6729
6815
|
// src/components/Inputs/NumberInput/MyNumberInput.tsx
|
6730
6816
|
import { NumberInput as NumberInput2 } from "@mantine/core";
|
6731
|
-
import { jsx as
|
6817
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
6732
6818
|
function MyNumberInput(_a) {
|
6733
6819
|
var _b = _a, { minValue, label } = _b, rest = __objRest(_b, ["minValue", "label"]);
|
6734
|
-
return /* @__PURE__ */
|
6820
|
+
return /* @__PURE__ */ jsx48(
|
6735
6821
|
NumberInput2,
|
6736
6822
|
__spreadValues({
|
6737
6823
|
label,
|
@@ -6743,17 +6829,17 @@ function MyNumberInput(_a) {
|
|
6743
6829
|
|
6744
6830
|
// src/components/Inputs/TextArea/MyTextArea.tsx
|
6745
6831
|
import { Textarea } from "@mantine/core";
|
6746
|
-
import { jsx as
|
6832
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
6747
6833
|
function MyTextArea(_a) {
|
6748
6834
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
6749
|
-
return /* @__PURE__ */
|
6835
|
+
return /* @__PURE__ */ jsx49(Textarea, __spreadValues({ label, placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
6750
6836
|
}
|
6751
6837
|
|
6752
6838
|
// src/components/Inputs/TextEditor/MyTextEditor.tsx
|
6753
6839
|
import { Input, ScrollArea as ScrollArea2 } from "@mantine/core";
|
6754
6840
|
import { Link as Link2, RichTextEditor } from "@mantine/tiptap";
|
6755
6841
|
import FileHandler from "@tiptap-pro/extension-file-handler";
|
6756
|
-
import
|
6842
|
+
import Highlight3 from "@tiptap/extension-highlight";
|
6757
6843
|
import Image2 from "@tiptap/extension-image";
|
6758
6844
|
import SubScript from "@tiptap/extension-subscript";
|
6759
6845
|
import Superscript from "@tiptap/extension-superscript";
|
@@ -6761,8 +6847,8 @@ import TextAlign from "@tiptap/extension-text-align";
|
|
6761
6847
|
import Underline from "@tiptap/extension-underline";
|
6762
6848
|
import { useEditor } from "@tiptap/react";
|
6763
6849
|
import StarterKit from "@tiptap/starter-kit";
|
6764
|
-
import { useEffect as useEffect8, useState as
|
6765
|
-
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";
|
6766
6852
|
function MyTextEditor(_a) {
|
6767
6853
|
var _b = _a, {
|
6768
6854
|
autoHiddenToolBar = false,
|
@@ -6781,7 +6867,7 @@ function MyTextEditor(_a) {
|
|
6781
6867
|
"label",
|
6782
6868
|
"withAsterisk"
|
6783
6869
|
]);
|
6784
|
-
const [hiddenToolBar, setHiddenToolBar] =
|
6870
|
+
const [hiddenToolBar, setHiddenToolBar] = useState9(autoHiddenToolBar);
|
6785
6871
|
const editor = useEditor(__spreadValues({
|
6786
6872
|
extensions: [
|
6787
6873
|
StarterKit,
|
@@ -6789,7 +6875,7 @@ function MyTextEditor(_a) {
|
|
6789
6875
|
Link2,
|
6790
6876
|
Superscript,
|
6791
6877
|
SubScript,
|
6792
|
-
|
6878
|
+
Highlight3,
|
6793
6879
|
Image2.extend({
|
6794
6880
|
addAttributes() {
|
6795
6881
|
return {
|
@@ -6864,43 +6950,43 @@ function MyTextEditor(_a) {
|
|
6864
6950
|
editor.commands.setContent(value);
|
6865
6951
|
}
|
6866
6952
|
}, [value, editor]);
|
6867
|
-
return /* @__PURE__ */
|
6868
|
-
/* @__PURE__ */
|
6869
|
-
/* @__PURE__ */
|
6870
|
-
/* @__PURE__ */
|
6871
|
-
/* @__PURE__ */
|
6872
|
-
/* @__PURE__ */
|
6873
|
-
/* @__PURE__ */
|
6874
|
-
/* @__PURE__ */
|
6875
|
-
/* @__PURE__ */
|
6876
|
-
/* @__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, {})
|
6877
6963
|
] }),
|
6878
|
-
/* @__PURE__ */
|
6879
|
-
/* @__PURE__ */
|
6880
|
-
/* @__PURE__ */
|
6881
|
-
/* @__PURE__ */
|
6882
|
-
/* @__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, {})
|
6883
6969
|
] }),
|
6884
|
-
/* @__PURE__ */
|
6885
|
-
/* @__PURE__ */
|
6886
|
-
/* @__PURE__ */
|
6887
|
-
/* @__PURE__ */
|
6888
|
-
/* @__PURE__ */
|
6889
|
-
/* @__PURE__ */
|
6890
|
-
/* @__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, {})
|
6891
6977
|
] }),
|
6892
|
-
/* @__PURE__ */
|
6893
|
-
/* @__PURE__ */
|
6894
|
-
/* @__PURE__ */
|
6978
|
+
/* @__PURE__ */ jsxs28(RichTextEditor.ControlsGroup, { children: [
|
6979
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Link, {}),
|
6980
|
+
/* @__PURE__ */ jsx50(RichTextEditor.Unlink, {})
|
6895
6981
|
] }),
|
6896
|
-
/* @__PURE__ */
|
6897
|
-
/* @__PURE__ */
|
6898
|
-
/* @__PURE__ */
|
6899
|
-
/* @__PURE__ */
|
6900
|
-
/* @__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, {})
|
6901
6987
|
] })
|
6902
6988
|
] }),
|
6903
|
-
/* @__PURE__ */
|
6989
|
+
/* @__PURE__ */ jsx50(
|
6904
6990
|
ScrollArea2.Autosize,
|
6905
6991
|
{
|
6906
6992
|
onMouseDown: () => {
|
@@ -6915,7 +7001,7 @@ function MyTextEditor(_a) {
|
|
6915
7001
|
setHiddenToolBar(false);
|
6916
7002
|
},
|
6917
7003
|
style: { cursor: "text", maxHeight: "400px" },
|
6918
|
-
children: /* @__PURE__ */
|
7004
|
+
children: /* @__PURE__ */ jsx50(RichTextEditor.Content, { mih: contentHeight })
|
6919
7005
|
}
|
6920
7006
|
)
|
6921
7007
|
] }) });
|
@@ -6937,14 +7023,14 @@ function useS_authenticate() {
|
|
6937
7023
|
}
|
6938
7024
|
|
6939
7025
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
6940
|
-
import { jsx as
|
7026
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
6941
7027
|
function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
6942
7028
|
const router = useRouter3();
|
6943
7029
|
const S_Authenticate = useS_authenticate();
|
6944
|
-
return /* @__PURE__ */
|
7030
|
+
return /* @__PURE__ */ jsx51(Button14, { onClick: () => {
|
6945
7031
|
S_Authenticate.setProperty("token", "");
|
6946
7032
|
router.replace(redirectURL);
|
6947
|
-
}, leftSection: /* @__PURE__ */
|
7033
|
+
}, leftSection: /* @__PURE__ */ jsx51(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
6948
7034
|
}
|
6949
7035
|
|
6950
7036
|
// src/components/Layouts/BasicAppShell/BasicAppShell.tsx
|
@@ -6953,7 +7039,7 @@ import {
|
|
6953
7039
|
AppShell,
|
6954
7040
|
Badge as Badge3,
|
6955
7041
|
Divider as Divider2,
|
6956
|
-
Group as
|
7042
|
+
Group as Group16,
|
6957
7043
|
Image as Image3,
|
6958
7044
|
NavLink,
|
6959
7045
|
ScrollArea as ScrollArea3,
|
@@ -6968,8 +7054,8 @@ import {
|
|
6968
7054
|
} from "@tabler/icons-react";
|
6969
7055
|
import Link3 from "next/link";
|
6970
7056
|
import { usePathname as usePathname2 } from "next/navigation";
|
6971
|
-
import { useEffect as useEffect9, useMemo as useMemo3, useState as
|
6972
|
-
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";
|
6973
7059
|
function findBreadcrumbPath(items, currentPath, parents = []) {
|
6974
7060
|
for (const item of items) {
|
6975
7061
|
if (item.link === currentPath) {
|
@@ -6984,13 +7070,13 @@ function findBreadcrumbPath(items, currentPath, parents = []) {
|
|
6984
7070
|
}
|
6985
7071
|
function getRightSection(status) {
|
6986
7072
|
if (status === "Prototype")
|
6987
|
-
return /* @__PURE__ */
|
7073
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
|
6988
7074
|
if (status === "New")
|
6989
|
-
return /* @__PURE__ */
|
7075
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", circle: true, children: "N" });
|
6990
7076
|
if (status === "Menu")
|
6991
|
-
return /* @__PURE__ */
|
7077
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "gray", circle: true, children: "M" });
|
6992
7078
|
if (status === "Change")
|
6993
|
-
return /* @__PURE__ */
|
7079
|
+
return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
|
6994
7080
|
return null;
|
6995
7081
|
}
|
6996
7082
|
function RenderNavLinks({
|
@@ -6998,14 +7084,14 @@ function RenderNavLinks({
|
|
6998
7084
|
}) {
|
6999
7085
|
const basicAppShellStore = useS_BasicAppShell();
|
7000
7086
|
const pathName = usePathname2();
|
7001
|
-
return /* @__PURE__ */
|
7087
|
+
return /* @__PURE__ */ jsx52(Fragment13, { children: items.map((item, index) => /* @__PURE__ */ jsx52(
|
7002
7088
|
NavLink,
|
7003
7089
|
{
|
7004
7090
|
active: item.link === pathName.split("/")[2],
|
7005
7091
|
component: Link3,
|
7006
7092
|
opened: basicAppShellStore.state.groupMenuOpenId.includes(item.label),
|
7007
7093
|
href: `/${pathName.split("/")[1]}/${item.link}` || "#",
|
7008
|
-
label: /* @__PURE__ */
|
7094
|
+
label: /* @__PURE__ */ jsxs29(MyFlexRow, { justify: "space-between", children: [
|
7009
7095
|
item.label,
|
7010
7096
|
" ",
|
7011
7097
|
getRightSection(item.status)
|
@@ -7017,7 +7103,7 @@ function RenderNavLinks({
|
|
7017
7103
|
return;
|
7018
7104
|
}
|
7019
7105
|
},
|
7020
|
-
children: item.links && /* @__PURE__ */
|
7106
|
+
children: item.links && /* @__PURE__ */ jsx52(RenderNavLinks, { items: item.links })
|
7021
7107
|
},
|
7022
7108
|
index
|
7023
7109
|
)) });
|
@@ -7087,7 +7173,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7087
7173
|
const media = useMediaQuery("(min-width: 72em)");
|
7088
7174
|
const GetAQModule_query = useQ_AQ_GetAQModule();
|
7089
7175
|
const BasicAppShell_store = useS_BasicAppShell();
|
7090
|
-
const [faviconUrl, setFaviconUrl] =
|
7176
|
+
const [faviconUrl, setFaviconUrl] = useState10("");
|
7091
7177
|
const allChildItems = useMemo3(() => {
|
7092
7178
|
const result = [];
|
7093
7179
|
const extractChildren = (items) => {
|
@@ -7140,7 +7226,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7140
7226
|
basicAppShellStore.setProperty("note", linkItem == null ? void 0 : linkItem.note);
|
7141
7227
|
basicAppShellStore.setProperty("status", linkItem == null ? void 0 : linkItem.status);
|
7142
7228
|
}, [pathName]);
|
7143
|
-
return /* @__PURE__ */
|
7229
|
+
return /* @__PURE__ */ jsxs29(
|
7144
7230
|
AppShell,
|
7145
7231
|
{
|
7146
7232
|
header: { height: 60 },
|
@@ -7154,80 +7240,80 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7154
7240
|
},
|
7155
7241
|
padding: "md",
|
7156
7242
|
children: [
|
7157
|
-
/* @__PURE__ */
|
7158
|
-
/* @__PURE__ */
|
7159
|
-
/* @__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(
|
7160
7246
|
Tooltip5,
|
7161
7247
|
{
|
7162
7248
|
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7163
|
-
children: /* @__PURE__ */
|
7249
|
+
children: /* @__PURE__ */ jsx52(
|
7164
7250
|
ActionIcon11,
|
7165
7251
|
{
|
7166
7252
|
size: "lg",
|
7167
7253
|
radius: "md",
|
7168
7254
|
variant: "default",
|
7169
7255
|
onClick: basicAppShellStore.toggle,
|
7170
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7256
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx52(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx52(IconLayoutSidebarLeftCollapse, {})
|
7171
7257
|
}
|
7172
7258
|
)
|
7173
7259
|
}
|
7174
7260
|
),
|
7175
|
-
/* @__PURE__ */
|
7261
|
+
/* @__PURE__ */ jsx52(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx52(
|
7176
7262
|
ActionIcon11,
|
7177
7263
|
{
|
7178
7264
|
size: "lg",
|
7179
7265
|
radius: "md",
|
7180
7266
|
variant: "default",
|
7181
7267
|
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7182
|
-
children: /* @__PURE__ */
|
7268
|
+
children: /* @__PURE__ */ jsx52(IconLibraryMinus, {})
|
7183
7269
|
}
|
7184
7270
|
) })
|
7185
7271
|
] }),
|
7186
|
-
/* @__PURE__ */
|
7187
|
-
|
7272
|
+
/* @__PURE__ */ jsx52(
|
7273
|
+
Group16,
|
7188
7274
|
{
|
7189
7275
|
style: {
|
7190
7276
|
position: "absolute",
|
7191
7277
|
left: "50%",
|
7192
7278
|
transform: "translateX(-50%)"
|
7193
7279
|
},
|
7194
|
-
children: /* @__PURE__ */
|
7280
|
+
children: /* @__PURE__ */ jsx52(Text14, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7195
7281
|
}
|
7196
7282
|
),
|
7197
|
-
/* @__PURE__ */
|
7283
|
+
/* @__PURE__ */ jsxs29(Group16, { children: [
|
7198
7284
|
extraTopRight,
|
7199
|
-
/* @__PURE__ */
|
7285
|
+
/* @__PURE__ */ jsx52(MySwitchTheme, {})
|
7200
7286
|
] })
|
7201
7287
|
] }) : (
|
7202
7288
|
// For mobile screens - simplified layout
|
7203
|
-
/* @__PURE__ */
|
7204
|
-
/* @__PURE__ */
|
7289
|
+
/* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", children: [
|
7290
|
+
/* @__PURE__ */ jsx52(
|
7205
7291
|
ActionIcon11,
|
7206
7292
|
{
|
7207
7293
|
size: "lg",
|
7208
7294
|
radius: "md",
|
7209
7295
|
variant: "default",
|
7210
7296
|
onClick: basicAppShellStore.toggle,
|
7211
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7297
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx52(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx52(IconLayoutSidebarLeftCollapse, {})
|
7212
7298
|
}
|
7213
7299
|
),
|
7214
|
-
/* @__PURE__ */
|
7215
|
-
/* @__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: [
|
7216
7302
|
extraTopRight,
|
7217
|
-
/* @__PURE__ */
|
7303
|
+
/* @__PURE__ */ jsx52(MySwitchTheme, {})
|
7218
7304
|
] })
|
7219
7305
|
] })
|
7220
7306
|
) }),
|
7221
|
-
/* @__PURE__ */
|
7222
|
-
/* @__PURE__ */
|
7223
|
-
/* @__PURE__ */
|
7224
|
-
/* @__PURE__ */
|
7225
|
-
/* @__PURE__ */
|
7226
|
-
/* @__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, {})
|
7227
7313
|
] }),
|
7228
|
-
/* @__PURE__ */
|
7229
|
-
/* @__PURE__ */
|
7230
|
-
/* @__PURE__ */
|
7314
|
+
/* @__PURE__ */ jsxs29(AppShell.Section, { p: "md", children: [
|
7315
|
+
/* @__PURE__ */ jsx52(Divider2, {}),
|
7316
|
+
/* @__PURE__ */ jsx52(
|
7231
7317
|
Image3,
|
7232
7318
|
{
|
7233
7319
|
fit: "contain",
|
@@ -7241,7 +7327,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7241
7327
|
)
|
7242
7328
|
] })
|
7243
7329
|
] }),
|
7244
|
-
/* @__PURE__ */
|
7330
|
+
/* @__PURE__ */ jsx52(
|
7245
7331
|
AppShell.Main,
|
7246
7332
|
{
|
7247
7333
|
bg: "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))",
|
@@ -7296,10 +7382,10 @@ function utils_layout_getItemsWithoutLinks(menu) {
|
|
7296
7382
|
|
7297
7383
|
// src/components/Layouts/Container/MyContainer.tsx
|
7298
7384
|
import { Container, Flex as Flex5 } from "@mantine/core";
|
7299
|
-
import { jsx as
|
7385
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
7300
7386
|
function MyContainer(_a) {
|
7301
7387
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
7302
|
-
return /* @__PURE__ */
|
7388
|
+
return /* @__PURE__ */ jsx53(Container, __spreadProps(__spreadValues({ fluid: true }, rest), { children: /* @__PURE__ */ jsx53(Flex5, { direction: "column", children }) }));
|
7303
7389
|
}
|
7304
7390
|
|
7305
7391
|
// src/constants/object/color.ts
|
@@ -7317,7 +7403,7 @@ import {
|
|
7317
7403
|
Container as Container2,
|
7318
7404
|
Divider as Divider3,
|
7319
7405
|
Drawer,
|
7320
|
-
Group as
|
7406
|
+
Group as Group17,
|
7321
7407
|
Image as Image4,
|
7322
7408
|
ScrollArea as ScrollArea4,
|
7323
7409
|
Text as Text15,
|
@@ -7326,7 +7412,7 @@ import {
|
|
7326
7412
|
UnstyledButton,
|
7327
7413
|
useMantineTheme
|
7328
7414
|
} from "@mantine/core";
|
7329
|
-
import { useDisclosure as
|
7415
|
+
import { useDisclosure as useDisclosure11 } from "@mantine/hooks";
|
7330
7416
|
import {
|
7331
7417
|
IconBook,
|
7332
7418
|
IconChartPie3,
|
@@ -7352,7 +7438,7 @@ function useHeaderMegaMenuStore() {
|
|
7352
7438
|
}
|
7353
7439
|
|
7354
7440
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7355
|
-
import { jsx as
|
7441
|
+
import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
7356
7442
|
var mockdata = [
|
7357
7443
|
{
|
7358
7444
|
icon: IconCode,
|
@@ -7386,31 +7472,31 @@ var mockdata = [
|
|
7386
7472
|
}
|
7387
7473
|
];
|
7388
7474
|
function HeaderMegaMenu({ children, menus }) {
|
7389
|
-
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] =
|
7390
|
-
const [linksOpened, { toggle: toggleLinks }] =
|
7475
|
+
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure11(false);
|
7476
|
+
const [linksOpened, { toggle: toggleLinks }] = useDisclosure11(false);
|
7391
7477
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
7392
7478
|
const theme = useMantineTheme();
|
7393
|
-
const links = mockdata.map((item) => /* @__PURE__ */
|
7394
|
-
/* @__PURE__ */
|
7395
|
-
/* @__PURE__ */
|
7396
|
-
/* @__PURE__ */
|
7397
|
-
/* @__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 })
|
7398
7484
|
] })
|
7399
7485
|
] }) }, item.title));
|
7400
|
-
return /* @__PURE__ */
|
7401
|
-
/* @__PURE__ */
|
7402
|
-
/* @__PURE__ */
|
7403
|
-
/* @__PURE__ */
|
7404
|
-
/* @__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)) })
|
7405
7491
|
] }),
|
7406
|
-
/* @__PURE__ */
|
7407
|
-
/* @__PURE__ */
|
7408
|
-
/* @__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, {})
|
7409
7495
|
] }),
|
7410
|
-
/* @__PURE__ */
|
7496
|
+
/* @__PURE__ */ jsx54(Burger, { opened: drawerOpened, onClick: toggleDrawer, hiddenFrom: "sm" })
|
7411
7497
|
] }) }),
|
7412
|
-
/* @__PURE__ */
|
7413
|
-
/* @__PURE__ */
|
7498
|
+
/* @__PURE__ */ jsx54(Container2, { fluid: true, pt: "sm", pb: "md", bg: OBJECT_COlORS.mantineBackgroundSecondary, mih: "93vh", children }),
|
7499
|
+
/* @__PURE__ */ jsx54(
|
7414
7500
|
Drawer,
|
7415
7501
|
{
|
7416
7502
|
opened: drawerOpened,
|
@@ -7420,10 +7506,10 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7420
7506
|
title: "Navigation",
|
7421
7507
|
hiddenFrom: "sm",
|
7422
7508
|
zIndex: 1e6,
|
7423
|
-
children: /* @__PURE__ */
|
7424
|
-
/* @__PURE__ */
|
7425
|
-
/* @__PURE__ */
|
7426
|
-
/* @__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" })
|
7427
7513
|
] })
|
7428
7514
|
}
|
7429
7515
|
)
|
@@ -7431,8 +7517,8 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7431
7517
|
}
|
7432
7518
|
|
7433
7519
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
7434
|
-
import { Badge as Badge4, Breadcrumbs, Code, Container as Container3, Divider as Divider4, Group as
|
7435
|
-
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";
|
7436
7522
|
var getStatusColor = (status) => {
|
7437
7523
|
switch (status) {
|
7438
7524
|
case "Prototype":
|
@@ -7443,10 +7529,10 @@ var getStatusColor = (status) => {
|
|
7443
7529
|
};
|
7444
7530
|
function PageTitle({ title, status, note }) {
|
7445
7531
|
const color = getStatusColor(status);
|
7446
|
-
return /* @__PURE__ */
|
7447
|
-
/* @__PURE__ */
|
7448
|
-
/* @__PURE__ */
|
7449
|
-
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(
|
7450
7536
|
Badge4,
|
7451
7537
|
{
|
7452
7538
|
variant: "gradient",
|
@@ -7457,7 +7543,7 @@ function PageTitle({ title, status, note }) {
|
|
7457
7543
|
}
|
7458
7544
|
)
|
7459
7545
|
] }),
|
7460
|
-
/* @__PURE__ */
|
7546
|
+
/* @__PURE__ */ jsx55(Text16, { size: "lg", c: "dimmed", fs: "italic", children: note })
|
7461
7547
|
] }) });
|
7462
7548
|
}
|
7463
7549
|
function MyPageContent({
|
@@ -7470,11 +7556,11 @@ function MyPageContent({
|
|
7470
7556
|
var _a;
|
7471
7557
|
const basicAppShellStore = useS_BasicAppShell();
|
7472
7558
|
const finalTitle = title || basicAppShellStore.state.title;
|
7473
|
-
return /* @__PURE__ */
|
7474
|
-
/* @__PURE__ */
|
7475
|
-
/* @__PURE__ */
|
7476
|
-
/* @__PURE__ */
|
7477
|
-
/* @__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(
|
7478
7564
|
PageTitle,
|
7479
7565
|
{
|
7480
7566
|
title: finalTitle,
|
@@ -7484,64 +7570,64 @@ function MyPageContent({
|
|
7484
7570
|
),
|
7485
7571
|
leftTopBar
|
7486
7572
|
] }),
|
7487
|
-
/* @__PURE__ */
|
7573
|
+
/* @__PURE__ */ jsxs31(Group18, { p: "md", children: [
|
7488
7574
|
rightTopBar,
|
7489
|
-
/* @__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)) })
|
7490
7576
|
] })
|
7491
7577
|
] }),
|
7492
|
-
/* @__PURE__ */
|
7578
|
+
/* @__PURE__ */ jsx55(Divider4, { my: "xs" }),
|
7493
7579
|
children,
|
7494
|
-
/* @__PURE__ */
|
7495
|
-
/* @__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 }) })
|
7496
7582
|
] });
|
7497
7583
|
}
|
7498
7584
|
|
7499
7585
|
// src/components/Layouts/Tab/MyTab.tsx
|
7500
7586
|
import { rem, Space as Space3, Tabs } from "@mantine/core";
|
7501
|
-
import { jsx as
|
7587
|
+
import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
7502
7588
|
function MyTab(_a) {
|
7503
7589
|
var _b = _a, { tabList, children } = _b, rest = __objRest(_b, ["tabList", "children"]);
|
7504
7590
|
const iconStyle = { width: rem(20), height: rem(20) };
|
7505
|
-
return /* @__PURE__ */
|
7506
|
-
/* @__PURE__ */
|
7507
|
-
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);
|
7508
7594
|
}) }),
|
7509
|
-
/* @__PURE__ */
|
7595
|
+
/* @__PURE__ */ jsx56(Space3, { my: "md" }),
|
7510
7596
|
children
|
7511
7597
|
] }));
|
7512
7598
|
}
|
7513
7599
|
|
7514
7600
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
7515
|
-
import { ActionIcon as ActionIcon12, Button as Button16, Fieldset as Fieldset5, Group as
|
7516
|
-
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";
|
7517
7603
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
7518
|
-
import { jsx as
|
7604
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
7519
7605
|
function MyDataTableSelect(_a) {
|
7520
7606
|
var _b = _a, { modalSize, renderTopToolbarCustomActions, data, selectButtonlabel, listState, columns, listLabel } = _b, rest = __objRest(_b, ["modalSize", "renderTopToolbarCustomActions", "data", "selectButtonlabel", "listState", "columns", "listLabel"]);
|
7521
|
-
const disc =
|
7607
|
+
const disc = useDisclosure12(false);
|
7522
7608
|
if (data == void 0) return "\u0110ang t\u1EA3i...";
|
7523
|
-
return /* @__PURE__ */
|
7524
|
-
/* @__PURE__ */
|
7609
|
+
return /* @__PURE__ */ jsxs33(Fieldset5, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: [
|
7610
|
+
/* @__PURE__ */ jsx57(
|
7525
7611
|
MyDataTable,
|
7526
7612
|
__spreadValues({
|
7527
7613
|
renderTopToolbarCustomActions: ({ table }) => {
|
7528
|
-
return /* @__PURE__ */
|
7614
|
+
return /* @__PURE__ */ jsxs33(Group19, { children: [
|
7529
7615
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
7530
|
-
/* @__PURE__ */
|
7616
|
+
/* @__PURE__ */ jsx57(Button16, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
7531
7617
|
] });
|
7532
7618
|
},
|
7533
7619
|
columns,
|
7534
7620
|
data: listState[0],
|
7535
7621
|
renderRowActions: ({ row }) => {
|
7536
|
-
return /* @__PURE__ */
|
7622
|
+
return /* @__PURE__ */ jsx57(MyCenterFull, { children: /* @__PURE__ */ jsx57(ActionIcon12, { color: "red", onClick: () => listState[1].remove(row.index), children: /* @__PURE__ */ jsx57(IconX2, {}) }) });
|
7537
7623
|
}
|
7538
7624
|
}, rest)
|
7539
7625
|
),
|
7540
|
-
/* @__PURE__ */
|
7626
|
+
/* @__PURE__ */ jsx57(Modal11, { opened: disc[0], onClose: disc[1].close, size: modalSize || "80%", children: /* @__PURE__ */ jsx57(
|
7541
7627
|
MyDataTable,
|
7542
7628
|
__spreadValues({
|
7543
7629
|
renderTopToolbarCustomActions: ({ table }) => {
|
7544
|
-
return /* @__PURE__ */
|
7630
|
+
return /* @__PURE__ */ jsx57(Button16, { onClick: () => {
|
7545
7631
|
table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
|
7546
7632
|
disc[1].close();
|
7547
7633
|
}, children: "Ch\u1ECDn" });
|
@@ -7557,7 +7643,7 @@ function MyDataTableSelect(_a) {
|
|
7557
7643
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
7558
7644
|
import { Select as Select3 } from "@mantine/core";
|
7559
7645
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
7560
|
-
import { jsx as
|
7646
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
7561
7647
|
function MySelectAPIGet(_a) {
|
7562
7648
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
7563
7649
|
var _a2;
|
@@ -7576,7 +7662,7 @@ function MySelectAPIGet(_a) {
|
|
7576
7662
|
label: `${item.code}-${item.name}`
|
7577
7663
|
};
|
7578
7664
|
});
|
7579
|
-
return /* @__PURE__ */
|
7665
|
+
return /* @__PURE__ */ jsx58(
|
7580
7666
|
Select3,
|
7581
7667
|
__spreadValues({
|
7582
7668
|
label,
|
@@ -7589,9 +7675,9 @@ function MySelectAPIGet(_a) {
|
|
7589
7675
|
// src/components/ScheduleX/MyScheduleX.tsx
|
7590
7676
|
import { useNextCalendarApp as useNextCalendarApp2, ScheduleXCalendar as ScheduleXCalendar2 } from "@schedule-x/react";
|
7591
7677
|
import { createEventsServicePlugin as createEventsServicePlugin2 } from "@schedule-x/events-service";
|
7592
|
-
import { useState as
|
7678
|
+
import { useState as useState11 } from "react";
|
7593
7679
|
import { createEventModalPlugin as createEventModalPlugin2 } from "@schedule-x/event-modal";
|
7594
|
-
import { jsx as
|
7680
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
7595
7681
|
function MyScheduleX({
|
7596
7682
|
values,
|
7597
7683
|
timeGridEvent,
|
@@ -7600,8 +7686,8 @@ function MyScheduleX({
|
|
7600
7686
|
startDayBoundaries = "05:00",
|
7601
7687
|
endDayBoundaries = "21:00"
|
7602
7688
|
}) {
|
7603
|
-
const eventsService =
|
7604
|
-
const eventModalPlugin =
|
7689
|
+
const eventsService = useState11(() => createEventsServicePlugin2())[0];
|
7690
|
+
const eventModalPlugin = useState11(() => createEventModalPlugin2())[0];
|
7605
7691
|
const calendar = useNextCalendarApp2({
|
7606
7692
|
locale: "vi-VN",
|
7607
7693
|
dayBoundaries: {
|
@@ -7616,7 +7702,7 @@ function MyScheduleX({
|
|
7616
7702
|
events: values,
|
7617
7703
|
plugins: [eventsService, eventModalPlugin]
|
7618
7704
|
});
|
7619
|
-
return /* @__PURE__ */
|
7705
|
+
return /* @__PURE__ */ jsx59(
|
7620
7706
|
ScheduleXCalendar2,
|
7621
7707
|
{
|
7622
7708
|
calendarApp: calendar,
|
@@ -7630,9 +7716,9 @@ function MyScheduleX({
|
|
7630
7716
|
|
7631
7717
|
// src/components/Skeletons/SkeletonTable/MySkeletonTable.tsx
|
7632
7718
|
import { Skeleton } from "@mantine/core";
|
7633
|
-
import { jsx as
|
7719
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
7634
7720
|
function MySkeletonTable({ h: h4 = 500 }) {
|
7635
|
-
return /* @__PURE__ */
|
7721
|
+
return /* @__PURE__ */ jsx60(Skeleton, { h: h4 });
|
7636
7722
|
}
|
7637
7723
|
|
7638
7724
|
export {
|
@@ -7658,6 +7744,7 @@ export {
|
|
7658
7744
|
AQButtonCreateByImportFile,
|
7659
7745
|
AQButtonExportData,
|
7660
7746
|
MyButtonCreate,
|
7747
|
+
MyButtonDeleteList,
|
7661
7748
|
MySelect,
|
7662
7749
|
MyFlexEnd,
|
7663
7750
|
useS_ButtonImport,
|