Some checks failed
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 47s
Test Suite / pytest-backend (push) Has been cancelled
Prozessleiste, archetypgebundene Modus-Defaults und Sprint/Arbeitspaket-Begriffe schließen den GUI-Kern für continuous_product vor Sprint-Planungs-Flows. Co-authored-by: Cursor <cursoragent@cursor.com>
54 lines
1.7 KiB
JavaScript
54 lines
1.7 KiB
JavaScript
import { NavLink, useLocation } from 'react-router-dom'
|
|
import { useProgramScope } from '../context/ProgramScopeContext.jsx'
|
|
import { useMethodUiContext } from '../hooks/useMethodUiContext.js'
|
|
import { resolveActiveProcessStepKey } from '../config/methodUiDefaults.js'
|
|
|
|
export function MethodProcessBar() {
|
|
const location = useLocation()
|
|
const { initiativeId, hrefWithScope } = useProgramScope()
|
|
const { processSteps, archetypeKey, loading } = useMethodUiContext()
|
|
|
|
if (!initiativeId || loading || processSteps.length === 0) {
|
|
return null
|
|
}
|
|
|
|
const activeKey = resolveActiveProcessStepKey(location.pathname, processSteps)
|
|
|
|
return (
|
|
<nav
|
|
className="method-process-bar"
|
|
aria-label={`Prozess — ${archetypeKey || 'Vorhaben'}`}
|
|
>
|
|
<ol className="method-process-bar__steps">
|
|
{processSteps.map((step, index) => {
|
|
const isActive = activeKey === step.key
|
|
return (
|
|
<li
|
|
key={step.key}
|
|
className={
|
|
'method-process-bar__step' +
|
|
(isActive ? ' method-process-bar__step--active' : '')
|
|
}
|
|
>
|
|
{index > 0 && (
|
|
<span className="method-process-bar__sep" aria-hidden="true">
|
|
→
|
|
</span>
|
|
)}
|
|
<NavLink
|
|
to={hrefWithScope(step.to)}
|
|
className={({ isActive: routerActive }) =>
|
|
'method-process-bar__link' +
|
|
(routerActive || isActive ? ' method-process-bar__link--active' : '')
|
|
}
|
|
>
|
|
{step.label}
|
|
</NavLink>
|
|
</li>
|
|
)
|
|
})}
|
|
</ol>
|
|
</nav>
|
|
)
|
|
}
|