Fix build errors: add missing Prisma models/fields and resolve TypeScript type errors
Schema: Add 11 new models (RoundTemplate, MentorNote, MentorMilestone, MentorMilestoneCompletion, EvaluationDiscussion, DiscussionComment, Message, MessageRecipient, MessageTemplate, Webhook, WebhookDelivery, DigestLog) and missing fields on existing models (Project.isDraft, ProjectFile.version, LiveVotingSession.allowAudienceVotes, User.digestFrequency, AuditLog.sessionId, MentorAssignment.completionStatus, etc). Add AUDIT_CONFIG/LOCALIZATION/DIGEST/ANALYTICS enum values. Code: Fix implicit any types, route type casts, enum casts, null safety, composite key handling, and relation field names across 11 source files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -405,8 +405,8 @@ export const liveVotingRouter = router({
|
||||
.map((jurySc) => {
|
||||
const project = projects.find((p) => p.id === jurySc.projectId)
|
||||
const audienceSc = audienceMap.get(jurySc.projectId)
|
||||
const juryAvg = jurySc._avg.score || 0
|
||||
const audienceAvg = audienceSc?._avg.score || 0
|
||||
const juryAvg = jurySc._avg?.score || 0
|
||||
const audienceAvg = audienceSc?._avg?.score || 0
|
||||
const weightedTotal = audienceWeight > 0 && audienceSc
|
||||
? juryAvg * juryWeight + audienceAvg * audienceWeight
|
||||
: juryAvg
|
||||
|
||||
Reference in New Issue
Block a user