aq-fe-framework 0.1.281 → 0.1.282
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.
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
const_object_colors
|
3
|
-
} from "./chunk-NWBLJ3W3.mjs";
|
4
1
|
import {
|
5
2
|
enum_daysOfWeek
|
6
3
|
} from "./chunk-K6S7R6LU.mjs";
|
4
|
+
import {
|
5
|
+
const_object_colors
|
6
|
+
} from "./chunk-NWBLJ3W3.mjs";
|
7
7
|
import {
|
8
8
|
baseAxios_default,
|
9
9
|
useMyReactMutation,
|
@@ -759,55 +759,8 @@ function MyAppSpotlight({ menu }) {
|
|
759
759
|
] });
|
760
760
|
}
|
761
761
|
|
762
|
-
// src/components/Buttons/
|
763
|
-
import { ActionIcon as ActionIcon8
|
764
|
-
import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
|
765
|
-
import { IconMaximize as IconMaximize2, IconMinimize as IconMinimize2 } from "@tabler/icons-react";
|
766
|
-
import { useState as useState6 } from "react";
|
767
|
-
import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
768
|
-
function MyAnchorViewPDF({ label, pdfLink }) {
|
769
|
-
const disc = useDisclosure5(false);
|
770
|
-
const fullScreen = useState6(false);
|
771
|
-
const hSize = useState6("80vh");
|
772
|
-
return /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
773
|
-
/* @__PURE__ */ jsx17(Anchor, { onClick: disc[1].open, children: label }),
|
774
|
-
/* @__PURE__ */ jsx17(
|
775
|
-
Modal4,
|
776
|
-
{
|
777
|
-
fullScreen: fullScreen[0],
|
778
|
-
opened: disc[0],
|
779
|
-
onClose: disc[1].close,
|
780
|
-
size: "80%",
|
781
|
-
title: /* @__PURE__ */ jsxs8(Group4, { children: [
|
782
|
-
/* @__PURE__ */ jsx17(Text5, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
783
|
-
fullScreen[0] ? /* @__PURE__ */ jsx17(
|
784
|
-
ActionIcon8,
|
785
|
-
{
|
786
|
-
onClick: () => {
|
787
|
-
fullScreen[1](false);
|
788
|
-
hSize[1]("80vh");
|
789
|
-
},
|
790
|
-
children: /* @__PURE__ */ jsx17(IconMinimize2, {})
|
791
|
-
}
|
792
|
-
) : /* @__PURE__ */ jsx17(
|
793
|
-
ActionIcon8,
|
794
|
-
{
|
795
|
-
onClick: () => {
|
796
|
-
fullScreen[1](true);
|
797
|
-
hSize[1]("90vh");
|
798
|
-
},
|
799
|
-
children: /* @__PURE__ */ jsx17(IconMaximize2, {})
|
800
|
-
}
|
801
|
-
)
|
802
|
-
] }),
|
803
|
-
children: /* @__PURE__ */ jsx17(Paper2, { h: hSize[0], children: /* @__PURE__ */ jsx17("iframe", { src: pdfLink, width: "100%", height: "100%" }) })
|
804
|
-
}
|
805
|
-
)
|
806
|
-
] });
|
807
|
-
}
|
808
|
-
|
809
|
-
// src/components/Buttons/Button/CoreActionIcon.tsx
|
810
|
-
import { ActionIcon as ActionIcon9 } from "@mantine/core";
|
762
|
+
// src/components/Buttons/CoreActionIcon.tsx
|
763
|
+
import { ActionIcon as ActionIcon8 } from "@mantine/core";
|
811
764
|
import {
|
812
765
|
IconDeviceFloppy as IconDeviceFloppy3,
|
813
766
|
IconEdit as IconEdit4,
|
@@ -818,47 +771,47 @@ import {
|
|
818
771
|
IconTrash as IconTrash4,
|
819
772
|
IconX as IconX2
|
820
773
|
} from "@tabler/icons-react";
|
821
|
-
import { jsx as
|
774
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
822
775
|
var actionConfig = {
|
823
776
|
create: {
|
824
777
|
color: "indigo",
|
825
778
|
type: "submit",
|
826
|
-
icon: /* @__PURE__ */
|
779
|
+
icon: /* @__PURE__ */ jsx17(IconPlus4, {})
|
827
780
|
},
|
828
781
|
createMultiple: {
|
829
782
|
color: "green",
|
830
783
|
type: "submit",
|
831
|
-
icon: /* @__PURE__ */
|
784
|
+
icon: /* @__PURE__ */ jsx17(IconPlus4, {})
|
832
785
|
},
|
833
786
|
delete: {
|
834
787
|
color: "red",
|
835
|
-
icon: /* @__PURE__ */
|
788
|
+
icon: /* @__PURE__ */ jsx17(IconTrash4, {})
|
836
789
|
},
|
837
790
|
update: {
|
838
791
|
color: "yellow",
|
839
792
|
type: "submit",
|
840
|
-
icon: /* @__PURE__ */
|
793
|
+
icon: /* @__PURE__ */ jsx17(IconEdit4, {})
|
841
794
|
},
|
842
795
|
save: {
|
843
796
|
color: "blue",
|
844
797
|
type: "submit",
|
845
|
-
icon: /* @__PURE__ */
|
798
|
+
icon: /* @__PURE__ */ jsx17(IconDeviceFloppy3, {})
|
846
799
|
},
|
847
800
|
import: {
|
848
801
|
color: "green.8",
|
849
|
-
icon: /* @__PURE__ */
|
802
|
+
icon: /* @__PURE__ */ jsx17(IconFileImport2, {})
|
850
803
|
},
|
851
804
|
print: {
|
852
805
|
color: "orange.7",
|
853
|
-
icon: /* @__PURE__ */
|
806
|
+
icon: /* @__PURE__ */ jsx17(IconPrinter2, {})
|
854
807
|
},
|
855
808
|
export: {
|
856
809
|
color: "green.8",
|
857
|
-
icon: /* @__PURE__ */
|
810
|
+
icon: /* @__PURE__ */ jsx17(IconFileExport2, {})
|
858
811
|
},
|
859
812
|
cancel: {
|
860
813
|
color: "gray",
|
861
|
-
icon: /* @__PURE__ */
|
814
|
+
icon: /* @__PURE__ */ jsx17(IconX2, {})
|
862
815
|
},
|
863
816
|
select: {},
|
864
817
|
check: {}
|
@@ -866,11 +819,11 @@ var actionConfig = {
|
|
866
819
|
function CoreActionIcon(_a) {
|
867
820
|
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
868
821
|
if (!actionType) {
|
869
|
-
return /* @__PURE__ */
|
822
|
+
return /* @__PURE__ */ jsx17(ActionIcon8, __spreadProps(__spreadValues({}, rest), { children }));
|
870
823
|
}
|
871
824
|
const config2 = actionConfig[actionType];
|
872
|
-
return /* @__PURE__ */
|
873
|
-
|
825
|
+
return /* @__PURE__ */ jsx17(
|
826
|
+
ActionIcon8,
|
874
827
|
__spreadProps(__spreadValues({
|
875
828
|
color: config2.color,
|
876
829
|
type: config2.type
|
@@ -880,7 +833,7 @@ function CoreActionIcon(_a) {
|
|
880
833
|
);
|
881
834
|
}
|
882
835
|
|
883
|
-
// src/components/Buttons/
|
836
|
+
// src/components/Buttons/CoreButton.tsx
|
884
837
|
import { Button as Button4 } from "@mantine/core";
|
885
838
|
import {
|
886
839
|
IconDeviceFloppy as IconDeviceFloppy4,
|
@@ -892,55 +845,55 @@ import {
|
|
892
845
|
IconTrash as IconTrash5,
|
893
846
|
IconX as IconX3
|
894
847
|
} from "@tabler/icons-react";
|
895
|
-
import { jsx as
|
848
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
896
849
|
var actionConfig2 = {
|
897
850
|
create: {
|
898
851
|
color: "indigo",
|
899
852
|
type: "submit",
|
900
|
-
icon: /* @__PURE__ */
|
853
|
+
icon: /* @__PURE__ */ jsx18(IconPlus5, {}),
|
901
854
|
defaultText: "L\u01B0u"
|
902
855
|
},
|
903
856
|
createMultiple: {
|
904
857
|
color: "green",
|
905
858
|
type: "submit",
|
906
|
-
icon: /* @__PURE__ */
|
859
|
+
icon: /* @__PURE__ */ jsx18(IconPlus5, {}),
|
907
860
|
defaultText: "Th\xEAm danh s\xE1ch"
|
908
861
|
},
|
909
862
|
delete: {
|
910
863
|
color: "red",
|
911
|
-
icon: /* @__PURE__ */
|
864
|
+
icon: /* @__PURE__ */ jsx18(IconTrash5, {}),
|
912
865
|
defaultText: "X\xF3a"
|
913
866
|
},
|
914
867
|
update: {
|
915
868
|
color: "yellow",
|
916
869
|
type: "submit",
|
917
|
-
icon: /* @__PURE__ */
|
870
|
+
icon: /* @__PURE__ */ jsx18(IconEdit5, {}),
|
918
871
|
defaultText: "Ch\u1EC9nh s\u1EEDa"
|
919
872
|
},
|
920
873
|
save: {
|
921
874
|
color: "blue",
|
922
875
|
type: "submit",
|
923
|
-
icon: /* @__PURE__ */
|
876
|
+
icon: /* @__PURE__ */ jsx18(IconDeviceFloppy4, {}),
|
924
877
|
defaultText: "L\u01B0u"
|
925
878
|
},
|
926
879
|
import: {
|
927
880
|
color: "green.8",
|
928
|
-
icon: /* @__PURE__ */
|
881
|
+
icon: /* @__PURE__ */ jsx18(IconFileImport3, {}),
|
929
882
|
defaultText: "Import"
|
930
883
|
},
|
931
884
|
print: {
|
932
885
|
color: "orange.7",
|
933
|
-
icon: /* @__PURE__ */
|
886
|
+
icon: /* @__PURE__ */ jsx18(IconPrinter3, {}),
|
934
887
|
defaultText: "In"
|
935
888
|
},
|
936
889
|
export: {
|
937
890
|
color: "green.8",
|
938
|
-
icon: /* @__PURE__ */
|
891
|
+
icon: /* @__PURE__ */ jsx18(IconFileExport3, {}),
|
939
892
|
defaultText: "Export"
|
940
893
|
},
|
941
894
|
cancel: {
|
942
895
|
color: "gray",
|
943
|
-
icon: /* @__PURE__ */
|
896
|
+
icon: /* @__PURE__ */ jsx18(IconX3, {}),
|
944
897
|
defaultText: "H\u1EE7y thao t\xE1c"
|
945
898
|
},
|
946
899
|
select: {
|
@@ -953,10 +906,10 @@ var actionConfig2 = {
|
|
953
906
|
function CoreButton(_a) {
|
954
907
|
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
955
908
|
if (!actionType) {
|
956
|
-
return /* @__PURE__ */
|
909
|
+
return /* @__PURE__ */ jsx18(Button4, __spreadProps(__spreadValues({}, rest), { children }));
|
957
910
|
}
|
958
911
|
const config2 = actionConfig2[actionType];
|
959
|
-
return /* @__PURE__ */
|
912
|
+
return /* @__PURE__ */ jsx18(
|
960
913
|
Button4,
|
961
914
|
__spreadProps(__spreadValues({
|
962
915
|
color: config2.color,
|
@@ -968,17 +921,166 @@ function CoreButton(_a) {
|
|
968
921
|
);
|
969
922
|
}
|
970
923
|
|
924
|
+
// src/components/Buttons/CoreButtonCreateUpdate.tsx
|
925
|
+
import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
|
926
|
+
import { useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
927
|
+
import { ActionIcon as ActionIcon9, Button as Button5, Modal as Modal4 } from "@mantine/core";
|
928
|
+
import { IconEdit as IconEdit6, IconPlus as IconPlus6 } from "@tabler/icons-react";
|
929
|
+
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
930
|
+
function CoreButtonCreateUpdate({
|
931
|
+
modalProps,
|
932
|
+
actionIconProps,
|
933
|
+
buttonProps,
|
934
|
+
form,
|
935
|
+
onSubmit,
|
936
|
+
onSuccess,
|
937
|
+
onError,
|
938
|
+
closeModalWhenSubmit = true,
|
939
|
+
resetFormWhenSubmit = true,
|
940
|
+
children,
|
941
|
+
disclosure: externalDisclosure,
|
942
|
+
isCreate = true
|
943
|
+
}) {
|
944
|
+
const defaultDisclosure = useDisclosure5();
|
945
|
+
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
946
|
+
const queryClient = useQueryClient3();
|
947
|
+
const mutation = useMyReactMutation({
|
948
|
+
axiosFn: (values) => onSubmit(values),
|
949
|
+
options: __spreadValues(__spreadValues({
|
950
|
+
onSuccess: () => {
|
951
|
+
queryClient.invalidateQueries();
|
952
|
+
utils_notification_show({ crudType: "create" });
|
953
|
+
disclosure[1].close();
|
954
|
+
if (closeModalWhenSubmit) disclosure[1].close();
|
955
|
+
if (resetFormWhenSubmit) form.reset();
|
956
|
+
}
|
957
|
+
}, onSuccess && {
|
958
|
+
onSuccess: () => {
|
959
|
+
onSuccess();
|
960
|
+
}
|
961
|
+
}), onError && {
|
962
|
+
onError: () => {
|
963
|
+
onError();
|
964
|
+
}
|
965
|
+
})
|
966
|
+
});
|
967
|
+
return /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
968
|
+
isCreate ? /* @__PURE__ */ jsx19(
|
969
|
+
Button5,
|
970
|
+
__spreadProps(__spreadValues({
|
971
|
+
onClick: disclosure[1].open,
|
972
|
+
leftSection: /* @__PURE__ */ jsx19(IconPlus6, {})
|
973
|
+
}, buttonProps), {
|
974
|
+
children: "Th\xEAm"
|
975
|
+
})
|
976
|
+
) : /* @__PURE__ */ jsx19(
|
977
|
+
ActionIcon9,
|
978
|
+
__spreadProps(__spreadValues({
|
979
|
+
color: "yellow",
|
980
|
+
onClick: disclosure[1].open
|
981
|
+
}, actionIconProps), {
|
982
|
+
children: /* @__PURE__ */ jsx19(IconEdit6, {})
|
983
|
+
})
|
984
|
+
),
|
985
|
+
/* @__PURE__ */ jsx19(
|
986
|
+
Modal4,
|
987
|
+
__spreadProps(__spreadValues({
|
988
|
+
title: isCreate ? "Th\xEAm d\u1EEF li\u1EC7u" : "S\u1EEDa d\u1EEF li\u1EC7u",
|
989
|
+
opened: disclosure[0],
|
990
|
+
onClose: disclosure[1].close
|
991
|
+
}, modalProps), {
|
992
|
+
children: /* @__PURE__ */ jsx19("form", { onSubmit: form.onSubmit((values) => {
|
993
|
+
mutation.mutate(values);
|
994
|
+
}), children: /* @__PURE__ */ jsxs8(MyFlexColumn, { children: [
|
995
|
+
children,
|
996
|
+
/* @__PURE__ */ jsx19(Button5, { children: "L\u01B0u" })
|
997
|
+
] }) })
|
998
|
+
})
|
999
|
+
)
|
1000
|
+
] });
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
// src/components/Buttons/CoreButtonModal.tsx
|
1004
|
+
import { Button as Button6, Modal as Modal5 } from "@mantine/core";
|
1005
|
+
import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
1006
|
+
function CoreButtonModal({
|
1007
|
+
disclosure,
|
1008
|
+
children,
|
1009
|
+
buttonProps,
|
1010
|
+
modalProps
|
1011
|
+
}) {
|
1012
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
1013
|
+
/* @__PURE__ */ jsx20(Button6, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
|
1014
|
+
/* @__PURE__ */ jsx20(
|
1015
|
+
Modal5,
|
1016
|
+
__spreadProps(__spreadValues({
|
1017
|
+
opened: disclosure == null ? void 0 : disclosure[0],
|
1018
|
+
onClose: disclosure[1].close
|
1019
|
+
}, modalProps), {
|
1020
|
+
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
1021
|
+
})
|
1022
|
+
)
|
1023
|
+
] });
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
// src/components/Buttons/Anchor/MyAnchorViewPDF.tsx
|
1027
|
+
import { ActionIcon as ActionIcon10, Anchor, Group as Group4, Modal as Modal6, Paper as Paper2, Text as Text5 } from "@mantine/core";
|
1028
|
+
import { useDisclosure as useDisclosure6 } from "@mantine/hooks";
|
1029
|
+
import { IconMaximize as IconMaximize2, IconMinimize as IconMinimize2 } from "@tabler/icons-react";
|
1030
|
+
import { useState as useState6 } from "react";
|
1031
|
+
import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
1032
|
+
function MyAnchorViewPDF({ label, pdfLink }) {
|
1033
|
+
const disc = useDisclosure6(false);
|
1034
|
+
const fullScreen = useState6(false);
|
1035
|
+
const hSize = useState6("80vh");
|
1036
|
+
return /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
1037
|
+
/* @__PURE__ */ jsx21(Anchor, { onClick: disc[1].open, children: label }),
|
1038
|
+
/* @__PURE__ */ jsx21(
|
1039
|
+
Modal6,
|
1040
|
+
{
|
1041
|
+
fullScreen: fullScreen[0],
|
1042
|
+
opened: disc[0],
|
1043
|
+
onClose: disc[1].close,
|
1044
|
+
size: "80%",
|
1045
|
+
title: /* @__PURE__ */ jsxs10(Group4, { children: [
|
1046
|
+
/* @__PURE__ */ jsx21(Text5, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
1047
|
+
fullScreen[0] ? /* @__PURE__ */ jsx21(
|
1048
|
+
ActionIcon10,
|
1049
|
+
{
|
1050
|
+
onClick: () => {
|
1051
|
+
fullScreen[1](false);
|
1052
|
+
hSize[1]("80vh");
|
1053
|
+
},
|
1054
|
+
children: /* @__PURE__ */ jsx21(IconMinimize2, {})
|
1055
|
+
}
|
1056
|
+
) : /* @__PURE__ */ jsx21(
|
1057
|
+
ActionIcon10,
|
1058
|
+
{
|
1059
|
+
onClick: () => {
|
1060
|
+
fullScreen[1](true);
|
1061
|
+
hSize[1]("90vh");
|
1062
|
+
},
|
1063
|
+
children: /* @__PURE__ */ jsx21(IconMaximize2, {})
|
1064
|
+
}
|
1065
|
+
)
|
1066
|
+
] }),
|
1067
|
+
children: /* @__PURE__ */ jsx21(Paper2, { h: hSize[0], children: /* @__PURE__ */ jsx21("iframe", { src: pdfLink, width: "100%", height: "100%" }) })
|
1068
|
+
}
|
1069
|
+
)
|
1070
|
+
] });
|
1071
|
+
}
|
1072
|
+
|
971
1073
|
// src/components/Buttons/ButtonCRUD/AQButtonCreateByImportFile.tsx
|
972
1074
|
import { FileInput } from "@mantine/core";
|
973
|
-
import { useDisclosure as
|
1075
|
+
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
974
1076
|
import { IconFileTypeXls } from "@tabler/icons-react";
|
975
|
-
import { useMutation, useQueryClient as
|
1077
|
+
import { useMutation, useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
976
1078
|
import * as XLSX from "xlsx";
|
977
1079
|
|
978
1080
|
// src/components/Buttons/ButtonModal/MyButtonModal.tsx
|
979
|
-
import { Button as
|
980
|
-
import { IconEdit as
|
981
|
-
import { Fragment as
|
1081
|
+
import { Button as Button7, Modal as Modal7 } from "@mantine/core";
|
1082
|
+
import { IconEdit as IconEdit7, IconPlus as IconPlus7, IconTrash as IconTrash6 } from "@tabler/icons-react";
|
1083
|
+
import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
982
1084
|
function MyButtonModal(_a) {
|
983
1085
|
var _b = _a, {
|
984
1086
|
fullScreen = false,
|
@@ -1001,81 +1103,81 @@ function MyButtonModal(_a) {
|
|
1001
1103
|
]);
|
1002
1104
|
const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
|
1003
1105
|
if (!crudType) {
|
1004
|
-
return /* @__PURE__ */
|
1005
|
-
/* @__PURE__ */
|
1006
|
-
/* @__PURE__ */
|
1007
|
-
|
1106
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
1107
|
+
/* @__PURE__ */ jsx22(Button7, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: label })),
|
1108
|
+
/* @__PURE__ */ jsx22(
|
1109
|
+
Modal7,
|
1008
1110
|
{
|
1009
1111
|
fullScreen,
|
1010
1112
|
size: modalSize,
|
1011
1113
|
title,
|
1012
1114
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1013
1115
|
onClose: disclosure[1].close,
|
1014
|
-
children: /* @__PURE__ */
|
1116
|
+
children: /* @__PURE__ */ jsx22(MyFlexColumn, { children })
|
1015
1117
|
}
|
1016
1118
|
)
|
1017
1119
|
] });
|
1018
1120
|
}
|
1019
1121
|
if (crudType == "create") {
|
1020
|
-
return /* @__PURE__ */
|
1021
|
-
/* @__PURE__ */
|
1022
|
-
/* @__PURE__ */
|
1023
|
-
|
1122
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
1123
|
+
/* @__PURE__ */ jsx22(Button7, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, leftSection: /* @__PURE__ */ jsx22(IconPlus7, {}) }, rest), { children: label ? label : `Th\xEAm` })),
|
1124
|
+
/* @__PURE__ */ jsx22(
|
1125
|
+
Modal7,
|
1024
1126
|
{
|
1025
1127
|
fullScreen,
|
1026
1128
|
size: modalSize,
|
1027
1129
|
title: title ? title : `T\u1EA1o ${objectNameLower} m\u1EDBi`,
|
1028
1130
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1029
1131
|
onClose: disclosure[1].close,
|
1030
|
-
children: /* @__PURE__ */
|
1132
|
+
children: /* @__PURE__ */ jsx22(MyFlexColumn, { children })
|
1031
1133
|
}
|
1032
1134
|
)
|
1033
1135
|
] });
|
1034
1136
|
}
|
1035
1137
|
if (crudType == "createMultiple") {
|
1036
|
-
return /* @__PURE__ */
|
1037
|
-
/* @__PURE__ */
|
1038
|
-
/* @__PURE__ */
|
1039
|
-
|
1138
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
1139
|
+
/* @__PURE__ */ jsx22(Button7, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "green", leftSection: /* @__PURE__ */ jsx22(IconPlus7, {}) }, rest), { children: label ? label : `Import ${objectNameLower}` })),
|
1140
|
+
/* @__PURE__ */ jsx22(
|
1141
|
+
Modal7,
|
1040
1142
|
{
|
1041
1143
|
fullScreen,
|
1042
1144
|
size: modalSize,
|
1043
1145
|
title: title ? title : `Th\xEAm danh s\xE1ch ${objectNameLower}`,
|
1044
1146
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1045
1147
|
onClose: disclosure[1].close,
|
1046
|
-
children: /* @__PURE__ */
|
1148
|
+
children: /* @__PURE__ */ jsx22(MyFlexColumn, { children })
|
1047
1149
|
}
|
1048
1150
|
)
|
1049
1151
|
] });
|
1050
1152
|
}
|
1051
1153
|
if (crudType == "update") {
|
1052
|
-
return /* @__PURE__ */
|
1053
|
-
/* @__PURE__ */
|
1054
|
-
/* @__PURE__ */
|
1055
|
-
|
1154
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
1155
|
+
/* @__PURE__ */ jsx22(Button7, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "yellow", leftSection: /* @__PURE__ */ jsx22(IconEdit7, {}) }, rest), { children: label ? label : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}` })),
|
1156
|
+
/* @__PURE__ */ jsx22(
|
1157
|
+
Modal7,
|
1056
1158
|
{
|
1057
1159
|
fullScreen,
|
1058
1160
|
size: modalSize,
|
1059
1161
|
title: title ? title : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}`,
|
1060
1162
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1061
1163
|
onClose: disclosure[1].close,
|
1062
|
-
children: /* @__PURE__ */
|
1164
|
+
children: /* @__PURE__ */ jsx22(MyFlexColumn, { children })
|
1063
1165
|
}
|
1064
1166
|
)
|
1065
1167
|
] });
|
1066
1168
|
}
|
1067
1169
|
if (crudType == "delete") {
|
1068
|
-
return /* @__PURE__ */
|
1069
|
-
/* @__PURE__ */
|
1070
|
-
/* @__PURE__ */
|
1071
|
-
|
1170
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
1171
|
+
/* @__PURE__ */ jsx22(Button7, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "red", leftSection: /* @__PURE__ */ jsx22(IconTrash6, {}) }, rest), { children: label ? label : `X\xF3a ${objectNameLower}` })),
|
1172
|
+
/* @__PURE__ */ jsx22(
|
1173
|
+
Modal7,
|
1072
1174
|
{
|
1073
1175
|
fullScreen,
|
1074
1176
|
size: modalSize,
|
1075
1177
|
title: title ? title : `X\xF3a ${objectNameLower}`,
|
1076
1178
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1077
1179
|
onClose: disclosure[1].close,
|
1078
|
-
children: /* @__PURE__ */
|
1180
|
+
children: /* @__PURE__ */ jsx22(MyFlexColumn, { children })
|
1079
1181
|
}
|
1080
1182
|
)
|
1081
1183
|
] });
|
@@ -1083,7 +1185,7 @@ function MyButtonModal(_a) {
|
|
1083
1185
|
}
|
1084
1186
|
|
1085
1187
|
// src/components/Buttons/ButtonCRUD/AQButtonCreateByImportFile.tsx
|
1086
|
-
import { jsx as
|
1188
|
+
import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
1087
1189
|
function AQButtonCreateByImportFile(_a) {
|
1088
1190
|
var _b = _a, {
|
1089
1191
|
form,
|
@@ -1099,8 +1201,8 @@ function AQButtonCreateByImportFile(_a) {
|
|
1099
1201
|
// children,
|
1100
1202
|
"setImportedData"
|
1101
1203
|
]);
|
1102
|
-
const disc =
|
1103
|
-
const queryClient =
|
1204
|
+
const disc = useDisclosure7();
|
1205
|
+
const queryClient = useQueryClient4();
|
1104
1206
|
const mutation = useMutation({
|
1105
1207
|
mutationFn: async () => {
|
1106
1208
|
return await onSubmit();
|
@@ -1132,12 +1234,12 @@ function AQButtonCreateByImportFile(_a) {
|
|
1132
1234
|
};
|
1133
1235
|
reader.readAsArrayBuffer(file);
|
1134
1236
|
};
|
1135
|
-
return /* @__PURE__ */
|
1136
|
-
}), children: /* @__PURE__ */
|
1137
|
-
/* @__PURE__ */
|
1237
|
+
return /* @__PURE__ */ jsx23(MyButtonModal, __spreadProps(__spreadValues({ disclosure: disc, crudType: "createMultiple" }, rest), { children: /* @__PURE__ */ jsx23("form", { onSubmit: form.onSubmit((values) => {
|
1238
|
+
}), children: /* @__PURE__ */ jsxs12(MyFlexColumn, { children: [
|
1239
|
+
/* @__PURE__ */ jsx23(
|
1138
1240
|
FileInput,
|
1139
1241
|
{
|
1140
|
-
leftSection: /* @__PURE__ */
|
1242
|
+
leftSection: /* @__PURE__ */ jsx23(IconFileTypeXls, {}),
|
1141
1243
|
accept: ".xlsx",
|
1142
1244
|
description: "\u0110\u1ECBnh d\u1EA1ng h\u1EE3p l\u1EC7: .xlsx",
|
1143
1245
|
label: "Ch\u1ECDn file",
|
@@ -1146,15 +1248,15 @@ function AQButtonCreateByImportFile(_a) {
|
|
1146
1248
|
placeholder: "Ch\u1ECDn file"
|
1147
1249
|
}
|
1148
1250
|
),
|
1149
|
-
/* @__PURE__ */
|
1251
|
+
/* @__PURE__ */ jsx23(MyButton, { type: "submit", crudType: "createMultiple" })
|
1150
1252
|
] }) }) }));
|
1151
1253
|
}
|
1152
1254
|
|
1153
1255
|
// src/components/Buttons/ButtonCRUD/AQButtonExportData.tsx
|
1154
|
-
import { Button as
|
1256
|
+
import { Button as Button8 } from "@mantine/core";
|
1155
1257
|
import { IconDownload as IconDownload2 } from "@tabler/icons-react";
|
1156
1258
|
import * as XLSX2 from "xlsx";
|
1157
|
-
import { jsx as
|
1259
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
1158
1260
|
function AQButtonExportData({
|
1159
1261
|
isAllData,
|
1160
1262
|
objectName,
|
@@ -1180,8 +1282,8 @@ function AQButtonExportData({
|
|
1180
1282
|
XLSX2.utils.book_append_sheet(workbook, worksheet, "Exported Data");
|
1181
1283
|
XLSX2.writeFile(workbook, `${objectName}.xlsx`);
|
1182
1284
|
};
|
1183
|
-
return /* @__PURE__ */
|
1184
|
-
|
1285
|
+
return /* @__PURE__ */ jsx24(
|
1286
|
+
Button8,
|
1185
1287
|
{
|
1186
1288
|
disabled: data.length === 0,
|
1187
1289
|
variant: "filled",
|
@@ -1190,95 +1292,16 @@ function AQButtonExportData({
|
|
1190
1292
|
event.preventDefault();
|
1191
1293
|
handleExport();
|
1192
1294
|
},
|
1193
|
-
leftSection: /* @__PURE__ */
|
1295
|
+
leftSection: /* @__PURE__ */ jsx24(IconDownload2, {}),
|
1194
1296
|
children: "Export"
|
1195
1297
|
}
|
1196
1298
|
);
|
1197
1299
|
}
|
1198
1300
|
|
1199
|
-
// src/components/Buttons/ButtonCRUD/CoreButtonCreateUpdate.tsx
|
1200
|
-
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
1201
|
-
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
1202
|
-
import { ActionIcon as ActionIcon10, Button as Button7, Modal as Modal6 } from "@mantine/core";
|
1203
|
-
import { IconEdit as IconEdit7, IconPlus as IconPlus7 } from "@tabler/icons-react";
|
1204
|
-
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
1205
|
-
function CoreButtonCreateUpdate({
|
1206
|
-
modalProps,
|
1207
|
-
actionIconProps,
|
1208
|
-
buttonProps,
|
1209
|
-
form,
|
1210
|
-
onSubmit,
|
1211
|
-
onSuccess,
|
1212
|
-
onError,
|
1213
|
-
closeModalWhenSubmit = true,
|
1214
|
-
resetFormWhenSubmit = true,
|
1215
|
-
children,
|
1216
|
-
disclosure: externalDisclosure,
|
1217
|
-
isCreate = true
|
1218
|
-
}) {
|
1219
|
-
const defaultDisclosure = useDisclosure7();
|
1220
|
-
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1221
|
-
const queryClient = useQueryClient4();
|
1222
|
-
const mutation = useMyReactMutation({
|
1223
|
-
axiosFn: (values) => onSubmit(values),
|
1224
|
-
options: __spreadValues(__spreadValues({
|
1225
|
-
onSuccess: () => {
|
1226
|
-
queryClient.invalidateQueries();
|
1227
|
-
utils_notification_show({ crudType: "create" });
|
1228
|
-
disclosure[1].close();
|
1229
|
-
if (closeModalWhenSubmit) disclosure[1].close();
|
1230
|
-
if (resetFormWhenSubmit) form.reset();
|
1231
|
-
}
|
1232
|
-
}, onSuccess && {
|
1233
|
-
onSuccess: () => {
|
1234
|
-
onSuccess();
|
1235
|
-
}
|
1236
|
-
}), onError && {
|
1237
|
-
onError: () => {
|
1238
|
-
onError();
|
1239
|
-
}
|
1240
|
-
})
|
1241
|
-
});
|
1242
|
-
return /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
1243
|
-
isCreate ? /* @__PURE__ */ jsx23(
|
1244
|
-
Button7,
|
1245
|
-
__spreadProps(__spreadValues({
|
1246
|
-
onClick: disclosure[1].open,
|
1247
|
-
leftSection: /* @__PURE__ */ jsx23(IconPlus7, {})
|
1248
|
-
}, buttonProps), {
|
1249
|
-
children: "Th\xEAm"
|
1250
|
-
})
|
1251
|
-
) : /* @__PURE__ */ jsx23(
|
1252
|
-
ActionIcon10,
|
1253
|
-
__spreadProps(__spreadValues({
|
1254
|
-
color: "yellow",
|
1255
|
-
onClick: disclosure[1].open
|
1256
|
-
}, actionIconProps), {
|
1257
|
-
children: /* @__PURE__ */ jsx23(IconEdit7, {})
|
1258
|
-
})
|
1259
|
-
),
|
1260
|
-
/* @__PURE__ */ jsx23(
|
1261
|
-
Modal6,
|
1262
|
-
__spreadProps(__spreadValues({
|
1263
|
-
title: isCreate ? "Th\xEAm d\u1EEF li\u1EC7u" : "S\u1EEDa d\u1EEF li\u1EC7u",
|
1264
|
-
opened: disclosure[0],
|
1265
|
-
onClose: disclosure[1].close
|
1266
|
-
}, modalProps), {
|
1267
|
-
children: /* @__PURE__ */ jsx23("form", { onSubmit: form.onSubmit((values) => {
|
1268
|
-
mutation.mutate(values);
|
1269
|
-
}), children: /* @__PURE__ */ jsxs11(MyFlexColumn, { children: [
|
1270
|
-
children,
|
1271
|
-
/* @__PURE__ */ jsx23(Button7, { children: "L\u01B0u" })
|
1272
|
-
] }) })
|
1273
|
-
})
|
1274
|
-
)
|
1275
|
-
] });
|
1276
|
-
}
|
1277
|
-
|
1278
1301
|
// src/components/Buttons/ButtonCRUD/MyButtonCreate.tsx
|
1279
1302
|
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1280
1303
|
import { useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1281
|
-
import { jsx as
|
1304
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
1282
1305
|
function MyButtonCreate(_a) {
|
1283
1306
|
var _b = _a, {
|
1284
1307
|
form,
|
@@ -1342,11 +1365,11 @@ function MyButtonCreate(_a) {
|
|
1342
1365
|
}
|
1343
1366
|
})
|
1344
1367
|
});
|
1345
|
-
return /* @__PURE__ */
|
1368
|
+
return /* @__PURE__ */ jsx25(MyButtonModal, __spreadProps(__spreadValues({ disclosure, crudType: "create" }, rest), { children: /* @__PURE__ */ jsx25("form", { onSubmit: form.onSubmit((values) => {
|
1346
1369
|
mutation.mutate(values);
|
1347
|
-
}), children: /* @__PURE__ */
|
1370
|
+
}), children: /* @__PURE__ */ jsxs13(MyFlexColumn, { children: [
|
1348
1371
|
children,
|
1349
|
-
/* @__PURE__ */
|
1372
|
+
/* @__PURE__ */ jsx25(MyButton, { type: "submit", crudType: "save" })
|
1350
1373
|
] }) }) }));
|
1351
1374
|
}
|
1352
1375
|
|
@@ -1355,7 +1378,7 @@ import { Group as Group5, Highlight as Highlight2 } from "@mantine/core";
|
|
1355
1378
|
import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
|
1356
1379
|
import { useMutation as useMutation2, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
1357
1380
|
import { useState as useState7 } from "react";
|
1358
|
-
import { jsx as
|
1381
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
1359
1382
|
function MyButtonDeleteList(_a) {
|
1360
1383
|
var _b = _a, {
|
1361
1384
|
onSubmit,
|
@@ -1394,7 +1417,7 @@ function MyButtonDeleteList(_a) {
|
|
1394
1417
|
loadingState[1](true);
|
1395
1418
|
mutation.mutate();
|
1396
1419
|
}
|
1397
|
-
return /* @__PURE__ */
|
1420
|
+
return /* @__PURE__ */ jsxs14(
|
1398
1421
|
MyButtonModal,
|
1399
1422
|
__spreadProps(__spreadValues({
|
1400
1423
|
disclosure: disc,
|
@@ -1402,7 +1425,7 @@ function MyButtonDeleteList(_a) {
|
|
1402
1425
|
disabled: contextData == void 0 || contextData.length == 0
|
1403
1426
|
}, rest), {
|
1404
1427
|
children: [
|
1405
|
-
/* @__PURE__ */
|
1428
|
+
/* @__PURE__ */ jsx26(
|
1406
1429
|
Highlight2,
|
1407
1430
|
{
|
1408
1431
|
highlight: contextData || [],
|
@@ -1415,8 +1438,8 @@ function MyButtonDeleteList(_a) {
|
|
1415
1438
|
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?`
|
1416
1439
|
}
|
1417
1440
|
),
|
1418
|
-
/* @__PURE__ */
|
1419
|
-
/* @__PURE__ */
|
1441
|
+
/* @__PURE__ */ jsxs14(Group5, { grow: true, children: [
|
1442
|
+
/* @__PURE__ */ jsx26(
|
1420
1443
|
MyButton,
|
1421
1444
|
{
|
1422
1445
|
crudType: "delete",
|
@@ -1424,7 +1447,7 @@ function MyButtonDeleteList(_a) {
|
|
1424
1447
|
loading: loadingState[0]
|
1425
1448
|
}
|
1426
1449
|
),
|
1427
|
-
/* @__PURE__ */
|
1450
|
+
/* @__PURE__ */ jsx26(
|
1428
1451
|
MyButton,
|
1429
1452
|
{
|
1430
1453
|
crudType: "cancel",
|
@@ -1438,27 +1461,27 @@ function MyButtonDeleteList(_a) {
|
|
1438
1461
|
}
|
1439
1462
|
|
1440
1463
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1441
|
-
import { Button as
|
1464
|
+
import { Button as Button12, Modal as Modal10, useModalsStack as useModalsStack3 } from "@mantine/core";
|
1442
1465
|
import { IconFileImport as IconFileImport4 } from "@tabler/icons-react";
|
1443
1466
|
|
1444
1467
|
// src/components/Combobox/Select/MySelect.tsx
|
1445
1468
|
import { Select } from "@mantine/core";
|
1446
|
-
import { jsx as
|
1469
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
1447
1470
|
function MySelect(_a) {
|
1448
1471
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
1449
|
-
return /* @__PURE__ */
|
1472
|
+
return /* @__PURE__ */ jsx27(Select, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
1450
1473
|
}
|
1451
1474
|
|
1452
1475
|
// src/components/Layouts/FlexEnd/MyFlexEnd.tsx
|
1453
1476
|
import { Group as Group6 } from "@mantine/core";
|
1454
|
-
import { jsx as
|
1477
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
1455
1478
|
function MyFlexEnd(_a) {
|
1456
1479
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1457
|
-
return /* @__PURE__ */
|
1480
|
+
return /* @__PURE__ */ jsx28(Group6, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1458
1481
|
}
|
1459
1482
|
|
1460
1483
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1461
|
-
import { Button as
|
1484
|
+
import { Button as Button9, Divider, Fieldset, Group as Group7, Modal as Modal8, SimpleGrid, Space as Space2, Table } from "@mantine/core";
|
1462
1485
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
1463
1486
|
|
1464
1487
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
@@ -1612,99 +1635,99 @@ function useS_ButtonImport() {
|
|
1612
1635
|
}
|
1613
1636
|
|
1614
1637
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1615
|
-
import { jsx as
|
1638
|
+
import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
1616
1639
|
function SelectFieldModal({ stack, onImport }) {
|
1617
1640
|
var _a, _b;
|
1618
1641
|
const store = useS_ButtonImport();
|
1619
|
-
return /* @__PURE__ */
|
1620
|
-
/* @__PURE__ */
|
1621
|
-
/* @__PURE__ */
|
1622
|
-
/* @__PURE__ */
|
1623
|
-
/* @__PURE__ */
|
1624
|
-
/* @__PURE__ */
|
1625
|
-
/* @__PURE__ */
|
1642
|
+
return /* @__PURE__ */ jsxs15(Modal8, __spreadProps(__spreadValues({ fullScreen: true }, stack.register("select-field-page")), { title: "Import", children: [
|
1643
|
+
/* @__PURE__ */ jsxs15(SimpleGrid, { cols: { base: 1, lg: 2 }, children: [
|
1644
|
+
/* @__PURE__ */ jsxs15(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin", children: [
|
1645
|
+
/* @__PURE__ */ jsxs15(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1646
|
+
/* @__PURE__ */ jsx29(Table.Thead, { bg: "cyan", children: /* @__PURE__ */ jsxs15(Table.Tr, { children: [
|
1647
|
+
/* @__PURE__ */ jsx29(Table.Th, { children: "M\xE3 field" }),
|
1648
|
+
/* @__PURE__ */ jsx29(Table.Th, { children: "T\xEAn field" })
|
1626
1649
|
] }) }),
|
1627
|
-
/* @__PURE__ */
|
1650
|
+
/* @__PURE__ */ jsx29(Table.Tbody, { children: (_a = store.state.fieldConfig) == null ? void 0 : _a.filter((item) => item.isSelected == false || item.isSelected == void 0).map((item, idx) => /* @__PURE__ */ jsxs15(
|
1628
1651
|
Table.Tr,
|
1629
1652
|
{
|
1630
1653
|
style: { cursor: "pointer" },
|
1631
1654
|
children: [
|
1632
|
-
/* @__PURE__ */
|
1633
|
-
/* @__PURE__ */
|
1655
|
+
/* @__PURE__ */ jsx29(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldKey.toString() }),
|
1656
|
+
/* @__PURE__ */ jsx29(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldName })
|
1634
1657
|
]
|
1635
1658
|
},
|
1636
1659
|
idx
|
1637
1660
|
)) })
|
1638
1661
|
] }),
|
1639
|
-
/* @__PURE__ */
|
1640
|
-
/* @__PURE__ */
|
1641
|
-
|
1662
|
+
/* @__PURE__ */ jsx29(Space2, {}),
|
1663
|
+
/* @__PURE__ */ jsx29(Group7, { children: /* @__PURE__ */ jsx29(
|
1664
|
+
Button9,
|
1642
1665
|
{
|
1643
1666
|
onClick: () => {
|
1644
1667
|
store.changeAllSelected(true);
|
1645
1668
|
},
|
1646
|
-
leftSection: /* @__PURE__ */
|
1669
|
+
leftSection: /* @__PURE__ */ jsx29(IconArrowBigRight, {}),
|
1647
1670
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3"
|
1648
1671
|
}
|
1649
1672
|
) })
|
1650
1673
|
] }),
|
1651
|
-
/* @__PURE__ */
|
1652
|
-
/* @__PURE__ */
|
1653
|
-
/* @__PURE__ */
|
1654
|
-
/* @__PURE__ */
|
1655
|
-
/* @__PURE__ */
|
1656
|
-
/* @__PURE__ */
|
1674
|
+
/* @__PURE__ */ jsxs15(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin \u0111\u01B0\u1EE3c ch\u1ECDn", children: [
|
1675
|
+
/* @__PURE__ */ jsxs15(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1676
|
+
/* @__PURE__ */ jsx29(Table.Thead, { children: /* @__PURE__ */ jsxs15(Table.Tr, { children: [
|
1677
|
+
/* @__PURE__ */ jsx29(Table.Th, { children: "M\xE3 field" }),
|
1678
|
+
/* @__PURE__ */ jsx29(Table.Th, { children: "T\xEAn field" }),
|
1679
|
+
/* @__PURE__ */ jsx29(Table.Th, { children: "C\u1ED9t map" })
|
1657
1680
|
] }) }),
|
1658
|
-
/* @__PURE__ */
|
1681
|
+
/* @__PURE__ */ jsx29(Table.Tbody, { children: (_b = store.state.fieldConfig) == null ? void 0 : _b.filter((item) => item.isSelected == true).map((item, idx) => /* @__PURE__ */ jsxs15(
|
1659
1682
|
Table.Tr,
|
1660
1683
|
{
|
1661
1684
|
style: { cursor: "pointer" },
|
1662
1685
|
children: [
|
1663
|
-
/* @__PURE__ */
|
1664
|
-
/* @__PURE__ */
|
1665
|
-
/* @__PURE__ */
|
1686
|
+
/* @__PURE__ */ jsx29(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldKey.toString() }),
|
1687
|
+
/* @__PURE__ */ jsx29(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldName }),
|
1688
|
+
/* @__PURE__ */ jsx29(Table.Td, { children: /* @__PURE__ */ jsx29(MySelect, { data: store.state.title, value: item.fieldToMap, onChange: (e4) => store.setFieldToMap(item.fieldKey.toString(), e4) }) })
|
1666
1689
|
]
|
1667
1690
|
},
|
1668
1691
|
idx
|
1669
1692
|
)) })
|
1670
1693
|
] }),
|
1671
|
-
/* @__PURE__ */
|
1672
|
-
/* @__PURE__ */
|
1673
|
-
|
1694
|
+
/* @__PURE__ */ jsx29(Space2, {}),
|
1695
|
+
/* @__PURE__ */ jsx29(
|
1696
|
+
Button9,
|
1674
1697
|
{
|
1675
1698
|
onClick: () => {
|
1676
1699
|
store.changeAllSelected(false);
|
1677
1700
|
},
|
1678
|
-
leftSection: /* @__PURE__ */
|
1701
|
+
leftSection: /* @__PURE__ */ jsx29(IconArrowBigLeft, {}),
|
1679
1702
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3 v\u1EC1"
|
1680
1703
|
}
|
1681
1704
|
)
|
1682
1705
|
] })
|
1683
1706
|
] }),
|
1684
|
-
/* @__PURE__ */
|
1685
|
-
/* @__PURE__ */
|
1686
|
-
/* @__PURE__ */
|
1687
|
-
|
1707
|
+
/* @__PURE__ */ jsx29(Divider, {}),
|
1708
|
+
/* @__PURE__ */ jsxs15(MyFlexEnd, { children: [
|
1709
|
+
/* @__PURE__ */ jsx29(
|
1710
|
+
Button9,
|
1688
1711
|
{
|
1689
|
-
leftSection: /* @__PURE__ */
|
1712
|
+
leftSection: /* @__PURE__ */ jsx29(IconArrowBackUp, {}),
|
1690
1713
|
onClick: () => stack.close("select-field-page"),
|
1691
1714
|
color: "gray.7",
|
1692
1715
|
children: "Quay l\u1EA1i"
|
1693
1716
|
}
|
1694
1717
|
),
|
1695
|
-
/* @__PURE__ */
|
1696
|
-
|
1718
|
+
/* @__PURE__ */ jsx29(
|
1719
|
+
Button9,
|
1697
1720
|
{
|
1698
1721
|
color: "blue.8",
|
1699
|
-
leftSection: /* @__PURE__ */
|
1722
|
+
leftSection: /* @__PURE__ */ jsx29(IconArrowBigRight, {}),
|
1700
1723
|
onClick: onImport,
|
1701
1724
|
children: "Ti\u1EBFp t\u1EE5c / Import"
|
1702
1725
|
}
|
1703
1726
|
),
|
1704
|
-
/* @__PURE__ */
|
1705
|
-
|
1727
|
+
/* @__PURE__ */ jsx29(
|
1728
|
+
Button9,
|
1706
1729
|
{
|
1707
|
-
leftSection: /* @__PURE__ */
|
1730
|
+
leftSection: /* @__PURE__ */ jsx29(IconSquareRoundedX, {}),
|
1708
1731
|
onClick: () => stack.closeAll(),
|
1709
1732
|
color: "red.6",
|
1710
1733
|
children: "\u0110\xF3ng"
|
@@ -1715,7 +1738,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1715
1738
|
}
|
1716
1739
|
|
1717
1740
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1718
|
-
import { Alert, Button as
|
1741
|
+
import { Alert, Button as Button10, Group as Group8, Portal } from "@mantine/core";
|
1719
1742
|
import { IconBug, IconDownload as IconDownload3, IconInfoCircle } from "@tabler/icons-react";
|
1720
1743
|
import { download, generateCsv, mkConfig } from "export-to-csv";
|
1721
1744
|
import {
|
@@ -1724,7 +1747,7 @@ import {
|
|
1724
1747
|
} from "mantine-react-table";
|
1725
1748
|
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
1726
1749
|
import { useEffect as useEffect5 } from "react";
|
1727
|
-
import { Fragment as
|
1750
|
+
import { Fragment as Fragment9, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
1728
1751
|
function formatData(data, formats) {
|
1729
1752
|
return data.map((row) => {
|
1730
1753
|
const transformedRow = {};
|
@@ -1787,14 +1810,14 @@ function MyDataTable(_a) {
|
|
1787
1810
|
columns,
|
1788
1811
|
data,
|
1789
1812
|
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1790
|
-
return /* @__PURE__ */
|
1813
|
+
return /* @__PURE__ */ jsxs16(Group8, { children: [
|
1791
1814
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
1792
|
-
exportAble && /* @__PURE__ */
|
1793
|
-
|
1815
|
+
exportAble && /* @__PURE__ */ jsx30(Fragment9, { children: /* @__PURE__ */ jsx30(
|
1816
|
+
Button10,
|
1794
1817
|
{
|
1795
1818
|
color: "green.8",
|
1796
1819
|
onClick: () => handleExport(table2.getSelectedRowModel().rows),
|
1797
|
-
leftSection: /* @__PURE__ */
|
1820
|
+
leftSection: /* @__PURE__ */ jsx30(IconDownload3, {}),
|
1798
1821
|
variant: "filled",
|
1799
1822
|
children: "Export"
|
1800
1823
|
}
|
@@ -1841,7 +1864,7 @@ function MyDataTable(_a) {
|
|
1841
1864
|
}
|
1842
1865
|
},
|
1843
1866
|
localization: MRT_Localization_VI,
|
1844
|
-
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */
|
1867
|
+
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */ jsx30(Alert, { icon: /* @__PURE__ */ jsx30(IconBug, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" }) : /* @__PURE__ */ jsx30(Alert, { icon: /* @__PURE__ */ jsx30(IconInfoCircle, {}), color: "gray", title: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u!", m: "md" }),
|
1845
1868
|
state: {
|
1846
1869
|
showSkeletons: isLoading
|
1847
1870
|
},
|
@@ -1852,24 +1875,24 @@ function MyDataTable(_a) {
|
|
1852
1875
|
setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
|
1853
1876
|
}, [table.getState().rowSelection]);
|
1854
1877
|
if (data == void 0) return;
|
1855
|
-
return /* @__PURE__ */
|
1878
|
+
return /* @__PURE__ */ jsx30("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx30(Portal, { children: /* @__PURE__ */ jsx30(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx30(MantineReactTable, { table }) });
|
1856
1879
|
}
|
1857
1880
|
|
1858
1881
|
// src/components/Buttons/ButtonImport/SelectFileModal.tsx
|
1859
|
-
import { Button as
|
1882
|
+
import { Button as Button11, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal9, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
|
1860
1883
|
import { IconArrowBigRight as IconArrowBigRight2, IconSquareRoundedX as IconSquareRoundedX2 } from "@tabler/icons-react";
|
1861
|
-
import { jsx as
|
1884
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
1862
1885
|
function SelectFileModal({ onExportStructure, stack }) {
|
1863
1886
|
var _a;
|
1864
1887
|
const store = useS_ButtonImport();
|
1865
|
-
return /* @__PURE__ */
|
1866
|
-
|
1888
|
+
return /* @__PURE__ */ jsxs17(
|
1889
|
+
Modal9,
|
1867
1890
|
__spreadProps(__spreadValues({
|
1868
1891
|
title: "Import",
|
1869
1892
|
fullScreen: true
|
1870
1893
|
}, stack.register("select-file-page")), {
|
1871
1894
|
children: [
|
1872
|
-
/* @__PURE__ */
|
1895
|
+
/* @__PURE__ */ jsx31(
|
1873
1896
|
FileInput2,
|
1874
1897
|
{
|
1875
1898
|
value: store.state.file,
|
@@ -1879,8 +1902,8 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1879
1902
|
clearable: true
|
1880
1903
|
}
|
1881
1904
|
),
|
1882
|
-
/* @__PURE__ */
|
1883
|
-
/* @__PURE__ */
|
1905
|
+
/* @__PURE__ */ jsxs17(SimpleGrid2, { cols: { base: 1, md: 2, lg: 2, xl: 4 }, children: [
|
1906
|
+
/* @__PURE__ */ jsx31(
|
1884
1907
|
NumberInput,
|
1885
1908
|
{
|
1886
1909
|
label: "D\xF2ng ti\xEAu \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1888,7 +1911,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1888
1911
|
onChange: (e4) => store.setProperty("startTitleIndex", e4)
|
1889
1912
|
}
|
1890
1913
|
),
|
1891
|
-
/* @__PURE__ */
|
1914
|
+
/* @__PURE__ */ jsx31(
|
1892
1915
|
NumberInput,
|
1893
1916
|
{
|
1894
1917
|
label: "D\xF2ng d\u1EEF li\u1EC7u b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1896,7 +1919,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1896
1919
|
onChange: (e4) => store.setProperty("startDataIndex", e4)
|
1897
1920
|
}
|
1898
1921
|
),
|
1899
|
-
/* @__PURE__ */
|
1922
|
+
/* @__PURE__ */ jsx31(
|
1900
1923
|
Select2,
|
1901
1924
|
{
|
1902
1925
|
readOnly: true,
|
@@ -1905,7 +1928,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1905
1928
|
defaultValue: "100.000"
|
1906
1929
|
}
|
1907
1930
|
),
|
1908
|
-
/* @__PURE__ */
|
1931
|
+
/* @__PURE__ */ jsx31(
|
1909
1932
|
Select2,
|
1910
1933
|
{
|
1911
1934
|
readOnly: true,
|
@@ -1915,37 +1938,37 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1915
1938
|
}
|
1916
1939
|
)
|
1917
1940
|
] }),
|
1918
|
-
/* @__PURE__ */
|
1941
|
+
/* @__PURE__ */ jsx31(Fieldset2, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin trong file d\u1EEF li\u1EC7u", children: store.state.data && /* @__PURE__ */ jsx31(
|
1919
1942
|
MyDataTable,
|
1920
1943
|
{
|
1921
1944
|
columns: store.columns,
|
1922
1945
|
data: store.state.data
|
1923
1946
|
}
|
1924
1947
|
) }),
|
1925
|
-
/* @__PURE__ */
|
1926
|
-
/* @__PURE__ */
|
1927
|
-
|
1948
|
+
/* @__PURE__ */ jsxs17(MyFlexEnd, { children: [
|
1949
|
+
/* @__PURE__ */ jsx31(
|
1950
|
+
Button11,
|
1928
1951
|
{
|
1929
1952
|
color: "teal.8",
|
1930
1953
|
onClick: onExportStructure,
|
1931
1954
|
children: "Xu\u1EA5t file c\u1EA5u tr\xFAc"
|
1932
1955
|
}
|
1933
1956
|
),
|
1934
|
-
/* @__PURE__ */
|
1935
|
-
|
1957
|
+
/* @__PURE__ */ jsx31(
|
1958
|
+
Button11,
|
1936
1959
|
{
|
1937
1960
|
disabled: ((_a = store.state.data) == null ? void 0 : _a.length) == 0,
|
1938
1961
|
color: "blue.8",
|
1939
|
-
leftSection: /* @__PURE__ */
|
1962
|
+
leftSection: /* @__PURE__ */ jsx31(IconArrowBigRight2, {}),
|
1940
1963
|
onClick: () => stack.open("select-field-page"),
|
1941
1964
|
children: "Ti\u1EBFp t\u1EE5c"
|
1942
1965
|
}
|
1943
1966
|
),
|
1944
|
-
/* @__PURE__ */
|
1945
|
-
|
1967
|
+
/* @__PURE__ */ jsx31(
|
1968
|
+
Button11,
|
1946
1969
|
{
|
1947
1970
|
color: "red.6",
|
1948
|
-
leftSection: /* @__PURE__ */
|
1971
|
+
leftSection: /* @__PURE__ */ jsx31(IconSquareRoundedX2, {}),
|
1949
1972
|
onClick: stack.closeAll,
|
1950
1973
|
children: "\u0110\xF3ng"
|
1951
1974
|
}
|
@@ -1957,26 +1980,26 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1957
1980
|
}
|
1958
1981
|
|
1959
1982
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1960
|
-
import { Fragment as
|
1983
|
+
import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
1961
1984
|
function MyButtonImport({
|
1962
1985
|
onExportStructure,
|
1963
1986
|
onImport
|
1964
1987
|
}) {
|
1965
1988
|
const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
|
1966
1989
|
const store = useS_ButtonImport();
|
1967
|
-
return /* @__PURE__ */
|
1968
|
-
/* @__PURE__ */
|
1969
|
-
/* @__PURE__ */
|
1970
|
-
/* @__PURE__ */
|
1971
|
-
/* @__PURE__ */
|
1990
|
+
return /* @__PURE__ */ jsxs18(Fragment10, { children: [
|
1991
|
+
/* @__PURE__ */ jsx32(Button12, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx32(IconFileImport4, {}), title: "Import", children: "Import" }),
|
1992
|
+
/* @__PURE__ */ jsxs18(Modal10.Stack, { children: [
|
1993
|
+
/* @__PURE__ */ jsx32(SelectFileModal, { stack, onExportStructure }),
|
1994
|
+
/* @__PURE__ */ jsx32(SelectFieldModal, { stack, onImport: () => onImport(store.getDataFinal()) })
|
1972
1995
|
] })
|
1973
1996
|
] });
|
1974
1997
|
}
|
1975
1998
|
|
1976
1999
|
// src/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx
|
1977
|
-
import { Button as
|
2000
|
+
import { Button as Button13, Fieldset as Fieldset3, Modal as Modal11 } from "@mantine/core";
|
1978
2001
|
import { useDisclosure as useDisclosure10 } from "@mantine/hooks";
|
1979
|
-
import { Fragment as
|
2002
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
1980
2003
|
function AQSelectTableByOpenModal(_a) {
|
1981
2004
|
var _b = _a, {
|
1982
2005
|
setSelectedData,
|
@@ -2004,28 +2027,28 @@ function AQSelectTableByOpenModal(_a) {
|
|
2004
2027
|
"closeAfterSelect"
|
2005
2028
|
]);
|
2006
2029
|
const disclosure = useDisclosure10(false);
|
2007
|
-
return /* @__PURE__ */
|
2008
|
-
/* @__PURE__ */
|
2009
|
-
|
2030
|
+
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
2031
|
+
/* @__PURE__ */ jsx33(
|
2032
|
+
Button13,
|
2010
2033
|
__spreadProps(__spreadValues({
|
2011
2034
|
onClick: disclosure[1].open
|
2012
2035
|
}, rest), {
|
2013
2036
|
children: label ? label : `Ch\u1ECDn t\u1EEB danh s\xE1ch`
|
2014
2037
|
})
|
2015
2038
|
),
|
2016
|
-
/* @__PURE__ */
|
2017
|
-
|
2039
|
+
/* @__PURE__ */ jsx33(
|
2040
|
+
Modal11,
|
2018
2041
|
{
|
2019
2042
|
fullScreen,
|
2020
2043
|
size: modalSize,
|
2021
2044
|
title,
|
2022
2045
|
opened: disclosure == null ? void 0 : disclosure[0],
|
2023
2046
|
onClose: disclosure[1].close,
|
2024
|
-
children: /* @__PURE__ */
|
2047
|
+
children: /* @__PURE__ */ jsx33(MyFlexColumn, { children: /* @__PURE__ */ jsx33(Fieldset3, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: /* @__PURE__ */ jsx33(
|
2025
2048
|
MyDataTable,
|
2026
2049
|
__spreadValues({
|
2027
2050
|
renderTopToolbarCustomActions: ({ table }) => {
|
2028
|
-
return /* @__PURE__ */
|
2051
|
+
return /* @__PURE__ */ jsx33(Button13, { onClick: () => {
|
2029
2052
|
setSelectedData(table.getSelectedRowModel().rows.map((row) => row.original));
|
2030
2053
|
closeAfterSelect && disclosure[1].close();
|
2031
2054
|
}, children: "Ch\u1ECDn" });
|
@@ -2040,29 +2063,6 @@ function AQSelectTableByOpenModal(_a) {
|
|
2040
2063
|
] });
|
2041
2064
|
}
|
2042
2065
|
|
2043
|
-
// src/components/Buttons/ButtonModal/CoreButtonModal.tsx
|
2044
|
-
import { Button as Button13, Modal as Modal11 } from "@mantine/core";
|
2045
|
-
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
2046
|
-
function CoreButtonModal({
|
2047
|
-
disclosure,
|
2048
|
-
children,
|
2049
|
-
buttonProps,
|
2050
|
-
modalProps
|
2051
|
-
}) {
|
2052
|
-
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
2053
|
-
/* @__PURE__ */ jsx33(Button13, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
|
2054
|
-
/* @__PURE__ */ jsx33(
|
2055
|
-
Modal11,
|
2056
|
-
__spreadProps(__spreadValues({
|
2057
|
-
opened: disclosure == null ? void 0 : disclosure[0],
|
2058
|
-
onClose: disclosure[1].close
|
2059
|
-
}, modalProps), {
|
2060
|
-
children: /* @__PURE__ */ jsx33(MyFlexColumn, { children })
|
2061
|
-
})
|
2062
|
-
)
|
2063
|
-
] });
|
2064
|
-
}
|
2065
|
-
|
2066
2066
|
// src/components/Buttons/ButtonPrintPDF/MyButtonPrintPDF.tsx
|
2067
2067
|
import { useRef as useRef2 } from "react";
|
2068
2068
|
import { Button as Button14 } from "@mantine/core";
|
@@ -8315,13 +8315,14 @@ export {
|
|
8315
8315
|
MyActionIconViewPDF,
|
8316
8316
|
MySwitchTheme,
|
8317
8317
|
MyAppSpotlight,
|
8318
|
-
MyAnchorViewPDF,
|
8319
8318
|
CoreActionIcon,
|
8320
8319
|
CoreButton,
|
8320
|
+
CoreButtonCreateUpdate,
|
8321
|
+
CoreButtonModal,
|
8322
|
+
MyAnchorViewPDF,
|
8321
8323
|
MyButtonModal,
|
8322
8324
|
AQButtonCreateByImportFile,
|
8323
8325
|
AQButtonExportData,
|
8324
|
-
CoreButtonCreateUpdate,
|
8325
8326
|
MyButtonCreate,
|
8326
8327
|
MyButtonDeleteList,
|
8327
8328
|
MySelect,
|
@@ -8332,7 +8333,6 @@ export {
|
|
8332
8333
|
SelectFileModal,
|
8333
8334
|
MyButtonImport,
|
8334
8335
|
AQSelectTableByOpenModal,
|
8335
|
-
CoreButtonModal,
|
8336
8336
|
MyButtonPrintPDF,
|
8337
8337
|
MyHtmlWrapper,
|
8338
8338
|
MyButtonPrintTablePDF,
|
@@ -93,11 +93,6 @@ declare function MyAppSpotlight({ menu }: {
|
|
93
93
|
menu: I_BasicAppShell_LinkItem[];
|
94
94
|
}): react_jsx_runtime.JSX.Element;
|
95
95
|
|
96
|
-
declare function MyAnchorViewPDF({ label, pdfLink }: {
|
97
|
-
label: string;
|
98
|
-
pdfLink: string;
|
99
|
-
}): react_jsx_runtime.JSX.Element;
|
100
|
-
|
101
96
|
interface CoreActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
|
102
97
|
actionType?: type_action;
|
103
98
|
}
|
@@ -109,6 +104,35 @@ interface CoreButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElem
|
|
109
104
|
}
|
110
105
|
declare function CoreButton({ children, actionType, ...rest }: CoreButtonProps): react_jsx_runtime.JSX.Element;
|
111
106
|
|
107
|
+
interface CoreButtonCreateUpdateProps<IReq, IRes> {
|
108
|
+
modalProps?: ModalProps;
|
109
|
+
actionIconProps?: ActionIconProps;
|
110
|
+
buttonProps?: ButtonProps;
|
111
|
+
isCreate?: boolean;
|
112
|
+
onSubmit: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
|
113
|
+
onSuccess?: () => void;
|
114
|
+
onError?: () => void;
|
115
|
+
form: UseFormReturnType<IReq>;
|
116
|
+
closeModalWhenSubmit?: boolean;
|
117
|
+
resetFormWhenSubmit?: boolean;
|
118
|
+
disclosure?: ReturnType<typeof useDisclosure>;
|
119
|
+
children?: ReactNode;
|
120
|
+
}
|
121
|
+
declare function CoreButtonCreateUpdate<IReq, IRes>({ modalProps, actionIconProps, buttonProps, form, onSubmit, onSuccess, onError, closeModalWhenSubmit, resetFormWhenSubmit, children, disclosure: externalDisclosure, isCreate, }: CoreButtonCreateUpdateProps<IReq, IRes>): react_jsx_runtime.JSX.Element;
|
122
|
+
|
123
|
+
interface CoreButtonModalProps {
|
124
|
+
children?: ReactNode;
|
125
|
+
disclosure: ReturnType<typeof useDisclosure>;
|
126
|
+
buttonProps?: ButtonProps;
|
127
|
+
modalProps?: ModalProps;
|
128
|
+
}
|
129
|
+
declare function CoreButtonModal({ disclosure, children, buttonProps, modalProps, }: CoreButtonModalProps): react_jsx_runtime.JSX.Element;
|
130
|
+
|
131
|
+
declare function MyAnchorViewPDF({ label, pdfLink }: {
|
132
|
+
label: string;
|
133
|
+
pdfLink: string;
|
134
|
+
}): react_jsx_runtime.JSX.Element;
|
135
|
+
|
112
136
|
interface IMyButton extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
|
113
137
|
crudType?: type_action;
|
114
138
|
children?: ReactNode;
|
@@ -152,22 +176,6 @@ interface AQButtonExportDataProps {
|
|
152
176
|
}
|
153
177
|
declare function AQButtonExportData({ isAllData, objectName, data, exportConfig }: AQButtonExportDataProps): react_jsx_runtime.JSX.Element;
|
154
178
|
|
155
|
-
interface CoreButtonCreateUpdateProps<IReq, IRes> {
|
156
|
-
modalProps?: ModalProps;
|
157
|
-
actionIconProps?: ActionIconProps;
|
158
|
-
buttonProps?: ButtonProps;
|
159
|
-
isCreate?: boolean;
|
160
|
-
onSubmit: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
|
161
|
-
onSuccess?: () => void;
|
162
|
-
onError?: () => void;
|
163
|
-
form: UseFormReturnType<IReq>;
|
164
|
-
closeModalWhenSubmit?: boolean;
|
165
|
-
resetFormWhenSubmit?: boolean;
|
166
|
-
disclosure?: ReturnType<typeof useDisclosure>;
|
167
|
-
children?: ReactNode;
|
168
|
-
}
|
169
|
-
declare function CoreButtonCreateUpdate<IReq, IRes>({ modalProps, actionIconProps, buttonProps, form, onSubmit, onSuccess, onError, closeModalWhenSubmit, resetFormWhenSubmit, children, disclosure: externalDisclosure, isCreate, }: CoreButtonCreateUpdateProps<IReq, IRes>): react_jsx_runtime.JSX.Element;
|
170
|
-
|
171
179
|
interface IMyButtonCreate<IReq, IRes> extends Omit<ComponentProps<typeof MyButtonModal>, "disclosure" | "form" | "onSubmit"> {
|
172
180
|
onSubmit: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>> | void;
|
173
181
|
onSuccess?: () => void;
|
@@ -245,14 +253,6 @@ interface IAQSelectTableByOpenModal<TData extends MRT_RowData> extends Omit<MRT_
|
|
245
253
|
}
|
246
254
|
declare function AQSelectTableByOpenModal<TData extends MRT_RowData>({ setSelectedData, data, columns, API, modalSize, title, label, listLabel, objectName, fullScreen, closeAfterSelect, ...rest }: IAQSelectTableByOpenModal<TData>): react_jsx_runtime.JSX.Element;
|
247
255
|
|
248
|
-
interface CoreButtonModalProps {
|
249
|
-
children?: ReactNode;
|
250
|
-
disclosure: ReturnType<typeof useDisclosure>;
|
251
|
-
buttonProps?: ButtonProps;
|
252
|
-
modalProps?: ModalProps;
|
253
|
-
}
|
254
|
-
declare function CoreButtonModal({ disclosure, children, buttonProps, modalProps, }: CoreButtonModalProps): react_jsx_runtime.JSX.Element;
|
255
|
-
|
256
256
|
interface I$6 extends ButtonProps {
|
257
257
|
contentToPrint?: ReactNode;
|
258
258
|
children?: ReactNode;
|
@@ -72,9 +72,9 @@ import {
|
|
72
72
|
useS_BasicAppShell,
|
73
73
|
useS_ButtonImport,
|
74
74
|
utils_layout_getItemsWithoutLinks
|
75
|
-
} from "../chunk-
|
76
|
-
import "../chunk-NWBLJ3W3.mjs";
|
75
|
+
} from "../chunk-FIH6EYE2.mjs";
|
77
76
|
import "../chunk-K6S7R6LU.mjs";
|
77
|
+
import "../chunk-NWBLJ3W3.mjs";
|
78
78
|
import "../chunk-KKJ3OEEW.mjs";
|
79
79
|
import "../chunk-Y3YGC5IH.mjs";
|
80
80
|
import "../chunk-5U2JSHSJ.mjs";
|
@@ -24,17 +24,17 @@ import {
|
|
24
24
|
useS_BasicAppShell,
|
25
25
|
useS_authenticate,
|
26
26
|
utils_layout_getItemsWithoutLinks
|
27
|
-
} from "../chunk-
|
27
|
+
} from "../chunk-FIH6EYE2.mjs";
|
28
|
+
import {
|
29
|
+
enum_emailConfigModule
|
30
|
+
} from "../chunk-VH4ZAD6M.mjs";
|
31
|
+
import "../chunk-K6S7R6LU.mjs";
|
28
32
|
import {
|
29
33
|
const_object_documentTypes
|
30
34
|
} from "../chunk-GFEMKKFH.mjs";
|
31
35
|
import {
|
32
36
|
const_object_colors
|
33
37
|
} from "../chunk-NWBLJ3W3.mjs";
|
34
|
-
import {
|
35
|
-
enum_emailConfigModule
|
36
|
-
} from "../chunk-VH4ZAD6M.mjs";
|
37
|
-
import "../chunk-K6S7R6LU.mjs";
|
38
38
|
import {
|
39
39
|
baseAxios_default,
|
40
40
|
useQ_AQ_GetAQModule,
|