Fixes: 1. Empty string → null conversion for optional integer fields - Backend validation error: "Input should be a valid integer" - Solution: cleanSleepData() converts '' → null before save - Applied to: deep/rem/light/awake minutes, quality, wake_count 2. Auto-calculate duration from bedtime + wake_time - useEffect watches bedtime + wake_time changes - Calculates minutes including midnight crossover - Shows clickable suggestion: "💡 Vorschlag: 7h 30min (übernehmen?)" - Applied to NewEntryForm + SleepEntry edit mode 3. Improved plausibility check - Now triggers correctly in both create and edit mode - Live validation as user types Test results: ✅ Simple entry (date + duration) saves without error ✅ Detail fields (phases) trigger plausibility check ✅ Bedtime + wake time auto-suggest duration ✅ Suggestion clickable → updates duration field Note for future release: - Unify "Erfassen" dialog design across modules (Activity/Nutrition/Weight have different styles/tabs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| Dockerfile | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| vite.config.js | ||