Fix smart assignment suggestions to display juror/project names

The suggestions table was showing truncated IDs instead of actual names.
Updated getSuggestions to include jurorName and projectTitle in response.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 09:36:33 +01:00
parent 8cdf6c9e5e
commit 1b12aa8ccd
2 changed files with 6 additions and 2 deletions

View File

@@ -337,10 +337,10 @@ function AssignmentManagementContent({ roundId }: { roundId: string }) {
/>
</TableCell>
<TableCell className="font-medium">
{suggestion.userId.slice(0, 8)}...
{suggestion.jurorName}
</TableCell>
<TableCell>
{suggestion.projectId.slice(0, 8)}...
{suggestion.projectTitle}
</TableCell>
<TableCell>
<Badge

View File

@@ -473,7 +473,9 @@ export const assignmentRouter = router({
// Simple scoring algorithm
const suggestions: Array<{
userId: string
jurorName: string
projectId: string
projectTitle: string
score: number
reasoning: string[]
}> = []
@@ -521,7 +523,9 @@ export const assignmentRouter = router({
return {
userId: juror.id,
jurorName: juror.name || juror.email || 'Unknown',
projectId: project.id,
projectTitle: project.title || 'Unknown',
score,
reasoning,
}