Frontend Features: - Add MessageFeedback component with thumbs up/down buttons - Positive feedback submits immediately with success toast - Negative feedback opens dialog for optional text input - Integrate feedback buttons on all AI assistant messages - Add success Snackbar confirmation message - Translation keys added to ai.json (feedback section) Backend Features: - Add POST /api/v1/ai/feedback endpoint - Create FeedbackDto with conversation ID validation - Implement submitFeedback service method - Store feedback in conversation metadata with timestamps - Add audit logging for feedback submissions - Fix conversationId regex validation to support nanoid format Legal & Compliance: - Implement complete EULA acceptance flow with modal - Create reusable legal content components (Terms, Privacy, EULA) - Add LegalDocumentViewer for nested modal viewing - Cookie Consent Banner with GDPR compliance - Legal pages with AppShell navigation - EULA acceptance tracking in user entity Branding Updates: - Rebrand from "Maternal App" to "ParentFlow" - Update all icons (72px to 512px) from high-res source - PWA manifest updated with ParentFlow branding - Contact email: hello@parentflow.com - Address: Serbota 3, Bucharest, Romania Bug Fixes: - Fix chat endpoint validation (support nanoid conversation IDs) - Fix EULA acceptance API call (use apiClient vs hardcoded localhost) - Fix icon loading errors with proper PNG generation Documentation: - Mark 11 high-priority features as complete in REMAINING_FEATURES.md - Update feature statistics: 73/139 complete (53%) - All high-priority features now complete! 🎉 Files Changed: Frontend: 21 files (components, pages, locales, icons) Backend: 6 files (controller, service, DTOs, migrations) Docs: 1 file (REMAINING_FEATURES.md) Co-Authored-By: Claude <noreply@anthropic.com>
138 lines
5.4 KiB
TypeScript
138 lines
5.4 KiB
TypeScript
'use client';
|
|
|
|
import { Box, Container, Typography, Paper, Grid, Card, CardContent, CardActionArea } from '@mui/material';
|
|
import Link from 'next/link';
|
|
import { Gavel, Security, Description, Cookie } from '@mui/icons-material';
|
|
import { useRouter } from 'next/navigation';
|
|
import { AppShell } from '@/components/layouts/AppShell/AppShell';
|
|
import { ProtectedRoute } from '@/components/common/ProtectedRoute';
|
|
|
|
export default function LegalPage() {
|
|
const router = useRouter();
|
|
|
|
const legalDocuments = [
|
|
{
|
|
title: 'Privacy Policy',
|
|
description: 'Learn how we collect, use, and protect your personal information and your child\'s data.',
|
|
icon: <Security sx={{ fontSize: 48, color: 'primary.main' }} />,
|
|
path: '/legal/privacy',
|
|
highlights: ['COPPA Compliance', 'GDPR Rights', 'Data Security', 'Children\'s Privacy'],
|
|
},
|
|
{
|
|
title: 'Terms of Service',
|
|
description: 'Understand the terms and conditions governing your use of ParentFlow.',
|
|
icon: <Description sx={{ fontSize: 48, color: 'primary.main' }} />,
|
|
path: '/legal/terms',
|
|
highlights: ['Acceptable Use', 'Medical Disclaimer', 'User Accounts', 'Subscriptions'],
|
|
},
|
|
{
|
|
title: 'End User License Agreement (EULA)',
|
|
description: 'Review the license agreement for using the ParentFlow software.',
|
|
icon: <Gavel sx={{ fontSize: 48, color: 'primary.main' }} />,
|
|
path: '/legal/eula',
|
|
highlights: ['License Grant', 'AI Features', 'Intellectual Property', 'Warranties'],
|
|
},
|
|
{
|
|
title: 'Cookie Policy',
|
|
description: 'Find out how we use cookies and similar tracking technologies.',
|
|
icon: <Cookie sx={{ fontSize: 48, color: 'primary.main' }} />,
|
|
path: '/legal/cookies',
|
|
highlights: ['Cookie Types', 'Third-Party Services', 'Your Choices', 'Analytics'],
|
|
},
|
|
];
|
|
|
|
return (
|
|
<ProtectedRoute>
|
|
<AppShell>
|
|
<Container maxWidth="lg" sx={{ py: 4 }}>
|
|
<Paper elevation={0} sx={{ p: 4, mb: 4, border: 1, borderColor: 'divider' }}>
|
|
<Typography variant="h3" component="h1" gutterBottom>
|
|
Legal & Privacy
|
|
</Typography>
|
|
<Typography variant="body1" color="text.secondary" paragraph>
|
|
Welcome to our Legal Center. Here you'll find all the legal documents and policies governing your use of ParentFlow.
|
|
We're committed to transparency and protecting your privacy.
|
|
</Typography>
|
|
<Typography variant="body2" color="text.secondary">
|
|
Last Updated: October 4, 2025
|
|
</Typography>
|
|
</Paper>
|
|
|
|
<Grid container spacing={3}>
|
|
{legalDocuments.map((doc) => (
|
|
<Grid item xs={12} md={6} key={doc.path}>
|
|
<Card
|
|
elevation={0}
|
|
sx={{
|
|
height: '100%',
|
|
border: 1,
|
|
borderColor: 'divider',
|
|
transition: 'all 0.2s',
|
|
'&:hover': {
|
|
borderColor: 'primary.main',
|
|
boxShadow: 2,
|
|
},
|
|
}}
|
|
>
|
|
<CardActionArea
|
|
onClick={() => router.push(doc.path)}
|
|
sx={{ height: '100%', p: 3 }}
|
|
>
|
|
<CardContent sx={{ p: 0 }}>
|
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2, mb: 2 }}>
|
|
{doc.icon}
|
|
<Typography variant="h5" component="h2">
|
|
{doc.title}
|
|
</Typography>
|
|
</Box>
|
|
<Typography variant="body2" color="text.secondary" paragraph>
|
|
{doc.description}
|
|
</Typography>
|
|
<Box sx={{ mt: 2 }}>
|
|
<Typography variant="caption" color="text.secondary" sx={{ fontWeight: 'bold' }}>
|
|
Key Topics:
|
|
</Typography>
|
|
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 1, mt: 1 }}>
|
|
{doc.highlights.map((highlight) => (
|
|
<Typography
|
|
key={highlight}
|
|
variant="caption"
|
|
sx={{
|
|
px: 1.5,
|
|
py: 0.5,
|
|
bgcolor: 'primary.light',
|
|
color: 'primary.contrastText',
|
|
borderRadius: 1,
|
|
}}
|
|
>
|
|
{highlight}
|
|
</Typography>
|
|
))}
|
|
</Box>
|
|
</Box>
|
|
</CardContent>
|
|
</CardActionArea>
|
|
</Card>
|
|
</Grid>
|
|
))}
|
|
</Grid>
|
|
|
|
<Paper elevation={0} sx={{ p: 4, mt: 4, border: 1, borderColor: 'divider', bgcolor: 'primary.light' }}>
|
|
<Typography variant="h6" gutterBottom>
|
|
Questions or Concerns?
|
|
</Typography>
|
|
<Typography variant="body2" paragraph>
|
|
If you have any questions about our legal policies or how we handle your data, please don't hesitate to contact us:
|
|
</Typography>
|
|
<Typography variant="body2" component="div">
|
|
<strong>Email:</strong> hello@parentflow.com<br />
|
|
<strong>Privacy:</strong> hello@parentflow.com<br />
|
|
<strong>Data Protection Officer:</strong> hello@parentflow.com
|
|
</Typography>
|
|
</Paper>
|
|
</Container>
|
|
</AppShell>
|
|
</ProtectedRoute>
|
|
);
|
|
}
|