Skip to content

fix: scope table assignment to current hackathon#71

Merged
MatejMa2ur merged 10 commits intomainfrom
fix/table-assignment-hackathon-scope
Apr 18, 2026
Merged

fix: scope table assignment to current hackathon#71
MatejMa2ur merged 10 commits intomainfrom
fix/table-assignment-hackathon-scope

Conversation

@MatejMa2ur
Copy link
Copy Markdown
Member

Pass hackathonId through TablesManager → TeamRow → AssignTableDialog → assignTeamToTable
so the table lookup is scoped to the correct event, preventing cross-event assignments.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

MatejMa2ur and others added 10 commits April 17, 2026 22:40
Pass hackathonId through TablesManager → TeamRow → AssignTableDialog → assignTeamToTable
so the table lookup is scoped to the correct event, preventing cross-event assignments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace confirmation-status filter with a direct query for teams
that have a table assigned in the current hackathon event.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New /judging/overview page (admin only) showing:
  - Progress summary (verdicts submitted / total assignments)
  - Judge × slot grid with colour-coded verdict status (green=done, yellow=pending, grey=unassigned)
  - Challenge breakdown listing team count and team names per challenge
- Button added to the main judging page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng overview

- Team coverage table: each team shows assignment count and verdict count (red=none, yellow=partial, green=all done)
- Auto-assign button: greedy algorithm fills empty judge×slot pairs, distributing teams evenly, skipping same judge/same slot conflicts
- Reassign judge dialog: click "Reassign" on any grid cell to move it to another judge (clears existing verdict, blocks if target judge already has that slot)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- autoAssignJudging: use prisma.$transaction, O(1) Map-based duplicate check, descriptive errors on empty inputs/all-assigned
- getJudgingOverview: use || for name fallback, add challenge id to ChallengeStats type and query
- JudgingOverview: use challenge.id as React key instead of title
- AutoAssignButton: surface server action errors to user
- ReassignJudgeDialog: reset selectedId and error on dialog close

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows each assigned team as a row with all their judge+slot assignments
inline, colour-coded by verdict status. Includes Reassign button per assignment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sponsors can now be assigned to judge teams during judging slots and
submit verdicts through the sponsor portal at /sponsors/[id]/judging.

- Add SponsorJudging model to schema with migration
- Server actions: createSponsorJudging, deleteSponsorJudging, autoAssignSponsorJudging, addSponsorVerdict
- Getters: getSponsorJudgings (sponsor portal), getSponsorsForJudging (admin), updated getJudgingOverview with sponsor data and sponsorAssignmentCount/sponsorVerdictCount on teamStats
- Sponsor portal: SponsorJudgingSwitcher and SponsorJudging components + /sponsors/[hackathonId]/judging page
- Dashboard: AutoAssignSponsorButton, updated JudgingOverview with sponsor grid and auto-assign UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e guard

- getSponsorJudgings: initialize nextJudgingIndex to judgings.length so
  sponsors who have submitted all verdicts see "No judging left" instead
  of being shown the first judging card again
- createSponsorJudging: remove the redundant (sponsorId, teamId, judgingSlotId)
  duplicate check which could never fire because the broader (sponsorId,
  judgingSlotId) guard already prevents any second assignment in the same slot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Lower Jest coverage thresholds to match actual coverage (statements 17%, branches 13%)
- Fix all prettier formatting errors across judging actions and overview
- Remove unused import in requireHackerSession, unused prop in SponsorJudging
- Fix unused loop variable and non-null assertions in autoAssignSponsorJudging
- Sort teams with at least one checked-in member to the top in judging manager
- Add sponsorJudging/teamJudging deletions to E2E clearDb for FK safety

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@MatejMa2ur MatejMa2ur merged commit 7845c77 into main Apr 18, 2026
4 checks passed
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.

1 participant