feat: migrate taken_by to taken_by_json for multi-person support

- Added `taken_by_json` column to `medications` table to store an array of names.
- Updated migration scripts to convert existing `taken_by` data into JSON format.
- Modified backend routes to handle the new `taken_by_json` structure, including parsing and filtering logic.
- Updated frontend to support multi-value input for "Taken By" using tags.
- Adjusted validation and state management for the new array format in forms.
- Enhanced UI for displaying multiple names and added autocomplete suggestions for input.
- Updated translations for input placeholders to reflect new functionality.
- Added CSS styles for tag input components.
This commit is contained in:
Daniel Volz
2025-12-28 18:22:32 +01:00
parent abffd66e9c
commit 4a6aab338f
11 changed files with 292 additions and 77 deletions
+2 -1
View File
@@ -110,7 +110,8 @@
"placeholders": {
"commercial": "z.B. Ozempic",
"generic": "z.B. Semaglutid (optional)",
"takenBy": "z.B. Max, Anna (optional)",
"takenBy": "Name eingeben und Enter drücken",
"addPerson": "Weitere Person hinzufügen...",
"weight": "z.B. 240",
"notes": "z.B. Mit Essen einnehmen, Alkohol vermeiden... (optional)"
},
+2 -1
View File
@@ -112,7 +112,8 @@
"placeholders": {
"commercial": "e.g. Ozempic",
"generic": "e.g. Semaglutide (optional)",
"takenBy": "e.g. John, Sarah (optional)",
"takenBy": "Type name and press Enter",
"addPerson": "Add another person...",
"weight": "e.g. 240",
"notes": "e.g. Take with food, avoid alcohol... (optional)"
},