1.6 KiB
1.6 KiB
Health Section Dynamic Update TODO
Completed
- Create HealthRecord model
- Create migration for health_records table
- Add healthRecords relationship to User model
- Update FamilyController show/profile methods to fetch health data
- Update show.blade.php health tab with dynamic data
- Replace hardcoded metrics with latest record data
- Add date dropdowns for comparison (From/To labels)
- Update comparison table with dynamic changes and colored arrows
- Update history table with paginated data
- Run migration
- Handle no health records case
- Add health update modal
- Create modal HTML with form (defaults to current date)
- Add JavaScript to trigger modal
- Add route and controller method for storing
- Handle form submission with validation (at least one metric required)
- Add flash message display
- Auto-activate health tab after saving
- Handle self-profile health updates (no relationship check needed)
- Add edit functionality for health records
- Add hover effect with floating pencil icon on history table rows
- Add JavaScript to populate modal for editing
- Add route and controller method for updating
- Handle form submission for updates with validation
- Update modal title and button text for edit mode
Testing
- Test dynamic display with sample data
- Test modal submission and tab activation
- Test dynamic comparison dropdowns with live updates, colored arrows, and time difference calculation
- Test pagination in history table
- Test edit functionality with hover pencil icon and modal population