diff --git a/src/server/routers/roundAssignment.ts b/src/server/routers/roundAssignment.ts index 6286e27..ed4d3f5 100644 --- a/src/server/routers/roundAssignment.ts +++ b/src/server/routers/roundAssignment.ts @@ -190,9 +190,21 @@ export const roundAssignmentRouter = router({ const assignedProjectIds = new Set(assignments.map((a) => a.projectId)) + // Warn about jurors without profile data + const warnings: string[] = result.error ? [result.error] : [] + const incompleteJurors = jurors.filter( + (j) => (!j.expertiseTags || j.expertiseTags.length === 0) && !j.bio + ) + if (incompleteJurors.length > 0) { + const names = incompleteJurors.map((j) => j.name || 'Unknown').join(', ') + warnings.push( + `${incompleteJurors.length} juror(s) have no expertise tags or bio (${names}). Their assignments are based on workload balance only — consider asking them to complete their profile first.` + ) + } + return { assignments, - warnings: result.error ? [result.error] : [], + warnings, stats: { totalProjects: projects.length, totalJurors: jurors.length,