aq-fe-framework 0.1.155 → 0.1.156
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/api/apiFactory.ts +46 -0
- package/dist/api/baseAxios.ts +22 -0
- package/dist/app/admin/(core)/core12196/page.tsx +13 -0
- package/dist/app/admin/(core)/core16209/page.tsx +13 -0
- package/dist/app/admin/(core)/core18256/page.tsx +12 -0
- package/dist/app/admin/(core)/core26965/page.tsx +13 -0
- package/dist/app/admin/(core)/core27311/page.tsx +13 -0
- package/dist/app/admin/(core)/core38677/page.tsx +13 -0
- package/dist/app/admin/(core)/core40207/page.tsx +13 -0
- package/dist/app/admin/(core)/core60524/page.tsx +11 -0
- package/dist/app/admin/(core)/core64229/page.tsx +12 -0
- package/dist/app/admin/(core)/core71678/page.tsx +11 -0
- package/dist/app/admin/(core)/core76318/page.tsx +13 -0
- package/dist/app/admin/(core)/core83092/page.tsx +13 -0
- package/dist/app/admin/[...slug]/page.tsx +7 -0
- package/dist/app/admin/error.tsx +42 -0
- package/dist/app/admin/layout.tsx +21 -0
- package/dist/app/admin/test/page.tsx +44 -0
- package/dist/app/auth/login/page.tsx +14 -0
- package/dist/app/globals.css +59 -0
- package/dist/app/layout.tsx +39 -0
- package/dist/app/page.tsx +18 -0
- package/dist/{chunk-PAHZ57DT.mjs → chunk-JLT4BL7I.mjs} +1 -1
- package/dist/components/Aceternity/BoxesBackground/MyBoxes.tsx +66 -0
- package/dist/components/Aceternity/BoxesBackground/MyBoxesBackground.tsx +31 -0
- package/dist/components/ActionIcons/ActionIcon/MyActionIcon.tsx +47 -0
- package/dist/components/ActionIcons/ActionIconCRUD/MyActionIconDelete.tsx +81 -0
- package/dist/components/ActionIcons/ActionIconCRUD/MyActionIconUpdate.tsx +68 -0
- package/dist/components/ActionIcons/ActionIconCheck/MyActionIconCheck.tsx +50 -0
- package/dist/components/ActionIcons/ActionIconDownloadPDF/MyActionIconDownloadPDF.tsx +13 -0
- package/dist/components/ActionIcons/ActionIconModal/MyActionIconModal.tsx +113 -0
- package/dist/components/ActionIcons/ActionIconUpload/MyActionIconUpload.tsx +19 -0
- package/dist/components/ActionIcons/ActionIconViewPdf/MyActionIconViewPDF.tsx +63 -0
- package/dist/components/ActionIcons/SwitchTheme/MySwitchTheme.tsx +36 -0
- package/dist/components/AppSpotlight/MyAppSpotlight.tsx +112 -0
- package/dist/components/Buttons/Anchor/MyAnchorViewPDF.tsx +46 -0
- package/dist/components/Buttons/Button/MyButton.tsx +90 -0
- package/dist/components/Buttons/ButtonCRUD/AQButtonCreateByImportFile.tsx +81 -0
- package/dist/components/Buttons/ButtonCRUD/AQButtonExportData.tsx +75 -0
- package/dist/components/Buttons/ButtonCRUD/MyButtonCreate.tsx +68 -0
- package/dist/components/Buttons/ButtonImport/MyButtonImport.tsx +29 -0
- package/dist/components/Buttons/ButtonImport/SelectFieldModal.tsx +100 -0
- package/dist/components/Buttons/ButtonImport/SelectFileModal.tsx +81 -0
- package/dist/components/Buttons/ButtonImport/useS_ButtonImport.ts +196 -0
- package/dist/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx +71 -0
- package/dist/components/Buttons/ButtonModal/MyButtonModal.tsx +117 -0
- package/dist/components/Buttons/ButtonPrintPDF/MyButtonPrintPDF.tsx +37 -0
- package/dist/components/Buttons/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx +174 -0
- package/dist/components/Buttons/ButtonRouterBack/MyButtonRouterBack.tsx +29 -0
- package/dist/components/Buttons/ButtonViewPDF/MyButtonViewPDF.tsx +121 -0
- package/dist/components/Calendar/MyCalendar.tsx +118 -0
- package/dist/components/CenterFull/MyCenterFull.tsx +10 -0
- package/dist/components/Checkbox/MyCheckbox.tsx +9 -0
- package/dist/components/Combobox/Select/MySelect.tsx +12 -0
- package/dist/components/DataDisplay/Card/AQCard.tsx +49 -0
- package/dist/components/DataDisplay/CardInformation/MyCardInformation.tsx +77 -0
- package/dist/components/DataDisplay/DataTable/MyDataTable.tsx +184 -0
- package/dist/components/DataDisplay/IconText/MyIconText.tsx +17 -0
- package/dist/components/DataDisplay/KeyLabel/MyKeyLabel.tsx +15 -0
- package/dist/components/DataDisplay/NumberFormatter/MyNumberFormatter.tsx +9 -0
- package/dist/components/DataDisplay/StatCard/AQStatCard1.tsx +68 -0
- package/dist/components/FaviconSetter/FaviconSetter.tsx +33 -0
- package/dist/components/Inputs/DateInput/MyDateInput.tsx +11 -0
- package/dist/components/Inputs/Fieldset/MyFieldset.tsx +32 -0
- package/dist/components/Inputs/FileInput/MyFileInput.tsx +12 -0
- package/dist/components/Inputs/NumberInput/MyNumberInput.tsx +12 -0
- package/dist/components/Inputs/TextArea/MyTextArea.tsx +11 -0
- package/dist/components/Inputs/TextEditor/MyTextEditor.tsx +191 -0
- package/dist/components/Inputs/TextInput/MyTextInput.tsx +30 -0
- package/dist/components/Layouts/BasicAppShell/BasicAppShell.tsx +357 -0
- package/dist/components/Layouts/BasicAppShell/css.module.css +62 -0
- package/dist/components/Layouts/BasicAppShell/useS_BasicAppShell.ts +64 -0
- package/dist/components/Layouts/Container/MyContainer.tsx +16 -0
- package/dist/components/Layouts/FlexColumn/MyFlexColumn.tsx +14 -0
- package/dist/components/Layouts/FlexEnd/MyFlexEnd.tsx +14 -0
- package/dist/components/Layouts/FlexRow/MyFlexRow.tsx +14 -0
- package/dist/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx +147 -0
- package/dist/components/Layouts/HeaderMegaMenu/HeaderMegaMenuStore.ts +19 -0
- package/dist/components/Layouts/HeaderMegaMenu/css.module.css +50 -0
- package/dist/components/Layouts/HtmlWrapper/MyHtmlWrapper.tsx +29 -0
- package/dist/components/Layouts/PageContent/MyPageContent.tsx +67 -0
- package/dist/components/Layouts/Tab/MyTab.tsx +33 -0
- package/dist/components/Loaders/MyCardioLoader.tsx +12 -0
- package/dist/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx +61 -0
- package/dist/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx +37 -0
- package/dist/components/ScheduleX/MyScheduleX.tsx +58 -0
- package/dist/components/Skeletons/SkeletonTable/MySkeletonTable.tsx +9 -0
- package/dist/components/index.mjs +1 -1
- package/dist/components/index.ts +62 -0
- package/dist/constants/array/daysOfWeek.ts +9 -0
- package/dist/constants/enum/ENUM_EMAILCONFIG.ts +6 -0
- package/dist/constants/enum/global.ts +26 -0
- package/dist/constants/object/color.ts +5 -0
- package/dist/constants/object/documentTypes.ts +8 -0
- package/dist/{components/index.css → css.module-4ICLUKPO.module.css} +29 -16
- package/dist/css.module-P45UW6UZ.module.css +4 -0
- package/dist/data/menuData.ts +31 -0
- package/dist/hooks/custom-hooks/useC_MutationAction.tsx +36 -0
- package/dist/hooks/index.ts +2 -0
- package/dist/hooks/query/AQ/useQ_AQ_GetAQModule.ts +14 -0
- package/dist/interfaces/EmailConfig.ts +10 -0
- package/dist/interfaces/IAQModule.ts +21 -0
- package/dist/interfaces/base.ts +9 -0
- package/dist/interfaces/global-interface/IAQSSO.ts +15 -0
- package/dist/interfaces/global-interface/IAQSyncData.ts +9 -0
- package/dist/interfaces/global-interface/IAcademicYear.ts +12 -0
- package/dist/interfaces/global-interface/IChangePassWord.ts +8 -0
- package/dist/interfaces/global-interface/IComplaintProccess.ts +9 -0
- package/dist/interfaces/global-interface/ICreateAccount.ts +24 -0
- package/dist/interfaces/global-interface/IDocument.ts +25 -0
- package/dist/interfaces/global-interface/IDocumentAttribute.ts +12 -0
- package/dist/interfaces/global-interface/IEvent.ts +30 -0
- package/dist/interfaces/global-interface/IEventComplaint.ts +20 -0
- package/dist/interfaces/global-interface/IEventFillter.ts +14 -0
- package/dist/interfaces/global-interface/IFile.ts +8 -0
- package/dist/interfaces/global-interface/IImportStudentPaticipation.ts +8 -0
- package/dist/interfaces/global-interface/IPagePermission.ts +12 -0
- package/dist/interfaces/global-interface/IRolePermission.ts +7 -0
- package/dist/interfaces/global-interface/ISRMUserinfo.ts +35 -0
- package/dist/interfaces/global-interface/IScientificProfileProjectUser.ts +15 -0
- package/dist/interfaces/global-interface/IScientificProfileResearchGroup.ts +15 -0
- package/dist/interfaces/global-interface/IScientificProfileResearchGroupUser.ts +14 -0
- package/dist/interfaces/global-interface/IScientificProfileResearchProject.ts +21 -0
- package/dist/interfaces/global-interface/ISignIn.ts +7 -0
- package/dist/interfaces/global-interface/ISystemCatalogAcademicYear.ts +15 -0
- package/dist/interfaces/global-interface/ISystemCatalogDomainCategory.ts +11 -0
- package/dist/interfaces/global-interface/ISystemCatalogProjectLevelCategory.ts +11 -0
- package/dist/interfaces/global-interface/ISystemCatalogProjectTypeCategory.ts +11 -0
- package/dist/interfaces/global-interface/ISystemCatalogRoleActivity.ts +11 -0
- package/dist/interfaces/global-interface/ISystemCatalogTaskCategory.ts +11 -0
- package/dist/interfaces/global-interface/ISystemManagementAcademicHistory.ts +31 -0
- package/dist/interfaces/global-interface/ISystemManagementProfessionalWorkHistory.ts +14 -0
- package/dist/interfaces/global-interface/ISystemManagementPublishedScientificWork.ts +14 -0
- package/dist/interfaces/global-interface/ISystemManagementRoleGroup.ts +12 -0
- package/dist/interfaces/global-interface/ISystemManagementRoleGroupMenuPermission.ts +18 -0
- package/dist/interfaces/global-interface/ISystemManagementScientificResearchProject.ts +16 -0
- package/dist/interfaces/global-interface/ISystemManagementUserMenuPermission.ts +18 -0
- package/dist/interfaces/global-interface/IUpdateAccount.ts +15 -0
- package/dist/interfaces/global-interface/IUser.ts +21 -0
- package/dist/interfaces/global-interface/IUserPermission.ts +7 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/modules-features/admin/core/MainDashboard/BarChart_CourseStatus.tsx +87 -0
- package/dist/modules-features/admin/core/MainDashboard/BarChart_ExamStatus.tsx +65 -0
- package/dist/modules-features/admin/core/MainDashboard/BarChart_RevenueByAcademicYear.tsx +82 -0
- package/dist/modules-features/admin/core/MainDashboard/BarChart_StudentStatusIn30Days.tsx +67 -0
- package/dist/modules-features/admin/core/MainDashboard/HBarChart_CourseDropOutPercentage.tsx +77 -0
- package/dist/modules-features/admin/core/MainDashboard/HBarChart_CourseProgressPercentage.tsx +77 -0
- package/dist/modules-features/admin/core/MainDashboard/LineChart_RevenueIn12Months.tsx +78 -0
- package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByDiscountIn3Months.tsx +69 -0
- package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByVoucherIn3Months.tsx +69 -0
- package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalStudentIn12Months.tsx +64 -0
- package/dist/modules-features/admin/core/MainDashboard/ViewDiscountStat.tsx +311 -0
- package/dist/modules-features/admin/core/MainDashboard/ViewVoucherStat.tsx +311 -0
- package/dist/modules-features/admin/core/core12196/F_core12196.tsx +20 -0
- package/dist/modules-features/admin/core/core12196/F_core12196_Create.tsx +101 -0
- package/dist/modules-features/admin/core/core12196/F_core12196_Delete.tsx +19 -0
- package/dist/modules-features/admin/core/core12196/F_core12196_Read.tsx +165 -0
- package/dist/modules-features/admin/core/core12196/F_core12196_Update.tsx +112 -0
- package/dist/modules-features/admin/core/core16209/F_core16209.tsx +108 -0
- package/dist/modules-features/admin/core/core16209/F_core16209_Create.tsx +112 -0
- package/dist/modules-features/admin/core/core16209/F_core16209_Delete.tsx +17 -0
- package/dist/modules-features/admin/core/core16209/F_core16209_Update.tsx +114 -0
- package/dist/modules-features/admin/core/core18256/F_core18256.tsx +29 -0
- package/dist/modules-features/admin/core/core18256/F_core18256_Create.tsx +34 -0
- package/dist/modules-features/admin/core/core18256/F_core18256_Delete.tsx +14 -0
- package/dist/modules-features/admin/core/core18256/F_core18256_Read.tsx +59 -0
- package/dist/modules-features/admin/core/core18256/F_core18256_Select.tsx +40 -0
- package/dist/modules-features/admin/core/core18256/F_core18256_Update.tsx +22 -0
- package/dist/modules-features/admin/core/core26965/F_core26965.tsx +17 -0
- package/dist/modules-features/admin/core/core26965/F_core26965_Create.tsx +106 -0
- package/dist/modules-features/admin/core/core26965/F_core26965_Delete.tsx +19 -0
- package/dist/modules-features/admin/core/core26965/F_core26965_Read.tsx +165 -0
- package/dist/modules-features/admin/core/core26965/F_core26965_Update.tsx +112 -0
- package/dist/modules-features/admin/core/core27311/F_core27311.tsx +21 -0
- package/dist/modules-features/admin/core/core27311/F_core27311_Create.tsx +109 -0
- package/dist/modules-features/admin/core/core27311/F_core27311_Delete.tsx +19 -0
- package/dist/modules-features/admin/core/core27311/F_core27311_Read.tsx +165 -0
- package/dist/modules-features/admin/core/core27311/F_core27311_Update.tsx +113 -0
- package/dist/modules-features/admin/core/core35923/F_core35923.tsx +46 -0
- package/dist/modules-features/admin/core/core38677/F_core38677.tsx +28 -0
- package/dist/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx +79 -0
- package/dist/modules-features/admin/core/core38677/F_core38677_Save.tsx +52 -0
- package/dist/modules-features/admin/core/core38677/F_core38677_ViewMenuPermissions.tsx +264 -0
- package/dist/modules-features/admin/core/core40207/F_core40207.tsx +9 -0
- package/dist/modules-features/admin/core/core40207/F_core40207_Create.tsx +81 -0
- package/dist/modules-features/admin/core/core40207/F_core40207_Delete.tsx +17 -0
- package/dist/modules-features/admin/core/core40207/F_core40207_Read.tsx +98 -0
- package/dist/modules-features/admin/core/core40207/F_core40207_Update.tsx +83 -0
- package/dist/modules-features/admin/core/core47643/F_core47643.tsx +10 -0
- package/dist/modules-features/admin/core/core47643/F_core47643_Delete.tsx +13 -0
- package/dist/modules-features/admin/core/core47643/F_core47643_Form.tsx +34 -0
- package/dist/modules-features/admin/core/core47643/F_core47643_Read.tsx +57 -0
- package/dist/modules-features/admin/core/core60524/F_core60524.tsx +13 -0
- package/dist/modules-features/admin/core/core60524/F_core60524_Form.tsx +111 -0
- package/dist/modules-features/admin/core/core60524/F_core60524_Save.tsx +56 -0
- package/dist/modules-features/admin/core/core60524/useS_core60524.ts +16 -0
- package/dist/modules-features/admin/core/core64229/F_core64229.tsx +7 -0
- package/dist/modules-features/admin/core/core64229/F_core64229_Delete.tsx +21 -0
- package/dist/modules-features/admin/core/core64229/F_core64229_Form.tsx +95 -0
- package/dist/modules-features/admin/core/core64229/F_core64229_Read.tsx +67 -0
- package/dist/modules-features/admin/core/core71678/F_core71678.tsx +8 -0
- package/dist/modules-features/admin/core/core71678/F_core71678_ChangePermission.tsx +117 -0
- package/dist/modules-features/admin/core/core71678/F_core71678_Create.tsx +61 -0
- package/dist/modules-features/admin/core/core71678/F_core71678_Delete.tsx +16 -0
- package/dist/modules-features/admin/core/core71678/F_core71678_Read.tsx +92 -0
- package/dist/modules-features/admin/core/core71678/F_core71678_Update.tsx +49 -0
- package/dist/modules-features/admin/core/core76318/F_core76318.tsx +9 -0
- package/dist/modules-features/admin/core/core76318/F_core76318_Create.tsx +89 -0
- package/dist/modules-features/admin/core/core76318/F_core76318_Delete.tsx +17 -0
- package/dist/modules-features/admin/core/core76318/F_core76318_Read.tsx +104 -0
- package/dist/modules-features/admin/core/core76318/F_core76318_Update.tsx +89 -0
- package/dist/modules-features/admin/core/core83092/F_core83092.tsx +27 -0
- package/dist/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx +85 -0
- package/dist/modules-features/admin/core/core83092/F_core83092_Save.tsx +52 -0
- package/dist/modules-features/admin/core/core83092/F_core83092_ViewMenuPermissions.tsx +263 -0
- package/dist/modules-features/admin/core/core83092/useS_core83092.tsx +70 -0
- package/dist/modules-features/authenticate/F_authenticate_Login/F_authenticate_Login.tsx +154 -0
- package/dist/modules-features/authenticate/F_authenticate_Login/css.module.css +4 -0
- package/dist/modules-features/authenticate/F_authenticate_Logout.tsx +22 -0
- package/dist/modules-features/authenticate/F_authenticate_SplashPage.tsx +21 -0
- package/dist/modules-features/authenticate/useS_authenticate.ts +23 -0
- package/dist/modules-features/index.mjs +2 -2
- package/dist/modules-features/index.ts +79 -0
- package/dist/providers/MyMantineProvider.tsx +140 -0
- package/dist/providers/MyReactQueryProvider.tsx +24 -0
- package/dist/providers/Provider.tsx +13 -0
- package/dist/providers/mantine.module.css +21 -0
- package/dist/stores/CreateGenericStore.ts +23 -0
- package/dist/stores/index.ts +1 -0
- package/dist/types/types.ts +16 -0
- package/dist/utils/index.ts +9 -0
- package/dist/utils/utils_converter.ts +39 -0
- package/dist/utils/utils_currency.ts +5 -0
- package/dist/utils/utils_date.ts +34 -0
- package/dist/utils/utils_excel.ts +128 -0
- package/dist/utils/utils_file.ts +61 -0
- package/dist/utils/utils_notification.ts +46 -0
- package/dist/utils/utils_pdf.ts +21 -0
- package/dist/utils/utils_time.ts +15 -0
- package/dist/utils/utils_validateForm.ts +9 -0
- package/package.json +1 -1
- package/dist/modules-features/index.css +0 -100
@@ -0,0 +1,165 @@
|
|
1
|
+
"use client";
|
2
|
+
import { MyFlexColumn } from "@/components/Layouts/FlexColumn/MyFlexColumn";
|
3
|
+
import { Accordion, Blockquote } from "@mantine/core";
|
4
|
+
import { useQuery } from "@tanstack/react-query";
|
5
|
+
|
6
|
+
import baseAxios from "@/api/baseAxios";
|
7
|
+
import { MyButtonViewPDF } from "@/components/Buttons/ButtonViewPDF/MyButtonViewPDF";
|
8
|
+
import { MyCenterFull } from "@/components/CenterFull/MyCenterFull";
|
9
|
+
import { MyDataTable } from "@/components/DataDisplay/DataTable/MyDataTable";
|
10
|
+
import { OBJECT_DOCUMENT_TYPES } from "@/constants/object/documentTypes";
|
11
|
+
import { U0DateToDDMMYYYString } from "@/utils/utils_date";
|
12
|
+
import { MRT_ColumnDef } from "mantine-react-table";
|
13
|
+
import { useMemo } from "react";
|
14
|
+
import { F_core27311_Delete } from "./F_core27311_Delete";
|
15
|
+
import { F_core27311_Update } from "./F_core27311_Update";
|
16
|
+
interface I {
|
17
|
+
documentType?: number;
|
18
|
+
id?: number;
|
19
|
+
code?: string;
|
20
|
+
name?: string;
|
21
|
+
concurrencyStamp?: string;
|
22
|
+
isEnabled?: boolean;
|
23
|
+
}
|
24
|
+
|
25
|
+
export function F_core27311_Read({
|
26
|
+
WorkflowTypeId,
|
27
|
+
}: {
|
28
|
+
WorkflowTypeId: number;
|
29
|
+
}) {
|
30
|
+
const documentAttributeQuery = useQuery<I[]>({
|
31
|
+
queryKey: ["F_core27311_Read", WorkflowTypeId],
|
32
|
+
queryFn: async () => {
|
33
|
+
const result = await baseAxios.get("/DocumentAttribute/GetByType?", {
|
34
|
+
params: { documentType: WorkflowTypeId },
|
35
|
+
});
|
36
|
+
return result.data?.data || [];
|
37
|
+
},
|
38
|
+
});
|
39
|
+
if (documentAttributeQuery.isLoading) return "Loading...";
|
40
|
+
if (documentAttributeQuery.isError) return "có lỗi xảy ra!";
|
41
|
+
if (documentAttributeQuery.data?.length == 0)
|
42
|
+
return <Blockquote color="yellow">Chưa có loại văn bản</Blockquote>;
|
43
|
+
return (
|
44
|
+
<MyFlexColumn>
|
45
|
+
<Accordion
|
46
|
+
variant="contained"
|
47
|
+
defaultValue={documentAttributeQuery.data?.map(
|
48
|
+
(item) => item.id?.toString()!
|
49
|
+
)}
|
50
|
+
multiple
|
51
|
+
>
|
52
|
+
{documentAttributeQuery.data?.map((item, idx) => (
|
53
|
+
<SubRead
|
54
|
+
key={idx}
|
55
|
+
name={item.name!}
|
56
|
+
documentType={item.id!}
|
57
|
+
WorkflowTypeId={WorkflowTypeId}
|
58
|
+
/>
|
59
|
+
))}
|
60
|
+
</Accordion>
|
61
|
+
</MyFlexColumn>
|
62
|
+
);
|
63
|
+
}
|
64
|
+
|
65
|
+
function SubRead({
|
66
|
+
name,
|
67
|
+
documentType,
|
68
|
+
WorkflowTypeId,
|
69
|
+
}: {
|
70
|
+
name: string;
|
71
|
+
documentType: number;
|
72
|
+
WorkflowTypeId: number;
|
73
|
+
}) {
|
74
|
+
interface I {
|
75
|
+
path?: string;
|
76
|
+
orderBy?: number;
|
77
|
+
documentType?: number;
|
78
|
+
promulgateDate?: Date;
|
79
|
+
decisionCode?: string;
|
80
|
+
departmentName?: string;
|
81
|
+
description?: string;
|
82
|
+
startDate?: Date;
|
83
|
+
endDate?: Date;
|
84
|
+
conclusion?: string;
|
85
|
+
note?: string;
|
86
|
+
documentAttributeId?: number;
|
87
|
+
documentAttributeName?: string;
|
88
|
+
isCycleCheck?: boolean;
|
89
|
+
meetingDate?: Date;
|
90
|
+
fileDetail?: {
|
91
|
+
fileBase64String?: string;
|
92
|
+
fileExtension?: string;
|
93
|
+
fileName?: string;
|
94
|
+
};
|
95
|
+
id?: number;
|
96
|
+
code?: string;
|
97
|
+
name?: string;
|
98
|
+
concurrencyStamp?: string;
|
99
|
+
isEnabled?: boolean;
|
100
|
+
ngayChinhSua?: Date;
|
101
|
+
nguoiChinhSua?: string;
|
102
|
+
}
|
103
|
+
const documentQuery = useQuery<I[]>({
|
104
|
+
queryKey: ["SubRead" + documentType],
|
105
|
+
queryFn: async () => {
|
106
|
+
const result = await baseAxios.get(
|
107
|
+
`/Document/GetByDocumentAttribute?id=${documentType}`
|
108
|
+
);
|
109
|
+
return result.data.data;
|
110
|
+
},
|
111
|
+
});
|
112
|
+
const columns = useMemo<MRT_ColumnDef<I>[]>(
|
113
|
+
() => [
|
114
|
+
{
|
115
|
+
header: "Số quy định",
|
116
|
+
accessorKey: "decisionCode",
|
117
|
+
},
|
118
|
+
{
|
119
|
+
header: "Ngày ban hành",
|
120
|
+
accessorFn: (row) =>
|
121
|
+
U0DateToDDMMYYYString(new Date(row.promulgateDate!)),
|
122
|
+
},
|
123
|
+
{
|
124
|
+
header: "Tên tài liệu",
|
125
|
+
accessorKey: "name",
|
126
|
+
},
|
127
|
+
{
|
128
|
+
header: "File",
|
129
|
+
accessorFn: (row) => {
|
130
|
+
return (
|
131
|
+
<MyCenterFull>
|
132
|
+
<MyButtonViewPDF id={row.id} />
|
133
|
+
</MyCenterFull>
|
134
|
+
);
|
135
|
+
},
|
136
|
+
},
|
137
|
+
],
|
138
|
+
[]
|
139
|
+
);
|
140
|
+
if (documentQuery.isLoading) return "Loading...";
|
141
|
+
if (documentQuery.isError) return "Error!";
|
142
|
+
return (
|
143
|
+
<Accordion.Item value={documentType.toString()}>
|
144
|
+
<Accordion.Control>{name}</Accordion.Control>
|
145
|
+
<Accordion.Panel>
|
146
|
+
<MyDataTable
|
147
|
+
columns={columns}
|
148
|
+
data={documentQuery.data!}
|
149
|
+
renderRowActions={({ row }) => (
|
150
|
+
<MyCenterFull>
|
151
|
+
<F_core27311_Update
|
152
|
+
WorkflowTypeId={WorkflowTypeId}
|
153
|
+
values={row.original!}
|
154
|
+
/>
|
155
|
+
<F_core27311_Delete
|
156
|
+
id={row.original.id!}
|
157
|
+
contextData={row.original.decisionCode!}
|
158
|
+
/>
|
159
|
+
</MyCenterFull>
|
160
|
+
)}
|
161
|
+
/>
|
162
|
+
</Accordion.Panel>
|
163
|
+
</Accordion.Item>
|
164
|
+
);
|
165
|
+
}
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import baseAxios from "@/api/baseAxios";
|
2
|
+
import { MyActionIconUpdate } from "@/components/ActionIcons/ActionIconCRUD/MyActionIconUpdate";
|
3
|
+
import { MyDateInput } from "@/components/Inputs/DateInput/MyDateInput";
|
4
|
+
import { MyFileInput } from "@/components/Inputs/FileInput/MyFileInput";
|
5
|
+
import { MyNumberInput } from "@/components/Inputs/NumberInput/MyNumberInput";
|
6
|
+
import { MyTextInput } from "@/components/Inputs/TextInput/MyTextInput";
|
7
|
+
|
8
|
+
import { OBJECT_DOCUMENT_TYPES } from "@/constants/object/documentTypes";
|
9
|
+
import { F_core18256_Select } from "@/modules-features/admin/core/core18256/F_core18256_Select";
|
10
|
+
import { utils_file_fileToAQDocumentType } from "@/utils/utils_file";
|
11
|
+
import { useForm } from "@mantine/form";
|
12
|
+
interface IDocument {
|
13
|
+
path?: string;
|
14
|
+
orderBy?: number;
|
15
|
+
documentType?: number;
|
16
|
+
promulgateDate?: Date;
|
17
|
+
decisionCode?: string;
|
18
|
+
departmentName?: string;
|
19
|
+
description?: string;
|
20
|
+
startDate?: Date;
|
21
|
+
endDate?: Date;
|
22
|
+
conclusion?: string;
|
23
|
+
note?: string;
|
24
|
+
documentAttributeId?: number;
|
25
|
+
documentAttributeName?: string;
|
26
|
+
isCycleCheck?: boolean;
|
27
|
+
meetingDate?: Date;
|
28
|
+
fileDetail?: {
|
29
|
+
fileBase64String?: string;
|
30
|
+
fileExtension?: string;
|
31
|
+
fileName?: string;
|
32
|
+
};
|
33
|
+
id?: number;
|
34
|
+
code?: string;
|
35
|
+
name?: string;
|
36
|
+
concurrencyStamp?: string;
|
37
|
+
isEnabled?: boolean;
|
38
|
+
ngayChinhSua?: Date;
|
39
|
+
nguoiChinhSua?: string;
|
40
|
+
}
|
41
|
+
interface I extends IDocument {
|
42
|
+
file?: File;
|
43
|
+
}
|
44
|
+
export function F_core27311_Update({
|
45
|
+
values,
|
46
|
+
WorkflowTypeId,
|
47
|
+
}: {
|
48
|
+
values: I;
|
49
|
+
WorkflowTypeId: number;
|
50
|
+
}) {
|
51
|
+
const form = useForm<I>({
|
52
|
+
initialValues: {
|
53
|
+
...values,
|
54
|
+
file: new File(
|
55
|
+
[],
|
56
|
+
values.path?.split("/")[values.path.split("/").length - 1]!
|
57
|
+
),
|
58
|
+
promulgateDate: new Date(values.promulgateDate!),
|
59
|
+
},
|
60
|
+
validate: {
|
61
|
+
decisionCode: (value) =>
|
62
|
+
value ? null : "Số quy định không được để trống",
|
63
|
+
promulgateDate: (value) =>
|
64
|
+
value ? null : "Ngày ban hành không được để trống",
|
65
|
+
name: (value) => (value ? null : "Tên tài liệu không được để trống"),
|
66
|
+
documentAttributeId: (value) =>
|
67
|
+
value ? null : "Loại văn bản không được để trống",
|
68
|
+
file: (value) => (value ? null : "Tệp đính kèm không được để trống"),
|
69
|
+
},
|
70
|
+
});
|
71
|
+
return (
|
72
|
+
<MyActionIconUpdate
|
73
|
+
form={form}
|
74
|
+
onSubmit={async (values) => {
|
75
|
+
return await baseAxios.post("/Document/Update", {
|
76
|
+
...values,
|
77
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file!),
|
78
|
+
});
|
79
|
+
}}
|
80
|
+
>
|
81
|
+
<MyTextInput
|
82
|
+
withAsterisk
|
83
|
+
label="Số quy định"
|
84
|
+
{...form.getInputProps("decisionCode")}
|
85
|
+
/>
|
86
|
+
<MyDateInput
|
87
|
+
withAsterisk
|
88
|
+
label="Ngày ban hành"
|
89
|
+
{...form.getInputProps("promulgateDate")}
|
90
|
+
/>
|
91
|
+
<MyTextInput
|
92
|
+
withAsterisk
|
93
|
+
label="Tên tài liệu"
|
94
|
+
{...form.getInputProps("name")}
|
95
|
+
/>
|
96
|
+
<F_core18256_Select
|
97
|
+
withAsterisk
|
98
|
+
label="Loại văn bản"
|
99
|
+
documentTypeId={WorkflowTypeId}
|
100
|
+
{...form.getInputProps("documentAttributeId")}
|
101
|
+
/>
|
102
|
+
<MyFileInput
|
103
|
+
withAsterisk
|
104
|
+
label="Văn bản"
|
105
|
+
{...form.getInputProps("file")}
|
106
|
+
/>
|
107
|
+
<MyNumberInput
|
108
|
+
label="Thứ tự hiển thị trên danh sách"
|
109
|
+
{...form.getInputProps("orderBy")}
|
110
|
+
/>
|
111
|
+
</MyActionIconUpdate>
|
112
|
+
);
|
113
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { MyButton } from "@/components/Buttons/Button/MyButton";
|
2
|
+
import { MyFieldset } from "@/components/Inputs/Fieldset/MyFieldset";
|
3
|
+
import { MyFileInput } from "@/components/Inputs/FileInput/MyFileInput";
|
4
|
+
import { MyTextInput } from "@/components/Inputs/TextInput/MyTextInput";
|
5
|
+
import { MyFlexEnd } from "@/components/Layouts/FlexEnd/MyFlexEnd";
|
6
|
+
import { Grid } from "@mantine/core";
|
7
|
+
import React from "react";
|
8
|
+
|
9
|
+
export function F_core35923() {
|
10
|
+
return (
|
11
|
+
<MyFieldset title="Cập nhật thông tin đơn vị chủ quản">
|
12
|
+
<Grid>
|
13
|
+
<Grid.Col span={{ base: 12, md: 5 }}>
|
14
|
+
<MyTextInput label="Mã module" disabled />
|
15
|
+
</Grid.Col>
|
16
|
+
<Grid.Col span={{ base: 12, md: 7 }}>
|
17
|
+
<MyTextInput label="Tên module" />
|
18
|
+
</Grid.Col>
|
19
|
+
<Grid.Col span={12}>
|
20
|
+
<MyTextInput label="Tên đơn vị chủ quản" />
|
21
|
+
</Grid.Col>
|
22
|
+
<Grid.Col span={{ base: 12, md: 6 }}>
|
23
|
+
<MyTextInput label="Email" />
|
24
|
+
</Grid.Col>
|
25
|
+
<Grid.Col span={{ base: 12, md: 6 }}>
|
26
|
+
<MyTextInput label="Số điện thoại" />
|
27
|
+
</Grid.Col>
|
28
|
+
<Grid.Col span={{ base: 12, md: 6 }}>
|
29
|
+
<MyTextInput label="Ngày đăng ký" />
|
30
|
+
</Grid.Col>
|
31
|
+
<Grid.Col span={{ base: 12, md: 6 }}>
|
32
|
+
<MyTextInput label="Ngày hết hạn" />
|
33
|
+
</Grid.Col>
|
34
|
+
<Grid.Col span={{ base: 12, md: 6 }}>
|
35
|
+
<MyFileInput label="Favicon (16px x 16px)" />
|
36
|
+
</Grid.Col>
|
37
|
+
<Grid.Col span={{ base: 12, md: 6 }}>
|
38
|
+
<MyFileInput label="Logo (330px x 115px)" />
|
39
|
+
</Grid.Col>
|
40
|
+
</Grid>
|
41
|
+
<MyFlexEnd>
|
42
|
+
<MyButton crudType="save" />
|
43
|
+
</MyFlexEnd>
|
44
|
+
</MyFieldset>
|
45
|
+
);
|
46
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { MyFlexColumn } from "@/components/Layouts/FlexColumn/MyFlexColumn";
|
2
|
+
import { MyPageContent } from "@/components/Layouts/PageContent/MyPageContent";
|
3
|
+
import { OBJECT_COlORS } from "@/constants/object/color";
|
4
|
+
import { Grid, Paper, ScrollArea } from "@mantine/core";
|
5
|
+
import { F_core38677_ReadUser } from "./F_core38677_ReadUser";
|
6
|
+
import { F_core38677_Save } from "./F_core38677_Save";
|
7
|
+
import { F_core38677_ViewMenuPermissions } from "./F_core38677_ViewMenuPermissions";
|
8
|
+
import { I_BasicAppShell_LinkItem } from "@/components";
|
9
|
+
|
10
|
+
export function F_core38677({ menuData }: { menuData: I_BasicAppShell_LinkItem[] }) {
|
11
|
+
return (
|
12
|
+
<Grid grow>
|
13
|
+
<Grid.Col span={4}>
|
14
|
+
<F_core38677_ReadUser />
|
15
|
+
</Grid.Col>
|
16
|
+
<Grid.Col span={8}>
|
17
|
+
<MyFlexColumn h={'80vh'} flex={1}>
|
18
|
+
<ScrollArea.Autosize h={'100%'}>
|
19
|
+
<Paper p={'md'} bg={OBJECT_COlORS.mantineBackgroundSecondary}>
|
20
|
+
<F_core38677_ViewMenuPermissions menuData={menuData} />
|
21
|
+
</Paper>
|
22
|
+
</ScrollArea.Autosize>
|
23
|
+
<F_core38677_Save />
|
24
|
+
</MyFlexColumn>
|
25
|
+
</Grid.Col>
|
26
|
+
</Grid>
|
27
|
+
)
|
28
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
'use client'
|
2
|
+
import baseAxios from "@/api/baseAxios";
|
3
|
+
import { MyDataTable } from "@/components/DataDisplay/DataTable/MyDataTable";
|
4
|
+
import { Container } from "@mantine/core";
|
5
|
+
import { useQuery } from "@tanstack/react-query";
|
6
|
+
import { MRT_ColumnDef, MRT_RowSelectionState } from "mantine-react-table";
|
7
|
+
import { useEffect, useMemo, useState } from "react";
|
8
|
+
import { useS_core83092 } from "../core83092/useS_core83092";
|
9
|
+
import { IBaseEntity } from "@/interfaces/base";
|
10
|
+
export interface I_core38677_User extends IBaseEntity {
|
11
|
+
|
12
|
+
}
|
13
|
+
|
14
|
+
export function F_core38677_ReadUser() {
|
15
|
+
const store = useS_core83092()
|
16
|
+
const query = useQ_Account_GetAdminAccount()
|
17
|
+
const [rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});
|
18
|
+
|
19
|
+
const columns = useMemo<MRT_ColumnDef<I_core38677_User>[]>(
|
20
|
+
() => [
|
21
|
+
{
|
22
|
+
header: "Mã",
|
23
|
+
accessorKey: "code",
|
24
|
+
size: 60
|
25
|
+
},
|
26
|
+
{
|
27
|
+
header: "Tên quyền",
|
28
|
+
accessorKey: "name",
|
29
|
+
},
|
30
|
+
],
|
31
|
+
[]
|
32
|
+
);
|
33
|
+
|
34
|
+
const handleRowClick = (rowId: string) => {
|
35
|
+
setRowSelection({ [rowId]: true }); // Chọn dòng hiện tại và xóa các dòng khác
|
36
|
+
store.setProperty("roleId", parseInt(rowId))
|
37
|
+
};
|
38
|
+
useEffect(() => {
|
39
|
+
if (store.state.roleId == 0) return
|
40
|
+
setRowSelection({ [store.state.roleId!]: true });
|
41
|
+
}, [store.state.roleId])
|
42
|
+
useEffect(() => {
|
43
|
+
if (!query.data) return
|
44
|
+
store.setProperty("roleId", query.data[0].id)
|
45
|
+
}, [query.data])
|
46
|
+
|
47
|
+
if (query.isLoading) return "Loading...";
|
48
|
+
if (query.isError) return "Có lỗi xảy ra!";
|
49
|
+
return (
|
50
|
+
<Container fluid>
|
51
|
+
<MyDataTable
|
52
|
+
columns={columns}
|
53
|
+
data={query.data!}
|
54
|
+
getRowId={(row) => row.id?.toString()}
|
55
|
+
mantineTableBodyRowProps={({ row }) => ({
|
56
|
+
onClick: () => handleRowClick(row.id),
|
57
|
+
style: {
|
58
|
+
cursor: 'pointer',
|
59
|
+
backgroundColor: rowSelection[row.id] ? 'var(--mantine-color-blue-light)' : 'transparent',
|
60
|
+
},
|
61
|
+
})}
|
62
|
+
state={rowSelection}
|
63
|
+
/>
|
64
|
+
</Container>
|
65
|
+
);
|
66
|
+
}
|
67
|
+
|
68
|
+
function useQ_Account_GetAdminAccount() {
|
69
|
+
interface I extends IBaseEntity { }
|
70
|
+
const query = useQuery<I[]>({
|
71
|
+
queryKey: ['useQ_Role_GetAdminRole'],
|
72
|
+
queryFn: async () => {
|
73
|
+
const result = await baseAxios.get(`/Role/GetAdminRole`);
|
74
|
+
return result.data?.data || []
|
75
|
+
},
|
76
|
+
refetchOnWindowFocus: false
|
77
|
+
});
|
78
|
+
return query
|
79
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import baseAxios from '@/api/baseAxios'
|
2
|
+
import { MyButton } from '@/components/Buttons/Button/MyButton'
|
3
|
+
import { utils_notification_show } from '@/utils/utils_notification'
|
4
|
+
import { useMutation } from '@tanstack/react-query'
|
5
|
+
import { useEffect, useState } from 'react'
|
6
|
+
import { useS_core83092 } from '../core83092/useS_core83092'
|
7
|
+
|
8
|
+
interface IPagePermission {
|
9
|
+
pageId?: number,
|
10
|
+
isCreate?: boolean
|
11
|
+
isRead?: boolean,
|
12
|
+
isUpdate?: boolean
|
13
|
+
isDelete?: boolean,
|
14
|
+
isPrint?: boolean,
|
15
|
+
isExport?: boolean
|
16
|
+
}
|
17
|
+
interface IBody {
|
18
|
+
pagePermissions?: IPagePermission[]
|
19
|
+
roleId?: number
|
20
|
+
}
|
21
|
+
export function F_core38677_Save() {
|
22
|
+
const store = useS_core83092()
|
23
|
+
const disable = useState<boolean>(false)
|
24
|
+
const mutation = useMutation({
|
25
|
+
mutationFn: async (body: IBody) => {
|
26
|
+
const res = await baseAxios.put("/Role/UpdatePermission", body)
|
27
|
+
return res
|
28
|
+
}
|
29
|
+
})
|
30
|
+
function handleSave() {
|
31
|
+
mutation.mutate({
|
32
|
+
pagePermissions: store.state.rolePermissions!,
|
33
|
+
roleId: store.state.roleId
|
34
|
+
}, {
|
35
|
+
onSuccess: () => {
|
36
|
+
utils_notification_show({
|
37
|
+
crudType: "update"
|
38
|
+
})
|
39
|
+
}
|
40
|
+
})
|
41
|
+
}
|
42
|
+
useEffect(() => {
|
43
|
+
if (!store.state.rolePermissions || store.state.rolePermissions.length == 0) {
|
44
|
+
disable[1](true)
|
45
|
+
return
|
46
|
+
}
|
47
|
+
disable[1](false)
|
48
|
+
}, [store.state.rolePermissions])
|
49
|
+
return (
|
50
|
+
<MyButton disabled={disable[0]} crudType='save' onClick={handleSave} />
|
51
|
+
)
|
52
|
+
}
|