mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 06:52:04 +00:00
feat(medications): an api tab, a stockable inventory and a next-due that tells the truth
The detail page gains a dedicated API tab, the full-edit button becomes a lifecycle row that opens the editor, the danger zone drops its red wash in favour of the shared card chrome, and the card menu's edit entry leads to the detail page it describes. The inventory tab finally records stock — packs and pens with optional expiry, plus corrections — instead of pointing at an API. The card's next-dose line reads from the canonical band model instead of a stale schedule window, which also showed old dose times after a schedule change; the repair script learns to reconcile drifted windows and tombstone pending rows parked on abandoned anchors.
This commit is contained in:
1 parent
a2524b6d70
commit
258e2fd365
22 files changed
+1373
-221
No files matched your search
@@ -803,6 +803,13 @@ export const updateInventoryItemSchema = z.object({
|
||||
.transform((s) => new Date(s))
|
||||
.nullable()
|
||||
.optional(),
|
||||
/**
|
||||
* v1.16.1 — stock correction (the Bestand tab's adjust / withdraw
|
||||
* flow). Sets the remaining-dose count directly; the route clamps to
|
||||
* `dosesTotal` and re-runs the canonical state machine (0 ⇒ USED_UP,
|
||||
* a raise out of 0 re-evaluates against the expiry clocks).
|
||||
*/
|
||||
dosesRemaining: z.number().int().min(0).max(100).optional(),
|
||||
notes: z.string().max(200).nullable().optional(),
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user