mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
fix(dashboard): open the body fat page from the body fat tile
The body fat tile was the one strip tile that led nowhere. Its href map said there was no dedicated sub-page, which was true: body fat percentage was tiled and charted on the dashboard but never got the Insights page every body-composition sibling has. Add /insights/body-fat on the generic metric-page scaffold (body group, tab-strip pill, seven locales, manual-entry empty state) and link the tile to it. Move the tile href map out of the page into tile-destinations.ts, keyed by the tile-capable widget id and typed against the sub-page slug union, so a missing or non-existent destination fails to compile. The link passes the destination's insights-page surface gate, so it never points at a page a switched-off module hides. A guard derives the tile set from TILE_CAPABLE_WIDGET_IDS and from the ids the dashboard actually pushes into its strip, and fails when a tile's metric has a sub-page the tile does not open, when a destination has no route, or when a tile links to a page owned by another module. Tiles that deliberately lead nowhere need a written reason; there are none today. The reverse-lookup test pinned BODY_FAT as having no page; it now resolves to body-fat. Refs #1084
This commit is contained in:
1 parent
2ea9dc3936
commit
885efaafd9
17 files changed
+440
-48
No files matched your search
@@ -25902,7 +25902,7 @@ components:
|
||||
- order
|
||||
tiles:
|
||||
minItems: 1
|
||||
maxItems: 62
|
||||
maxItems: 63
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
@@ -25919,6 +25919,7 @@ components:
|
||||
- pain
|
||||
- weight
|
||||
- bmi
|
||||
- body-fat
|
||||
- body-water
|
||||
- bone-mass
|
||||
- fat-free-mass
|
||||
@@ -31264,7 +31265,7 @@ components:
|
||||
additionalProperties: false
|
||||
tiles:
|
||||
minItems: 1
|
||||
maxItems: 62
|
||||
maxItems: 63
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
@@ -31281,6 +31282,7 @@ components:
|
||||
- pain
|
||||
- weight
|
||||
- bmi
|
||||
- body-fat
|
||||
- body-water
|
||||
- bone-mass
|
||||
- fat-free-mass
|
||||
@@ -51976,7 +51978,7 @@ components:
|
||||
additionalProperties: false
|
||||
tiles:
|
||||
minItems: 1
|
||||
maxItems: 62
|
||||
maxItems: 63
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
@@ -51993,6 +51995,7 @@ components:
|
||||
- pain
|
||||
- weight
|
||||
- bmi
|
||||
- body-fat
|
||||
- body-water
|
||||
- bone-mass
|
||||
- fat-free-mass
|
||||
|
||||
Reference in new issue
Block a user