mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
feat(insights): PR badge on metric trend tiles when achieved in last 30 days
Adds a small text-only PR pill that consumers can compose next to a metric label. The badge pulls /api/personal-records?metricType= and renders only when the most recent record landed in the last 30 days — older PRs are still visible on the dedicated /insights PR list but the dashboard surface keeps a fresh-only filter so the pill is a noticeable signal rather than a permanent fixture. i18n keys insights.personalRecord.badge and insights.personalRecord.tooltip ship in all six locales. The badge component is locale-aware through the standard useTranslations / useFormatters hooks and exposes a withTooltip prop so standalone uses (doctor report, correlation cards) can skip the Tooltip provider.
This commit is contained in:
1 parent
87853eb2ac
commit
e51a4f53bb
8 files changed
+283
-8
No files matched your search
@@ -879,6 +879,10 @@
|
||||
"heroFindingWarning": "Wichtigster Alarm",
|
||||
"correlationsTitle": "Zusammenhänge",
|
||||
"recommendationsTitle": "Empfehlungen",
|
||||
"personalRecord": {
|
||||
"badge": "PR",
|
||||
"tooltip": "Persönlicher Rekord: {value} {unit} am {date}"
|
||||
},
|
||||
"recommendation": {
|
||||
"source": "Quelle",
|
||||
"viewSource": "Leitlinie in neuem Tab öffnen",
|
||||
|
||||
Reference in new issue
Block a user