Fix mobile overflow, logo nav, round activation, compare projects setting
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
- Fix assignments page header overflow on mobile (flex-wrap) - Hide 'Back to Dashboard' button on mobile (logo tap navigates home) - Make logo/brand text clickable to navigate to role dashboard - Snap windowOpenAt to now when manually activating a round early - Gate Compare Projects cards behind jury_compare_enabled setting (defaults off) - Expose jury_compare_enabled in getFeatureFlags tRPC procedure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -106,10 +106,21 @@ export async function activateRound(
|
||||
}
|
||||
}
|
||||
|
||||
// If activating before the scheduled start, snap windowOpenAt to now
|
||||
const now = new Date()
|
||||
const windowData: Record<string, Date> = {}
|
||||
if (round.windowOpenAt && new Date(round.windowOpenAt) > now) {
|
||||
windowData.windowOpenAt = now
|
||||
}
|
||||
// If no windowOpenAt was set at all, also set it to now
|
||||
if (!round.windowOpenAt) {
|
||||
windowData.windowOpenAt = now
|
||||
}
|
||||
|
||||
const updated = await prisma.$transaction(async (tx: any) => {
|
||||
const result = await tx.round.update({
|
||||
where: { id: roundId },
|
||||
data: { status: 'ROUND_ACTIVE' },
|
||||
data: { status: 'ROUND_ACTIVE', ...windowData },
|
||||
})
|
||||
|
||||
await tx.decisionAuditLog.create({
|
||||
|
||||
Reference in New Issue
Block a user