From 5faea634ba1697d2b152ac1c3893a8571800b03d Mon Sep 17 00:00:00 2001 From: seb Date: Sun, 18 Oct 2026 21:04:18 +0200 Subject: [PATCH] u --- .agents/skills/frontend-routes/SKILL.md | 12 ++++++------ src/appRouter.jsx | 7 +++++-- src/components/SectionLayout.jsx | 10 +++++----- src/components/manifest/manifestConfig.js | 6 +++--- src/devtools/ChunkCacheMonitor.jsx | 4 ++-- src/nav.js | 21 +++++++++++++-------- 6 files changed, 34 insertions(+), 26 deletions(-) diff --git a/.agents/skills/frontend-routes/SKILL.md b/.agents/skills/frontend-routes/SKILL.md index 4d175a6..f141306 100644 --- a/.agents/skills/frontend-routes/SKILL.md +++ b/.agents/skills/frontend-routes/SKILL.md @@ -27,12 +27,12 @@ Reference guide for the backend LLM agent when emitting route navigation actions | **New Delivery Draft** | `/lieferung/neu` | Static (receipt & draft line editor) | `/lieferung/neu` | | **Delivery Detail** | `/lieferung/:deliveryId` | Delivery document ID: `/lieferung/${deliveryId}` | `/lieferung/42` | | **Suppliers Directory** | `/lieferung/lieferanten` | Static | `/lieferung/lieferanten` | -| **Quote List (Angebote)** | `/auftrag` | Static | `/auftrag` | -| **New Quote** | `/auftrag/neuesangebot` | Static draft form (Neues Angebot) | `/auftrag/neuesangebot` | -| **Quote Detail** | `/auftrag/:quoteId` | Quote document ID: `/auftrag/${quoteId}` | `/auftrag/1001` | -| **Order List (Bestellungen)**| `/auftrag/bestellung` | Static | `/auftrag/bestellung` | +| **Order List (Auftrag / Bestellungen)** | `/auftrag` | Static (legacy `/auftrag/bestellung` redirects here) | `/auftrag` | | **New Order** | `/auftrag/bestellung/neu` | Static draft form | `/auftrag/bestellung/neu` | | **Order Detail** | `/auftrag/bestellung/:orderId` | Order document ID: `/auftrag/bestellung/${orderId}` | `/auftrag/bestellung/2005` | +| **Quote List (Angebote)** | `/auftrag/angebot` | Static | `/auftrag/angebot` | +| **New Quote** | `/auftrag/neuesangebot` | Static draft form (Neues Angebot) | `/auftrag/neuesangebot` | +| **Quote Detail** | `/auftrag/:quoteId` or `/auftrag/angebot/:quoteId` | Quote document ID: `/auftrag/${quoteId}` | `/auftrag/1001` | | **Shipments (Ausliefern)** | `/auftrag/ausliefern` | Static (shipment manifests & parcels) | `/auftrag/ausliefern` | | **Payments (Zahlungen)** | `/auftrag/zahlungen` | Static (order payments ledger) | `/auftrag/zahlungen` | | **Carriers (Versandarten)** | `/auftrag/versandarten` | Static (Versanddienstleister & Versandarten) | `/auftrag/versandarten` | @@ -70,8 +70,8 @@ Reference guide for the backend LLM agent when emitting route navigation actions ### Quotes & Orders (`/auftrag`) - Distinction: - - Quotes (Angebote) live at `/auftrag` and `/auftrag/:quoteId`. - - Orders (Bestellungen) live at `/auftrag/bestellung` and `/auftrag/bestellung/:orderId`. + - Orders (Auftrag / Bestellungen) live at `/auftrag` and `/auftrag/bestellung/:orderId`. + - Quotes (Angebote) live at `/auftrag/angebot` and `/auftrag/:quoteId` (or `/auftrag/angebot/:quoteId`). - Shipments (Ausliefern) live at `/auftrag/ausliefern` (connected to shipment manifests and packages). - Payments (Zahlungen) live at `/auftrag/zahlungen` (payment bookings and payment balances). - Both IDs (`quoteId`, `orderId`) are document IDs. diff --git a/src/appRouter.jsx b/src/appRouter.jsx index 0987fa0..db972a9 100644 --- a/src/appRouter.jsx +++ b/src/appRouter.jsx @@ -99,10 +99,13 @@ const routes = [ path: 'auftrag', element: , children: [ - { index: true, element: }, + { index: true, element: }, + { path: 'angebot', element: }, + { path: 'angebot/:quoteId', element: }, { path: 'neuesangebot', element: }, + { path: 'angebot/neu', element: }, { path: 'neu', element: }, - { path: 'bestellung', element: }, + { path: 'bestellung', element: }, { path: 'bestellung/neu', element: }, { path: 'bestellung/:orderId', element: }, { path: 'ausliefern', element: }, diff --git a/src/components/SectionLayout.jsx b/src/components/SectionLayout.jsx index 0224fd8..129ed3d 100644 --- a/src/components/SectionLayout.jsx +++ b/src/components/SectionLayout.jsx @@ -77,14 +77,14 @@ export default function SectionLayout({ sectionPath }) { const isDetail = isArticleDetail || isKundeDetail || isLieferungDetail || isAngebotDoc; - const angebotLabel = - subNav?.find((item) => item.segment === '')?.title ?? subNav?.find((item) => item.segment === '')?.label ?? 'Angebot'; let pageTitle = isDetail ? title : (activeSub?.title ?? activeSub?.label ?? title); - if (pathname === '/auftrag/neuesangebot' || pathname === '/auftrag/neu') pageTitle = 'Neues Angebot'; - else if (isAngebotDoc) pageTitle = angebotLabel; - else if (pathname === '/auftrag/bestellung/neu') pageTitle = 'Neue Bestellung'; + if (pathname === '/auftrag/neuesangebot' || pathname === '/auftrag/neu' || pathname === '/auftrag/angebot/neu') pageTitle = 'Neues Angebot'; + else if (pathname === '/auftrag/bestellung/neu') pageTitle = 'Neuer Auftrag'; + else if (pathname.startsWith('/auftrag/bestellung/')) pageTitle = 'Bestellung'; + else if (pathname.startsWith('/auftrag/angebot/')) pageTitle = 'Angebot'; + else if (isAngebotDoc) pageTitle = 'Angebot'; const showsRenameSwitch = activeSub?.segment === 'kategorien'; diff --git a/src/components/manifest/manifestConfig.js b/src/components/manifest/manifestConfig.js index 4e7c6aa..20cc72c 100644 --- a/src/components/manifest/manifestConfig.js +++ b/src/components/manifest/manifestConfig.js @@ -687,7 +687,7 @@ export function manifestConfig(cfgOrKind) { listField: 'quotes', docField: 'quote', partyField: 'entityId', - listPath: '/auftrag', + listPath: '/auftrag/angebot', createPath: '/auftrag/neuesangebot', editPath: (id) => `/auftrag/${id}`, dateLabel: 'Gültig bis', @@ -720,13 +720,13 @@ export function manifestConfig(cfgOrKind) { listField: 'orders', docField: 'order', partyField: 'entityId', - listPath: '/auftrag/bestellung', + listPath: '/auftrag', createPath: '/auftrag/bestellung/neu', editPath: (id) => `/auftrag/bestellung/${id}`, dateLabel: 'Lieferdatum', partyLabel: 'Kunde', emptyList: 'Noch keine Bestellungen.', - createButton: 'Neue Bestellung', + createButton: 'Neuer Auftrag', createdMsg: 'Bestellung angelegt.', savedMsg: 'Bestellung gespeichert.', deletedMsg: 'Bestellung gelöscht.', diff --git a/src/devtools/ChunkCacheMonitor.jsx b/src/devtools/ChunkCacheMonitor.jsx index ac2cad0..5ed2c21 100644 --- a/src/devtools/ChunkCacheMonitor.jsx +++ b/src/devtools/ChunkCacheMonitor.jsx @@ -55,8 +55,8 @@ function getInitialTarget() { const p = window.location.pathname; if (p.startsWith('/lieferung')) return 'delivery'; if (p.startsWith('/auftrag/ausliefern')) return 'shipment'; - if (p.startsWith('/auftrag/bestellung')) return 'order'; - if (p.startsWith('/auftrag')) return 'quote'; + if (p.startsWith('/auftrag/angebot')) return 'quote'; + if (p.startsWith('/auftrag')) return 'order'; } return 'order'; } diff --git a/src/nav.js b/src/nav.js index 9520400..cec838f 100644 --- a/src/nav.js +++ b/src/nav.js @@ -202,18 +202,18 @@ export const SUB_NAV = { '/auftrag': [ { segment: '', + label: 'Auftrag', + title: 'Auftrag', + icon: ShoppingCartIcon, + help: 'Bestellungen prüfen, freigeben und kommissionieren', + }, + { + segment: 'angebot', label: 'Angebot', title: 'Angebot', icon: RequestQuoteIcon, help: 'Angebote für Kunden kalkulieren und versenden', }, - { - segment: 'bestellung', - label: 'Bestellung', - title: 'Bestellung', - icon: ShoppingCartIcon, - help: 'Bestellungen prüfen, freigeben und kommissionieren', - }, { segment: 'ausliefern', label: 'Ausliefern', @@ -336,11 +336,16 @@ export function resolveActiveSub(pathname, sectionPath) { return null; } - // Keep Bestellung active for nested paths (e.g. /auftrag/bestellung/neu). + // Keep sub active for nested paths (e.g. /auftrag/ausliefern, /auftrag/angebot). if (sectionPath === '/auftrag' && rest && knownSegments.has(rest)) { return rest; } + // Treat /auftrag/bestellung as segment '' + if (sectionPath === '/auftrag' && rest === 'bestellung') { + return ''; + } + // Treat /infos/articlehistory as segment '' if (sectionPath === '/infos' && rest === 'articlehistory') { return '';