Skip to content

Conversation

@codeunia-dev
Copy link
Owner

@codeunia-dev codeunia-dev commented Nov 17, 2025

  • Add Trophy icon import for hackathon representation
  • Implement strict typing for approval_status with union type ('draft' | 'pending' | 'approved' | 'rejected' | 'changes_requested')
  • Refactor getStatusBadge function to accept full hackathon object and display approval status when not approved
  • Update status badge logic to show event status only for approved hackathons, approval status otherwise
  • Add Total Hackathons stats card to dashboard with orange Trophy icon
  • Expand quick actions grid from 3 to 4 columns on large screens to accommodate new Create Hackathon button
  • Add Create Hackathon quick action button alongside Create Event for event managers
  • Replace generic Plus icon with Calendar icon for Create Event button for better visual distinction

Authored by: @akshay0611

Summary by CodeRabbit

Release Notes

  • New Features
    • Implemented approval status tracking for hackathons with enhanced status indicators (draft, pending, approved, rejected, changes requested).
    • Added "Total Hackathons" metric card to the company dashboard.
    • Separated hackathon creation from event creation in Quick Actions for improved navigation.

…play

- Add Trophy icon import for hackathon representation
- Implement strict typing for approval_status with union type ('draft' | 'pending' | 'approved' | 'rejected' | 'changes_requested')
- Refactor getStatusBadge function to accept full hackathon object and display approval status when not approved
- Update status badge logic to show event status only for approved hackathons, approval status otherwise
- Add Total Hackathons stats card to dashboard with orange Trophy icon
- Expand quick actions grid from 3 to 4 columns on large screens to accommodate new Create Hackathon button
- Add Create Hackathon quick action button alongside Create Event for event managers
- Replace generic Plus icon with Calendar icon for Create Event button for better visual distinction
@vercel
Copy link

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
codeunia Ready Ready Preview Comment Nov 17, 2025 11:04am

@codeunia-dev codeunia-dev merged commit 4357461 into main Nov 17, 2025
3 of 4 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces strongly-typed approval_status on the Hackathon interface, refactors status badge logic to accept Hackathon objects instead of strings, and enhances the company dashboard with a new Total Hackathons stat card and Create Hackathon quick action.

Changes

Cohort / File(s) Summary
Hackathon Status Handling
app/dashboard/company/[slug]/hackathons/page.tsx
Added strongly-typed approval_status field to Hackathon interface ('draft' | 'pending' | 'approved' | 'rejected' | 'changes_requested'). Refactored getStatusBadge function to accept Hackathon object instead of status string. Updated status badge logic to prioritize approval_status when not 'approved', otherwise display event status. Added explicit branches for draft, pending, rejected, and changes_requested states with corresponding badge visuals.
Dashboard UI Enhancements
components/dashboard/CompanyDashboard.tsx
Added Trophy icon import from lucide-react. Expanded main stats grid from 4 to 5 columns. Introduced new Total Hackathons StatsCard with Trophy icon and orange color. Refactored Quick Actions section: replaced single "Create Event" with two separate actions (Create Event with Calendar icon, Create Hackathon with Trophy icon). Adjusted Quick Actions grid layout from 3 to 2 columns on medium screens and 4 columns on large screens.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–25 minutes

  • Areas requiring extra attention:
    • Type safety of new approval_status field and its integration with existing status handling logic
    • Status badge rendering logic flow to ensure all approval states display correctly and fallback behavior works as intended
    • Layout consistency of the expanded stats grid and reconfigured Quick Actions grid across responsive breakpoints

Possibly related PRs

Poem

🏆✨ A rabbit hops through dashboards bright,
With hackathons now in gleaming sight,
Approval statuses, typed with care,
And trophy icons dancing there!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/companydashboard

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 621453e and c467cad.

📒 Files selected for processing (2)
  • app/dashboard/company/[slug]/hackathons/page.tsx (4 hunks)
  • components/dashboard/CompanyDashboard.tsx (4 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants