Show award-routed projects in filtering stats and results table
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled

- Stats cards show new 'Award Track' card with count of confirmed
  SEPARATE_POOL shortlisted projects
- Passed card shows breakdown (main + award) when awards are routed
- Results table shows award badge on projects routed to award tracks
- getResults query includes confirmed award eligibility data per project

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt
2026-02-18 10:25:47 +01:00
parent 6e9fcda45a
commit 35f30af7ce
2 changed files with 64 additions and 9 deletions

View File

@@ -877,6 +877,16 @@ export const filteringRouter = router({
teamName: true,
competitionCategory: true,
country: true,
awardEligibilities: {
where: {
shortlisted: true,
confirmedAt: { not: null },
award: { eligibilityMode: 'SEPARATE_POOL' },
},
select: {
award: { select: { name: true } },
},
},
},
},
overriddenByUser: {
@@ -936,7 +946,27 @@ export const filteringRouter = router({
}),
])
return { passed, filteredOut, flagged, overridden, total: passed + filteredOut + flagged }
// Count projects routed to SEPARATE_POOL award tracks (confirmed shortlist)
const round = await ctx.prisma.round.findUnique({
where: { id: input.roundId },
select: { competitionId: true },
})
let routedToAwards = 0
if (round?.competitionId) {
routedToAwards = await ctx.prisma.awardEligibility.count({
where: {
award: {
competitionId: round.competitionId,
eligibilityMode: 'SEPARATE_POOL',
},
shortlisted: true,
confirmedAt: { not: null },
},
})
}
return { passed, filteredOut, flagged, overridden, routedToAwards, total: passed + filteredOut + flagged }
}),
/**