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,92 @@
|
|
1
|
+
'use client'
|
2
|
+
import baseAxios from "@/api/baseAxios";
|
3
|
+
import { MyCenterFull } from "@/components/CenterFull/MyCenterFull";
|
4
|
+
import { MyDataTable } from "@/components/DataDisplay/DataTable/MyDataTable";
|
5
|
+
;
|
6
|
+
import { Button, Group } from "@mantine/core";
|
7
|
+
import { IconShield } from "@tabler/icons-react";
|
8
|
+
import { useQuery } from "@tanstack/react-query";
|
9
|
+
import { MRT_ColumnDef, MRT_RowSelectionState } from "mantine-react-table";
|
10
|
+
import { useRouter } from "next/navigation";
|
11
|
+
import { useMemo, useState } from "react";
|
12
|
+
import { F_core71678_ChangePermission } from "./F_core71678_ChangePermission";
|
13
|
+
import { F_core71678_Create } from "./F_core71678_Create";
|
14
|
+
import { F_core71678_Delete } from "./F_core71678_Delete";
|
15
|
+
import { F_core71678_Update } from "./F_core71678_Update";
|
16
|
+
import { IBaseEntity } from "@/interfaces/base";
|
17
|
+
|
18
|
+
interface IRoles extends IBaseEntity { }
|
19
|
+
export interface I_core71678_Read extends IBaseEntity {
|
20
|
+
userName?: string,
|
21
|
+
fullName?: string,
|
22
|
+
email?: string
|
23
|
+
roles?: IRoles[]
|
24
|
+
}
|
25
|
+
|
26
|
+
const ENDPOINT = "/Account/GetAdminAccount"
|
27
|
+
export function F_core71678_Read() {
|
28
|
+
const router = useRouter()
|
29
|
+
const [rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});
|
30
|
+
const AllUserQuery = useQuery<I_core71678_Read[]>({
|
31
|
+
queryKey: ["F_core71678_Read"],
|
32
|
+
queryFn: async () => {
|
33
|
+
const result = await baseAxios.get(
|
34
|
+
ENDPOINT,
|
35
|
+
{ params: { page: 5, pageNumber: 1 } }
|
36
|
+
);
|
37
|
+
return result.data?.data || []
|
38
|
+
}
|
39
|
+
})
|
40
|
+
const columns = useMemo<MRT_ColumnDef<I_core71678_Read>[]>(
|
41
|
+
() => [
|
42
|
+
{
|
43
|
+
header: "Tên tài khoản",
|
44
|
+
accessorKey: "userName"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
header: "Họ và tên",
|
48
|
+
accessorKey: "fullName"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
header: "Email",
|
52
|
+
accessorKey: "email"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
header: "Quyền",
|
56
|
+
accessorFn: (row) => <F_core71678_ChangePermission user={row} />
|
57
|
+
},
|
58
|
+
],
|
59
|
+
[]
|
60
|
+
);
|
61
|
+
if (AllUserQuery.isLoading) return "Loading..."
|
62
|
+
return (
|
63
|
+
<MyDataTable
|
64
|
+
columns={columns}
|
65
|
+
data={AllUserQuery.data!}
|
66
|
+
renderTopToolbarCustomActions={() => {
|
67
|
+
return (
|
68
|
+
<Group>
|
69
|
+
<F_core71678_Create />
|
70
|
+
<Button
|
71
|
+
color="violet"
|
72
|
+
leftSection={<IconShield />}
|
73
|
+
onClick={() => {
|
74
|
+
router.push("core47643")
|
75
|
+
}}>
|
76
|
+
Danh mục quyền
|
77
|
+
</Button>
|
78
|
+
</Group>
|
79
|
+
)
|
80
|
+
}}
|
81
|
+
renderRowActions={({ row }) => {
|
82
|
+
return (
|
83
|
+
<MyCenterFull>
|
84
|
+
<F_core71678_Update user={row.original} />
|
85
|
+
<F_core71678_Delete id={row.original.id!} code={row.original.code!} />
|
86
|
+
</MyCenterFull>
|
87
|
+
)
|
88
|
+
}}
|
89
|
+
/>
|
90
|
+
)
|
91
|
+
}
|
92
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import baseAxios from "@/api/baseAxios";
|
2
|
+
import { MyActionIconUpdate } from "@/components/ActionIcons/ActionIconCRUD/MyActionIconUpdate";
|
3
|
+
import { MyTextInput } from "@/components/Inputs/TextInput/MyTextInput";
|
4
|
+
import { MyFlexColumn } from "@/components/Layouts/FlexColumn/MyFlexColumn";
|
5
|
+
import { useForm } from "@mantine/form";
|
6
|
+
import { useEffect } from "react";
|
7
|
+
|
8
|
+
interface I {
|
9
|
+
id?: number
|
10
|
+
userName?: string,
|
11
|
+
code?: string
|
12
|
+
fullName?: string,
|
13
|
+
email?: string,
|
14
|
+
phoneNumber?: string
|
15
|
+
}
|
16
|
+
export function F_core71678_Update({ user }: { user: I }) {
|
17
|
+
const form = useForm({
|
18
|
+
initialValues: user
|
19
|
+
})
|
20
|
+
|
21
|
+
useEffect(() => {
|
22
|
+
console.log(form.values);
|
23
|
+
}, [form.values])
|
24
|
+
|
25
|
+
|
26
|
+
return (
|
27
|
+
<MyActionIconUpdate form={form} onSubmit={async (values) => {
|
28
|
+
return await baseAxios.post("/Account/update",
|
29
|
+
{
|
30
|
+
...values,
|
31
|
+
id: values.id,
|
32
|
+
address: "",
|
33
|
+
concurrencyStamp: "",
|
34
|
+
isBlocked: false,
|
35
|
+
isEnabled: true,
|
36
|
+
workingUnitId: null
|
37
|
+
})
|
38
|
+
}} >
|
39
|
+
<MyFlexColumn>
|
40
|
+
<MyTextInput disabled label='Mã tài khoản' {...form.getInputProps("code")} />
|
41
|
+
<MyTextInput disabled label='Tên tài khoản' {...form.getInputProps("userName")} />
|
42
|
+
<MyTextInput label='Họ và tên' {...form.getInputProps("fullName")} />
|
43
|
+
<MyTextInput label='Email' {...form.getInputProps("email")} />
|
44
|
+
<MyTextInput label='Số điện thoại' {...form.getInputProps("phoneNumber")} />
|
45
|
+
</MyFlexColumn>
|
46
|
+
</MyActionIconUpdate>
|
47
|
+
|
48
|
+
)
|
49
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { MyPageContent } from "@/components";
|
2
|
+
import F_core76318_Read from "./F_core76318_Read";
|
3
|
+
import { OBJECT_DOCUMENT_TYPES } from "@/constants/object/documentTypes";
|
4
|
+
|
5
|
+
export function F_core76318({ SecurityTypeId }: { SecurityTypeId: number }) {
|
6
|
+
return (
|
7
|
+
<F_core76318_Read SecurityTypeId={SecurityTypeId} />
|
8
|
+
)
|
9
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
"use client";
|
2
|
+
import baseAxios from "@/api/baseAxios";
|
3
|
+
import { MyButtonCreate } from "@/components/Buttons/ButtonCRUD/MyButtonCreate";
|
4
|
+
import { MyDateInput } from "@/components/Inputs/DateInput/MyDateInput";
|
5
|
+
import { MyTextInput } from "@/components/Inputs/TextInput/MyTextInput";
|
6
|
+
import { OBJECT_DOCUMENT_TYPES } from "@/constants/object/documentTypes";
|
7
|
+
import { utils_file_fileToAQDocumentType } from "@/utils/utils_file";
|
8
|
+
import { FileInput } from "@mantine/core";
|
9
|
+
import { useForm } from "@mantine/form";
|
10
|
+
|
11
|
+
interface IDocument {
|
12
|
+
path?: string;
|
13
|
+
orderBy?: number;
|
14
|
+
documentType?: number;
|
15
|
+
promulgateDate?: Date;
|
16
|
+
decisionCode?: string;
|
17
|
+
departmentName?: string;
|
18
|
+
description?: string;
|
19
|
+
startDate?: Date;
|
20
|
+
endDate?: Date;
|
21
|
+
conclusion?: string;
|
22
|
+
note?: string;
|
23
|
+
documentAttributeId?: number;
|
24
|
+
documentAttributeName?: string;
|
25
|
+
isCycleCheck?: boolean;
|
26
|
+
meetingDate?: Date;
|
27
|
+
fileDetail?: {
|
28
|
+
fileBase64String?: string;
|
29
|
+
fileExtension?: string;
|
30
|
+
fileName?: string;
|
31
|
+
};
|
32
|
+
id?: number;
|
33
|
+
code?: string;
|
34
|
+
name?: string;
|
35
|
+
concurrencyStamp?: string;
|
36
|
+
isEnabled?: boolean;
|
37
|
+
ngayChinhSua?: Date;
|
38
|
+
nguoiChinhSua?: string;
|
39
|
+
}
|
40
|
+
interface I extends IDocument {
|
41
|
+
file?: File;
|
42
|
+
}
|
43
|
+
|
44
|
+
export function F_core76318_Create({ SecurityTypeId }: { SecurityTypeId: number }) {
|
45
|
+
const form = useForm<I>({
|
46
|
+
mode: "uncontrolled",
|
47
|
+
validate: {
|
48
|
+
decisionCode: (value) => (value ? null : "Không được để trống"),
|
49
|
+
promulgateDate: (value) => (value ? null : "Không được để trống"),
|
50
|
+
name: (value) => (value ? null : "Không được để trống"),
|
51
|
+
file: (value) => (value ? null : "Không được để trống"),
|
52
|
+
},
|
53
|
+
});
|
54
|
+
return (
|
55
|
+
<MyButtonCreate
|
56
|
+
objectName="văn bản"
|
57
|
+
form={form}
|
58
|
+
onSubmit={async (values) => {
|
59
|
+
return await baseAxios.post("/Document/create", {
|
60
|
+
...values,
|
61
|
+
DocumentType: SecurityTypeId, //1.4 Thông tin xây dựng, cải tiến, bảo trì hệ thống
|
62
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file!),
|
63
|
+
});
|
64
|
+
}}
|
65
|
+
>
|
66
|
+
<MyTextInput
|
67
|
+
withAsterisk
|
68
|
+
label="Số quy định"
|
69
|
+
{...form.getInputProps("decisionCode")}
|
70
|
+
/>
|
71
|
+
<MyDateInput
|
72
|
+
withAsterisk
|
73
|
+
label="Ngày ban hành"
|
74
|
+
{...form.getInputProps("promulgateDate")}
|
75
|
+
/>
|
76
|
+
<MyTextInput
|
77
|
+
withAsterisk
|
78
|
+
label="Tên tài liệu"
|
79
|
+
{...form.getInputProps("name")}
|
80
|
+
/>
|
81
|
+
<FileInput
|
82
|
+
withAsterisk
|
83
|
+
placeholder="Tải lên tài liệu"
|
84
|
+
label="Tài liệu"
|
85
|
+
{...form.getInputProps("file")}
|
86
|
+
/>
|
87
|
+
</MyButtonCreate>
|
88
|
+
);
|
89
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import baseAxios from "@/api/baseAxios";
|
2
|
+
import { MyActionIconDelete } from "@/components/ActionIcons/ActionIconCRUD/MyActionIconDelete";
|
3
|
+
|
4
|
+
export function F_core76318_Delete({
|
5
|
+
id,
|
6
|
+
contextData,
|
7
|
+
}: {
|
8
|
+
id: number;
|
9
|
+
contextData: string;
|
10
|
+
}) {
|
11
|
+
return (
|
12
|
+
<MyActionIconDelete
|
13
|
+
contextData={contextData}
|
14
|
+
onSubmit={() => baseAxios.post("/Document/delete", { id: id })}
|
15
|
+
/>
|
16
|
+
);
|
17
|
+
}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
"use client";
|
2
|
+
import baseAxios from "@/api/baseAxios";
|
3
|
+
import { MyButtonViewPDF } from "@/components/Buttons/ButtonViewPDF/MyButtonViewPDF";
|
4
|
+
import { MyCenterFull } from "@/components/CenterFull/MyCenterFull";
|
5
|
+
import { MyDataTable } from "@/components/DataDisplay/DataTable/MyDataTable";
|
6
|
+
import { OBJECT_DOCUMENT_TYPES } from "@/constants/object/documentTypes";
|
7
|
+
import { U0DateToDDMMYYYString } from "@/utils/utils_date";
|
8
|
+
import { useQuery } from "@tanstack/react-query";
|
9
|
+
import { MRT_ColumnDef } from "mantine-react-table";
|
10
|
+
import { useMemo } from "react";
|
11
|
+
import { F_core76318_Create } from "./F_core76318_Create";
|
12
|
+
import { F_core76318_Delete } from "./F_core76318_Delete";
|
13
|
+
import { F_core76318_Update } from "./F_core76318_Update";
|
14
|
+
|
15
|
+
interface I {
|
16
|
+
path?: string;
|
17
|
+
orderBy?: number;
|
18
|
+
documentType?: number;
|
19
|
+
promulgateDate?: Date;
|
20
|
+
decisionCode?: string;
|
21
|
+
departmentName?: string;
|
22
|
+
description?: string;
|
23
|
+
startDate?: Date;
|
24
|
+
endDate?: Date;
|
25
|
+
conclusion?: string;
|
26
|
+
note?: string;
|
27
|
+
documentAttributeId?: number;
|
28
|
+
documentAttributeName?: string;
|
29
|
+
isCycleCheck?: boolean;
|
30
|
+
meetingDate?: Date;
|
31
|
+
fileDetail?: {
|
32
|
+
fileBase64String?: string;
|
33
|
+
fileExtension?: string;
|
34
|
+
fileName?: string;
|
35
|
+
};
|
36
|
+
id?: number;
|
37
|
+
code?: string;
|
38
|
+
name?: string;
|
39
|
+
concurrencyStamp?: string;
|
40
|
+
isEnabled?: boolean;
|
41
|
+
ngayChinhSua?: Date;
|
42
|
+
nguoiChinhSua?: string;
|
43
|
+
}
|
44
|
+
|
45
|
+
export default function F_core76318_Read({ SecurityTypeId }: { SecurityTypeId: number }) {
|
46
|
+
const query = useQuery<I[]>({
|
47
|
+
queryKey: ["F_core76318_Read"],
|
48
|
+
queryFn: async () => {
|
49
|
+
const result = await baseAxios.get(
|
50
|
+
`/Document/GetByType?documentType=${SecurityTypeId}`
|
51
|
+
);
|
52
|
+
return result.data?.data || [];
|
53
|
+
},
|
54
|
+
});
|
55
|
+
const columns = useMemo<MRT_ColumnDef<I>[]>(
|
56
|
+
() => [
|
57
|
+
{
|
58
|
+
header: "Số quy định",
|
59
|
+
accessorKey: "decisionCode",
|
60
|
+
},
|
61
|
+
{
|
62
|
+
header: "Ngày ban hành",
|
63
|
+
accessorFn: (row) =>
|
64
|
+
U0DateToDDMMYYYString(new Date(row.promulgateDate!)),
|
65
|
+
},
|
66
|
+
{
|
67
|
+
header: "Tên tài liệu",
|
68
|
+
accessorKey: "name",
|
69
|
+
},
|
70
|
+
{
|
71
|
+
header: "File",
|
72
|
+
accessorFn: (row) => {
|
73
|
+
return (
|
74
|
+
<MyCenterFull>
|
75
|
+
<MyButtonViewPDF id={row.id} />
|
76
|
+
</MyCenterFull>
|
77
|
+
);
|
78
|
+
},
|
79
|
+
},
|
80
|
+
],
|
81
|
+
[]
|
82
|
+
);
|
83
|
+
|
84
|
+
if (query.isLoading) return "Loading...";
|
85
|
+
if (query.isError) return "có lỗi xảy ra!";
|
86
|
+
return (
|
87
|
+
<MyDataTable
|
88
|
+
columns={columns}
|
89
|
+
data={query.data!}
|
90
|
+
renderTopToolbarCustomActions={() => <F_core76318_Create SecurityTypeId={SecurityTypeId} />}
|
91
|
+
renderRowActions={({ row }) => {
|
92
|
+
return (
|
93
|
+
<MyCenterFull>
|
94
|
+
<F_core76318_Update values={row.original} />
|
95
|
+
<F_core76318_Delete
|
96
|
+
id={row.original.id!}
|
97
|
+
contextData={row.original.decisionCode?.toString()!}
|
98
|
+
/>
|
99
|
+
</MyCenterFull>
|
100
|
+
);
|
101
|
+
}}
|
102
|
+
/>
|
103
|
+
);
|
104
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import baseAxios from "@/api/baseAxios";
|
2
|
+
import { MyActionIconUpdate } from "@/components/ActionIcons/ActionIconCRUD/MyActionIconUpdate";
|
3
|
+
import { MyDateInput } from "@/components/Inputs/DateInput/MyDateInput";
|
4
|
+
import { utils_file_fileToAQDocumentType } from "@/utils/utils_file";
|
5
|
+
import { FileInput, TextInput } from "@mantine/core";
|
6
|
+
import { useForm } from "@mantine/form";
|
7
|
+
interface IDocument {
|
8
|
+
path?: string;
|
9
|
+
orderBy?: number;
|
10
|
+
documentType?: number;
|
11
|
+
promulgateDate?: Date;
|
12
|
+
decisionCode?: string;
|
13
|
+
departmentName?: string;
|
14
|
+
description?: string;
|
15
|
+
startDate?: Date;
|
16
|
+
endDate?: Date;
|
17
|
+
conclusion?: string;
|
18
|
+
note?: string;
|
19
|
+
documentAttributeId?: number;
|
20
|
+
documentAttributeName?: string;
|
21
|
+
isCycleCheck?: boolean;
|
22
|
+
meetingDate?: Date;
|
23
|
+
fileDetail?: {
|
24
|
+
fileBase64String?: string;
|
25
|
+
fileExtension?: string;
|
26
|
+
fileName?: string;
|
27
|
+
};
|
28
|
+
id?: number;
|
29
|
+
code?: string;
|
30
|
+
name?: string;
|
31
|
+
concurrencyStamp?: string;
|
32
|
+
isEnabled?: boolean;
|
33
|
+
ngayChinhSua?: Date;
|
34
|
+
nguoiChinhSua?: string;
|
35
|
+
}
|
36
|
+
interface I extends IDocument {
|
37
|
+
file?: File;
|
38
|
+
}
|
39
|
+
export function F_core76318_Update({ values }: { values: I }) {
|
40
|
+
const form = useForm<I>({
|
41
|
+
mode: "uncontrolled",
|
42
|
+
initialValues: {
|
43
|
+
...values,
|
44
|
+
file: new File(
|
45
|
+
[],
|
46
|
+
values.path?.split("/")[values.path.split("/").length - 1]!
|
47
|
+
),
|
48
|
+
promulgateDate: new Date(values.promulgateDate!),
|
49
|
+
},
|
50
|
+
validate: {
|
51
|
+
decisionCode: (value) => (value ? null : "Không được để trống"),
|
52
|
+
promulgateDate: (value) => (value ? null : "Không được để trống"),
|
53
|
+
name: (value) => (value ? null : "Không được để trống"),
|
54
|
+
file: (value) => (value ? null : "Không được để trống"),
|
55
|
+
},
|
56
|
+
});
|
57
|
+
return (
|
58
|
+
<MyActionIconUpdate
|
59
|
+
form={form}
|
60
|
+
onSubmit={async (values) => {
|
61
|
+
return await baseAxios.post("/Document/Update", {
|
62
|
+
...values,
|
63
|
+
fileDetail: await utils_file_fileToAQDocumentType(values.file!),
|
64
|
+
});
|
65
|
+
}}
|
66
|
+
>
|
67
|
+
<TextInput
|
68
|
+
withAsterisk
|
69
|
+
label="Số quy định"
|
70
|
+
{...form.getInputProps("decisionCode")}
|
71
|
+
/>
|
72
|
+
<MyDateInput
|
73
|
+
withAsterisk
|
74
|
+
label="Ngày ban hành"
|
75
|
+
{...form.getInputProps("promulgateDate")}
|
76
|
+
/>
|
77
|
+
<TextInput
|
78
|
+
withAsterisk
|
79
|
+
label="Tên tài liệu"
|
80
|
+
{...form.getInputProps("name")}
|
81
|
+
/>
|
82
|
+
<FileInput
|
83
|
+
withAsterisk
|
84
|
+
label="Chọn file"
|
85
|
+
{...form.getInputProps("file")}
|
86
|
+
/>
|
87
|
+
</MyActionIconUpdate>
|
88
|
+
);
|
89
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { I_BasicAppShell_LinkItem, MyFlexColumn, MyPageContent } from '@/components'
|
2
|
+
import { OBJECT_COlORS } from '@/constants/object/color'
|
3
|
+
import { Grid, Paper, ScrollArea } from '@mantine/core'
|
4
|
+
import { F_core83092_ReadUser } from './F_core83092_ReadUser'
|
5
|
+
import { F_core83092_Save } from './F_core83092_Save'
|
6
|
+
import { F_core83092_ViewMenuPermissions } from './F_core83092_ViewMenuPermissions'
|
7
|
+
|
8
|
+
export function F_core83092({ menuData }: { menuData: I_BasicAppShell_LinkItem[] }) {
|
9
|
+
return (
|
10
|
+
<Grid grow>
|
11
|
+
<Grid.Col span={4}>
|
12
|
+
<F_core83092_ReadUser />
|
13
|
+
</Grid.Col>
|
14
|
+
|
15
|
+
<Grid.Col span={8}>
|
16
|
+
<MyFlexColumn h={'80vh'} flex={1}>
|
17
|
+
<ScrollArea.Autosize h={'100%'}>
|
18
|
+
<Paper p={'md'} bg={OBJECT_COlORS.mantineBackgroundSecondary}>
|
19
|
+
<F_core83092_ViewMenuPermissions menuData={menuData} />
|
20
|
+
</Paper>
|
21
|
+
</ScrollArea.Autosize>
|
22
|
+
<F_core83092_Save />
|
23
|
+
</MyFlexColumn>
|
24
|
+
</Grid.Col>
|
25
|
+
</Grid>
|
26
|
+
)
|
27
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
'use client'
|
2
|
+
import baseAxios from "@/api/baseAxios";
|
3
|
+
import { MyDataTable } from "@/components/DataDisplay/DataTable/MyDataTable";
|
4
|
+
;
|
5
|
+
import { Container } from "@mantine/core";
|
6
|
+
import { useQuery } from "@tanstack/react-query";
|
7
|
+
import { MRT_ColumnDef, MRT_RowSelectionState } from "mantine-react-table";
|
8
|
+
import { useEffect, useMemo, useState } from "react";
|
9
|
+
import { useS_core83092 } from "./useS_core83092";
|
10
|
+
import { IBaseEntity } from "@/interfaces/base";
|
11
|
+
interface I_core83092_USer {
|
12
|
+
id?: number
|
13
|
+
userName?: string,
|
14
|
+
fullName?: string,
|
15
|
+
email?: string
|
16
|
+
}
|
17
|
+
|
18
|
+
export function F_core83092_ReadUser() {
|
19
|
+
const store = useS_core83092()
|
20
|
+
const query = useQ_core83092_Account_GetAdminAccount()
|
21
|
+
const [rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});
|
22
|
+
|
23
|
+
const columns = useMemo<MRT_ColumnDef<I_core83092_USer>[]>(
|
24
|
+
() => [
|
25
|
+
{
|
26
|
+
header: "Họ và tên",
|
27
|
+
accessorKey: "fullName",
|
28
|
+
size: 60
|
29
|
+
},
|
30
|
+
{
|
31
|
+
header: "Email",
|
32
|
+
accessorKey: "email",
|
33
|
+
},
|
34
|
+
],
|
35
|
+
[]
|
36
|
+
);
|
37
|
+
|
38
|
+
const handleRowClick = (rowId: string) => {
|
39
|
+
setRowSelection({ [rowId]: true }); // Chọn dòng hiện tại và xóa các dòng khác
|
40
|
+
store.setProperty("roleId", parseInt(rowId))
|
41
|
+
};
|
42
|
+
useEffect(() => {
|
43
|
+
if (store.state.roleId == 0) return
|
44
|
+
setRowSelection({ [store.state.roleId!]: true });
|
45
|
+
}, [store.state.roleId])
|
46
|
+
useEffect(() => {
|
47
|
+
if (!query.data) return
|
48
|
+
store.setProperty("roleId", query.data[0].id)
|
49
|
+
}, [query.data])
|
50
|
+
|
51
|
+
if (query.isLoading) return "Loading...";
|
52
|
+
if (query.isError) return "Có lỗi xảy ra!";
|
53
|
+
return (
|
54
|
+
<Container fluid w={'100%'}>
|
55
|
+
<MyDataTable
|
56
|
+
columns={columns}
|
57
|
+
data={query.data!}
|
58
|
+
getRowId={(row) => row.id?.toString()}
|
59
|
+
mantineTableBodyRowProps={({ row }) => ({
|
60
|
+
onClick: () => handleRowClick(row.id),
|
61
|
+
style: {
|
62
|
+
cursor: 'pointer',
|
63
|
+
backgroundColor: rowSelection[row.id] ? '#d0e7ff' : 'transparent',
|
64
|
+
},
|
65
|
+
})}
|
66
|
+
state={rowSelection}
|
67
|
+
/>
|
68
|
+
</Container>
|
69
|
+
);
|
70
|
+
}
|
71
|
+
|
72
|
+
function useQ_core83092_Account_GetAdminAccount() {
|
73
|
+
interface I extends IBaseEntity {
|
74
|
+
|
75
|
+
}
|
76
|
+
const query = useQuery<I[]>({
|
77
|
+
queryKey: ['useQ_core83092_Account_GetAdminAccount'],
|
78
|
+
queryFn: async () => {
|
79
|
+
const result = await baseAxios.get(`/Account/GetAdminAccount`, { params: { page: 5, pageNumber: 1 } });
|
80
|
+
return result.data?.data || []
|
81
|
+
},
|
82
|
+
refetchOnWindowFocus: false
|
83
|
+
});
|
84
|
+
return query
|
85
|
+
}
|
@@ -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 './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
|
+
userId?: number
|
20
|
+
}
|
21
|
+
export function F_core83092_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/UpdateUserPermission", body)
|
27
|
+
return res
|
28
|
+
}
|
29
|
+
})
|
30
|
+
function handleSave() {
|
31
|
+
mutation.mutate({
|
32
|
+
pagePermissions: store.state.rolePermissions!,
|
33
|
+
userId: 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
|
+
}
|