Skip to content

Commit 4779b6c

Browse files
authored
Merge pull request #312 from HackDavis/fix/admin-team-select
fixed admin panel teams
2 parents c6d184a + cad4a3c commit 4779b6c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

app/(pages)/admin/_components/Teams/TeamForm.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ export default function TeamForm({
3838
value: judge,
3939
}));
4040

41+
const judgeMap = Object.fromEntries(
42+
judges.body.map((judge: any) => [judge._id, judge])
43+
);
44+
45+
if (data?._id) {
46+
data.judges = data.judges.map((judge: any) => {
47+
return judgeMap[judge._id];
48+
});
49+
}
50+
4151
const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
4252
event.preventDefault();
4353

app/(pages)/admin/dashboard/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const action_links = [
1818
body: 'Create Panels',
1919
},
2020
{
21-
href: '/admin/invite',
21+
href: '/admin/invite-link',
2222
body: 'Invite Judges',
2323
},
2424
{
@@ -36,6 +36,10 @@ const data_links = [
3636
href: '/admin/judges',
3737
body: 'View Judges',
3838
},
39+
{
40+
href: '/admin/rollouts',
41+
body: 'View Rollouts',
42+
},
3943
];
4044

4145
export default function Dashboard() {

0 commit comments

Comments
 (0)