Kairo-Jinkendo/frontend/src/components/GateSelect.jsx
Lars e50c04c96f
All checks were successful
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Successful in 1m47s
Test Suite / lint-backend (push) Successful in 3s
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
AP1.12b: Modal-Bearbeitung für Profil, Projekte und Backlog im Plan-Modus.
Ersetzt Inline-Formulare durch Dialoge; Scope-Breadcrumb aktualisiert sich nach Profil-Speichern.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 11:26:48 +02:00

30 lines
740 B
JavaScript

export function GateSelect({
roadmapItems = [],
name = 'roadmap_item_id',
defaultValue = '',
label = 'Zielzustand (Gate)',
allowEmpty = true,
disabled = false,
}) {
if (roadmapItems.length === 0) return null
return (
<label>
{label}
<select name={name} defaultValue={defaultValue || ''} disabled={disabled}>
{allowEmpty && <option value=""> keins </option>}
{roadmapItems.map((item) => (
<option key={item.id} value={item.id}>
{item.title}
</option>
))}
</select>
</label>
)
}
export function gateTitleById(roadmapItems, gateId) {
if (!gateId) return null
return roadmapItems.find((item) => item.id === gateId)?.title || null
}