feat(version): bump to 0.8.110 and enhance combination exercise features
- Updated app version to 0.8.110, reflecting recent improvements in combination exercise handling. - Introduced `load_combination_slots_for_exercise` function to streamline fetching combination slots for exercises. - Enhanced `TrainingPlanningPage` and `ExercisePeekModal` to utilize the new combination slots functionality, improving user experience. - Updated changelog to document the latest changes and feature enhancements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
5dc93d9a8c
commit
a8942a9e4e
10 files changed
+475
-84
No files matched your search
@@ -5,7 +5,9 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { Link, useNavigate, useParams } from 'react-router-dom'
|
||||
import api from '../utils/api'
|
||||
import ExercisePeekModal from '../components/ExercisePeekModal'
|
||||
import CombinationPlanBracket from '../components/CombinationPlanBracket'
|
||||
import { itemStableKey, sortedSections, sortedItems } from '../utils/trainingPlanUtils'
|
||||
import { effectiveComboMethodProfile } from '../utils/comboPlanningMethodProfile'
|
||||
|
||||
function storageKey(unitId) {
|
||||
return `sj_training_run_checked_${unitId}`
|
||||
@@ -146,6 +148,7 @@ export default function TrainingUnitRunPage() {
|
||||
open={peekCtx != null}
|
||||
exerciseId={peekCtx?.exerciseId}
|
||||
variantId={peekCtx?.variantId ?? undefined}
|
||||
peekExtras={peekCtx?.peekExtras ?? undefined}
|
||||
onClose={() => setPeekCtx(null)}
|
||||
/>
|
||||
|
||||
@@ -271,7 +274,15 @@ export default function TrainingUnitRunPage() {
|
||||
const plan = formatMin(it.planned_duration_min)
|
||||
const extras = []
|
||||
if (it.exercise_focus_area) extras.push(it.exercise_focus_area)
|
||||
const metaParts = [...extras, plan].filter(Boolean)
|
||||
const exKind = String(it.exercise_kind || 'simple').toLowerCase().trim()
|
||||
const isComboRow = exKind === 'combination'
|
||||
const metaParts = [...extras, isComboRow ? 'Kombination' : null, plan].filter(Boolean)
|
||||
const comboEffectiveProfile = isComboRow
|
||||
? effectiveComboMethodProfile(
|
||||
it.catalog_method_profile || {},
|
||||
it.planning_method_profile ?? null,
|
||||
)
|
||||
: null
|
||||
|
||||
return (
|
||||
<li key={ck} className={`training-run-item training-run-item--exercise${done ? ' training-run-item--done' : ''}`}>
|
||||
@@ -309,6 +320,22 @@ export default function TrainingUnitRunPage() {
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{isComboRow && it.exercise_id ? (
|
||||
<div className="training-run-combo-embed">
|
||||
<CombinationPlanBracket
|
||||
methodArchetype={String(it.catalog_method_archetype || '').trim()}
|
||||
methodProfile={comboEffectiveProfile || {}}
|
||||
combinationSlots={
|
||||
Array.isArray(it.combination_slots) ? it.combination_slots : []
|
||||
}
|
||||
planningAdjusted={
|
||||
it.planning_method_profile != null &&
|
||||
typeof it.planning_method_profile === 'object' &&
|
||||
!Array.isArray(it.planning_method_profile)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
{it.exercise_id && (
|
||||
<div className="no-print" style={{ display: 'flex', flexWrap: 'wrap', gap: '10px', marginTop: '0.55rem', alignItems: 'center' }}>
|
||||
<button
|
||||
@@ -318,7 +345,16 @@ export default function TrainingUnitRunPage() {
|
||||
onClick={() =>
|
||||
setPeekCtx({
|
||||
exerciseId: it.exercise_id,
|
||||
variantId: it.exercise_variant_id != null ? Number(it.exercise_variant_id) : null,
|
||||
variantId:
|
||||
it.exercise_variant_id != null
|
||||
? Number(it.exercise_variant_id)
|
||||
: null,
|
||||
peekExtras: isComboRow
|
||||
? {
|
||||
catalog_method_profile: it.catalog_method_profile,
|
||||
planning_method_profile: it.planning_method_profile,
|
||||
}
|
||||
: undefined,
|
||||
})
|
||||
}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user