feat: Add advanced analytics UI components in frontend
- 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:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user