feat: Add advanced analytics UI components in frontend
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

- Add comprehensive API client methods for all advanced analytics endpoints
- Create CircadianRhythmCard component for sleep pattern visualization
- Create AnomalyAlertsPanel for anomaly detection and alerts
- Create GrowthPercentileChart with WHO/CDC percentiles
- Create CorrelationInsights for activity correlations
- Create TrendAnalysisChart with predictions
- Add advanced analytics page with all new components
- Add UI component library (shadcn/ui) setup
- Add navigation link to advanced analytics from insights page

All advanced analytics features are now accessible from the frontend UI.
This commit is contained in:
2025-10-06 11:46:05 +00:00
parent 56d2d83418
commit b0ac2f71df
19 changed files with 3112 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ import {
Alert,
Grid,
IconButton,
Button,
} from '@mui/material';
import { Timeline, TrendingUp, Assessment, ArrowBack } from '@mui/icons-material';
import { useRouter } from 'next/navigation';
@@ -170,18 +171,28 @@ export function UnifiedInsightsDashboard() {
>
<Box sx={{ px: { xs: 2, sm: 3 }, py: 3 }}>
{/* Header with Back Button */}
<Box sx={{ display: 'flex', alignItems: 'center', mb: 3 }}>
<IconButton onClick={() => router.back()} sx={{ mr: 2 }}>
<ArrowBack />
</IconButton>
<Box>
<Typography variant="h4" fontWeight={600}>
Insights & Predictions
</Typography>
<Typography variant="body2" color="text.secondary">
AI-powered insights, patterns, and predictions for your child
</Typography>
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 3 }}>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<IconButton onClick={() => router.back()} sx={{ mr: 2 }}>
<ArrowBack />
</IconButton>
<Box>
<Typography variant="h4" fontWeight={600}>
Insights & Predictions
</Typography>
<Typography variant="body2" color="text.secondary">
AI-powered insights, patterns, and predictions for your child
</Typography>
</Box>
</Box>
<Button
variant="outlined"
color="primary"
onClick={() => router.push('/analytics/advanced')}
startIcon={<TrendingUp />}
>
Advanced Analytics
</Button>
</Box>
{/* Error Alert */}