aq-fe-framework 0.1.156 → 0.1.157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-JLT4BL7I.mjs → chunk-ZO7PLULO.mjs} +4 -4
- package/dist/{css.module-4ICLUKPO.module.css → components/index.css} +16 -29
- package/dist/components/index.mjs +2 -2
- package/dist/modules-features/index.css +100 -0
- package/dist/modules-features/index.mjs +5 -5
- package/package.json +1 -1
- package/dist/api/apiFactory.ts +0 -46
- package/dist/api/baseAxios.ts +0 -22
- package/dist/app/admin/(core)/core12196/page.tsx +0 -13
- package/dist/app/admin/(core)/core16209/page.tsx +0 -13
- package/dist/app/admin/(core)/core18256/page.tsx +0 -12
- package/dist/app/admin/(core)/core26965/page.tsx +0 -13
- package/dist/app/admin/(core)/core27311/page.tsx +0 -13
- package/dist/app/admin/(core)/core38677/page.tsx +0 -13
- package/dist/app/admin/(core)/core40207/page.tsx +0 -13
- package/dist/app/admin/(core)/core60524/page.tsx +0 -11
- package/dist/app/admin/(core)/core64229/page.tsx +0 -12
- package/dist/app/admin/(core)/core71678/page.tsx +0 -11
- package/dist/app/admin/(core)/core76318/page.tsx +0 -13
- package/dist/app/admin/(core)/core83092/page.tsx +0 -13
- package/dist/app/admin/[...slug]/page.tsx +0 -7
- package/dist/app/admin/error.tsx +0 -42
- package/dist/app/admin/layout.tsx +0 -21
- package/dist/app/admin/test/page.tsx +0 -44
- package/dist/app/auth/login/page.tsx +0 -14
- package/dist/app/globals.css +0 -59
- package/dist/app/layout.tsx +0 -39
- package/dist/app/page.tsx +0 -18
- package/dist/components/Aceternity/BoxesBackground/MyBoxes.tsx +0 -66
- package/dist/components/Aceternity/BoxesBackground/MyBoxesBackground.tsx +0 -31
- package/dist/components/ActionIcons/ActionIcon/MyActionIcon.tsx +0 -47
- package/dist/components/ActionIcons/ActionIconCRUD/MyActionIconDelete.tsx +0 -81
- package/dist/components/ActionIcons/ActionIconCRUD/MyActionIconUpdate.tsx +0 -68
- package/dist/components/ActionIcons/ActionIconCheck/MyActionIconCheck.tsx +0 -50
- package/dist/components/ActionIcons/ActionIconDownloadPDF/MyActionIconDownloadPDF.tsx +0 -13
- package/dist/components/ActionIcons/ActionIconModal/MyActionIconModal.tsx +0 -113
- package/dist/components/ActionIcons/ActionIconUpload/MyActionIconUpload.tsx +0 -19
- package/dist/components/ActionIcons/ActionIconViewPdf/MyActionIconViewPDF.tsx +0 -63
- package/dist/components/ActionIcons/SwitchTheme/MySwitchTheme.tsx +0 -36
- package/dist/components/AppSpotlight/MyAppSpotlight.tsx +0 -112
- package/dist/components/Buttons/Anchor/MyAnchorViewPDF.tsx +0 -46
- package/dist/components/Buttons/Button/MyButton.tsx +0 -90
- package/dist/components/Buttons/ButtonCRUD/AQButtonCreateByImportFile.tsx +0 -81
- package/dist/components/Buttons/ButtonCRUD/AQButtonExportData.tsx +0 -75
- package/dist/components/Buttons/ButtonCRUD/MyButtonCreate.tsx +0 -68
- package/dist/components/Buttons/ButtonImport/MyButtonImport.tsx +0 -29
- package/dist/components/Buttons/ButtonImport/SelectFieldModal.tsx +0 -100
- package/dist/components/Buttons/ButtonImport/SelectFileModal.tsx +0 -81
- package/dist/components/Buttons/ButtonImport/useS_ButtonImport.ts +0 -196
- package/dist/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx +0 -71
- package/dist/components/Buttons/ButtonModal/MyButtonModal.tsx +0 -117
- package/dist/components/Buttons/ButtonPrintPDF/MyButtonPrintPDF.tsx +0 -37
- package/dist/components/Buttons/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx +0 -174
- package/dist/components/Buttons/ButtonRouterBack/MyButtonRouterBack.tsx +0 -29
- package/dist/components/Buttons/ButtonViewPDF/MyButtonViewPDF.tsx +0 -121
- package/dist/components/Calendar/MyCalendar.tsx +0 -118
- package/dist/components/CenterFull/MyCenterFull.tsx +0 -10
- package/dist/components/Checkbox/MyCheckbox.tsx +0 -9
- package/dist/components/Combobox/Select/MySelect.tsx +0 -12
- package/dist/components/DataDisplay/Card/AQCard.tsx +0 -49
- package/dist/components/DataDisplay/CardInformation/MyCardInformation.tsx +0 -77
- package/dist/components/DataDisplay/DataTable/MyDataTable.tsx +0 -184
- package/dist/components/DataDisplay/IconText/MyIconText.tsx +0 -17
- package/dist/components/DataDisplay/KeyLabel/MyKeyLabel.tsx +0 -15
- package/dist/components/DataDisplay/NumberFormatter/MyNumberFormatter.tsx +0 -9
- package/dist/components/DataDisplay/StatCard/AQStatCard1.tsx +0 -68
- package/dist/components/FaviconSetter/FaviconSetter.tsx +0 -33
- package/dist/components/Inputs/DateInput/MyDateInput.tsx +0 -11
- package/dist/components/Inputs/Fieldset/MyFieldset.tsx +0 -32
- package/dist/components/Inputs/FileInput/MyFileInput.tsx +0 -12
- package/dist/components/Inputs/NumberInput/MyNumberInput.tsx +0 -12
- package/dist/components/Inputs/TextArea/MyTextArea.tsx +0 -11
- package/dist/components/Inputs/TextEditor/MyTextEditor.tsx +0 -191
- package/dist/components/Inputs/TextInput/MyTextInput.tsx +0 -30
- package/dist/components/Layouts/BasicAppShell/BasicAppShell.tsx +0 -357
- package/dist/components/Layouts/BasicAppShell/css.module.css +0 -62
- package/dist/components/Layouts/BasicAppShell/useS_BasicAppShell.ts +0 -64
- package/dist/components/Layouts/Container/MyContainer.tsx +0 -16
- package/dist/components/Layouts/FlexColumn/MyFlexColumn.tsx +0 -14
- package/dist/components/Layouts/FlexEnd/MyFlexEnd.tsx +0 -14
- package/dist/components/Layouts/FlexRow/MyFlexRow.tsx +0 -14
- package/dist/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx +0 -147
- package/dist/components/Layouts/HeaderMegaMenu/HeaderMegaMenuStore.ts +0 -19
- package/dist/components/Layouts/HeaderMegaMenu/css.module.css +0 -50
- package/dist/components/Layouts/HtmlWrapper/MyHtmlWrapper.tsx +0 -29
- package/dist/components/Layouts/PageContent/MyPageContent.tsx +0 -67
- package/dist/components/Layouts/Tab/MyTab.tsx +0 -33
- package/dist/components/Loaders/MyCardioLoader.tsx +0 -12
- package/dist/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx +0 -61
- package/dist/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx +0 -37
- package/dist/components/ScheduleX/MyScheduleX.tsx +0 -58
- package/dist/components/Skeletons/SkeletonTable/MySkeletonTable.tsx +0 -9
- package/dist/components/index.ts +0 -62
- package/dist/constants/array/daysOfWeek.ts +0 -9
- package/dist/constants/enum/ENUM_EMAILCONFIG.ts +0 -6
- package/dist/constants/enum/global.ts +0 -26
- package/dist/constants/object/color.ts +0 -5
- package/dist/constants/object/documentTypes.ts +0 -8
- package/dist/css.module-P45UW6UZ.module.css +0 -4
- package/dist/data/menuData.ts +0 -31
- package/dist/hooks/custom-hooks/useC_MutationAction.tsx +0 -36
- package/dist/hooks/index.ts +0 -2
- package/dist/hooks/query/AQ/useQ_AQ_GetAQModule.ts +0 -14
- package/dist/interfaces/EmailConfig.ts +0 -10
- package/dist/interfaces/IAQModule.ts +0 -21
- package/dist/interfaces/base.ts +0 -9
- package/dist/interfaces/global-interface/IAQSSO.ts +0 -15
- package/dist/interfaces/global-interface/IAQSyncData.ts +0 -9
- package/dist/interfaces/global-interface/IAcademicYear.ts +0 -12
- package/dist/interfaces/global-interface/IChangePassWord.ts +0 -8
- package/dist/interfaces/global-interface/IComplaintProccess.ts +0 -9
- package/dist/interfaces/global-interface/ICreateAccount.ts +0 -24
- package/dist/interfaces/global-interface/IDocument.ts +0 -25
- package/dist/interfaces/global-interface/IDocumentAttribute.ts +0 -12
- package/dist/interfaces/global-interface/IEvent.ts +0 -30
- package/dist/interfaces/global-interface/IEventComplaint.ts +0 -20
- package/dist/interfaces/global-interface/IEventFillter.ts +0 -14
- package/dist/interfaces/global-interface/IFile.ts +0 -8
- package/dist/interfaces/global-interface/IImportStudentPaticipation.ts +0 -8
- package/dist/interfaces/global-interface/IPagePermission.ts +0 -12
- package/dist/interfaces/global-interface/IRolePermission.ts +0 -7
- package/dist/interfaces/global-interface/ISRMUserinfo.ts +0 -35
- package/dist/interfaces/global-interface/IScientificProfileProjectUser.ts +0 -15
- package/dist/interfaces/global-interface/IScientificProfileResearchGroup.ts +0 -15
- package/dist/interfaces/global-interface/IScientificProfileResearchGroupUser.ts +0 -14
- package/dist/interfaces/global-interface/IScientificProfileResearchProject.ts +0 -21
- package/dist/interfaces/global-interface/ISignIn.ts +0 -7
- package/dist/interfaces/global-interface/ISystemCatalogAcademicYear.ts +0 -15
- package/dist/interfaces/global-interface/ISystemCatalogDomainCategory.ts +0 -11
- package/dist/interfaces/global-interface/ISystemCatalogProjectLevelCategory.ts +0 -11
- package/dist/interfaces/global-interface/ISystemCatalogProjectTypeCategory.ts +0 -11
- package/dist/interfaces/global-interface/ISystemCatalogRoleActivity.ts +0 -11
- package/dist/interfaces/global-interface/ISystemCatalogTaskCategory.ts +0 -11
- package/dist/interfaces/global-interface/ISystemManagementAcademicHistory.ts +0 -31
- package/dist/interfaces/global-interface/ISystemManagementProfessionalWorkHistory.ts +0 -14
- package/dist/interfaces/global-interface/ISystemManagementPublishedScientificWork.ts +0 -14
- package/dist/interfaces/global-interface/ISystemManagementRoleGroup.ts +0 -12
- package/dist/interfaces/global-interface/ISystemManagementRoleGroupMenuPermission.ts +0 -18
- package/dist/interfaces/global-interface/ISystemManagementScientificResearchProject.ts +0 -16
- package/dist/interfaces/global-interface/ISystemManagementUserMenuPermission.ts +0 -18
- package/dist/interfaces/global-interface/IUpdateAccount.ts +0 -15
- package/dist/interfaces/global-interface/IUser.ts +0 -21
- package/dist/interfaces/global-interface/IUserPermission.ts +0 -7
- package/dist/lib/utils.ts +0 -6
- package/dist/modules-features/admin/core/MainDashboard/BarChart_CourseStatus.tsx +0 -87
- package/dist/modules-features/admin/core/MainDashboard/BarChart_ExamStatus.tsx +0 -65
- package/dist/modules-features/admin/core/MainDashboard/BarChart_RevenueByAcademicYear.tsx +0 -82
- package/dist/modules-features/admin/core/MainDashboard/BarChart_StudentStatusIn30Days.tsx +0 -67
- package/dist/modules-features/admin/core/MainDashboard/HBarChart_CourseDropOutPercentage.tsx +0 -77
- package/dist/modules-features/admin/core/MainDashboard/HBarChart_CourseProgressPercentage.tsx +0 -77
- package/dist/modules-features/admin/core/MainDashboard/LineChart_RevenueIn12Months.tsx +0 -78
- package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByDiscountIn3Months.tsx +0 -69
- package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByVoucherIn3Months.tsx +0 -69
- package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalStudentIn12Months.tsx +0 -64
- package/dist/modules-features/admin/core/MainDashboard/ViewDiscountStat.tsx +0 -311
- package/dist/modules-features/admin/core/MainDashboard/ViewVoucherStat.tsx +0 -311
- package/dist/modules-features/admin/core/core12196/F_core12196.tsx +0 -20
- package/dist/modules-features/admin/core/core12196/F_core12196_Create.tsx +0 -101
- package/dist/modules-features/admin/core/core12196/F_core12196_Delete.tsx +0 -19
- package/dist/modules-features/admin/core/core12196/F_core12196_Read.tsx +0 -165
- package/dist/modules-features/admin/core/core12196/F_core12196_Update.tsx +0 -112
- package/dist/modules-features/admin/core/core16209/F_core16209.tsx +0 -108
- package/dist/modules-features/admin/core/core16209/F_core16209_Create.tsx +0 -112
- package/dist/modules-features/admin/core/core16209/F_core16209_Delete.tsx +0 -17
- package/dist/modules-features/admin/core/core16209/F_core16209_Update.tsx +0 -114
- package/dist/modules-features/admin/core/core18256/F_core18256.tsx +0 -29
- package/dist/modules-features/admin/core/core18256/F_core18256_Create.tsx +0 -34
- package/dist/modules-features/admin/core/core18256/F_core18256_Delete.tsx +0 -14
- package/dist/modules-features/admin/core/core18256/F_core18256_Read.tsx +0 -59
- package/dist/modules-features/admin/core/core18256/F_core18256_Select.tsx +0 -40
- package/dist/modules-features/admin/core/core18256/F_core18256_Update.tsx +0 -22
- package/dist/modules-features/admin/core/core26965/F_core26965.tsx +0 -17
- package/dist/modules-features/admin/core/core26965/F_core26965_Create.tsx +0 -106
- package/dist/modules-features/admin/core/core26965/F_core26965_Delete.tsx +0 -19
- package/dist/modules-features/admin/core/core26965/F_core26965_Read.tsx +0 -165
- package/dist/modules-features/admin/core/core26965/F_core26965_Update.tsx +0 -112
- package/dist/modules-features/admin/core/core27311/F_core27311.tsx +0 -21
- package/dist/modules-features/admin/core/core27311/F_core27311_Create.tsx +0 -109
- package/dist/modules-features/admin/core/core27311/F_core27311_Delete.tsx +0 -19
- package/dist/modules-features/admin/core/core27311/F_core27311_Read.tsx +0 -165
- package/dist/modules-features/admin/core/core27311/F_core27311_Update.tsx +0 -113
- package/dist/modules-features/admin/core/core35923/F_core35923.tsx +0 -46
- package/dist/modules-features/admin/core/core38677/F_core38677.tsx +0 -28
- package/dist/modules-features/admin/core/core38677/F_core38677_ReadUser.tsx +0 -79
- package/dist/modules-features/admin/core/core38677/F_core38677_Save.tsx +0 -52
- package/dist/modules-features/admin/core/core38677/F_core38677_ViewMenuPermissions.tsx +0 -264
- package/dist/modules-features/admin/core/core40207/F_core40207.tsx +0 -9
- package/dist/modules-features/admin/core/core40207/F_core40207_Create.tsx +0 -81
- package/dist/modules-features/admin/core/core40207/F_core40207_Delete.tsx +0 -17
- package/dist/modules-features/admin/core/core40207/F_core40207_Read.tsx +0 -98
- package/dist/modules-features/admin/core/core40207/F_core40207_Update.tsx +0 -83
- package/dist/modules-features/admin/core/core47643/F_core47643.tsx +0 -10
- package/dist/modules-features/admin/core/core47643/F_core47643_Delete.tsx +0 -13
- package/dist/modules-features/admin/core/core47643/F_core47643_Form.tsx +0 -34
- package/dist/modules-features/admin/core/core47643/F_core47643_Read.tsx +0 -57
- package/dist/modules-features/admin/core/core60524/F_core60524.tsx +0 -13
- package/dist/modules-features/admin/core/core60524/F_core60524_Form.tsx +0 -111
- package/dist/modules-features/admin/core/core60524/F_core60524_Save.tsx +0 -56
- package/dist/modules-features/admin/core/core60524/useS_core60524.ts +0 -16
- package/dist/modules-features/admin/core/core64229/F_core64229.tsx +0 -7
- package/dist/modules-features/admin/core/core64229/F_core64229_Delete.tsx +0 -21
- package/dist/modules-features/admin/core/core64229/F_core64229_Form.tsx +0 -95
- package/dist/modules-features/admin/core/core64229/F_core64229_Read.tsx +0 -67
- package/dist/modules-features/admin/core/core71678/F_core71678.tsx +0 -8
- package/dist/modules-features/admin/core/core71678/F_core71678_ChangePermission.tsx +0 -117
- package/dist/modules-features/admin/core/core71678/F_core71678_Create.tsx +0 -61
- package/dist/modules-features/admin/core/core71678/F_core71678_Delete.tsx +0 -16
- package/dist/modules-features/admin/core/core71678/F_core71678_Read.tsx +0 -92
- package/dist/modules-features/admin/core/core71678/F_core71678_Update.tsx +0 -49
- package/dist/modules-features/admin/core/core76318/F_core76318.tsx +0 -9
- package/dist/modules-features/admin/core/core76318/F_core76318_Create.tsx +0 -89
- package/dist/modules-features/admin/core/core76318/F_core76318_Delete.tsx +0 -17
- package/dist/modules-features/admin/core/core76318/F_core76318_Read.tsx +0 -104
- package/dist/modules-features/admin/core/core76318/F_core76318_Update.tsx +0 -89
- package/dist/modules-features/admin/core/core83092/F_core83092.tsx +0 -27
- package/dist/modules-features/admin/core/core83092/F_core83092_ReadUser.tsx +0 -85
- package/dist/modules-features/admin/core/core83092/F_core83092_Save.tsx +0 -52
- package/dist/modules-features/admin/core/core83092/F_core83092_ViewMenuPermissions.tsx +0 -263
- package/dist/modules-features/admin/core/core83092/useS_core83092.tsx +0 -70
- package/dist/modules-features/authenticate/F_authenticate_Login/F_authenticate_Login.tsx +0 -154
- package/dist/modules-features/authenticate/F_authenticate_Login/css.module.css +0 -4
- package/dist/modules-features/authenticate/F_authenticate_Logout.tsx +0 -22
- package/dist/modules-features/authenticate/F_authenticate_SplashPage.tsx +0 -21
- package/dist/modules-features/authenticate/useS_authenticate.ts +0 -23
- package/dist/modules-features/index.ts +0 -79
- package/dist/providers/MyMantineProvider.tsx +0 -140
- package/dist/providers/MyReactQueryProvider.tsx +0 -24
- package/dist/providers/Provider.tsx +0 -13
- package/dist/providers/mantine.module.css +0 -21
- package/dist/stores/CreateGenericStore.ts +0 -23
- package/dist/stores/index.ts +0 -1
- package/dist/types/types.ts +0 -16
- package/dist/utils/index.ts +0 -9
- package/dist/utils/utils_converter.ts +0 -39
- package/dist/utils/utils_currency.ts +0 -5
- package/dist/utils/utils_date.ts +0 -34
- package/dist/utils/utils_excel.ts +0 -128
- package/dist/utils/utils_file.ts +0 -61
- package/dist/utils/utils_notification.ts +0 -46
- package/dist/utils/utils_pdf.ts +0 -21
- package/dist/utils/utils_time.ts +0 -15
- package/dist/utils/utils_validateForm.ts +0 -9
@@ -1,92 +0,0 @@
|
|
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
|
-
|
@@ -1,49 +0,0 @@
|
|
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
|
-
}
|
@@ -1,9 +0,0 @@
|
|
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
|
-
}
|
@@ -1,89 +0,0 @@
|
|
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
|
-
}
|
@@ -1,17 +0,0 @@
|
|
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
|
-
}
|
@@ -1,104 +0,0 @@
|
|
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
|
-
}
|
@@ -1,89 +0,0 @@
|
|
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
|
-
}
|
@@ -1,27 +0,0 @@
|
|
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
|
-
}
|
@@ -1,85 +0,0 @@
|
|
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
|
-
}
|
@@ -1,52 +0,0 @@
|
|
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
|
-
}
|