refactor: enhance body history visualization logic and frontend labels
Deploy Development / deploy (push) Successful in 55s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 16s

- Updated the `get_body_history_viz_bundle` function to retrieve the two most recent circumference measurements for improved data accuracy.
- Refactored the handling of previous measurement data to ensure comprehensive interpolation for body metrics.
- Modified frontend labels in the `buildBodyKpiTiles` function to provide clearer descriptions in German, enhancing user understanding of body metrics.
This commit is contained in:
Lars committed 2026-04-19 16:27:59 +02:00
1 parent b2175b9018
commit 8fc7d9c1c4
2 files changed
+41 -13

No files matched your search

+4 -4
View File
@@ -187,10 +187,10 @@ function buildBodyKpiTiles({
const ok = summary.whr < (sex === 'm' ? 0.9 : 0.85)
tiles.push({
key: 'whr',
category: 'WHR',
category: 'Fettverteilung',
icon: '📐',
value: String(summary.whr),
sublabel: 'Taille ÷ Hüfte',
sublabel: 'WHR · Taille ÷ Hüfte',
verdict: whrRule ? verdictShort(whrRule.status) : (ok ? 'Gut' : 'Hinweis'),
status: whrRule?.status || (ok ? 'good' : 'warn'),
hoverTop: whrRule?.title || 'Waist-Hip-Ratio',
@@ -203,10 +203,10 @@ function buildBodyKpiTiles({
const ok = summary.whtr < 0.5
tiles.push({
key: 'whtr',
category: 'WHtR',
category: 'Taille/Größe',
icon: '📏',
value: String(summary.whtr),
sublabel: 'Taille ÷ Größe',
sublabel: 'WHtR · Taille ÷ Größe',
verdict: whtrRule ? verdictShort(whtrRule.status) : (ok ? 'Gut' : 'Hinweis'),
status: whtrRule?.status || (ok ? 'good' : 'warn'),
hoverTop: whtrRule?.title || 'Waist-to-Height-Ratio',