- Added CSRF token handling for magic link generation in MagicLinkDialog.
- Improved photo normalization and bulk update/delete functionality in GalleryModeration.
- Updated analytics export endpoint in GuestAnalyticsEnhanced.
- Refactored music request manager to streamline data fetching and export processes.
- Introduced guest selection and export capabilities in GuestsTab with a new GuestExportDialog.
- Adjusted security gate verification endpoint in SecurityGateTab.
- Enhanced CSV and XLSX import utilities to support new guest data structure and header normalization.
- Created a new GuestExportDialog component for flexible guest list exports in various formats.
- Added pagination support for guest fetching in the admin dashboard, enhancing performance with large datasets.
- Updated API endpoints to handle pagination parameters and return structured responses with total counts and pagination info.
- Improved error handling for non-JSON responses and JSON parsing errors in the admin content.
- Refactored admin layout to utilize shared stats context, reducing redundant API calls and improving data consistency.
- Implemented dynamic imports for heavy components in the admin dashboard to optimize loading times.
- Added real-time event emissions for guest creation, update, and deletion across various API routes.
- Enhanced guest request submission to include real-time notifications.
- Introduced real-time updates for table creation to keep the admin dashboard synchronized.
- Improved error handling for real-time event emissions to ensure reliability during guest and table operations.
- Added rsvpStatus and rsvpCompletedAt fields to RSVP data for better tracking.
- Implemented real-time event emission for RSVP updates to sync admin dashboard.
- Improved error handling during RSVP submissions and updates to ensure reliability.
- Updated guest list refresh logic in the admin dashboard to include RSVP status synchronization.
- Replaced the Heart icon with the Gift icon in the RSVPStatusCard to better represent the gift section.
- Adjusted the SECTION_ICON_MAP to reflect this change, enhancing the overall user interface and iconography.
- Introduced a new narrative section detailing the love story, enhancing user engagement.
- Added a timeline feature showcasing significant milestones with rich storytelling elements.
- Improved UI components for better visual appeal, including animations and responsive design.
- Integrated new icons and images to enrich the storytelling experience.
- Updated layout for improved readability and user interaction.
- Add CSS rules to prevent native pull-to-refresh behavior on mobile browsers.
- Update pull-to-refresh hook to increase the threshold for triggering refresh from 80px to 120px.
- Enhance mobile gesture handling to only allow pull-to-refresh at the very top of scrollable areas and require more deliberate gestures to activate it.
- Implement touch-action properties to improve user experience and prevent unwanted touch behaviors.
- Implement dynamic caching for reports summary API to ensure up-to-date data.
- Update reports summary endpoint to include guest counts and table details.
- Improve error handling and user feedback in the ReportsExports component.
- Add retry functionality for failed data fetches and display appropriate alerts.
- Update UI to inform users when no guests are present in the database.
- 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.
- Rename /api/admin/guests/[id]/relationship to /api/admin/guests/[guestId]/relationship
- Update route parameter from 'id' to 'guestId' for consistency
- Fixes Next.js error: 'You cannot use different slug names for the same dynamic path'
- All references updated to use guestId parameter
Admin Creation Improvements:
- Add comprehensive client-side validation before API call
- Validate username (required, max 100 chars)
- Validate email format
- Validate password (min 8 chars for new admins)
- Validate role selection
- Better error messages for users
- Trim and normalize input data
Documentation:
- Create comprehensive SETUP_GUIDE.md
- Include feature checklist
- Add testing checklist
- Add troubleshooting section
- Document API endpoints
- Include database setup instructions
This should resolve the 'validation failed' error by catching issues client-side before the API call.
Excel Export:
- Implement server-side Excel export using exceljs
- Generate properly formatted .xlsx files with headers and styling
- Auto-fit columns based on content
- Support all report types (headcount, dietary, relationships, seating)
PDF Export:
- Implement client-side PDF generation using jsPDF and jspdf-autotable
- Generate formatted PDF reports with tables and headers
- Add page numbers and proper formatting
- Support all report types
Client Updates:
- Update export handler to properly handle different content types
- Add proper blob handling for Excel files
- Add PDF generation function for client-side rendering
- Improve error handling and user feedback
All export formats (CSV, Excel, PDF) are now fully functional.
Wedding Day Tools Fixes:
- Update guest filtering to use rsvpStatus (ACCEPTED) instead of isAttending
- Add rsvpStatus to guest interface and API responses
- Fix check-in API to support both rsvpStatus and isAttending (backward compatible)
- Improve error handling in check-in/undo check-in functions
- Add emergency contacts local storage fallback when API unavailable
- Update guests API to include rsvpStatus in select query
- Fix guest status determination to prioritize rsvpStatus over isAttending
Features Working:
✅ Guest check-in/undo check-in
✅ QR code generation and printing
✅ Attendance tracking and progress
✅ Emergency contacts management (with local storage backup)
✅ Guest lookup and search
✅ Check-in list export
All wedding day tools are now functional and compatible with the new RSVP system.
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
- Change header from 'Inspired Color Palette' to 'Complementary Style Suggestions'
- Add note explaining wedding's actual color scheme is sage green (matching app)
- Clarify earthly tones are optional suggestions to complement theme, not requirements
- Update narrative to emphasize guests can choose their own colors
- Update style tip to emphasize these are optional suggestions, not requirements
- Addresses guest confusion about needing to match earthly tones
- Move fetchWhosWho function outside useEffect using useCallback
- Fixes TypeScript error: Cannot find name 'fetchWhosWho'
- Allows pagination buttons to call fetchWhosWho with new page number
- Maintains polling functionality with proper cleanup
- Change log message from 'Updating admin password to TSD107AS' to generic message
- Prevents password exposure in production logs
- Security best practice: never log passwords, even in development
- 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
- Define handleEditGuestbookEntry to open edit dialog with entry data
- Define handleSaveEditGuestbook to save guestbook entry changes
- Fixes ReferenceError: handleSaveEditGuestbook is not defined
These functions were referenced in the UI but not defined in the component scope
- Detect ChunkLoadError in global error handler
- Automatically clear Next.js cache and reload page when chunk errors occur
- Add proper cache headers for Next.js static chunks (immutable caching)
- Handle ChunkLoadError in both error events and unhandled promise rejections
- Prevents users from seeing chunk load errors after deployments
Fixes production issue where admin page fails to load after new deployment due to stale chunks in browser cache
- Add pagination to who's who API with page/limit query params
- Add pagination UI to who's who tab in admin dashboard (20 per page)
- Add 'Couple' option to relationship field in guest edit form
- Create PUT endpoint for editing guestbook entries (message, photo, audio, video)
- Add edit UI for guestbook entries with dialog form and media URL support
- Update guestbook entry display to show edit button alongside delete
Allows admins to:
- Navigate through large guest lists efficiently
- Correct guest relationship mistakes (e.g., change to 'Couple')
- Fix typos and punctuation in guestbook messages
- Add or update media (photos, audio, video) in guestbook entries