AP1.5: Project, Task und Ausführung als Ist-Kern
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m39s
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 18s
Test Suite / playwright-smoke (push) Successful in 12s

Schema 013; Projekte/Arbeitspakete/Aufgaben pflegbar; Tab Zielzustände vs Ausführung.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-06 08:19:05 +02:00
1 parent 2e7651812a
commit 6eeddfdc76
27 files changed
+1459 -50

No files matched your search

+37 -20
View File
@@ -2,10 +2,12 @@ import { useCallback, useEffect, useState } from 'react'
import { Link, useParams } from 'react-router-dom'
import { getAction } from '../api/actions.js'
import { getInitiativeSteeringSnapshot } from '../api/initiatives.js'
import { listInitiativeProjects } from '../api/projects.js'
import { updateAction, setActionAssignments } from '../api/actions.js'
import { createInitiativeBlocker } from '../api/blockers.js'
import { ActionHubCard } from '../components/ActionHubCard.jsx'
import { ActionForm } from '../components/ActionForm.jsx'
import { TasksSection } from '../components/TasksSection.jsx'
import { ErrorState } from '../components/ErrorState.jsx'
import { LoadingState } from '../components/LoadingState.jsx'
import { useInitiativeOperations } from '../context/InitiativeOperationsContext.jsx'
@@ -24,11 +26,13 @@ function ActionDetailBody({
formBusy,
capabilities,
actorsState,
projects = [],
}) {
if (editing) {
return (
<ActionForm
initial={action}
projects={projects}
actors={actorsState.actors}
actorsLoading={actorsState.loading}
actorsError={actorsState.error}
@@ -43,25 +47,31 @@ function ActionDetailBody({
}
return (
<ActionHubCard
action={action}
context={context}
editing={false}
onEdit={onEdit}
onCancelEdit={onCancelEdit}
onSubmitEdit={onSubmit}
onQuickStatus={onQuickStatus}
onCreateBlocker={onCreateBlocker}
canManage={capabilities.has('kairo.action.manage')}
canManageBlocker={capabilities.has('kairo.blocker.manage')}
formBusy={formBusy}
actors={actorsState.actors}
actorsLoading={actorsState.loading}
actorsError={actorsState.error}
actorsUsedFallback={actorsState.usedFallback}
onReloadActors={actorsState.reload}
detailMode
/>
<>
<ActionHubCard
action={action}
context={context}
editing={false}
onEdit={onEdit}
onCancelEdit={onCancelEdit}
onSubmitEdit={onSubmit}
onQuickStatus={onQuickStatus}
onCreateBlocker={onCreateBlocker}
canManage={capabilities.has('kairo.action.manage')}
canManageBlocker={capabilities.has('kairo.blocker.manage')}
formBusy={formBusy}
actors={actorsState.actors}
actorsLoading={actorsState.loading}
actorsError={actorsState.error}
actorsUsedFallback={actorsState.usedFallback}
onReloadActors={actorsState.reload}
detailMode
/>
<TasksSection
actionId={action.id}
canManage={capabilities.has('kairo.action.manage')}
/>
</>
)
}
@@ -70,6 +80,7 @@ function ActionDetailStandalone() {
const { capabilities } = useCapabilities()
const actorsState = useActors()
const [action, setAction] = useState(null)
const [projects, setProjects] = useState([])
const [context, setContext] = useState(null)
const [loading, setLoading] = useState(true)
const [error, setError] = useState(null)
@@ -82,7 +93,11 @@ function ActionDetailStandalone() {
try {
const actionData = await getAction(actionId)
setAction(actionData)
const snap = await getInitiativeSteeringSnapshot(actionData.initiative_id)
const [snap, projectData] = await Promise.all([
getInitiativeSteeringSnapshot(actionData.initiative_id),
listInitiativeProjects(actionData.initiative_id).catch(() => []),
])
setProjects(projectData)
setContext((snap.actions || []).find((a) => a.id === actionId) || null)
} catch (err) {
setError(err.message)
@@ -188,6 +203,7 @@ function ActionDetailStandalone() {
formBusy={formBusy}
capabilities={capabilities}
actorsState={actorsState}
projects={projects}
/>
</section>
</div>
@@ -228,6 +244,7 @@ function ActionDetailNested() {
usedFallback: ops.actorsUsedFallback,
reload: ops.reloadActors,
}}
projects={ops.projects}
/>
</section>
)
@@ -1,11 +1,15 @@
import { useInitiativeOperations } from '../../context/InitiativeOperationsContext.jsx'
import { InitiativeActionsHub } from '../../components/InitiativeActionsHub.jsx'
import { ProjectsSection } from '../../components/ProjectsSection.jsx'
import { BlockersSection } from '../../components/BlockersSection.jsx'
export function InitiativeExecutionPage() {
const ops = useInitiativeOperations()
const {
visibleActions,
projects,
selectedProjectId,
setSelectedProjectId,
actionContextById,
hideDone,
setHideDone,
@@ -24,9 +28,20 @@ export function InitiativeExecutionPage() {
<>
{error && <p className="error">{error}</p>}
<ProjectsSection
projects={projects}
selectedProjectId={selectedProjectId}
onSelectProject={setSelectedProjectId}
canManage={capabilities.has('kairo.project.manage')}
onCreate={ops.handleCreateProject}
onDelete={ops.handleDeleteProject}
busy={formBusy}
/>
<InitiativeActionsHub
initiativeId={initiativeId}
actions={visibleActions}
projects={projects}
actionContextById={actionContextById}
hideDone={hideDone}
onHideDoneChange={setHideDone}
@@ -56,7 +71,7 @@ export function InitiativeExecutionPage() {
<BlockersSection
blockers={unlinkedBlockers}
heading="Vorhaben-Blocker"
lead="Ohne Maßnahmenbezug — verknüpfte Blocker erscheinen am Arbeitspaket."
lead="Ohne Arbeitspaketbezug — verknüpfte Blocker erscheinen am Arbeitspaket."
emptyMessage="Keine vorhabenweiten Blocker."
canManage={capabilities.has('kairo.blocker.manage')}
onCreate={ops.handleCreateBlocker}
@@ -131,7 +131,7 @@ export function RoadmapItemDetailPage() {
return (
<section className="card roadmap-item-detail">
<p className="breadcrumb muted">
<Link to={`/initiatives/${initiativeId}/plan`}>Plan</Link>
<Link to={`/initiatives/${initiativeId}/plan`}>Zielzustände</Link>
{' · '}
{item.title}
</p>