aq-fe-framework 0.1.89 → 0.1.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGenericStore
|
|
3
|
+
} from "./chunk-Y3YGC5IH.mjs";
|
|
1
4
|
import {
|
|
2
5
|
U0DateToDDMMYYYString,
|
|
3
6
|
U0MyValidateEmail,
|
|
@@ -6,9 +9,6 @@ import {
|
|
|
6
9
|
utils_notification_show,
|
|
7
10
|
utils_pdf_download
|
|
8
11
|
} from "./chunk-EEQENBXZ.mjs";
|
|
9
|
-
import {
|
|
10
|
-
createGenericStore
|
|
11
|
-
} from "./chunk-Y3YGC5IH.mjs";
|
|
12
12
|
import {
|
|
13
13
|
__objRest,
|
|
14
14
|
__spreadProps,
|
|
@@ -514,8 +514,17 @@ function MyActionIconDelete(_a) {
|
|
|
514
514
|
|
|
515
515
|
// src/modules-features/admin/core/core12196/F_core12196_Delete.tsx
|
|
516
516
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
517
|
-
function F_core12196_Delete({
|
|
518
|
-
|
|
517
|
+
function F_core12196_Delete({
|
|
518
|
+
id,
|
|
519
|
+
contextData
|
|
520
|
+
}) {
|
|
521
|
+
return /* @__PURE__ */ jsx8(
|
|
522
|
+
MyActionIconDelete,
|
|
523
|
+
{
|
|
524
|
+
contextData,
|
|
525
|
+
onSubmit: async () => await baseAxios_default.post("/Document/delete", { id })
|
|
526
|
+
}
|
|
527
|
+
);
|
|
519
528
|
}
|
|
520
529
|
|
|
521
530
|
// src/components/ActionIcons/ActionIconCRUD/MyActionIconUpdate.tsx
|
|
@@ -632,26 +641,82 @@ function F_core18256_Select(_a) {
|
|
|
632
641
|
// src/modules-features/admin/core/core12196/F_core12196_Update.tsx
|
|
633
642
|
import { useForm } from "@mantine/form";
|
|
634
643
|
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
635
|
-
function F_core12196_Update({
|
|
644
|
+
function F_core12196_Update({
|
|
645
|
+
values,
|
|
646
|
+
FormTypeId
|
|
647
|
+
}) {
|
|
636
648
|
var _a;
|
|
637
649
|
const form = useForm({
|
|
638
650
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
639
|
-
file: new File(
|
|
651
|
+
file: new File(
|
|
652
|
+
[],
|
|
653
|
+
(_a = values.path) == null ? void 0 : _a.split("/")[values.path.split("/").length - 1]
|
|
654
|
+
),
|
|
640
655
|
promulgateDate: new Date(values.promulgateDate)
|
|
641
|
-
})
|
|
656
|
+
}),
|
|
657
|
+
validate: {
|
|
658
|
+
decisionCode: (value) => value ? null : "S\u1ED1 quy \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
659
|
+
promulgateDate: (value) => value ? null : "Ng\xE0y ban h\xE0nh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
660
|
+
name: (value) => value ? null : "T\xEAn t\xE0i li\u1EC7u kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
661
|
+
documentAttributeId: (value) => value ? null : "Lo\u1EA1i v\u0103n b\u1EA3n kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
662
|
+
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
663
|
+
}
|
|
642
664
|
});
|
|
643
|
-
return /* @__PURE__ */ jsxs6(
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
665
|
+
return /* @__PURE__ */ jsxs6(
|
|
666
|
+
MyActionIconUpdate,
|
|
667
|
+
{
|
|
668
|
+
form,
|
|
669
|
+
onSubmit: async (values2) => {
|
|
670
|
+
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
671
|
+
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
672
|
+
}));
|
|
673
|
+
},
|
|
674
|
+
children: [
|
|
675
|
+
/* @__PURE__ */ jsx15(
|
|
676
|
+
MyTextInput,
|
|
677
|
+
__spreadValues({
|
|
678
|
+
withAsterisk: true,
|
|
679
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
680
|
+
}, form.getInputProps("decisionCode"))
|
|
681
|
+
),
|
|
682
|
+
/* @__PURE__ */ jsx15(
|
|
683
|
+
MyDateInput,
|
|
684
|
+
__spreadValues({
|
|
685
|
+
withAsterisk: true,
|
|
686
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
687
|
+
}, form.getInputProps("promulgateDate"))
|
|
688
|
+
),
|
|
689
|
+
/* @__PURE__ */ jsx15(
|
|
690
|
+
MyTextInput,
|
|
691
|
+
__spreadValues({
|
|
692
|
+
withAsterisk: true,
|
|
693
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
694
|
+
}, form.getInputProps("name"))
|
|
695
|
+
),
|
|
696
|
+
/* @__PURE__ */ jsx15(
|
|
697
|
+
F_core18256_Select,
|
|
698
|
+
__spreadValues({
|
|
699
|
+
withAsterisk: true,
|
|
700
|
+
label: "Lo\u1EA1i v\u0103n b\u1EA3n",
|
|
701
|
+
documentTypeId: FormTypeId
|
|
702
|
+
}, form.getInputProps("documentAttributeId"))
|
|
703
|
+
),
|
|
704
|
+
/* @__PURE__ */ jsx15(
|
|
705
|
+
MyFileInput,
|
|
706
|
+
__spreadValues({
|
|
707
|
+
withAsterisk: true,
|
|
708
|
+
label: "V\u0103n b\u1EA3n"
|
|
709
|
+
}, form.getInputProps("file"))
|
|
710
|
+
),
|
|
711
|
+
/* @__PURE__ */ jsx15(
|
|
712
|
+
MyNumberInput,
|
|
713
|
+
__spreadValues({
|
|
714
|
+
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
|
715
|
+
}, form.getInputProps("orderBy"))
|
|
716
|
+
)
|
|
717
|
+
]
|
|
718
|
+
}
|
|
719
|
+
);
|
|
655
720
|
}
|
|
656
721
|
|
|
657
722
|
// src/modules-features/admin/core/core12196/F_core12196_Read.tsx
|
|
@@ -662,23 +727,50 @@ function F_core12196_Read({ FormTypeId }) {
|
|
|
662
727
|
queryKey: ["F_core12196_Read", FormTypeId],
|
|
663
728
|
queryFn: async () => {
|
|
664
729
|
var _a2;
|
|
665
|
-
const result = await baseAxios_default.get("/DocumentAttribute/GetByType?", {
|
|
730
|
+
const result = await baseAxios_default.get("/DocumentAttribute/GetByType?", {
|
|
731
|
+
params: { documentType: FormTypeId }
|
|
732
|
+
});
|
|
666
733
|
return ((_a2 = result.data) == null ? void 0 : _a2.data) || [];
|
|
667
734
|
}
|
|
668
735
|
});
|
|
669
736
|
if (documentAttributeQuery.isLoading) return "Loading...";
|
|
670
737
|
if (documentAttributeQuery.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
671
|
-
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
738
|
+
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
|
739
|
+
return /* @__PURE__ */ jsx16(Blockquote, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
|
740
|
+
return /* @__PURE__ */ jsx16(MyFlexColumn, { children: /* @__PURE__ */ jsx16(
|
|
741
|
+
Accordion,
|
|
742
|
+
{
|
|
743
|
+
variant: "contained",
|
|
744
|
+
defaultValue: (_b = documentAttributeQuery.data) == null ? void 0 : _b.map(
|
|
745
|
+
(item) => {
|
|
746
|
+
var _a2;
|
|
747
|
+
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
|
748
|
+
}
|
|
749
|
+
),
|
|
750
|
+
multiple: true,
|
|
751
|
+
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx16(
|
|
752
|
+
SubRead,
|
|
753
|
+
{
|
|
754
|
+
name: item.name,
|
|
755
|
+
documentType: item.id,
|
|
756
|
+
FormTypeId
|
|
757
|
+
},
|
|
758
|
+
idx
|
|
759
|
+
))
|
|
760
|
+
}
|
|
761
|
+
) });
|
|
676
762
|
}
|
|
677
|
-
function SubRead({
|
|
763
|
+
function SubRead({
|
|
764
|
+
name,
|
|
765
|
+
documentType,
|
|
766
|
+
FormTypeId
|
|
767
|
+
}) {
|
|
678
768
|
const documentQuery = useQuery3({
|
|
679
769
|
queryKey: ["SF2_3Read" + documentType],
|
|
680
770
|
queryFn: async () => {
|
|
681
|
-
const result = await baseAxios_default.get(
|
|
771
|
+
const result = await baseAxios_default.get(
|
|
772
|
+
`/Document/GetByDocumentAttribute?id=${documentType}`
|
|
773
|
+
);
|
|
682
774
|
return result.data.data;
|
|
683
775
|
}
|
|
684
776
|
});
|
|
@@ -715,8 +807,20 @@ function SubRead({ name, documentType, FormTypeId }) {
|
|
|
715
807
|
columns,
|
|
716
808
|
data: documentQuery.data,
|
|
717
809
|
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs7(MyCenterFull, { children: [
|
|
718
|
-
/* @__PURE__ */ jsx16(
|
|
719
|
-
|
|
810
|
+
/* @__PURE__ */ jsx16(
|
|
811
|
+
F_core12196_Update,
|
|
812
|
+
{
|
|
813
|
+
FormTypeId,
|
|
814
|
+
values: row.original
|
|
815
|
+
}
|
|
816
|
+
),
|
|
817
|
+
/* @__PURE__ */ jsx16(
|
|
818
|
+
F_core12196_Delete,
|
|
819
|
+
{
|
|
820
|
+
id: row.original.id,
|
|
821
|
+
contextData: row.original.decisionCode
|
|
822
|
+
}
|
|
823
|
+
)
|
|
720
824
|
] })
|
|
721
825
|
}
|
|
722
826
|
) })
|
|
@@ -7489,24 +7593,72 @@ import { useForm as useForm2 } from "@mantine/form";
|
|
|
7489
7593
|
import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7490
7594
|
function F_core12196_Create({ FormTypeId }) {
|
|
7491
7595
|
const form = useForm2({
|
|
7492
|
-
mode: "uncontrolled"
|
|
7596
|
+
mode: "uncontrolled",
|
|
7597
|
+
validate: {
|
|
7598
|
+
decisionCode: (value) => value ? null : "S\u1ED1 quy \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7599
|
+
promulgateDate: (value) => value ? null : "Ng\xE0y ban h\xE0nh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7600
|
+
name: (value) => value ? null : "T\xEAn t\xE0i li\u1EC7u kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7601
|
+
documentAttributeId: (value) => value ? null : "Lo\u1EA1i v\u0103n b\u1EA3n kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7602
|
+
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
7603
|
+
}
|
|
7493
7604
|
});
|
|
7494
|
-
return /* @__PURE__ */ jsxs33(
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7605
|
+
return /* @__PURE__ */ jsxs33(
|
|
7606
|
+
MyButtonCreate,
|
|
7607
|
+
{
|
|
7608
|
+
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
|
7609
|
+
form,
|
|
7610
|
+
onSubmit: async (values) => {
|
|
7611
|
+
return await baseAxios_default.post("/Document/create", __spreadProps(__spreadValues({}, values), {
|
|
7612
|
+
DocumentType: OBJECT_DOCUMENT_TYPES.Form,
|
|
7613
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
7614
|
+
}));
|
|
7615
|
+
},
|
|
7616
|
+
children: [
|
|
7617
|
+
/* @__PURE__ */ jsx61(
|
|
7618
|
+
MyTextInput,
|
|
7619
|
+
__spreadValues({
|
|
7620
|
+
withAsterisk: true,
|
|
7621
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
7622
|
+
}, form.getInputProps("decisionCode"))
|
|
7623
|
+
),
|
|
7624
|
+
/* @__PURE__ */ jsx61(
|
|
7625
|
+
MyDateInput,
|
|
7626
|
+
__spreadValues({
|
|
7627
|
+
withAsterisk: true,
|
|
7628
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
7629
|
+
}, form.getInputProps("promulgateDate"))
|
|
7630
|
+
),
|
|
7631
|
+
/* @__PURE__ */ jsx61(
|
|
7632
|
+
MyTextInput,
|
|
7633
|
+
__spreadValues({
|
|
7634
|
+
withAsterisk: true,
|
|
7635
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
7636
|
+
}, form.getInputProps("name"))
|
|
7637
|
+
),
|
|
7638
|
+
/* @__PURE__ */ jsx61(
|
|
7639
|
+
F_core18256_Select,
|
|
7640
|
+
__spreadValues({
|
|
7641
|
+
withAsterisk: true,
|
|
7642
|
+
label: "Lo\u1EA1i v\u0103n b\u1EA3n",
|
|
7643
|
+
documentTypeId: FormTypeId
|
|
7644
|
+
}, form.getInputProps("documentAttributeId"))
|
|
7645
|
+
),
|
|
7646
|
+
/* @__PURE__ */ jsx61(
|
|
7647
|
+
MyFileInput,
|
|
7648
|
+
__spreadValues({
|
|
7649
|
+
withAsterisk: true,
|
|
7650
|
+
label: "V\u0103n b\u1EA3n"
|
|
7651
|
+
}, form.getInputProps("file"))
|
|
7652
|
+
),
|
|
7653
|
+
/* @__PURE__ */ jsx61(
|
|
7654
|
+
MyNumberInput,
|
|
7655
|
+
__spreadValues({
|
|
7656
|
+
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
|
7657
|
+
}, form.getInputProps("orderBy"))
|
|
7658
|
+
)
|
|
7659
|
+
]
|
|
7660
|
+
}
|
|
7661
|
+
);
|
|
7510
7662
|
}
|
|
7511
7663
|
|
|
7512
7664
|
// src/modules-features/admin/core/core12196/F_core12196.tsx
|
|
@@ -7532,34 +7684,86 @@ import { useForm as useForm3 } from "@mantine/form";
|
|
|
7532
7684
|
import { jsx as jsx63, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7533
7685
|
function F_core16209_Create() {
|
|
7534
7686
|
const form = useForm3({
|
|
7535
|
-
mode: "uncontrolled"
|
|
7687
|
+
mode: "uncontrolled",
|
|
7688
|
+
validate: {
|
|
7689
|
+
departmentName: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7690
|
+
description: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7691
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7692
|
+
startDate: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7693
|
+
endDate: (value, values) => value && values.startDate && new Date(value) > new Date(values.startDate) ? null : "Ng\xE0y k\u1EBFt th\xFAc ph\u1EA3i l\u1EDBn h\u01A1n ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
|
7694
|
+
}
|
|
7536
7695
|
});
|
|
7537
|
-
return /* @__PURE__ */ jsxs35(
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7696
|
+
return /* @__PURE__ */ jsxs35(
|
|
7697
|
+
MyButtonCreate,
|
|
7698
|
+
{
|
|
7699
|
+
objectName: "v\u0103n b\u1EA3n",
|
|
7700
|
+
form,
|
|
7701
|
+
onSubmit: async (values) => {
|
|
7702
|
+
return await baseAxios_default.post("/Document/create", __spreadProps(__spreadValues({}, values), {
|
|
7703
|
+
DocumentType: OBJECT_DOCUMENT_TYPES.Refinement,
|
|
7704
|
+
//1.4 Thông tin xây dựng, cải tiến, bảo trì hệ thống
|
|
7705
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
7706
|
+
}));
|
|
7707
|
+
},
|
|
7708
|
+
children: [
|
|
7709
|
+
/* @__PURE__ */ jsx63(
|
|
7710
|
+
MyTextInput,
|
|
7711
|
+
__spreadValues({
|
|
7712
|
+
withAsterisk: true,
|
|
7713
|
+
label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u"
|
|
7714
|
+
}, form.getInputProps("departmentName"))
|
|
7715
|
+
),
|
|
7716
|
+
/* @__PURE__ */ jsx63(
|
|
7717
|
+
MyTextInput,
|
|
7718
|
+
__spreadValues({
|
|
7719
|
+
withAsterisk: true,
|
|
7720
|
+
label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn"
|
|
7721
|
+
}, form.getInputProps("description"))
|
|
7722
|
+
),
|
|
7723
|
+
/* @__PURE__ */ jsx63(
|
|
7724
|
+
MyDateInput,
|
|
7725
|
+
__spreadValues({
|
|
7726
|
+
withAsterisk: true,
|
|
7727
|
+
label: "Ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
|
7728
|
+
}, form.getInputProps("startDate"))
|
|
7729
|
+
),
|
|
7730
|
+
/* @__PURE__ */ jsx63(
|
|
7731
|
+
MyDateInput,
|
|
7732
|
+
__spreadValues({
|
|
7733
|
+
withAsterisk: true,
|
|
7734
|
+
label: "Ng\xE0y k\u1EBFt th\xFAc"
|
|
7735
|
+
}, form.getInputProps("endDate"))
|
|
7736
|
+
),
|
|
7737
|
+
/* @__PURE__ */ jsx63(
|
|
7738
|
+
FileInput4,
|
|
7739
|
+
__spreadValues({
|
|
7740
|
+
placeholder: "T\u1EA3i l\xEAn t\xE0i li\u1EC7u",
|
|
7741
|
+
withAsterisk: true,
|
|
7742
|
+
label: "T\xE0i li\u1EC7u"
|
|
7743
|
+
}, form.getInputProps("file"))
|
|
7744
|
+
)
|
|
7745
|
+
]
|
|
7746
|
+
}
|
|
7747
|
+
);
|
|
7553
7748
|
}
|
|
7554
7749
|
|
|
7555
7750
|
// src/modules-features/admin/core/core16209/F_core16209_Delete.tsx
|
|
7556
7751
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
7557
|
-
function F_core16209_Delete({
|
|
7558
|
-
|
|
7752
|
+
function F_core16209_Delete({
|
|
7753
|
+
id,
|
|
7754
|
+
contextData
|
|
7755
|
+
}) {
|
|
7756
|
+
return /* @__PURE__ */ jsx64(
|
|
7757
|
+
MyActionIconDelete,
|
|
7758
|
+
{
|
|
7759
|
+
contextData,
|
|
7760
|
+
onSubmit: () => baseAxios_default.post("/Document/delete", { id })
|
|
7761
|
+
}
|
|
7762
|
+
);
|
|
7559
7763
|
}
|
|
7560
7764
|
|
|
7561
7765
|
// src/modules-features/admin/core/core16209/F_core16209_Update.tsx
|
|
7562
|
-
import { FileInput as FileInput5
|
|
7766
|
+
import { FileInput as FileInput5 } from "@mantine/core";
|
|
7563
7767
|
import { useForm as useForm4 } from "@mantine/form";
|
|
7564
7768
|
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7565
7769
|
function F_core16209_Update({ values }) {
|
|
@@ -7568,18 +7772,27 @@ function F_core16209_Update({ values }) {
|
|
|
7568
7772
|
mode: "uncontrolled",
|
|
7569
7773
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
7570
7774
|
file: new File([], (_a = values.path) == null ? void 0 : _a.split("/")[values.path.split("/").length - 1]),
|
|
7571
|
-
|
|
7572
|
-
|
|
7775
|
+
startDate: new Date(values.startDate),
|
|
7776
|
+
endDate: new Date(values.endDate)
|
|
7777
|
+
}),
|
|
7778
|
+
validate: {
|
|
7779
|
+
departmentName: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7780
|
+
description: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7781
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7782
|
+
startDate: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7783
|
+
endDate: (value, values2) => value && values2.startDate && new Date(value) > new Date(values2.startDate) ? null : "Ng\xE0y k\u1EBFt th\xFAc ph\u1EA3i l\u1EDBn h\u01A1n ng\xE0y b\u1EAFt \u0111\u1EA7u"
|
|
7784
|
+
}
|
|
7573
7785
|
});
|
|
7574
7786
|
return /* @__PURE__ */ jsxs36(MyActionIconUpdate, { form, onSubmit: async (values2) => {
|
|
7575
7787
|
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
7576
7788
|
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
7577
7789
|
}));
|
|
7578
7790
|
}, children: [
|
|
7579
|
-
/* @__PURE__ */ jsx65(
|
|
7580
|
-
/* @__PURE__ */ jsx65(
|
|
7581
|
-
/* @__PURE__ */ jsx65(
|
|
7582
|
-
/* @__PURE__ */ jsx65(
|
|
7791
|
+
/* @__PURE__ */ jsx65(MyTextInput, __spreadValues({ withAsterisk: true, label: "\u0110\u01A1n v\u1ECB y\xEAu c\u1EA7u" }, form.getInputProps("departmentName"))),
|
|
7792
|
+
/* @__PURE__ */ jsx65(MyTextInput, __spreadValues({ withAsterisk: true, label: "N\u1ED9i dung c\u1EA3i ti\u1EBFn" }, form.getInputProps("description"))),
|
|
7793
|
+
/* @__PURE__ */ jsx65(MyDateInput, __spreadValues({ withAsterisk: true, label: "Ng\xE0y b\u1EAFt \u0111\u1EA7u" }, form.getInputProps("startDate"))),
|
|
7794
|
+
/* @__PURE__ */ jsx65(MyDateInput, __spreadValues({ withAsterisk: true, label: "Ng\xE0y k\u1EBFt th\xFAc" }, form.getInputProps("endDate"))),
|
|
7795
|
+
/* @__PURE__ */ jsx65(FileInput5, __spreadValues({ withAsterisk: true, label: "T\xE0i li\u1EC7u" }, form.getInputProps("file")))
|
|
7583
7796
|
] });
|
|
7584
7797
|
}
|
|
7585
7798
|
|
|
@@ -7590,7 +7803,9 @@ function F_core16209({ RefinementTypeId }) {
|
|
|
7590
7803
|
queryKey: ["F_core16209_Read"],
|
|
7591
7804
|
queryFn: async () => {
|
|
7592
7805
|
var _a;
|
|
7593
|
-
const result = await baseAxios_default.get(
|
|
7806
|
+
const result = await baseAxios_default.get(
|
|
7807
|
+
`/Document/GetByType?documentType=${RefinementTypeId}`
|
|
7808
|
+
);
|
|
7594
7809
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
|
7595
7810
|
}
|
|
7596
7811
|
});
|
|
@@ -7632,7 +7847,13 @@ function F_core16209({ RefinementTypeId }) {
|
|
|
7632
7847
|
renderRowActions: ({ row }) => {
|
|
7633
7848
|
return /* @__PURE__ */ jsxs37(MyCenterFull, { children: [
|
|
7634
7849
|
/* @__PURE__ */ jsx66(F_core16209_Update, { values: row.original }),
|
|
7635
|
-
/* @__PURE__ */ jsx66(
|
|
7850
|
+
/* @__PURE__ */ jsx66(
|
|
7851
|
+
F_core16209_Delete,
|
|
7852
|
+
{
|
|
7853
|
+
id: row.original.id,
|
|
7854
|
+
contextData: row.original.departmentName
|
|
7855
|
+
}
|
|
7856
|
+
)
|
|
7636
7857
|
] });
|
|
7637
7858
|
}
|
|
7638
7859
|
}
|
|
@@ -7752,26 +7973,76 @@ function F_core18256() {
|
|
|
7752
7973
|
// src/modules-features/admin/core/core26965/F_core26965_Create.tsx
|
|
7753
7974
|
import { useForm as useForm7 } from "@mantine/form";
|
|
7754
7975
|
import { jsx as jsx72, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7755
|
-
function F_core26965_Create({
|
|
7976
|
+
function F_core26965_Create({
|
|
7977
|
+
RegulationsTypeId
|
|
7978
|
+
}) {
|
|
7756
7979
|
const form = useForm7({
|
|
7757
|
-
mode: "uncontrolled"
|
|
7980
|
+
mode: "uncontrolled",
|
|
7981
|
+
validate: {
|
|
7982
|
+
decisionCode: (value) => value ? null : "S\u1ED1 quy \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7983
|
+
promulgateDate: (value) => value ? null : "Ng\xE0y ban h\xE0nh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7984
|
+
name: (value) => value ? null : "T\xEAn t\xE0i li\u1EC7u kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7985
|
+
documentAttributeId: (value) => value ? null : "Lo\u1EA1i v\u0103n b\u1EA3n kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
7986
|
+
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
7987
|
+
}
|
|
7758
7988
|
});
|
|
7759
|
-
return /* @__PURE__ */ jsxs42(
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7989
|
+
return /* @__PURE__ */ jsxs42(
|
|
7990
|
+
MyButtonCreate,
|
|
7991
|
+
{
|
|
7992
|
+
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
|
7993
|
+
form,
|
|
7994
|
+
onSubmit: async (values) => {
|
|
7995
|
+
return await baseAxios_default.post("/Document/create", __spreadProps(__spreadValues({}, values), {
|
|
7996
|
+
DocumentType: RegulationsTypeId,
|
|
7997
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
7998
|
+
}));
|
|
7999
|
+
},
|
|
8000
|
+
children: [
|
|
8001
|
+
/* @__PURE__ */ jsx72(
|
|
8002
|
+
MyTextInput,
|
|
8003
|
+
__spreadValues({
|
|
8004
|
+
withAsterisk: true,
|
|
8005
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
8006
|
+
}, form.getInputProps("decisionCode"))
|
|
8007
|
+
),
|
|
8008
|
+
/* @__PURE__ */ jsx72(
|
|
8009
|
+
MyDateInput,
|
|
8010
|
+
__spreadValues({
|
|
8011
|
+
withAsterisk: true,
|
|
8012
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
8013
|
+
}, form.getInputProps("promulgateDate"))
|
|
8014
|
+
),
|
|
8015
|
+
/* @__PURE__ */ jsx72(
|
|
8016
|
+
MyTextInput,
|
|
8017
|
+
__spreadValues({
|
|
8018
|
+
withAsterisk: true,
|
|
8019
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
8020
|
+
}, form.getInputProps("name"))
|
|
8021
|
+
),
|
|
8022
|
+
/* @__PURE__ */ jsx72(
|
|
8023
|
+
F_core18256_Select,
|
|
8024
|
+
__spreadValues({
|
|
8025
|
+
withAsterisk: true,
|
|
8026
|
+
label: "Lo\u1EA1i v\u0103n b\u1EA3n",
|
|
8027
|
+
documentTypeId: RegulationsTypeId
|
|
8028
|
+
}, form.getInputProps("documentAttributeId"))
|
|
8029
|
+
),
|
|
8030
|
+
/* @__PURE__ */ jsx72(
|
|
8031
|
+
MyFileInput,
|
|
8032
|
+
__spreadValues({
|
|
8033
|
+
withAsterisk: true,
|
|
8034
|
+
label: "V\u0103n b\u1EA3n"
|
|
8035
|
+
}, form.getInputProps("file"))
|
|
8036
|
+
),
|
|
8037
|
+
/* @__PURE__ */ jsx72(
|
|
8038
|
+
MyNumberInput,
|
|
8039
|
+
__spreadValues({
|
|
8040
|
+
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
|
8041
|
+
}, form.getInputProps("orderBy"))
|
|
8042
|
+
)
|
|
8043
|
+
]
|
|
8044
|
+
}
|
|
8045
|
+
);
|
|
7775
8046
|
}
|
|
7776
8047
|
|
|
7777
8048
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
|
@@ -7781,60 +8052,154 @@ import { useMemo as useMemo6 } from "react";
|
|
|
7781
8052
|
|
|
7782
8053
|
// src/modules-features/admin/core/core26965/F_core26965_Delete.tsx
|
|
7783
8054
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
7784
|
-
function F_core26965_Delete({
|
|
7785
|
-
|
|
8055
|
+
function F_core26965_Delete({
|
|
8056
|
+
id,
|
|
8057
|
+
contextData
|
|
8058
|
+
}) {
|
|
8059
|
+
return /* @__PURE__ */ jsx73(
|
|
8060
|
+
MyActionIconDelete,
|
|
8061
|
+
{
|
|
8062
|
+
contextData,
|
|
8063
|
+
onSubmit: async () => await baseAxios_default.post("/Document/delete", { id })
|
|
8064
|
+
}
|
|
8065
|
+
);
|
|
7786
8066
|
}
|
|
7787
8067
|
|
|
7788
8068
|
// src/modules-features/admin/core/core26965/F_core26965_Update.tsx
|
|
7789
8069
|
import { useForm as useForm8 } from "@mantine/form";
|
|
7790
8070
|
import { jsx as jsx74, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7791
|
-
function F_core26965_Update({
|
|
8071
|
+
function F_core26965_Update({
|
|
8072
|
+
values,
|
|
8073
|
+
RegulationsTypeId
|
|
8074
|
+
}) {
|
|
7792
8075
|
var _a;
|
|
7793
8076
|
const form = useForm8({
|
|
7794
8077
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
7795
|
-
file: new File(
|
|
8078
|
+
file: new File(
|
|
8079
|
+
[],
|
|
8080
|
+
(_a = values.path) == null ? void 0 : _a.split("/")[values.path.split("/").length - 1]
|
|
8081
|
+
),
|
|
7796
8082
|
promulgateDate: new Date(values.promulgateDate)
|
|
7797
|
-
})
|
|
8083
|
+
}),
|
|
8084
|
+
validate: {
|
|
8085
|
+
decisionCode: (value) => value ? null : "S\u1ED1 quy \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8086
|
+
promulgateDate: (value) => value ? null : "Ng\xE0y ban h\xE0nh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8087
|
+
name: (value) => value ? null : "T\xEAn t\xE0i li\u1EC7u kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8088
|
+
documentAttributeId: (value) => value ? null : "Lo\u1EA1i v\u0103n b\u1EA3n kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8089
|
+
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
8090
|
+
}
|
|
7798
8091
|
});
|
|
7799
|
-
return /* @__PURE__ */ jsxs43(
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
8092
|
+
return /* @__PURE__ */ jsxs43(
|
|
8093
|
+
MyActionIconUpdate,
|
|
8094
|
+
{
|
|
8095
|
+
form,
|
|
8096
|
+
onSubmit: async (values2) => {
|
|
8097
|
+
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
8098
|
+
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
8099
|
+
}));
|
|
8100
|
+
},
|
|
8101
|
+
children: [
|
|
8102
|
+
/* @__PURE__ */ jsx74(
|
|
8103
|
+
MyTextInput,
|
|
8104
|
+
__spreadValues({
|
|
8105
|
+
withAsterisk: true,
|
|
8106
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
8107
|
+
}, form.getInputProps("decisionCode"))
|
|
8108
|
+
),
|
|
8109
|
+
/* @__PURE__ */ jsx74(
|
|
8110
|
+
MyDateInput,
|
|
8111
|
+
__spreadValues({
|
|
8112
|
+
withAsterisk: true,
|
|
8113
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
8114
|
+
}, form.getInputProps("promulgateDate"))
|
|
8115
|
+
),
|
|
8116
|
+
/* @__PURE__ */ jsx74(
|
|
8117
|
+
MyTextInput,
|
|
8118
|
+
__spreadValues({
|
|
8119
|
+
withAsterisk: true,
|
|
8120
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
8121
|
+
}, form.getInputProps("name"))
|
|
8122
|
+
),
|
|
8123
|
+
/* @__PURE__ */ jsx74(
|
|
8124
|
+
F_core18256_Select,
|
|
8125
|
+
__spreadValues({
|
|
8126
|
+
withAsterisk: true,
|
|
8127
|
+
label: "Lo\u1EA1i v\u0103n b\u1EA3n",
|
|
8128
|
+
documentTypeId: RegulationsTypeId
|
|
8129
|
+
}, form.getInputProps("documentAttributeId"))
|
|
8130
|
+
),
|
|
8131
|
+
/* @__PURE__ */ jsx74(
|
|
8132
|
+
MyFileInput,
|
|
8133
|
+
__spreadValues({
|
|
8134
|
+
withAsterisk: true,
|
|
8135
|
+
label: "V\u0103n b\u1EA3n"
|
|
8136
|
+
}, form.getInputProps("file"))
|
|
8137
|
+
),
|
|
8138
|
+
/* @__PURE__ */ jsx74(
|
|
8139
|
+
MyNumberInput,
|
|
8140
|
+
__spreadValues({
|
|
8141
|
+
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
|
8142
|
+
}, form.getInputProps("orderBy"))
|
|
8143
|
+
)
|
|
8144
|
+
]
|
|
8145
|
+
}
|
|
8146
|
+
);
|
|
7811
8147
|
}
|
|
7812
8148
|
|
|
7813
8149
|
// src/modules-features/admin/core/core26965/F_core26965_Read.tsx
|
|
7814
8150
|
import { jsx as jsx75, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7815
|
-
function F_core26965_Read({
|
|
8151
|
+
function F_core26965_Read({
|
|
8152
|
+
RegulationsTypeId
|
|
8153
|
+
}) {
|
|
7816
8154
|
var _a, _b, _c;
|
|
7817
8155
|
const documentAttributeQuery = useQuery7({
|
|
7818
8156
|
queryKey: ["F_core26965_Read", RegulationsTypeId],
|
|
7819
8157
|
queryFn: async () => {
|
|
7820
8158
|
var _a2;
|
|
7821
|
-
const result = await baseAxios_default.get("/DocumentAttribute/GetByType?", {
|
|
8159
|
+
const result = await baseAxios_default.get("/DocumentAttribute/GetByType?", {
|
|
8160
|
+
params: { documentType: RegulationsTypeId }
|
|
8161
|
+
});
|
|
7822
8162
|
return ((_a2 = result.data) == null ? void 0 : _a2.data) || [];
|
|
7823
8163
|
}
|
|
7824
8164
|
});
|
|
7825
8165
|
if (documentAttributeQuery.isLoading) return "Loading...";
|
|
7826
8166
|
if (documentAttributeQuery.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
7827
|
-
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
8167
|
+
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
|
8168
|
+
return /* @__PURE__ */ jsx75(Blockquote2, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
|
8169
|
+
return /* @__PURE__ */ jsx75(MyFlexColumn, { children: /* @__PURE__ */ jsx75(
|
|
8170
|
+
Accordion2,
|
|
8171
|
+
{
|
|
8172
|
+
variant: "contained",
|
|
8173
|
+
defaultValue: (_b = documentAttributeQuery.data) == null ? void 0 : _b.map(
|
|
8174
|
+
(item) => {
|
|
8175
|
+
var _a2;
|
|
8176
|
+
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
|
8177
|
+
}
|
|
8178
|
+
),
|
|
8179
|
+
multiple: true,
|
|
8180
|
+
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx75(
|
|
8181
|
+
SubRead2,
|
|
8182
|
+
{
|
|
8183
|
+
name: item.name,
|
|
8184
|
+
documentType: item.id,
|
|
8185
|
+
RegulationsTypeId
|
|
8186
|
+
},
|
|
8187
|
+
idx
|
|
8188
|
+
))
|
|
8189
|
+
}
|
|
8190
|
+
) });
|
|
7832
8191
|
}
|
|
7833
|
-
function SubRead2({
|
|
8192
|
+
function SubRead2({
|
|
8193
|
+
name,
|
|
8194
|
+
documentType,
|
|
8195
|
+
RegulationsTypeId
|
|
8196
|
+
}) {
|
|
7834
8197
|
const documentQuery = useQuery7({
|
|
7835
8198
|
queryKey: ["SubRead" + documentType],
|
|
7836
8199
|
queryFn: async () => {
|
|
7837
|
-
const result = await baseAxios_default.get(
|
|
8200
|
+
const result = await baseAxios_default.get(
|
|
8201
|
+
`/Document/GetByDocumentAttribute?id=${documentType}`
|
|
8202
|
+
);
|
|
7838
8203
|
return result.data.data;
|
|
7839
8204
|
}
|
|
7840
8205
|
});
|
|
@@ -7871,8 +8236,20 @@ function SubRead2({ name, documentType, RegulationsTypeId }) {
|
|
|
7871
8236
|
columns,
|
|
7872
8237
|
data: documentQuery.data,
|
|
7873
8238
|
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs44(MyCenterFull, { children: [
|
|
7874
|
-
/* @__PURE__ */ jsx75(
|
|
7875
|
-
|
|
8239
|
+
/* @__PURE__ */ jsx75(
|
|
8240
|
+
F_core26965_Update,
|
|
8241
|
+
{
|
|
8242
|
+
RegulationsTypeId,
|
|
8243
|
+
values: row.original
|
|
8244
|
+
}
|
|
8245
|
+
),
|
|
8246
|
+
/* @__PURE__ */ jsx75(
|
|
8247
|
+
F_core26965_Delete,
|
|
8248
|
+
{
|
|
8249
|
+
id: row.original.id,
|
|
8250
|
+
contextData: row.original.decisionCode
|
|
8251
|
+
}
|
|
8252
|
+
)
|
|
7876
8253
|
] })
|
|
7877
8254
|
}
|
|
7878
8255
|
) })
|
|
@@ -7893,26 +8270,76 @@ function F_core26965({ RegulationsTypeId }) {
|
|
|
7893
8270
|
// src/modules-features/admin/core/core27311/F_core27311_Create.tsx
|
|
7894
8271
|
import { useForm as useForm9 } from "@mantine/form";
|
|
7895
8272
|
import { jsx as jsx77, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7896
|
-
function F_core27311_Create({
|
|
8273
|
+
function F_core27311_Create({
|
|
8274
|
+
WorkflowTypeId
|
|
8275
|
+
}) {
|
|
7897
8276
|
const form = useForm9({
|
|
7898
|
-
mode: "uncontrolled"
|
|
8277
|
+
mode: "uncontrolled",
|
|
8278
|
+
validate: {
|
|
8279
|
+
decisionCode: (value) => value ? null : "S\u1ED1 quy \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8280
|
+
promulgateDate: (value) => value ? null : "Ng\xE0y ban h\xE0nh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8281
|
+
name: (value) => value ? null : "T\xEAn t\xE0i li\u1EC7u kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8282
|
+
documentAttributeId: (value) => value ? null : "Lo\u1EA1i v\u0103n b\u1EA3n kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8283
|
+
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
8284
|
+
}
|
|
7899
8285
|
});
|
|
7900
|
-
return /* @__PURE__ */ jsxs46(
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
8286
|
+
return /* @__PURE__ */ jsxs46(
|
|
8287
|
+
MyButtonCreate,
|
|
8288
|
+
{
|
|
8289
|
+
objectName: "V\u0103n b\u1EA3n quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c",
|
|
8290
|
+
form,
|
|
8291
|
+
onSubmit: async (values) => {
|
|
8292
|
+
return await baseAxios_default.post("/Document/create", __spreadProps(__spreadValues({}, values), {
|
|
8293
|
+
DocumentType: WorkflowTypeId,
|
|
8294
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
8295
|
+
}));
|
|
8296
|
+
},
|
|
8297
|
+
children: [
|
|
8298
|
+
/* @__PURE__ */ jsx77(
|
|
8299
|
+
MyTextInput,
|
|
8300
|
+
__spreadValues({
|
|
8301
|
+
withAsterisk: true,
|
|
8302
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
8303
|
+
}, form.getInputProps("decisionCode"))
|
|
8304
|
+
),
|
|
8305
|
+
/* @__PURE__ */ jsx77(
|
|
8306
|
+
MyDateInput,
|
|
8307
|
+
__spreadValues({
|
|
8308
|
+
withAsterisk: true,
|
|
8309
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
8310
|
+
}, form.getInputProps("promulgateDate"))
|
|
8311
|
+
),
|
|
8312
|
+
/* @__PURE__ */ jsx77(
|
|
8313
|
+
MyTextInput,
|
|
8314
|
+
__spreadValues({
|
|
8315
|
+
withAsterisk: true,
|
|
8316
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
8317
|
+
}, form.getInputProps("name"))
|
|
8318
|
+
),
|
|
8319
|
+
/* @__PURE__ */ jsx77(
|
|
8320
|
+
F_core18256_Select,
|
|
8321
|
+
__spreadValues({
|
|
8322
|
+
withAsterisk: true,
|
|
8323
|
+
label: "Lo\u1EA1i v\u0103n b\u1EA3n",
|
|
8324
|
+
documentTypeId: WorkflowTypeId
|
|
8325
|
+
}, form.getInputProps("documentAttributeId"))
|
|
8326
|
+
),
|
|
8327
|
+
/* @__PURE__ */ jsx77(
|
|
8328
|
+
MyFileInput,
|
|
8329
|
+
__spreadValues({
|
|
8330
|
+
withAsterisk: true,
|
|
8331
|
+
label: "V\u0103n b\u1EA3n"
|
|
8332
|
+
}, form.getInputProps("file"))
|
|
8333
|
+
),
|
|
8334
|
+
/* @__PURE__ */ jsx77(
|
|
8335
|
+
MyNumberInput,
|
|
8336
|
+
__spreadValues({
|
|
8337
|
+
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
|
8338
|
+
}, form.getInputProps("orderBy"))
|
|
8339
|
+
)
|
|
8340
|
+
]
|
|
8341
|
+
}
|
|
8342
|
+
);
|
|
7916
8343
|
}
|
|
7917
8344
|
|
|
7918
8345
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
|
@@ -7922,60 +8349,154 @@ import { useMemo as useMemo7 } from "react";
|
|
|
7922
8349
|
|
|
7923
8350
|
// src/modules-features/admin/core/core27311/F_core27311_Delete.tsx
|
|
7924
8351
|
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
7925
|
-
function F_core27311_Delete({
|
|
7926
|
-
|
|
8352
|
+
function F_core27311_Delete({
|
|
8353
|
+
id,
|
|
8354
|
+
contextData
|
|
8355
|
+
}) {
|
|
8356
|
+
return /* @__PURE__ */ jsx78(
|
|
8357
|
+
MyActionIconDelete,
|
|
8358
|
+
{
|
|
8359
|
+
contextData,
|
|
8360
|
+
onSubmit: async () => await baseAxios_default.post("/Document/delete", { id })
|
|
8361
|
+
}
|
|
8362
|
+
);
|
|
7927
8363
|
}
|
|
7928
8364
|
|
|
7929
8365
|
// src/modules-features/admin/core/core27311/F_core27311_Update.tsx
|
|
7930
8366
|
import { useForm as useForm10 } from "@mantine/form";
|
|
7931
8367
|
import { jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7932
|
-
function F_core27311_Update({
|
|
8368
|
+
function F_core27311_Update({
|
|
8369
|
+
values,
|
|
8370
|
+
WorkflowTypeId
|
|
8371
|
+
}) {
|
|
7933
8372
|
var _a;
|
|
7934
8373
|
const form = useForm10({
|
|
7935
8374
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
7936
|
-
file: new File(
|
|
8375
|
+
file: new File(
|
|
8376
|
+
[],
|
|
8377
|
+
(_a = values.path) == null ? void 0 : _a.split("/")[values.path.split("/").length - 1]
|
|
8378
|
+
),
|
|
7937
8379
|
promulgateDate: new Date(values.promulgateDate)
|
|
7938
|
-
})
|
|
8380
|
+
}),
|
|
8381
|
+
validate: {
|
|
8382
|
+
decisionCode: (value) => value ? null : "S\u1ED1 quy \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8383
|
+
promulgateDate: (value) => value ? null : "Ng\xE0y ban h\xE0nh kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8384
|
+
name: (value) => value ? null : "T\xEAn t\xE0i li\u1EC7u kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8385
|
+
documentAttributeId: (value) => value ? null : "Lo\u1EA1i v\u0103n b\u1EA3n kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
8386
|
+
file: (value) => value ? null : "T\u1EC7p \u0111\xEDnh k\xE8m kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
8387
|
+
}
|
|
7939
8388
|
});
|
|
7940
|
-
return /* @__PURE__ */ jsxs47(
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
8389
|
+
return /* @__PURE__ */ jsxs47(
|
|
8390
|
+
MyActionIconUpdate,
|
|
8391
|
+
{
|
|
8392
|
+
form,
|
|
8393
|
+
onSubmit: async (values2) => {
|
|
8394
|
+
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
8395
|
+
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
8396
|
+
}));
|
|
8397
|
+
},
|
|
8398
|
+
children: [
|
|
8399
|
+
/* @__PURE__ */ jsx79(
|
|
8400
|
+
MyTextInput,
|
|
8401
|
+
__spreadValues({
|
|
8402
|
+
withAsterisk: true,
|
|
8403
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
8404
|
+
}, form.getInputProps("decisionCode"))
|
|
8405
|
+
),
|
|
8406
|
+
/* @__PURE__ */ jsx79(
|
|
8407
|
+
MyDateInput,
|
|
8408
|
+
__spreadValues({
|
|
8409
|
+
withAsterisk: true,
|
|
8410
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
8411
|
+
}, form.getInputProps("promulgateDate"))
|
|
8412
|
+
),
|
|
8413
|
+
/* @__PURE__ */ jsx79(
|
|
8414
|
+
MyTextInput,
|
|
8415
|
+
__spreadValues({
|
|
8416
|
+
withAsterisk: true,
|
|
8417
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
8418
|
+
}, form.getInputProps("name"))
|
|
8419
|
+
),
|
|
8420
|
+
/* @__PURE__ */ jsx79(
|
|
8421
|
+
F_core18256_Select,
|
|
8422
|
+
__spreadValues({
|
|
8423
|
+
withAsterisk: true,
|
|
8424
|
+
label: "Lo\u1EA1i v\u0103n b\u1EA3n",
|
|
8425
|
+
documentTypeId: WorkflowTypeId
|
|
8426
|
+
}, form.getInputProps("documentAttributeId"))
|
|
8427
|
+
),
|
|
8428
|
+
/* @__PURE__ */ jsx79(
|
|
8429
|
+
MyFileInput,
|
|
8430
|
+
__spreadValues({
|
|
8431
|
+
withAsterisk: true,
|
|
8432
|
+
label: "V\u0103n b\u1EA3n"
|
|
8433
|
+
}, form.getInputProps("file"))
|
|
8434
|
+
),
|
|
8435
|
+
/* @__PURE__ */ jsx79(
|
|
8436
|
+
MyNumberInput,
|
|
8437
|
+
__spreadValues({
|
|
8438
|
+
label: "Th\u1EE9 t\u1EF1 hi\u1EC3n th\u1ECB tr\xEAn danh s\xE1ch"
|
|
8439
|
+
}, form.getInputProps("orderBy"))
|
|
8440
|
+
)
|
|
8441
|
+
]
|
|
8442
|
+
}
|
|
8443
|
+
);
|
|
7952
8444
|
}
|
|
7953
8445
|
|
|
7954
8446
|
// src/modules-features/admin/core/core27311/F_core27311_Read.tsx
|
|
7955
8447
|
import { jsx as jsx80, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7956
|
-
function F_core27311_Read({
|
|
8448
|
+
function F_core27311_Read({
|
|
8449
|
+
WorkflowTypeId
|
|
8450
|
+
}) {
|
|
7957
8451
|
var _a, _b, _c;
|
|
7958
8452
|
const documentAttributeQuery = useQuery8({
|
|
7959
8453
|
queryKey: ["F_core27311_Read", WorkflowTypeId],
|
|
7960
8454
|
queryFn: async () => {
|
|
7961
8455
|
var _a2;
|
|
7962
|
-
const result = await baseAxios_default.get("/DocumentAttribute/GetByType?", {
|
|
8456
|
+
const result = await baseAxios_default.get("/DocumentAttribute/GetByType?", {
|
|
8457
|
+
params: { documentType: WorkflowTypeId }
|
|
8458
|
+
});
|
|
7963
8459
|
return ((_a2 = result.data) == null ? void 0 : _a2.data) || [];
|
|
7964
8460
|
}
|
|
7965
8461
|
});
|
|
7966
8462
|
if (documentAttributeQuery.isLoading) return "Loading...";
|
|
7967
8463
|
if (documentAttributeQuery.isError) return "c\xF3 l\u1ED7i x\u1EA3y ra!";
|
|
7968
|
-
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
8464
|
+
if (((_a = documentAttributeQuery.data) == null ? void 0 : _a.length) == 0)
|
|
8465
|
+
return /* @__PURE__ */ jsx80(Blockquote3, { color: "yellow", children: "Ch\u01B0a c\xF3 lo\u1EA1i v\u0103n b\u1EA3n" });
|
|
8466
|
+
return /* @__PURE__ */ jsx80(MyFlexColumn, { children: /* @__PURE__ */ jsx80(
|
|
8467
|
+
Accordion3,
|
|
8468
|
+
{
|
|
8469
|
+
variant: "contained",
|
|
8470
|
+
defaultValue: (_b = documentAttributeQuery.data) == null ? void 0 : _b.map(
|
|
8471
|
+
(item) => {
|
|
8472
|
+
var _a2;
|
|
8473
|
+
return (_a2 = item.id) == null ? void 0 : _a2.toString();
|
|
8474
|
+
}
|
|
8475
|
+
),
|
|
8476
|
+
multiple: true,
|
|
8477
|
+
children: (_c = documentAttributeQuery.data) == null ? void 0 : _c.map((item, idx) => /* @__PURE__ */ jsx80(
|
|
8478
|
+
SubRead3,
|
|
8479
|
+
{
|
|
8480
|
+
name: item.name,
|
|
8481
|
+
documentType: item.id,
|
|
8482
|
+
WorkflowTypeId
|
|
8483
|
+
},
|
|
8484
|
+
idx
|
|
8485
|
+
))
|
|
8486
|
+
}
|
|
8487
|
+
) });
|
|
7973
8488
|
}
|
|
7974
|
-
function SubRead3({
|
|
8489
|
+
function SubRead3({
|
|
8490
|
+
name,
|
|
8491
|
+
documentType,
|
|
8492
|
+
WorkflowTypeId
|
|
8493
|
+
}) {
|
|
7975
8494
|
const documentQuery = useQuery8({
|
|
7976
8495
|
queryKey: ["SubRead" + documentType],
|
|
7977
8496
|
queryFn: async () => {
|
|
7978
|
-
const result = await baseAxios_default.get(
|
|
8497
|
+
const result = await baseAxios_default.get(
|
|
8498
|
+
`/Document/GetByDocumentAttribute?id=${documentType}`
|
|
8499
|
+
);
|
|
7979
8500
|
return result.data.data;
|
|
7980
8501
|
}
|
|
7981
8502
|
});
|
|
@@ -8012,8 +8533,20 @@ function SubRead3({ name, documentType, WorkflowTypeId }) {
|
|
|
8012
8533
|
columns,
|
|
8013
8534
|
data: documentQuery.data,
|
|
8014
8535
|
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs48(MyCenterFull, { children: [
|
|
8015
|
-
/* @__PURE__ */ jsx80(
|
|
8016
|
-
|
|
8536
|
+
/* @__PURE__ */ jsx80(
|
|
8537
|
+
F_core27311_Update,
|
|
8538
|
+
{
|
|
8539
|
+
WorkflowTypeId,
|
|
8540
|
+
values: row.original
|
|
8541
|
+
}
|
|
8542
|
+
),
|
|
8543
|
+
/* @__PURE__ */ jsx80(
|
|
8544
|
+
F_core27311_Delete,
|
|
8545
|
+
{
|
|
8546
|
+
id: row.original.id,
|
|
8547
|
+
contextData: row.original.decisionCode
|
|
8548
|
+
}
|
|
8549
|
+
)
|
|
8017
8550
|
] })
|
|
8018
8551
|
}
|
|
8019
8552
|
) })
|
|
@@ -8488,28 +9021,66 @@ import { useForm as useForm11 } from "@mantine/form";
|
|
|
8488
9021
|
import { jsx as jsx87, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
8489
9022
|
function F_core40207_Create() {
|
|
8490
9023
|
const form = useForm11({
|
|
8491
|
-
mode: "uncontrolled"
|
|
9024
|
+
mode: "uncontrolled",
|
|
9025
|
+
validate: {
|
|
9026
|
+
code: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9027
|
+
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9028
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9029
|
+
}
|
|
8492
9030
|
});
|
|
8493
|
-
return /* @__PURE__ */ jsxs53(
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
9031
|
+
return /* @__PURE__ */ jsxs53(
|
|
9032
|
+
MyButtonCreate,
|
|
9033
|
+
{
|
|
9034
|
+
objectName: "v\u0103n b\u1EA3n",
|
|
9035
|
+
form,
|
|
9036
|
+
onSubmit: async (values) => {
|
|
9037
|
+
return await baseAxios_default.post("/Document/create", __spreadProps(__spreadValues({}, values), {
|
|
9038
|
+
DocumentType: OBJECT_DOCUMENT_TYPES.Guideline,
|
|
9039
|
+
//1.4 Thông tin xây dựng, cải tiến, bảo trì hệ thống
|
|
9040
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
9041
|
+
}));
|
|
9042
|
+
},
|
|
9043
|
+
children: [
|
|
9044
|
+
/* @__PURE__ */ jsx87(
|
|
9045
|
+
MyTextInput,
|
|
9046
|
+
__spreadValues({
|
|
9047
|
+
withAsterisk: true,
|
|
9048
|
+
label: "M\xE3 t\xE0i li\u1EC7u"
|
|
9049
|
+
}, form.getInputProps("code"))
|
|
9050
|
+
),
|
|
9051
|
+
/* @__PURE__ */ jsx87(
|
|
9052
|
+
MyTextInput,
|
|
9053
|
+
__spreadValues({
|
|
9054
|
+
withAsterisk: true,
|
|
9055
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
9056
|
+
}, form.getInputProps("name"))
|
|
9057
|
+
),
|
|
9058
|
+
/* @__PURE__ */ jsx87(
|
|
9059
|
+
FileInput6,
|
|
9060
|
+
__spreadValues({
|
|
9061
|
+
withAsterisk: true,
|
|
9062
|
+
label: "T\xE0i li\u1EC7u",
|
|
9063
|
+
placeholder: "T\u1EA3i l\xEAn t\xE0i li\u1EC7u"
|
|
9064
|
+
}, form.getInputProps("file"))
|
|
9065
|
+
)
|
|
9066
|
+
]
|
|
9067
|
+
}
|
|
9068
|
+
);
|
|
8507
9069
|
}
|
|
8508
9070
|
|
|
8509
9071
|
// src/modules-features/admin/core/core40207/F_core40207_Delete.tsx
|
|
8510
9072
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
8511
|
-
function F_core40207_Delete({
|
|
8512
|
-
|
|
9073
|
+
function F_core40207_Delete({
|
|
9074
|
+
id,
|
|
9075
|
+
contextData
|
|
9076
|
+
}) {
|
|
9077
|
+
return /* @__PURE__ */ jsx88(
|
|
9078
|
+
MyActionIconDelete,
|
|
9079
|
+
{
|
|
9080
|
+
contextData,
|
|
9081
|
+
onSubmit: () => baseAxios_default.post("/Document/delete", { id })
|
|
9082
|
+
}
|
|
9083
|
+
);
|
|
8513
9084
|
}
|
|
8514
9085
|
|
|
8515
9086
|
// src/modules-features/admin/core/core40207/F_core40207_Update.tsx
|
|
@@ -8521,19 +9092,52 @@ function F_core40207_Update({ values }) {
|
|
|
8521
9092
|
const form = useForm12({
|
|
8522
9093
|
mode: "uncontrolled",
|
|
8523
9094
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
8524
|
-
file: new File(
|
|
8525
|
-
|
|
8526
|
-
|
|
9095
|
+
file: new File(
|
|
9096
|
+
[],
|
|
9097
|
+
(_a = values.path) == null ? void 0 : _a.split("/")[values.path.split("/").length - 1]
|
|
9098
|
+
)
|
|
9099
|
+
}),
|
|
9100
|
+
validate: {
|
|
9101
|
+
code: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9102
|
+
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9103
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9104
|
+
}
|
|
8527
9105
|
});
|
|
8528
|
-
return /* @__PURE__ */ jsxs54(
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
9106
|
+
return /* @__PURE__ */ jsxs54(
|
|
9107
|
+
MyActionIconUpdate,
|
|
9108
|
+
{
|
|
9109
|
+
form,
|
|
9110
|
+
onSubmit: async (values2) => {
|
|
9111
|
+
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
9112
|
+
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
9113
|
+
}));
|
|
9114
|
+
},
|
|
9115
|
+
children: [
|
|
9116
|
+
/* @__PURE__ */ jsx89(
|
|
9117
|
+
MyTextInput,
|
|
9118
|
+
__spreadValues({
|
|
9119
|
+
withAsterisk: true,
|
|
9120
|
+
label: "M\xE3 t\xE0i li\u1EC7u"
|
|
9121
|
+
}, form.getInputProps("code"))
|
|
9122
|
+
),
|
|
9123
|
+
/* @__PURE__ */ jsx89(
|
|
9124
|
+
MyTextInput,
|
|
9125
|
+
__spreadValues({
|
|
9126
|
+
withAsterisk: true,
|
|
9127
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
9128
|
+
}, form.getInputProps("name"))
|
|
9129
|
+
),
|
|
9130
|
+
/* @__PURE__ */ jsx89(
|
|
9131
|
+
FileInput7,
|
|
9132
|
+
__spreadValues({
|
|
9133
|
+
withAsterisk: true,
|
|
9134
|
+
label: "T\xE0i li\u1EC7u",
|
|
9135
|
+
placeholder: "T\u1EA3i l\xEAn t\xE0i li\u1EC7u"
|
|
9136
|
+
}, form.getInputProps("file"))
|
|
9137
|
+
)
|
|
9138
|
+
]
|
|
9139
|
+
}
|
|
9140
|
+
);
|
|
8537
9141
|
}
|
|
8538
9142
|
|
|
8539
9143
|
// src/modules-features/admin/core/core40207/F_core40207_Read.tsx
|
|
@@ -8543,7 +9147,9 @@ function F_core40207_Read({ GuidelineTypeId }) {
|
|
|
8543
9147
|
queryKey: ["F_core40207_Read"],
|
|
8544
9148
|
queryFn: async () => {
|
|
8545
9149
|
var _a;
|
|
8546
|
-
const result = await baseAxios_default.get(
|
|
9150
|
+
const result = await baseAxios_default.get(
|
|
9151
|
+
`/Document/GetByType?documentType=${GuidelineTypeId}`
|
|
9152
|
+
);
|
|
8547
9153
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
|
8548
9154
|
}
|
|
8549
9155
|
});
|
|
@@ -8577,7 +9183,13 @@ function F_core40207_Read({ GuidelineTypeId }) {
|
|
|
8577
9183
|
renderRowActions: ({ row }) => {
|
|
8578
9184
|
return /* @__PURE__ */ jsxs55(MyCenterFull, { children: [
|
|
8579
9185
|
/* @__PURE__ */ jsx90(F_core40207_Update, { values: row.original }),
|
|
8580
|
-
/* @__PURE__ */ jsx90(
|
|
9186
|
+
/* @__PURE__ */ jsx90(
|
|
9187
|
+
F_core40207_Delete,
|
|
9188
|
+
{
|
|
9189
|
+
id: row.original.id,
|
|
9190
|
+
contextData: row.original.code
|
|
9191
|
+
}
|
|
9192
|
+
)
|
|
8581
9193
|
] });
|
|
8582
9194
|
}
|
|
8583
9195
|
}
|
|
@@ -8586,8 +9198,8 @@ function F_core40207_Read({ GuidelineTypeId }) {
|
|
|
8586
9198
|
|
|
8587
9199
|
// src/modules-features/admin/core/core40207/F_core40207.tsx
|
|
8588
9200
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
8589
|
-
function F_core40207() {
|
|
8590
|
-
return /* @__PURE__ */ jsx91(F_core40207_Read, { GuidelineTypeId
|
|
9201
|
+
function F_core40207({ GuidelineTypeId }) {
|
|
9202
|
+
return /* @__PURE__ */ jsx91(F_core40207_Read, { GuidelineTypeId });
|
|
8591
9203
|
}
|
|
8592
9204
|
|
|
8593
9205
|
// src/modules-features/admin/core/core47643/F_core47643_Read.tsx
|
|
@@ -9155,29 +9767,74 @@ import { useForm as useForm17 } from "@mantine/form";
|
|
|
9155
9767
|
import { jsx as jsx106, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9156
9768
|
function F_core76318_Create() {
|
|
9157
9769
|
const form = useForm17({
|
|
9158
|
-
mode: "uncontrolled"
|
|
9770
|
+
mode: "uncontrolled",
|
|
9771
|
+
validate: {
|
|
9772
|
+
decisionCode: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9773
|
+
promulgateDate: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9774
|
+
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9775
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9776
|
+
}
|
|
9159
9777
|
});
|
|
9160
|
-
return /* @__PURE__ */ jsxs64(
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9778
|
+
return /* @__PURE__ */ jsxs64(
|
|
9779
|
+
MyButtonCreate,
|
|
9780
|
+
{
|
|
9781
|
+
objectName: "v\u0103n b\u1EA3n",
|
|
9782
|
+
form,
|
|
9783
|
+
onSubmit: async (values) => {
|
|
9784
|
+
return await baseAxios_default.post("/Document/create", __spreadProps(__spreadValues({}, values), {
|
|
9785
|
+
DocumentType: OBJECT_DOCUMENT_TYPES.Security,
|
|
9786
|
+
//1.4 Thông tin xây dựng, cải tiến, bảo trì hệ thống
|
|
9787
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file)
|
|
9788
|
+
}));
|
|
9789
|
+
},
|
|
9790
|
+
children: [
|
|
9791
|
+
/* @__PURE__ */ jsx106(
|
|
9792
|
+
MyTextInput,
|
|
9793
|
+
__spreadValues({
|
|
9794
|
+
withAsterisk: true,
|
|
9795
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
9796
|
+
}, form.getInputProps("decisionCode"))
|
|
9797
|
+
),
|
|
9798
|
+
/* @__PURE__ */ jsx106(
|
|
9799
|
+
MyDateInput,
|
|
9800
|
+
__spreadValues({
|
|
9801
|
+
withAsterisk: true,
|
|
9802
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
9803
|
+
}, form.getInputProps("promulgateDate"))
|
|
9804
|
+
),
|
|
9805
|
+
/* @__PURE__ */ jsx106(
|
|
9806
|
+
MyTextInput,
|
|
9807
|
+
__spreadValues({
|
|
9808
|
+
withAsterisk: true,
|
|
9809
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
9810
|
+
}, form.getInputProps("name"))
|
|
9811
|
+
),
|
|
9812
|
+
/* @__PURE__ */ jsx106(
|
|
9813
|
+
FileInput8,
|
|
9814
|
+
__spreadValues({
|
|
9815
|
+
withAsterisk: true,
|
|
9816
|
+
placeholder: "T\u1EA3i l\xEAn t\xE0i li\u1EC7u",
|
|
9817
|
+
label: "T\xE0i li\u1EC7u"
|
|
9818
|
+
}, form.getInputProps("file"))
|
|
9819
|
+
)
|
|
9820
|
+
]
|
|
9821
|
+
}
|
|
9822
|
+
);
|
|
9175
9823
|
}
|
|
9176
9824
|
|
|
9177
9825
|
// src/modules-features/admin/core/core76318/F_core76318_Delete.tsx
|
|
9178
9826
|
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
9179
|
-
function F_core76318_Delete({
|
|
9180
|
-
|
|
9827
|
+
function F_core76318_Delete({
|
|
9828
|
+
id,
|
|
9829
|
+
contextData
|
|
9830
|
+
}) {
|
|
9831
|
+
return /* @__PURE__ */ jsx107(
|
|
9832
|
+
MyActionIconDelete,
|
|
9833
|
+
{
|
|
9834
|
+
contextData,
|
|
9835
|
+
onSubmit: () => baseAxios_default.post("/Document/delete", { id })
|
|
9836
|
+
}
|
|
9837
|
+
);
|
|
9181
9838
|
}
|
|
9182
9839
|
|
|
9183
9840
|
// src/modules-features/admin/core/core76318/F_core76318_Update.tsx
|
|
@@ -9189,20 +9846,60 @@ function F_core76318_Update({ values }) {
|
|
|
9189
9846
|
const form = useForm18({
|
|
9190
9847
|
mode: "uncontrolled",
|
|
9191
9848
|
initialValues: __spreadProps(__spreadValues({}, values), {
|
|
9192
|
-
file: new File(
|
|
9849
|
+
file: new File(
|
|
9850
|
+
[],
|
|
9851
|
+
(_a = values.path) == null ? void 0 : _a.split("/")[values.path.split("/").length - 1]
|
|
9852
|
+
),
|
|
9193
9853
|
promulgateDate: new Date(values.promulgateDate)
|
|
9194
|
-
})
|
|
9854
|
+
}),
|
|
9855
|
+
validate: {
|
|
9856
|
+
decisionCode: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9857
|
+
promulgateDate: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9858
|
+
name: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng",
|
|
9859
|
+
file: (value) => value ? null : "Kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 tr\u1ED1ng"
|
|
9860
|
+
}
|
|
9195
9861
|
});
|
|
9196
|
-
return /* @__PURE__ */ jsxs65(
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9862
|
+
return /* @__PURE__ */ jsxs65(
|
|
9863
|
+
MyActionIconUpdate,
|
|
9864
|
+
{
|
|
9865
|
+
form,
|
|
9866
|
+
onSubmit: async (values2) => {
|
|
9867
|
+
return await baseAxios_default.post("/Document/Update", __spreadProps(__spreadValues({}, values2), {
|
|
9868
|
+
fileDetail: await utils_file_fileToAQDocumentType(values2.file)
|
|
9869
|
+
}));
|
|
9870
|
+
},
|
|
9871
|
+
children: [
|
|
9872
|
+
/* @__PURE__ */ jsx108(
|
|
9873
|
+
TextInput5,
|
|
9874
|
+
__spreadValues({
|
|
9875
|
+
withAsterisk: true,
|
|
9876
|
+
label: "S\u1ED1 quy \u0111\u1ECBnh"
|
|
9877
|
+
}, form.getInputProps("decisionCode"))
|
|
9878
|
+
),
|
|
9879
|
+
/* @__PURE__ */ jsx108(
|
|
9880
|
+
MyDateInput,
|
|
9881
|
+
__spreadValues({
|
|
9882
|
+
withAsterisk: true,
|
|
9883
|
+
label: "Ng\xE0y ban h\xE0nh"
|
|
9884
|
+
}, form.getInputProps("promulgateDate"))
|
|
9885
|
+
),
|
|
9886
|
+
/* @__PURE__ */ jsx108(
|
|
9887
|
+
TextInput5,
|
|
9888
|
+
__spreadValues({
|
|
9889
|
+
withAsterisk: true,
|
|
9890
|
+
label: "T\xEAn t\xE0i li\u1EC7u"
|
|
9891
|
+
}, form.getInputProps("name"))
|
|
9892
|
+
),
|
|
9893
|
+
/* @__PURE__ */ jsx108(
|
|
9894
|
+
FileInput9,
|
|
9895
|
+
__spreadValues({
|
|
9896
|
+
withAsterisk: true,
|
|
9897
|
+
label: "Ch\u1ECDn file"
|
|
9898
|
+
}, form.getInputProps("file"))
|
|
9899
|
+
)
|
|
9900
|
+
]
|
|
9901
|
+
}
|
|
9902
|
+
);
|
|
9206
9903
|
}
|
|
9207
9904
|
|
|
9208
9905
|
// src/modules-features/admin/core/core76318/F_core76318_Read.tsx
|
|
@@ -9212,7 +9909,9 @@ function F_core76318_Read({ SecurityTypeId }) {
|
|
|
9212
9909
|
queryKey: ["F_core76318_Read"],
|
|
9213
9910
|
queryFn: async () => {
|
|
9214
9911
|
var _a;
|
|
9215
|
-
const result = await baseAxios_default.get(
|
|
9912
|
+
const result = await baseAxios_default.get(
|
|
9913
|
+
`/Document/GetByType?documentType=${SecurityTypeId}`
|
|
9914
|
+
);
|
|
9216
9915
|
return ((_a = result.data) == null ? void 0 : _a.data) || [];
|
|
9217
9916
|
}
|
|
9218
9917
|
});
|
|
@@ -9248,9 +9947,16 @@ function F_core76318_Read({ SecurityTypeId }) {
|
|
|
9248
9947
|
data: query.data,
|
|
9249
9948
|
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx109(F_core76318_Create, {}),
|
|
9250
9949
|
renderRowActions: ({ row }) => {
|
|
9950
|
+
var _a;
|
|
9251
9951
|
return /* @__PURE__ */ jsxs66(MyCenterFull, { children: [
|
|
9252
9952
|
/* @__PURE__ */ jsx109(F_core76318_Update, { values: row.original }),
|
|
9253
|
-
/* @__PURE__ */ jsx109(
|
|
9953
|
+
/* @__PURE__ */ jsx109(
|
|
9954
|
+
F_core76318_Delete,
|
|
9955
|
+
{
|
|
9956
|
+
id: row.original.id,
|
|
9957
|
+
contextData: (_a = row.original.decisionCode) == null ? void 0 : _a.toString()
|
|
9958
|
+
}
|
|
9959
|
+
)
|
|
9254
9960
|
] });
|
|
9255
9961
|
}
|
|
9256
9962
|
}
|
|
@@ -9259,8 +9965,8 @@ function F_core76318_Read({ SecurityTypeId }) {
|
|
|
9259
9965
|
|
|
9260
9966
|
// src/modules-features/admin/core/core76318/F_core76318.tsx
|
|
9261
9967
|
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
9262
|
-
function F_core76318() {
|
|
9263
|
-
return /* @__PURE__ */ jsx110(F_core76318_Read, { SecurityTypeId
|
|
9968
|
+
function F_core76318({ SecurityTypeId }) {
|
|
9969
|
+
return /* @__PURE__ */ jsx110(F_core76318_Read, { SecurityTypeId });
|
|
9264
9970
|
}
|
|
9265
9971
|
|
|
9266
9972
|
// src/modules-features/admin/core/core83092/F_core83092.tsx
|