aq-fe-framework 0.1.214 → 0.1.216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BasicAppShell-BwcDlG28.d.mts → BasicAppShell-CGKvZ5wV.d.mts} +1 -0
- package/dist/{chunk-4LGIOYGW.mjs → chunk-EF6GAQ2S.mjs} +385 -340
- package/dist/components/index.d.mts +8 -6
- package/dist/components/index.mjs +2 -4
- package/dist/modules-features/index.d.mts +1 -1
- package/dist/modules-features/index.mjs +61 -7
- package/package.json +1 -1
@@ -2,15 +2,15 @@ import {
|
|
2
2
|
baseAxios_default,
|
3
3
|
useQ_AQ_GetAQModule
|
4
4
|
} from "./chunk-ZFQT5ML6.mjs";
|
5
|
-
import {
|
6
|
-
createGenericStore
|
7
|
-
} from "./chunk-Y3YGC5IH.mjs";
|
8
5
|
import {
|
9
6
|
utils_pdf_download
|
10
7
|
} from "./chunk-5U2JSHSJ.mjs";
|
11
8
|
import {
|
12
9
|
utils_notification_show
|
13
10
|
} from "./chunk-7ZCOFATU.mjs";
|
11
|
+
import {
|
12
|
+
createGenericStore
|
13
|
+
} from "./chunk-Y3YGC5IH.mjs";
|
14
14
|
import {
|
15
15
|
__objRest,
|
16
16
|
__spreadProps,
|
@@ -626,152 +626,110 @@ function MySwitchTheme() {
|
|
626
626
|
}
|
627
627
|
|
628
628
|
// src/components/AppSpotlight/MyAppSpotlight.tsx
|
629
|
+
import {
|
630
|
+
Badge,
|
631
|
+
Group as Group3,
|
632
|
+
Text as Text4,
|
633
|
+
TextInput as TextInput2
|
634
|
+
} from "@mantine/core";
|
629
635
|
import { Spotlight, spotlight } from "@mantine/spotlight";
|
630
636
|
import { IconSearch } from "@tabler/icons-react";
|
631
637
|
import { usePathname, useRouter } from "next/navigation";
|
632
638
|
import { useMemo, useState as useState5 } from "react";
|
633
|
-
|
634
|
-
// src/components/Layouts/BasicAppShell/useS_BasicAppShell.ts
|
635
|
-
var useStore = createGenericStore({
|
636
|
-
initialState: {
|
637
|
-
menuCode: "",
|
638
|
-
moduleCode: "Module code",
|
639
|
-
moduleName: "Module name",
|
640
|
-
title: "",
|
641
|
-
opened: true,
|
642
|
-
groupMenuOpenId: []
|
643
|
-
},
|
644
|
-
storageKey: "useS_BasicAppShell"
|
645
|
-
});
|
646
|
-
function useS_BasicAppShell() {
|
647
|
-
const store = useStore();
|
648
|
-
const GetAQModule_query = useQ_AQ_GetAQModule();
|
649
|
-
function toggle() {
|
650
|
-
store.setProperty("opened", !store.state.opened);
|
651
|
-
}
|
652
|
-
function toggleGroupMenuOpenId(id) {
|
653
|
-
const currentIds = store.state.groupMenuOpenId;
|
654
|
-
if (currentIds.includes(id)) {
|
655
|
-
store.setProperty(
|
656
|
-
"groupMenuOpenId",
|
657
|
-
currentIds.filter((existingId) => existingId !== id)
|
658
|
-
);
|
659
|
-
} else {
|
660
|
-
store.setProperty("groupMenuOpenId", [...currentIds, id]);
|
661
|
-
}
|
662
|
-
}
|
663
|
-
function clearGroupMenuOpenId() {
|
664
|
-
store.setProperty("groupMenuOpenId", []);
|
665
|
-
}
|
666
|
-
function setDefault() {
|
667
|
-
var _a, _b;
|
668
|
-
if (!GetAQModule_query.data) return;
|
669
|
-
store.setProperty("faviconFileDetail", (_a = GetAQModule_query.data) == null ? void 0 : _a.faviconFileDetail);
|
670
|
-
store.setProperty("logoFileDetail", (_b = GetAQModule_query.data) == null ? void 0 : _b.logoFileDetail);
|
671
|
-
}
|
672
|
-
return __spreadProps(__spreadValues({}, store), {
|
673
|
-
toggle,
|
674
|
-
toggleGroupMenuOpenId,
|
675
|
-
clearGroupMenuOpenId,
|
676
|
-
setDefault
|
677
|
-
});
|
678
|
-
}
|
679
|
-
|
680
|
-
// src/components/AppSpotlight/MyAppSpotlight.tsx
|
681
|
-
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
682
|
-
function convertMenuToSpotlightActions(items, router, parentPath = "", sideBarStore, pathName) {
|
683
|
-
let actions = [];
|
684
|
-
items.forEach((item) => {
|
685
|
-
if (item.link) {
|
686
|
-
actions.push({
|
687
|
-
id: item.label.toLowerCase().replace(/\s+/g, "-"),
|
688
|
-
label: item.label,
|
689
|
-
description: `Chuy\u1EC3n \u0111\u1EBFn ${item.label} (Code: ${item.link})`,
|
690
|
-
onClick: () => {
|
691
|
-
sideBarStore.setProperty("title", item.label);
|
692
|
-
sideBarStore.setProperty("menuCode", item.link);
|
693
|
-
router.push(
|
694
|
-
pathName.split("/")[0] + "/" + pathName.split("/")[1] + "/" + item.link
|
695
|
-
);
|
696
|
-
spotlight.close();
|
697
|
-
},
|
698
|
-
rightSection: item.status ? item.status === "Prototype" ? "P" : item.status === "New" ? "N" : item.status === "Menu" ? "M" : null : null
|
699
|
-
});
|
700
|
-
}
|
701
|
-
if (item.links) {
|
702
|
-
actions = actions.concat(
|
703
|
-
convertMenuToSpotlightActions(
|
704
|
-
item.links,
|
705
|
-
router,
|
706
|
-
item.link || "",
|
707
|
-
sideBarStore,
|
708
|
-
pathName
|
709
|
-
)
|
710
|
-
);
|
711
|
-
}
|
712
|
-
});
|
713
|
-
return actions;
|
714
|
-
}
|
639
|
+
import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
715
640
|
function MyAppSpotlight({ menu }) {
|
716
|
-
const [query, setQuery] = useState5("");
|
717
641
|
const router = useRouter();
|
718
642
|
const pathName = usePathname();
|
719
|
-
const
|
720
|
-
const
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
643
|
+
const [query, setQuery] = useState5("");
|
644
|
+
const allChildItems = useMemo(() => {
|
645
|
+
const result = [];
|
646
|
+
const extractChildren = (items) => {
|
647
|
+
items.forEach((item) => {
|
648
|
+
if (item.link) {
|
649
|
+
result.push(item);
|
650
|
+
}
|
651
|
+
if (item.links) {
|
652
|
+
extractChildren(item.links);
|
653
|
+
}
|
654
|
+
});
|
655
|
+
};
|
656
|
+
extractChildren(menu);
|
657
|
+
return result;
|
658
|
+
}, [menu]);
|
659
|
+
const filteredItems = allChildItems.filter((item) => {
|
660
|
+
var _a, _b;
|
661
|
+
const lowerQuery = query.toLowerCase().trim();
|
662
|
+
return item.label.toLowerCase().includes(lowerQuery) || ((_a = item.note) == null ? void 0 : _a.toLowerCase().includes(lowerQuery)) || ((_b = item.link) == null ? void 0 : _b.toLowerCase().includes(lowerQuery));
|
663
|
+
});
|
664
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
665
|
+
/* @__PURE__ */ jsx16(
|
666
|
+
TextInput2,
|
667
|
+
{
|
668
|
+
mt: "md",
|
669
|
+
placeholder: "T\xECm menu (Ctrl + K)",
|
670
|
+
mx: 10,
|
671
|
+
component: "button",
|
672
|
+
onClick: spotlight.open,
|
673
|
+
leftSection: /* @__PURE__ */ jsx16(IconSearch, {}),
|
674
|
+
children: "T\xECm ki\u1EBFm (Ctrl + K)"
|
739
675
|
}
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
676
|
+
),
|
677
|
+
/* @__PURE__ */ jsxs7(
|
678
|
+
Spotlight.Root,
|
679
|
+
{
|
680
|
+
query,
|
681
|
+
onQueryChange: setQuery,
|
682
|
+
children: [
|
683
|
+
/* @__PURE__ */ jsx16(
|
684
|
+
Spotlight.Search,
|
685
|
+
{
|
686
|
+
placeholder: "T\xECm ki\u1EBFm menu...",
|
687
|
+
leftSection: /* @__PURE__ */ jsx16(IconSearch, { stroke: 1.5 })
|
688
|
+
}
|
689
|
+
),
|
690
|
+
/* @__PURE__ */ jsx16(Spotlight.ActionsList, { mah: "800px", children: filteredItems.length > 0 ? filteredItems.map((item, idx) => /* @__PURE__ */ jsx16(
|
691
|
+
Spotlight.Action,
|
692
|
+
{
|
693
|
+
onClick: () => {
|
694
|
+
router.push(
|
695
|
+
`/${pathName.split("/")[1]}/${item.link}`
|
696
|
+
);
|
697
|
+
spotlight.close();
|
698
|
+
},
|
699
|
+
children: /* @__PURE__ */ jsxs7(Group3, { wrap: "nowrap", w: "100%", children: [
|
700
|
+
/* @__PURE__ */ jsxs7("div", { style: { flex: 1 }, children: [
|
701
|
+
/* @__PURE__ */ jsx16(Text4, { children: item.label }),
|
702
|
+
/* @__PURE__ */ jsxs7(Group3, { gap: 5, children: [
|
703
|
+
item.note && /* @__PURE__ */ jsx16(Text4, { opacity: 0.6, size: "xs", children: item.note }),
|
704
|
+
/* @__PURE__ */ jsxs7(Text4, { opacity: 0.6, size: "xs", children: [
|
705
|
+
"(",
|
706
|
+
item.link,
|
707
|
+
")"
|
708
|
+
] })
|
709
|
+
] })
|
710
|
+
] }),
|
711
|
+
item.status && item.status != "Default" && /* @__PURE__ */ jsx16(Badge, { variant: "default", children: item.status })
|
712
|
+
] })
|
713
|
+
},
|
714
|
+
idx
|
715
|
+
)) : /* @__PURE__ */ jsx16(Spotlight.Empty, { children: "Kh\xF4ng t\xECm th\u1EA5y trang..." }) })
|
716
|
+
]
|
717
|
+
}
|
718
|
+
)
|
719
|
+
] });
|
762
720
|
}
|
763
721
|
|
764
722
|
// src/components/Buttons/Anchor/MyAnchorViewPDF.tsx
|
765
|
-
import { ActionIcon as ActionIcon8, Anchor, Group as
|
723
|
+
import { ActionIcon as ActionIcon8, Anchor, Group as Group4, Modal as Modal4, Paper as Paper2, Text as Text5 } from "@mantine/core";
|
766
724
|
import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
|
767
725
|
import { IconMaximize as IconMaximize2, IconMinimize as IconMinimize2 } from "@tabler/icons-react";
|
768
726
|
import { useState as useState6 } from "react";
|
769
|
-
import { Fragment as
|
727
|
+
import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
770
728
|
function MyAnchorViewPDF({ label, pdfLink }) {
|
771
729
|
const disc = useDisclosure5(false);
|
772
730
|
const fullScreen = useState6(false);
|
773
731
|
const hSize = useState6("80vh");
|
774
|
-
return /* @__PURE__ */ jsxs8(
|
732
|
+
return /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
775
733
|
/* @__PURE__ */ jsx17(Anchor, { onClick: disc[1].open, children: label }),
|
776
734
|
/* @__PURE__ */ jsx17(
|
777
735
|
Modal4,
|
@@ -780,8 +738,8 @@ function MyAnchorViewPDF({ label, pdfLink }) {
|
|
780
738
|
opened: disc[0],
|
781
739
|
onClose: disc[1].close,
|
782
740
|
size: "80%",
|
783
|
-
title: /* @__PURE__ */ jsxs8(
|
784
|
-
/* @__PURE__ */ jsx17(
|
741
|
+
title: /* @__PURE__ */ jsxs8(Group4, { children: [
|
742
|
+
/* @__PURE__ */ jsx17(Text5, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
785
743
|
fullScreen[0] ? /* @__PURE__ */ jsx17(
|
786
744
|
ActionIcon8,
|
787
745
|
{
|
@@ -818,7 +776,7 @@ import * as XLSX from "xlsx";
|
|
818
776
|
// src/components/Buttons/ButtonModal/MyButtonModal.tsx
|
819
777
|
import { Button as Button3, Modal as Modal5 } from "@mantine/core";
|
820
778
|
import { IconEdit as IconEdit4, IconPlus as IconPlus4, IconTrash as IconTrash4 } from "@tabler/icons-react";
|
821
|
-
import { Fragment as
|
779
|
+
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
822
780
|
function MyButtonModal(_a) {
|
823
781
|
var _b = _a, {
|
824
782
|
fullScreen = false,
|
@@ -841,7 +799,7 @@ function MyButtonModal(_a) {
|
|
841
799
|
]);
|
842
800
|
const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
|
843
801
|
if (crudType == "default") {
|
844
|
-
return /* @__PURE__ */ jsxs9(
|
802
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
845
803
|
/* @__PURE__ */ jsx18(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: label })),
|
846
804
|
/* @__PURE__ */ jsx18(
|
847
805
|
Modal5,
|
@@ -857,7 +815,7 @@ function MyButtonModal(_a) {
|
|
857
815
|
] });
|
858
816
|
}
|
859
817
|
if (crudType == "create") {
|
860
|
-
return /* @__PURE__ */ jsxs9(
|
818
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
861
819
|
/* @__PURE__ */ jsx18(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, leftSection: /* @__PURE__ */ jsx18(IconPlus4, {}) }, rest), { children: label ? label : `Th\xEAm` })),
|
862
820
|
/* @__PURE__ */ jsx18(
|
863
821
|
Modal5,
|
@@ -873,7 +831,7 @@ function MyButtonModal(_a) {
|
|
873
831
|
] });
|
874
832
|
}
|
875
833
|
if (crudType == "createMultiple") {
|
876
|
-
return /* @__PURE__ */ jsxs9(
|
834
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
877
835
|
/* @__PURE__ */ jsx18(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "green", leftSection: /* @__PURE__ */ jsx18(IconPlus4, {}) }, rest), { children: label ? label : `Import ${objectNameLower}` })),
|
878
836
|
/* @__PURE__ */ jsx18(
|
879
837
|
Modal5,
|
@@ -889,7 +847,7 @@ function MyButtonModal(_a) {
|
|
889
847
|
] });
|
890
848
|
}
|
891
849
|
if (crudType == "update") {
|
892
|
-
return /* @__PURE__ */ jsxs9(
|
850
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
893
851
|
/* @__PURE__ */ jsx18(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "yellow", leftSection: /* @__PURE__ */ jsx18(IconEdit4, {}) }, rest), { children: label ? label : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}` })),
|
894
852
|
/* @__PURE__ */ jsx18(
|
895
853
|
Modal5,
|
@@ -905,7 +863,7 @@ function MyButtonModal(_a) {
|
|
905
863
|
] });
|
906
864
|
}
|
907
865
|
if (crudType == "delete") {
|
908
|
-
return /* @__PURE__ */ jsxs9(
|
866
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
909
867
|
/* @__PURE__ */ jsx18(Button3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "red", leftSection: /* @__PURE__ */ jsx18(IconTrash4, {}) }, rest), { children: label ? label : `X\xF3a ${objectNameLower}` })),
|
910
868
|
/* @__PURE__ */ jsx18(
|
911
869
|
Modal5,
|
@@ -1103,21 +1061,21 @@ function MySelect(_a) {
|
|
1103
1061
|
}
|
1104
1062
|
|
1105
1063
|
// src/components/Layouts/FlexEnd/MyFlexEnd.tsx
|
1106
|
-
import { Group as
|
1064
|
+
import { Group as Group5 } from "@mantine/core";
|
1107
1065
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
1108
1066
|
function MyFlexEnd(_a) {
|
1109
1067
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1110
|
-
return /* @__PURE__ */ jsx23(
|
1068
|
+
return /* @__PURE__ */ jsx23(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1111
1069
|
}
|
1112
1070
|
|
1113
1071
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1114
|
-
import { Button as Button5, Divider, Fieldset, Group as
|
1072
|
+
import { Button as Button5, Divider, Fieldset, Group as Group6, Modal as Modal6, SimpleGrid, Space as Space2, Table } from "@mantine/core";
|
1115
1073
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
1116
1074
|
|
1117
1075
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
1118
1076
|
import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
|
1119
1077
|
import * as XLSX3 from "xlsx";
|
1120
|
-
var
|
1078
|
+
var useStore = createGenericStore({
|
1121
1079
|
initialState: {
|
1122
1080
|
data: [],
|
1123
1081
|
title: [],
|
@@ -1126,7 +1084,7 @@ var useStore2 = createGenericStore({
|
|
1126
1084
|
}
|
1127
1085
|
});
|
1128
1086
|
function useS_ButtonImport() {
|
1129
|
-
const store =
|
1087
|
+
const store = useStore();
|
1130
1088
|
function autoMap() {
|
1131
1089
|
if (!store.state.data || !store.state.data.length || !store.state.fieldConfig) return;
|
1132
1090
|
const sampleRow = store.state.data[0];
|
@@ -1290,7 +1248,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1290
1248
|
)) })
|
1291
1249
|
] }),
|
1292
1250
|
/* @__PURE__ */ jsx24(Space2, {}),
|
1293
|
-
/* @__PURE__ */ jsx24(
|
1251
|
+
/* @__PURE__ */ jsx24(Group6, { children: /* @__PURE__ */ jsx24(
|
1294
1252
|
Button5,
|
1295
1253
|
{
|
1296
1254
|
onClick: () => {
|
@@ -1368,7 +1326,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1368
1326
|
}
|
1369
1327
|
|
1370
1328
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1371
|
-
import { Button as Button6, Group as
|
1329
|
+
import { Button as Button6, Group as Group7, Portal } from "@mantine/core";
|
1372
1330
|
import { IconDownload as IconDownload3 } from "@tabler/icons-react";
|
1373
1331
|
import { download, generateCsv, mkConfig } from "export-to-csv";
|
1374
1332
|
import {
|
@@ -1377,7 +1335,7 @@ import {
|
|
1377
1335
|
} from "mantine-react-table";
|
1378
1336
|
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
1379
1337
|
import { useEffect as useEffect5 } from "react";
|
1380
|
-
import { Fragment as
|
1338
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
1381
1339
|
function formatData(data, formats) {
|
1382
1340
|
return data.map((row) => {
|
1383
1341
|
const transformedRow = {};
|
@@ -1418,9 +1376,9 @@ function MyDataTable(_a) {
|
|
1418
1376
|
columns,
|
1419
1377
|
data,
|
1420
1378
|
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1421
|
-
return /* @__PURE__ */ jsxs13(
|
1379
|
+
return /* @__PURE__ */ jsxs13(Group7, { children: [
|
1422
1380
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
1423
|
-
exportAble && /* @__PURE__ */ jsx25(
|
1381
|
+
exportAble && /* @__PURE__ */ jsx25(Fragment7, { children: /* @__PURE__ */ jsx25(
|
1424
1382
|
Button6,
|
1425
1383
|
{
|
1426
1384
|
color: "green.8",
|
@@ -1582,14 +1540,14 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1582
1540
|
}
|
1583
1541
|
|
1584
1542
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1585
|
-
import { Fragment as
|
1543
|
+
import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
1586
1544
|
function MyButtonImport({
|
1587
1545
|
onExportStructure,
|
1588
1546
|
onImport
|
1589
1547
|
}) {
|
1590
1548
|
const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
|
1591
1549
|
const store = useS_ButtonImport();
|
1592
|
-
return /* @__PURE__ */ jsxs15(
|
1550
|
+
return /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
1593
1551
|
/* @__PURE__ */ jsx27(Button8, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx27(IconFileImport2, {}), title: "Import", children: "Import" }),
|
1594
1552
|
/* @__PURE__ */ jsxs15(Modal8.Stack, { children: [
|
1595
1553
|
/* @__PURE__ */ jsx27(SelectFileModal, { stack, onExportStructure }),
|
@@ -1601,7 +1559,7 @@ function MyButtonImport({
|
|
1601
1559
|
// src/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx
|
1602
1560
|
import { Button as Button9, Fieldset as Fieldset3, Modal as Modal9 } from "@mantine/core";
|
1603
1561
|
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1604
|
-
import { Fragment as
|
1562
|
+
import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
1605
1563
|
function AQSelectTableByOpenModal(_a) {
|
1606
1564
|
var _b = _a, {
|
1607
1565
|
setSelectedData,
|
@@ -1629,7 +1587,7 @@ function AQSelectTableByOpenModal(_a) {
|
|
1629
1587
|
"closeAfterSelect"
|
1630
1588
|
]);
|
1631
1589
|
const disclosure = useDisclosure8(false);
|
1632
|
-
return /* @__PURE__ */ jsxs16(
|
1590
|
+
return /* @__PURE__ */ jsxs16(Fragment9, { children: [
|
1633
1591
|
/* @__PURE__ */ jsx28(
|
1634
1592
|
Button9,
|
1635
1593
|
__spreadProps(__spreadValues({
|
@@ -1670,7 +1628,7 @@ import { useRef as useRef2 } from "react";
|
|
1670
1628
|
import { Button as Button10 } from "@mantine/core";
|
1671
1629
|
import { IconPrinter as IconPrinter2 } from "@tabler/icons-react";
|
1672
1630
|
import { useReactToPrint } from "react-to-print";
|
1673
|
-
import { Fragment as
|
1631
|
+
import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
1674
1632
|
function MyButtonPrintPDF(_a) {
|
1675
1633
|
var _b = _a, { contentToPrint, children } = _b, rest = __objRest(_b, ["contentToPrint", "children"]);
|
1676
1634
|
const printRef = useRef2(null);
|
@@ -1684,7 +1642,7 @@ function MyButtonPrintPDF(_a) {
|
|
1684
1642
|
if (!contentToPrint) return;
|
1685
1643
|
handlePrint();
|
1686
1644
|
}
|
1687
|
-
return /* @__PURE__ */ jsxs17(
|
1645
|
+
return /* @__PURE__ */ jsxs17(Fragment10, { children: [
|
1688
1646
|
/* @__PURE__ */ jsx29("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx29("div", { ref: printRef, children: contentToPrint }) }),
|
1689
1647
|
/* @__PURE__ */ jsx29(Button10, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx29(IconPrinter2, {}) }, rest), { children }))
|
1690
1648
|
] });
|
@@ -1834,7 +1792,7 @@ function MyButtonPrintTablePDF(_a) {
|
|
1834
1792
|
}
|
1835
1793
|
|
1836
1794
|
// src/components/Buttons/ButtonRouterBack/MyButtonRouterBack.tsx
|
1837
|
-
import {
|
1795
|
+
import { ActionIcon as ActionIcon9 } from "@mantine/core";
|
1838
1796
|
import { IconArrowBack } from "@tabler/icons-react";
|
1839
1797
|
import { useRouter as useRouter2 } from "next/navigation";
|
1840
1798
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
@@ -1842,10 +1800,10 @@ function MyButtonRouterBack(_a) {
|
|
1842
1800
|
var _b = _a, { url, label } = _b, rest = __objRest(_b, ["url", "label"]);
|
1843
1801
|
const router = useRouter2();
|
1844
1802
|
return /* @__PURE__ */ jsx32(
|
1845
|
-
|
1803
|
+
ActionIcon9,
|
1846
1804
|
__spreadProps(__spreadValues({
|
1805
|
+
size: "xl",
|
1847
1806
|
variant: "light",
|
1848
|
-
leftSection: /* @__PURE__ */ jsx32(IconArrowBack, { stroke: 2 }),
|
1849
1807
|
onClick: () => {
|
1850
1808
|
if (url) {
|
1851
1809
|
router.replace(url);
|
@@ -1854,27 +1812,27 @@ function MyButtonRouterBack(_a) {
|
|
1854
1812
|
router.back();
|
1855
1813
|
}
|
1856
1814
|
}, rest), {
|
1857
|
-
children:
|
1815
|
+
children: /* @__PURE__ */ jsx32(IconArrowBack, { stroke: 2 })
|
1858
1816
|
})
|
1859
1817
|
);
|
1860
1818
|
}
|
1861
1819
|
|
1862
1820
|
// src/components/Buttons/ButtonViewPDF/MyButtonViewPDF.tsx
|
1863
1821
|
import {
|
1864
|
-
ActionIcon as
|
1865
|
-
Button as
|
1866
|
-
Group as
|
1822
|
+
ActionIcon as ActionIcon10,
|
1823
|
+
Button as Button11,
|
1824
|
+
Group as Group8,
|
1867
1825
|
LoadingOverlay,
|
1868
1826
|
Modal as Modal10,
|
1869
1827
|
Paper as Paper3,
|
1870
|
-
Text as
|
1828
|
+
Text as Text6,
|
1871
1829
|
Tooltip as Tooltip4
|
1872
1830
|
} from "@mantine/core";
|
1873
1831
|
import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
|
1874
1832
|
import { IconLivePhoto as IconLivePhoto2, IconMaximize as IconMaximize3, IconMinimize as IconMinimize3 } from "@tabler/icons-react";
|
1875
1833
|
import { useQuery } from "@tanstack/react-query";
|
1876
1834
|
import { useState as useState7 } from "react";
|
1877
|
-
import { Fragment as
|
1835
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
1878
1836
|
function MyButtonViewPDF({
|
1879
1837
|
id,
|
1880
1838
|
modalSize = "80%",
|
@@ -1899,9 +1857,9 @@ function MyButtonViewPDF({
|
|
1899
1857
|
},
|
1900
1858
|
enabled: disc[0] == true
|
1901
1859
|
});
|
1902
|
-
return /* @__PURE__ */ jsxs19(
|
1860
|
+
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
1903
1861
|
/* @__PURE__ */ jsx33(Tooltip4, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx33(
|
1904
|
-
|
1862
|
+
ActionIcon10,
|
1905
1863
|
{
|
1906
1864
|
onClick: () => {
|
1907
1865
|
disc[1].open();
|
@@ -1909,7 +1867,7 @@ function MyButtonViewPDF({
|
|
1909
1867
|
children: /* @__PURE__ */ jsx33(IconLivePhoto2, {})
|
1910
1868
|
}
|
1911
1869
|
) : /* @__PURE__ */ jsx33(
|
1912
|
-
|
1870
|
+
Button11,
|
1913
1871
|
{
|
1914
1872
|
color: "cyan",
|
1915
1873
|
onClick: () => {
|
@@ -1926,10 +1884,10 @@ function MyButtonViewPDF({
|
|
1926
1884
|
opened: disc[0],
|
1927
1885
|
onClose: disc[1].close,
|
1928
1886
|
size: modalSize,
|
1929
|
-
title: /* @__PURE__ */ jsxs19(
|
1930
|
-
/* @__PURE__ */ jsx33(
|
1887
|
+
title: /* @__PURE__ */ jsxs19(Group8, { children: [
|
1888
|
+
/* @__PURE__ */ jsx33(Text6, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
1931
1889
|
fullScreen[0] ? /* @__PURE__ */ jsx33(
|
1932
|
-
|
1890
|
+
ActionIcon10,
|
1933
1891
|
{
|
1934
1892
|
onClick: () => {
|
1935
1893
|
fullScreen[1](false);
|
@@ -1938,7 +1896,7 @@ function MyButtonViewPDF({
|
|
1938
1896
|
children: /* @__PURE__ */ jsx33(IconMinimize3, {})
|
1939
1897
|
}
|
1940
1898
|
) : /* @__PURE__ */ jsx33(
|
1941
|
-
|
1899
|
+
ActionIcon10,
|
1942
1900
|
{
|
1943
1901
|
onClick: () => {
|
1944
1902
|
fullScreen[1](true);
|
@@ -6264,7 +6222,7 @@ var createViewMonthAgenda = () => createPreactView(config);
|
|
6264
6222
|
import { createEventModalPlugin } from "@schedule-x/event-modal";
|
6265
6223
|
import { createEventsServicePlugin } from "@schedule-x/events-service";
|
6266
6224
|
import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
6267
|
-
import { Paper as Paper4, Text as
|
6225
|
+
import { Paper as Paper4, Text as Text7 } from "@mantine/core";
|
6268
6226
|
import "@schedule-x/theme-default/dist/index.css";
|
6269
6227
|
import { useEffect as useEffect6 } from "react";
|
6270
6228
|
import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
@@ -6345,12 +6303,12 @@ function MyCalendar() {
|
|
6345
6303
|
timeGridEvent: ({ calendarEvent }) => {
|
6346
6304
|
console.log(calendarEvent);
|
6347
6305
|
return /* @__PURE__ */ jsx34(Paper4, { h: "100%", bg: calendarEvent.laLichThi ? "violet.2" : "blue.2", p: 4, children: /* @__PURE__ */ jsxs20(MyFlexColumn, { gap: 1, children: [
|
6348
|
-
/* @__PURE__ */ jsxs20(
|
6306
|
+
/* @__PURE__ */ jsxs20(Text7, { size: "sm", fw: "bold", children: [
|
6349
6307
|
calendarEvent.laLichThi ? "(Thi) " : "(H\u1ECDc) ",
|
6350
6308
|
calendarEvent.title
|
6351
6309
|
] }),
|
6352
|
-
calendarEvent.laLichThi == false && /* @__PURE__ */ jsx34(
|
6353
|
-
/* @__PURE__ */ jsx34(
|
6310
|
+
calendarEvent.laLichThi == false && /* @__PURE__ */ jsx34(Text7, { size: "sm", children: calendarEvent.giangvien }),
|
6311
|
+
/* @__PURE__ */ jsx34(Text7, { size: "sm", children: calendarEvent.location })
|
6354
6312
|
] }) });
|
6355
6313
|
}
|
6356
6314
|
// eventModal: ({ calendarEvent }) => {
|
@@ -6364,10 +6322,10 @@ function MyCalendar() {
|
|
6364
6322
|
}
|
6365
6323
|
|
6366
6324
|
// src/components/CenterFull/MyCenterFull.tsx
|
6367
|
-
import { Center as Center2, Group as
|
6325
|
+
import { Center as Center2, Group as Group9 } from "@mantine/core";
|
6368
6326
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
6369
6327
|
function MyCenterFull({ children }) {
|
6370
|
-
return /* @__PURE__ */ jsx35(Center2, { w: "100%", children: /* @__PURE__ */ jsx35(
|
6328
|
+
return /* @__PURE__ */ jsx35(Center2, { w: "100%", children: /* @__PURE__ */ jsx35(Group9, { children }) });
|
6371
6329
|
}
|
6372
6330
|
|
6373
6331
|
// src/components/Checkbox/MyCheckbox.tsx
|
@@ -6387,7 +6345,7 @@ function MyFlexRow(_a) {
|
|
6387
6345
|
}
|
6388
6346
|
|
6389
6347
|
// src/components/DataDisplay/Card/AQCard.tsx
|
6390
|
-
import { Badge, Card, Center as Center3, Image, Text as
|
6348
|
+
import { Badge as Badge2, Card, Center as Center3, Image, Text as Text8 } from "@mantine/core";
|
6391
6349
|
import Link from "next/link";
|
6392
6350
|
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
6393
6351
|
function AQCard({
|
@@ -6411,16 +6369,16 @@ function AQCard({
|
|
6411
6369
|
}
|
6412
6370
|
) }) }),
|
6413
6371
|
/* @__PURE__ */ jsxs21(MyFlexRow, { justify: "space-between", mt: "md", mb: "xs", children: [
|
6414
|
-
/* @__PURE__ */ jsx38(
|
6415
|
-
status && /* @__PURE__ */ jsx38(
|
6372
|
+
/* @__PURE__ */ jsx38(Text8, { fw: 500, children: title }),
|
6373
|
+
status && /* @__PURE__ */ jsx38(Badge2, { color: "violet.5", w: "150px", children: status })
|
6416
6374
|
] }),
|
6417
|
-
/* @__PURE__ */ jsx38(
|
6375
|
+
/* @__PURE__ */ jsx38(Text8, { size: "sm", c: "dimmed", lineClamp: 2, children: description }),
|
6418
6376
|
children
|
6419
6377
|
] });
|
6420
6378
|
}
|
6421
6379
|
|
6422
6380
|
// src/components/DataDisplay/CardInformation/MyCardInformation.tsx
|
6423
|
-
import { Box as Box2, Flex as Flex3, Group as
|
6381
|
+
import { Box as Box2, Flex as Flex3, Group as Group10, Paper as Paper5, Text as Text9 } from "@mantine/core";
|
6424
6382
|
import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
|
6425
6383
|
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
6426
6384
|
function MyCardInformation({
|
@@ -6439,10 +6397,10 @@ function MyCardInformation({
|
|
6439
6397
|
p: "md",
|
6440
6398
|
radius: "md",
|
6441
6399
|
children: [
|
6442
|
-
/* @__PURE__ */ jsxs22(
|
6400
|
+
/* @__PURE__ */ jsxs22(Group10, { justify: "space-between", children: [
|
6443
6401
|
/* @__PURE__ */ jsxs22(Flex3, { direction: "column", children: [
|
6444
6402
|
/* @__PURE__ */ jsx39(
|
6445
|
-
|
6403
|
+
Text9,
|
6446
6404
|
{
|
6447
6405
|
tt: "uppercase",
|
6448
6406
|
size: "lg",
|
@@ -6450,10 +6408,10 @@ function MyCardInformation({
|
|
6450
6408
|
children: title
|
6451
6409
|
}
|
6452
6410
|
),
|
6453
|
-
unit == "" ? /* @__PURE__ */ jsxs22(
|
6411
|
+
unit == "" ? /* @__PURE__ */ jsxs22(Text9, { size: "xs", style: { visibility: "hidden" }, children: [
|
6454
6412
|
"\u0110\u01A1n v\u1ECB: ",
|
6455
6413
|
/* @__PURE__ */ jsx39("strong", { children: unit })
|
6456
|
-
] }) : /* @__PURE__ */ jsxs22(
|
6414
|
+
] }) : /* @__PURE__ */ jsxs22(Text9, { size: "xs", children: [
|
6457
6415
|
"\u0110\u01A1n v\u1ECB: ",
|
6458
6416
|
/* @__PURE__ */ jsx39("strong", { children: unit })
|
6459
6417
|
] })
|
@@ -6461,14 +6419,14 @@ function MyCardInformation({
|
|
6461
6419
|
/* @__PURE__ */ jsx39(Box2, { children: icon })
|
6462
6420
|
] }),
|
6463
6421
|
/* @__PURE__ */ jsxs22(
|
6464
|
-
|
6422
|
+
Group10,
|
6465
6423
|
{
|
6466
6424
|
mt: "5",
|
6467
6425
|
align: "flex-end",
|
6468
6426
|
gap: "xs",
|
6469
6427
|
children: [
|
6470
6428
|
/* @__PURE__ */ jsx39(
|
6471
|
-
|
6429
|
+
Text9,
|
6472
6430
|
{
|
6473
6431
|
fw: 700,
|
6474
6432
|
fz: "h1",
|
@@ -6476,7 +6434,7 @@ function MyCardInformation({
|
|
6476
6434
|
}
|
6477
6435
|
),
|
6478
6436
|
/* @__PURE__ */ jsxs22(
|
6479
|
-
|
6437
|
+
Text9,
|
6480
6438
|
{
|
6481
6439
|
mb: "2",
|
6482
6440
|
c: diff > 0 ? "teal" : "red",
|
@@ -6494,8 +6452,8 @@ function MyCardInformation({
|
|
6494
6452
|
]
|
6495
6453
|
}
|
6496
6454
|
),
|
6497
|
-
/* @__PURE__ */ jsxs22(
|
6498
|
-
/* @__PURE__ */ jsx39(
|
6455
|
+
/* @__PURE__ */ jsxs22(Group10, { justify: "space-between", children: [
|
6456
|
+
/* @__PURE__ */ jsx39(Text9, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6499
6457
|
extraControl
|
6500
6458
|
] })
|
6501
6459
|
]
|
@@ -6505,25 +6463,25 @@ function MyCardInformation({
|
|
6505
6463
|
}
|
6506
6464
|
|
6507
6465
|
// src/components/DataDisplay/IconText/MyIconText.tsx
|
6508
|
-
import { Group as
|
6466
|
+
import { Group as Group11, Text as Text10 } from "@mantine/core";
|
6509
6467
|
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
6510
6468
|
function MyIconText({ icon: Icon, text }) {
|
6511
|
-
return /* @__PURE__ */ jsxs23(
|
6469
|
+
return /* @__PURE__ */ jsxs23(Group11, { wrap: "nowrap", gap: 10, mt: 3, children: [
|
6512
6470
|
Icon && /* @__PURE__ */ jsx40(Icon, { stroke: 1.5, size: 16 }),
|
6513
|
-
/* @__PURE__ */ jsx40(
|
6471
|
+
/* @__PURE__ */ jsx40(Text10, { fz: "lg", c: "dimmed", children: text })
|
6514
6472
|
] });
|
6515
6473
|
}
|
6516
6474
|
|
6517
6475
|
// src/components/DataDisplay/KeyLabel/MyKeyLabel.tsx
|
6518
|
-
import { Group as
|
6476
|
+
import { Group as Group12, Text as Text11 } from "@mantine/core";
|
6519
6477
|
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
6520
6478
|
function MyKeyLabel({ keyLabel, label }) {
|
6521
|
-
return /* @__PURE__ */ jsxs24(
|
6522
|
-
/* @__PURE__ */ jsxs24(
|
6479
|
+
return /* @__PURE__ */ jsxs24(Group12, { gap: 5, children: [
|
6480
|
+
/* @__PURE__ */ jsxs24(Text11, { fw: "bold", children: [
|
6523
6481
|
keyLabel,
|
6524
6482
|
":"
|
6525
6483
|
] }),
|
6526
|
-
/* @__PURE__ */ jsx41(
|
6484
|
+
/* @__PURE__ */ jsx41(Text11, { children: label })
|
6527
6485
|
] });
|
6528
6486
|
}
|
6529
6487
|
|
@@ -6536,21 +6494,21 @@ function MyNumberFormatter(_a) {
|
|
6536
6494
|
}
|
6537
6495
|
|
6538
6496
|
// src/components/DataDisplay/StatCard/AQStatCard1.tsx
|
6539
|
-
import { Box as Box3, Button as
|
6497
|
+
import { Box as Box3, Button as Button13, Flex as Flex4, Group as Group13, Paper as Paper6, Text as Text12 } from "@mantine/core";
|
6540
6498
|
import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
|
6541
|
-
import { Fragment as
|
6499
|
+
import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
6542
6500
|
function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
6543
|
-
return /* @__PURE__ */ jsx43(
|
6501
|
+
return /* @__PURE__ */ jsx43(Fragment12, { children: /* @__PURE__ */ jsxs25(
|
6544
6502
|
Paper6,
|
6545
6503
|
{
|
6546
6504
|
withBorder: true,
|
6547
6505
|
p: "md",
|
6548
6506
|
radius: "md",
|
6549
6507
|
children: [
|
6550
|
-
/* @__PURE__ */ jsxs25(
|
6508
|
+
/* @__PURE__ */ jsxs25(Group13, { justify: "space-between", children: [
|
6551
6509
|
/* @__PURE__ */ jsxs25(Flex4, { direction: "column", children: [
|
6552
6510
|
/* @__PURE__ */ jsx43(
|
6553
|
-
|
6511
|
+
Text12,
|
6554
6512
|
{
|
6555
6513
|
tt: "uppercase",
|
6556
6514
|
size: "lg",
|
@@ -6558,10 +6516,10 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6558
6516
|
children: title
|
6559
6517
|
}
|
6560
6518
|
),
|
6561
|
-
unit == "" ? /* @__PURE__ */ jsxs25(
|
6519
|
+
unit == "" ? /* @__PURE__ */ jsxs25(Text12, { size: "xs", style: { visibility: "hidden" }, children: [
|
6562
6520
|
"\u0110\u01A1n v\u1ECB: ",
|
6563
6521
|
/* @__PURE__ */ jsx43("strong", { children: unit })
|
6564
|
-
] }) : /* @__PURE__ */ jsxs25(
|
6522
|
+
] }) : /* @__PURE__ */ jsxs25(Text12, { size: "xs", children: [
|
6565
6523
|
"\u0110\u01A1n v\u1ECB: ",
|
6566
6524
|
/* @__PURE__ */ jsx43("strong", { children: unit })
|
6567
6525
|
] })
|
@@ -6569,14 +6527,14 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6569
6527
|
/* @__PURE__ */ jsx43(Box3, { children: icons })
|
6570
6528
|
] }),
|
6571
6529
|
/* @__PURE__ */ jsxs25(
|
6572
|
-
|
6530
|
+
Group13,
|
6573
6531
|
{
|
6574
6532
|
mt: "5",
|
6575
6533
|
align: "flex-end",
|
6576
6534
|
gap: "xs",
|
6577
6535
|
children: [
|
6578
6536
|
/* @__PURE__ */ jsx43(
|
6579
|
-
|
6537
|
+
Text12,
|
6580
6538
|
{
|
6581
6539
|
fw: 700,
|
6582
6540
|
fz: "h1",
|
@@ -6584,7 +6542,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6584
6542
|
}
|
6585
6543
|
),
|
6586
6544
|
/* @__PURE__ */ jsxs25(
|
6587
|
-
|
6545
|
+
Text12,
|
6588
6546
|
{
|
6589
6547
|
mb: "2",
|
6590
6548
|
c: diff > 0 ? "teal" : "red",
|
@@ -6602,10 +6560,10 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6602
6560
|
]
|
6603
6561
|
}
|
6604
6562
|
),
|
6605
|
-
/* @__PURE__ */ jsxs25(
|
6606
|
-
/* @__PURE__ */ jsx43(
|
6563
|
+
/* @__PURE__ */ jsxs25(Group13, { justify: "space-between", children: [
|
6564
|
+
/* @__PURE__ */ jsx43(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6607
6565
|
/* @__PURE__ */ jsx43(
|
6608
|
-
|
6566
|
+
Button13,
|
6609
6567
|
{
|
6610
6568
|
variant: "light",
|
6611
6569
|
size: "xs",
|
@@ -6621,6 +6579,54 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6621
6579
|
|
6622
6580
|
// src/components/FaviconSetter/FaviconSetter.tsx
|
6623
6581
|
import { useEffect as useEffect7 } from "react";
|
6582
|
+
|
6583
|
+
// src/components/Layouts/BasicAppShell/useS_BasicAppShell.ts
|
6584
|
+
var useStore2 = createGenericStore({
|
6585
|
+
initialState: {
|
6586
|
+
menuCode: "",
|
6587
|
+
moduleCode: "Module code",
|
6588
|
+
moduleName: "Module name",
|
6589
|
+
title: "",
|
6590
|
+
opened: true,
|
6591
|
+
groupMenuOpenId: []
|
6592
|
+
},
|
6593
|
+
storageKey: "useS_BasicAppShell"
|
6594
|
+
});
|
6595
|
+
function useS_BasicAppShell() {
|
6596
|
+
const store = useStore2();
|
6597
|
+
const GetAQModule_query = useQ_AQ_GetAQModule();
|
6598
|
+
function toggle() {
|
6599
|
+
store.setProperty("opened", !store.state.opened);
|
6600
|
+
}
|
6601
|
+
function toggleGroupMenuOpenId(id) {
|
6602
|
+
const currentIds = store.state.groupMenuOpenId;
|
6603
|
+
if (currentIds.includes(id)) {
|
6604
|
+
store.setProperty(
|
6605
|
+
"groupMenuOpenId",
|
6606
|
+
currentIds.filter((existingId) => existingId !== id)
|
6607
|
+
);
|
6608
|
+
} else {
|
6609
|
+
store.setProperty("groupMenuOpenId", [...currentIds, id]);
|
6610
|
+
}
|
6611
|
+
}
|
6612
|
+
function clearGroupMenuOpenId() {
|
6613
|
+
store.setProperty("groupMenuOpenId", []);
|
6614
|
+
}
|
6615
|
+
function setDefault() {
|
6616
|
+
var _a, _b;
|
6617
|
+
if (!GetAQModule_query.data) return;
|
6618
|
+
store.setProperty("faviconFileDetail", (_a = GetAQModule_query.data) == null ? void 0 : _a.faviconFileDetail);
|
6619
|
+
store.setProperty("logoFileDetail", (_b = GetAQModule_query.data) == null ? void 0 : _b.logoFileDetail);
|
6620
|
+
}
|
6621
|
+
return __spreadProps(__spreadValues({}, store), {
|
6622
|
+
toggle,
|
6623
|
+
toggleGroupMenuOpenId,
|
6624
|
+
clearGroupMenuOpenId,
|
6625
|
+
setDefault
|
6626
|
+
});
|
6627
|
+
}
|
6628
|
+
|
6629
|
+
// src/components/FaviconSetter/FaviconSetter.tsx
|
6624
6630
|
function FaviconSetter() {
|
6625
6631
|
var _a;
|
6626
6632
|
const store = useS_BasicAppShell();
|
@@ -6654,7 +6660,7 @@ function MyDateInput(_a) {
|
|
6654
6660
|
}
|
6655
6661
|
|
6656
6662
|
// src/components/Inputs/Fieldset/MyFieldset.tsx
|
6657
|
-
import { Box as Box4, Fieldset as Fieldset4, Text as
|
6663
|
+
import { Box as Box4, Fieldset as Fieldset4, Text as Text13 } from "@mantine/core";
|
6658
6664
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
6659
6665
|
function MyFieldset(_a) {
|
6660
6666
|
var _b = _a, {
|
@@ -6674,7 +6680,7 @@ function MyFieldset(_a) {
|
|
6674
6680
|
px: "xs",
|
6675
6681
|
py: 2,
|
6676
6682
|
style: { borderRadius: 4 },
|
6677
|
-
children: /* @__PURE__ */ jsx45(
|
6683
|
+
children: /* @__PURE__ */ jsx45(Text13, { c: "white", fw: 500, children: title })
|
6678
6684
|
}
|
6679
6685
|
),
|
6680
6686
|
children
|
@@ -6886,7 +6892,7 @@ function MyTextEditor(_a) {
|
|
6886
6892
|
}
|
6887
6893
|
|
6888
6894
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
6889
|
-
import { Button as
|
6895
|
+
import { Button as Button14 } from "@mantine/core";
|
6890
6896
|
import { IconLogout } from "@tabler/icons-react";
|
6891
6897
|
import { useRouter as useRouter3 } from "next/navigation";
|
6892
6898
|
|
@@ -6907,7 +6913,7 @@ import { jsx as jsx50 } from "react/jsx-runtime";
|
|
6907
6913
|
function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
6908
6914
|
const router = useRouter3();
|
6909
6915
|
const S_Authenticate = useS_authenticate();
|
6910
|
-
return /* @__PURE__ */ jsx50(
|
6916
|
+
return /* @__PURE__ */ jsx50(Button14, { onClick: () => {
|
6911
6917
|
S_Authenticate.setProperty("token", "");
|
6912
6918
|
router.replace(redirectURL);
|
6913
6919
|
}, leftSection: /* @__PURE__ */ jsx50(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
@@ -6915,39 +6921,48 @@ function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
|
6915
6921
|
|
6916
6922
|
// src/components/Layouts/BasicAppShell/BasicAppShell.tsx
|
6917
6923
|
import {
|
6918
|
-
ActionIcon as
|
6924
|
+
ActionIcon as ActionIcon11,
|
6919
6925
|
AppShell,
|
6920
|
-
Badge as
|
6926
|
+
Badge as Badge3,
|
6921
6927
|
Divider as Divider2,
|
6922
|
-
Group as
|
6928
|
+
Group as Group14,
|
6923
6929
|
Image as Image3,
|
6924
6930
|
NavLink,
|
6925
6931
|
ScrollArea as ScrollArea3,
|
6926
|
-
Text as
|
6927
|
-
TextInput as TextInput2,
|
6932
|
+
Text as Text14,
|
6928
6933
|
Tooltip as Tooltip5
|
6929
6934
|
} from "@mantine/core";
|
6930
6935
|
import { useFavicon, useMediaQuery } from "@mantine/hooks";
|
6931
|
-
import { spotlight as spotlight2 } from "@mantine/spotlight";
|
6932
6936
|
import {
|
6933
6937
|
IconLayoutSidebarLeftCollapse,
|
6934
6938
|
IconLayoutSidebarLeftExpand,
|
6935
|
-
IconLibraryMinus
|
6936
|
-
IconSearch as IconSearch2
|
6939
|
+
IconLibraryMinus
|
6937
6940
|
} from "@tabler/icons-react";
|
6938
6941
|
import Link3 from "next/link";
|
6939
6942
|
import { usePathname as usePathname2 } from "next/navigation";
|
6940
|
-
import { useEffect as useEffect9, useState as useState9 } from "react";
|
6941
|
-
import { Fragment as
|
6943
|
+
import { useEffect as useEffect9, useMemo as useMemo3, useState as useState9 } from "react";
|
6944
|
+
import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
|
6945
|
+
function findBreadcrumbPath(items, currentPath, parents = []) {
|
6946
|
+
for (const item of items) {
|
6947
|
+
if (item.link === currentPath) {
|
6948
|
+
return [...parents, item.label];
|
6949
|
+
}
|
6950
|
+
if (item.links) {
|
6951
|
+
const found = findBreadcrumbPath(item.links, currentPath, [...parents, item.label]);
|
6952
|
+
if (found) return found;
|
6953
|
+
}
|
6954
|
+
}
|
6955
|
+
return null;
|
6956
|
+
}
|
6942
6957
|
function getRightSection(status) {
|
6943
6958
|
if (status === "Prototype")
|
6944
|
-
return /* @__PURE__ */ jsx51(
|
6959
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
|
6945
6960
|
if (status === "New")
|
6946
|
-
return /* @__PURE__ */ jsx51(
|
6961
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", circle: true, children: "N" });
|
6947
6962
|
if (status === "Menu")
|
6948
|
-
return /* @__PURE__ */ jsx51(
|
6963
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "gray", circle: true, children: "M" });
|
6949
6964
|
if (status === "Change")
|
6950
|
-
return /* @__PURE__ */ jsx51(
|
6965
|
+
return /* @__PURE__ */ jsx51(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
|
6951
6966
|
return null;
|
6952
6967
|
}
|
6953
6968
|
function RenderNavLinks({
|
@@ -6955,7 +6970,7 @@ function RenderNavLinks({
|
|
6955
6970
|
}) {
|
6956
6971
|
const basicAppShellStore = useS_BasicAppShell();
|
6957
6972
|
const pathName = usePathname2();
|
6958
|
-
return /* @__PURE__ */ jsx51(
|
6973
|
+
return /* @__PURE__ */ jsx51(Fragment13, { children: items.map((item, index) => /* @__PURE__ */ jsx51(
|
6959
6974
|
NavLink,
|
6960
6975
|
{
|
6961
6976
|
active: item.link === pathName.split("/")[2],
|
@@ -6973,8 +6988,6 @@ function RenderNavLinks({
|
|
6973
6988
|
basicAppShellStore.toggleGroupMenuOpenId(item.label);
|
6974
6989
|
return;
|
6975
6990
|
}
|
6976
|
-
basicAppShellStore.setProperty("menuCode", item.link);
|
6977
|
-
basicAppShellStore.setProperty("title", item.label);
|
6978
6991
|
},
|
6979
6992
|
children: item.links && /* @__PURE__ */ jsx51(RenderNavLinks, { items: item.links })
|
6980
6993
|
},
|
@@ -7041,11 +7054,27 @@ function BasicAppShell_transformMenuToEnum(prefixProjectName, menu) {
|
|
7041
7054
|
}
|
7042
7055
|
function BasicAppShell({ children, menu, extraTopRight, title }) {
|
7043
7056
|
var _a, _b;
|
7057
|
+
const pathName = usePathname2();
|
7044
7058
|
const basicAppShellStore = useS_BasicAppShell();
|
7045
7059
|
const media = useMediaQuery("(min-width: 72em)");
|
7046
7060
|
const GetAQModule_query = useQ_AQ_GetAQModule();
|
7047
7061
|
const BasicAppShell_store = useS_BasicAppShell();
|
7048
7062
|
const [faviconUrl, setFaviconUrl] = useState9("");
|
7063
|
+
const allChildItems = useMemo3(() => {
|
7064
|
+
const result = [];
|
7065
|
+
const extractChildren = (items) => {
|
7066
|
+
items.forEach((item) => {
|
7067
|
+
if (item.link) {
|
7068
|
+
result.push(item);
|
7069
|
+
}
|
7070
|
+
if (item.links) {
|
7071
|
+
extractChildren(item.links);
|
7072
|
+
}
|
7073
|
+
});
|
7074
|
+
};
|
7075
|
+
extractChildren(menu);
|
7076
|
+
return result;
|
7077
|
+
}, [menu]);
|
7049
7078
|
useFavicon(faviconUrl);
|
7050
7079
|
useEffect9(() => {
|
7051
7080
|
var _a2;
|
@@ -7074,6 +7103,15 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7074
7103
|
if (!data) return;
|
7075
7104
|
document.title = data.name || "";
|
7076
7105
|
}, [GetAQModule_query.data]);
|
7106
|
+
useEffect9(() => {
|
7107
|
+
const linkItem = allChildItems.find((item) => pathName.includes(item.link));
|
7108
|
+
const breadcrumb = findBreadcrumbPath(menu, linkItem == null ? void 0 : linkItem.link);
|
7109
|
+
basicAppShellStore.setProperty("breadcrumb", breadcrumb);
|
7110
|
+
basicAppShellStore.setProperty("title", linkItem == null ? void 0 : linkItem.label);
|
7111
|
+
basicAppShellStore.setProperty("menuCode", linkItem == null ? void 0 : linkItem.link);
|
7112
|
+
basicAppShellStore.setProperty("note", linkItem == null ? void 0 : linkItem.note);
|
7113
|
+
basicAppShellStore.setProperty("status", linkItem == null ? void 0 : linkItem.status);
|
7114
|
+
}, [pathName]);
|
7077
7115
|
return /* @__PURE__ */ jsxs27(
|
7078
7116
|
AppShell,
|
7079
7117
|
{
|
@@ -7088,86 +7126,72 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7088
7126
|
},
|
7089
7127
|
padding: "md",
|
7090
7128
|
children: [
|
7091
|
-
/* @__PURE__ */
|
7092
|
-
/* @__PURE__ */
|
7093
|
-
media ? /* @__PURE__ */ jsxs27(Group13, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7094
|
-
/* @__PURE__ */ jsxs27(Group13, { h: "100%", children: [
|
7095
|
-
/* @__PURE__ */ jsx51(
|
7096
|
-
Tooltip5,
|
7097
|
-
{
|
7098
|
-
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7099
|
-
children: /* @__PURE__ */ jsx51(
|
7100
|
-
ActionIcon10,
|
7101
|
-
{
|
7102
|
-
size: "lg",
|
7103
|
-
radius: "md",
|
7104
|
-
variant: "default",
|
7105
|
-
onClick: basicAppShellStore.toggle,
|
7106
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx51(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx51(IconLayoutSidebarLeftCollapse, {})
|
7107
|
-
}
|
7108
|
-
)
|
7109
|
-
}
|
7110
|
-
),
|
7111
|
-
/* @__PURE__ */ jsx51(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx51(
|
7112
|
-
ActionIcon10,
|
7113
|
-
{
|
7114
|
-
size: "lg",
|
7115
|
-
radius: "md",
|
7116
|
-
variant: "default",
|
7117
|
-
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7118
|
-
children: /* @__PURE__ */ jsx51(IconLibraryMinus, {})
|
7119
|
-
}
|
7120
|
-
) })
|
7121
|
-
] }),
|
7129
|
+
/* @__PURE__ */ jsx51(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs27(Group14, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7130
|
+
/* @__PURE__ */ jsxs27(Group14, { h: "100%", children: [
|
7122
7131
|
/* @__PURE__ */ jsx51(
|
7123
|
-
|
7132
|
+
Tooltip5,
|
7124
7133
|
{
|
7125
|
-
|
7126
|
-
|
7127
|
-
|
7128
|
-
|
7129
|
-
|
7130
|
-
|
7134
|
+
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7135
|
+
children: /* @__PURE__ */ jsx51(
|
7136
|
+
ActionIcon11,
|
7137
|
+
{
|
7138
|
+
size: "lg",
|
7139
|
+
radius: "md",
|
7140
|
+
variant: "default",
|
7141
|
+
onClick: basicAppShellStore.toggle,
|
7142
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx51(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx51(IconLayoutSidebarLeftCollapse, {})
|
7143
|
+
}
|
7144
|
+
)
|
7131
7145
|
}
|
7132
7146
|
),
|
7133
|
-
/* @__PURE__ */
|
7134
|
-
|
7135
|
-
|
7136
|
-
|
7137
|
-
|
7138
|
-
|
7139
|
-
|
7140
|
-
|
7141
|
-
|
7142
|
-
|
7143
|
-
|
7144
|
-
radius: "md",
|
7145
|
-
variant: "default",
|
7146
|
-
onClick: basicAppShellStore.toggle,
|
7147
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx51(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx51(IconLayoutSidebarLeftCollapse, {})
|
7148
|
-
}
|
7149
|
-
),
|
7150
|
-
/* @__PURE__ */ jsx51(Text13, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7151
|
-
/* @__PURE__ */ jsxs27(Group13, { children: [
|
7152
|
-
extraTopRight,
|
7153
|
-
/* @__PURE__ */ jsx51(MySwitchTheme, {})
|
7154
|
-
] })
|
7155
|
-
] })
|
7156
|
-
)
|
7157
|
-
] }),
|
7158
|
-
/* @__PURE__ */ jsxs27(AppShell.Navbar, { children: [
|
7147
|
+
/* @__PURE__ */ jsx51(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx51(
|
7148
|
+
ActionIcon11,
|
7149
|
+
{
|
7150
|
+
size: "lg",
|
7151
|
+
radius: "md",
|
7152
|
+
variant: "default",
|
7153
|
+
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7154
|
+
children: /* @__PURE__ */ jsx51(IconLibraryMinus, {})
|
7155
|
+
}
|
7156
|
+
) })
|
7157
|
+
] }),
|
7159
7158
|
/* @__PURE__ */ jsx51(
|
7160
|
-
|
7159
|
+
Group14,
|
7161
7160
|
{
|
7162
|
-
|
7163
|
-
|
7164
|
-
|
7165
|
-
|
7166
|
-
|
7167
|
-
|
7168
|
-
children: "T\xECm ki\u1EBFm (Ctrl + K)"
|
7161
|
+
style: {
|
7162
|
+
position: "absolute",
|
7163
|
+
left: "50%",
|
7164
|
+
transform: "translateX(-50%)"
|
7165
|
+
},
|
7166
|
+
children: /* @__PURE__ */ jsx51(Text14, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7169
7167
|
}
|
7170
7168
|
),
|
7169
|
+
/* @__PURE__ */ jsxs27(Group14, { children: [
|
7170
|
+
extraTopRight,
|
7171
|
+
/* @__PURE__ */ jsx51(MySwitchTheme, {})
|
7172
|
+
] })
|
7173
|
+
] }) : (
|
7174
|
+
// For mobile screens - simplified layout
|
7175
|
+
/* @__PURE__ */ jsxs27(Group14, { h: "100%", px: "md", justify: "space-between", children: [
|
7176
|
+
/* @__PURE__ */ jsx51(
|
7177
|
+
ActionIcon11,
|
7178
|
+
{
|
7179
|
+
size: "lg",
|
7180
|
+
radius: "md",
|
7181
|
+
variant: "default",
|
7182
|
+
onClick: basicAppShellStore.toggle,
|
7183
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx51(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx51(IconLayoutSidebarLeftCollapse, {})
|
7184
|
+
}
|
7185
|
+
),
|
7186
|
+
/* @__PURE__ */ jsx51(Text14, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7187
|
+
/* @__PURE__ */ jsxs27(Group14, { children: [
|
7188
|
+
extraTopRight,
|
7189
|
+
/* @__PURE__ */ jsx51(MySwitchTheme, {})
|
7190
|
+
] })
|
7191
|
+
] })
|
7192
|
+
) }),
|
7193
|
+
/* @__PURE__ */ jsxs27(AppShell.Navbar, { children: [
|
7194
|
+
/* @__PURE__ */ jsx51(MyAppSpotlight, { menu }),
|
7171
7195
|
/* @__PURE__ */ jsxs27(AppShell.Section, { grow: true, component: ScrollArea3, p: 5, children: [
|
7172
7196
|
/* @__PURE__ */ jsx51(RenderNavLinks, { items: menu }),
|
7173
7197
|
/* @__PURE__ */ jsx51(Divider2, {}),
|
@@ -7261,14 +7285,14 @@ var OBJECT_COlORS = {
|
|
7261
7285
|
import {
|
7262
7286
|
Box as Box5,
|
7263
7287
|
Burger,
|
7264
|
-
Button as
|
7288
|
+
Button as Button15,
|
7265
7289
|
Container as Container2,
|
7266
7290
|
Divider as Divider3,
|
7267
7291
|
Drawer,
|
7268
|
-
Group as
|
7292
|
+
Group as Group15,
|
7269
7293
|
Image as Image4,
|
7270
7294
|
ScrollArea as ScrollArea4,
|
7271
|
-
Text as
|
7295
|
+
Text as Text15,
|
7272
7296
|
TextInput as TextInput3,
|
7273
7297
|
ThemeIcon,
|
7274
7298
|
UnstyledButton,
|
@@ -7282,7 +7306,7 @@ import {
|
|
7282
7306
|
IconCoin,
|
7283
7307
|
IconFingerprint,
|
7284
7308
|
IconNotification,
|
7285
|
-
IconSearch as
|
7309
|
+
IconSearch as IconSearch2
|
7286
7310
|
} from "@tabler/icons-react";
|
7287
7311
|
import Link4 from "next/link";
|
7288
7312
|
|
@@ -7338,21 +7362,21 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7338
7362
|
const [linksOpened, { toggle: toggleLinks }] = useDisclosure10(false);
|
7339
7363
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
7340
7364
|
const theme = useMantineTheme();
|
7341
|
-
const links = mockdata.map((item) => /* @__PURE__ */ jsx53(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs28(
|
7365
|
+
const links = mockdata.map((item) => /* @__PURE__ */ jsx53(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs28(Group15, { wrap: "nowrap", align: "flex-start", children: [
|
7342
7366
|
/* @__PURE__ */ jsx53(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx53(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
|
7343
7367
|
/* @__PURE__ */ jsxs28("div", { children: [
|
7344
|
-
/* @__PURE__ */ jsx53(
|
7345
|
-
/* @__PURE__ */ jsx53(
|
7368
|
+
/* @__PURE__ */ jsx53(Text15, { size: "sm", fw: 500, children: item.title }),
|
7369
|
+
/* @__PURE__ */ jsx53(Text15, { size: "xs", c: "dimmed", children: item.description })
|
7346
7370
|
] })
|
7347
7371
|
] }) }, item.title));
|
7348
7372
|
return /* @__PURE__ */ jsxs28(Box5, { children: [
|
7349
|
-
/* @__PURE__ */ jsx53("header", { className: css_default.header, children: /* @__PURE__ */ jsxs28(
|
7350
|
-
/* @__PURE__ */ jsxs28(
|
7373
|
+
/* @__PURE__ */ jsx53("header", { className: css_default.header, children: /* @__PURE__ */ jsxs28(Group15, { justify: "space-between", h: "100%", children: [
|
7374
|
+
/* @__PURE__ */ jsxs28(Group15, { children: [
|
7351
7375
|
/* @__PURE__ */ jsx53(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
|
7352
|
-
/* @__PURE__ */ jsx53(
|
7376
|
+
/* @__PURE__ */ jsx53(Group15, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx53(Button15, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
|
7353
7377
|
] }),
|
7354
|
-
/* @__PURE__ */ jsxs28(
|
7355
|
-
/* @__PURE__ */ jsx53(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx53(
|
7378
|
+
/* @__PURE__ */ jsxs28(Group15, { children: [
|
7379
|
+
/* @__PURE__ */ jsx53(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx53(IconSearch2, {}), radius: "xl", w: "250px" }),
|
7356
7380
|
/* @__PURE__ */ jsx53(MySwitchTheme, {})
|
7357
7381
|
] }),
|
7358
7382
|
/* @__PURE__ */ jsx53(Burger, { opened: drawerOpened, onClick: toggleDrawer, hiddenFrom: "sm" })
|
@@ -7370,7 +7394,7 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7370
7394
|
zIndex: 1e6,
|
7371
7395
|
children: /* @__PURE__ */ jsxs28(ScrollArea4, { h: "calc(100vh - 80px", mx: "-md", children: [
|
7372
7396
|
/* @__PURE__ */ jsx53(Divider3, { my: "sm" }),
|
7373
|
-
/* @__PURE__ */ jsx53(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx53(
|
7397
|
+
/* @__PURE__ */ jsx53(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx53(Button15, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
|
7374
7398
|
/* @__PURE__ */ jsx53(Divider3, { my: "sm" })
|
7375
7399
|
] })
|
7376
7400
|
}
|
@@ -7379,46 +7403,68 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7379
7403
|
}
|
7380
7404
|
|
7381
7405
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
7382
|
-
import { Code, Container as Container3, Divider as Divider4, Group as
|
7406
|
+
import { Badge as Badge4, Breadcrumbs, Code, Container as Container3, Divider as Divider4, Group as Group16, Text as Text16, Title } from "@mantine/core";
|
7383
7407
|
import { jsx as jsx54, jsxs as jsxs29 } from "react/jsx-runtime";
|
7384
7408
|
var getStatusColor = (status) => {
|
7385
7409
|
switch (status) {
|
7386
7410
|
case "Prototype":
|
7387
|
-
return "
|
7388
|
-
case "Beta":
|
7389
|
-
return "orange";
|
7411
|
+
return "pink";
|
7390
7412
|
default:
|
7391
|
-
return "
|
7413
|
+
return "";
|
7392
7414
|
}
|
7393
7415
|
};
|
7394
|
-
|
7416
|
+
function PageTitle({ title, status, note }) {
|
7395
7417
|
const color = getStatusColor(status);
|
7396
|
-
return /* @__PURE__ */ jsx54(
|
7397
|
-
|
7418
|
+
return /* @__PURE__ */ jsx54(Group16, { children: /* @__PURE__ */ jsxs29(MyFlexColumn, { gap: 0, children: [
|
7419
|
+
/* @__PURE__ */ jsxs29(Group16, { align: "center", children: [
|
7420
|
+
/* @__PURE__ */ jsx54(Title, { order: 3, children: title }),
|
7421
|
+
status && /* @__PURE__ */ jsx54(
|
7422
|
+
Badge4,
|
7423
|
+
{
|
7424
|
+
variant: "gradient",
|
7425
|
+
gradient: { from: color, to: `${color}.5` },
|
7426
|
+
size: "lg",
|
7427
|
+
radius: "sm",
|
7428
|
+
children: status
|
7429
|
+
}
|
7430
|
+
)
|
7431
|
+
] }),
|
7432
|
+
/* @__PURE__ */ jsx54(Text16, { size: "lg", c: "dimmed", fs: "italic", children: note })
|
7433
|
+
] }) });
|
7434
|
+
}
|
7398
7435
|
function MyPageContent({
|
7399
7436
|
leftTopBar,
|
7400
7437
|
title,
|
7401
7438
|
canBack = false,
|
7402
7439
|
rightTopBar,
|
7403
|
-
status,
|
7404
7440
|
children
|
7405
7441
|
}) {
|
7442
|
+
var _a;
|
7406
7443
|
const basicAppShellStore = useS_BasicAppShell();
|
7407
7444
|
const finalTitle = title || basicAppShellStore.state.title;
|
7408
7445
|
return /* @__PURE__ */ jsxs29(Container3, { p: 0, fluid: true, children: [
|
7409
|
-
/* @__PURE__ */ jsxs29(
|
7410
|
-
/* @__PURE__ */ jsxs29(
|
7411
|
-
|
7412
|
-
/* @__PURE__ */ jsx54(
|
7446
|
+
/* @__PURE__ */ jsxs29(Group16, { justify: "space-between", children: [
|
7447
|
+
/* @__PURE__ */ jsxs29(Group16, { children: [
|
7448
|
+
/* @__PURE__ */ jsx54(MyButtonRouterBack, {}),
|
7449
|
+
/* @__PURE__ */ jsx54(
|
7450
|
+
PageTitle,
|
7451
|
+
{
|
7452
|
+
title: finalTitle,
|
7453
|
+
status: basicAppShellStore.state.status,
|
7454
|
+
note: basicAppShellStore.state.note
|
7455
|
+
}
|
7456
|
+
),
|
7413
7457
|
leftTopBar
|
7414
7458
|
] }),
|
7415
|
-
/* @__PURE__ */ jsxs29(
|
7459
|
+
/* @__PURE__ */ jsxs29(Group16, { p: "md", children: [
|
7416
7460
|
rightTopBar,
|
7417
|
-
/* @__PURE__ */ jsx54(
|
7461
|
+
/* @__PURE__ */ jsx54(Breadcrumbs, { separatorMargin: "7", children: (_a = basicAppShellStore.state.breadcrumb) == null ? void 0 : _a.map((item, idx) => /* @__PURE__ */ jsx54(Text16, { fw: "600", c: "blue", children: item }, idx)) })
|
7418
7462
|
] })
|
7419
7463
|
] }),
|
7420
7464
|
/* @__PURE__ */ jsx54(Divider4, { my: "xs" }),
|
7421
|
-
children
|
7465
|
+
children,
|
7466
|
+
/* @__PURE__ */ jsx54(Divider4, { my: "xs" }),
|
7467
|
+
/* @__PURE__ */ jsx54(MyFlexEnd, { children: /* @__PURE__ */ jsx54(Code, { color: "var(--mantine-color-blue-light)", children: basicAppShellStore.state.menuCode }) })
|
7422
7468
|
] });
|
7423
7469
|
}
|
7424
7470
|
|
@@ -7438,7 +7484,7 @@ function MyTab(_a) {
|
|
7438
7484
|
}
|
7439
7485
|
|
7440
7486
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
7441
|
-
import { ActionIcon as
|
7487
|
+
import { ActionIcon as ActionIcon12, Button as Button16, Fieldset as Fieldset5, Group as Group17, Modal as Modal11 } from "@mantine/core";
|
7442
7488
|
import { useDisclosure as useDisclosure11 } from "@mantine/hooks";
|
7443
7489
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
7444
7490
|
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
@@ -7451,15 +7497,15 @@ function MyDataTableSelect(_a) {
|
|
7451
7497
|
MyDataTable,
|
7452
7498
|
__spreadValues({
|
7453
7499
|
renderTopToolbarCustomActions: ({ table }) => {
|
7454
|
-
return /* @__PURE__ */ jsxs31(
|
7500
|
+
return /* @__PURE__ */ jsxs31(Group17, { children: [
|
7455
7501
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
7456
|
-
/* @__PURE__ */ jsx56(
|
7502
|
+
/* @__PURE__ */ jsx56(Button16, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
7457
7503
|
] });
|
7458
7504
|
},
|
7459
7505
|
columns,
|
7460
7506
|
data: listState[0],
|
7461
7507
|
renderRowActions: ({ row }) => {
|
7462
|
-
return /* @__PURE__ */ jsx56(MyCenterFull, { children: /* @__PURE__ */ jsx56(
|
7508
|
+
return /* @__PURE__ */ jsx56(MyCenterFull, { children: /* @__PURE__ */ jsx56(ActionIcon12, { color: "red", onClick: () => listState[1].remove(row.index), children: /* @__PURE__ */ jsx56(IconX2, {}) }) });
|
7463
7509
|
}
|
7464
7510
|
}, rest)
|
7465
7511
|
),
|
@@ -7467,7 +7513,7 @@ function MyDataTableSelect(_a) {
|
|
7467
7513
|
MyDataTable,
|
7468
7514
|
__spreadValues({
|
7469
7515
|
renderTopToolbarCustomActions: ({ table }) => {
|
7470
|
-
return /* @__PURE__ */ jsx56(
|
7516
|
+
return /* @__PURE__ */ jsx56(Button16, { onClick: () => {
|
7471
7517
|
table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
|
7472
7518
|
disc[1].close();
|
7473
7519
|
}, children: "Ch\u1ECDn" });
|
@@ -7578,9 +7624,7 @@ export {
|
|
7578
7624
|
MyActionIconUpload,
|
7579
7625
|
MyActionIconViewPDF,
|
7580
7626
|
MySwitchTheme,
|
7581
|
-
useS_BasicAppShell,
|
7582
7627
|
MyAppSpotlight,
|
7583
|
-
SpotlightTrigger,
|
7584
7628
|
MyAnchorViewPDF,
|
7585
7629
|
MyButtonModal,
|
7586
7630
|
AQButtonCreateByImportFile,
|
@@ -7609,6 +7653,7 @@ export {
|
|
7609
7653
|
MyKeyLabel,
|
7610
7654
|
MyNumberFormatter,
|
7611
7655
|
AQStatCard1,
|
7656
|
+
useS_BasicAppShell,
|
7612
7657
|
FaviconSetter,
|
7613
7658
|
MyDateInput,
|
7614
7659
|
MyFieldset,
|