AP1.2c: IA-Skeleton — Workspace-Portfolio, Initiative-Übersicht, Unterseiten
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 1m26s
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 17s
Test Suite / playwright-smoke (push) Successful in 12s
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 1m26s
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 17s
Test Suite / playwright-smoke (push) Successful in 12s
Neue Navigation: Steuerung/Plan/Ausführung/Eingang/Journey. InitiativeOperationsContext, Action-Detail-Route, NextActionWidget portfolio/initiative, Portfolio-Widget auf Workspace. Omnibus InitiativeDetail entfernt. Version 0.12.0-ap1.2c.
This commit is contained in:
1 parent
2796965aed
commit
687aad6cbd
23 files changed
+1171
-265
No files matched your search
@@ -0,0 +1,68 @@
|
||||
import { Link, Outlet } from 'react-router-dom'
|
||||
import { InitiativeOperationsProvider, useInitiativeOperations } from '../context/InitiativeOperationsContext.jsx'
|
||||
import { StatusBadge } from '../components/StatusBadge.jsx'
|
||||
import { PriorityBadge } from '../components/PriorityBadge.jsx'
|
||||
import { InitiativeSubNav } from '../components/InitiativeSubNav.jsx'
|
||||
import { ErrorState } from '../components/ErrorState.jsx'
|
||||
import { LoadingState } from '../components/LoadingState.jsx'
|
||||
|
||||
function InitiativeLayoutInner() {
|
||||
const { initiative, loading, error, reload } = useInitiativeOperations()
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="app-page">
|
||||
<LoadingState message="Lade Vorhaben …" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (error && !initiative) {
|
||||
return (
|
||||
<div className="app-page">
|
||||
<ErrorState message={error} onRetry={reload} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (!initiative) {
|
||||
return (
|
||||
<div className="app-page">
|
||||
<ErrorState message="Vorhaben nicht gefunden." />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="app-page initiative-layout">
|
||||
<nav className="breadcrumb">
|
||||
<Link to="/workspace">Workspace</Link>
|
||||
<span aria-hidden="true"> / </span>
|
||||
<Link to="/initiatives">Vorhaben</Link>
|
||||
<span aria-hidden="true"> / </span>
|
||||
<span>{initiative.title}</span>
|
||||
</nav>
|
||||
|
||||
<header className="page-header detail-header">
|
||||
<div>
|
||||
<h1>{initiative.title}</h1>
|
||||
{initiative.goal && <p className="detail-goal">{initiative.goal}</p>}
|
||||
<div className="detail-badges">
|
||||
<StatusBadge kind="initiative" status={initiative.status} />
|
||||
<PriorityBadge priority={initiative.priority} />
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<InitiativeSubNav />
|
||||
|
||||
<Outlet />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export function InitiativeLayout() {
|
||||
return (
|
||||
<InitiativeOperationsProvider>
|
||||
<InitiativeLayoutInner />
|
||||
</InitiativeOperationsProvider>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user