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
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:
1 parent
2e7651812a
commit
6eeddfdc76
27 files changed
+1459
-50
No files matched your search
@@ -34,6 +34,11 @@ import {
|
||||
deleteRoadmapItem,
|
||||
verifyRoadmapItemReached,
|
||||
} from '../api/roadmap.js'
|
||||
import {
|
||||
listInitiativeProjects,
|
||||
createInitiativeProject,
|
||||
deleteProject,
|
||||
} from '../api/projects.js'
|
||||
import {
|
||||
listInitiativeEvidence,
|
||||
createInitiativeEvidence,
|
||||
@@ -76,6 +81,8 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
const [blockers, setBlockers] = useState([])
|
||||
const [backlogItems, setBacklogItems] = useState([])
|
||||
const [roadmapItems, setRoadmapItems] = useState([])
|
||||
const [projects, setProjects] = useState([])
|
||||
const [selectedProjectId, setSelectedProjectId] = useState('')
|
||||
const [evidenceItems, setEvidenceItems] = useState([])
|
||||
const [decisions, setDecisions] = useState([])
|
||||
const [reviews, setReviews] = useState([])
|
||||
@@ -112,6 +119,7 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
loads.push(listInitiativeBlockers(id).then(setBlockers).catch(() => setBlockers([])))
|
||||
loads.push(listInitiativeBacklog(id).then(setBacklogItems).catch(() => setBacklogItems([])))
|
||||
loads.push(listInitiativeRoadmapItems(id).then(setRoadmapItems).catch(() => setRoadmapItems([])))
|
||||
loads.push(listInitiativeProjects(id).then(setProjects).catch(() => setProjects([])))
|
||||
loads.push(listInitiativeEvidence(id).then(setEvidenceItems).catch(() => setEvidenceItems([])))
|
||||
loads.push(listInitiativeDecisions(id).then(setDecisions).catch(() => setDecisions([])))
|
||||
loads.push(listInitiativeReviews(id).then(setReviews).catch(() => setReviews([])))
|
||||
@@ -147,11 +155,16 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
}, [load])
|
||||
|
||||
const visibleActions = useMemo(
|
||||
() =>
|
||||
hideDone
|
||||
() => {
|
||||
let list = hideDone
|
||||
? actions.filter((a) => a.status !== 'done' && a.status !== 'discarded')
|
||||
: actions,
|
||||
[actions, hideDone]
|
||||
: actions
|
||||
if (selectedProjectId) {
|
||||
list = list.filter((a) => a.project_id === selectedProjectId)
|
||||
}
|
||||
return list
|
||||
},
|
||||
[actions, hideDone, selectedProjectId]
|
||||
)
|
||||
|
||||
const actionContextById = useMemo(
|
||||
@@ -185,7 +198,11 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
: context?.actor?.id
|
||||
? [context.actor.id]
|
||||
: []
|
||||
await createInitiativeAction(id, { ...payload, assigned_actor_ids: assigned })
|
||||
await createInitiativeAction(id, {
|
||||
...payload,
|
||||
project_id: payload.project_id || selectedProjectId || undefined,
|
||||
assigned_actor_ids: assigned,
|
||||
})
|
||||
setShowActionForm(false)
|
||||
await load()
|
||||
} catch (err) {
|
||||
@@ -205,6 +222,8 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
priority: payload.priority,
|
||||
due_at: payload.due_at,
|
||||
clear_due_at: !payload.due_at,
|
||||
project_id: payload.project_id,
|
||||
clear_project: payload.project_id === '' || payload.project_id === null,
|
||||
})
|
||||
if (capabilities.has('kairo.action.manage')) {
|
||||
await setActionAssignments(actionId, payload.assigned_actor_ids || [])
|
||||
@@ -386,6 +405,28 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
}
|
||||
}
|
||||
|
||||
async function handleCreateProject(body) {
|
||||
setFormBusy(true)
|
||||
try {
|
||||
await createInitiativeProject(id, body)
|
||||
await load()
|
||||
} catch (err) {
|
||||
setError(err.message)
|
||||
} finally {
|
||||
setFormBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleDeleteProject(projectId) {
|
||||
try {
|
||||
await deleteProject(projectId)
|
||||
if (selectedProjectId === projectId) setSelectedProjectId('')
|
||||
await load()
|
||||
} catch (err) {
|
||||
setError(err.message)
|
||||
}
|
||||
}
|
||||
|
||||
const milestones = useMemo(
|
||||
() => roadmapItems.filter((item) => item.item_type === 'milestone'),
|
||||
[roadmapItems]
|
||||
@@ -520,6 +561,9 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
unlinkedBlockers,
|
||||
backlogItems,
|
||||
roadmapItems,
|
||||
projects,
|
||||
selectedProjectId,
|
||||
setSelectedProjectId,
|
||||
milestones,
|
||||
evidenceItems,
|
||||
decisions,
|
||||
@@ -567,7 +611,9 @@ export function InitiativeOperationsProvider({ children }) {
|
||||
handleDeleteRoadmapItem,
|
||||
handleCreateMilestone: handleCreateRoadmapItem,
|
||||
handleMilestoneStatus: handleRoadmapItemStatus,
|
||||
handleDeleteMilestone: handleDeleteRoadmapItem,
|
||||
handleDeleteMilestone: handleDeleteRoadmapItem,
|
||||
handleCreateProject,
|
||||
handleDeleteProject,
|
||||
handleCreateEvidence,
|
||||
handleEvidenceStatus,
|
||||
handleDeleteEvidence,
|
||||
|
||||
Reference in new issue
Block a user