warm-up round 3: applyPrescription/readSession never touch warm-up rows; per-phase set numbering; regression tests

This commit is contained in:
root committed 2026-08-07 15:19:11 +02:00
1 parent 86ac937d5d
commit 01072ef5e3
3 files changed
+69 -8

No files matched your search

+3 -1
View File
@@ -134,11 +134,13 @@ function ExerciseBlock({ entryIdx, compact, onToggle, onField, onAddSet, onRemov
{entry.sets.map((s, i) => {
const warmBefore = i > 0 && !!entry.sets[i - 1].warmup
const isFirstWarmup = !!s.warmup && !warmBefore
// Numbering restarts per phase: with two warm-ups the first work set reads 1, not 3.
const phaseNum = entry.sets.slice(0, i + 1).filter(x => (x.warmup === true) === (s.warmup === true)).length
return <div key={i}>
{isFirstWarmup && <div className="setph">{t('Warm-up')}</div>}
{!s.warmup && warmBefore && <div className="setsep" />}
<div className={'setrow' + (s.done ? ' done' : '') + (col3 ? ' eff3' : '')}>
<div className="n">{i + 1}</div>
<div className="n">{phaseNum}</div>
{cell(s, i, col1, 'w')}
{col2 && cell(s, i, col2, 'r')}
{col3 && cell(s, i, col3, 'eff')}