import { useState } from 'react' import { MILESTONE_STATUSES, MILESTONE_STATUS_LABELS, ROADMAP_ITEM_TYPE_LABELS, SEQUENCING_MODE_LABELS, } from '../constants/status.js' import { StatusBadge } from './StatusBadge.jsx' import { EmptyState } from './EmptyState.jsx' const ITEM_TYPES = ['milestone', 'review_gate', 'maturity_stage'] const SEQUENCING_MODES = ['sequential', 'parallel', 'optional'] const EDITABLE_STATUSES = MILESTONE_STATUSES.filter( (s) => !['reached', 'moved', 'discarded'].includes(s) ) function formatDate(value) { if (!value) return null try { return new Date(value.includes('T') ? value : `${value}T12:00:00`).toLocaleDateString( 'de-DE' ) } catch { return value } } export function RoadmapPlanSection({ items, canManage, onCreate, onUpdateStatus, onUpdateItem, onVerifyWithEvidence, onDelete, busy, }) { const [title, setTitle] = useState('') const [goalDescription, setGoalDescription] = useState('') const [targetDate, setTargetDate] = useState('') const [itemType, setItemType] = useState('milestone') const [sequencingMode, setSequencingMode] = useState('sequential') const [showForm, setShowForm] = useState(false) const [verifyTitles, setVerifyTitles] = useState({}) async function handleSubmit(e) { e.preventDefault() if (!title.trim()) return await onCreate({ title: title.trim(), goal_description: goalDescription.trim(), target_date: targetDate || undefined, item_type: itemType, sequencing_mode: sequencingMode, }) setTitle('') setGoalDescription('') setTargetDate('') setItemType('milestone') setSequencingMode('sequential') setShowForm(false) } return (

Plan

Roadmap-Elemente methodenneutral — Gates, Reifegrade oder Review-Punkte. Erreicht nur über Verify (Evidence, Review oder Decision).

{canManage && ( )}
{showForm && canManage && (