mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
feat(settings): make medications a toggleable module
Medications graduated from the always-on core set (weight / blood pressure / pulse stay core) to an opt-out module. The surface gates off the resolved module map — the left-nav entry, the dashboard medication widget, and the dedicated Medikamente settings entry hide when the account turns the module off. The medication data routes stay exempt from the gate (same data-layer reasoning as mood / labs): an importer, a sync, and the user's ability to clean up entries keep working while the surface is hidden, and re-enabling finds the schedule and intake history intact. Wire the module-route gate inventory, the dashboard widget/summary maps, the PATCH allowlist, and the nav model; regenerate the OpenAPI contract for the new module key.
This commit is contained in:
1 parent
930c4a75dd
commit
559366e308
13 files changed
+119
-28
No files matched your search
@@ -3,10 +3,11 @@
|
||||
*
|
||||
* The PATCH body is a partial map of TOGGLEABLE module keys → boolean.
|
||||
* Only keys in the canonical registry (`MODULE_KEYS`) are accepted; a
|
||||
* core-domain key (`weight`, `bloodPressure`, `pulse`, `medications`) or
|
||||
* any unknown key is a 422 — so the core measurement engine + meds can
|
||||
* never be disabled through this surface (defence-in-depth on top of the
|
||||
* gate, which has no key to flip for core domains anyway).
|
||||
* core-domain key (`weight`, `bloodPressure`, `pulse`) or any unknown key
|
||||
* is a 422 — so the core measurement engine can never be disabled through
|
||||
* this surface (defence-in-depth on top of the gate, which has no key to
|
||||
* flip for core domains anyway). v1.18.1 (D3) — `medications` graduated to
|
||||
* a toggleable module, so it IS writable here now.
|
||||
*
|
||||
* `strict()` rejects unknown keys outright rather than silently dropping
|
||||
* them, so a client gets a clear error instead of a no-op.
|
||||
|
||||
Reference in new issue
Block a user