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,357 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import { MySwitchTheme } from "@/components/ActionIcons/SwitchTheme/MySwitchTheme";
|
3
|
-
import { MyAppSpotlight } from "@/components/AppSpotlight/MyAppSpotlight";
|
4
|
-
import {
|
5
|
-
ActionIcon,
|
6
|
-
AppShell,
|
7
|
-
Badge,
|
8
|
-
Divider,
|
9
|
-
Group,
|
10
|
-
Image,
|
11
|
-
NavLink,
|
12
|
-
ScrollArea,
|
13
|
-
Select,
|
14
|
-
Text,
|
15
|
-
TextInput,
|
16
|
-
Tooltip
|
17
|
-
} from "@mantine/core";
|
18
|
-
import { useMediaQuery } from "@mantine/hooks";
|
19
|
-
import { spotlight } from "@mantine/spotlight";
|
20
|
-
import {
|
21
|
-
IconLayoutSidebarLeftCollapse,
|
22
|
-
IconLayoutSidebarLeftExpand,
|
23
|
-
IconLibraryMinus,
|
24
|
-
IconSearch,
|
25
|
-
} from "@tabler/icons-react";
|
26
|
-
import Link from "next/link";
|
27
|
-
import { usePathname } from "next/navigation";
|
28
|
-
import { ReactNode } from "react";
|
29
|
-
import { useS_BasicAppShell } from "./useS_BasicAppShell";
|
30
|
-
import { F_authenticate_Logout } from "@/modules-features/authenticate/F_authenticate_Logout";
|
31
|
-
|
32
|
-
export interface I_BasicAppShell_LinkItem {
|
33
|
-
pageId?: number;
|
34
|
-
name?: string;
|
35
|
-
label: string;
|
36
|
-
status?: "Default" | "Prototype" | "New" | "Menu" | "Change";
|
37
|
-
link?: string;
|
38
|
-
links?: I_BasicAppShell_LinkItem[];
|
39
|
-
}
|
40
|
-
|
41
|
-
function getRightSection(status: string) {
|
42
|
-
if (status === "Prototype")
|
43
|
-
return (
|
44
|
-
<Badge styles={{ root: { cursor: "pointer" } }} radius="xs" color="pink" circle>
|
45
|
-
P
|
46
|
-
</Badge>
|
47
|
-
);
|
48
|
-
if (status === "New")
|
49
|
-
return (
|
50
|
-
<Badge styles={{ root: { cursor: "pointer" } }} radius="xs" circle>
|
51
|
-
N
|
52
|
-
</Badge>
|
53
|
-
);
|
54
|
-
if (status === "Menu")
|
55
|
-
return (
|
56
|
-
<Badge styles={{ root: { cursor: "pointer" } }} radius="xs" color="gray" circle>
|
57
|
-
M
|
58
|
-
</Badge>
|
59
|
-
);
|
60
|
-
if (status === "Change")
|
61
|
-
return (
|
62
|
-
<Badge styles={{ root: { cursor: "pointer" } }} radius="xs" color="green" circle>
|
63
|
-
C
|
64
|
-
</Badge>
|
65
|
-
);
|
66
|
-
return null; // Fallback for unknown types
|
67
|
-
}
|
68
|
-
|
69
|
-
function RenderNavLinks({ items }: { items: I_BasicAppShell_LinkItem[] }) {
|
70
|
-
const basicAppShellStore = useS_BasicAppShell();
|
71
|
-
const pathName = usePathname();
|
72
|
-
return (
|
73
|
-
<>
|
74
|
-
{items.map((item, index) => (
|
75
|
-
<NavLink
|
76
|
-
active={item.link === pathName.split("/")[2]}
|
77
|
-
component={Link}
|
78
|
-
key={index}
|
79
|
-
rightSection={getRightSection(item.status!)}
|
80
|
-
opened={basicAppShellStore.state.groupMenuOpenId.includes(item.label)}
|
81
|
-
href={`/${pathName.split("/")[1]}/${item.link}` || "#"}
|
82
|
-
label={item.label}
|
83
|
-
childrenOffset={28}
|
84
|
-
// rightSection={item.link && "prototype"}
|
85
|
-
onClick={() => {
|
86
|
-
if (item.links) basicAppShellStore.toggleGroupMenuOpenId(item.label);
|
87
|
-
if (item.link) {
|
88
|
-
basicAppShellStore.setProperty("menuCode", item.link);
|
89
|
-
basicAppShellStore.setProperty("title", item.label);
|
90
|
-
}
|
91
|
-
}}
|
92
|
-
>
|
93
|
-
{item.links && <RenderNavLinks items={item.links} />}
|
94
|
-
</NavLink>
|
95
|
-
))}
|
96
|
-
</>
|
97
|
-
);
|
98
|
-
}
|
99
|
-
|
100
|
-
function childrenMenuToListEnumUsingPageIdAndName(children: I_BasicAppShell_LinkItem[]): I_BasicAppShell_LinkItem[] {
|
101
|
-
return children.flatMap((item) => {
|
102
|
-
if (item.label === "Quản lí hệ thống" || item.label === "Văn bản - Quy định") {
|
103
|
-
return []; // Exclude these menus
|
104
|
-
}
|
105
|
-
return item.links
|
106
|
-
? item.pageId
|
107
|
-
? [item, ...childrenMenuToListEnumUsingPageIdAndName(item.links)]
|
108
|
-
: childrenMenuToListEnumUsingPageIdAndName(item.links)
|
109
|
-
: item.pageId
|
110
|
-
? [item]
|
111
|
-
: [];
|
112
|
-
});
|
113
|
-
}
|
114
|
-
|
115
|
-
function validateMenuItems(items: I_BasicAppShell_LinkItem[]): boolean {
|
116
|
-
const pageIdSet = new Set<number>();
|
117
|
-
const nameSet = new Set<string>();
|
118
|
-
|
119
|
-
for (const item of items) {
|
120
|
-
if (item.pageId) {
|
121
|
-
if (pageIdSet.has(item.pageId)) {
|
122
|
-
alert(`Duplicate pageId detected: ${item.pageId}`);
|
123
|
-
return false;
|
124
|
-
}
|
125
|
-
pageIdSet.add(item.pageId);
|
126
|
-
}
|
127
|
-
if (item.name) {
|
128
|
-
const enumName = "COE_" + item.name.replace(/\s+/g, "_");
|
129
|
-
if (nameSet.has(enumName)) {
|
130
|
-
alert(`Duplicate name detected: ${item.name}`);
|
131
|
-
return false;
|
132
|
-
}
|
133
|
-
nameSet.add(enumName);
|
134
|
-
}
|
135
|
-
}
|
136
|
-
|
137
|
-
return true;
|
138
|
-
}
|
139
|
-
|
140
|
-
function sortMenuItemsByPageId(items: I_BasicAppShell_LinkItem[]): I_BasicAppShell_LinkItem[] {
|
141
|
-
return items.sort((a, b) => (a.pageId ?? 0) - (b.pageId ?? 0));
|
142
|
-
}
|
143
|
-
|
144
|
-
export function BasicAppShell_transformMenuToEnum(prefixProjectName: string, menu: I_BasicAppShell_LinkItem[]) {
|
145
|
-
const items = childrenMenuToListEnumUsingPageIdAndName(menu);
|
146
|
-
|
147
|
-
if (!validateMenuItems(items)) {
|
148
|
-
return {};
|
149
|
-
}
|
150
|
-
|
151
|
-
return sortMenuItemsByPageId(items).reduce((acc, item) => {
|
152
|
-
if (item.pageId && item.name) {
|
153
|
-
acc[prefixProjectName + item.name.replace(/\s+/g, "_")] = item.pageId;
|
154
|
-
}
|
155
|
-
return acc;
|
156
|
-
}, {} as Record<string, number>);
|
157
|
-
}
|
158
|
-
|
159
|
-
interface BasicAppShellProps {
|
160
|
-
children: ReactNode,
|
161
|
-
menu: I_BasicAppShell_LinkItem[],
|
162
|
-
extraTopRight?: ReactNode
|
163
|
-
}
|
164
|
-
|
165
|
-
export function BasicAppShell({ children, menu, extraTopRight }: BasicAppShellProps) {
|
166
|
-
const basicAppShellStore = useS_BasicAppShell();
|
167
|
-
const media = useMediaQuery("(min-width: 72em)");
|
168
|
-
const selectMedia = useMediaQuery("(min-width: 80em)");
|
169
|
-
// console.log(BasicAppShell_transformMenuToEnum("STM_", menu));
|
170
|
-
|
171
|
-
return (
|
172
|
-
<AppShell
|
173
|
-
header={{ height: 60 }}
|
174
|
-
navbar={{
|
175
|
-
width: 333,
|
176
|
-
breakpoint: "sm",
|
177
|
-
collapsed: {
|
178
|
-
mobile: basicAppShellStore.state.opened,
|
179
|
-
desktop: !basicAppShellStore.state.opened,
|
180
|
-
},
|
181
|
-
}}
|
182
|
-
padding="md"
|
183
|
-
>
|
184
|
-
<AppShell.Header>
|
185
|
-
<MyAppSpotlight menu={menu} />
|
186
|
-
{/* For large screens - show all elements normally */}
|
187
|
-
{media ? (
|
188
|
-
<Group h="100%" px="md" justify="space-between" align="center">
|
189
|
-
{/* Left side */}
|
190
|
-
<Group h="100%">
|
191
|
-
<Tooltip
|
192
|
-
label={
|
193
|
-
basicAppShellStore.state.opened
|
194
|
-
? "Ẩn thanh menu"
|
195
|
-
: "Hiện thanh menu"
|
196
|
-
}
|
197
|
-
>
|
198
|
-
<ActionIcon
|
199
|
-
size="lg"
|
200
|
-
radius="md"
|
201
|
-
variant="default"
|
202
|
-
onClick={basicAppShellStore.toggle}
|
203
|
-
>
|
204
|
-
{basicAppShellStore.state.opened ? (
|
205
|
-
<IconLayoutSidebarLeftExpand />
|
206
|
-
) : (
|
207
|
-
<IconLayoutSidebarLeftCollapse />
|
208
|
-
)}
|
209
|
-
</ActionIcon>
|
210
|
-
</Tooltip>
|
211
|
-
<Tooltip label="Đóng tất cả menu">
|
212
|
-
<ActionIcon
|
213
|
-
size="lg"
|
214
|
-
radius="md"
|
215
|
-
variant="default"
|
216
|
-
onClick={() => basicAppShellStore.clearGroupMenuOpenId()}
|
217
|
-
>
|
218
|
-
<IconLibraryMinus />
|
219
|
-
</ActionIcon>
|
220
|
-
</Tooltip>
|
221
|
-
</Group>
|
222
|
-
|
223
|
-
{/* Center - placed with absolute positioning */}
|
224
|
-
<Group
|
225
|
-
style={{
|
226
|
-
position: "absolute",
|
227
|
-
left: "50%",
|
228
|
-
transform: "translateX(-50%)",
|
229
|
-
}}
|
230
|
-
>
|
231
|
-
<Text c="green" fw="bold">
|
232
|
-
{`${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}`}
|
233
|
-
</Text>
|
234
|
-
</Group>
|
235
|
-
|
236
|
-
{/* Right side */}
|
237
|
-
<Group>
|
238
|
-
{extraTopRight}
|
239
|
-
<MySwitchTheme />
|
240
|
-
</Group>
|
241
|
-
</Group>
|
242
|
-
) : (
|
243
|
-
// For mobile screens - simplified layout
|
244
|
-
<Group h="100%" px="md" justify="space-between">
|
245
|
-
{/* Left: Just menu toggle */}
|
246
|
-
<ActionIcon
|
247
|
-
size="lg"
|
248
|
-
radius="md"
|
249
|
-
variant="default"
|
250
|
-
onClick={basicAppShellStore.toggle}
|
251
|
-
>
|
252
|
-
{basicAppShellStore.state.opened ? (
|
253
|
-
<IconLayoutSidebarLeftExpand />
|
254
|
-
) : (
|
255
|
-
<IconLayoutSidebarLeftCollapse />
|
256
|
-
)}
|
257
|
-
</ActionIcon>
|
258
|
-
|
259
|
-
{/* Center: Short title */}
|
260
|
-
<Text c="green" fw="bold" size="sm">
|
261
|
-
{`${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}`}
|
262
|
-
</Text>
|
263
|
-
|
264
|
-
{/* Right: Just theme switch and dropdown menu for other options */}
|
265
|
-
<Group>
|
266
|
-
{extraTopRight}
|
267
|
-
<MySwitchTheme />
|
268
|
-
</Group>
|
269
|
-
</Group>
|
270
|
-
)}
|
271
|
-
</AppShell.Header>
|
272
|
-
<AppShell.Navbar>
|
273
|
-
<TextInput
|
274
|
-
mt={"md"}
|
275
|
-
placeholder="Tìm menu (Ctrl + K)"
|
276
|
-
mx={10}
|
277
|
-
component={"button"}
|
278
|
-
onClick={spotlight.open}
|
279
|
-
leftSection={<IconSearch />}
|
280
|
-
>
|
281
|
-
Tìm kiếm (Ctrl + K)
|
282
|
-
</TextInput>
|
283
|
-
<AppShell.Section grow component={ScrollArea} p={5}>
|
284
|
-
<RenderNavLinks items={menu} />
|
285
|
-
<Divider></Divider>
|
286
|
-
<F_authenticate_Logout />
|
287
|
-
</AppShell.Section>
|
288
|
-
<AppShell.Section p={"md"}>
|
289
|
-
<Divider></Divider>
|
290
|
-
<Image
|
291
|
-
fit="contain"
|
292
|
-
src={`data:image/${basicAppShellStore.state.logoFileDetail?.fileExtension};base64,
|
293
|
-
${basicAppShellStore.state.logoFileDetail?.fileBase64String}`}
|
294
|
-
h={"115px"}
|
295
|
-
fallbackSrc="https://placehold.co/600x400?text=Placeholder"
|
296
|
-
alt="Main logo"
|
297
|
-
w="330px"
|
298
|
-
></Image>
|
299
|
-
</AppShell.Section>
|
300
|
-
</AppShell.Navbar>
|
301
|
-
<AppShell.Main
|
302
|
-
bg={"light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))"}
|
303
|
-
>
|
304
|
-
{children}
|
305
|
-
</AppShell.Main>
|
306
|
-
|
307
|
-
</AppShell >
|
308
|
-
);
|
309
|
-
}
|
310
|
-
|
311
|
-
export const groupToTwoLevels = (menu: I_BasicAppShell_LinkItem[]): I_BasicAppShell_LinkItem[] => {
|
312
|
-
return menu
|
313
|
-
.map((item) => {
|
314
|
-
if (item.links) {
|
315
|
-
const flattenedLinks: I_BasicAppShell_LinkItem[] = [];
|
316
|
-
|
317
|
-
const flattenSubLinks = (subLinks: I_BasicAppShell_LinkItem[]) => {
|
318
|
-
subLinks.forEach((subItem) => {
|
319
|
-
if (subItem.links) {
|
320
|
-
flattenSubLinks(subItem.links); // Flatten deeper levels
|
321
|
-
} else {
|
322
|
-
if (subItem.pageId != undefined) {
|
323
|
-
flattenedLinks.push(subItem);
|
324
|
-
}
|
325
|
-
}
|
326
|
-
});
|
327
|
-
};
|
328
|
-
|
329
|
-
flattenSubLinks(item.links);
|
330
|
-
|
331
|
-
return {
|
332
|
-
...item,
|
333
|
-
links: flattenedLinks, // Replace with flattened links
|
334
|
-
};
|
335
|
-
}
|
336
|
-
|
337
|
-
if (item.pageId != undefined) {
|
338
|
-
return item;
|
339
|
-
}
|
340
|
-
return undefined;
|
341
|
-
})
|
342
|
-
.filter((item) => item != undefined);
|
343
|
-
};
|
344
|
-
export function utils_layout_getItemsWithoutLinks(menu: I_BasicAppShell_LinkItem[]) {
|
345
|
-
let result: I_BasicAppShell_LinkItem[] = [];
|
346
|
-
function traverse(items: I_BasicAppShell_LinkItem[]) {
|
347
|
-
for (const item of items) {
|
348
|
-
if (!item.links) {
|
349
|
-
result.push(item);
|
350
|
-
} else {
|
351
|
-
traverse(item.links);
|
352
|
-
}
|
353
|
-
}
|
354
|
-
}
|
355
|
-
traverse(menu);
|
356
|
-
return result;
|
357
|
-
}
|
@@ -1,62 +0,0 @@
|
|
1
|
-
.navbar {
|
2
|
-
height: rem(700px);
|
3
|
-
padding: var(--mantine-spacing-md);
|
4
|
-
display: flex;
|
5
|
-
flex-direction: column;
|
6
|
-
border-right: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
7
|
-
}
|
8
|
-
|
9
|
-
.navbarMain {
|
10
|
-
flex: 1;
|
11
|
-
}
|
12
|
-
|
13
|
-
.header {
|
14
|
-
padding-bottom: var(--mantine-spacing-md);
|
15
|
-
margin-bottom: calc(var(--mantine-spacing-md) * 1.5);
|
16
|
-
border-bottom: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
17
|
-
}
|
18
|
-
|
19
|
-
.footer {
|
20
|
-
padding-top: var(--mantine-spacing-md);
|
21
|
-
margin-top: var(--mantine-spacing-md);
|
22
|
-
border-top: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
23
|
-
}
|
24
|
-
|
25
|
-
.link {
|
26
|
-
display: flex;
|
27
|
-
align-items: center;
|
28
|
-
text-decoration: none;
|
29
|
-
font-size: var(--mantine-font-size-sm);
|
30
|
-
color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
|
31
|
-
padding: var(--mantine-spacing-xs) var(--mantine-spacing-sm);
|
32
|
-
border-radius: var(--mantine-radius-sm);
|
33
|
-
font-weight: 500;
|
34
|
-
|
35
|
-
@mixin hover {
|
36
|
-
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
|
37
|
-
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
|
38
|
-
|
39
|
-
.linkIcon {
|
40
|
-
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
&[data-active] {
|
45
|
-
&,
|
46
|
-
&:hover {
|
47
|
-
background-color: var(--mantine-color-blue-light);
|
48
|
-
color: var(--mantine-color-blue-light-color);
|
49
|
-
|
50
|
-
.linkIcon {
|
51
|
-
color: var(--mantine-color-blue-light-color);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
.linkIcon {
|
58
|
-
color: light-dark(var(--mantine-color-gray-6), var(--mantine-color-dark-2));
|
59
|
-
margin-right: var(--mantine-spacing-sm);
|
60
|
-
width: rem(25px);
|
61
|
-
height: rem(25px);
|
62
|
-
}
|
@@ -1,64 +0,0 @@
|
|
1
|
-
import { useQ_AQ_GetAQModule } from "@/hooks/query/AQ/useQ_AQ_GetAQModule";
|
2
|
-
import { createGenericStore } from "@/stores";
|
3
|
-
import { IAQFileDetail } from "@/utils";
|
4
|
-
|
5
|
-
interface I {
|
6
|
-
moduleCode?: string
|
7
|
-
moduleName?: string
|
8
|
-
|
9
|
-
logoFileDetail?: IAQFileDetail,
|
10
|
-
faviconFileDetail?: IAQFileDetail
|
11
|
-
|
12
|
-
opened: boolean
|
13
|
-
title: string
|
14
|
-
groupMenuOpenId: string[]
|
15
|
-
menuCode?: string;
|
16
|
-
}
|
17
|
-
|
18
|
-
const useStore = createGenericStore<I>({
|
19
|
-
initialState: {
|
20
|
-
menuCode: "",
|
21
|
-
moduleCode: "Module code",
|
22
|
-
moduleName: "Module name",
|
23
|
-
title: "",
|
24
|
-
opened: true,
|
25
|
-
groupMenuOpenId: []
|
26
|
-
},
|
27
|
-
storageKey: "useS_BasicAppShell",
|
28
|
-
});
|
29
|
-
|
30
|
-
export function useS_BasicAppShell() {
|
31
|
-
const store = useStore();
|
32
|
-
const GetAQModule_query = useQ_AQ_GetAQModule()
|
33
|
-
function toggle() {
|
34
|
-
store.setProperty("opened", !store.state.opened);
|
35
|
-
}
|
36
|
-
function toggleGroupMenuOpenId(id: string) {
|
37
|
-
const currentIds = store.state.groupMenuOpenId;
|
38
|
-
if (currentIds.includes(id)) {
|
39
|
-
// Nếu id đã tồn tại, xóa nó
|
40
|
-
store.setProperty(
|
41
|
-
"groupMenuOpenId",
|
42
|
-
currentIds.filter((existingId) => existingId !== id)
|
43
|
-
);
|
44
|
-
} else {
|
45
|
-
store.setProperty("groupMenuOpenId", [...currentIds, id]);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
function clearGroupMenuOpenId() {
|
49
|
-
store.setProperty("groupMenuOpenId", []);
|
50
|
-
}
|
51
|
-
function setDefault() {
|
52
|
-
if (!GetAQModule_query.data) return
|
53
|
-
store.setProperty("faviconFileDetail", GetAQModule_query.data?.faviconFileDetail)
|
54
|
-
store.setProperty("logoFileDetail", GetAQModule_query.data?.logoFileDetail)
|
55
|
-
}
|
56
|
-
|
57
|
-
return {
|
58
|
-
...store,
|
59
|
-
toggle,
|
60
|
-
toggleGroupMenuOpenId,
|
61
|
-
clearGroupMenuOpenId,
|
62
|
-
setDefault
|
63
|
-
};
|
64
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Container, ContainerProps, Flex } from '@mantine/core'
|
2
|
-
import { ReactNode } from 'react'
|
3
|
-
|
4
|
-
interface I extends ContainerProps {
|
5
|
-
children?: ReactNode
|
6
|
-
}
|
7
|
-
|
8
|
-
export function MyContainer({ children, ...rest }: I) {
|
9
|
-
return (
|
10
|
-
<Container fluid {...rest}>
|
11
|
-
<Flex direction={"column"}>
|
12
|
-
{children}
|
13
|
-
</Flex>
|
14
|
-
</Container>
|
15
|
-
)
|
16
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { Flex, FlexProps } from "@mantine/core";
|
2
|
-
import { ReactNode } from "react";
|
3
|
-
|
4
|
-
interface IMyFlexColumn extends FlexProps {
|
5
|
-
children?: ReactNode;
|
6
|
-
}
|
7
|
-
|
8
|
-
export function MyFlexColumn({ children, ...rest }: IMyFlexColumn) {
|
9
|
-
return (
|
10
|
-
<Flex direction={"column"} gap={"md"} {...rest}>
|
11
|
-
{children}
|
12
|
-
</Flex>
|
13
|
-
);
|
14
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { Group, GroupProps } from "@mantine/core";
|
2
|
-
import { ReactNode } from "react";
|
3
|
-
|
4
|
-
interface IMyFlexEnd extends GroupProps {
|
5
|
-
children: ReactNode;
|
6
|
-
}
|
7
|
-
|
8
|
-
export function MyFlexEnd({ children, ...rest }: IMyFlexEnd) {
|
9
|
-
return (
|
10
|
-
<Group justify="end" mt={"md"} {...rest}>
|
11
|
-
{children}
|
12
|
-
</Group>
|
13
|
-
);
|
14
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { Flex, FlexProps } from "@mantine/core";
|
2
|
-
import { ReactNode } from "react";
|
3
|
-
|
4
|
-
interface IFlexRow extends FlexProps {
|
5
|
-
children: ReactNode;
|
6
|
-
}
|
7
|
-
|
8
|
-
export function MyFlexRow({ children, ...rest }: IFlexRow) {
|
9
|
-
return (
|
10
|
-
<Flex gap={"md"} align={"center"} {...rest}>
|
11
|
-
{children}
|
12
|
-
</Flex>
|
13
|
-
);
|
14
|
-
}
|
@@ -1,147 +0,0 @@
|
|
1
|
-
'use client'
|
2
|
-
import { MySwitchTheme } from '@/components/ActionIcons/SwitchTheme/MySwitchTheme';
|
3
|
-
import { OBJECT_COlORS } from '@/constants/object/color';
|
4
|
-
import {
|
5
|
-
Box,
|
6
|
-
Burger,
|
7
|
-
Button,
|
8
|
-
Container,
|
9
|
-
Divider,
|
10
|
-
Drawer,
|
11
|
-
Group,
|
12
|
-
Image,
|
13
|
-
ScrollArea,
|
14
|
-
Text,
|
15
|
-
TextInput,
|
16
|
-
ThemeIcon,
|
17
|
-
UnstyledButton,
|
18
|
-
useMantineTheme
|
19
|
-
} from '@mantine/core';
|
20
|
-
import { useDisclosure } from '@mantine/hooks';
|
21
|
-
import {
|
22
|
-
IconBook,
|
23
|
-
IconChartPie3,
|
24
|
-
IconCode,
|
25
|
-
IconCoin,
|
26
|
-
IconFingerprint,
|
27
|
-
IconNotification,
|
28
|
-
IconSearch
|
29
|
-
} from '@tabler/icons-react';
|
30
|
-
import Link from 'next/link';
|
31
|
-
import { ReactNode } from 'react';
|
32
|
-
import { MyFlexColumn } from '../FlexColumn/MyFlexColumn';
|
33
|
-
import classes from './css.module.css';
|
34
|
-
import { useHeaderMegaMenuStore } from './HeaderMegaMenuStore';
|
35
|
-
|
36
|
-
const mockdata = [
|
37
|
-
{
|
38
|
-
icon: IconCode,
|
39
|
-
title: 'Open source',
|
40
|
-
description: 'This Pokémon’s cry is very loud and distracting',
|
41
|
-
},
|
42
|
-
{
|
43
|
-
icon: IconCoin,
|
44
|
-
title: 'Free for everyone',
|
45
|
-
description: 'The fluid of Smeargle’s tail secretions changes',
|
46
|
-
},
|
47
|
-
{
|
48
|
-
icon: IconBook,
|
49
|
-
title: 'Documentation',
|
50
|
-
description: 'Yanma is capable of seeing 360 degrees without',
|
51
|
-
},
|
52
|
-
{
|
53
|
-
icon: IconFingerprint,
|
54
|
-
title: 'Security',
|
55
|
-
description: 'The shell’s rounded shape and the grooves on its.',
|
56
|
-
},
|
57
|
-
{
|
58
|
-
icon: IconChartPie3,
|
59
|
-
title: 'Analytics',
|
60
|
-
description: 'This Pokémon uses its flying ability to quickly chase',
|
61
|
-
},
|
62
|
-
{
|
63
|
-
icon: IconNotification,
|
64
|
-
title: 'Notifications',
|
65
|
-
description: 'Combusken battles with the intensely hot flames it spews',
|
66
|
-
},
|
67
|
-
];
|
68
|
-
interface IMenu {
|
69
|
-
label?: string,
|
70
|
-
href?: string
|
71
|
-
}
|
72
|
-
|
73
|
-
interface IHeaderMegaMenu {
|
74
|
-
children?: ReactNode
|
75
|
-
menus?: IMenu[]
|
76
|
-
}
|
77
|
-
|
78
|
-
export function HeaderMegaMenu({ children, menus }: IHeaderMegaMenu) {
|
79
|
-
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure(false);
|
80
|
-
const [linksOpened, { toggle: toggleLinks }] = useDisclosure(false);
|
81
|
-
const HeaderMegaMenuStore = useHeaderMegaMenuStore()
|
82
|
-
const theme = useMantineTheme();
|
83
|
-
|
84
|
-
const links = mockdata.map((item) => (
|
85
|
-
<UnstyledButton className={classes.subLink} key={item.title}>
|
86
|
-
<Group wrap="nowrap" align="flex-start">
|
87
|
-
<ThemeIcon size={34} variant="default" radius="md">
|
88
|
-
<item.icon size={22} color={theme.colors.blue[6]} />
|
89
|
-
</ThemeIcon>
|
90
|
-
<div>
|
91
|
-
<Text size="sm" fw={500}>
|
92
|
-
{item.title}
|
93
|
-
</Text>
|
94
|
-
<Text size="xs" c="dimmed">
|
95
|
-
{item.description}
|
96
|
-
</Text>
|
97
|
-
</div>
|
98
|
-
</Group>
|
99
|
-
</UnstyledButton>
|
100
|
-
));
|
101
|
-
|
102
|
-
return (
|
103
|
-
<Box>
|
104
|
-
<header className={classes.header} >
|
105
|
-
<Group justify="space-between" h="100%">
|
106
|
-
<Group>
|
107
|
-
<Image src={"/imgs/0/IMG0LogoAQTech.png"} h={30} alt="" w="auto"></Image>
|
108
|
-
|
109
|
-
<Group h="100%" gap={5} visibleFrom="sm" >
|
110
|
-
{menus?.map((item, idx) => (
|
111
|
-
<Button key={idx} component={Link} href={item.href!} variant={HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle"} onClick={() => HeaderMegaMenuStore.setState({ name: item.label })}>{item.label}</Button>
|
112
|
-
))}
|
113
|
-
</Group>
|
114
|
-
</Group>
|
115
|
-
|
116
|
-
<Group>
|
117
|
-
<TextInput placeholder='Tìm kiếm' leftSection={<IconSearch />} radius={'xl'} w={'250px'} />
|
118
|
-
<MySwitchTheme />
|
119
|
-
</Group>
|
120
|
-
<Burger opened={drawerOpened} onClick={toggleDrawer} hiddenFrom="sm" />
|
121
|
-
</Group>
|
122
|
-
</header>
|
123
|
-
<Container fluid pt={'sm'} pb={'md'} bg={OBJECT_COlORS.mantineBackgroundSecondary} mih={'93vh'}>
|
124
|
-
{children}
|
125
|
-
</Container>
|
126
|
-
<Drawer
|
127
|
-
opened={drawerOpened}
|
128
|
-
onClose={closeDrawer}
|
129
|
-
size="100%"
|
130
|
-
padding="md"
|
131
|
-
title="Navigation"
|
132
|
-
hiddenFrom="sm"
|
133
|
-
zIndex={1000000}
|
134
|
-
>
|
135
|
-
<ScrollArea h="calc(100vh - 80px" mx="-md">
|
136
|
-
<Divider my="sm" />
|
137
|
-
<MyFlexColumn h="100%" gap={0} >
|
138
|
-
{menus?.map((item, idx) => (
|
139
|
-
<Button key={idx} component={Link} href={item.href!} variant={HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle"} onClick={() => HeaderMegaMenuStore.setState({ name: item.label })}>{item.label}</Button>
|
140
|
-
))}
|
141
|
-
</MyFlexColumn>
|
142
|
-
<Divider my="sm" />
|
143
|
-
</ScrollArea>
|
144
|
-
</Drawer>
|
145
|
-
</Box>
|
146
|
-
);
|
147
|
-
}
|