Skip to content

Commit f47885c

Browse files
authored
Merge pull request #107 from HackDavis/ui-fixes
Added team numbers to scoring page
2 parents 8e56852 + 59cc57b commit f47885c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/(api)/_utils/scoring/rankTeams.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function calculateScores(team: Team, submissions: Submission[]) {
5555
score: isNaN(res / submissionsCount) ? 0 : res / submissionsCount,
5656
}));
5757

58-
return { team: team.name, scores: finalScores };
58+
return { number: team.number, name: team.name, scores: finalScores };
5959
}
6060

6161
async function computeAllTeams(teams: Team[]) {
@@ -95,7 +95,8 @@ export default async function rankTeams(teams: Team[]) {
9595
if (foundScore === undefined) continue;
9696

9797
topEntries.push({
98-
team: team.team,
98+
number: team.number,
99+
name: team.name,
99100
score: foundScore.score,
100101
});
101102
}

app/(pages)/judges/admin/_components/JudgeTeamGrouping/JudgeTeamGrouping.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ export default function JudgeTeamGrouping() {
3737
<h4>{result.track}</h4>
3838
{result.topEntries.map((entry) => (
3939
<>
40-
<p>{entry.team}</p>
41-
<p>{entry.score}</p>
40+
<p>
41+
Team No. {entry.number}, {entry.name}, {entry.score}
42+
</p>
4243
</>
4344
))}
4445
</>

0 commit comments

Comments
 (0)