-
Notifications
You must be signed in to change notification settings - Fork 75
Fix hackathon #375
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
Fix hackathon #375
Conversation
… mod merge into main
… mod merge into main
… mod merge into main
… organization-fixes merge into main
…into organization-fixes
… hackathon-details fix: merge into main
… hackathon-details Merge into main
… fix-participants merge into main
… fix-participants Merge into main
… fix-blog Merge into main
… fix-blog Merge into main
… fix-blog Merge into main
… fix-blog Merge into main
… fix-hackathon Merge into main
… fix-hackathon merge into main
… fix-hackathon merge into main
|
@Benjtalkshow is attempting to deploy a commit to the Threadflow Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR extends hackathon team formation and submission management by adding leave-team functionality, per-role hiring status toggling, submission review/disqualification/rank updates, and bulk submission actions. New hooks encapsulate these operations while UI components are refactored with Card-based layouts. Changes
Sequence DiagramssequenceDiagram
participant User
participant UI as TeamRecruitmentPostCard
participant Hook as useLeaveTeam Hook
participant API as Hackathon API
participant Server
User->>UI: Clicks Leave Team
UI->>UI: Open Confirmation Dialog
User->>UI: Confirms Leave
UI->>Hook: Call leaveTeam()
Hook->>Hook: Check Authentication
Hook->>API: POST leaveHackathonTeam()
API->>Server: Leave Team Request
Server->>API: Success Response
API->>Hook: Return Result
Hook->>UI: Show Success Toast
Hook->>UI: onLeaveSuccess Callback
UI->>UI: Refresh Data (fetchMyTeam, fetchPosts)
UI->>User: Update UI
sequenceDiagram
participant User
participant UI as SubmissionsList/SubmissionsManagement
participant Dialog as DisqualifyDialog
participant Hook as useDisqualifySubmission/useBulkAction
participant API as Hackathon API
participant Server
User->>UI: Select Submission(s)
UI->>UI: Show Selection Checkboxes
User->>UI: Click Disqualify Action
UI->>Dialog: Open DisqualifyDialog
User->>Dialog: Enter Reason (10+ chars)
Dialog->>Dialog: Validate Input
User->>Dialog: Submit
Dialog->>Hook: Call disqualify() or performBulkAction()
Hook->>Hook: Set Loading State
Hook->>API: POST disqualifyHackathonSubmission() or bulkActionSubmissions()
API->>Server: Disqualify Request
Server->>API: Success Response
API->>Hook: Return Result
Hook->>Hook: Clear Error, Show Toast
Hook->>UI: Return Control
UI->>UI: Refresh Submissions
UI->>User: Clear Selection, Update List
sequenceDiagram
participant User
participant UI as TeamDetailsSheet
participant Hook as useToggleRoleHired
participant API as Hackathon API
participant Server
User->>UI: Load Team Details
UI->>UI: Initialize hiredRoles from rolesStatus
User->>UI: Click Role Hired Toggle
UI->>Hook: Call toggleRoleHired()
Hook->>Hook: Optimistically Update hiredRoles
Hook->>Hook: Set togglingRole Loading State
Hook->>API: PATCH toggleRoleHired()
API->>Server: Toggle Request
Server->>API: Success/Error Response
API->>Hook: Return Result
Hook->>UI: Show Toast (Success or Rollback)
UI->>UI: Update Role UI (Filled/Open Badge)
UI->>User: Reflect New State
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Hackathon Submissions: Bulk Actions, Ranking, and UI Refinements
Description
This PR implements several key features for hackathon organization and refines the participant submission experience. Major additions include bulk management actions (approve, disqualify, reset), numerical ranking for submissions, and several critical bug fixes related to status display and false-positive error notifications.
Key Features
1. Bulk Submission Management
Toolbar
SubmissionsManagementthat appears when one or more submissions are selected.Actions
Selection
2. Submission Ranking
Inline Editing
SubmissionsListcomponent.Organizer Control
API Integration
/rankendpoint via a customuseUpdateRankhook.3. Organizer UI Improvements
Action Dropdown
DropdownMenuto improve visual hierarchy.Enhanced Feedback
Bug Fixes
Submission Status Mapping
shortlisted→ Approveddisqualified→ RejectedFalse Positive Error Toasts
toast.errorfrom theuseTeamPostshook that triggered a "Failed to fetch team posts" message on initial page loads, even when data was correctly retrieved.TypeScript Type Safety
ts(2367)errors inSubmissionTabrelated to status comparisons and type overlaps.Technical Changes
API & Types
lib/api/hackathons.ts:BulkActionRequestBulkActionResponseUpdateRankRequestUpdateRankResponsebulkActionSubmissionsupdateSubmissionRankAPI functions.Hooks
useBulkAction: Manages state and logic for performing actions on multiple submissions.useUpdateRank: Handles debounced or enter-triggered updates to submission rankings.Components
SubmissionsManagement.tsxSubmissionsList.tsxDropdownMenu.SubmissionTab.tsxuse-team-posts.tsSummary by CodeRabbit
New Features
Bug Fixes
UI/UX