Kairo-Jinkendo/frontend/src/api/actions.js
Lars e65838118c
All checks were successful
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 2m52s
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 13s
AP2.2e: Unplan, Bug/Issue-Referenz und Sprint-Lebenszyklus.
Ermöglicht APs zurück in den Eingang zu schieben, Bugs/Issues mit Feature-Bezug zu planen und den Scrum-Sprint-Ablauf in der UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 08:07:02 +02:00

37 lines
969 B
JavaScript

import { apiFetch } from './client.js'
export function getAction(id) {
return apiFetch(`/api/actions/${id}`)
}
export function updateAction(id, payload) {
return apiFetch(`/api/actions/${id}`, {
method: 'PATCH',
body: JSON.stringify(payload),
})
}
export function setActionAssignments(id, actorIds) {
return apiFetch(`/api/actions/${id}/assignments`, {
method: 'PUT',
body: JSON.stringify({ actor_ids: actorIds }),
})
}
export function deleteAction(id) {
return apiFetch(`/api/actions/${id}`, { method: 'DELETE' })
}
export function unplanActionToBacklog(id) {
return apiFetch(`/api/actions/${id}/unplan-to-backlog`, { method: 'POST' })
}
export function listMyOpenActions() {
return apiFetch('/api/actions/me/open')
}
/** Offene Maßnahmen = open, in_progress, blocked (Backend-Filter). */
export function countOpenActions(actions) {
return actions.filter((a) => ['open', 'in_progress', 'blocked'].includes(a.status)).length
}