From 354f7e7466458bf233660eda07a58567ad4d95b5 Mon Sep 17 00:00:00 2001 From: seb Date: Fri, 7 Aug 2026 06:24:21 +0200 Subject: [PATCH] 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. --- src/appRouter.jsx | 4 ---- src/nav.js | 7 +------ src/pages/auftrag/ausliefern.jsx | 14 -------------- src/pages/auftrag/retoure.jsx | 14 -------------- src/pages/kunde/neu.jsx | 10 +++++++--- 5 files changed, 8 insertions(+), 41 deletions(-) delete mode 100644 src/pages/auftrag/ausliefern.jsx delete mode 100644 src/pages/auftrag/retoure.jsx diff --git a/src/appRouter.jsx b/src/appRouter.jsx index a698d7b..aed4c07 100644 --- a/src/appRouter.jsx +++ b/src/appRouter.jsx @@ -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: }, { path: 'bestellung/neu', element: }, { path: 'bestellung/:orderId', element: }, - { path: 'ausliefern', element: }, - { path: 'retoure', element: }, { path: ':quoteId', element: }, ], }, diff --git a/src/nav.js b/src/nav.js index be96fca..7684b99 100644 --- a/src/nav.js +++ b/src/nav.js @@ -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; } diff --git a/src/pages/auftrag/ausliefern.jsx b/src/pages/auftrag/ausliefern.jsx deleted file mode 100644 index 7beed5f..0000000 --- a/src/pages/auftrag/ausliefern.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import { PureComponent } from 'react'; -import Typography from '@mui/material/Typography'; - -class AuftragAusliefernPage extends PureComponent { - render() { - return ( - - Ausliefern — Inhalt folgt. - - ); - } -} - -export default AuftragAusliefernPage; diff --git a/src/pages/auftrag/retoure.jsx b/src/pages/auftrag/retoure.jsx deleted file mode 100644 index ab3a2d3..0000000 --- a/src/pages/auftrag/retoure.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import { PureComponent } from 'react'; -import Typography from '@mui/material/Typography'; - -class AuftragRetourePage extends PureComponent { - render() { - return ( - - Retoure — Inhalt folgt. - - ); - } -} - -export default AuftragRetourePage; diff --git a/src/pages/kunde/neu.jsx b/src/pages/kunde/neu.jsx index 08083f2..af1106a 100644 --- a/src/pages/kunde/neu.jsx +++ b/src/pages/kunde/neu.jsx @@ -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 {