All checks were successful
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m39s
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 12s
Schema 013; Projekte/Arbeitspakete/Aufgaben pflegbar; Tab Zielzustände vs Ausführung. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
852 B
JavaScript
32 lines
852 B
JavaScript
import { NavLink, useParams } from 'react-router-dom'
|
|
|
|
const TABS = [
|
|
{ to: '', label: 'Steuerung', end: true },
|
|
{ to: 'plan', label: 'Zielzustände' },
|
|
{ to: 'execution', label: 'Ausführung' },
|
|
{ to: 'inbox', label: 'Eingang' },
|
|
{ to: 'journey', label: 'Nachvollziehbarkeit' },
|
|
]
|
|
|
|
export function InitiativeSubNav() {
|
|
const { id } = useParams()
|
|
const base = `/initiatives/${id}`
|
|
|
|
return (
|
|
<nav className="initiative-subnav" aria-label="Vorhaben-Bereiche">
|
|
{TABS.map((tab) => (
|
|
<NavLink
|
|
key={tab.to || 'overview'}
|
|
to={tab.to ? `${base}/${tab.to}` : base}
|
|
end={tab.end}
|
|
className={({ isActive }) =>
|
|
`initiative-subnav-link${isActive ? ' initiative-subnav-link--active' : ''}`
|
|
}
|
|
>
|
|
{tab.label}
|
|
</NavLink>
|
|
))}
|
|
</nav>
|
|
)
|
|
}
|