Commit Graph

3 Commits

Author SHA1 Message Date
de45dbddba fix: Use AuthContext instead of Redux for user/familyId in trackers
Root cause: Trackers were using Redux state.auth.user (mock data) while
insights page was using useAuth() hook (real backend data from /me).

Since the user is logged in as andrei@cloudz.ro, AuthContext fetches
the real user with Alice child, but trackers were looking for mock
familyId 'fam_test123' which doesn't exist.

Fix: Changed all tracker pages and home page to use:
  user?.families?.[0]?.familyId (from useAuth hook)
instead of:
  state.auth.user?.familyId (from Redux mock)

This makes all pages consistent with the insights page approach.

Files updated:
- app/page.tsx (home)
- app/track/sleep/page.tsx
- app/track/feeding/page.tsx
- app/track/diaper/page.tsx
- app/track/activity/page.tsx
- app/track/growth/page.tsx
- app/track/medicine/page.tsx

Now all pages fetch children using the real logged-in user's familyId.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 07:00:19 +00:00
b33e35f579 feat: Complete Phase 3 - Integrate ChildSelector in all tracking forms
Some checks failed
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
Updated all 6 tracking forms with ChildSelector component:
 Feeding form
 Sleep form
 Diaper form
 Activity form
 Growth form
 Medicine form

Changes applied to each form:
- Replace local child state with Redux state management
- Use ChildSelector component instead of custom select
- Sync selectedChildIds with Redux store
- Update API calls to use selectedChild.id
- Remove duplicate loadChildren functions
- Use Redux loading state

Build Results:
-  All 38 pages compiled successfully
-  No TypeScript errors
-  No runtime warnings
- Bundle sizes optimized (all tracking forms 3-10 kB)

Phase 3 Activity Logging: 100% COMPLETE
2025-10-05 05:59:57 +00:00
2110359307 feat: Add comprehensive accessibility improvements and medical tracking
Some checks failed
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
- **EULA Persistence Fix**: Fixed EULA dialog showing on every login
  - Added eulaAcceptedAt/eulaVersion to AuthResponse interface
  - Updated login/register/getUserById endpoints to return EULA fields
  - Changed EULACheck to use refreshUser() instead of window.reload()

- **Touch Target Accessibility**: All interactive elements now meet 48x48px minimum
  - Fixed 14 undersized IconButtons across 5 files
  - Changed size="small" to size="medium" with minWidth/minHeight constraints
  - Updated children page, AI chat, analytics cards, legal viewer

- **Alt Text for Images**: Complete image accessibility for screen readers
  - Added photoAlt field to children table (Migration V009)
  - PhotoUpload component now includes alt text input field
  - All Avatar components have meaningful alt text
  - Default alt text: "Photo of {childName}", "{userName}'s profile photo"

- **Medical Tracking Consolidation**: Unified medical page with tabs
  - Medicine page now has 3 tabs: Medication, Temperature, Doctor Visit
  - Backward compatibility for legacy 'medicine' activity type
  - Created dedicated /track/growth page for physical measurements

- **Track Page Updates**:
  - Simplified to 6 options: Feeding, Sleep, Diaper, Medical, Activity, Growth
  - Fixed grid layout to 3 cards per row with minWidth: 200px
  - Updated terminology from "Medicine" to "Medical"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 13:15:23 +00:00