mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 00:12:18 +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
+6
-2
@@ -877,8 +877,12 @@
|
||||
"heroFindingNeutral": "Top finding",
|
||||
"heroFindingAttention": "Worth attention",
|
||||
"heroFindingWarning": "Top alert",
|
||||
"correlationsTitle": "Correlations",
|
||||
"recommendationsTitle": "Recommendations",
|
||||
"correlationsTitle": "Korelacje",
|
||||
"recommendationsTitle": "Rekomendacje",
|
||||
"personalRecord": {
|
||||
"badge": "PR",
|
||||
"tooltip": "Rekord osobisty: {value} {unit} dnia {date}"
|
||||
},
|
||||
"recommendation": {
|
||||
"source": "Source",
|
||||
"viewSource": "Open guideline in a new tab",
|
||||
|
||||
Reference in new issue
Block a user