update menu event alarm

This commit is contained in:
2025-10-23 12:57:54 +07:00
parent 4f518dba9c
commit 8c9ef41704
3 changed files with 46 additions and 86 deletions

View File

@@ -29,6 +29,8 @@ import {
DesktopOutlined,
NodeExpandOutlined,
GroupOutlined,
SlidersOutlined,
SnippetsOutlined,
} from '@ant-design/icons';
const { Text } = Typography;
@@ -93,7 +95,7 @@ const allItems = [
{
key: 'master-plant-section',
icon: <ProductOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/master/plant-section">Plant Section</Link>,
label: <Link to="/master/plant-section">Plant Sub Section</Link>,
},
{
key: 'master-brand-device',
@@ -127,20 +129,37 @@ const allItems = [
},
],
},
{
key: 'report',
icon: <SnippetsOutlined style={{ fontSize: '19px' }} />,
label: 'Report',
children: [
{
key: 'report-trending',
icon: <LineChartOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/report/trending">Trending</Link>,
},
{
key: 'report-report',
icon: <FileTextOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/report/report">Report</Link>,
},
],
},
{
key: 'history',
icon: <HistoryOutlined style={{ fontSize: '19px' }} />,
label: 'History',
children: [
{
key: 'history-trending',
icon: <LineChartOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/history/trending">Trending</Link>,
key: 'history-alarm',
icon: <AlertOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/history/alarm">Alarm</Link>,
},
{
key: 'history-report',
icon: <FileTextOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/history/report">Report</Link>,
key: 'history-event',
icon: <SlidersOutlined style={{ fontSize: '19px' }} />,
label: <Link to="/history/event">Event</Link>,
},
],
},
@@ -149,16 +168,7 @@ const allItems = [
icon: <BellOutlined style={{ fontSize: '19px' }} />,
label: (
<Link to="/notification" className="fontMenus">
Notifikasi
</Link>
),
},
{
key: 'event-alarm',
icon: <AlertOutlined style={{ fontSize: '19px' }} />,
label: (
<Link to="/event-alarm" className="fontMenus">
Event Alarm
Notification
</Link>
),
},
@@ -206,9 +216,7 @@ const LayoutMenu = () => {
if (pathname === '/user') return 'user';
if (pathname === '/role') return 'role';
if (pathname === '/notification') return 'notification';
if (pathname === '/event-alarm') return 'event-alarm';
if (pathname === '/jadwal-shift') return 'jadwal-shift';
if (pathname === '/dashboard-svg') return 'dashboard-svg';
// Handle master routes
if (pathname.startsWith('/master/')) {
@@ -216,24 +224,24 @@ const LayoutMenu = () => {
return `master-${subPath}`;
}
// Handle master routes
// Handle dashboard svg routes
if (pathname.startsWith('/dashboard-svg/')) {
const subPath = pathParts[1];
return `dashboard-svg-${subPath}`;
}
// Handle report routes
if (pathname.startsWith('/report/')) {
const subPath = pathParts[1];
return `report-${subPath}`;
}
// Handle history routes
if (pathname.startsWith('/history/')) {
const subPath = pathParts[1];
return `history-${subPath}`;
}
// Handle shift management routes
if (pathname.startsWith('/shift-management/')) {
const subPath = pathParts[1];
return `shift-${subPath}`;
}
return 'home'; // default
};
@@ -241,8 +249,8 @@ const LayoutMenu = () => {
const getParentKey = (key) => {
if (key.startsWith('master-')) return 'master';
if (key.startsWith('dashboard-svg-')) return 'dashboard-svg';
if (key.startsWith('report-')) return 'report';
if (key.startsWith('history-')) return 'history';
if (key.startsWith('shift-')) return 'shift-management';
return null;
};