Kairo-Jinkendo/frontend/src/config/workNav.js
Lars 82a5b9adec
All checks were successful
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 2m40s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 13s
AP2.2d: B2b Product-Backlog und B3 Sprint-Backlog in UI.
Zeitbox-API im Frontend, Plan/Ausführen Sprint-Ansichten, Backlog-Convert in aktiven Sprint. agile_iteration bei aktiver Zeitbox für continuous_product.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 16:27:34 +02:00

26 lines
741 B
JavaScript

/**
* Ausführen-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 WORK_NAV_ITEMS = [
{ key: 'sprint', to: '/work/sprint', label: 'Sprint' },
{ key: 'today', to: '/work/today', label: 'Heute' },
{ key: 'mine', to: '/work/mine', label: 'Meine Queue' },
]
/**
* @param {string} pathname
* @returns {string | null}
*/
export function resolveWorkNavActiveKey(pathname) {
const path = pathname.replace(/\/$/, '') || pathname
const match = WORK_NAV_ITEMS.find(
(item) => path === item.to || path.startsWith(`${item.to}/`),
)
return match?.key ?? null
}