AP1.9b: Scope-Breadcrumb modus-sensitiv für Planen, Ausführen und Kontrolle.
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Has been cancelled
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Has been cancelled
Portfolio- und Vorhaben-Klicks bleiben im aktiven Modus; Objekt-Routen leiten auf passende Plan-/Work-Hubs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
afb07f70b9
commit
aa7e1626ea
4 files changed
+158
-8
No files matched your search
@@ -1,8 +1,13 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { useProgramScope } from '../context/ProgramScopeContext.jsx'
|
||||
import { initiativeCatalogPath, scopedPath } from '../utils/routes.js'
|
||||
import { initiativeCatalogPath, projectPath, scopedPath } from '../utils/routes.js'
|
||||
import {
|
||||
resolveInitiativeHub,
|
||||
resolvePortfolioHub,
|
||||
} from '../utils/scopeNavigation.js'
|
||||
|
||||
export function ProgramScopeBar() {
|
||||
const location = useLocation()
|
||||
const {
|
||||
initiativeId,
|
||||
projectId,
|
||||
@@ -12,12 +17,17 @@ export function ProgramScopeBar() {
|
||||
setScope,
|
||||
} = useProgramScope()
|
||||
|
||||
const portfolioTo = resolvePortfolioHub(location.pathname)
|
||||
const initiativeTo = initiativeId
|
||||
? resolveInitiativeHub(location.pathname, initiativeId, scopedPath)
|
||||
: null
|
||||
|
||||
return (
|
||||
<div className="program-scope-bar" aria-label="Programm-Scope">
|
||||
<span className="program-scope-bar__label">Scope</span>
|
||||
<nav className="program-scope-bar__trail">
|
||||
<Link
|
||||
to={scopedPath('/cockpit')}
|
||||
to={portfolioTo}
|
||||
className={
|
||||
'program-scope-bar__crumb' +
|
||||
(!initiativeId ? ' program-scope-bar__crumb--active' : '')
|
||||
@@ -26,13 +36,13 @@ export function ProgramScopeBar() {
|
||||
>
|
||||
Portfolio
|
||||
</Link>
|
||||
{initiativeId && (
|
||||
{initiativeId && initiativeTo && (
|
||||
<>
|
||||
<span className="program-scope-bar__sep" aria-hidden="true">
|
||||
›
|
||||
</span>
|
||||
<Link
|
||||
to={scopedPath('/control/status', { initiativeId })}
|
||||
to={initiativeTo}
|
||||
className={
|
||||
'program-scope-bar__crumb' +
|
||||
(!projectId ? ' program-scope-bar__crumb--active' : '')
|
||||
@@ -48,9 +58,12 @@ export function ProgramScopeBar() {
|
||||
<span className="program-scope-bar__sep" aria-hidden="true">
|
||||
›
|
||||
</span>
|
||||
<span className="program-scope-bar__crumb program-scope-bar__crumb--active">
|
||||
<Link
|
||||
to={projectPath(projectId)}
|
||||
className="program-scope-bar__crumb program-scope-bar__crumb--active"
|
||||
>
|
||||
{projectTitle || 'Projekt'}
|
||||
</span>
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user