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

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

View File

@@ -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.',