feat(chart): рабочий максимум «вес × повторы» с зелёным прогрессом и красным откатом
This commit is contained in:
@@ -180,8 +180,13 @@ export function getExerciseChart(exerciseName, clientId = null) {
|
||||
totalReps += rps;
|
||||
}
|
||||
}
|
||||
// повторы, взятые на максимальном весе — по ним видно прогресс при том же весе
|
||||
let topReps = 0;
|
||||
for (const st of sets) {
|
||||
if (st.weight === maxWeight && st.reps > topReps) topReps = st.reps;
|
||||
}
|
||||
if (maxWeight > 0 || totalReps > 0) {
|
||||
points.push({ date: w.startTime, name: ex.name, maxWeight, totalReps, sets });
|
||||
points.push({ date: w.startTime, name: ex.name, maxWeight, topReps, totalReps, sets });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user