Décharge conseillée et progression par série (5d) ; journal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-23 06:51:10 +01:00
co-authored by Claude Opus 5.5
parent 74bd0851cb
commit d0aff18d8e
20 changed files with 389 additions and 14 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ export const EVENT_VERSION = 1;
* | Envelope<"ProposalRejected", {proposalId: string, reason?: string}>
* | Envelope<"ProfileUpdated", {profile: import("./profile.js").Profile}>
* | Envelope<"PlanSettingsChanged", PlanSettings & {week: string|null}>
* | Envelope<"ModeChanged", {mode: import("./vocabulary.js").Mode, reason?: string}>
* | Envelope<"ModeChanged", {mode: import("./vocabulary.js").Mode, reason?: string, deload?: boolean}>
* } DomainEvent
*/
@@ -158,7 +158,7 @@ const DATA_CHECKS = {
return "jour imposé invalide";
return null;
},
ModeChanged: (d) => (MODES.includes(d.mode) ? null : "mode inconnu"),
ModeChanged: (d) => (!MODES.includes(d.mode) ? "mode inconnu" : d.deload !== undefined && (typeof d.deload !== "boolean" || (d.deload && d.mode !== "recovery")) ? "décharge mal formée" : null),
};
/** Tous les types connus. */