Erfassen und Transparent: Archetyp, Methode und Auspraegung in der UI sichtbar.
Test Suite / pytest-backend (push) Failing after 2s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Deploy Development / deploy (push) Failing after 50s

Method-Profiles-API und Auswahl beim Anlegen/Profil; Steuerungs-Meta in Listen und Plan; Projekt-Archetyp-Spiegel, Next-Action-Links und Umlaut-Fix fuer testbare Guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-10 12:36:12 +02:00
1 parent 95b743d6fd
commit efb45a3ee6
31 files changed
+965 -65

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
import { useEffect, useState } from 'react'
import { listEntityArchetypes } from '../api/entityArchetypes.js'
/**
* Lädt Initiative- und Project-Archetypen (AP1.10 / AP2.0).
* @param {{ enabled?: boolean }} [options]
*/
export function useEntityArchetypes(options = {}) {
const { enabled = true } = options
const [initiativeArchetypes, setInitiativeArchetypes] = useState([])
const [projectArchetypes, setProjectArchetypes] = useState([])
const [loading, setLoading] = useState(enabled)
useEffect(() => {
if (!enabled) {
setLoading(false)
return undefined
}
let cancelled = false
setLoading(true)
Promise.all([
listEntityArchetypes('initiative').catch(() => []),
listEntityArchetypes('project').catch(() => []),
])
.then(([initiative, project]) => {
if (cancelled) return
setInitiativeArchetypes(Array.isArray(initiative) ? initiative : [])
setProjectArchetypes(Array.isArray(project) ? project : [])
})
.finally(() => {
if (!cancelled) setLoading(false)
})
return () => {
cancelled = true
}
}, [enabled])
return { initiativeArchetypes, projectArchetypes, loading }
}