This commit is contained in:
seb
2026-06-23 11:44:14 +02:00
parent 8c3e70d383
commit e84ba761c7
14 changed files with 118 additions and 55 deletions

View File

@@ -1,20 +0,0 @@
import { Outlet, useLocation } from 'react-router-dom';
import PageLayout from '../components/PageLayout';
import { NAV_ITEMS, SUB_NAV } from '../nav';
export default function SectionPage({ sectionPath, children }) {
const { pathname } = useLocation();
const title = NAV_ITEMS.find((item) => item.path === sectionPath)?.label ?? '';
const subNav = SUB_NAV[sectionPath];
const activeSub = subNav?.find((item) => {
const subPath = item.segment ? `${sectionPath}/${item.segment}` : sectionPath;
return pathname === subPath || pathname === `${subPath}/`;
});
const pageTitle = activeSub && subNav ? activeSub.label : title;
return (
<PageLayout title={pageTitle} subNav={subNav} basePath={sectionPath}>
{children ?? <Outlet />}
</PageLayout>
);
}

View File

@@ -1,9 +0,0 @@
import Typography from '@mui/material/Typography';
export default function SubPage({ title, description }) {
return (
<Typography color="text.secondary">
{description ?? `${title} — Inhalt folgt.`}
</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function ArtikelUebersichtPage() {
return (
<Typography color="text.secondary">Übersicht — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function ArtikelKategorienPage() {
return (
<Typography color="text.secondary">Kategorien — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function ArtikelLagerPage() {
return (
<Typography color="text.secondary">Lager — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function AuftragArchivPage() {
return (
<Typography color="text.secondary">Archiv — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function AuftragAktivePage() {
return (
<Typography color="text.secondary">Aktive Aufträge — Inhalt folgt.</Typography>
);
}

10
src/pages/index.jsx Normal file
View File

@@ -0,0 +1,10 @@
import Typography from '@mui/material/Typography';
import PageLayout from '../components/PageLayout';
export default function HomePage() {
return (
<PageLayout title="Home">
<Typography color="text.secondary">Home — Inhalt folgt.</Typography>
</PageLayout>
);
}

10
src/pages/infos/index.jsx Normal file
View File

@@ -0,0 +1,10 @@
import Typography from '@mui/material/Typography';
import PageLayout from '../../components/PageLayout';
export default function InfosPage() {
return (
<PageLayout title="Infos">
<Typography color="text.secondary">Infos — Inhalt folgt.</Typography>
</PageLayout>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function KundeGruppenPage() {
return (
<Typography color="text.secondary">Gruppen — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function KundeListePage() {
return (
<Typography color="text.secondary">Kundenliste — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,7 @@
import Typography from '@mui/material/Typography';
export default function KundeKontaktePage() {
return (
<Typography color="text.secondary">Kontakte — Inhalt folgt.</Typography>
);
}

View File

@@ -0,0 +1,10 @@
import Typography from '@mui/material/Typography';
import PageLayout from '../../components/PageLayout';
export default function LieferungPage() {
return (
<PageLayout title="Lieferung">
<Typography color="text.secondary">Lieferung — Inhalt folgt.</Typography>
</PageLayout>
);
}