-
Notifications
You must be signed in to change notification settings - Fork 2
Fix/hackathon: Update hackathon schema and add company-level participant metrics #351
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
- Consolidate start_date and end_date into single date field - Add registration_deadline field for tracking registration cutoff - Make location, mode, organizer, and team size fields optional - Replace registered_teams and max_teams with registered and capacity fields - Add total_registrations and duration fields to hackathon interface - Update date display to show full year and handle invalid dates with "TBA" fallback - Change duration display from calculated days to registration deadline or duration field - Update location display to prioritize location over mode with fallback - Simplify team registration display to show total registered count - Improve date validation with isNaN checks before formatting
…ny profiles - Add approved hackathons count to company API endpoint and service layer - Calculate total participants across both events and hackathons - Update CompanyCard to display hackathons count alongside events - Update CompanyProfile stats to show approved hackathons and total participants - Add approved_hackathons_count field to Company type definition - Rename "Registrations" label to "Participants" for clarity in company profile - Enrich company data with calculated fields in both API and service methods
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughThe PR extends company metrics to track hackathons alongside events. It adds approved_hackathons_count and total_participants (computed as the sum of event and hackathon registrations) throughout the API, service layer, type definitions, and UI components. The Hackathon interface schema is also restructured with renamed and optional fields. Changes
Sequence DiagramsequenceDiagram
participant API as GET /companies/[slug]
participant Service as company-service
participant DB as Database
participant Component as UI Component
API->>Service: enrichCompany(slug)
Service->>DB: fetch company details
Service->>DB: fetch approved events for company
Service->>DB: fetch approved hackathons for company
Note over Service: Calculate totals:<br/>event_registered_count +<br/>hackathon_registered_count
Service->>Service: Compute:<br/>approved_events_count<br/>approved_hackathons_count<br/>total_participants
Service->>Service: Enrich company object<br/>with new fields
Service-->>API: return enriched company
API-->>Component: JSON response
Component->>Component: Display approved_events_count<br/>+ approved_hackathons_count<br/>+ total_participants
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
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 |
This PR enhances the hackathon and company dashboards by updating hackathon data structures and introducing new aggregated metrics for company analytics.
🔧 Key Changes
1. Hackathon Schema & Display Improvements
2. Company Metrics Enhancements
📁 Files Updated
🛠 Stability Notes
Authored by: @akshay0611
Summary by CodeRabbit
New Features
Updates