feat: Stock Correction Modal (#47)

* feat: add stock correction modal with blister-based input

- Add 'Correct Stock' button to medication detail modal
- New modal with Full Blisters + Partial Blister Pills inputs
- Auto-conversion for edge cases (full/negative partial)
- New stockAdjustment field for DB corrections without touching looseTablets
- New lastStockCorrectionAt timestamp to ignore old consumed doses after correction
- Tracking data preserved for future statistics
- Add Drizzle migrations for new columns
- Add translations for en/de

* fix: add stock_adjustment columns to e2e/integration test schemas
This commit is contained in:
Daniel Volz
2026-01-18 12:53:25 +01:00
committed by GitHub
parent bb46b26ec6
commit 75bb7abebc
16 changed files with 2072 additions and 58 deletions
+15 -1
View File
@@ -330,7 +330,8 @@
"fullBlister": "voller Blister",
"fullBlisters": "volle Blister",
"inBlister": "in 1 Blister",
"total": "gesamt"
"total": "gesamt",
"max": "max"
},
"share": {
"button": "Teilen",
@@ -406,5 +407,18 @@
"pillsAdded": "{{count}} Tablette",
"pillsAdded_other": "{{count}} Tabletten",
"button": "Nachfüllen"
},
"editStock": {
"title": "Bestand korrigieren",
"hint": "Dies ist für die Korrektur von Bestandsabweichungen. Für normale Bestandsänderungen nutze 'Nachfüllen'.",
"fullBlisters": "Volle Blister",
"partialBlisterPills": "Angebrochener Blister",
"pillsPerBlister": "(je {{count}} Tabletten)",
"currentTotal": "Aktueller Bestand",
"newTotal": "Neuer Bestand",
"difference": "Differenz",
"save": "Korrektur speichern",
"saving": "Speichern...",
"success": "Bestand erfolgreich korrigiert"
}
}