Warn when jurors lack profile data in AI assignment preview
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m44s
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m44s
Shows warning with juror names when they have no expertise tags or bio, so admin can ask them to onboard before committing assignments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user