feat: Add Clear Missed Doses feature (#28)
- Add dismissed column to dose_tracking table schema - Add POST /doses/dismiss endpoint for batch dismissing - Add DELETE /doses/dismiss endpoint to un-dismiss all - Add frontend dismissedDoses state and missedPastDoseIds useMemo - Add Clear missed button with confirmation dialog - Add CSS styles for .past-days-header and .clear-missed-btn - Add i18n translations for en/de - Add 5 tests for dismiss endpoints - Update test schemas with dismissed column Allows users to acknowledge missed doses without deducting stock. Closes #28
This commit is contained in:
@@ -115,4 +115,5 @@ export const doseTracking = sqliteTable("dose_tracking", {
|
||||
doseId: text("dose_id", { length: 255 }).notNull(), // e.g. "med-5-1-86400000-1735200000000"
|
||||
takenAt: integer("taken_at", { mode: "timestamp" }).notNull().default(sql`(strftime('%s','now'))`),
|
||||
markedBy: text("marked_by", { length: 100 }), // null = user, "Daniel" = via share link
|
||||
dismissed: integer("dismissed", { mode: "boolean" }).notNull().default(false), // true = missed dose acknowledged without taking
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user