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,87 +0,0 @@
|
|
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
|
-
}
|
@@ -1,65 +0,0 @@
|
|
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
|
-
}
|
@@ -1,82 +0,0 @@
|
|
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
|
-
}
|
@@ -1,67 +0,0 @@
|
|
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
|
-
}
|
package/dist/modules-features/admin/core/MainDashboard/HBarChart_CourseDropOutPercentage.tsx
DELETED
@@ -1,77 +0,0 @@
|
|
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
|
-
}
|
package/dist/modules-features/admin/core/MainDashboard/HBarChart_CourseProgressPercentage.tsx
DELETED
@@ -1,77 +0,0 @@
|
|
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
|
-
}
|
@@ -1,78 +0,0 @@
|
|
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
|
-
}
|
package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByDiscountIn3Months.tsx
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
import { LineChart } from '@mantine/charts';
|
2
|
-
import { Group, Paper, Text } from '@mantine/core';
|
3
|
-
|
4
|
-
const data = [
|
5
|
-
{ month: '09/24', revenue: 59000000 },
|
6
|
-
{ month: '10/24', revenue: 206000000 },
|
7
|
-
{ month: '11/24', revenue: 125000000 },
|
8
|
-
];
|
9
|
-
|
10
|
-
interface ChartTooltipProps {
|
11
|
-
label: string;
|
12
|
-
payload: Record<string, any>[] | undefined;
|
13
|
-
}
|
14
|
-
|
15
|
-
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
16
|
-
if (!payload) return null;
|
17
|
-
|
18
|
-
return (
|
19
|
-
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
20
|
-
<Text fw={500} mb={5}>
|
21
|
-
{isNaN(Date.parse(label)) ? label : new Date(label.replace(/(\d{2})\/(\d{2})/, '20$2-$1')).toLocaleDateString('vi-VN', { month: 'long', year: 'numeric' })}
|
22
|
-
</Text>
|
23
|
-
{payload.map((item: any) => (
|
24
|
-
<Text key={item.name} fz="sm">
|
25
|
-
Doanh thu: {formatCurrency(item.value)}
|
26
|
-
</Text>
|
27
|
-
))}
|
28
|
-
</Paper>
|
29
|
-
);
|
30
|
-
}
|
31
|
-
|
32
|
-
let formatCurrency = (value: number): string => {
|
33
|
-
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
34
|
-
}
|
35
|
-
|
36
|
-
let formatCurrency2 = (value: number): string => {
|
37
|
-
if (value >= 1000000000) {
|
38
|
-
return `${(value / 1000000000).toFixed(1)} tỷ`;
|
39
|
-
} else if (value >= 1000000) {
|
40
|
-
return `${(value / 1000000).toFixed(1)} tr`;
|
41
|
-
}
|
42
|
-
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
43
|
-
}
|
44
|
-
|
45
|
-
export default function LineChart_TotalRevenueByDiscountIn3Months() {
|
46
|
-
return (
|
47
|
-
<>
|
48
|
-
<Group>
|
49
|
-
<Text mb={"50"}>Doanh thu sử dụng chiết khấu 3 tháng qua</Text>
|
50
|
-
<LineChart
|
51
|
-
w={"100%"}
|
52
|
-
h={200}
|
53
|
-
data={data}
|
54
|
-
dataKey="month"
|
55
|
-
series={[
|
56
|
-
{ name: 'revenue', color: 'indigo.6' },
|
57
|
-
]}
|
58
|
-
tooltipProps={{
|
59
|
-
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
60
|
-
}}
|
61
|
-
curveType="linear"
|
62
|
-
yAxisLabel="Tổng doanh thu"
|
63
|
-
tickLine="y"
|
64
|
-
yAxisProps={{ width: 64, tickFormatter: (value: number) => formatCurrency2(value) }}
|
65
|
-
/>
|
66
|
-
</Group>
|
67
|
-
</>
|
68
|
-
);
|
69
|
-
}
|
package/dist/modules-features/admin/core/MainDashboard/LineChart_TotalRevenueByVoucherIn3Months.tsx
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
import { LineChart } from '@mantine/charts';
|
2
|
-
import { Group, Paper, Text } from '@mantine/core';
|
3
|
-
|
4
|
-
const data = [
|
5
|
-
{ month: '09/24', revenue: 69000000 },
|
6
|
-
{ month: '10/24', revenue: 206000000 },
|
7
|
-
{ month: '11/24', revenue: 842000000 },
|
8
|
-
];
|
9
|
-
|
10
|
-
interface ChartTooltipProps {
|
11
|
-
label: string;
|
12
|
-
payload: Record<string, any>[] | undefined;
|
13
|
-
}
|
14
|
-
|
15
|
-
function ChartTooltip({ label, payload }: ChartTooltipProps) {
|
16
|
-
if (!payload) return null;
|
17
|
-
|
18
|
-
return (
|
19
|
-
<Paper px="md" py="sm" withBorder shadow="md" radius="md">
|
20
|
-
<Text fw={500} mb={5}>
|
21
|
-
{isNaN(Date.parse(label)) ? label : new Date(label.replace(/(\d{2})\/(\d{2})/, '20$2-$1')).toLocaleDateString('vi-VN', { month: 'long', year: 'numeric' })}
|
22
|
-
</Text>
|
23
|
-
{payload.map((item: any) => (
|
24
|
-
<Text key={item.name} fz="sm">
|
25
|
-
Doanh thu: {formatCurrency(item.value)}
|
26
|
-
</Text>
|
27
|
-
))}
|
28
|
-
</Paper>
|
29
|
-
);
|
30
|
-
}
|
31
|
-
|
32
|
-
let formatCurrency = (value: number): string => {
|
33
|
-
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
34
|
-
}
|
35
|
-
|
36
|
-
let formatCurrency2 = (value: number): string => {
|
37
|
-
if (value >= 1000000000) {
|
38
|
-
return `${(value / 1000000000).toFixed(1)} tỷ`;
|
39
|
-
} else if (value >= 1000000) {
|
40
|
-
return `${(value / 1000000).toFixed(1)} tr`;
|
41
|
-
}
|
42
|
-
return value.toLocaleString('vi-VN', { style: 'currency', currency: 'VND' });
|
43
|
-
}
|
44
|
-
|
45
|
-
export default function LineChart_TotalRevenueByDiscountIn3Months() {
|
46
|
-
return (
|
47
|
-
<>
|
48
|
-
<Group>
|
49
|
-
<Text mb={"50"}>Doanh thu sử dụng mã giảm giá 3 tháng qua</Text>
|
50
|
-
<LineChart
|
51
|
-
w={"100%"}
|
52
|
-
h={200}
|
53
|
-
data={data}
|
54
|
-
dataKey="month"
|
55
|
-
series={[
|
56
|
-
{ name: 'revenue', color: 'indigo.6' },
|
57
|
-
]}
|
58
|
-
tooltipProps={{
|
59
|
-
content: ({ label, payload }) => <ChartTooltip label={label} payload={payload} />,
|
60
|
-
}}
|
61
|
-
curveType="linear"
|
62
|
-
yAxisLabel="Tổng doanh thu"
|
63
|
-
tickLine="y"
|
64
|
-
yAxisProps={{ width: 64, tickFormatter: (value: number) => formatCurrency2(value) }}
|
65
|
-
/>
|
66
|
-
</Group>
|
67
|
-
</>
|
68
|
-
);
|
69
|
-
}
|