feat(diaper,milk): leaking diapers toggle + milk stock stats
- Add 'Débordement' toggle to diaper events (wet + stool), stored as metadata.leaked; shown in timeline and dashboard summaries - Add milk stock stats section to stats page (gated on hasPump): summary cards (stock mL, lots, pumped in period), 24h expiry warning, location breakdown pills, and daily pump volume bar chart Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,8 @@ function getEventSummary(event: Event): string {
|
||||
if (event.type === "BOTTLE") {
|
||||
return [meta.volume ? `${meta.volume} mL` : "", meta.bottleType === "maternal" ? "maternel" : "artificiel"].filter(Boolean).join(" · ");
|
||||
}
|
||||
if (event.type === "DIAPER_STOOL") return String(meta.color ?? "");
|
||||
if (event.type === "DIAPER_STOOL") return [String(meta.color ?? ""), meta.leaked ? "débordement" : ""].filter(Boolean).join(" · ");
|
||||
if (event.type === "DIAPER_WET") return meta.leaked ? "débordement" : "";
|
||||
if (event.type === "TEMPERATURE") return meta.value ? `${meta.value}°${meta.unit ?? "C"}` : "";
|
||||
if (event.type === "MEDICATION") return String(meta.name ?? "");
|
||||
if (event.type === "SYMPTOM") { const tags = (meta.tags as string[] | undefined) ?? []; return tags.join(", "); }
|
||||
|
||||
Reference in New Issue
Block a user