Remove Auftrag Ausliefern/Retoure stubs and sort Kundengruppen by sort field.

Placeholder sub-pages are dropped from routing and nav until delivery/return flows exist; the new-customer group dropdown now matches the API sort order.
This commit is contained in:
seb
2026-08-07 06:24:21 +02:00
parent 83ac0efd00
commit 354f7e7466
5 changed files with 8 additions and 41 deletions

View File

@@ -18,8 +18,6 @@ const AuftragAngebotEditPage = lazy(() => import('./pages/auftrag/edit'));
const AuftragBestellungPage = lazy(() => import('./pages/auftrag/bestellung'));
const AuftragBestellungNeuPage = lazy(() => import('./pages/auftrag/bestellungNeu'));
const AuftragBestellungEditPage = lazy(() => import('./pages/auftrag/bestellungEdit'));
const AuftragAusliefernPage = lazy(() => import('./pages/auftrag/ausliefern'));
const AuftragRetourePage = lazy(() => import('./pages/auftrag/retoure'));
const KundeListePage = lazy(() => import('./pages/kunde/index'));
const KundeNeuPage = lazy(() => import('./pages/kunde/neu'));
const KundeGruppenPage = lazy(() => import('./pages/kunde/gruppen'));
@@ -67,8 +65,6 @@ const routes = [
{ path: 'bestellung', element: <AuftragBestellungPage /> },
{ path: 'bestellung/neu', element: <AuftragBestellungNeuPage /> },
{ path: 'bestellung/:orderId', element: <AuftragBestellungEditPage /> },
{ path: 'ausliefern', element: <AuftragAusliefernPage /> },
{ path: 'retoure', element: <AuftragRetourePage /> },
{ path: ':quoteId', element: <AuftragAngebotEditPage /> },
],
},

View File

@@ -12,8 +12,6 @@ import AddBoxIcon from '@mui/icons-material/AddBox';
import StorefrontIcon from '@mui/icons-material/Storefront';
import RequestQuoteIcon from '@mui/icons-material/RequestQuote';
import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
import OutboxIcon from '@mui/icons-material/Outbox';
import AssignmentReturnIcon from '@mui/icons-material/AssignmentReturn';
import { isKategorienPath } from './pages/artikel/categoryRoute';
export const NAV_ITEMS = [
@@ -38,8 +36,6 @@ export const SUB_NAV = {
'/auftrag': [
{ segment: '', label: 'Angebot', icon: RequestQuoteIcon },
{ segment: 'bestellung', label: 'Bestellung', icon: ShoppingCartIcon },
{ segment: 'ausliefern', label: 'Ausliefern', icon: OutboxIcon },
{ segment: 'retoure', label: 'Retoure', icon: AssignmentReturnIcon },
],
'/kunde': [
{ segment: '', label: 'Kundenliste', icon: PeopleIcon },
@@ -93,8 +89,7 @@ export function resolveActiveSub(pathname, sectionPath) {
return null;
}
// Keep Bestellung/Ausliefern/Retoure active for nested paths
// (e.g. /auftrag/bestellung/neu).
// Keep Bestellung active for nested paths (e.g. /auftrag/bestellung/neu).
if (sectionPath === '/auftrag' && rest && knownSegments.has(rest)) {
return rest;
}

View File

@@ -1,14 +0,0 @@
import { PureComponent } from 'react';
import Typography from '@mui/material/Typography';
class AuftragAusliefernPage extends PureComponent {
render() {
return (
<Typography color="text.secondary">
Ausliefern — Inhalt folgt.
</Typography>
);
}
}
export default AuftragAusliefernPage;

View File

@@ -1,14 +0,0 @@
import { PureComponent } from 'react';
import Typography from '@mui/material/Typography';
class AuftragRetourePage extends PureComponent {
render() {
return (
<Typography color="text.secondary">
Retoure — Inhalt folgt.
</Typography>
);
}
}
export default AuftragRetourePage;

View File

@@ -15,9 +15,13 @@ import { backendErrorFrom } from '../../utils/backendError';
import { notifyError } from '../../utils/notify';
function sortGroups(groups) {
return [...groups].sort((a, b) =>
String(a.name).localeCompare(String(b.name), 'de'),
);
return [...groups].sort((a, b) => {
const bySort = a.sort - b.sort;
if (bySort !== 0) return bySort;
const byName = String(a.name).localeCompare(String(b.name), 'de');
if (byName !== 0) return byName;
return a.id - b.id;
});
}
class KundeNeuPage extends PureComponent {