This commit is contained in:
seb
2026-10-18 21:04:18 +02:00
parent 35cfea91f8
commit 5faea634ba
6 changed files with 34 additions and 26 deletions

View File

@@ -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 '';