feat: enhance TrainingUnitSectionsEditor with heading accessory support
Deploy Development / deploy (push) Successful in 33s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 39s

- Added a new `headingAccessory` prop to TrainingUnitSectionsEditor for customizable header content.
- Updated the component to conditionally render the heading and accessory in a flexible toolbar layout.
- Refactored TrainingFrameworkProgramEditPage and TrainingPlanningPage to utilize the new heading accessory feature, improving user interaction and layout consistency.
This commit is contained in:
Lars committed 2026-05-05 14:47:38 +02:00
1 parent 2bfe67879f
commit 4080088d42
4 files changed
+72 -70

No files matched your search

@@ -18,6 +18,28 @@ export function exerciseRow() {
}
}
export async function hydrateExercisePlanningRow(exercise) {
let variants = Array.isArray(exercise?.variants) ? exercise.variants : []
let title = exercise?.title || ''
const id = exercise?.id
if (!id) return null
if (!variants.length) {
try {
const full = await api.getExercise(id)
variants = Array.isArray(full?.variants) ? full.variants : []
title = full?.title || title
} catch {
variants = []
}
}
const row = exerciseRow()
row.exercise_id = id
row.exercise_variant_id = ''
row.exercise_title = title
row.variants = variants
return row
}
export function noteRow() {
return { item_type: 'note', note_body: '' }
}