AP1.12b: Modal-Bearbeitung für Profil, Projekte und Backlog im Plan-Modus.
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
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
Ersetzt Inline-Formulare durch Dialoge; Scope-Breadcrumb aktualisiert sich nach Profil-Speichern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
bbadf22d39
commit
e50c04c96f
14 files changed
+529
-135
No files matched your search
@@ -27,8 +27,7 @@ export function InitiativeInboxPage() {
|
||||
roadmapItems={roadmapItems}
|
||||
canManage={capabilities.has('kairo.backlog.manage')}
|
||||
onCreate={handleCreateBacklog}
|
||||
onUpdateGate={handleBacklogGate}
|
||||
onUpdateStatus={handleBacklogStatus}
|
||||
onUpdate={handleUpdateBacklog}
|
||||
onConvert={handleConvertBacklog}
|
||||
onDelete={handleDeleteBacklog}
|
||||
busy={formBusy}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import { useState } from 'react'
|
||||
import { RequireInitiativeScope } from '../../components/RequireInitiativeScope.jsx'
|
||||
import { ScopedInitiativeProvider } from '../../layout/ScopedInitiativeProvider.jsx'
|
||||
import { StatusBadge } from '../../components/StatusBadge.jsx'
|
||||
import { LoadingState } from '../../components/LoadingState.jsx'
|
||||
import { Modal } from '../../components/Modal.jsx'
|
||||
import { InitiativeForm } from '../../components/InitiativeForm.jsx'
|
||||
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
|
||||
import { useProgramScope } from '../../context/ProgramScopeContext.jsx'
|
||||
|
||||
function PlanProfileInner() {
|
||||
const ops = useInitiativeOperations()
|
||||
const { initiative, loading, error } = ops
|
||||
const { refreshInitiativeMeta } = useProgramScope()
|
||||
const { initiative, loading, error, capabilities, formBusy } = ops
|
||||
const [editing, setEditing] = useState(false)
|
||||
|
||||
const canManage = capabilities.has('kairo.initiative.manage')
|
||||
|
||||
if (loading) {
|
||||
return <LoadingState message="Lade Profil …" />
|
||||
@@ -16,27 +24,56 @@ function PlanProfileInner() {
|
||||
return <p className="muted">Vorhaben nicht gefunden.</p>
|
||||
}
|
||||
|
||||
async function handleSave(payload) {
|
||||
const ok = await ops.handleUpdateInitiative(payload)
|
||||
if (ok) {
|
||||
refreshInitiativeMeta()
|
||||
setEditing(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="card plan-profile">
|
||||
<header className="plan-profile__header">
|
||||
<h2 className="card-title">{initiative.title}</h2>
|
||||
<StatusBadge kind="initiative" status={initiative.status} />
|
||||
</header>
|
||||
{error && <p className="error">{error}</p>}
|
||||
{initiative.goal ? (
|
||||
<div className="plan-profile__field">
|
||||
<h3 className="plan-profile__label">Ziel</h3>
|
||||
<p>{initiative.goal}</p>
|
||||
</div>
|
||||
) : (
|
||||
<p className="muted">
|
||||
Noch kein Ziel hinterlegt — vollständiges Profil folgt mit Archetypen (AP1.10).
|
||||
<>
|
||||
<section className="card plan-profile">
|
||||
<header className="plan-profile__header">
|
||||
<h2 className="card-title">{initiative.title}</h2>
|
||||
<div className="plan-profile__header-actions">
|
||||
<StatusBadge kind="initiative" status={initiative.status} />
|
||||
{canManage && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary btn-sm"
|
||||
onClick={() => setEditing(true)}
|
||||
disabled={formBusy}
|
||||
>
|
||||
Bearbeiten
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</header>
|
||||
{error && <p className="error">{error}</p>}
|
||||
{initiative.goal ? (
|
||||
<div className="plan-profile__field">
|
||||
<h3 className="plan-profile__label">Ziel</h3>
|
||||
<p>{initiative.goal}</p>
|
||||
</div>
|
||||
) : (
|
||||
<p className="muted">Noch kein Ziel hinterlegt.</p>
|
||||
)}
|
||||
<p className="muted plan-profile__note">
|
||||
Archetyp-Felder und dynamische Attribute folgen mit AP1.10 (Entity Field System).
|
||||
</p>
|
||||
)}
|
||||
<p className="muted plan-profile__note">
|
||||
Bearbeitung per Modal kommt in AP1.10 (Entity Field System).
|
||||
</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<Modal open={editing} title="Vorhaben bearbeiten" onClose={() => setEditing(false)}>
|
||||
<InitiativeForm
|
||||
initial={initiative}
|
||||
onSubmit={handleSave}
|
||||
onCancel={() => setEditing(false)}
|
||||
busy={formBusy}
|
||||
/>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,12 +25,13 @@ function PlanStructureInner() {
|
||||
<>
|
||||
{error && <p className="error">{error}</p>}
|
||||
<ProjectsSection
|
||||
initiativeId={initiativeId}
|
||||
projects={projects}
|
||||
roadmapItems={roadmapItems}
|
||||
selectedProjectId={selectedProjectId}
|
||||
onSelectProject={setSelectedProjectId}
|
||||
canManage={capabilities.has('kairo.project.manage')}
|
||||
onCreate={ops.handleCreateProject}
|
||||
onUpdate={ops.handleUpdateProject}
|
||||
onDelete={ops.handleDeleteProject}
|
||||
busy={ops.formBusy}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user