feat: Trainer-Kontext-System & Exercise Training Characters (v0.5.0)
Migration 012:
- exercise_training_characters (M:N junction table)
- trainer_contexts (Fokussierte Trainer-Ansichten)
- Indizes für Performance
- Example seed data
Backend (catalogs.py):
- GET /api/trainer-contexts (list own contexts)
- POST /api/trainer-contexts (create context)
- PUT /api/trainer-contexts/{id} (update own context)
- DELETE /api/trainer-contexts/{id} (delete own context)
- Enriched responses mit focus_area_name, style_direction_name, training_type_name
- Ownership-Validation (nur eigene Kontexte)
Frontend:
- TrainerContextsPage.jsx (vollständige CRUD-UI)
- Kaskadierende Dropdowns (Fokusbereich → Stilrichtung)
- is_style_independent Flag für stilunabhängige Kontexte
- api.js erweitert (listTrainerContexts, create, update, delete)
Architektur:
- Flat Catalogs mit M:N überall
- NULL = 'für alles geeignet'
- Trainer-Kontexte für fokussierte Ansichten
- Vorbereitung für 1000+ Übungen mit flexibler KI-Filterung
version: 0.5.0 (backend + frontend)
module: exercises 0.5.0, catalogs 1.5.0
page: TrainerContextsPage 1.0.0
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ab2bd31fa
commit
5e2820c63c
6 files changed
+719
-5
No files matched your search
@@ -423,6 +423,29 @@ export async function getStyleDirectionsHierarchy(filters = {}) {
|
||||
return request(`/api/training-styles/hierarchy${query ? '?' + query : ''}`)
|
||||
}
|
||||
|
||||
// Trainer Contexts (Fokussierte Ansichten)
|
||||
export async function listTrainerContexts() {
|
||||
return request('/api/trainer-contexts')
|
||||
}
|
||||
|
||||
export async function createTrainerContext(data) {
|
||||
return request('/api/trainer-contexts', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateTrainerContext(id, data) {
|
||||
return request(`/api/trainer-contexts/${id}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
export async function deleteTrainerContext(id) {
|
||||
return request(`/api/trainer-contexts/${id}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Training Planning
|
||||
// ============================================================================
|
||||
@@ -556,6 +579,10 @@ export const api = {
|
||||
updateStyleDirectionTargetGroup,
|
||||
deleteStyleDirectionTargetGroup,
|
||||
getStyleDirectionsHierarchy,
|
||||
listTrainerContexts,
|
||||
createTrainerContext,
|
||||
updateTrainerContext,
|
||||
deleteTrainerContext,
|
||||
|
||||
// System
|
||||
getVersion,
|
||||
|
||||
Reference in new issue
Block a user