Skip to content

Commit

Permalink
Added table column to judge dashboard (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolhe134 authored Apr 5, 2024
1 parent ebe8f06 commit 1aaff48
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions components/judges/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function OrganizerSchedule(props: ScheduleProps) {
.filter(x => x.team !== null && x.team.name !== null)
.find(x => x.team.name === teamName)?.team.locationNum;
return {
title: (teamName as string) + ' (Table ' + locationNum + ')',
title: teamName as string,
dataIndex: teamName as string,
key: teamName as string,
render: TableCell,
Expand Down Expand Up @@ -194,16 +194,21 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps
width: '10%',
render: (date: string) => DateTime.fromISO(date).toLocaleString(DateTime.TIME_SIMPLE),
},
{
title: 'Table',
dataIndex: 'table',
key: 'table',
width: '10%',
render: (locationNum: number) => locationNum,
},
{
title: 'Project',
dataIndex: 'project',
key: 'project',
width: '40%',
render: ({ name, link, locationNum }: { name: string; link: URL; locationNum: number }) => (
width: '30%',
render: ({ name, link }: { name: string; link: URL }) => (
<>
<td>
{name} (Table {locationNum})
</td>
<td>{name}</td>
<Link href={link} passHref>
<a
style={{ color: getAccentColor(accentColor, baseTheme), textDecoration: 'underline' }}
Expand Down Expand Up @@ -243,7 +248,8 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps
const dataSource = data.slice(showPast ? 0 : cutoffIndex).map(item => {
return {
time: item.time,
project: { name: item.team.name, link: new URL(item.team.devpost), locationNum: item.team.locationNum },
table: item.team.locationNum,
project: { name: item.team.name, link: new URL(item.team.devpost) },
teamMembers: item.team.members,
judge: item.judge,
teamId: item.team._id,
Expand Down

0 comments on commit 1aaff48

Please sign in to comment.