feat: finish all UI/UX improvements from backlog

- nav: aria-label on baby switcher select
- dashboard: active timers show baby name
- growth: PDF export includes percentile band per weight row
- settings: invite link note (permanent, reset if compromised)
- timeline: select mode toggle shows "Annuler" when active
- photos: delete photo from lightbox (PATCHes event metadata)
- notes: invisible date input overlay for date-jump via calendar picker
- IMPROVEMENTS.md: updated checkboxes, 8 remaining → 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:58:57 +02:00
parent 8f68eebeb0
commit b40694d691
8 changed files with 102 additions and 42 deletions
+14 -1
View File
@@ -242,6 +242,15 @@ export default function GrowthPage() {
}
function exportPDF() {
function getPercentileBand(ageWeeks: number, weightKg: number): string {
const values = PERCENTILE_LABELS.map((_, i) => interpolatePercentile(ageWeeks, i) ?? 0);
if (weightKg < values[0]) return "< P3";
for (let i = 0; i < values.length - 1; i++) {
if (weightKg >= values[i] && weightKg < values[i + 1]) return `${PERCENTILE_LABELS[i]}${PERCENTILE_LABELS[i + 1]}`;
}
return "> P97";
}
import("jspdf").then(({ default: jsPDF }) => {
const doc = new jsPDF();
const pageW = doc.internal.pageSize.getWidth();
@@ -277,7 +286,11 @@ export default function GrowthPage() {
}
doc.setTextColor(30, 41, 59);
doc.text(format(new Date(log.date), "d MMM yyyy", { locale: fr }), COL[0], y);
doc.text(log.weight ? (log.weight / 1000).toFixed(3) : "—", COL[1], y);
doc.text(log.weight ? (() => {
const ageW = getAgeInWeeks(new Date(baby!.birthDate), new Date(log.date));
const band = ageW >= 0 && ageW <= 104 ? ` (${getPercentileBand(ageW, log.weight! / 1000)})` : "";
return `${(log.weight! / 1000).toFixed(3)}${band}`;
})() : "—", COL[1], y);
doc.text(log.height ? String(log.height) : "—", COL[2], y);
doc.text(log.headCirc ? String(log.headCirc) : "—", COL[3], y);
if (log.notes) doc.text(log.notes.slice(0, 30), COL[4], y);