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` |
|
| **New Delivery Draft** | `/lieferung/neu` | Static (receipt & draft line editor) | `/lieferung/neu` |
|
||||||
| **Delivery Detail** | `/lieferung/:deliveryId` | Delivery document ID: `/lieferung/${deliveryId}` | `/lieferung/42` |
|
| **Delivery Detail** | `/lieferung/:deliveryId` | Delivery document ID: `/lieferung/${deliveryId}` | `/lieferung/42` |
|
||||||
| **Suppliers Directory** | `/lieferung/lieferanten` | Static | `/lieferung/lieferanten` |
|
| **Suppliers Directory** | `/lieferung/lieferanten` | Static | `/lieferung/lieferanten` |
|
||||||
| **Quote List (Angebote)** | `/auftrag` | Static | `/auftrag` |
|
| **Order List (Auftrag / Bestellungen)** | `/auftrag` | Static (legacy `/auftrag/bestellung` redirects here) | `/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` |
|
|
||||||
| **New Order** | `/auftrag/bestellung/neu` | Static draft form | `/auftrag/bestellung/neu` |
|
| **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` |
|
| **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` |
|
| **Shipments (Ausliefern)** | `/auftrag/ausliefern` | Static (shipment manifests & parcels) | `/auftrag/ausliefern` |
|
||||||
| **Payments (Zahlungen)** | `/auftrag/zahlungen` | Static (order payments ledger) | `/auftrag/zahlungen` |
|
| **Payments (Zahlungen)** | `/auftrag/zahlungen` | Static (order payments ledger) | `/auftrag/zahlungen` |
|
||||||
| **Carriers (Versandarten)** | `/auftrag/versandarten` | Static (Versanddienstleister & Versandarten) | `/auftrag/versandarten` |
|
| **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`)
|
### Quotes & Orders (`/auftrag`)
|
||||||
- Distinction:
|
- Distinction:
|
||||||
- Quotes (Angebote) live at `/auftrag` and `/auftrag/:quoteId`.
|
- Orders (Auftrag / Bestellungen) live at `/auftrag` and `/auftrag/bestellung/:orderId`.
|
||||||
- Orders (Bestellungen) live at `/auftrag/bestellung` 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).
|
- Shipments (Ausliefern) live at `/auftrag/ausliefern` (connected to shipment manifests and packages).
|
||||||
- Payments (Zahlungen) live at `/auftrag/zahlungen` (payment bookings and payment balances).
|
- Payments (Zahlungen) live at `/auftrag/zahlungen` (payment bookings and payment balances).
|
||||||
- Both IDs (`quoteId`, `orderId`) are document IDs.
|
- Both IDs (`quoteId`, `orderId`) are document IDs.
|
||||||
|
|||||||
@@ -99,10 +99,13 @@ const routes = [
|
|||||||
path: 'auftrag',
|
path: 'auftrag',
|
||||||
element: <SectionLayout sectionPath="/auftrag" />,
|
element: <SectionLayout sectionPath="/auftrag" />,
|
||||||
children: [
|
children: [
|
||||||
{ index: true, element: <AuftragAngebotPage /> },
|
{ index: true, element: <AuftragBestellungPage /> },
|
||||||
|
{ path: 'angebot', element: <AuftragAngebotPage /> },
|
||||||
|
{ path: 'angebot/:quoteId', element: <AuftragAngebotEditPage /> },
|
||||||
{ path: 'neuesangebot', element: <AuftragAngebotNeuPage /> },
|
{ path: 'neuesangebot', element: <AuftragAngebotNeuPage /> },
|
||||||
|
{ path: 'angebot/neu', element: <Navigate to="/auftrag/neuesangebot" replace /> },
|
||||||
{ path: '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/neu', element: <AuftragBestellungNeuPage /> },
|
||||||
{ path: 'bestellung/:orderId', element: <AuftragBestellungEditPage /> },
|
{ path: 'bestellung/:orderId', element: <AuftragBestellungEditPage /> },
|
||||||
{ path: 'ausliefern', element: <AuftragAusliefernPage /> },
|
{ path: 'ausliefern', element: <AuftragAusliefernPage /> },
|
||||||
|
|||||||
@@ -77,14 +77,14 @@ export default function SectionLayout({ sectionPath }) {
|
|||||||
const isDetail =
|
const isDetail =
|
||||||
isArticleDetail || isKundeDetail || isLieferungDetail || isAngebotDoc;
|
isArticleDetail || isKundeDetail || isLieferungDetail || isAngebotDoc;
|
||||||
|
|
||||||
const angebotLabel =
|
|
||||||
subNav?.find((item) => item.segment === '')?.title ?? subNav?.find((item) => item.segment === '')?.label ?? 'Angebot';
|
|
||||||
let pageTitle = isDetail
|
let pageTitle = isDetail
|
||||||
? title
|
? title
|
||||||
: (activeSub?.title ?? activeSub?.label ?? title);
|
: (activeSub?.title ?? activeSub?.label ?? title);
|
||||||
if (pathname === '/auftrag/neuesangebot' || pathname === '/auftrag/neu') pageTitle = 'Neues Angebot';
|
if (pathname === '/auftrag/neuesangebot' || pathname === '/auftrag/neu' || pathname === '/auftrag/angebot/neu') pageTitle = 'Neues Angebot';
|
||||||
else if (isAngebotDoc) pageTitle = angebotLabel;
|
else if (pathname === '/auftrag/bestellung/neu') pageTitle = 'Neuer Auftrag';
|
||||||
else if (pathname === '/auftrag/bestellung/neu') pageTitle = 'Neue Bestellung';
|
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';
|
const showsRenameSwitch = activeSub?.segment === 'kategorien';
|
||||||
|
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ export function manifestConfig(cfgOrKind) {
|
|||||||
listField: 'quotes',
|
listField: 'quotes',
|
||||||
docField: 'quote',
|
docField: 'quote',
|
||||||
partyField: 'entityId',
|
partyField: 'entityId',
|
||||||
listPath: '/auftrag',
|
listPath: '/auftrag/angebot',
|
||||||
createPath: '/auftrag/neuesangebot',
|
createPath: '/auftrag/neuesangebot',
|
||||||
editPath: (id) => `/auftrag/${id}`,
|
editPath: (id) => `/auftrag/${id}`,
|
||||||
dateLabel: 'Gültig bis',
|
dateLabel: 'Gültig bis',
|
||||||
@@ -720,13 +720,13 @@ export function manifestConfig(cfgOrKind) {
|
|||||||
listField: 'orders',
|
listField: 'orders',
|
||||||
docField: 'order',
|
docField: 'order',
|
||||||
partyField: 'entityId',
|
partyField: 'entityId',
|
||||||
listPath: '/auftrag/bestellung',
|
listPath: '/auftrag',
|
||||||
createPath: '/auftrag/bestellung/neu',
|
createPath: '/auftrag/bestellung/neu',
|
||||||
editPath: (id) => `/auftrag/bestellung/${id}`,
|
editPath: (id) => `/auftrag/bestellung/${id}`,
|
||||||
dateLabel: 'Lieferdatum',
|
dateLabel: 'Lieferdatum',
|
||||||
partyLabel: 'Kunde',
|
partyLabel: 'Kunde',
|
||||||
emptyList: 'Noch keine Bestellungen.',
|
emptyList: 'Noch keine Bestellungen.',
|
||||||
createButton: 'Neue Bestellung',
|
createButton: 'Neuer Auftrag',
|
||||||
createdMsg: 'Bestellung angelegt.',
|
createdMsg: 'Bestellung angelegt.',
|
||||||
savedMsg: 'Bestellung gespeichert.',
|
savedMsg: 'Bestellung gespeichert.',
|
||||||
deletedMsg: 'Bestellung gelöscht.',
|
deletedMsg: 'Bestellung gelöscht.',
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ function getInitialTarget() {
|
|||||||
const p = window.location.pathname;
|
const p = window.location.pathname;
|
||||||
if (p.startsWith('/lieferung')) return 'delivery';
|
if (p.startsWith('/lieferung')) return 'delivery';
|
||||||
if (p.startsWith('/auftrag/ausliefern')) return 'shipment';
|
if (p.startsWith('/auftrag/ausliefern')) return 'shipment';
|
||||||
if (p.startsWith('/auftrag/bestellung')) return 'order';
|
if (p.startsWith('/auftrag/angebot')) return 'quote';
|
||||||
if (p.startsWith('/auftrag')) return 'quote';
|
if (p.startsWith('/auftrag')) return 'order';
|
||||||
}
|
}
|
||||||
return 'order';
|
return 'order';
|
||||||
}
|
}
|
||||||
|
|||||||
21
src/nav.js
21
src/nav.js
@@ -202,18 +202,18 @@ export const SUB_NAV = {
|
|||||||
'/auftrag': [
|
'/auftrag': [
|
||||||
{
|
{
|
||||||
segment: '',
|
segment: '',
|
||||||
|
label: 'Auftrag',
|
||||||
|
title: 'Auftrag',
|
||||||
|
icon: ShoppingCartIcon,
|
||||||
|
help: 'Bestellungen prüfen, freigeben und kommissionieren',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
segment: 'angebot',
|
||||||
label: 'Angebot',
|
label: 'Angebot',
|
||||||
title: 'Angebot',
|
title: 'Angebot',
|
||||||
icon: RequestQuoteIcon,
|
icon: RequestQuoteIcon,
|
||||||
help: 'Angebote für Kunden kalkulieren und versenden',
|
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',
|
segment: 'ausliefern',
|
||||||
label: 'Ausliefern',
|
label: 'Ausliefern',
|
||||||
@@ -336,11 +336,16 @@ export function resolveActiveSub(pathname, sectionPath) {
|
|||||||
return null;
|
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)) {
|
if (sectionPath === '/auftrag' && rest && knownSegments.has(rest)) {
|
||||||
return rest;
|
return rest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Treat /auftrag/bestellung as segment ''
|
||||||
|
if (sectionPath === '/auftrag' && rest === 'bestellung') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
// Treat /infos/articlehistory as segment ''
|
// Treat /infos/articlehistory as segment ''
|
||||||
if (sectionPath === '/infos' && rest === 'articlehistory') {
|
if (sectionPath === '/infos' && rest === 'articlehistory') {
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
Reference in New Issue
Block a user