-
Notifications
You must be signed in to change notification settings - Fork 2
feat(events): Add event management pages and invitation check API #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Implement new event management pages for creating, editing, and listing events - Add API route for checking company member invitation status - Enhance forgot password page with improved error handling and user feedback - Update invitation acceptance flow to use new check-invitation endpoint - Improve error handling and user experience across multiple components - Add support for more granular error messages in authentication flows
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughThis PR introduces company event management functionality with new API routes for membership verification, dedicated dashboard pages for creating and editing events, an events listing page with filtering capabilities, and updates to the events service layer to manage event creation and editing workflows. Changes
Sequence DiagramssequenceDiagram
participant User
participant CheckInvite as Check Invitation API
participant DB as Database
participant Accept as Accept Invitation Page
User->>Accept: Navigate to accept invitation
Accept->>CheckInvite: GET /api/companies/[slug]/members/check-invitation
CheckInvite->>CheckInvite: Verify auth & resolve company
CheckInvite->>DB: Query company_members
alt Membership Exists
DB-->>CheckInvite: membership record
CheckInvite-->>Accept: 200 {success, membership}
Accept->>User: Display membership info
else No Membership
DB-->>CheckInvite: no record (PGRST116)
CheckInvite-->>Accept: 200 {success, membership: null}
Accept->>User: Show not invited message
else Company Not Found
CheckInvite-->>Accept: 404
Accept->>User: Show error
end
sequenceDiagram
participant User
participant EventsPage as Events Dashboard
participant API as Events API
participant EditPage as Event Edit Page
User->>EventsPage: Load dashboard
EventsPage->>API: Fetch events (status=all, limit=100)
API-->>EventsPage: events list
EventsPage->>EventsPage: Compute stats, filter by search
EventsPage->>User: Display table with statistics
User->>EventsPage: Click edit action
EventsPage->>EditPage: Navigate with eventSlug
EditPage->>API: Fetch /api/events/{slug}
API-->>EditPage: event data
EditPage->>User: Display form in edit mode
User->>EditPage: Submit changes
EditPage->>API: Update event
API-->>EditPage: success
EditPage->>User: Toast success, redirect
sequenceDiagram
participant User
participant CreatePage as Create Event Page
participant EventForm as Event Form
participant Service as Events Service
participant API as Events API
User->>CreatePage: Navigate to create
CreatePage->>User: Display form in create mode
User->>EventForm: Fill form & submit
EventForm->>Service: createEvent(eventData)
Service->>Service: Extract payment from price
Service->>Service: Set approval_status=pending
Service->>API: Insert event record
API-->>Service: success with event ID
Service-->>EventForm: success callback
EventForm->>User: Toast success, navigate to events
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Performance