This commit is contained in:
Duarte Santos committed 2026-08-30 13:30:38 +02:00
commit a65287de0f
24 files changed
+136 -11

No files matched your search

+8 -3
View File
@@ -1053,14 +1053,19 @@ export function beginWorkout(routineId, bw) {
// The prescription is applied as the session is built, so you walk up to the bar with the
// right weight already on the screen instead of being told about it afterwards. `plan` is
// kept on the entry purely so the workout can explain the number it chose.
const excluded = r?.excludeFromProgression === true
const entries = (r ? r.ex : []).map(cfg => {
const plan = nextPrescription(st, cfg, r)
const plan = excluded ? { policy: 'off', kind: 'off' } : nextPrescription(st, cfg, r)
const step = defaultIncrement(cfg.id, st.unit)
const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step }), plan, step), cfg)
const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step, useTarget: excluded }), plan, step), cfg)
return { id: cfg.id, sg: cfg.sg, target: { ...cfg }, plan, sets }
})
update(s => {
s.active = { id: uid(), d: todayISO(), start: Date.now(), routineId, name: r ? r.name : t('Freestyle'), bw: bw || null, cur: 0, entries }
s.active = {
id: uid(), d: todayISO(), start: Date.now(), routineId,
name: r ? r.name : t('Freestyle'), bw: bw || null, cur: 0, entries,
...(excluded ? { excludeFromProgression: true } : {})
}
})
useUI.getState().stopRest()
nav('/workout')