Skip to content

Commit

Permalink
Merge pull request #107 from HackDavis/ui-fixes
Browse files Browse the repository at this point in the history
Added team numbers to scoring page
  • Loading branch information
brandonw504 authored Apr 28, 2024
2 parents 8e56852 + 59cc57b commit f47885c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/(api)/_utils/scoring/rankTeams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function calculateScores(team: Team, submissions: Submission[]) {
score: isNaN(res / submissionsCount) ? 0 : res / submissionsCount,
}));

return { team: team.name, scores: finalScores };
return { number: team.number, name: team.name, scores: finalScores };
}

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

topEntries.push({
team: team.team,
number: team.number,
name: team.name,
score: foundScore.score,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export default function JudgeTeamGrouping() {
<h4>{result.track}</h4>
{result.topEntries.map((entry) => (
<>
<p>{entry.team}</p>
<p>{entry.score}</p>
<p>
Team No. {entry.number}, {entry.name}, {entry.score}
</p>
</>
))}
</>
Expand Down

0 comments on commit f47885c

Please sign in to comment.