u
This commit is contained in:
@@ -38,6 +38,9 @@ const OAuthAuthorizePage = lazy(() => import('./routes/oauth/OAuthAuthorizePage'
|
||||
const ArticleHistoryPage = lazy(() => import('./routes/infos/ArticleHistoryPage'));
|
||||
const GlobalHistoryPage = lazy(() => import('./routes/infos/GlobalHistoryPage'));
|
||||
const LedgerHistoryPage = lazy(() => import('./routes/infos/LedgerHistoryPage'));
|
||||
const CompanyAutomatDebugPage = import.meta.env.DEV
|
||||
? lazy(() => import('./routes/debug/CompanyAutomatPage'))
|
||||
: null;
|
||||
|
||||
function LoginRedirect() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
@@ -131,6 +134,19 @@ const routes = [
|
||||
{ path: ':entityId', element: <KundeEditPage /> },
|
||||
],
|
||||
},
|
||||
...(import.meta.env.DEV
|
||||
? [
|
||||
{
|
||||
path: 'debug',
|
||||
element: <SectionLayout sectionPath="/debug" />,
|
||||
children: [
|
||||
{ index: true, element: <CompanyAutomatDebugPage /> },
|
||||
{ path: 'company', element: <CompanyAutomatDebugPage /> },
|
||||
{ path: 'companyautomat', element: <CompanyAutomatDebugPage /> },
|
||||
],
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{ path: '*', element: <Navigate to="/artikel" replace /> },
|
||||
],
|
||||
},
|
||||
|
||||
30
src/nav.js
30
src/nav.js
@@ -25,6 +25,8 @@ import HistoryIcon from '@mui/icons-material/History';
|
||||
import PublicIcon from '@mui/icons-material/Public';
|
||||
import ReceiptLongIcon from '@mui/icons-material/ReceiptLong';
|
||||
import BarChartIcon from '@mui/icons-material/BarChart';
|
||||
import BugReportIcon from '@mui/icons-material/BugReport';
|
||||
import BusinessIcon from '@mui/icons-material/Business';
|
||||
import { isKategorienPath } from './components/category/categoryRoute';
|
||||
import { deliveryEditorAutomat } from './automats/deliveryEditorAutomat';
|
||||
import { NAV_ITEM_ACTIVE_ACCENT } from './colors';
|
||||
@@ -97,6 +99,16 @@ export const NAV_ITEMS = [
|
||||
icon: InfoIcon,
|
||||
help: 'Systemstatus, Serververbindung und Mandanteneinstellungen',
|
||||
},
|
||||
...(import.meta.env.DEV
|
||||
? [
|
||||
{
|
||||
path: '/debug',
|
||||
label: 'Debug',
|
||||
icon: BugReportIcon,
|
||||
help: 'Entwickler- und Diagnosewerkzeuge für Automats (nur im Dev-Modus)',
|
||||
},
|
||||
]
|
||||
: []),
|
||||
];
|
||||
|
||||
class DeliveryNeuIcon extends PureComponent {
|
||||
@@ -297,6 +309,19 @@ export const SUB_NAV = {
|
||||
help: 'Statistische Auswertungen und Kennzahlen',
|
||||
},
|
||||
],
|
||||
...(import.meta.env.DEV
|
||||
? {
|
||||
'/debug': [
|
||||
{
|
||||
segment: '',
|
||||
label: 'Company',
|
||||
title: 'Company Automat',
|
||||
icon: BusinessIcon,
|
||||
help: 'companyAutomat Eingänge, Ausgänge (Actions & Selectors) und internen State inspizieren & steuern',
|
||||
},
|
||||
],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
export function isNavItemActive(pathname, navPath) {
|
||||
@@ -359,6 +384,11 @@ export function resolveActiveSub(pathname, sectionPath) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Treat /debug/company and /debug/companyautomat as segment ''
|
||||
if (sectionPath === '/debug' && (rest === 'company' || rest === 'companyautomat')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const active = subNav.find((item) => {
|
||||
if (item.segment === 'kategorien') {
|
||||
return isKategorienPath(pathname);
|
||||
|
||||
3354
src/routes/debug/CompanyAutomatPage.jsx
Normal file
3354
src/routes/debug/CompanyAutomatPage.jsx
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user