- Add showCleaned filter to FilterState type
- Update MapView to show green markers with checkmark for cleaned reports
- Add cleaned status filter toggle in MapFilters component
- Display cleaned information in ReportDetailModal
- Hide action buttons for already cleaned reports
- Wire up markAsCleaned functionality in MapPage
- Backend endpoint and database fields already in place
- Add verify/dispute endpoints to backend API
- Create verification service methods with auto-hide logic for 3+ disputes
- Update ReportDetailModal with verification buttons and comment forms
- Add verification audit log display showing history of verifications/disputes
- Implement auto-hide warning for disputed reports
- Update MapPage to handle verification actions and refresh data
- Add verification counts to report responses
- Filter out disputed reports from public view by default
- Add verification test script
Requirements: 7.1, 7.2, 7.3, 7.4, 7.5
All user profile endpoints have been implemented and tested:
- GET /api/users/:id for profile retrieval
- PATCH /api/users/:id for profile updates
- GET /api/users/:id/reports endpoint
- GET /api/users/:id/events endpoint
- Impact score calculation
- Notification preferences endpoint (PATCH /api/users/:id/preferences)
Requirements: 6.3, 6.4, 6.5, 10.4
- Handle both Clerk ID and database ID in authorization checks
- Compare Clerk IDs when URL parameter is a Clerk ID (user_xxx)
- Convert Clerk ID to database ID for service layer operations
- Apply fix to both updateNotificationPreferences and updateUserProfile endpoints
- Create NotificationSettings component with map-based area selector
- Add radius configuration slider (1-50km range)
- Implement notification type toggles (email, in-app)
- Add notifications tab to user profile page (visible only to profile owner)
- Update backend to parse and return areasOfInterest JSON
- Save and load user notification preferences
- Requirements: 10.1, 10.4
- Update getUserProfile to accept both database ID and Clerk ID
- Update getUserReports to handle Clerk IDs
- Update getUserEvents to handle Clerk IDs
- Add getUserActivity endpoint to return timeline of user actions
- Add activity route GET /api/users/:id/activity
- Fix TypeScript errors with const assertions
This fixes 404 errors when frontend uses Clerk IDs to fetch user data
- Add GET /api/users/:id for profile retrieval with stats
- Add PATCH /api/users/:id for profile updates
- Add GET /api/users/:id/reports to fetch user's reports
- Add GET /api/users/:id/events to fetch user's events (registered & organized)
- Add PATCH /api/users/:id/preferences for notification settings
- Add POST /api/users/:id/calculate-impact for impact score calculation
- Create userService with all business logic
- Create userController with request handling
- Create userRoutes and register in main server
- Update frontend userService with new endpoints
- Add comprehensive documentation in USER_PROFILE_ENDPOINTS.md
- Add test script for manual endpoint testing
Requirements satisfied: 6.3, 6.4, 6.5, 10.4
- Add userService for profile and activity API calls
- Create UserProfilePage with tabbed interface (overview, reports, events, activity)
- Display user statistics (reports count, events count, impact score)
- Implement personal contribution map showing all user report locations
- Add activity timeline with different activity types
- Enable profile editing for own profile (first name, last name, username)
- Update UserProfile component to link to profile page
- Add /profile/:userId route to App
- Install react-leaflet for map integration
- Requirements: 6.3, 6.4, 6.5
- Only allow organizers to complete events after the scheduled date has passed
- Show informative message to organizers before event date
- Prevents premature event completion
- Add completeEvent endpoint to backend API
- Create EventCompletionForm component with litter quantity input and photo upload
- Update EventDetailModal to show completion form for organizers
- Add isOrganizer check in EventsPage
- Update event service to support completion
- Display completion data (litter collected, photos) for completed events
- Create EventForm component with date/time picker and map-based location selection
- Implement EventList component with status badges and participant counts
- Add EventFilters component for filtering by status and date range
- Create EventDetailModal with registration functionality and event details
- Build eventService for API calls (getEvents, createEvent, register, etc.)
- Update EventsPage with full event management UI
- Support event creation, listing, filtering, and registration
- Requirements: 4.1, 4.2, 4.3, 4.4
Make the filters panel expanded by default so users can immediately
see and access the hotspot visualization toggle without needing to
click to expand the panel first.
- Add TimeSeriesChart component for report trends over time
- Add LitterTypeChart component with pie chart for type distribution
- Add QuantityChart component with bar chart for quantity aggregation
- Update analytics service with new API methods for chart data
- Add new types for chart data structures (TimeSeriesDataPoint, LitterTypeDistribution, QuantityAggregation)
- Integrate charts into AnalyticsPage with responsive grid layout
- Add mock data fallback for development when API is not available
- Configure charts for mobile responsiveness
- Implement comparison metrics display in time series
- Add loading states and empty states for all charts
Implements task 11: Data visualization charts
Requirements: 5.2, 5.3, 5.4
- Set up MySQL 8.0+ with spatial data support (POINT SRID 4326)
- Created Prisma schema with all models (User, Report, Event, etc.)
- Added Clerk authentication support (clerk_id field)
- Configured spatial indexes on location fields for performance
- Created database migrations and applied to MySQL
- Built spatial query utilities for geographical operations
- Added database connection singleton and health checks
- Created comprehensive documentation and test scripts
Requirements: 1.1, 2.1, 3.2, 4.1
- Change task 22 from PostgreSQL+PostGIS to MySQL with spatial support
- Update references to PostGIS spatial queries to MySQL spatial functions
- Remove materialized view reference (MySQL specific)
- Update test task to reference MySQL instead of PostGIS
- Created reportService for API interactions (upload, create, get, verify, dispute)
- Built ReportDetailModal component with photo gallery and verification UI
- Updated ReportForm with actual API submission and progress tracking
- Added error handling and success states
- Created ReportDetailDemo page to showcase modal functionality
- Added route for demo page at /demo/report-detail
- Exported services through index file for cleaner imports
- Documented implementation in SUBMISSION_IMPLEMENTATION.md
Requirements fulfilled: 1.8, 7.4