Enhance Progression Graph Management with F15 Features and Evaluation Improvements
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m21s
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m21s
- Updated `PROJECT_STATUS.md` to reflect the implementation of F15 features, including the unified slot review and handling of `findings_stale`. - Enhanced `PROGRESSION_GRAPH_SLOT_EDITOR_SPEC.md` with detailed descriptions of new functionalities related to the match dialog and path quality assessments. - Introduced new functions in `exercise_progression_graphs.py` to validate exercise visibility against progression graph settings, ensuring proper governance. - Improved frontend components to support new governance parameters (visibility and club_id) in exercise creation workflows. - Updated documentation in `HANDOVER.md` and `PLANNING_KI_ROADMAP.md` to outline the latest developments and validation results for the F15 features. - Enhanced utility functions for exercise creation to incorporate governance settings, improving the overall user experience in the path builder and editor.
This commit is contained in:
1 parent
b629f192ac
commit
4b9374765b
11 files changed
+291
-50
No files matched your search
@@ -208,11 +208,27 @@ export function aiPreviewToQuickCreateDraft(preview, { title, focusAreaId, sketc
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sichtbarkeit/club_id für Schnellanlage (z. B. aus Progressionsgraph).
|
||||
* @param {{ visibility?: string, clubId?: number|null }} [governance]
|
||||
*/
|
||||
function resolveQuickCreateGovernance(governance) {
|
||||
const rawVis = (governance?.visibility || 'private').trim().toLowerCase()
|
||||
const vis = rawVis === 'club' || rawVis === 'official' ? rawVis : 'private'
|
||||
let clubId = null
|
||||
if (vis === 'club' && governance?.clubId != null && governance.clubId !== '') {
|
||||
const n = Number(governance.clubId)
|
||||
if (Number.isFinite(n) && n > 0) clubId = n
|
||||
}
|
||||
return { visibility: vis, club_id: clubId }
|
||||
}
|
||||
|
||||
/**
|
||||
* createExercise-Payload aus bearbeitetem Entwurf.
|
||||
* @param {{ visibility?: string, clubId?: number|null }} [governance]
|
||||
* @throws {Error}
|
||||
*/
|
||||
export function buildQuickCreateExercisePayloadFromDraft(draft) {
|
||||
export function buildQuickCreateExercisePayloadFromDraft(draft, governance) {
|
||||
const title = (draft?.title || '').trim()
|
||||
if (title.length < 3) {
|
||||
throw new Error('Titel: mindestens 3 Zeichen.')
|
||||
@@ -239,6 +255,7 @@ export function buildQuickCreateExercisePayloadFromDraft(draft) {
|
||||
if (summary && !stripHtmlToText(summary).trim()) summary = null
|
||||
|
||||
const skills = (draft?.skillChoices || []).filter((c) => c.include).map((c) => c.after)
|
||||
const { visibility, club_id: clubId } = resolveQuickCreateGovernance(governance)
|
||||
|
||||
return {
|
||||
title,
|
||||
@@ -247,7 +264,7 @@ export function buildQuickCreateExercisePayloadFromDraft(draft) {
|
||||
execution,
|
||||
preparation: prep,
|
||||
trainer_notes: trainerNotes,
|
||||
visibility: 'private',
|
||||
visibility,
|
||||
status: 'draft',
|
||||
equipment: [],
|
||||
focus_areas_multi: [{ focus_area_id: fid, is_primary: true }],
|
||||
@@ -256,15 +273,16 @@ export function buildQuickCreateExercisePayloadFromDraft(draft) {
|
||||
target_groups_multi: [],
|
||||
age_groups: [],
|
||||
skills,
|
||||
club_id: null,
|
||||
club_id: clubId,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* createExercise-Payload aus bestätigter Vorschau (Checkbox-Modus).
|
||||
* @param {{ visibility?: string, clubId?: number|null }} [governance]
|
||||
* @throws {Error}
|
||||
*/
|
||||
export function buildQuickCreateExercisePayloadFromPreview(preview, { title, focusAreaId, sketchPlain }) {
|
||||
export function buildQuickCreateExercisePayloadFromPreview(preview, { title, focusAreaId, sketchPlain, ...governance } = {}) {
|
||||
const sketchHtml = aiPlainTextToMinimalHtml(sketchPlain)
|
||||
const fieldMap = {}
|
||||
for (const c of preview?.instructionChoices || []) {
|
||||
@@ -288,6 +306,7 @@ export function buildQuickCreateExercisePayloadFromPreview(preview, { title, foc
|
||||
}
|
||||
|
||||
const skills = (preview?.skillChoices || []).filter((c) => c.include).map((c) => c.after)
|
||||
const { visibility, club_id: clubId } = resolveQuickCreateGovernance(governance)
|
||||
|
||||
const fid = Number(focusAreaId)
|
||||
if (!Number.isFinite(fid) || fid < 1) {
|
||||
@@ -301,7 +320,7 @@ export function buildQuickCreateExercisePayloadFromPreview(preview, { title, foc
|
||||
execution,
|
||||
preparation: prep,
|
||||
trainer_notes: trainerNotes,
|
||||
visibility: 'private',
|
||||
visibility,
|
||||
status: 'draft',
|
||||
equipment: [],
|
||||
focus_areas_multi: [{ focus_area_id: fid, is_primary: true }],
|
||||
@@ -310,7 +329,7 @@ export function buildQuickCreateExercisePayloadFromPreview(preview, { title, foc
|
||||
target_groups_multi: [],
|
||||
age_groups: [],
|
||||
skills,
|
||||
club_id: null,
|
||||
club_id: clubId,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user