feat: add View Project links to admin tables, conditionally show Awards tab

- IndividualAssignmentsTable: add View Project (new tab) as first dropdown item
- AwardShortlist: make project title a clickable link opening in new tab
- ProjectStatesTable: change View Project from same-tab Link to new-tab anchor
- Round page: Awards tab now only shown when roundAwards.length > 0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 14:37:45 +01:00
parent 2f1136646e
commit dd004baf79
4 changed files with 20 additions and 4 deletions

View File

@@ -492,7 +492,7 @@ export default function RoundDetailPage() {
const isFiltering = round?.roundType === 'FILTERING'
const isEvaluation = round?.roundType === 'EVALUATION'
const hasJury = ['EVALUATION', 'LIVE_FINAL', 'DELIBERATION'].includes(round?.roundType ?? '')
const hasAwards = hasJury
const hasAwards = roundAwards.length > 0
const isSimpleAdvance = ['INTAKE', 'SUBMISSION', 'MENTORING'].includes(round?.roundType ?? '')
const poolLink = `/admin/projects?hasAssign=false&round=${roundId}` as Route

View File

@@ -60,6 +60,7 @@ import {
Search,
MoreHorizontal,
UserPlus,
ExternalLink,
} from 'lucide-react'
export type IndividualAssignmentsTableProps = {
@@ -371,6 +372,13 @@ export function IndividualAssignmentsTable({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem asChild>
<a href={`/admin/projects/${a.project?.id}`} target="_blank" rel="noopener noreferrer">
<ExternalLink className="mr-2 h-4 w-4" />
View Project
</a>
</DropdownMenuItem>
<DropdownMenuSeparator />
{a.conflictOfInterest?.hasConflict && (
<>
<DropdownMenuItem

View File

@@ -303,7 +303,15 @@ export function AwardShortlist({
<td className="px-3 py-2">
<div>
<p className={`font-medium ${isTop5 ? 'text-amber-900' : ''}`}>
<a
href={`/admin/projects/${e.project.id}`}
target="_blank"
rel="noopener noreferrer"
className="text-primary hover:underline font-medium"
onClick={(ev) => ev.stopPropagation()}
>
{e.project.title}
</a>
</p>
<p className="text-xs text-muted-foreground">
{[e.project.teamName, e.project.country, e.project.competitionCategory].filter(Boolean).join(', ') || '—'}

View File

@@ -406,10 +406,10 @@ export function ProjectStatesTable({ competitionId, roundId }: ProjectStatesTabl
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem asChild>
<Link href={`/admin/projects/${ps.projectId}` as Route}>
<a href={`/admin/projects/${ps.projectId}`} target="_blank" rel="noopener noreferrer">
<ExternalLink className="h-3.5 w-3.5 mr-2" />
View Project
</Link>
</a>
</DropdownMenuItem>
<DropdownMenuSeparator />
{PROJECT_STATES.filter((s) => s !== ps.state).map((state) => {