Charge par série : pyramide, montée en charge gardée pour la fois suivante (R2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
06a00ab3bb
commit
615348fed3
+12
-1
@@ -9,6 +9,13 @@ import { DEFAULT_PROFILE } from "./profile.js";
|
||||
* séance faite ; `id` est celui de l'événement SessionLogged
|
||||
*/
|
||||
|
||||
/**
|
||||
* Charge de travail d'un exercice d'une séance (clé « A-squat »). `setsKg` : une charge
|
||||
* par série, quand elles diffèrent (pyramide, montée en charge) ; `loadKg` est alors
|
||||
* la plus lourde. Glossaire : docs/glossaire/charge-de-travail.md
|
||||
* @typedef {{loadKg: number|null, seconds: number|null, setsKg?: number[]}} WorkingLoad
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} ProgramVersion
|
||||
* @property {string} eventId
|
||||
@@ -38,7 +45,7 @@ import { DEFAULT_PROFILE } from "./profile.js";
|
||||
* @property {import("./vocabulary.js").Mode} mode
|
||||
* @property {LoggedSession[]} sessions triées par date puis heure d'enregistrement
|
||||
* @property {string[]} skippedDays dates triées
|
||||
* @property {Record<string, {loadKg: number|null, seconds: number|null}>} workingLoads
|
||||
* @property {Record<string, WorkingLoad>} workingLoads
|
||||
* @property {Record<string, import("./vocabulary.js").TrackingMode>} trackingOverrides
|
||||
* @property {{date: string, kg: number}[]} weights triées par date
|
||||
* @property {import("./events.js").PlanSettings|null} planSettings réglages par défaut
|
||||
@@ -108,6 +115,10 @@ export function foldEvents(events) {
|
||||
const cur = state.workingLoads[e.data.key] ?? { loadKg: null, seconds: null };
|
||||
if ("loadKg" in e.data) cur.loadKg = e.data.loadKg ?? null;
|
||||
if ("seconds" in e.data) cur.seconds = e.data.seconds ?? null;
|
||||
if ("setsKg" in e.data) {
|
||||
if (e.data.setsKg) cur.setsKg = [...e.data.setsKg];
|
||||
else delete cur.setsKg;
|
||||
}
|
||||
state.workingLoads[e.data.key] = cur;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user