-
Notifications
You must be signed in to change notification settings - Fork 2
feat(hackathons): Add comprehensive hackathon management and moderation system #324
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
…on system - Add hackathon creation and editing pages in company dashboard - Implement hackathon moderation queue in admin panel with approval/rejection workflow - Create HackathonForm component for creating and editing hackathons - Add API endpoints for hackathon CRUD operations and moderation actions - Implement hackathon submission workflow with status tracking - Add tabbed interface to moderation page for managing both events and hackathons - Enhance hackathon service with submission and moderation logic - Update company hackathons listing page with management capabilities - Add hackathon statistics tracking in moderation dashboard
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughAdded hackathon moderation infrastructure and dashboard management features. Redesigned the moderation page with tabbed content for Events and Hackathons, implemented new API endpoints for fetching and approving/rejecting pending hackathons, created dashboard pages for creating and editing hackathons, and added supporting components and service logic for hackathon approval workflows. Changes
Sequence DiagramssequenceDiagram
participant User as Admin User
participant UI as Moderation UI
participant API as API<br/>/admin/moderation/<br/>hackathons
participant DB as Database
User->>UI: View Hackathons Tab
UI->>API: GET /api/admin/moderation/hackathons
API->>DB: Query pending hackathons<br/>(approval_status = 'pending')
DB-->>API: Return pending hackathons
API-->>UI: Return paginated results
UI->>UI: Render hackathon queue
User->>UI: Click Approve/Reject
UI->>UI: Show action dialog<br/>(with reason for reject)
User->>UI: Confirm action
UI->>API: POST /api/admin/moderation/<br/>hackathons/{id}
Note over API: Validate authorization<br/>(platform admin)
API->>DB: Update hackathon<br/>(approval_status, status,<br/>rejection_reason)
DB-->>API: Success
API-->>UI: Return updated hackathon
UI->>UI: Refresh list & show toast
sequenceDiagram
participant User as Company User
participant UI as Dashboard
participant CreateForm as HackathonForm
participant PostAPI as POST /api/hackathons
participant SubmitAPI as POST /api/hackathons/{id}/submit
participant DB as Database
User->>UI: Navigate to Create
UI->>CreateForm: Render form (mode: create)
User->>CreateForm: Fill form & submit
CreateForm->>PostAPI: POST (hackathon data)
PostAPI->>PostAPI: Verify user is admin<br/>or company member
PostAPI->>DB: Insert hackathon<br/>(status: draft)
DB-->>PostAPI: Return created hackathon
PostAPI-->>CreateForm: Success response
CreateForm->>SubmitAPI: POST /api/hackathons/{id}/submit
SubmitAPI->>DB: Update status to pending<br/>(approval_status: pending)
DB-->>SubmitAPI: Success
SubmitAPI-->>CreateForm: Success response
CreateForm->>UI: Trigger onSuccess callback
UI->>UI: Navigate to hackathons list
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Possibly related PRsNo additional PRs with strong code-level connections were found in the provided search results. Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (13)
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 |
Authored by: @akshay0611
Summary by CodeRabbit
New Features
Improvements