u
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -99,10 +99,13 @@ const routes = [
|
||||
path: 'auftrag',
|
||||
element: <SectionLayout sectionPath="/auftrag" />,
|
||||
children: [
|
||||
{ index: true, element: <AuftragAngebotPage /> },
|
||||
{ index: true, element: <AuftragBestellungPage /> },
|
||||
{ path: 'angebot', element: <AuftragAngebotPage /> },
|
||||
{ path: 'angebot/:quoteId', element: <AuftragAngebotEditPage /> },
|
||||
{ path: 'neuesangebot', element: <AuftragAngebotNeuPage /> },
|
||||
{ path: 'angebot/neu', element: <Navigate to="/auftrag/neuesangebot" replace /> },
|
||||
{ path: 'neu', element: <Navigate to="/auftrag/neuesangebot" replace /> },
|
||||
{ path: 'bestellung', element: <AuftragBestellungPage /> },
|
||||
{ path: 'bestellung', element: <Navigate to="/auftrag" replace /> },
|
||||
{ path: 'bestellung/neu', element: <AuftragBestellungNeuPage /> },
|
||||
{ path: 'bestellung/:orderId', element: <AuftragBestellungEditPage /> },
|
||||
{ path: 'ausliefern', element: <AuftragAusliefernPage /> },
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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.',
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
21
src/nav.js
21
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 '';
|
||||
|
||||
Reference in New Issue
Block a user