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,16 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
export interface ISystemManagementScientificResearchProject {
|
4
|
+
id?: number;
|
5
|
+
code?: string | undefined;
|
6
|
+
name?: string | undefined;
|
7
|
+
concurrencyStamp?: string | undefined;
|
8
|
+
isEnabled?: boolean;
|
9
|
+
userId?: number;
|
10
|
+
projectName?: string | undefined;
|
11
|
+
startYear?: string | undefined;
|
12
|
+
endYear?: string | undefined;
|
13
|
+
projectLevel?: string | undefined;
|
14
|
+
responsibilities?: string | undefined;
|
15
|
+
|
16
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
export interface ISystemManagementUserMenuPermission {
|
4
|
+
id?: number;
|
5
|
+
code?: string | undefined;
|
6
|
+
name?: string | undefined;
|
7
|
+
concurrencyStamp?: string | undefined;
|
8
|
+
isEnabled?: boolean;
|
9
|
+
userId?: number;
|
10
|
+
menuId?: number;
|
11
|
+
isRead?: boolean | undefined;
|
12
|
+
isAdd?: boolean | undefined;
|
13
|
+
isUpdate?: boolean | undefined;
|
14
|
+
isPrint?: boolean | undefined;
|
15
|
+
isExport?: boolean | undefined;
|
16
|
+
isDelete?: boolean | undefined;
|
17
|
+
|
18
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
export interface IUpdateAccount {
|
4
|
+
isBlocked?: boolean;
|
5
|
+
id?: number;
|
6
|
+
isEnabled?: boolean;
|
7
|
+
fullName?: string | undefined;
|
8
|
+
code?: string | undefined;
|
9
|
+
email?: string | undefined;
|
10
|
+
phoneNumber?: string | undefined;
|
11
|
+
address?: string | undefined;
|
12
|
+
concurrencyStamp?: string | undefined;
|
13
|
+
workingUnitId?: number | undefined;
|
14
|
+
|
15
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
export interface IUser {
|
3
|
+
isBlocked: boolean;
|
4
|
+
roleId?: number | undefined;
|
5
|
+
userName: string;
|
6
|
+
passwordHash: string;
|
7
|
+
email?: string | undefined;
|
8
|
+
phoneNumber?: string | undefined;
|
9
|
+
address?: string | undefined;
|
10
|
+
avatarPath?: string | undefined;
|
11
|
+
fullName?: string | undefined;
|
12
|
+
lockoutEnd?: Date | undefined;
|
13
|
+
securityStamp: string;
|
14
|
+
expiresDate?: Date | undefined;
|
15
|
+
facultyId?: number | undefined;
|
16
|
+
majorsId?: number | undefined;
|
17
|
+
classId?: number | undefined;
|
18
|
+
signInWrongCount?: number | undefined;
|
19
|
+
isLocked?: boolean | undefined;
|
20
|
+
workingUnitId?: number | undefined;
|
21
|
+
}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"use client"
|
2
|
+
import { BarChart } from '@mantine/charts';
|
3
|
+
import { Group, Paper, Text, useMantineColorScheme } from '@mantine/core';
|
4
|
+
// import { BarChart } from "recharts";
|
5
|
+
|
6
|
+
const data = [
|
7
|
+
{ course_status: 'Đang mở', amount: 120, color: 'blue.6' },
|
8
|
+
{ course_status: 'Hoàn thành', amount: 50, color: 'green.6' },
|
9
|
+
{ course_status: 'Đã hủy', amount: 32, color: 'red.6' }
|
10
|
+
];
|
11
|
+
interface ChartTooltipProps {
|
12
|
+
label: string;
|
13
|
+
payload: Record<string, any>[] | undefined;
|
14
|
+
}
|
15
|
+
|
16
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
17
|
+
if (!payload) return null;
|
18
|
+
|
19
|
+
return (
|
20
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
21
|
+
<Text fw={500} mb={5}>
|
22
|
+
{label}
|
23
|
+
</Text>
|
24
|
+
{payload.map((item: any) => (
|
25
|
+
<Text key={item.name} c={item.color} fz="sm">
|
26
|
+
Số lượng: {item.value}
|
27
|
+
</Text>
|
28
|
+
))}
|
29
|
+
</Paper>
|
30
|
+
);
|
31
|
+
}
|
32
|
+
|
33
|
+
// interface DataItem {
|
34
|
+
// name: string;
|
35
|
+
// value: number;
|
36
|
+
// }
|
37
|
+
|
38
|
+
// const data2: DataItem[] = [
|
39
|
+
// { name: "Page A", value: 400 },
|
40
|
+
// { name: "Page B", value: 300 },
|
41
|
+
// { name: "Page C", value: 300 },
|
42
|
+
// { name: "Page D", value: 200 },
|
43
|
+
// ];
|
44
|
+
|
45
|
+
export default function BarChart_CourseStatus() {
|
46
|
+
const colorTheme = useMantineColorScheme()
|
47
|
+
return (
|
48
|
+
<>
|
49
|
+
<Group>
|
50
|
+
<Text mb={"50"}>Biểu đồ phân tích trạng thái khóa học</Text>
|
51
|
+
<BarChart
|
52
|
+
h={200}
|
53
|
+
w={"90%"}
|
54
|
+
data={data}
|
55
|
+
dataKey="course_status"
|
56
|
+
series={[
|
57
|
+
{ name: 'amount', color: 'color', label: 'Số lượng' },
|
58
|
+
]}
|
59
|
+
tooltipProps={{
|
60
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
61
|
+
}}
|
62
|
+
yAxisLabel="Số lượng"
|
63
|
+
yAxisProps={{ width: 64 }}
|
64
|
+
maxBarWidth={64}
|
65
|
+
tickLine="y"
|
66
|
+
barProps={{
|
67
|
+
label: {
|
68
|
+
position: 'top',
|
69
|
+
value: 'amount',
|
70
|
+
fill: colorTheme.colorScheme === 'dark' ? 'gray' : 'black',
|
71
|
+
}
|
72
|
+
}}
|
73
|
+
/>
|
74
|
+
|
75
|
+
{/* <BarChart width={600} height={300} data={data2}>
|
76
|
+
<CartesianGrid strokeDasharray="3 3" />
|
77
|
+
<XAxis dataKey="name" />
|
78
|
+
<YAxis />
|
79
|
+
<Tooltip />
|
80
|
+
<Bar dataKey="value" fill={"#2298ec"} color='black'>
|
81
|
+
<LabelList dataKey="value" fill="white" position="inside" />
|
82
|
+
</Bar>
|
83
|
+
</BarChart> */}
|
84
|
+
</Group>
|
85
|
+
</>
|
86
|
+
);
|
87
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use client"
|
2
|
+
import { BarChart } from '@mantine/charts';
|
3
|
+
import { Group, Paper, Text, useMantineColorScheme } from '@mantine/core';
|
4
|
+
|
5
|
+
const data = [
|
6
|
+
{ course_status: 'Đang mở', amount: 55, color: 'blue.6' },
|
7
|
+
{ course_status: 'Hoàn thành', amount: 20, color: 'green.6' },
|
8
|
+
{ course_status: 'Đã hủy', amount: 10, color: 'red.6' },
|
9
|
+
{ course_status: 'Đã cấp chứng chỉ', amount: 15, color: 'orange.6' }
|
10
|
+
];
|
11
|
+
interface ChartTooltipProps {
|
12
|
+
label: string;
|
13
|
+
payload: Record<string, any>[] | undefined;
|
14
|
+
}
|
15
|
+
|
16
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
17
|
+
if (!payload) return null;
|
18
|
+
|
19
|
+
return (
|
20
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
21
|
+
<Text fw={500} mb={5}>
|
22
|
+
{label}
|
23
|
+
</Text>
|
24
|
+
{payload.map((item: any) => (
|
25
|
+
<Text key={item.name} c={item.color} fz="sm">
|
26
|
+
Số lượng: {item.value}
|
27
|
+
</Text>
|
28
|
+
))}
|
29
|
+
</Paper>
|
30
|
+
);
|
31
|
+
}
|
32
|
+
|
33
|
+
export default function BarChart_ExamStatus() {
|
34
|
+
const colorTheme = useMantineColorScheme()
|
35
|
+
return (
|
36
|
+
<>
|
37
|
+
<Group>
|
38
|
+
<Text mb={"50"}>Biểu đồ phân tích trạng thái khóa thi</Text>
|
39
|
+
<BarChart
|
40
|
+
h={200}
|
41
|
+
w={"90%"}
|
42
|
+
data={data}
|
43
|
+
dataKey="course_status"
|
44
|
+
series={[
|
45
|
+
{ name: 'amount', color: 'color', label: 'Số lượng' },
|
46
|
+
]}
|
47
|
+
tooltipProps={{
|
48
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
49
|
+
}}
|
50
|
+
yAxisLabel="Số lượng"
|
51
|
+
yAxisProps={{ width: 64 }}
|
52
|
+
maxBarWidth={64}
|
53
|
+
tickLine="y"
|
54
|
+
barProps={{
|
55
|
+
label: {
|
56
|
+
position: 'top',
|
57
|
+
value: 'amount',
|
58
|
+
fill: colorTheme.colorScheme === 'dark' ? 'gray' : 'black',
|
59
|
+
}
|
60
|
+
}}
|
61
|
+
/>
|
62
|
+
</Group>
|
63
|
+
</>
|
64
|
+
);
|
65
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
"use client"
|
2
|
+
import { BarChart } from '@mantine/charts';
|
3
|
+
import { Group, Paper, Text, useMantineColorScheme } from '@mantine/core';
|
4
|
+
|
5
|
+
const data = [
|
6
|
+
{ academic_year: 'K2024', revenue: 167000000 },
|
7
|
+
{ academic_year: 'K2023', revenue: 132000000 },
|
8
|
+
{ academic_year: 'K2022', revenue: 69000000 },
|
9
|
+
{ academic_year: 'K2021', revenue: 85000000 },
|
10
|
+
{ academic_year: 'K2020', revenue: 92000000 },
|
11
|
+
{ academic_year: 'K2019', revenue: 78000000 },
|
12
|
+
{ academic_year: 'K2018', revenue: 105000000 }
|
13
|
+
];
|
14
|
+
interface ChartTooltipProps {
|
15
|
+
label: string;
|
16
|
+
payload: Record<string, any>[] | undefined;
|
17
|
+
}
|
18
|
+
|
19
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
20
|
+
if (!payload) return null;
|
21
|
+
|
22
|
+
return (
|
23
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
24
|
+
<Text fw={500} mb={5}>
|
25
|
+
{label}
|
26
|
+
</Text>
|
27
|
+
{payload.map((item: any) => (
|
28
|
+
<Text key={item.name} fz="sm">
|
29
|
+
Doanh thu: {formatCurrency(item.value)}
|
30
|
+
</Text>
|
31
|
+
))}
|
32
|
+
</Paper>
|
33
|
+
);
|
34
|
+
}
|
35
|
+
|
36
|
+
let formatCurrency = (value: number): string => {
|
37
|
+
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
38
|
+
}
|
39
|
+
|
40
|
+
let formatCurrency2 = (value: number): string => {
|
41
|
+
if (value >= 1000000000) {
|
42
|
+
return `${(value / 1000000000).toFixed(1)} tỷ`;
|
43
|
+
} else if (value >= 1000000) {
|
44
|
+
return `${(value / 1000000).toFixed(1)} tr`;
|
45
|
+
}
|
46
|
+
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
47
|
+
}
|
48
|
+
|
49
|
+
export default function BarChart_RevenueByAcademicYear() {
|
50
|
+
const colorTheme = useMantineColorScheme()
|
51
|
+
return (
|
52
|
+
<>
|
53
|
+
<Group>
|
54
|
+
<Text mb={"50"}>Biểu đồ phân tích doanh thu khóa học</Text>
|
55
|
+
<BarChart
|
56
|
+
h={200}
|
57
|
+
w={"90%"}
|
58
|
+
data={data}
|
59
|
+
dataKey="academic_year"
|
60
|
+
series={[
|
61
|
+
{ name: 'revenue', color: 'teal', label: 'Doanh thu' },
|
62
|
+
]}
|
63
|
+
tooltipProps={{
|
64
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
65
|
+
}}
|
66
|
+
yAxisLabel="Tổng doanh thu"
|
67
|
+
yAxisProps={{ width: 64, tickFormatter: (value: number) => formatCurrency2(value) }}
|
68
|
+
maxBarWidth={36}
|
69
|
+
tickLine="y"
|
70
|
+
barProps={{
|
71
|
+
label: {
|
72
|
+
formatter: (value: number) => formatCurrency2(value),
|
73
|
+
position: 'top',
|
74
|
+
value: 'amount',
|
75
|
+
fill: colorTheme.colorScheme === 'dark' ? 'gray' : 'black',
|
76
|
+
}
|
77
|
+
}}
|
78
|
+
/>
|
79
|
+
</Group>
|
80
|
+
</>
|
81
|
+
);
|
82
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
"use client"
|
2
|
+
import { BarChart } from '@mantine/charts';
|
3
|
+
import { Group, Paper, Text, useMantineColorScheme } from '@mantine/core';
|
4
|
+
|
5
|
+
const data = [
|
6
|
+
{ student_status: 'Chưa xếp lớp', amount: 94, color: 'orange.6' },
|
7
|
+
{ student_status: 'Đang học', amount: 154, color: 'blue.6' },
|
8
|
+
{ student_status: 'Tạm dừng', amount: 32, color: 'yellow.6' },
|
9
|
+
{ student_status: 'Hoàn thành', amount: 120, color: 'green.6' },
|
10
|
+
{ student_status: 'Bỏ học', amount: 5, color: '#96172e' }
|
11
|
+
];
|
12
|
+
interface ChartTooltipProps {
|
13
|
+
label: string;
|
14
|
+
payload: Record<string, any>[] | undefined;
|
15
|
+
}
|
16
|
+
|
17
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
18
|
+
if (!payload) return null;
|
19
|
+
|
20
|
+
return (
|
21
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
22
|
+
<Text fw={500} mb={5}>
|
23
|
+
{label}
|
24
|
+
</Text>
|
25
|
+
{payload.map((item: any) => (
|
26
|
+
<Text key={item.name} c={item.color} fz="sm">
|
27
|
+
Số lượng: {item.value}
|
28
|
+
</Text>
|
29
|
+
))}
|
30
|
+
</Paper>
|
31
|
+
);
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
export default function BarChart_StudentStatusIn30Days() {
|
36
|
+
const colorTheme = useMantineColorScheme()
|
37
|
+
return (
|
38
|
+
<>
|
39
|
+
<Group>
|
40
|
+
<Text mb={"50"}>Biểu đồ trạng thái học viên trong 30 ngày qua</Text>
|
41
|
+
<BarChart
|
42
|
+
h={200}
|
43
|
+
w={"90%"}
|
44
|
+
data={data}
|
45
|
+
dataKey="student_status"
|
46
|
+
series={[
|
47
|
+
{ name: 'amount', color: 'color', label: 'Số lượng' },
|
48
|
+
]}
|
49
|
+
tooltipProps={{
|
50
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
51
|
+
}}
|
52
|
+
yAxisLabel="Tổng số học viên"
|
53
|
+
yAxisProps={{ width: 64 }}
|
54
|
+
maxBarWidth={64}
|
55
|
+
tickLine="y"
|
56
|
+
barProps={{
|
57
|
+
label: {
|
58
|
+
position: 'top',
|
59
|
+
value: 'amount',
|
60
|
+
fill: colorTheme.colorScheme === 'dark' ? 'gray' : 'black',
|
61
|
+
}
|
62
|
+
}}
|
63
|
+
/>
|
64
|
+
</Group>
|
65
|
+
</>
|
66
|
+
);
|
67
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { BarChart } from '@mantine/charts';
|
2
|
+
import { Group, Paper, Text, useMantineColorScheme } from '@mantine/core';
|
3
|
+
|
4
|
+
const data = [
|
5
|
+
{ courseId: 1, courseName: 'Introduction to Programming K2024', dropOutPercent: 5 },
|
6
|
+
{ courseId: 2, courseName: 'Data Structures K2024', dropOutPercent: 0 },
|
7
|
+
{ courseId: 3, courseName: 'Algorithms K2023', dropOutPercent: 0 },
|
8
|
+
{ courseId: 4, courseName: 'Operating Systems K2024', dropOutPercent: 0 },
|
9
|
+
{ courseId: 5, courseName: 'Databases K2023', dropOutPercent: 0 },
|
10
|
+
{ courseId: 6, courseName: 'Computer Networks K2024', dropOutPercent: 2 },
|
11
|
+
{ courseId: 7, courseName: 'Software Engineering K2024', dropOutPercent: 0 },
|
12
|
+
{ courseId: 8, courseName: 'Artificial Intelligence K2023', dropOutPercent: 0 },
|
13
|
+
{ courseId: 9, courseName: 'Machine Learning K2024', dropOutPercent: 0 },
|
14
|
+
{ courseId: 10, courseName: 'Human-Computer Interaction K2023', dropOutPercent: 45 },
|
15
|
+
{ courseId: 11, courseName: 'Cybersecurity K2024', dropOutPercent: 30 },
|
16
|
+
{ courseId: 12, courseName: 'Cloud Computing K2023', dropOutPercent: 1 },
|
17
|
+
{ courseId: 13, courseName: 'Big Data Analytics K2024', dropOutPercent: 10 },
|
18
|
+
{ courseId: 14, courseName: 'Internet of Things K2023', dropOutPercent: 0 },
|
19
|
+
{ courseId: 15, courseName: 'Blockchain Technology K2024', dropOutPercent: 0 },
|
20
|
+
{ courseId: 16, courseName: 'Quantum Computing K2023', dropOutPercent: 0 }
|
21
|
+
];
|
22
|
+
|
23
|
+
interface ChartTooltipProps {
|
24
|
+
label: string;
|
25
|
+
payload: Record<string, any>[] | undefined;
|
26
|
+
}
|
27
|
+
|
28
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
29
|
+
if (!payload) return null;
|
30
|
+
return (
|
31
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
32
|
+
<Text fw={500} mb={5}>
|
33
|
+
{label}
|
34
|
+
</Text>
|
35
|
+
{payload.map((item: any) => (
|
36
|
+
<Text key={item.name} c={"black"} fz="sm">
|
37
|
+
Tỉ lệ vắng: {item.value}%
|
38
|
+
</Text>
|
39
|
+
))}
|
40
|
+
</Paper>
|
41
|
+
);
|
42
|
+
}
|
43
|
+
|
44
|
+
export default function HBarChart_CourseDropOutPercentage() {
|
45
|
+
const colorTheme = useMantineColorScheme()
|
46
|
+
|
47
|
+
return (
|
48
|
+
<Group>
|
49
|
+
<Text mb={"20"}>Biểu đồ theo dõi nguy cơ bỏ học</Text>
|
50
|
+
<BarChart
|
51
|
+
h={800}
|
52
|
+
w={"96%"}
|
53
|
+
data={data}
|
54
|
+
dataKey="courseName"
|
55
|
+
orientation="vertical"
|
56
|
+
yAxisProps={{ width: 220 }}
|
57
|
+
xAxisProps={{ domain: [0, 100] }}
|
58
|
+
tooltipProps={{
|
59
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
60
|
+
}}
|
61
|
+
series={[{ name: 'dropOutPercent', color: 'orange.6', label: 'courseName' }]}
|
62
|
+
barProps={{
|
63
|
+
label: {
|
64
|
+
position: 'right',
|
65
|
+
value: 'amount',
|
66
|
+
fill: colorTheme.colorScheme === 'dark' ? 'gray' : 'black',
|
67
|
+
// content: ({ value }) => `${value}%`,
|
68
|
+
}
|
69
|
+
}}
|
70
|
+
maxBarWidth={20}
|
71
|
+
tickLine="x"
|
72
|
+
yAxisLabel="Danh sách lớp"
|
73
|
+
xAxisLabel="Tỉ lệ vắng (%)"
|
74
|
+
/>
|
75
|
+
</Group>
|
76
|
+
);
|
77
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { BarChart } from '@mantine/charts';
|
2
|
+
import { Group, Paper, Text, useMantineColorScheme } from '@mantine/core';
|
3
|
+
|
4
|
+
const data = [
|
5
|
+
{ courseId: 1, courseName: 'Introduction to Programming K2024', progress: 50 },
|
6
|
+
{ courseId: 2, courseName: 'Data Structures K2024', progress: 75 },
|
7
|
+
{ courseId: 3, courseName: 'Algorithms K2023', progress: 60 },
|
8
|
+
{ courseId: 4, courseName: 'Operating Systems K2024', progress: 80 },
|
9
|
+
{ courseId: 5, courseName: 'Databases K2023', progress: 90 },
|
10
|
+
{ courseId: 6, courseName: 'Computer Networks K2024', progress: 70 },
|
11
|
+
{ courseId: 7, courseName: 'Software Engineering K2024', progress: 85 },
|
12
|
+
{ courseId: 8, courseName: 'Artificial Intelligence K2023', progress: 65 },
|
13
|
+
{ courseId: 9, courseName: 'Machine Learning K2024', progress: 55 },
|
14
|
+
{ courseId: 10, courseName: 'Human-Computer Interaction K2023', progress: 45 },
|
15
|
+
{ courseId: 11, courseName: 'Cybersecurity K2024', progress: 75 },
|
16
|
+
{ courseId: 12, courseName: 'Cloud Computing K2023', progress: 80 },
|
17
|
+
{ courseId: 13, courseName: 'Big Data Analytics K2024', progress: 70 },
|
18
|
+
{ courseId: 14, courseName: 'Internet of Things K2023', progress: 60 },
|
19
|
+
{ courseId: 15, courseName: 'Blockchain Technology K2024', progress: 50 },
|
20
|
+
{ courseId: 16, courseName: 'Quantum Computing K2023', progress: 40 }
|
21
|
+
];
|
22
|
+
|
23
|
+
interface ChartTooltipProps {
|
24
|
+
label: string;
|
25
|
+
payload: Record<string, any>[] | undefined;
|
26
|
+
}
|
27
|
+
|
28
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
29
|
+
if (!payload) return null;
|
30
|
+
return (
|
31
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
32
|
+
<Text fw={500} mb={5}>
|
33
|
+
{label}
|
34
|
+
</Text>
|
35
|
+
{payload.map((item: any) => (
|
36
|
+
<Text key={item.name} c={"black"} fz="sm">
|
37
|
+
Tiến độ: {item.value}%
|
38
|
+
</Text>
|
39
|
+
))}
|
40
|
+
</Paper>
|
41
|
+
);
|
42
|
+
}
|
43
|
+
|
44
|
+
export default function HBarChart_CourseProgressPercentage() {
|
45
|
+
const colorTheme = useMantineColorScheme()
|
46
|
+
|
47
|
+
return (
|
48
|
+
<Group>
|
49
|
+
<Text mb={"20"}>Biểu đồ theo dõi tiến độ giảng dạy của lớp</Text>
|
50
|
+
<BarChart
|
51
|
+
h={800}
|
52
|
+
w={"96%"}
|
53
|
+
data={data}
|
54
|
+
dataKey="courseName"
|
55
|
+
orientation="vertical"
|
56
|
+
yAxisProps={{ width: 220 }}
|
57
|
+
xAxisProps={{ domain: [0, 100] }}
|
58
|
+
tooltipProps={{
|
59
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
60
|
+
}}
|
61
|
+
series={[{ name: 'progress', color: 'blue.6', label: 'courseName' }]}
|
62
|
+
barProps={{
|
63
|
+
label: {
|
64
|
+
position: 'right',
|
65
|
+
value: 'amount',
|
66
|
+
fill: colorTheme.colorScheme === 'dark' ? 'gray' : 'black',
|
67
|
+
// content: ({ value }) => `${value}%`,
|
68
|
+
}
|
69
|
+
}}
|
70
|
+
maxBarWidth={20}
|
71
|
+
tickLine="x"
|
72
|
+
yAxisLabel="Danh sách lớp"
|
73
|
+
xAxisLabel="Tiến độ hoàn thành (%)"
|
74
|
+
/>
|
75
|
+
</Group>
|
76
|
+
);
|
77
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import { LineChart } from '@mantine/charts';
|
2
|
+
import { Group, Paper, Text } from '@mantine/core';
|
3
|
+
|
4
|
+
const data = [
|
5
|
+
{ month: '06/23', revenue: 79000000 },
|
6
|
+
{ month: '03/23', revenue: 106000000 },
|
7
|
+
{ month: '08/23', revenue: 70000000 },
|
8
|
+
{ month: '09/23', revenue: 86000000 },
|
9
|
+
{ month: '10/23', revenue: 93000000 },
|
10
|
+
{ month: '11/23', revenue: 79000000 },
|
11
|
+
{ month: '12/23', revenue: 106000000 },
|
12
|
+
{ month: '01/24', revenue: 170000000 },
|
13
|
+
{ month: '02/24', revenue: 135000000 },
|
14
|
+
{ month: '03/24', revenue: 70000000 },
|
15
|
+
{ month: '04/24', revenue: 86000000 },
|
16
|
+
{ month: '05/24', revenue: 93000000 },
|
17
|
+
];
|
18
|
+
|
19
|
+
interface ChartTooltipProps {
|
20
|
+
label: string;
|
21
|
+
payload: Record<string, any>[] | undefined;
|
22
|
+
}
|
23
|
+
|
24
|
+
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
25
|
+
if (!payload) return null;
|
26
|
+
|
27
|
+
return (
|
28
|
+
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
29
|
+
<Text fw={500} mb={5}>
|
30
|
+
{isNaN(Date.parse(label)) ? label : new Date(label.replace(/(\d{2})\/(\d{2})/, '20$2-$1')).toLocaleDateString('vi-VN', { month: 'long', year: 'numeric' })}
|
31
|
+
</Text>
|
32
|
+
{payload.map((item: any) => (
|
33
|
+
<Text key={item.name} fz="sm">
|
34
|
+
Doanh thu: {formatCurrency(item.value)}
|
35
|
+
</Text>
|
36
|
+
))}
|
37
|
+
</Paper>
|
38
|
+
);
|
39
|
+
}
|
40
|
+
|
41
|
+
let formatCurrency = (value: number): string => {
|
42
|
+
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
43
|
+
}
|
44
|
+
|
45
|
+
let formatCurrency2 = (value: number): string => {
|
46
|
+
if (value >= 1000000000) {
|
47
|
+
return `${(value / 1000000000).toFixed(1)} tỷ`;
|
48
|
+
} else if (value >= 1000000) {
|
49
|
+
return `${(value / 1000000).toFixed(1)} tr`;
|
50
|
+
}
|
51
|
+
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
52
|
+
}
|
53
|
+
|
54
|
+
export default function LineChart_RevenueIn12Months() {
|
55
|
+
return (
|
56
|
+
<>
|
57
|
+
<Group>
|
58
|
+
<Text mb={"50"}>Biểu đồ phân tích doanh thu khóa học 12 tháng qua</Text>
|
59
|
+
<LineChart
|
60
|
+
w={"100%"}
|
61
|
+
h={200}
|
62
|
+
data={data}
|
63
|
+
dataKey="month"
|
64
|
+
series={[
|
65
|
+
{ name: 'revenue', color: 'indigo.6' },
|
66
|
+
]}
|
67
|
+
tooltipProps={{
|
68
|
+
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
69
|
+
}}
|
70
|
+
curveType="linear"
|
71
|
+
yAxisLabel="Tổng doanh thu"
|
72
|
+
tickLine="y"
|
73
|
+
yAxisProps={{ width: 64, tickFormatter: (value: number) => formatCurrency2(value) }}
|
74
|
+
/>
|
75
|
+
</Group>
|
76
|
+
</>
|
77
|
+
);
|
78
|
+
}
|