aq-fe-framework 0.1.574 → 0.1.575
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/{chunk-JK76ZIUG.mjs → chunk-L6LB6QBU.mjs} +381 -228
- package/dist/{chunk-BITKEWBN.mjs → chunk-QSWEG6GK.mjs} +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/core/index.d.mts +11 -1
- package/dist/core/index.mjs +6 -4
- package/dist/coreService/index.mjs +3 -3
- package/dist/hooks/index.mjs +1 -1
- package/dist/modules-features/index.mjs +105 -105
- package/package.json +1 -1
- package/dist/{chunk-MBFTZJMN.mjs → chunk-A77K2YFL.mjs} +3 -3
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
MyFieldset,
|
|
4
4
|
MyFlexColumn,
|
|
5
5
|
MyFlexRow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A77K2YFL.mjs";
|
|
7
7
|
import {
|
|
8
8
|
const_object_colors
|
|
9
9
|
} from "./chunk-OMJJAHOC.mjs";
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
enum_daysOfWeek
|
|
12
12
|
} from "./chunk-K6S7R6LU.mjs";
|
|
13
13
|
import {
|
|
14
|
+
baseAxios_default,
|
|
14
15
|
useMyReactMutation,
|
|
15
16
|
useMyReactQuery
|
|
16
17
|
} from "./chunk-I6PPEZBF.mjs";
|
|
@@ -470,9 +471,160 @@ function MyButtonPrintPDF({
|
|
|
470
471
|
] });
|
|
471
472
|
}
|
|
472
473
|
|
|
474
|
+
// src/core/button/MyButtonViewFile.tsx
|
|
475
|
+
import {
|
|
476
|
+
ActionIcon as ActionIcon3,
|
|
477
|
+
Button as Button5,
|
|
478
|
+
Group,
|
|
479
|
+
Image,
|
|
480
|
+
LoadingOverlay,
|
|
481
|
+
Modal as Modal3,
|
|
482
|
+
Paper,
|
|
483
|
+
Text,
|
|
484
|
+
Tooltip
|
|
485
|
+
} from "@mantine/core";
|
|
486
|
+
import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
|
|
487
|
+
import { IconLivePhoto, IconMaximize, IconMinimize } from "@tabler/icons-react";
|
|
488
|
+
import { useQuery } from "@tanstack/react-query";
|
|
489
|
+
import { useEffect, useState } from "react";
|
|
490
|
+
import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
491
|
+
function MyButtonViewFile({
|
|
492
|
+
id,
|
|
493
|
+
modalSize = "80%",
|
|
494
|
+
label = "Xem file",
|
|
495
|
+
src,
|
|
496
|
+
isActionIcon = false,
|
|
497
|
+
filePath
|
|
498
|
+
}) {
|
|
499
|
+
var _a;
|
|
500
|
+
const [opened, { open, close }] = useDisclosure2(false);
|
|
501
|
+
const [fullscreen, setFullscreen] = useState(false);
|
|
502
|
+
const [height, setHeight] = useState("80vh");
|
|
503
|
+
const [blobUrl, setBlobUrl] = useState(null);
|
|
504
|
+
const [isImage, setIsImage] = useState(false);
|
|
505
|
+
const [isProcessing, setIsProcessing] = useState(false);
|
|
506
|
+
const query = useQuery({
|
|
507
|
+
queryKey: ["MyButtonViewPDF", id, filePath],
|
|
508
|
+
queryFn: async () => {
|
|
509
|
+
if (filePath) {
|
|
510
|
+
const res2 = await baseAxios_default.get("/AQ/GetFile?filePath=" + filePath);
|
|
511
|
+
return res2.data.data;
|
|
512
|
+
}
|
|
513
|
+
const res = await baseAxios_default.get("/Document/Get?id=" + id);
|
|
514
|
+
return res.data.data;
|
|
515
|
+
},
|
|
516
|
+
enabled: opened
|
|
517
|
+
});
|
|
518
|
+
useEffect(() => {
|
|
519
|
+
var _a2, _b, _c, _d, _e;
|
|
520
|
+
if (!query.data) return;
|
|
521
|
+
setIsProcessing(true);
|
|
522
|
+
const base64String = filePath ? (_a2 = query.data) == null ? void 0 : _a2.fileBase64String : (_c = (_b = query.data) == null ? void 0 : _b.fileDetail) == null ? void 0 : _c.fileBase64String;
|
|
523
|
+
const fileExtension = (_e = (_d = query.data) == null ? void 0 : _d.fileExtension) == null ? void 0 : _e.toLowerCase();
|
|
524
|
+
if (!base64String || !fileExtension) {
|
|
525
|
+
setIsProcessing(false);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
setIsImage(/\.(jpg|jpeg|png|gif)$/i.test(fileExtension));
|
|
529
|
+
if (fileExtension === ".docx") {
|
|
530
|
+
const byteCharacters2 = atob(base64String);
|
|
531
|
+
const byteNumbers2 = new Array(byteCharacters2.length);
|
|
532
|
+
for (let i = 0; i < byteCharacters2.length; i++) {
|
|
533
|
+
byteNumbers2[i] = byteCharacters2.charCodeAt(i);
|
|
534
|
+
}
|
|
535
|
+
const byteArray2 = new Uint8Array(byteNumbers2);
|
|
536
|
+
const blob2 = new Blob([byteArray2], {
|
|
537
|
+
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
538
|
+
});
|
|
539
|
+
const link = document.createElement("a");
|
|
540
|
+
link.href = URL.createObjectURL(blob2);
|
|
541
|
+
link.download = "document.docx";
|
|
542
|
+
document.body.appendChild(link);
|
|
543
|
+
link.click();
|
|
544
|
+
link.remove();
|
|
545
|
+
setBlobUrl(null);
|
|
546
|
+
setIsProcessing(false);
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
const byteCharacters = atob(base64String);
|
|
550
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
551
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
552
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
553
|
+
}
|
|
554
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
555
|
+
const mimeType = /\.(jpg|jpeg)$/i.test(fileExtension) ? "image/jpeg" : /\.(png)$/i.test(fileExtension) ? "image/png" : /\.(gif)$/i.test(fileExtension) ? "image/gif" : fileExtension === ".pdf" ? "application/pdf" : `application/${fileExtension.replace(".", "")}`;
|
|
556
|
+
const blob = new Blob([byteArray], { type: mimeType });
|
|
557
|
+
const newBlobUrl = URL.createObjectURL(blob);
|
|
558
|
+
setBlobUrl(newBlobUrl);
|
|
559
|
+
setIsProcessing(false);
|
|
560
|
+
return () => {
|
|
561
|
+
URL.revokeObjectURL(newBlobUrl);
|
|
562
|
+
};
|
|
563
|
+
}, [query.data]);
|
|
564
|
+
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
565
|
+
/* @__PURE__ */ jsx9(Tooltip, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx9(ActionIcon3, { onClick: open, children: /* @__PURE__ */ jsx9(IconLivePhoto, {}) }) : /* @__PURE__ */ jsx9(Button5, { color: "cyan", onClick: open, leftSection: /* @__PURE__ */ jsx9(IconLivePhoto, {}), children: label }) }),
|
|
566
|
+
/* @__PURE__ */ jsx9(
|
|
567
|
+
Modal3,
|
|
568
|
+
{
|
|
569
|
+
fullScreen: fullscreen,
|
|
570
|
+
opened,
|
|
571
|
+
onClose: () => {
|
|
572
|
+
close();
|
|
573
|
+
setBlobUrl(null);
|
|
574
|
+
},
|
|
575
|
+
size: modalSize,
|
|
576
|
+
title: /* @__PURE__ */ jsxs5(Group, { children: [
|
|
577
|
+
/* @__PURE__ */ jsx9(Text, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
|
578
|
+
/* @__PURE__ */ jsx9(
|
|
579
|
+
ActionIcon3,
|
|
580
|
+
{
|
|
581
|
+
onClick: () => {
|
|
582
|
+
setFullscreen(!fullscreen);
|
|
583
|
+
setHeight(fullscreen ? "80vh" : "90vh");
|
|
584
|
+
},
|
|
585
|
+
children: fullscreen ? /* @__PURE__ */ jsx9(IconMinimize, {}) : /* @__PURE__ */ jsx9(IconMaximize, {})
|
|
586
|
+
}
|
|
587
|
+
)
|
|
588
|
+
] }),
|
|
589
|
+
children: /* @__PURE__ */ jsxs5(Paper, { h: height, p: "lg", pos: "relative", children: [
|
|
590
|
+
/* @__PURE__ */ jsx9(
|
|
591
|
+
LoadingOverlay,
|
|
592
|
+
{
|
|
593
|
+
visible: query.isLoading || isProcessing,
|
|
594
|
+
zIndex: 1e3,
|
|
595
|
+
overlayProps: { radius: "sm", blur: 2 }
|
|
596
|
+
}
|
|
597
|
+
),
|
|
598
|
+
blobUrl || src ? isImage ? /* @__PURE__ */ jsx9(
|
|
599
|
+
Image,
|
|
600
|
+
{
|
|
601
|
+
src: blobUrl != null ? blobUrl : src,
|
|
602
|
+
alt: "Xem t\xE0i li\u1EC7u",
|
|
603
|
+
style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" }
|
|
604
|
+
}
|
|
605
|
+
) : /* @__PURE__ */ jsx9(
|
|
606
|
+
"iframe",
|
|
607
|
+
{
|
|
608
|
+
src: blobUrl != null ? blobUrl : src,
|
|
609
|
+
width: "100%",
|
|
610
|
+
height: "100%",
|
|
611
|
+
allow: "fullscreen",
|
|
612
|
+
style: { border: "none" }
|
|
613
|
+
}
|
|
614
|
+
) : filePath && ((_a = query.data) == null ? void 0 : _a.fileExtension) === ".docx" ? /* @__PURE__ */ jsxs5(Text, { c: "red", children: [
|
|
615
|
+
"File ",
|
|
616
|
+
/* @__PURE__ */ jsx9("b", { children: ".docx" }),
|
|
617
|
+
" kh\xF4ng th\u1EC3 xem tr\u1EF1c ti\u1EBFp. T\xE0i li\u1EC7u \u0111\xE3 \u0111\u01B0\u1EE3c t\u1EA3i xu\u1ED1ng v\u1EC1 m\xE1y c\u1EE7a b\u1EA1n."
|
|
618
|
+
] }) : /* @__PURE__ */ jsx9(Text, { color: "dimmed", children: "Kh\xF4ng th\u1EC3 hi\u1EC3n th\u1ECB n\u1ED9i dung t\xE0i li\u1EC7u." })
|
|
619
|
+
] })
|
|
620
|
+
}
|
|
621
|
+
)
|
|
622
|
+
] });
|
|
623
|
+
}
|
|
624
|
+
|
|
473
625
|
// src/core/dataDisplay/MyDataTableSelectOne.tsx
|
|
474
|
-
import { useEffect, useMemo } from "react";
|
|
475
|
-
import { jsx as
|
|
626
|
+
import { useEffect as useEffect2, useMemo } from "react";
|
|
627
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
476
628
|
function MyDataTableSelectOne({
|
|
477
629
|
columns,
|
|
478
630
|
queryResult,
|
|
@@ -480,11 +632,11 @@ function MyDataTableSelectOne({
|
|
|
480
632
|
setIdSelection
|
|
481
633
|
}) {
|
|
482
634
|
const columnsState = useMemo(() => columns, []);
|
|
483
|
-
|
|
635
|
+
useEffect2(() => {
|
|
484
636
|
if (!queryResult.data) return;
|
|
485
637
|
setIdSelection(queryResult.data[0].id);
|
|
486
638
|
}, [queryResult.data]);
|
|
487
|
-
return /* @__PURE__ */
|
|
639
|
+
return /* @__PURE__ */ jsx10(
|
|
488
640
|
MyDataTable,
|
|
489
641
|
{
|
|
490
642
|
columns: columnsState,
|
|
@@ -509,31 +661,31 @@ function MyDataTableSelectOne({
|
|
|
509
661
|
}
|
|
510
662
|
|
|
511
663
|
// src/core/dataDisplay/MyFlexIconTitle.tsx
|
|
512
|
-
import { Flex as Flex2, Text } from "@mantine/core";
|
|
513
|
-
import { jsx as
|
|
664
|
+
import { Flex as Flex2, Text as Text2 } from "@mantine/core";
|
|
665
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
514
666
|
function MyFlexIconTitle(props) {
|
|
515
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ jsxs6(Flex2, __spreadProps(__spreadValues({ direction: "row", align: "center", gap: "xs" }, props), { children: [
|
|
516
668
|
props.icon,
|
|
517
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ jsx11(Text2, __spreadProps(__spreadValues({ size: "lg", fw: 700 }, props.textProps), { children: props == null ? void 0 : props.children }))
|
|
518
670
|
] }));
|
|
519
671
|
}
|
|
520
672
|
|
|
521
673
|
// src/core/dataDisplay/MyInfoBox.tsx
|
|
522
|
-
import { Group, Paper, Stack as Stack2, Text as
|
|
523
|
-
import { jsx as
|
|
674
|
+
import { Group as Group2, Paper as Paper2, Stack as Stack2, Text as Text3 } from "@mantine/core";
|
|
675
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
524
676
|
function MyInfoBox({ title, data, paperProps }) {
|
|
525
|
-
return /* @__PURE__ */
|
|
526
|
-
title && /* @__PURE__ */
|
|
527
|
-
data.map((item, index) => /* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
677
|
+
return /* @__PURE__ */ jsx12(Paper2, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs7(Stack2, { children: [
|
|
678
|
+
title && /* @__PURE__ */ jsx12(Text3, { fw: 600, size: "sm", children: title }),
|
|
679
|
+
data.map((item, index) => /* @__PURE__ */ jsxs7(Group2, { justify: "space-between", children: [
|
|
680
|
+
/* @__PURE__ */ jsx12(Text3, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
|
|
681
|
+
/* @__PURE__ */ jsx12(Text3, { size: "sm", fw: 500, children: item.value })
|
|
530
682
|
] }, index))
|
|
531
683
|
] }) }));
|
|
532
684
|
}
|
|
533
685
|
|
|
534
686
|
// src/core/dataDisplay/MyLabelValueRow.tsx
|
|
535
|
-
import { Group as
|
|
536
|
-
import { jsx as
|
|
687
|
+
import { Group as Group3, Text as Text4 } from "@mantine/core";
|
|
688
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
537
689
|
function MyLabelValueRow({
|
|
538
690
|
label,
|
|
539
691
|
value,
|
|
@@ -541,18 +693,18 @@ function MyLabelValueRow({
|
|
|
541
693
|
valueProps,
|
|
542
694
|
groupProps
|
|
543
695
|
}) {
|
|
544
|
-
return /* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ jsxs8(Group3, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
|
|
697
|
+
/* @__PURE__ */ jsxs8(Text4, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
|
|
546
698
|
label,
|
|
547
699
|
":"
|
|
548
700
|
] })),
|
|
549
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ jsx13(Text4, __spreadProps(__spreadValues({}, valueProps), { children: value }))
|
|
550
702
|
] }));
|
|
551
703
|
}
|
|
552
704
|
|
|
553
705
|
// src/core/dataDisplay/MyStatsCartd.tsx
|
|
554
706
|
import { Box, Card, ThemeIcon } from "@mantine/core";
|
|
555
|
-
import { jsx as
|
|
707
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
556
708
|
function MyStatsCard({
|
|
557
709
|
title,
|
|
558
710
|
value,
|
|
@@ -561,22 +713,22 @@ function MyStatsCard({
|
|
|
561
713
|
color,
|
|
562
714
|
themeIconProps
|
|
563
715
|
}) {
|
|
564
|
-
return /* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ jsxs9(Card, { children: [
|
|
717
|
+
/* @__PURE__ */ jsx14("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
|
|
718
|
+
/* @__PURE__ */ jsx14(Box, { className: "p-6", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between", children: [
|
|
719
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
720
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
|
|
721
|
+
/* @__PURE__ */ jsx14("p", { className: "text-3xl font-bold", children: value }),
|
|
722
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
|
|
571
723
|
] }),
|
|
572
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ jsx14(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
|
|
573
725
|
] }) })
|
|
574
726
|
] });
|
|
575
727
|
}
|
|
576
728
|
|
|
577
729
|
// src/core/input/MyDayOfWeekPicker.tsx
|
|
578
|
-
import { Badge, Group as
|
|
579
|
-
import { jsx as
|
|
730
|
+
import { Badge, Group as Group4 } from "@mantine/core";
|
|
731
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
580
732
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
|
581
733
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
582
734
|
const toggle = (val) => {
|
|
@@ -584,7 +736,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
|
584
736
|
const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
|
|
585
737
|
onChange(newValue);
|
|
586
738
|
};
|
|
587
|
-
return /* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ jsx15(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx15(Group4, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx15(
|
|
588
740
|
Badge,
|
|
589
741
|
{
|
|
590
742
|
variant: value.includes(d.value) ? "filled" : "outline",
|
|
@@ -604,15 +756,15 @@ import { Input, ScrollArea as ScrollArea2 } from "@mantine/core";
|
|
|
604
756
|
import { Link, RichTextEditor as MantineRichTextEditor, RichTextEditor } from "@mantine/tiptap";
|
|
605
757
|
import FileHandler from "@tiptap-pro/extension-file-handler";
|
|
606
758
|
import Highlight from "@tiptap/extension-highlight";
|
|
607
|
-
import
|
|
759
|
+
import Image2 from "@tiptap/extension-image";
|
|
608
760
|
import SubScript from "@tiptap/extension-subscript";
|
|
609
761
|
import Superscript from "@tiptap/extension-superscript";
|
|
610
762
|
import TextAlign from "@tiptap/extension-text-align";
|
|
611
763
|
import Underline from "@tiptap/extension-underline";
|
|
612
764
|
import { useEditor } from "@tiptap/react";
|
|
613
765
|
import StarterKit from "@tiptap/starter-kit";
|
|
614
|
-
import { useEffect as
|
|
615
|
-
import { jsx as
|
|
766
|
+
import { useEffect as useEffect3 } from "react";
|
|
767
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
616
768
|
function MyRichTextEditor(props) {
|
|
617
769
|
const editor = useEditor({
|
|
618
770
|
extensions: [
|
|
@@ -622,7 +774,7 @@ function MyRichTextEditor(props) {
|
|
|
622
774
|
Superscript,
|
|
623
775
|
SubScript,
|
|
624
776
|
Highlight,
|
|
625
|
-
|
|
777
|
+
Image2.extend({
|
|
626
778
|
addAttributes() {
|
|
627
779
|
return {
|
|
628
780
|
src: {
|
|
@@ -691,58 +843,58 @@ function MyRichTextEditor(props) {
|
|
|
691
843
|
(_a = props.onBlur) == null ? void 0 : _a.call(props, editor2.getHTML());
|
|
692
844
|
}
|
|
693
845
|
});
|
|
694
|
-
|
|
846
|
+
useEffect3(() => {
|
|
695
847
|
if (editor && props.value !== editor.getHTML()) {
|
|
696
848
|
editor.commands.setContent(props.value || "", false);
|
|
697
849
|
}
|
|
698
850
|
}, [props.value, editor]);
|
|
699
|
-
return /* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */
|
|
851
|
+
return /* @__PURE__ */ jsx16(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs10(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
|
|
852
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
|
|
853
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
|
854
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Bold, {}),
|
|
855
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Italic, {}),
|
|
856
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Underline, {}),
|
|
857
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Strikethrough, {}),
|
|
858
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.ClearFormatting, {}),
|
|
859
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Highlight, {}),
|
|
860
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Code, {})
|
|
709
861
|
] }),
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
|
863
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H1, {}),
|
|
864
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H2, {}),
|
|
865
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H3, {}),
|
|
866
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H4, {})
|
|
715
867
|
] }),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
|
869
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Blockquote, {}),
|
|
870
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Hr, {}),
|
|
871
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.BulletList, {}),
|
|
872
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.OrderedList, {}),
|
|
873
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Subscript, {}),
|
|
874
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Superscript, {})
|
|
723
875
|
] }),
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
|
877
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Link, {}),
|
|
878
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Unlink, {})
|
|
727
879
|
] }),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
|
881
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignLeft, {}),
|
|
882
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignCenter, {}),
|
|
883
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignJustify, {}),
|
|
884
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignRight, {})
|
|
733
885
|
] }),
|
|
734
886
|
props.extraControlsGroup
|
|
735
887
|
] })),
|
|
736
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ jsx16(
|
|
737
889
|
ScrollArea2.Autosize,
|
|
738
890
|
__spreadProps(__spreadValues({
|
|
739
891
|
onMouseDown: () => {
|
|
740
892
|
editor == null ? void 0 : editor.commands.focus();
|
|
741
893
|
},
|
|
742
|
-
mah: "
|
|
894
|
+
mah: "130",
|
|
743
895
|
style: { cursor: "text" }
|
|
744
896
|
}, props.scrollAreaAutosizeProps), {
|
|
745
|
-
children: /* @__PURE__ */
|
|
897
|
+
children: /* @__PURE__ */ jsx16(RichTextEditor.Content, __spreadValues({ mih: "130" }, props.richTextEditorContentProps))
|
|
746
898
|
})
|
|
747
899
|
)
|
|
748
900
|
] })) }));
|
|
@@ -751,7 +903,7 @@ function MyRichTextEditor(props) {
|
|
|
751
903
|
// src/core/input/MySelect.tsx
|
|
752
904
|
import { Loader, Select } from "@mantine/core";
|
|
753
905
|
import React from "react";
|
|
754
|
-
import { jsx as
|
|
906
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
755
907
|
function extractTextFromReactNode(node) {
|
|
756
908
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
757
909
|
if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
|
|
@@ -769,7 +921,7 @@ function MySelect(_a) {
|
|
|
769
921
|
const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
|
|
770
922
|
placeholder = `Ch\u1ECDn ${plainTextLabel}`;
|
|
771
923
|
}
|
|
772
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ jsx17(
|
|
773
925
|
Select,
|
|
774
926
|
__spreadValues({
|
|
775
927
|
searchable: true,
|
|
@@ -777,7 +929,7 @@ function MySelect(_a) {
|
|
|
777
929
|
placeholder,
|
|
778
930
|
data: data != null ? data : [],
|
|
779
931
|
error: isError ? true : void 0,
|
|
780
|
-
rightSection: isLoading ? /* @__PURE__ */
|
|
932
|
+
rightSection: isLoading ? /* @__PURE__ */ jsx17(Loader, { size: "xs" }) : void 0,
|
|
781
933
|
disabled: isLoading || isError,
|
|
782
934
|
styles: (theme) => ({
|
|
783
935
|
input: rest.readOnly ? {
|
|
@@ -792,8 +944,8 @@ function MySelect(_a) {
|
|
|
792
944
|
}
|
|
793
945
|
|
|
794
946
|
// src/core/input/MySelectFromAPI.tsx
|
|
795
|
-
import { useCallback, useEffect as
|
|
796
|
-
import { jsx as
|
|
947
|
+
import { useCallback, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
948
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
797
949
|
function MySelectFromAPI(_a) {
|
|
798
950
|
var _b = _a, {
|
|
799
951
|
queryKey,
|
|
@@ -846,7 +998,7 @@ function MySelectFromAPI(_a) {
|
|
|
846
998
|
setObjectData(selected);
|
|
847
999
|
}
|
|
848
1000
|
};
|
|
849
|
-
|
|
1001
|
+
useEffect4(() => {
|
|
850
1002
|
var _a2, _b2, _c;
|
|
851
1003
|
if (autoSelectFirstItem && !hasAutoSelected.current && ((_a2 = query.data) == null ? void 0 : _a2.length) && (value === void 0 || value === null || value === "")) {
|
|
852
1004
|
const firstItem = query.data[0];
|
|
@@ -857,7 +1009,7 @@ function MySelectFromAPI(_a) {
|
|
|
857
1009
|
hasAutoSelected.current = true;
|
|
858
1010
|
}
|
|
859
1011
|
}, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
|
|
860
|
-
return /* @__PURE__ */
|
|
1012
|
+
return /* @__PURE__ */ jsx18(
|
|
861
1013
|
MySelect,
|
|
862
1014
|
__spreadValues({
|
|
863
1015
|
isLoading: query.isLoading,
|
|
@@ -871,10 +1023,10 @@ function MySelectFromAPI(_a) {
|
|
|
871
1023
|
|
|
872
1024
|
// src/core/input/MyTextInput.tsx
|
|
873
1025
|
import { TextInput } from "@mantine/core";
|
|
874
|
-
import { jsx as
|
|
1026
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
875
1027
|
function MyTextInput(_a) {
|
|
876
1028
|
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
|
877
|
-
return /* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ jsx19(
|
|
878
1030
|
TextInput,
|
|
879
1031
|
__spreadValues({
|
|
880
1032
|
onKeyDown: (e) => {
|
|
@@ -913,23 +1065,23 @@ function MyTextInput(_a) {
|
|
|
913
1065
|
|
|
914
1066
|
// src/core/input/MyWeeklySessionSchedulerPicker.tsx
|
|
915
1067
|
import {
|
|
916
|
-
Button as
|
|
1068
|
+
Button as Button6,
|
|
917
1069
|
Center,
|
|
918
1070
|
Divider,
|
|
919
|
-
Group as
|
|
1071
|
+
Group as Group5,
|
|
920
1072
|
NumberInput,
|
|
921
|
-
Paper as
|
|
1073
|
+
Paper as Paper3,
|
|
922
1074
|
ScrollArea as ScrollArea3,
|
|
923
|
-
Text as
|
|
1075
|
+
Text as Text6
|
|
924
1076
|
} from "@mantine/core";
|
|
925
1077
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
|
926
|
-
import { useState } from "react";
|
|
927
|
-
import { jsx as
|
|
1078
|
+
import { useState as useState2 } from "react";
|
|
1079
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
928
1080
|
function MyWeeklySessionSchedulerPicker({
|
|
929
1081
|
value = [],
|
|
930
1082
|
onChange
|
|
931
1083
|
}) {
|
|
932
|
-
const [selectedDays, setSelectedDays] =
|
|
1084
|
+
const [selectedDays, setSelectedDays] = useState2([]);
|
|
933
1085
|
const handleAddSession = (dayOfWeek) => {
|
|
934
1086
|
const newSession = {
|
|
935
1087
|
dayOfWeek,
|
|
@@ -955,8 +1107,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
|
955
1107
|
return acc;
|
|
956
1108
|
}, {});
|
|
957
1109
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
|
958
|
-
return /* @__PURE__ */
|
|
959
|
-
/* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ jsx20(Paper3, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs11(MyFlexColumn, { children: [
|
|
1111
|
+
/* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(
|
|
960
1112
|
MyDayOfWeekPicker,
|
|
961
1113
|
{
|
|
962
1114
|
value: selectedDays,
|
|
@@ -966,41 +1118,41 @@ function MyWeeklySessionSchedulerPicker({
|
|
|
966
1118
|
}
|
|
967
1119
|
}
|
|
968
1120
|
) }),
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */
|
|
1121
|
+
/* @__PURE__ */ jsx20(Divider, { my: "xs" }),
|
|
1122
|
+
/* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx20(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
|
971
1123
|
var _a;
|
|
972
|
-
return /* @__PURE__ */
|
|
973
|
-
|
|
1124
|
+
return /* @__PURE__ */ jsxs11(
|
|
1125
|
+
Paper3,
|
|
974
1126
|
{
|
|
975
1127
|
w: "100%",
|
|
976
1128
|
p: "md",
|
|
977
1129
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
|
978
1130
|
children: [
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
|
|
1131
|
+
/* @__PURE__ */ jsxs11(Group5, { gap: "apart", children: [
|
|
1132
|
+
/* @__PURE__ */ jsx20(Text6, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
|
1133
|
+
/* @__PURE__ */ jsx20(
|
|
1134
|
+
Button6,
|
|
983
1135
|
{
|
|
984
1136
|
color: "teal.5",
|
|
985
|
-
leftSection: /* @__PURE__ */
|
|
1137
|
+
leftSection: /* @__PURE__ */ jsx20(IconPlus4, { size: 14 }),
|
|
986
1138
|
onClick: () => handleAddSession(dayOfWeek),
|
|
987
1139
|
children: "Th\xEAm bu\u1ED5i"
|
|
988
1140
|
}
|
|
989
1141
|
)
|
|
990
1142
|
] }),
|
|
991
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ jsx20(Divider, { my: "sm" }),
|
|
992
1144
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
|
993
1145
|
const globalIndex = value.findIndex(
|
|
994
1146
|
(v) => v === item
|
|
995
1147
|
);
|
|
996
|
-
return /* @__PURE__ */
|
|
997
|
-
|
|
1148
|
+
return /* @__PURE__ */ jsxs11(
|
|
1149
|
+
Group5,
|
|
998
1150
|
{
|
|
999
1151
|
mt: "xs",
|
|
1000
1152
|
gap: "xs",
|
|
1001
1153
|
align: "flex-end",
|
|
1002
1154
|
children: [
|
|
1003
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ jsx20(
|
|
1004
1156
|
NumberInput,
|
|
1005
1157
|
{
|
|
1006
1158
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
|
@@ -1012,7 +1164,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
|
1012
1164
|
)
|
|
1013
1165
|
}
|
|
1014
1166
|
),
|
|
1015
|
-
/* @__PURE__ */
|
|
1167
|
+
/* @__PURE__ */ jsx20(
|
|
1016
1168
|
NumberInput,
|
|
1017
1169
|
{
|
|
1018
1170
|
label: "S\u1ED1 ti\u1EBFt",
|
|
@@ -1024,7 +1176,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
|
1024
1176
|
)
|
|
1025
1177
|
}
|
|
1026
1178
|
),
|
|
1027
|
-
/* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ jsx20(
|
|
1028
1180
|
NumberInput,
|
|
1029
1181
|
{
|
|
1030
1182
|
label: "S\u1ED1 ph\xFAt ",
|
|
@@ -1033,13 +1185,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
|
1033
1185
|
value: item.durationMinutes
|
|
1034
1186
|
}
|
|
1035
1187
|
),
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
|
|
1188
|
+
/* @__PURE__ */ jsx20(
|
|
1189
|
+
Button6,
|
|
1038
1190
|
{
|
|
1039
1191
|
variant: "light",
|
|
1040
1192
|
color: "red",
|
|
1041
1193
|
onClick: () => handleRemove(globalIndex),
|
|
1042
|
-
leftSection: /* @__PURE__ */
|
|
1194
|
+
leftSection: /* @__PURE__ */ jsx20(IconTrash3, { size: 14 }),
|
|
1043
1195
|
children: "X\xF3a bu\u1ED5i"
|
|
1044
1196
|
}
|
|
1045
1197
|
)
|
|
@@ -1058,13 +1210,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
|
1058
1210
|
|
|
1059
1211
|
// src/core/layout/MyDroppablePlaceholder.tsx
|
|
1060
1212
|
import { useDroppable } from "@dnd-kit/core";
|
|
1061
|
-
import { Card as Card2, Text as
|
|
1062
|
-
import { jsx as
|
|
1213
|
+
import { Card as Card2, Text as Text7 } from "@mantine/core";
|
|
1214
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1063
1215
|
function DroppablePlaceholder({ id }) {
|
|
1064
1216
|
const { setNodeRef } = useDroppable({
|
|
1065
1217
|
id
|
|
1066
1218
|
});
|
|
1067
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ jsx21(
|
|
1068
1220
|
Card2,
|
|
1069
1221
|
{
|
|
1070
1222
|
ref: setNodeRef,
|
|
@@ -1072,21 +1224,21 @@ function DroppablePlaceholder({ id }) {
|
|
|
1072
1224
|
radius: "md",
|
|
1073
1225
|
p: "sm",
|
|
1074
1226
|
style: { opacity: 0.5, minHeight: 40 },
|
|
1075
|
-
children: /* @__PURE__ */
|
|
1227
|
+
children: /* @__PURE__ */ jsx21(Text7, { size: "sm", c: "dimmed", ta: "center", children: "K\xE9o item v\xE0o \u0111\xE2y" })
|
|
1076
1228
|
}
|
|
1077
1229
|
);
|
|
1078
1230
|
}
|
|
1079
1231
|
|
|
1080
1232
|
// src/core/layout/MyFlexEnd.tsx
|
|
1081
|
-
import { Group as
|
|
1082
|
-
import { jsx as
|
|
1233
|
+
import { Group as Group6 } from "@mantine/core";
|
|
1234
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1083
1235
|
function MyFlexEnd(_a) {
|
|
1084
1236
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
1085
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ jsx22(Group6, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
|
1086
1238
|
}
|
|
1087
1239
|
|
|
1088
1240
|
// src/core/overlays/MyPrintContent.tsx
|
|
1089
|
-
import { jsx as
|
|
1241
|
+
import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1090
1242
|
function MyPrintContent({
|
|
1091
1243
|
children,
|
|
1092
1244
|
autoPadding = true,
|
|
@@ -1104,9 +1256,9 @@ function MyPrintContent({
|
|
|
1104
1256
|
return ``;
|
|
1105
1257
|
}
|
|
1106
1258
|
};
|
|
1107
|
-
return /* @__PURE__ */
|
|
1108
|
-
/* @__PURE__ */
|
|
1109
|
-
/* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ jsxs12("div", { children: [
|
|
1260
|
+
/* @__PURE__ */ jsx23("style", { children: getPageSizeCSS() }),
|
|
1261
|
+
/* @__PURE__ */ jsx23("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx23(
|
|
1110
1262
|
"div",
|
|
1111
1263
|
{
|
|
1112
1264
|
ref: printRef,
|
|
@@ -1122,17 +1274,17 @@ function MyPrintContent({
|
|
|
1122
1274
|
|
|
1123
1275
|
// src/core/overlays/MyModalStackImport/Usecase/Usecase_FileFieldMappingModal.tsx
|
|
1124
1276
|
import {
|
|
1125
|
-
Button as
|
|
1126
|
-
Group as
|
|
1127
|
-
Modal as
|
|
1277
|
+
Button as Button7,
|
|
1278
|
+
Group as Group7,
|
|
1279
|
+
Modal as Modal4,
|
|
1128
1280
|
Select as Select2,
|
|
1129
1281
|
Stack as Stack3,
|
|
1130
1282
|
Table,
|
|
1131
1283
|
Title
|
|
1132
1284
|
} from "@mantine/core";
|
|
1133
1285
|
import { IconChevronLeft, IconChevronRight, IconPlus as IconPlus5, IconRowRemove } from "@tabler/icons-react";
|
|
1134
|
-
import { useMemo as useMemo3, useState as
|
|
1135
|
-
import { jsx as
|
|
1286
|
+
import { useMemo as useMemo3, useState as useState3 } from "react";
|
|
1287
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1136
1288
|
function Usecase_FileFieldMappingModal(_a) {
|
|
1137
1289
|
var _b = _a, {
|
|
1138
1290
|
jsonData,
|
|
@@ -1147,8 +1299,8 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1147
1299
|
"handleBack",
|
|
1148
1300
|
"onCloseAll"
|
|
1149
1301
|
]);
|
|
1150
|
-
const [selectedFields, setSelectedFields] =
|
|
1151
|
-
const [columnMapping, setColumnMapping] =
|
|
1302
|
+
const [selectedFields, setSelectedFields] = useState3([]);
|
|
1303
|
+
const [columnMapping, setColumnMapping] = useState3({});
|
|
1152
1304
|
const excelColumns = useMemo3(() => {
|
|
1153
1305
|
if (jsonData.length === 0) return [];
|
|
1154
1306
|
return Object.keys(jsonData[0]);
|
|
@@ -1191,25 +1343,25 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1191
1343
|
});
|
|
1192
1344
|
onContinute(mapped);
|
|
1193
1345
|
};
|
|
1194
|
-
return /* @__PURE__ */
|
|
1195
|
-
|
|
1346
|
+
return /* @__PURE__ */ jsxs13(
|
|
1347
|
+
Modal4,
|
|
1196
1348
|
__spreadProps(__spreadValues({
|
|
1197
1349
|
title: "Mapping d\u1EEF li\u1EC7u",
|
|
1198
1350
|
size: "80%"
|
|
1199
1351
|
}, rest), {
|
|
1200
1352
|
children: [
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
/* @__PURE__ */
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
1207
|
-
/* @__PURE__ */
|
|
1208
|
-
/* @__PURE__ */
|
|
1209
|
-
|
|
1353
|
+
/* @__PURE__ */ jsxs13(Group7, { align: "start", grow: true, children: [
|
|
1354
|
+
/* @__PURE__ */ jsxs13(Stack3, { w: "45%", children: [
|
|
1355
|
+
/* @__PURE__ */ jsx24(Title, { order: 5, children: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin" }),
|
|
1356
|
+
/* @__PURE__ */ jsxs13(Table, { striped: true, children: [
|
|
1357
|
+
/* @__PURE__ */ jsx24(Table.Thead, { children: /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
|
1358
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "M\xE3 field" }),
|
|
1359
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "T\xEAn field" }),
|
|
1360
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: /* @__PURE__ */ jsx24(
|
|
1361
|
+
Button7,
|
|
1210
1362
|
{
|
|
1211
1363
|
size: "xs",
|
|
1212
|
-
leftSection: /* @__PURE__ */
|
|
1364
|
+
leftSection: /* @__PURE__ */ jsx24(IconPlus5, {}),
|
|
1213
1365
|
onClick: () => {
|
|
1214
1366
|
const newlyAdded = unselectedFields;
|
|
1215
1367
|
setSelectedFields((prev) => [...prev, ...newlyAdded]);
|
|
@@ -1228,33 +1380,33 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1228
1380
|
}
|
|
1229
1381
|
) })
|
|
1230
1382
|
] }) }),
|
|
1231
|
-
/* @__PURE__ */
|
|
1232
|
-
/* @__PURE__ */
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
|
|
1383
|
+
/* @__PURE__ */ jsx24(Table.Tbody, { children: unselectedFields.map((field) => /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
|
1384
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: field.key }),
|
|
1385
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: field.label }),
|
|
1386
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: /* @__PURE__ */ jsx24(
|
|
1387
|
+
Button7,
|
|
1236
1388
|
{
|
|
1237
1389
|
variant: "light",
|
|
1238
1390
|
onClick: () => handleAddField(field),
|
|
1239
|
-
leftSection: /* @__PURE__ */
|
|
1391
|
+
leftSection: /* @__PURE__ */ jsx24(IconChevronRight, { size: 14 }),
|
|
1240
1392
|
children: "Th\xEAm"
|
|
1241
1393
|
}
|
|
1242
1394
|
) })
|
|
1243
1395
|
] }, field.key)) })
|
|
1244
1396
|
] })
|
|
1245
1397
|
] }),
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
/* @__PURE__ */
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */
|
|
1254
|
-
|
|
1398
|
+
/* @__PURE__ */ jsxs13(Stack3, { w: "55%", children: [
|
|
1399
|
+
/* @__PURE__ */ jsx24(Title, { order: 5, children: "Tr\u01B0\u1EDDng \u0111\xE3 ch\u1ECDn & c\u1ED9t map" }),
|
|
1400
|
+
/* @__PURE__ */ jsxs13(Table, { striped: true, children: [
|
|
1401
|
+
/* @__PURE__ */ jsx24(Table.Thead, { children: /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
|
1402
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "M\xE3 field" }),
|
|
1403
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "T\xEAn field" }),
|
|
1404
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: "C\u1ED9t map" }),
|
|
1405
|
+
/* @__PURE__ */ jsx24(Table.Th, { children: /* @__PURE__ */ jsx24(
|
|
1406
|
+
Button7,
|
|
1255
1407
|
{
|
|
1256
1408
|
size: "xs",
|
|
1257
|
-
leftSection: /* @__PURE__ */
|
|
1409
|
+
leftSection: /* @__PURE__ */ jsx24(IconRowRemove, {}),
|
|
1258
1410
|
color: "red",
|
|
1259
1411
|
onClick: () => {
|
|
1260
1412
|
setSelectedFields([]);
|
|
@@ -1264,10 +1416,10 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1264
1416
|
}
|
|
1265
1417
|
) })
|
|
1266
1418
|
] }) }),
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1269
|
-
/* @__PURE__ */
|
|
1270
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ jsx24(Table.Tbody, { children: selectedFields.map((field) => /* @__PURE__ */ jsxs13(Table.Tr, { children: [
|
|
1420
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: field.key }),
|
|
1421
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: field.label }),
|
|
1422
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: /* @__PURE__ */ jsx24(
|
|
1271
1423
|
Select2,
|
|
1272
1424
|
{
|
|
1273
1425
|
placeholder: "Ch\u1ECDn c\u1ED9t",
|
|
@@ -1279,12 +1431,12 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1279
1431
|
searchable: true
|
|
1280
1432
|
}
|
|
1281
1433
|
) }),
|
|
1282
|
-
/* @__PURE__ */
|
|
1283
|
-
|
|
1434
|
+
/* @__PURE__ */ jsx24(Table.Td, { children: /* @__PURE__ */ jsx24(
|
|
1435
|
+
Button7,
|
|
1284
1436
|
{
|
|
1285
1437
|
variant: "light",
|
|
1286
1438
|
onClick: () => handleRemoveField(field),
|
|
1287
|
-
leftSection: /* @__PURE__ */
|
|
1439
|
+
leftSection: /* @__PURE__ */ jsx24(IconChevronLeft, { size: 14 }),
|
|
1288
1440
|
children: "B\u1ECF"
|
|
1289
1441
|
}
|
|
1290
1442
|
) })
|
|
@@ -1292,10 +1444,10 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1292
1444
|
] })
|
|
1293
1445
|
] })
|
|
1294
1446
|
] }),
|
|
1295
|
-
/* @__PURE__ */
|
|
1296
|
-
/* @__PURE__ */
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
/* @__PURE__ */
|
|
1447
|
+
/* @__PURE__ */ jsxs13(Group7, { justify: "end", mt: "md", children: [
|
|
1448
|
+
/* @__PURE__ */ jsx24(Button7, { onClick: handleBack, children: "Quay l\u1EA1i" }),
|
|
1449
|
+
/* @__PURE__ */ jsx24(Button7, { onClick: handleContinute, children: "Ti\u1EBFp t\u1EE5c" }),
|
|
1450
|
+
/* @__PURE__ */ jsx24(Button7, { variant: "outline", onClick: onCloseAll, children: "\u0110\xF3ng" })
|
|
1299
1451
|
] })
|
|
1300
1452
|
]
|
|
1301
1453
|
})
|
|
@@ -1304,18 +1456,18 @@ function Usecase_FileFieldMappingModal(_a) {
|
|
|
1304
1456
|
|
|
1305
1457
|
// src/core/overlays/MyModalStackImport/Usecase/Usecase_FileImportConfigModal.tsx
|
|
1306
1458
|
import {
|
|
1307
|
-
Button as
|
|
1459
|
+
Button as Button8,
|
|
1308
1460
|
FileInput,
|
|
1309
1461
|
Grid,
|
|
1310
|
-
Group as
|
|
1311
|
-
Modal as
|
|
1462
|
+
Group as Group8,
|
|
1463
|
+
Modal as Modal5,
|
|
1312
1464
|
Select as Select3,
|
|
1313
1465
|
Stack as Stack4
|
|
1314
1466
|
} from "@mantine/core";
|
|
1315
1467
|
import { IconCopy } from "@tabler/icons-react";
|
|
1316
|
-
import { useEffect as
|
|
1468
|
+
import { useEffect as useEffect5, useMemo as useMemo4, useState as useState4 } from "react";
|
|
1317
1469
|
import * as XLSX from "xlsx";
|
|
1318
|
-
import { jsx as
|
|
1470
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1319
1471
|
function Usecase_FileImportConfigModal(_a) {
|
|
1320
1472
|
var _b = _a, {
|
|
1321
1473
|
onChange,
|
|
@@ -1326,11 +1478,11 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1326
1478
|
"onContinute",
|
|
1327
1479
|
"onExportStructure"
|
|
1328
1480
|
]);
|
|
1329
|
-
const [file, setFile] =
|
|
1330
|
-
const [rawData, setRawData] =
|
|
1331
|
-
const [parsedValueOnly, setParsedValueOnly] =
|
|
1332
|
-
const [titleIndex, setTitleIndex] =
|
|
1333
|
-
const [dataStartIndex, setDataStartIndex] =
|
|
1481
|
+
const [file, setFile] = useState4(null);
|
|
1482
|
+
const [rawData, setRawData] = useState4([]);
|
|
1483
|
+
const [parsedValueOnly, setParsedValueOnly] = useState4([]);
|
|
1484
|
+
const [titleIndex, setTitleIndex] = useState4("2");
|
|
1485
|
+
const [dataStartIndex, setDataStartIndex] = useState4("3");
|
|
1334
1486
|
const parseExcel = async (file2) => {
|
|
1335
1487
|
const data = await file2.arrayBuffer();
|
|
1336
1488
|
const workbook = XLSX.read(data);
|
|
@@ -1346,7 +1498,7 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1346
1498
|
setDataStartIndex("3");
|
|
1347
1499
|
if (file2) parseExcel(file2);
|
|
1348
1500
|
};
|
|
1349
|
-
|
|
1501
|
+
useEffect5(() => {
|
|
1350
1502
|
const headerRowIndex = titleIndex ? parseInt(titleIndex) - 1 : null;
|
|
1351
1503
|
const dataRowIndex = dataStartIndex ? parseInt(dataStartIndex) - 1 : null;
|
|
1352
1504
|
if (!rawData || headerRowIndex === null || dataRowIndex === null || dataRowIndex >= rawData.length || headerRowIndex >= rawData.length) {
|
|
@@ -1382,15 +1534,15 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1382
1534
|
return obj;
|
|
1383
1535
|
});
|
|
1384
1536
|
}, [rawData]);
|
|
1385
|
-
return /* @__PURE__ */
|
|
1386
|
-
|
|
1537
|
+
return /* @__PURE__ */ jsx25(
|
|
1538
|
+
Modal5,
|
|
1387
1539
|
__spreadProps(__spreadValues({
|
|
1388
1540
|
title: "Import",
|
|
1389
1541
|
size: "80%"
|
|
1390
1542
|
}, rest), {
|
|
1391
|
-
children: /* @__PURE__ */
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */
|
|
1543
|
+
children: /* @__PURE__ */ jsxs14(Stack4, { children: [
|
|
1544
|
+
/* @__PURE__ */ jsxs14(Grid, { children: [
|
|
1545
|
+
/* @__PURE__ */ jsx25(Grid.Col, { span: 8, children: /* @__PURE__ */ jsx25(
|
|
1394
1546
|
FileInput,
|
|
1395
1547
|
{
|
|
1396
1548
|
clearable: true,
|
|
@@ -1400,8 +1552,8 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1400
1552
|
onChange: handleSelectFile
|
|
1401
1553
|
}
|
|
1402
1554
|
) }),
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
/* @__PURE__ */
|
|
1555
|
+
/* @__PURE__ */ jsx25(Grid.Col, { span: 4, children: /* @__PURE__ */ jsx25(Group8, { align: "end", h: "100%", children: /* @__PURE__ */ jsx25(Button8, { leftSection: /* @__PURE__ */ jsx25(IconCopy, {}), w: "100%", children: "D\xE1n t\u1EEB b\u1ED9 nh\u1EDB" }) }) }),
|
|
1556
|
+
/* @__PURE__ */ jsx25(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx25(
|
|
1405
1557
|
Select3,
|
|
1406
1558
|
{
|
|
1407
1559
|
value: titleIndex,
|
|
@@ -1411,7 +1563,7 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1411
1563
|
disabled: !file
|
|
1412
1564
|
}
|
|
1413
1565
|
) }),
|
|
1414
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ jsx25(Grid.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx25(
|
|
1415
1567
|
Select3,
|
|
1416
1568
|
{
|
|
1417
1569
|
value: dataStartIndex,
|
|
@@ -1422,19 +1574,19 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1422
1574
|
}
|
|
1423
1575
|
) })
|
|
1424
1576
|
] }),
|
|
1425
|
-
/* @__PURE__ */
|
|
1426
|
-
/* @__PURE__ */
|
|
1427
|
-
/* @__PURE__ */
|
|
1428
|
-
|
|
1577
|
+
/* @__PURE__ */ jsx25(MyFieldset, { title: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin trong file d\u1EEF li\u1EC7u", children: /* @__PURE__ */ jsx25(MyDataTable, { columns, data: tableDisplayData }) }),
|
|
1578
|
+
/* @__PURE__ */ jsxs14(Group8, { justify: "end", children: [
|
|
1579
|
+
/* @__PURE__ */ jsx25(
|
|
1580
|
+
Button8,
|
|
1429
1581
|
{
|
|
1430
1582
|
onClick: onExportStructure,
|
|
1431
1583
|
children: "Xu\u1EA5t file c\u1EA5u tr\xFAc"
|
|
1432
1584
|
}
|
|
1433
1585
|
),
|
|
1434
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ jsx25(Button8, { onClick: () => {
|
|
1435
1587
|
onContinute == null ? void 0 : onContinute();
|
|
1436
1588
|
}, children: "Ti\u1EBFp t\u1EE5c" }),
|
|
1437
|
-
/* @__PURE__ */
|
|
1589
|
+
/* @__PURE__ */ jsx25(Button8, { variant: "outline", onClick: rest.onClose, children: "\u0110\xF3ng" })
|
|
1438
1590
|
] })
|
|
1439
1591
|
] })
|
|
1440
1592
|
})
|
|
@@ -1442,12 +1594,12 @@ function Usecase_FileImportConfigModal(_a) {
|
|
|
1442
1594
|
}
|
|
1443
1595
|
|
|
1444
1596
|
// src/core/overlays/MyModalStackImport/MyModalStackImport.tsx
|
|
1445
|
-
import { Modal as
|
|
1446
|
-
import { useState as
|
|
1597
|
+
import { Modal as Modal8 } from "@mantine/core";
|
|
1598
|
+
import { useState as useState5 } from "react";
|
|
1447
1599
|
|
|
1448
1600
|
// src/core/overlays/MyModalStackImport/Usecase/Usecase_FileImportValidationDetailModal.tsx
|
|
1449
|
-
import { Modal as
|
|
1450
|
-
import { jsx as
|
|
1601
|
+
import { Modal as Modal6, Table as Table2, Text as Text8 } from "@mantine/core";
|
|
1602
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1451
1603
|
function Usecase_FileImportValidationDetailModal(_a) {
|
|
1452
1604
|
var _b = _a, {
|
|
1453
1605
|
data
|
|
@@ -1455,19 +1607,19 @@ function Usecase_FileImportValidationDetailModal(_a) {
|
|
|
1455
1607
|
"data"
|
|
1456
1608
|
]);
|
|
1457
1609
|
if (!data || data.length === 0) {
|
|
1458
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ jsx26(Modal6, __spreadProps(__spreadValues({}, props), { title: "Chi ti\u1EBFt l\u1ED7i", children: /* @__PURE__ */ jsx26(Text8, { children: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u." }) }));
|
|
1459
1611
|
}
|
|
1460
1612
|
const columns = Object.keys(data[0].values || {});
|
|
1461
|
-
return /* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */
|
|
1463
|
-
columns.map((col) => /* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ jsx26(Modal6, __spreadProps(__spreadValues({}, props), { title: "Chi ti\u1EBFt l\u1ED7i", size: "70%", zIndex: 1e3, children: /* @__PURE__ */ jsxs15(Table2, { withTableBorder: true, striped: true, children: [
|
|
1614
|
+
/* @__PURE__ */ jsx26(Table2.Thead, { children: /* @__PURE__ */ jsxs15(Table2.Tr, { children: [
|
|
1615
|
+
columns.map((col) => /* @__PURE__ */ jsx26(Table2.Th, { children: col }, col)),
|
|
1616
|
+
/* @__PURE__ */ jsx26(Table2.Th, { children: "L\u1ED7i" })
|
|
1465
1617
|
] }) }),
|
|
1466
|
-
/* @__PURE__ */
|
|
1618
|
+
/* @__PURE__ */ jsx26(Table2.Tbody, { children: data.map((row, i) => {
|
|
1467
1619
|
var _a2;
|
|
1468
|
-
return /* @__PURE__ */
|
|
1469
|
-
columns.map((col) => /* @__PURE__ */
|
|
1470
|
-
/* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ jsxs15(Table2.Tr, { children: [
|
|
1621
|
+
columns.map((col) => /* @__PURE__ */ jsx26(Table2.Td, { children: row.values[col] }, col)),
|
|
1622
|
+
/* @__PURE__ */ jsx26(Table2.Td, { children: (_a2 = row.error) != null ? _a2 : "" })
|
|
1471
1623
|
] }, i);
|
|
1472
1624
|
}) })
|
|
1473
1625
|
] }) }));
|
|
@@ -1475,12 +1627,12 @@ function Usecase_FileImportValidationDetailModal(_a) {
|
|
|
1475
1627
|
|
|
1476
1628
|
// src/core/overlays/MyModalStackImport/Usecase/Usecase_FileImportValidationModal.tsx
|
|
1477
1629
|
import {
|
|
1478
|
-
Button as
|
|
1479
|
-
Group as
|
|
1480
|
-
Modal as
|
|
1630
|
+
Button as Button9,
|
|
1631
|
+
Group as Group9,
|
|
1632
|
+
Modal as Modal7,
|
|
1481
1633
|
Table as Table3
|
|
1482
1634
|
} from "@mantine/core";
|
|
1483
|
-
import { jsx as
|
|
1635
|
+
import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1484
1636
|
function Usecase_FileImportValidationModal(_a) {
|
|
1485
1637
|
var _b = _a, {
|
|
1486
1638
|
data,
|
|
@@ -1495,38 +1647,38 @@ function Usecase_FileImportValidationModal(_a) {
|
|
|
1495
1647
|
"onCloseAll",
|
|
1496
1648
|
"onOpenDetail"
|
|
1497
1649
|
]);
|
|
1498
|
-
return /* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1501
|
-
/* @__PURE__ */
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1650
|
+
return /* @__PURE__ */ jsxs16(Modal7, __spreadProps(__spreadValues({}, modalProps), { title: "K\u1EBFt qu\u1EA3 ki\u1EC3m tra", children: [
|
|
1651
|
+
/* @__PURE__ */ jsxs16(Table3, { withTableBorder: true, striped: true, children: [
|
|
1652
|
+
/* @__PURE__ */ jsx27(Table3.Thead, { children: /* @__PURE__ */ jsxs16(Table3.Tr, { children: [
|
|
1653
|
+
/* @__PURE__ */ jsx27(Table3.Th, { children: "K\u1EBFt qu\u1EA3" }),
|
|
1654
|
+
/* @__PURE__ */ jsx27(Table3.Th, { children: "S\u1ED1 l\u01B0\u1EE3ng" }),
|
|
1655
|
+
/* @__PURE__ */ jsx27(Table3.Th, {})
|
|
1504
1656
|
] }) }),
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ jsx27(Table3.Tbody, { children: data.map((item, i) => /* @__PURE__ */ jsxs16(Table3.Tr, { children: [
|
|
1658
|
+
/* @__PURE__ */ jsx27(Table3.Td, { children: item.result }),
|
|
1659
|
+
/* @__PURE__ */ jsx27(Table3.Td, { children: item.count }),
|
|
1660
|
+
/* @__PURE__ */ jsx27(Table3.Td, { children: item.rows && item.rows.length > 0 && /* @__PURE__ */ jsx27(Button9, { variant: "light", onClick: () => onOpenDetail(item.rows), children: "Xem chi ti\u1EBFt" }) })
|
|
1509
1661
|
] }, i)) })
|
|
1510
1662
|
] }),
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
/* @__PURE__ */
|
|
1663
|
+
/* @__PURE__ */ jsxs16(Group9, { justify: "space-between", mt: "md", children: [
|
|
1664
|
+
/* @__PURE__ */ jsx27(Button9, { variant: "default", onClick: onBack, children: "Quay l\u1EA1i" }),
|
|
1665
|
+
/* @__PURE__ */ jsx27(Button9, { onClick: onExecute, children: "Th\u1EF1c hi\u1EC7n import" })
|
|
1514
1666
|
] })
|
|
1515
1667
|
] }));
|
|
1516
1668
|
}
|
|
1517
1669
|
|
|
1518
1670
|
// src/core/overlays/MyModalStackImport/MyModalStackImport.tsx
|
|
1519
|
-
import { jsx as
|
|
1671
|
+
import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1520
1672
|
function MyModalImport({
|
|
1521
1673
|
fieldDefinition = [],
|
|
1522
1674
|
stack,
|
|
1523
1675
|
onExecute
|
|
1524
1676
|
}) {
|
|
1525
|
-
const value =
|
|
1526
|
-
const valueMapping =
|
|
1527
|
-
const [detailRows, setDetailRows] =
|
|
1528
|
-
return /* @__PURE__ */
|
|
1529
|
-
/* @__PURE__ */
|
|
1677
|
+
const value = useState5([]);
|
|
1678
|
+
const valueMapping = useState5([]);
|
|
1679
|
+
const [detailRows, setDetailRows] = useState5([]);
|
|
1680
|
+
return /* @__PURE__ */ jsxs17(Modal8.Stack, { children: [
|
|
1681
|
+
/* @__PURE__ */ jsx28(
|
|
1530
1682
|
Usecase_FileImportConfigModal,
|
|
1531
1683
|
__spreadValues({
|
|
1532
1684
|
value: value[0],
|
|
@@ -1540,7 +1692,7 @@ function MyModalImport({
|
|
|
1540
1692
|
}
|
|
1541
1693
|
}, stack.register("FileImportConfig"))
|
|
1542
1694
|
),
|
|
1543
|
-
/* @__PURE__ */
|
|
1695
|
+
/* @__PURE__ */ jsx28(
|
|
1544
1696
|
Usecase_FileFieldMappingModal,
|
|
1545
1697
|
__spreadValues({
|
|
1546
1698
|
jsonData: value[0],
|
|
@@ -1559,7 +1711,7 @@ function MyModalImport({
|
|
|
1559
1711
|
}
|
|
1560
1712
|
}, stack.register("FileFieldMapping"))
|
|
1561
1713
|
),
|
|
1562
|
-
/* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ jsx28(
|
|
1563
1715
|
Usecase_FileImportValidationModal,
|
|
1564
1716
|
__spreadValues({
|
|
1565
1717
|
data: value[0],
|
|
@@ -1577,7 +1729,7 @@ function MyModalImport({
|
|
|
1577
1729
|
}
|
|
1578
1730
|
}, stack.register("FileImportValidation"))
|
|
1579
1731
|
),
|
|
1580
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsx28(
|
|
1581
1733
|
Usecase_FileImportValidationDetailModal,
|
|
1582
1734
|
__spreadValues({
|
|
1583
1735
|
data: detailRows
|
|
@@ -1594,6 +1746,7 @@ export {
|
|
|
1594
1746
|
MyButtonModal,
|
|
1595
1747
|
MyButtonModalForm,
|
|
1596
1748
|
MyButtonPrintPDF,
|
|
1749
|
+
MyButtonViewFile,
|
|
1597
1750
|
MyDataTableSelectOne,
|
|
1598
1751
|
MyFlexIconTitle,
|
|
1599
1752
|
MyInfoBox,
|