Observer: fix round history, match admin project info, add AI rejection reason
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m30s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m30s
- Round history infers rejection round when ProjectRoundState lacks explicit REJECTED state; shows red XCircle + badge, dims unreached rounds - Project info section now matches admin: description, location, founded, submission links, expertise tags, internal notes, created/updated dates - Fetch FilteringResult for rejected projects; display AI reasoning + confidence - Remove cross-round comparison from reports, replace with scoring/criteria insights - Remove unused AI synthesis placeholder Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1317,6 +1317,21 @@ export const analyticsRouter = router({
|
||||
select: { roundId: true, state: true, enteredAt: true, exitedAt: true },
|
||||
})
|
||||
|
||||
// Get filtering result (AI screening) for rejected projects
|
||||
const filteringResult = projectRaw.status === 'REJECTED'
|
||||
? await ctx.prisma.filteringResult.findFirst({
|
||||
where: { projectId: input.id },
|
||||
select: {
|
||||
outcome: true,
|
||||
finalOutcome: true,
|
||||
aiScreeningJson: true,
|
||||
overrideReason: true,
|
||||
round: { select: { id: true, name: true } },
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
})
|
||||
: null
|
||||
|
||||
// Get file requirements for all rounds
|
||||
let allRequirements: { id: string; roundId: string; name: string; description: string | null; isRequired: boolean; acceptedMimeTypes: string[]; maxSizeMB: number | null }[] = []
|
||||
if (competitionRounds.length > 0) {
|
||||
@@ -1360,6 +1375,7 @@ export const analyticsRouter = router({
|
||||
competitionRounds,
|
||||
projectRoundStates,
|
||||
allRequirements,
|
||||
filteringResult,
|
||||
}
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user