+ {(items ?? []).map((assignment) => {
+ const project = assignment.project
+ const evalStatus = assignment.evaluation?.status
+ const isSubmitted = evalStatus === 'SUBMITTED'
+ const isDraft = evalStatus === 'DRAFT'
-
- {activeRounds.length > 0 ? (
- activeRounds.slice(0, 2).map((round) => (
+ return (
-
-
-
{round.name}
+
+
+
+
+ {project.title}
+
+
+ {[project.teamName, project.country].filter(Boolean).join(' \u00b7 ')}
+
+
+
+ {isSubmitted ? (
+
+
+ Submitted
+
+ ) : isDraft ? (
+
+
+ Draft
+
+ ) : (
+
+
+ Pending
+
+ )}
+
+
-
- ))
- ) : (
-
- No active rounds
-
- )}
- {activeRounds.length > 2 && (
-
- +{activeRounds.length - 2} more round{activeRounds.length - 2 !== 1 ? 's' : ''}
-
- )}
+ )
+ })}
diff --git a/src/components/layouts/jury-nav.tsx b/src/components/layouts/jury-nav.tsx
index ab680f6..56f5597 100644
--- a/src/components/layouts/jury-nav.tsx
+++ b/src/components/layouts/jury-nav.tsx
@@ -1,6 +1,6 @@
'use client'
-import { BookOpen, Home, Trophy, Layers } from 'lucide-react'
+import { BookOpen, Home, Trophy, ClipboardList } from 'lucide-react'
import { RoleNav, type NavItem, type RoleNavUser } from '@/components/layouts/role-nav'
import { trpc } from '@/lib/trpc/client'
import { Badge } from '@/components/ui/badge'
@@ -42,6 +42,11 @@ function RemainingBadge() {
}
export function JuryNav({ user }: JuryNavProps) {
+ const { data: myAwards } = trpc.specialAward.getMyAwards.useQuery(
+ undefined,
+ { refetchInterval: 60000 }
+ )
+
const navigation: NavItem[] = [
{
name: 'Dashboard',
@@ -49,15 +54,19 @@ export function JuryNav({ user }: JuryNavProps) {
icon: Home,
},
{
- name: 'Competitions',
+ name: 'Assignments',
href: '/jury/competitions',
- icon: Layers,
- },
- {
- name: 'Awards',
- href: '/jury/awards',
- icon: Trophy,
+ icon: ClipboardList,
},
+ ...(myAwards && myAwards.length > 0
+ ? [
+ {
+ name: 'Awards',
+ href: '/jury/awards',
+ icon: Trophy,
+ },
+ ]
+ : []),
{
name: 'Learning Hub',
href: '/jury/learning',
diff --git a/src/components/shared/expertise-select.tsx b/src/components/shared/expertise-select.tsx
index 6c9166b..8354100 100644
--- a/src/components/shared/expertise-select.tsx
+++ b/src/components/shared/expertise-select.tsx
@@ -182,7 +182,7 @@ export function ExpertiseSelect({
)}
{/* Categories with expandable tag lists */}
-
+
{Object.entries(filteredTagsByCategory)
.sort(([a], [b]) => a.localeCompare(b))
.map(([category, categoryTags]) => {
@@ -261,6 +261,10 @@ export function ExpertiseSelect({
))}
+
{tag.name}
)