Some checks failed
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Failing after 2m18s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Revisionen mit Audit, getrennte Soll/Ist/Diff-Ansicht unter Kontrolle/Plan-Ist; API plan-ist-view und plan-snapshots. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
786 B
JavaScript
26 lines
786 B
JavaScript
/**
|
|
* Kontrolle-Subnav (Mitai: settingsNav / analysis-split).
|
|
* Pfade müssen mit Routes in App.jsx übereinstimmen.
|
|
*
|
|
* @typedef {{ key: string, to: string, label: string }} ModeNavItem
|
|
*/
|
|
|
|
/** @type {ModeNavItem[]} */
|
|
export const CONTROL_NAV_ITEMS = [
|
|
{ key: 'status', to: '/control/status', label: 'Steuerung' },
|
|
{ key: 'plan-ist', to: '/control/plan-ist', label: 'Plan / Ist' },
|
|
{ key: 'journey', to: '/control/journey', label: 'Nachvollziehbarkeit' },
|
|
]
|
|
|
|
/**
|
|
* @param {string} pathname
|
|
* @returns {string | null}
|
|
*/
|
|
export function resolveControlNavActiveKey(pathname) {
|
|
const path = pathname.replace(/\/$/, '') || pathname
|
|
const match = CONTROL_NAV_ITEMS.find(
|
|
(item) => path === item.to || path.startsWith(`${item.to}/`),
|
|
)
|
|
return match?.key ?? null
|
|
}
|