Fix rounds page showing inflated project count
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m29s
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m29s
The "537 projects" count was summing projectRoundStates across all rounds, so a project in 3 rounds was counted 3 times. Now queries distinct projectIds across all competition rounds to show the actual unique project count (214). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -283,7 +283,7 @@ export default function RoundsPage() {
|
||||
// ─── Main Render ─────────────────────────────────────────────────────────
|
||||
|
||||
const activeFilter = filterType !== 'all'
|
||||
const totalProjects = rounds.reduce((s, r) => s + r._count.projectRoundStates, 0)
|
||||
const totalProjects = (compDetail as any)?.distinctProjectCount ?? 0
|
||||
const totalAssignments = rounds.reduce((s, r) => s + r._count.assignments, 0)
|
||||
const activeRound = rounds.find((r) => r.status === 'ROUND_ACTIVE')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user