aq-fe-framework 0.1.514 → 0.1.516
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-K6LP524K.mjs → chunk-6OZGJBBA.mjs} +132 -119
- package/dist/{chunk-NQMVDLMU.mjs → chunk-AKZQQ7BT.mjs} +1 -1
- package/dist/{chunk-LAVGCZ5I.mjs → chunk-OIIBQARW.mjs} +25 -15
- package/dist/{chunk-NIDKTA35.mjs → chunk-T7NNF74S.mjs} +7 -0
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/core/index.d.mts +8 -7
- package/dist/core/index.mjs +6 -6
- package/dist/hooks/index.d.mts +3 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/interfaces/index.d.mts +9 -2
- package/dist/modules-features/index.mjs +25 -25
- package/dist/{types-DI2fdq_c.d.mts → types-DbltiEAP.d.mts} +1 -1
- package/dist/utils/index.d.mts +9 -1
- package/dist/utils/index.mjs +3 -1
- package/package.json +1 -1
@@ -1,18 +1,18 @@
|
|
1
|
-
import {
|
2
|
-
enum_daysOfWeek
|
3
|
-
} from "./chunk-K6S7R6LU.mjs";
|
4
1
|
import {
|
5
2
|
MyDataTable,
|
6
3
|
MyFlexColumn,
|
7
4
|
MyFlexRow
|
8
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-AKZQQ7BT.mjs";
|
9
6
|
import {
|
10
7
|
const_object_colors
|
11
8
|
} from "./chunk-OMJJAHOC.mjs";
|
9
|
+
import {
|
10
|
+
enum_daysOfWeek
|
11
|
+
} from "./chunk-K6S7R6LU.mjs";
|
12
12
|
import {
|
13
13
|
useMyReactMutation,
|
14
14
|
useMyReactQuery
|
15
|
-
} from "./chunk-
|
15
|
+
} from "./chunk-OIIBQARW.mjs";
|
16
16
|
import {
|
17
17
|
utils_notification_show
|
18
18
|
} from "./chunk-7ZCOFATU.mjs";
|
@@ -78,7 +78,8 @@ var getActionConfig = (colorScheme) => ({
|
|
78
78
|
children: /* @__PURE__ */ jsx(IconX, {})
|
79
79
|
},
|
80
80
|
select: {},
|
81
|
-
check: {}
|
81
|
+
check: {},
|
82
|
+
find: {}
|
82
83
|
});
|
83
84
|
function MyActionIcon(_a) {
|
84
85
|
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
@@ -106,6 +107,7 @@ import {
|
|
106
107
|
IconEdit as IconEdit2,
|
107
108
|
IconPlus as IconPlus2,
|
108
109
|
IconPrinter as IconPrinter2,
|
110
|
+
IconSearch,
|
109
111
|
IconTrash as IconTrash2,
|
110
112
|
IconUpload,
|
111
113
|
IconX as IconX2
|
@@ -121,12 +123,7 @@ var getActionConfig2 = (colorScheme) => ({
|
|
121
123
|
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
122
124
|
children: "Th\xEAm"
|
123
125
|
},
|
124
|
-
createMultiple: {
|
125
|
-
color: "green",
|
126
|
-
type: "submit",
|
127
|
-
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
128
|
-
children: "Th\xEAm danh s\xE1ch"
|
129
|
-
},
|
126
|
+
createMultiple: {},
|
130
127
|
delete: {
|
131
128
|
color: "red",
|
132
129
|
leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
@@ -171,6 +168,11 @@ var getActionConfig2 = (colorScheme) => ({
|
|
171
168
|
},
|
172
169
|
check: {
|
173
170
|
children: "Ch\u1ECDn"
|
171
|
+
},
|
172
|
+
find: {
|
173
|
+
color: "green",
|
174
|
+
leftSection: /* @__PURE__ */ jsx2(IconSearch, {}),
|
175
|
+
children: "T\xECm"
|
174
176
|
}
|
175
177
|
});
|
176
178
|
function MyButton(_a) {
|
@@ -364,29 +366,43 @@ function MyButtonModal({
|
|
364
366
|
// src/core/button/MyButtonImport.tsx
|
365
367
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
366
368
|
|
367
|
-
// src/core/button/
|
369
|
+
// src/core/button/MyButtonModalForm.tsx
|
368
370
|
import { Stack } from "@mantine/core";
|
369
|
-
import {
|
370
|
-
|
371
|
-
function MyButtonModalCreateUpdate(_a) {
|
371
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
372
|
+
function MyButtonModalForm(_a) {
|
372
373
|
var _b = _a, {
|
374
|
+
isUpdate,
|
373
375
|
children,
|
374
|
-
|
376
|
+
form,
|
377
|
+
disclosure,
|
378
|
+
onSubmit,
|
379
|
+
isLoading
|
375
380
|
} = _b, rest = __objRest(_b, [
|
381
|
+
"isUpdate",
|
376
382
|
"children",
|
377
|
-
"
|
383
|
+
"form",
|
384
|
+
"disclosure",
|
385
|
+
"onSubmit",
|
386
|
+
"isLoading"
|
378
387
|
]);
|
379
|
-
const disc = useDisclosure3();
|
380
388
|
return /* @__PURE__ */ jsx8(
|
381
389
|
MyButtonModal,
|
382
|
-
__spreadProps(__spreadValues({
|
383
|
-
|
384
|
-
modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" },
|
385
|
-
buttonProps: { actionType: "create" },
|
390
|
+
__spreadProps(__spreadValues({}, rest), {
|
391
|
+
isActionIcon: isUpdate,
|
386
392
|
actionIconProps: { actionType: "update" },
|
387
|
-
|
388
|
-
|
389
|
-
|
393
|
+
buttonProps: { actionType: "create" },
|
394
|
+
modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" },
|
395
|
+
disclosure,
|
396
|
+
children: /* @__PURE__ */ jsx8("form", { onSubmit: form.onSubmit(onSubmit), children: /* @__PURE__ */ jsxs4(Stack, { children: [
|
397
|
+
children,
|
398
|
+
/* @__PURE__ */ jsx8(
|
399
|
+
MyButton,
|
400
|
+
{
|
401
|
+
actionType: "save",
|
402
|
+
loading: isLoading
|
403
|
+
}
|
404
|
+
)
|
405
|
+
] }) })
|
390
406
|
})
|
391
407
|
);
|
392
408
|
}
|
@@ -396,7 +412,7 @@ import { Button as Button5 } from "@mantine/core";
|
|
396
412
|
import { IconPrinter as IconPrinter3 } from "@tabler/icons-react";
|
397
413
|
import { useRef } from "react";
|
398
414
|
import { useReactToPrint } from "react-to-print";
|
399
|
-
import { Fragment as Fragment3, jsx as jsx9, jsxs as
|
415
|
+
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
400
416
|
function MyButtonPrintPDF({
|
401
417
|
children,
|
402
418
|
autoPadding = true,
|
@@ -421,7 +437,7 @@ function MyButtonPrintPDF({
|
|
421
437
|
return ``;
|
422
438
|
}
|
423
439
|
};
|
424
|
-
return /* @__PURE__ */
|
440
|
+
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
425
441
|
/* @__PURE__ */ jsx9("style", { children: getPageSizeCSS() }),
|
426
442
|
/* @__PURE__ */ jsx9("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx9(
|
427
443
|
"div",
|
@@ -447,13 +463,9 @@ function MyButtonPrintPDF({
|
|
447
463
|
] });
|
448
464
|
}
|
449
465
|
|
450
|
-
// src/core/button/MyButtonPrototypeSwitch.tsx
|
451
|
-
import { Switch } from "@mantine/core";
|
452
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
453
|
-
|
454
466
|
// src/core/dataDisplay/MyDataTableSelectOne.tsx
|
455
467
|
import { useEffect, useMemo as useMemo2 } from "react";
|
456
|
-
import { jsx as
|
468
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
457
469
|
function MyDataTableSelectOne({
|
458
470
|
columns,
|
459
471
|
queryResult,
|
@@ -465,7 +477,7 @@ function MyDataTableSelectOne({
|
|
465
477
|
if (!queryResult.data) return;
|
466
478
|
setIdSelection(queryResult.data[0].id);
|
467
479
|
}, [queryResult.data]);
|
468
|
-
return /* @__PURE__ */
|
480
|
+
return /* @__PURE__ */ jsx10(
|
469
481
|
MyDataTable,
|
470
482
|
{
|
471
483
|
columns: columnsState,
|
@@ -491,30 +503,30 @@ function MyDataTableSelectOne({
|
|
491
503
|
|
492
504
|
// src/core/dataDisplay/MyFlexIconTitle.tsx
|
493
505
|
import { Flex as Flex2, Text } from "@mantine/core";
|
494
|
-
import { jsx as
|
506
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
495
507
|
function MyFlexIconTitle(props) {
|
496
|
-
return /* @__PURE__ */
|
508
|
+
return /* @__PURE__ */ jsxs6(Flex2, __spreadProps(__spreadValues({ direction: "row", align: "center", gap: "xs" }, props), { children: [
|
497
509
|
props.icon,
|
498
|
-
/* @__PURE__ */
|
510
|
+
/* @__PURE__ */ jsx11(Text, __spreadProps(__spreadValues({ size: "lg", fw: 700 }, props.textProps), { children: props == null ? void 0 : props.children }))
|
499
511
|
] }));
|
500
512
|
}
|
501
513
|
|
502
514
|
// src/core/dataDisplay/MyInfoBox.tsx
|
503
515
|
import { Group, Paper, Stack as Stack2, Text as Text2 } from "@mantine/core";
|
504
|
-
import { jsx as
|
516
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
505
517
|
function MyInfoBox({ title, data, paperProps }) {
|
506
|
-
return /* @__PURE__ */
|
507
|
-
title && /* @__PURE__ */
|
508
|
-
data.map((item, index) => /* @__PURE__ */
|
509
|
-
/* @__PURE__ */
|
510
|
-
/* @__PURE__ */
|
518
|
+
return /* @__PURE__ */ jsx12(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs7(Stack2, { children: [
|
519
|
+
title && /* @__PURE__ */ jsx12(Text2, { fw: 600, size: "sm", children: title }),
|
520
|
+
data.map((item, index) => /* @__PURE__ */ jsxs7(Group, { justify: "space-between", children: [
|
521
|
+
/* @__PURE__ */ jsx12(Text2, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
|
522
|
+
/* @__PURE__ */ jsx12(Text2, { size: "sm", fw: 500, children: item.value })
|
511
523
|
] }, index))
|
512
524
|
] }) }));
|
513
525
|
}
|
514
526
|
|
515
527
|
// src/core/dataDisplay/MyLabelValueRow.tsx
|
516
528
|
import { Group as Group2, Text as Text3 } from "@mantine/core";
|
517
|
-
import { jsx as
|
529
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
518
530
|
function MyLabelValueRow({
|
519
531
|
label,
|
520
532
|
value,
|
@@ -522,18 +534,18 @@ function MyLabelValueRow({
|
|
522
534
|
valueProps,
|
523
535
|
groupProps
|
524
536
|
}) {
|
525
|
-
return /* @__PURE__ */
|
526
|
-
/* @__PURE__ */
|
537
|
+
return /* @__PURE__ */ jsxs8(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
|
538
|
+
/* @__PURE__ */ jsxs8(Text3, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
|
527
539
|
label,
|
528
540
|
":"
|
529
541
|
] })),
|
530
|
-
/* @__PURE__ */
|
542
|
+
/* @__PURE__ */ jsx13(Text3, __spreadProps(__spreadValues({}, valueProps), { children: value }))
|
531
543
|
] }));
|
532
544
|
}
|
533
545
|
|
534
546
|
// src/core/dataDisplay/MyStatsCartd.tsx
|
535
547
|
import { Box, Card, ThemeIcon } from "@mantine/core";
|
536
|
-
import { jsx as
|
548
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
537
549
|
function MyStatsCard({
|
538
550
|
title,
|
539
551
|
value,
|
@@ -542,22 +554,22 @@ function MyStatsCard({
|
|
542
554
|
color,
|
543
555
|
themeIconProps
|
544
556
|
}) {
|
545
|
-
return /* @__PURE__ */
|
546
|
-
/* @__PURE__ */
|
547
|
-
/* @__PURE__ */
|
548
|
-
/* @__PURE__ */
|
549
|
-
/* @__PURE__ */
|
550
|
-
/* @__PURE__ */
|
551
|
-
/* @__PURE__ */
|
557
|
+
return /* @__PURE__ */ jsxs9(Card, { children: [
|
558
|
+
/* @__PURE__ */ jsx14("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
|
559
|
+
/* @__PURE__ */ jsx14(Box, { className: "p-6", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between", children: [
|
560
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
561
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
|
562
|
+
/* @__PURE__ */ jsx14("p", { className: "text-3xl font-bold", children: value }),
|
563
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
|
552
564
|
] }),
|
553
|
-
/* @__PURE__ */
|
565
|
+
/* @__PURE__ */ jsx14(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
|
554
566
|
] }) })
|
555
567
|
] });
|
556
568
|
}
|
557
569
|
|
558
570
|
// src/core/input/MyDayOfWeekPicker.tsx
|
559
571
|
import { Badge, Group as Group3 } from "@mantine/core";
|
560
|
-
import { jsx as
|
572
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
561
573
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
562
574
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
563
575
|
const toggle = (val) => {
|
@@ -565,7 +577,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
565
577
|
const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
|
566
578
|
onChange(newValue);
|
567
579
|
};
|
568
|
-
return /* @__PURE__ */
|
580
|
+
return /* @__PURE__ */ jsx15(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx15(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx15(
|
569
581
|
Badge,
|
570
582
|
{
|
571
583
|
variant: value.includes(d.value) ? "filled" : "outline",
|
@@ -593,7 +605,7 @@ import Underline from "@tiptap/extension-underline";
|
|
593
605
|
import { useEditor } from "@tiptap/react";
|
594
606
|
import StarterKit from "@tiptap/starter-kit";
|
595
607
|
import { useEffect as useEffect2 } from "react";
|
596
|
-
import { jsx as
|
608
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
597
609
|
function MyRichTextEditor(props) {
|
598
610
|
const editor = useEditor({
|
599
611
|
extensions: [
|
@@ -677,44 +689,44 @@ function MyRichTextEditor(props) {
|
|
677
689
|
editor.commands.setContent(props.value || "", false);
|
678
690
|
}
|
679
691
|
}, [props.value, editor]);
|
680
|
-
return /* @__PURE__ */
|
681
|
-
/* @__PURE__ */
|
682
|
-
/* @__PURE__ */
|
683
|
-
/* @__PURE__ */
|
684
|
-
/* @__PURE__ */
|
685
|
-
/* @__PURE__ */
|
686
|
-
/* @__PURE__ */
|
687
|
-
/* @__PURE__ */
|
688
|
-
/* @__PURE__ */
|
689
|
-
/* @__PURE__ */
|
692
|
+
return /* @__PURE__ */ jsx16(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs10(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
|
693
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
|
694
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
695
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Bold, {}),
|
696
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Italic, {}),
|
697
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Underline, {}),
|
698
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Strikethrough, {}),
|
699
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.ClearFormatting, {}),
|
700
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Highlight, {}),
|
701
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Code, {})
|
690
702
|
] }),
|
691
|
-
/* @__PURE__ */
|
692
|
-
/* @__PURE__ */
|
693
|
-
/* @__PURE__ */
|
694
|
-
/* @__PURE__ */
|
695
|
-
/* @__PURE__ */
|
703
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
704
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H1, {}),
|
705
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H2, {}),
|
706
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H3, {}),
|
707
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H4, {})
|
696
708
|
] }),
|
697
|
-
/* @__PURE__ */
|
698
|
-
/* @__PURE__ */
|
699
|
-
/* @__PURE__ */
|
700
|
-
/* @__PURE__ */
|
701
|
-
/* @__PURE__ */
|
702
|
-
/* @__PURE__ */
|
703
|
-
/* @__PURE__ */
|
709
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
710
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Blockquote, {}),
|
711
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Hr, {}),
|
712
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.BulletList, {}),
|
713
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.OrderedList, {}),
|
714
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Subscript, {}),
|
715
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Superscript, {})
|
704
716
|
] }),
|
705
|
-
/* @__PURE__ */
|
706
|
-
/* @__PURE__ */
|
707
|
-
/* @__PURE__ */
|
717
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
718
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Link, {}),
|
719
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Unlink, {})
|
708
720
|
] }),
|
709
|
-
/* @__PURE__ */
|
710
|
-
/* @__PURE__ */
|
711
|
-
/* @__PURE__ */
|
712
|
-
/* @__PURE__ */
|
713
|
-
/* @__PURE__ */
|
721
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
722
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignLeft, {}),
|
723
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignCenter, {}),
|
724
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignJustify, {}),
|
725
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignRight, {})
|
714
726
|
] }),
|
715
727
|
props.extraControlsGroup
|
716
728
|
] })),
|
717
|
-
/* @__PURE__ */
|
729
|
+
/* @__PURE__ */ jsx16(
|
718
730
|
ScrollArea2.Autosize,
|
719
731
|
__spreadProps(__spreadValues({
|
720
732
|
onMouseDown: () => {
|
@@ -723,7 +735,7 @@ function MyRichTextEditor(props) {
|
|
723
735
|
mah: "200",
|
724
736
|
style: { cursor: "text" }
|
725
737
|
}, props.scrollAreaAutosizeProps), {
|
726
|
-
children: /* @__PURE__ */
|
738
|
+
children: /* @__PURE__ */ jsx16(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
|
727
739
|
})
|
728
740
|
)
|
729
741
|
] })) }));
|
@@ -732,7 +744,7 @@ function MyRichTextEditor(props) {
|
|
732
744
|
// src/core/input/MySelect.tsx
|
733
745
|
import { Loader, Select } from "@mantine/core";
|
734
746
|
import React from "react";
|
735
|
-
import { jsx as
|
747
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
736
748
|
function extractTextFromReactNode(node) {
|
737
749
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
738
750
|
if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
|
@@ -750,7 +762,7 @@ function MySelect(_a) {
|
|
750
762
|
const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
|
751
763
|
placeholder = `Ch\u1ECDn ${plainTextLabel}`;
|
752
764
|
}
|
753
|
-
return /* @__PURE__ */
|
765
|
+
return /* @__PURE__ */ jsx17(
|
754
766
|
Select,
|
755
767
|
__spreadValues({
|
756
768
|
searchable: true,
|
@@ -758,7 +770,7 @@ function MySelect(_a) {
|
|
758
770
|
placeholder,
|
759
771
|
data: data != null ? data : [],
|
760
772
|
error: isError ? true : void 0,
|
761
|
-
rightSection: isLoading ? /* @__PURE__ */
|
773
|
+
rightSection: isLoading ? /* @__PURE__ */ jsx17(Loader, { size: "xs" }) : void 0,
|
762
774
|
disabled: isLoading || isError,
|
763
775
|
styles: (theme) => ({
|
764
776
|
input: rest.readOnly ? {
|
@@ -774,7 +786,7 @@ function MySelect(_a) {
|
|
774
786
|
|
775
787
|
// src/core/input/MySelectFromAPI.tsx
|
776
788
|
import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef as useRef2 } from "react";
|
777
|
-
import { jsx as
|
789
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
778
790
|
function MySelectFromAPI(_a) {
|
779
791
|
var _b = _a, {
|
780
792
|
queryKey,
|
@@ -838,7 +850,7 @@ function MySelectFromAPI(_a) {
|
|
838
850
|
hasAutoSelected.current = true;
|
839
851
|
}
|
840
852
|
}, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
|
841
|
-
return /* @__PURE__ */
|
853
|
+
return /* @__PURE__ */ jsx18(
|
842
854
|
MySelect,
|
843
855
|
__spreadValues({
|
844
856
|
isLoading: query.isLoading,
|
@@ -852,10 +864,10 @@ function MySelectFromAPI(_a) {
|
|
852
864
|
|
853
865
|
// src/core/input/MyTextInput.tsx
|
854
866
|
import { TextInput } from "@mantine/core";
|
855
|
-
import { jsx as
|
867
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
856
868
|
function MyTextInput(_a) {
|
857
869
|
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
858
|
-
return /* @__PURE__ */
|
870
|
+
return /* @__PURE__ */ jsx19(
|
859
871
|
TextInput,
|
860
872
|
__spreadValues({
|
861
873
|
onKeyDown: (e) => {
|
@@ -871,8 +883,9 @@ function MyTextInput(_a) {
|
|
871
883
|
"(",
|
872
884
|
")",
|
873
885
|
" "
|
874
|
-
//
|
886
|
+
// ký tự đặc biệt
|
875
887
|
];
|
888
|
+
if (e.ctrlKey || e.metaKey) return;
|
876
889
|
if (!/[0-9]/.test(e.key) && !allowedKeys.includes(e.key)) {
|
877
890
|
e.preventDefault();
|
878
891
|
}
|
@@ -904,7 +917,7 @@ import {
|
|
904
917
|
} from "@mantine/core";
|
905
918
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
906
919
|
import { useState } from "react";
|
907
|
-
import { jsx as
|
920
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
908
921
|
function MyWeeklySessionSchedulerPicker({
|
909
922
|
value = [],
|
910
923
|
onChange
|
@@ -935,8 +948,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
935
948
|
return acc;
|
936
949
|
}, {});
|
937
950
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
938
|
-
return /* @__PURE__ */
|
939
|
-
/* @__PURE__ */
|
951
|
+
return /* @__PURE__ */ jsx20(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs11(MyFlexColumn, { children: [
|
952
|
+
/* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(
|
940
953
|
MyDayOfWeekPicker,
|
941
954
|
{
|
942
955
|
value: selectedDays,
|
@@ -946,41 +959,41 @@ function MyWeeklySessionSchedulerPicker({
|
|
946
959
|
}
|
947
960
|
}
|
948
961
|
) }),
|
949
|
-
/* @__PURE__ */
|
950
|
-
/* @__PURE__ */
|
962
|
+
/* @__PURE__ */ jsx20(Divider, { my: "xs" }),
|
963
|
+
/* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx20(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
951
964
|
var _a;
|
952
|
-
return /* @__PURE__ */
|
965
|
+
return /* @__PURE__ */ jsxs11(
|
953
966
|
Paper2,
|
954
967
|
{
|
955
968
|
w: "100%",
|
956
969
|
p: "md",
|
957
970
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
958
971
|
children: [
|
959
|
-
/* @__PURE__ */
|
960
|
-
/* @__PURE__ */
|
961
|
-
/* @__PURE__ */
|
972
|
+
/* @__PURE__ */ jsxs11(Group4, { gap: "apart", children: [
|
973
|
+
/* @__PURE__ */ jsx20(Text5, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
974
|
+
/* @__PURE__ */ jsx20(
|
962
975
|
Button6,
|
963
976
|
{
|
964
977
|
color: "teal.5",
|
965
|
-
leftSection: /* @__PURE__ */
|
978
|
+
leftSection: /* @__PURE__ */ jsx20(IconPlus4, { size: 14 }),
|
966
979
|
onClick: () => handleAddSession(dayOfWeek),
|
967
980
|
children: "Th\xEAm bu\u1ED5i"
|
968
981
|
}
|
969
982
|
)
|
970
983
|
] }),
|
971
|
-
/* @__PURE__ */
|
984
|
+
/* @__PURE__ */ jsx20(Divider, { my: "sm" }),
|
972
985
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
973
986
|
const globalIndex = value.findIndex(
|
974
987
|
(v) => v === item
|
975
988
|
);
|
976
|
-
return /* @__PURE__ */
|
989
|
+
return /* @__PURE__ */ jsxs11(
|
977
990
|
Group4,
|
978
991
|
{
|
979
992
|
mt: "xs",
|
980
993
|
gap: "xs",
|
981
994
|
align: "flex-end",
|
982
995
|
children: [
|
983
|
-
/* @__PURE__ */
|
996
|
+
/* @__PURE__ */ jsx20(
|
984
997
|
NumberInput,
|
985
998
|
{
|
986
999
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -992,7 +1005,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
992
1005
|
)
|
993
1006
|
}
|
994
1007
|
),
|
995
|
-
/* @__PURE__ */
|
1008
|
+
/* @__PURE__ */ jsx20(
|
996
1009
|
NumberInput,
|
997
1010
|
{
|
998
1011
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -1004,7 +1017,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
1004
1017
|
)
|
1005
1018
|
}
|
1006
1019
|
),
|
1007
|
-
/* @__PURE__ */
|
1020
|
+
/* @__PURE__ */ jsx20(
|
1008
1021
|
NumberInput,
|
1009
1022
|
{
|
1010
1023
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -1013,13 +1026,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
1013
1026
|
value: item.durationMinutes
|
1014
1027
|
}
|
1015
1028
|
),
|
1016
|
-
/* @__PURE__ */
|
1029
|
+
/* @__PURE__ */ jsx20(
|
1017
1030
|
Button6,
|
1018
1031
|
{
|
1019
1032
|
variant: "light",
|
1020
1033
|
color: "red",
|
1021
1034
|
onClick: () => handleRemove(globalIndex),
|
1022
|
-
leftSection: /* @__PURE__ */
|
1035
|
+
leftSection: /* @__PURE__ */ jsx20(IconTrash3, { size: 14 }),
|
1023
1036
|
children: "X\xF3a bu\u1ED5i"
|
1024
1037
|
}
|
1025
1038
|
)
|
@@ -1038,10 +1051,10 @@ function MyWeeklySessionSchedulerPicker({
|
|
1038
1051
|
|
1039
1052
|
// src/core/layout/MyFlexEnd.tsx
|
1040
1053
|
import { Group as Group5 } from "@mantine/core";
|
1041
|
-
import { jsx as
|
1054
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
1042
1055
|
function MyFlexEnd2(_a) {
|
1043
1056
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1044
|
-
return /* @__PURE__ */
|
1057
|
+
return /* @__PURE__ */ jsx21(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1045
1058
|
}
|
1046
1059
|
|
1047
1060
|
export {
|
@@ -1050,7 +1063,7 @@ export {
|
|
1050
1063
|
MyFlexColumn2 as MyFlexColumn,
|
1051
1064
|
MyButtonCreateUpdate,
|
1052
1065
|
MyButtonModal,
|
1053
|
-
|
1066
|
+
MyButtonModalForm,
|
1054
1067
|
MyButtonPrintPDF,
|
1055
1068
|
MyDataTableSelectOne,
|
1056
1069
|
MyFlexIconTitle,
|
@@ -161,7 +161,9 @@ import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-
|
|
161
161
|
function useMyReactMutation({
|
162
162
|
axiosFn,
|
163
163
|
options,
|
164
|
-
mutationType = "create"
|
164
|
+
mutationType = "create",
|
165
|
+
enableDefaultSuccess = true,
|
166
|
+
enableDefaultError = true
|
165
167
|
}) {
|
166
168
|
const queryClient = useQueryClient2();
|
167
169
|
return useMutation(__spreadValues({
|
@@ -170,25 +172,33 @@ function useMyReactMutation({
|
|
170
172
|
if (res.data.isSuccess == 0) throw new Error(res.data.message);
|
171
173
|
return res.data.data;
|
172
174
|
},
|
173
|
-
onSuccess: () => {
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
175
|
+
onSuccess: (data, variables, context) => {
|
176
|
+
var _a;
|
177
|
+
if (enableDefaultSuccess) {
|
178
|
+
notifications.show({
|
179
|
+
message: typeLabel_mutation[mutationType],
|
180
|
+
color: "green"
|
181
|
+
});
|
182
|
+
queryClient.invalidateQueries();
|
183
|
+
}
|
184
|
+
(_a = options == null ? void 0 : options.onSuccess) == null ? void 0 : _a.call(options, data, variables, context);
|
179
185
|
},
|
180
|
-
onError: (
|
181
|
-
|
186
|
+
onError: (error, variables, context) => {
|
187
|
+
var _a;
|
188
|
+
if (enableDefaultError) {
|
189
|
+
if (error.message === null || error.message === "null") {
|
190
|
+
notifications.show({
|
191
|
+
message: "Kh\xF4ng th\u1EC3 thao t\xE1c, l\u1ED7i ch\u01B0a x\xE1c \u0111\u1ECBnh!",
|
192
|
+
color: "red"
|
193
|
+
});
|
194
|
+
return;
|
195
|
+
}
|
182
196
|
notifications.show({
|
183
|
-
message:
|
197
|
+
message: error.message,
|
184
198
|
color: "red"
|
185
199
|
});
|
186
|
-
return;
|
187
200
|
}
|
188
|
-
|
189
|
-
message: e.message,
|
190
|
-
color: "red"
|
191
|
-
});
|
201
|
+
(_a = options == null ? void 0 : options.onError) == null ? void 0 : _a.call(options, error, variables, context);
|
192
202
|
}
|
193
203
|
}, options));
|
194
204
|
}
|
@@ -149,6 +149,12 @@ async function utils_excel_download({
|
|
149
149
|
saveAs(blob, name);
|
150
150
|
}
|
151
151
|
|
152
|
+
// src/utils/utils_field.ts
|
153
|
+
function utils_field_extractAQBaseField(values) {
|
154
|
+
const { id, name, code, concurrencyStamp } = values || {};
|
155
|
+
return { id, name, code, concurrencyStamp };
|
156
|
+
}
|
157
|
+
|
152
158
|
// src/utils/utils_file.ts
|
153
159
|
import Docxtemplater from "docxtemplater";
|
154
160
|
import { saveAs as saveAs2 } from "file-saver";
|
@@ -360,6 +366,7 @@ export {
|
|
360
366
|
utils_currency_formatWithSuffix,
|
361
367
|
utils_excel_exportExcel,
|
362
368
|
utils_excel_download,
|
369
|
+
utils_field_extractAQBaseField,
|
363
370
|
utils_format_fixDecimal,
|
364
371
|
utils_list_isTotalEqual,
|
365
372
|
utils_list_isFieldUnique,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import React__default, { ReactNode, ComponentProps } from 'react';
|
3
|
-
import { t as type_action, a as type_mantineSize } from '../types-
|
3
|
+
import { t as type_action, a as type_mantineSize } from '../types-DbltiEAP.mjs';
|
4
4
|
import { ActionIconProps, ButtonProps, useModalsStack, CheckboxProps, SelectProps, NumberFormatterProps, FieldsetProps, FileInputProps, NumberInputProps, TextareaProps, MantineSize, InputWrapperProps, TextInputProps, ContainerProps, FlexProps, GroupProps, TypographyStylesProviderProps, TabsProps, SkeletonProps } from '@mantine/core';
|
5
5
|
import { M as MyApiResponse } from '../createBaseApi-75GHCO22.mjs';
|
6
6
|
import { AxiosResponse } from 'axios';
|
@@ -67,11 +67,11 @@ import {
|
|
67
67
|
useS_BasicAppShell,
|
68
68
|
useS_ButtonImport,
|
69
69
|
utils_layout_getItemsWithoutLinks
|
70
|
-
} from "../chunk-
|
70
|
+
} from "../chunk-AKZQQ7BT.mjs";
|
71
71
|
import "../chunk-U62R2QKJ.mjs";
|
72
72
|
import "../chunk-5U2JSHSJ.mjs";
|
73
73
|
import "../chunk-OMJJAHOC.mjs";
|
74
|
-
import "../chunk-
|
74
|
+
import "../chunk-OIIBQARW.mjs";
|
75
75
|
import "../chunk-7ZCOFATU.mjs";
|
76
76
|
import "../chunk-FWCSY2DS.mjs";
|
77
77
|
export {
|
package/dist/core/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { t as type_action } from '../types-
|
2
|
+
import { t as type_action } from '../types-DbltiEAP.mjs';
|
3
3
|
import { ActionIconProps, ButtonProps, ModalProps, ScrollAreaAutosizeProps, TextProps, PaperProps, GroupProps, ThemeIconProps, InputWrapperProps, SelectProps, TextInputProps, FlexProps } from '@mantine/core';
|
4
4
|
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
5
5
|
import { M as MyApiResponse } from '../createBaseApi-75GHCO22.mjs';
|
@@ -63,13 +63,14 @@ interface MyButtonModalProps {
|
|
63
63
|
}
|
64
64
|
declare function MyButtonModal({ disclosure, children, buttonProps, actionIconProps, modalProps, isActionIcon }: MyButtonModalProps): react_jsx_runtime.JSX.Element;
|
65
65
|
|
66
|
-
interface
|
66
|
+
interface MyButtonModalFormProps<IEntity> extends MyButtonModalProps {
|
67
67
|
isUpdate?: boolean;
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
children?: ReactNode;
|
69
|
+
onSubmit: (values: IEntity) => void;
|
70
|
+
form: UseFormReturnType<IEntity>;
|
71
|
+
isLoading?: boolean;
|
71
72
|
}
|
72
|
-
declare function
|
73
|
+
declare function MyButtonModalForm<IEntity>({ isUpdate, children, form, disclosure, onSubmit, isLoading, ...rest }: MyButtonModalFormProps<IEntity>): react_jsx_runtime.JSX.Element;
|
73
74
|
|
74
75
|
type PageSizeOption = "portrait" | "landscape" | "A4-landscape";
|
75
76
|
interface MyButtonPrintPDFProps {
|
@@ -195,4 +196,4 @@ interface MyFlexEndProps extends GroupProps {
|
|
195
196
|
}
|
196
197
|
declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
|
197
198
|
|
198
|
-
export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal,
|
199
|
+
export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyButtonModalForm, type MyButtonModalFormProps, type MyButtonModalProps, MyButtonPrintPDF, type MyButtonPrintPDFProps, type MyButtonProps$1 as MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectFromAPIProps, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED
@@ -3,7 +3,7 @@ import {
|
|
3
3
|
MyButton,
|
4
4
|
MyButtonCreateUpdate,
|
5
5
|
MyButtonModal,
|
6
|
-
|
6
|
+
MyButtonModalForm,
|
7
7
|
MyButtonPrintPDF,
|
8
8
|
MyDataTableSelectOne,
|
9
9
|
MyDayOfWeekPicker,
|
@@ -18,14 +18,14 @@ import {
|
|
18
18
|
MyStatsCard,
|
19
19
|
MyTextInput,
|
20
20
|
MyWeeklySessionSchedulerPicker
|
21
|
-
} from "../chunk-
|
22
|
-
import "../chunk-
|
23
|
-
import "../chunk-NQMVDLMU.mjs";
|
21
|
+
} from "../chunk-6OZGJBBA.mjs";
|
22
|
+
import "../chunk-AKZQQ7BT.mjs";
|
24
23
|
import "../chunk-U62R2QKJ.mjs";
|
25
24
|
import "../chunk-5U2JSHSJ.mjs";
|
26
25
|
import "../chunk-GFEMKKFH.mjs";
|
27
26
|
import "../chunk-OMJJAHOC.mjs";
|
28
|
-
import "../chunk-
|
27
|
+
import "../chunk-K6S7R6LU.mjs";
|
28
|
+
import "../chunk-OIIBQARW.mjs";
|
29
29
|
import "../chunk-7ZCOFATU.mjs";
|
30
30
|
import "../chunk-FWCSY2DS.mjs";
|
31
31
|
export {
|
@@ -33,7 +33,7 @@ export {
|
|
33
33
|
MyButton,
|
34
34
|
MyButtonCreateUpdate,
|
35
35
|
MyButtonModal,
|
36
|
-
|
36
|
+
MyButtonModalForm,
|
37
37
|
MyButtonPrintPDF,
|
38
38
|
MyDataTableSelectOne,
|
39
39
|
MyDayOfWeekPicker,
|
package/dist/hooks/index.d.mts
CHANGED
@@ -49,8 +49,10 @@ interface MyReactMutationProps<IReq, IRes> {
|
|
49
49
|
axiosFn: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
|
50
50
|
options?: UseMutationOptions<IRes, Error, IReq>;
|
51
51
|
mutationType?: type_mutation;
|
52
|
+
enableDefaultSuccess?: boolean;
|
53
|
+
enableDefaultError?: boolean;
|
52
54
|
}
|
53
|
-
declare function useMyReactMutation<IReq, IRes>({ axiosFn, options, mutationType }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
|
55
|
+
declare function useMyReactMutation<IReq, IRes>({ axiosFn, options, mutationType, enableDefaultSuccess, enableDefaultError, }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
|
54
56
|
|
55
57
|
interface MyReactQueryProps<IRes, IBody> {
|
56
58
|
queryKey?: QueryKey;
|
package/dist/hooks/index.mjs
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
-
export { I as IAQModule } from '../IAQModule-4U3n2emx.mjs';
|
2
1
|
import { I as IBaseEntity } from '../IBaseEntity-ChMy9RzQ.mjs';
|
2
|
+
export { I as IAQModule } from '../IAQModule-4U3n2emx.mjs';
|
3
3
|
export { I as IEmailConfig } from '../IEmailConfig-CioPObC1.mjs';
|
4
4
|
|
5
|
+
interface IAccount extends IBaseEntity {
|
6
|
+
userName?: string;
|
7
|
+
phoneNumber?: string;
|
8
|
+
email?: string;
|
9
|
+
fullName?: string;
|
10
|
+
}
|
11
|
+
|
5
12
|
interface IFile {
|
6
13
|
fileName?: string | undefined;
|
7
14
|
fileExtension?: string | undefined;
|
@@ -72,4 +79,4 @@ interface IPageContent extends IBaseEntity {
|
|
72
79
|
description?: string;
|
73
80
|
}
|
74
81
|
|
75
|
-
export { IBaseEntity, type IDocument, type IDocumentAttribute, type IFile, type IPageContent, type IPagePermission, type IRole, type IUser };
|
82
|
+
export { type IAccount, IBaseEntity, type IDocument, type IDocumentAttribute, type IFile, type IPageContent, type IPagePermission, type IRole, type IUser };
|
@@ -5,28 +5,24 @@ import {
|
|
5
5
|
utils_converter_enumToSelectOptions,
|
6
6
|
utils_file_fileToAQDocumentType,
|
7
7
|
utils_mantineDataTable_filterColumns
|
8
|
-
} from "../chunk-
|
9
|
-
import {
|
10
|
-
MyButton,
|
11
|
-
MyDataTableSelectOne,
|
12
|
-
MyTextInput as MyTextInput2
|
13
|
-
} from "../chunk-K6LP524K.mjs";
|
14
|
-
import {
|
15
|
-
enum_emailConfigModule
|
16
|
-
} from "../chunk-VH4ZAD6M.mjs";
|
17
|
-
import "../chunk-K6S7R6LU.mjs";
|
8
|
+
} from "../chunk-T7NNF74S.mjs";
|
18
9
|
import {
|
19
10
|
baseColumns
|
20
11
|
} from "../chunk-7PUDC2WF.mjs";
|
21
12
|
import {
|
22
13
|
U0DateToDDMMYYYString
|
23
14
|
} from "../chunk-EWDS5IOF.mjs";
|
15
|
+
import {
|
16
|
+
MyButton as MyButton2,
|
17
|
+
MyDataTableSelectOne,
|
18
|
+
MyTextInput as MyTextInput2
|
19
|
+
} from "../chunk-6OZGJBBA.mjs";
|
24
20
|
import {
|
25
21
|
F_authenticate_Logout,
|
26
22
|
MyActionIconDelete,
|
27
23
|
MyActionIconUpdate,
|
28
24
|
MyBoxesBackground,
|
29
|
-
MyButton
|
25
|
+
MyButton,
|
30
26
|
MyButtonCreate,
|
31
27
|
MyButtonModal,
|
32
28
|
MyButtonViewPDF,
|
@@ -46,7 +42,7 @@ import {
|
|
46
42
|
groupToTwoLevels,
|
47
43
|
useS_authenticate,
|
48
44
|
utils_layout_getItemsWithoutLinks
|
49
|
-
} from "../chunk-
|
45
|
+
} from "../chunk-AKZQQ7BT.mjs";
|
50
46
|
import {
|
51
47
|
createGenericStore
|
52
48
|
} from "../chunk-U62R2QKJ.mjs";
|
@@ -57,6 +53,10 @@ import {
|
|
57
53
|
import {
|
58
54
|
const_object_colors
|
59
55
|
} from "../chunk-OMJJAHOC.mjs";
|
56
|
+
import {
|
57
|
+
enum_emailConfigModule
|
58
|
+
} from "../chunk-VH4ZAD6M.mjs";
|
59
|
+
import "../chunk-K6S7R6LU.mjs";
|
60
60
|
import {
|
61
61
|
baseAxios_default,
|
62
62
|
createBaseApi,
|
@@ -66,7 +66,7 @@ import {
|
|
66
66
|
useMyRouter,
|
67
67
|
useQ_AQ_GetAQModule,
|
68
68
|
useQ_SkillCenter_GetAll
|
69
|
-
} from "../chunk-
|
69
|
+
} from "../chunk-OIIBQARW.mjs";
|
70
70
|
import {
|
71
71
|
utils_notification_show
|
72
72
|
} from "../chunk-7ZCOFATU.mjs";
|
@@ -76,9 +76,9 @@ import {
|
|
76
76
|
__spreadValues
|
77
77
|
} from "../chunk-FWCSY2DS.mjs";
|
78
78
|
|
79
|
-
// src/api/services/
|
79
|
+
// src/api/services/service_account.ts
|
80
80
|
var CONTROLLER = "/account";
|
81
|
-
var
|
81
|
+
var service_account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER, baseAxios_default)), {
|
82
82
|
getAdminAccount: (paging) => {
|
83
83
|
return baseAxios_default.get(CONTROLLER + `/GetAdminAccount`, {
|
84
84
|
params: paging
|
@@ -131,7 +131,7 @@ function Account_Table(_a) {
|
|
131
131
|
var _a2;
|
132
132
|
const query = useMyReactQuery({
|
133
133
|
queryKey: ["accounts"],
|
134
|
-
axiosFn: () =>
|
134
|
+
axiosFn: () => service_account.getAdminAccount()
|
135
135
|
});
|
136
136
|
useEffect(() => {
|
137
137
|
var _a3, _b;
|
@@ -211,7 +211,7 @@ function Permission_SaveMenuPermission({
|
|
211
211
|
}
|
212
212
|
});
|
213
213
|
return /* @__PURE__ */ jsx3(
|
214
|
-
|
214
|
+
MyButton2,
|
215
215
|
{
|
216
216
|
onClick: () => {
|
217
217
|
mutation.mutate((values == null ? void 0 : values.filter((item) => item.id != "0").map((item) => ({
|
@@ -523,7 +523,7 @@ function F_accessControl_ReadUser() {
|
|
523
523
|
const columns = useMemo2(() => userColumns, []);
|
524
524
|
const getAdminAccountQuery = useMyReactQuery({
|
525
525
|
queryKey: ["getAdminAccountQuery"],
|
526
|
-
axiosFn: () =>
|
526
|
+
axiosFn: () => service_account.getAdminAccount(),
|
527
527
|
mockData: mockUserData
|
528
528
|
});
|
529
529
|
return /* @__PURE__ */ jsx7(
|
@@ -832,7 +832,7 @@ function F_accessControl_Save() {
|
|
832
832
|
}
|
833
833
|
disable[1](false);
|
834
834
|
}, [store.state.rolePermissions]);
|
835
|
-
return /* @__PURE__ */ jsx9(
|
835
|
+
return /* @__PURE__ */ jsx9(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
836
836
|
}
|
837
837
|
|
838
838
|
// src/modules-features/admin/core/accessControl/old/F_accessControl.tsx
|
@@ -1286,7 +1286,7 @@ function F_accessControlLevel_Save() {
|
|
1286
1286
|
}
|
1287
1287
|
disable[1](false);
|
1288
1288
|
}, [store.state.rolePermissions]);
|
1289
|
-
return /* @__PURE__ */ jsx16(
|
1289
|
+
return /* @__PURE__ */ jsx16(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
|
1290
1290
|
}
|
1291
1291
|
|
1292
1292
|
// src/modules-features/admin/core/accessControlLevel/old/F_accessControlLevel.tsx
|
@@ -3057,7 +3057,7 @@ function F_core35923() {
|
|
3057
3057
|
/* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
|
3058
3058
|
/* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Logo (330px x 115px)" }) })
|
3059
3059
|
] }),
|
3060
|
-
/* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(
|
3060
|
+
/* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton, { crudType: "save" }) })
|
3061
3061
|
] });
|
3062
3062
|
}
|
3063
3063
|
|
@@ -4444,7 +4444,7 @@ function F_moduleConfig_Save({
|
|
4444
4444
|
});
|
4445
4445
|
}
|
4446
4446
|
return /* @__PURE__ */ jsx83(
|
4447
|
-
|
4447
|
+
MyButton,
|
4448
4448
|
{
|
4449
4449
|
disabled: !form.isDirty(),
|
4450
4450
|
crudType: "save",
|
@@ -4900,13 +4900,13 @@ import { useMemo as useMemo20 } from "react";
|
|
4900
4900
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
|
4901
4901
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
4902
4902
|
function F_pageContentConfig_DeleteDescription() {
|
4903
|
-
return /* @__PURE__ */ jsx91(
|
4903
|
+
return /* @__PURE__ */ jsx91(MyButton2, { actionType: "delete" });
|
4904
4904
|
}
|
4905
4905
|
|
4906
4906
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
|
4907
4907
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
4908
4908
|
function F_pageContentConfig_Export() {
|
4909
|
-
return /* @__PURE__ */ jsx92(
|
4909
|
+
return /* @__PURE__ */ jsx92(MyButton2, { actionType: "export" });
|
4910
4910
|
}
|
4911
4911
|
|
4912
4912
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
|
@@ -4918,7 +4918,7 @@ function F_pageContentConfig_Save({ menuValues }) {
|
|
4918
4918
|
return service_pageContent.updateList([{ id: 1 }]);
|
4919
4919
|
}
|
4920
4920
|
});
|
4921
|
-
return /* @__PURE__ */ jsx93(
|
4921
|
+
return /* @__PURE__ */ jsx93(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
|
4922
4922
|
}
|
4923
4923
|
|
4924
4924
|
// src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MantineSize } from '@mantine/core';
|
2
2
|
|
3
3
|
type type_mantineSize = number | MantineSize | (string & {}) | undefined;
|
4
|
-
type type_action = "default" | "create" | "update" | "delete" | "save" | "createMultiple" | "check" | "import" | "print" | "cancel" | "export" | "select";
|
4
|
+
type type_action = "default" | "create" | "update" | "delete" | "save" | "createMultiple" | "check" | "import" | "print" | "cancel" | "export" | "select" | "find";
|
5
5
|
|
6
6
|
export type { type_mantineSize as a, type_action as t };
|
package/dist/utils/index.d.mts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export { a as IAQFileDetail, I as IUtils_Excel_ColumnConfig, b as utils_excel_download, u as utils_excel_exportExcel, d as utils_file_AQDocumentTypeToFile, e as utils_file_docxtemplaterDownload, c as utils_file_fileToAQDocumentType } from '../utils_file-G8NTHCO-.mjs';
|
2
|
+
import { I as IBaseEntity } from '../IBaseEntity-ChMy9RzQ.mjs';
|
2
3
|
import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
|
3
4
|
import { DefaultMantineColor } from '@mantine/core';
|
4
5
|
import { useQueryClient } from '@tanstack/react-query';
|
@@ -27,6 +28,13 @@ declare function utils_date_dateToDDMMYYYString(date?: Date | string): string;
|
|
27
28
|
declare function utils_date_formatToDateTimeStartEnd(startDate: Date, endDate: Date): string;
|
28
29
|
declare function utils_date_getHHmm(date: Date): string;
|
29
30
|
|
31
|
+
declare function utils_field_extractAQBaseField(values?: Partial<IBaseEntity>): {
|
32
|
+
id: number | undefined;
|
33
|
+
name: string | undefined;
|
34
|
+
code: string | undefined;
|
35
|
+
concurrencyStamp: string | undefined;
|
36
|
+
};
|
37
|
+
|
30
38
|
declare function utils_format_fixDecimal(number: number, digits?: number): number | undefined;
|
31
39
|
|
32
40
|
/**
|
@@ -74,4 +82,4 @@ declare function U0MyValidateEmpty(message?: string): (value: unknown) => React.
|
|
74
82
|
declare function U0MyValidateEmail(value?: string): "Email không đúng định dạng" | null;
|
75
83
|
declare const utils_validator_validateCode: (value?: string) => "Không được để trống" | "Chỉ được nhập chữ, số và dấu '-' (không bắt đầu bằng '-')" | null;
|
76
84
|
|
77
|
-
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, updateEnableList, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_converter_mapEnumToSelectData, utils_currency_formatWithSuffix, utils_date_dateToDDMMYYYString, utils_date_formatToDateTimeStartEnd, utils_date_getHHmm, utils_format_fixDecimal, utils_list_hasEmptyField, utils_list_isFieldUnique, utils_list_isTotalEqual, utils_list_sumField, utils_mantineDataTable_filterColumns, utils_notification_show, utils_pdf_download, utils_reactQuery_updateListItemInQuery, utils_text_getNormalizedTextFromHtml, utils_time_convertTimeStringToSeconds, utils_time_extractHourMinute, utils_time_getCurrentTimeString, utils_time_getHourMinuteFromString, utils_validator_validateCode };
|
85
|
+
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, updateEnableList, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_converter_mapEnumToSelectData, utils_currency_formatWithSuffix, utils_date_dateToDDMMYYYString, utils_date_formatToDateTimeStartEnd, utils_date_getHHmm, utils_field_extractAQBaseField, utils_format_fixDecimal, utils_list_hasEmptyField, utils_list_isFieldUnique, utils_list_isTotalEqual, utils_list_sumField, utils_mantineDataTable_filterColumns, utils_notification_show, utils_pdf_download, utils_reactQuery_updateListItemInQuery, utils_text_getNormalizedTextFromHtml, utils_time_convertTimeStringToSeconds, utils_time_extractHourMinute, utils_time_getCurrentTimeString, utils_time_getHourMinuteFromString, utils_validator_validateCode };
|
package/dist/utils/index.mjs
CHANGED
@@ -9,6 +9,7 @@ import {
|
|
9
9
|
utils_currency_formatWithSuffix,
|
10
10
|
utils_excel_download,
|
11
11
|
utils_excel_exportExcel,
|
12
|
+
utils_field_extractAQBaseField,
|
12
13
|
utils_file_AQDocumentTypeToFile,
|
13
14
|
utils_file_docxtemplaterDownload,
|
14
15
|
utils_file_fileToAQDocumentType,
|
@@ -25,7 +26,7 @@ import {
|
|
25
26
|
utils_time_getCurrentTimeString,
|
26
27
|
utils_time_getHourMinuteFromString,
|
27
28
|
utils_validator_validateCode
|
28
|
-
} from "../chunk-
|
29
|
+
} from "../chunk-T7NNF74S.mjs";
|
29
30
|
import {
|
30
31
|
U0DateToDDMMYYYString,
|
31
32
|
utils_date_dateToDDMMYYYString,
|
@@ -54,6 +55,7 @@ export {
|
|
54
55
|
utils_date_getHHmm,
|
55
56
|
utils_excel_download,
|
56
57
|
utils_excel_exportExcel,
|
58
|
+
utils_field_extractAQBaseField,
|
57
59
|
utils_file_AQDocumentTypeToFile,
|
58
60
|
utils_file_docxtemplaterDownload,
|
59
61
|
utils_file_fileToAQDocumentType,
|