feat(version): bump to 0.8.103 and enhance planning method profile integration
Deploy Development / deploy (push) Successful in 38s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 11s
Test Suite / playwright-tests (push) Successful in 59s

- Updated app version to 0.8.103, reflecting recent enhancements in training planning.
- Incremented database schema version to 20260512057, ensuring compatibility with new features.
- Introduced optional `planning_method_profile` for combination exercises, allowing for detailed planning and coaching support.
- Enhanced frontend components to manage and display planning method profiles effectively in the Training Unit Sections Editor and ExerciseFullContent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 4.6 committed 2026-05-13 07:21:33 +02:00
1 parent 12fd3926b2
commit 4e654e50c0
9 files changed
+233 -17

No files matched your search

@@ -6,6 +6,7 @@ import React from 'react'
import { Link } from 'react-router-dom'
import ExerciseRichTextBlock from './ExerciseRichTextBlock'
import CombinationCoachSlots from './CombinationCoachSlots'
import { effectiveComboMethodProfile } from '../utils/comboPlanningMethodProfile'
function TagRow({ exercise }) {
const tags = []
@@ -53,9 +54,9 @@ function metaParts(exercise) {
}
/**
* @param {{ exercise?: object|null, loading?: boolean, error?: string|null, exerciseId?: number, variantId?: number|string|null }} props
* @param {{ exercise?: object|null, loading?: boolean, error?: string|null, exerciseId?: number, variantId?: number|string|null, planningComboMethodProfile?: object|null }} props
*/
export default function ExerciseFullContent({ exercise, loading, error, exerciseId, variantId }) {
export default function ExerciseFullContent({ exercise, loading, error, exerciseId, variantId, planningComboMethodProfile }) {
if (loading) {
return (
<div style={{ textAlign: 'center', padding: '1rem' }}>
@@ -80,6 +81,10 @@ export default function ExerciseFullContent({ exercise, loading, error, exercise
const isCombination =
String(exercise.exercise_kind || 'simple').toLowerCase().trim() === 'combination'
const coachComboProfile = isCombination
? effectiveComboMethodProfile(exercise.method_profile, planningComboMethodProfile)
: null
return (
<div className="exercise-coach-catalog" style={{ fontSize: '0.93rem', lineHeight: 1.5 }}>
{variant ? (
@@ -114,7 +119,7 @@ export default function ExerciseFullContent({ exercise, loading, error, exercise
<CombinationCoachSlots
combinationSlots={exercise.combination_slots}
methodArchetype={exercise.method_archetype}
methodProfile={exercise.method_profile}
methodProfile={coachComboProfile}
/>
) : null}
<h2 style={{ margin: '0 0 8px', fontSize: '1.2rem', lineHeight: 1.35 }}>{exercise.title}</h2>
@@ -1,5 +1,7 @@
import React, { Fragment, useCallback, useEffect, useState } from 'react'
import { GripVertical, Pencil } from 'lucide-react'
import CombinationMethodProfileEditor from './CombinationMethodProfileEditor'
import { comboPlanningProfileJsonForEditor } from '../utils/comboPlanningMethodProfile'
import {
defaultSection,
exerciseRow,
@@ -1019,6 +1021,72 @@ export default function TrainingUnitSectionsEditor({
</div>
</div>
{isCombination && it.exercise_id ? (
<div
className="tu-combo-planning-profile"
style={{
padding: '4px 12px 4px',
paddingLeft: enableItemDragReorder ? 44 : 12,
borderTop: '1px solid var(--border)',
}}
>
<details className="card" style={{ padding: '12px 14px', background: 'var(--surface2)' }}>
<summary
style={{ cursor: 'pointer', fontSize: '0.88rem', color: 'var(--text2)', fontWeight: 600 }}
>
Ablaufprofil für diese Planung (Kombination)
<span style={{ marginLeft: 10, fontWeight: 400, fontSize: '0.82rem' }}>
{it.planning_method_profile != null &&
typeof it.planning_method_profile === 'object' &&
!Array.isArray(it.planning_method_profile)
? '— Anpassung aktiv'
: '— wie im Katalog'}
</span>
</summary>
<div style={{ marginTop: 12 }}>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, marginBottom: 10 }}>
<button
type="button"
className="btn btn-secondary framework-ctrl framework-ctrl--xs"
onClick={() => updateItem(sIdx, iIdx, 'planning_method_profile', null)}
>
Planung wie Katalog
</button>
<button
type="button"
className="btn btn-secondary framework-ctrl framework-ctrl--xs"
title="Bearbeitbare Kopie der Katalog-Vorgaben setzen"
onClick={() =>
updateItem(sIdx, iIdx, 'planning_method_profile', {
...(it.catalog_method_profile || {}),
})
}
>
Aus Katalog kopieren …
</button>
</div>
<CombinationMethodProfileEditor
methodArchetype={(it.catalog_method_archetype || '').trim()}
methodProfileJson={comboPlanningProfileJsonForEditor(
it.catalog_method_profile || {},
it.planning_method_profile
)}
onChangeMethodProfileJson={(json) => {
try {
const obj = JSON.parse(json || '{}')
if (obj && typeof obj === 'object' && !Array.isArray(obj)) {
updateItem(sIdx, iIdx, 'planning_method_profile', obj)
}
} catch {
/* Ungültiges JSON — Hinweis im Editor */
}
}}
/>
</div>
</details>
</div>
) : null}
{showExecutionExtras ? (
<div className="tu-ex-debrief">
<div className="tu-ex-debrief__grow">