feat: add inline file viewer and project logos to award voting
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m24s
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m24s
- Replace custom download-only file list with full FileViewer component that supports inline preview (PDF, video, images, Office docs), open in new tab, and download - Add project logos next to project names in award voting cards - Backend now returns full file metadata (mimeType, size, pageCount, language detection) and project logo URLs - Award jurors can access files for eligible projects (access control already added in prior commit) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { processEligibilityJob } from '../services/award-eligibility-job'
|
||||
import { resolveAwardWinner } from '../services/award-winner-resolver'
|
||||
import { getAwardSelectionNotificationTemplate, sendJuryInvitationEmail } from '@/lib/email'
|
||||
import { generateInviteToken, getInviteExpiryMs } from '@/server/utils/invite'
|
||||
import { attachProjectLogoUrls } from '../utils/project-logo-url'
|
||||
import { sendBatchNotifications } from '../services/notification-sender'
|
||||
import type { NotificationItem } from '../services/notification-sender'
|
||||
import type { PrismaClient } from '@prisma/client'
|
||||
@@ -740,14 +741,24 @@ export const specialAwardRouter = router({
|
||||
competitionCategory: true,
|
||||
country: true,
|
||||
tags: true,
|
||||
logoKey: true,
|
||||
logoProvider: true,
|
||||
files: {
|
||||
where: { replacedById: null },
|
||||
select: {
|
||||
id: true,
|
||||
fileName: true,
|
||||
fileType: true,
|
||||
mimeType: true,
|
||||
size: true,
|
||||
bucket: true,
|
||||
objectKey: true,
|
||||
version: true,
|
||||
isLate: true,
|
||||
pageCount: true,
|
||||
detectedLang: true,
|
||||
langConfidence: true,
|
||||
analyzedAt: true,
|
||||
createdAt: true,
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
@@ -768,9 +779,12 @@ export const specialAwardRouter = router({
|
||||
}),
|
||||
])
|
||||
|
||||
const projectsRaw = eligibleProjects.map((e) => e.project)
|
||||
const projectsWithLogos = await attachProjectLogoUrls(projectsRaw)
|
||||
|
||||
return {
|
||||
award,
|
||||
projects: eligibleProjects.map((e) => e.project),
|
||||
projects: projectsWithLogos,
|
||||
myVotes,
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user