refactor: streamline exercise selection process in training pages
- Simplified the exercise selection logic in TrainingUnitSectionsEditor, TrainingFrameworkProgramEditPage, and TrainingPlanningPage by removing the multi-select option. - Updated the ExercisePickerModal to always enable multi-select, enhancing user experience when selecting exercises. - Refactored the handling of selected exercises to improve clarity and maintainability of the code.
This commit is contained in:
1 parent
4080088d42
commit
86192df508
3 files changed
+65
-126
No files matched your search
@@ -809,19 +809,10 @@ export default function TrainingUnitSectionsEditor({
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary framework-ctrl framework-ctrl--xs"
|
||||
onClick={() => addItem(sIdx, 'exercise')}
|
||||
onClick={() => onRequestExercisePick?.({ sectionIndex: sIdx })}
|
||||
>
|
||||
+ Übung
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary framework-ctrl framework-ctrl--xs"
|
||||
onClick={() =>
|
||||
onRequestExercisePick?.({ sectionIndex: sIdx, multi: true })
|
||||
}
|
||||
>
|
||||
+ mehrere Übungen…
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary framework-ctrl framework-ctrl--xs"
|
||||
|
||||
Reference in new issue
Block a user