AP1.12a: Plan-Outline-Shell ersetzt Untertabs im Planen-Modus.
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 2m4s
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 18s
Test Suite / playwright-smoke (push) Successful in 13s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 2m4s
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 18s
Test Suite / playwright-smoke (push) Successful in 13s
Linke Outline mit Profil, Struktur, Zielzuständen und Eingang; Portfolio-Einstieg ohne Scope; Vorhabens-Profil als Read-only-Vorschau. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
aa7e1626ea
commit
bbadf22d39
12 files changed
+389
-16
No files matched your search
@@ -0,0 +1,68 @@
|
||||
import { NavLink, useLocation } from 'react-router-dom'
|
||||
import { useProgramScope } from '../context/ProgramScopeContext.jsx'
|
||||
import {
|
||||
PLAN_OUTLINE_NODES,
|
||||
resolvePlanOutlineActiveKey,
|
||||
} from '../plan/planOutlineNodes.js'
|
||||
|
||||
export function PlanOutlineNav() {
|
||||
const location = useLocation()
|
||||
const { initiativeId, initiativeTitle, hrefWithScope } = useProgramScope()
|
||||
const activeKey = resolvePlanOutlineActiveKey(location.pathname)
|
||||
|
||||
return (
|
||||
<nav className="plan-outline-nav" aria-label="Plan-Outline">
|
||||
<div className="plan-outline-nav__header">
|
||||
<span className="plan-outline-nav__eyebrow">Planen</span>
|
||||
{initiativeId ? (
|
||||
<p className="plan-outline-nav__root" title={initiativeTitle || initiativeId}>
|
||||
{initiativeTitle || 'Vorhaben'}
|
||||
</p>
|
||||
) : (
|
||||
<p className="plan-outline-nav__root plan-outline-nav__root--muted">
|
||||
Portfolio — Vorhaben wählen
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ul className="plan-outline-nav__list">
|
||||
{PLAN_OUTLINE_NODES.map((node) => {
|
||||
const needsInitiative = node.requiresInitiative && !initiativeId
|
||||
const isDisabled = node.disabled || needsInitiative
|
||||
|
||||
if (isDisabled) {
|
||||
return (
|
||||
<li key={node.key}>
|
||||
<span
|
||||
className={
|
||||
'plan-outline-nav__link plan-outline-nav__link--disabled' +
|
||||
(activeKey === node.key ? ' plan-outline-nav__link--active' : '')
|
||||
}
|
||||
aria-disabled="true"
|
||||
title={needsInitiative ? 'Vorhaben im Scope wählen' : node.hint}
|
||||
>
|
||||
{node.label}
|
||||
</span>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<li key={node.key}>
|
||||
<NavLink
|
||||
to={hrefWithScope(node.to)}
|
||||
end
|
||||
className={({ isActive }) =>
|
||||
'plan-outline-nav__link' +
|
||||
(isActive ? ' plan-outline-nav__link--active' : '')
|
||||
}
|
||||
>
|
||||
{node.label}
|
||||
</NavLink>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user