- Update seed script to ensure admin password is hashed and can be reset easily.
- Implement emergency password reset functionality for development environments.
- Add new report types for seating posters and guest lists, with proper data formatting.
- Improve error handling and user feedback for admin authentication and password verification.
- Sanitize PDF export data to prevent corruption and ensure valid output.
- Update guestbook entry validation to allow editing without requiring guest name.
- Enhance UI components for better user experience in admin and guest features.
Backend API Endpoints:
- Add PUT /api/guestbook/[id] for guests to edit own messages
- Add PUT /api/tribute/[id] for guests to edit own tributes
- Add PUT /api/admin/tributes/[id] for admin to edit any tribute
- Add PUT /api/admin/guests/[id]/relationship for editing relationships
- Add GET/PUT /api/admin/settings/email-preferences for RSVP notifications
- Add GET /api/admin/reports/summary for statistics dashboard
- Add GET /api/admin/reports/export for CSV report generation
- Update /api/admin/whos-who with relationship and opt-in filtering
- Update /api/admin/activity-log with comprehensive activity tracking
- Update /api/admin/stats to use rsvpStatus instead of isAttending
- Add RSVP email notifications to admins in /api/rsvp/submit
Database Schema:
- Add receiveRsvpNotifications and role fields to Admin model
- Create migration for admin email preferences and roles
- Update seed script to include super admins (denverm, mahaliam)
Features:
- Edit guestbook messages (admin + guest)
- Edit tributes (admin + guest)
- Edit guest relationships from admin dashboard
- RSVP email notifications to admins with preferences
- Fixed statistics dashboard queries
- Fixed report generation (headcount, dietary, relationships, seating)
- Who's Who filtering by relationship and opt-in status
- Enhanced activity feed with RSVP, guestbook, tribute tracking
- Super admin seed script
Note: UI components for guest-side editing still need to be added
- Create validate-handlers.js script to check for undefined event handlers
- Add npm run validate:handlers command
- Add prebuild hook to run validation before builds
- Add ESLint no-undef rule to catch undefined references
- Add documentation in scripts/README-validation.md
Prevents issues like 'ReferenceError: handleSaveEditGuestbook is not defined'
by validating all onClick/onChange/onSubmit handlers are defined before use.
The script:
- Scans all React components for event handlers
- Verifies functions are defined in component scope
- Excludes props and imported functions
- Runs automatically before builds
- Can be run manually: npm run validate:handlers