Update version to 0.8.141 and enhance training plan template handling
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m13s

- Incremented app version to 0.8.141 and updated build date to 2026-05-14.
- Modified the planning module version to 0.12.0, improving template section handling with phase metadata.
- Introduced new functions for normalizing and inserting training plan template sections, ensuring accurate phase representation during saves.
- Updated frontend components to utilize new utility functions for managing training plan templates, enhancing user experience and data integrity.
This commit is contained in:
Lars committed 2026-05-16 07:41:08 +02:00
1 parent 79e748b470
commit c3eb5a62c4
5 files changed
+282 -58

No files matched your search

@@ -19,6 +19,8 @@ import {
buildPlanPayloadForSave,
hydrateExercisePlanningRow,
insertTrainingModuleIntoPlanningSections,
templateSectionsPayloadFromFormSections,
formSectionsFromPlanTemplateRows,
} from '../../utils/trainingUnitSectionsForm'
import {
addDaysIsoDate,
@@ -549,12 +551,8 @@ function TrainingPlanningPageRoot() {
setFormData((fd) => ({
...fd,
sections: (tpl.sections || []).length
? tpl.sections.map((s) => ({
title: s.title,
guidance_notes: s.guidance_text || '',
items: []
}))
: [defaultSection()]
? formSectionsFromPlanTemplateRows(tpl.sections)
: [defaultSection()],
}))
} catch (err) {
toast.error('Vorlage laden: ' + err.message)
@@ -651,10 +649,7 @@ function TrainingPlanningPageRoot() {
try {
await api.createTrainingPlanTemplate({
name: name.trim(),
sections: formData.sections.map((s) => ({
title: s.title || 'Abschnitt',
guidance_text: s.guidance_notes?.trim() ? s.guidance_notes.trim() : null
}))
sections: templateSectionsPayloadFromFormSections(formData.sections),
})
await loadPlanTemplates()
toast.success('Vorlage gespeichert.')