feat(exercises): update to version 0.8.100 and enhance combination exercise handling
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 12s
Test Suite / playwright-tests (push) Successful in 56s
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 12s
Test Suite / playwright-tests (push) Successful in 56s
- Bumped app version to 0.8.100, reflecting recent updates. - Improved validation logic for combination exercises in the backend, ensuring proper handling of exercise variants. - Enhanced frontend components, including the ExercisePickerModal, to support filtering and displaying combination exercises. - Updated API payloads and utility functions to accommodate new exercise types and their properties. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a9f9f960f
commit
3dc4c9c79e
7 files changed
+162
-54
No files matched your search
@@ -32,6 +32,8 @@ export default function ExercisePickerModal({
|
||||
multiSelect = false,
|
||||
onSelectExercises = null,
|
||||
enableQuickCreateDraft = false,
|
||||
/** Wenn gesetzt: z. B. ['simple'] oder ['combination'] — sonst alle Übungsarten */
|
||||
exerciseKindAny = undefined,
|
||||
}) {
|
||||
const { user } = useAuth()
|
||||
const [catalogs, setCatalogs] = useState({
|
||||
@@ -213,8 +215,14 @@ export default function ExercisePickerModal({
|
||||
if (filters.include_archived) q.include_archived = true
|
||||
if (debouncedSearch) q.search = debouncedSearch
|
||||
if (debouncedAi) q.ai_search = debouncedAi
|
||||
if (
|
||||
Array.isArray(exerciseKindAny) &&
|
||||
exerciseKindAny.length > 0
|
||||
) {
|
||||
q.exercise_kind_any = exerciseKindAny
|
||||
}
|
||||
return q
|
||||
}, [filters, debouncedSearch, debouncedAi])
|
||||
}, [filters, debouncedSearch, debouncedAi, exerciseKindAny])
|
||||
|
||||
const reload = useCallback(async () => {
|
||||
if (!open || !catalogsReady) return
|
||||
@@ -225,7 +233,6 @@ export default function ExercisePickerModal({
|
||||
...queryBase,
|
||||
include_archived: true,
|
||||
include_variants: true,
|
||||
exercise_kind_any: ['simple'],
|
||||
limit: PAGE_SIZE,
|
||||
offset: 0,
|
||||
})
|
||||
@@ -254,7 +261,6 @@ export default function ExercisePickerModal({
|
||||
...queryBase,
|
||||
include_archived: true,
|
||||
include_variants: true,
|
||||
exercise_kind_any: ['simple'],
|
||||
limit: PAGE_SIZE,
|
||||
offset,
|
||||
})
|
||||
@@ -608,6 +614,19 @@ export default function ExercisePickerModal({
|
||||
{ex.focus_area}
|
||||
</span>
|
||||
)}
|
||||
{(ex.exercise_kind || '').toLowerCase().trim() === 'combination' ? (
|
||||
<span
|
||||
className="exercise-tag"
|
||||
style={{
|
||||
marginTop: 6,
|
||||
marginLeft: 6,
|
||||
background: 'var(--accent-soft)',
|
||||
color: 'var(--accent-dark)',
|
||||
}}
|
||||
>
|
||||
Kombination
|
||||
</span>
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
if (multiSelect) {
|
||||
|
||||
Reference in new issue
Block a user