mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
A medication whose end date had passed still showed taken and skip in the table and on its card, because the action row only looked at whether the medication was active. The schedule engine already stops minting doses after the end date, so reminders, the doses card and the today list were quiet, but the medication itself kept inviting a dose that is no longer part of the course. The server now resolves one rule and publishes it on the list and detail reads: `courseStatus` (UPCOMING, CURRENT or ENDED, in calendar days on the user's clock, both ends inclusive) and `intakeActionable` (active, intake tracked, course includes today). The table and both card variants render their actions from it, the take-all flow skips such a medication, the card and table name an ended course with an "Ended" badge, and no overdue escalation is raised for it. A course that ends today keeps its actions for the whole local day. The detail header's "Ended" status now follows the same field. It compared the end date's UTC midnight with the clock and so called the whole last course day ended. Logging a past dose from the history is unchanged.
2.6 MiB
2.6 MiB