2026-07-05 18:29:47 +02:00
|
|
|
import { Link } from 'react-router-dom'
|
2026-07-08 12:55:37 +02:00
|
|
|
import { scopedPath } from '../utils/routes.js'
|
2026-07-05 18:29:47 +02:00
|
|
|
|
|
|
|
|
const AREAS = [
|
|
|
|
|
{
|
2026-07-08 12:55:37 +02:00
|
|
|
to: '/plan/gates',
|
2026-07-05 18:29:47 +02:00
|
|
|
title: 'Plan',
|
2026-07-05 18:45:36 +02:00
|
|
|
description: 'Roadmap, Gates und Plan-Ist — methodenneutral pflegen.',
|
2026-07-08 12:55:37 +02:00
|
|
|
countKey: 'roadmapItems',
|
2026-07-05 18:29:47 +02:00
|
|
|
},
|
|
|
|
|
{
|
2026-07-08 12:55:37 +02:00
|
|
|
to: '/work/today',
|
2026-07-05 18:29:47 +02:00
|
|
|
title: 'Ausführung',
|
|
|
|
|
description: 'Arbeitspakete, Zuweisungen, Blocker am Objekt.',
|
2026-07-08 12:55:37 +02:00
|
|
|
countKey: 'actionsOpen',
|
2026-07-05 18:29:47 +02:00
|
|
|
},
|
|
|
|
|
{
|
2026-07-08 12:55:37 +02:00
|
|
|
to: '/plan/inbox',
|
2026-07-05 18:29:47 +02:00
|
|
|
title: 'Eingang',
|
|
|
|
|
description: 'Backlog triagieren und in Arbeitspakete überführen.',
|
2026-07-08 12:55:37 +02:00
|
|
|
countKey: 'backlog',
|
2026-07-05 18:29:47 +02:00
|
|
|
},
|
|
|
|
|
{
|
2026-07-08 12:55:37 +02:00
|
|
|
to: '/control/journey',
|
2026-07-05 18:29:47 +02:00
|
|
|
title: 'Nachvollziehbarkeit',
|
|
|
|
|
description: 'Entscheidungen, Reviews, Nachweise über die Zeit.',
|
2026-07-08 12:55:37 +02:00
|
|
|
countKey: null,
|
2026-07-05 18:29:47 +02:00
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export function InitiativeNavCards({ initiativeId, counts = {} }) {
|
|
|
|
|
return (
|
|
|
|
|
<section className="initiative-nav-cards">
|
|
|
|
|
<h2 className="initiative-nav-cards-title">Pflege & Planung</h2>
|
|
|
|
|
<div className="initiative-nav-cards-grid">
|
|
|
|
|
{AREAS.map((area) => {
|
|
|
|
|
const hint =
|
2026-07-08 12:55:37 +02:00
|
|
|
area.countKey === 'backlog' && counts.backlog
|
2026-07-05 18:29:47 +02:00
|
|
|
? `${counts.backlog} Backlog`
|
2026-07-08 12:55:37 +02:00
|
|
|
: area.countKey === 'actionsOpen' && counts.actionsOpen
|
2026-07-05 18:29:47 +02:00
|
|
|
? `${counts.actionsOpen} offen`
|
2026-07-08 12:55:37 +02:00
|
|
|
: area.countKey === 'roadmapItems' && counts.roadmapItems
|
2026-07-05 18:45:36 +02:00
|
|
|
? `${counts.roadmapItems} Plan-Elemente`
|
2026-07-05 18:29:47 +02:00
|
|
|
: null
|
|
|
|
|
return (
|
|
|
|
|
<Link
|
|
|
|
|
key={area.to}
|
2026-07-08 12:55:37 +02:00
|
|
|
to={scopedPath(area.to, { initiativeId })}
|
2026-07-05 18:29:47 +02:00
|
|
|
className="initiative-nav-card card"
|
|
|
|
|
>
|
|
|
|
|
<h3>{area.title}</h3>
|
|
|
|
|
<p className="muted">{area.description}</p>
|
|
|
|
|
{hint && <span className="initiative-nav-card-hint">{hint}</span>}
|
|
|
|
|
</Link>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
)
|
|
|
|
|
}
|