u
This commit is contained in:
31
src/nav.js
31
src/nav.js
@@ -17,6 +17,9 @@ import RequestQuoteIcon from '@mui/icons-material/RequestQuote';
|
||||
import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
|
||||
import LabelIcon from '@mui/icons-material/Label';
|
||||
import TuneIcon from '@mui/icons-material/Tune';
|
||||
import HistoryIcon from '@mui/icons-material/History';
|
||||
import PublicIcon from '@mui/icons-material/Public';
|
||||
import BarChartIcon from '@mui/icons-material/BarChart';
|
||||
import { isKategorienPath } from './components/category/categoryRoute';
|
||||
import { deliveryEditorAutomat } from './automats/deliveryEditorAutomat';
|
||||
|
||||
@@ -229,6 +232,29 @@ export const SUB_NAV = {
|
||||
help: 'Kundengruppen für Staffelpreise und Rabatte verwalten',
|
||||
},
|
||||
],
|
||||
'/infos': [
|
||||
{
|
||||
segment: '',
|
||||
label: 'ArticleHistory',
|
||||
title: 'ArticleHistory',
|
||||
icon: HistoryIcon,
|
||||
help: 'Historie aller Artikeländerungen und Ereignisse',
|
||||
},
|
||||
{
|
||||
segment: 'globalhistory',
|
||||
label: 'GlobalHistory',
|
||||
title: 'GlobalHistory',
|
||||
icon: PublicIcon,
|
||||
help: 'Globale System- und Änderungshistorie',
|
||||
},
|
||||
{
|
||||
segment: 'statistics',
|
||||
label: 'Statistics',
|
||||
title: 'Statistics',
|
||||
icon: BarChartIcon,
|
||||
help: 'Statistische Auswertungen und Kennzahlen',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export function isNavItemActive(pathname, navPath) {
|
||||
@@ -281,6 +307,11 @@ export function resolveActiveSub(pathname, sectionPath) {
|
||||
return rest;
|
||||
}
|
||||
|
||||
// Treat /infos/articlehistory as segment ''
|
||||
if (sectionPath === '/infos' && rest === 'articlehistory') {
|
||||
return '';
|
||||
}
|
||||
|
||||
const active = subNav.find((item) => {
|
||||
if (item.segment === 'kategorien') {
|
||||
return isKategorienPath(pathname);
|
||||
|
||||
Reference in New Issue
Block a user