Reopen rounds, file type buttons, checklist live-update
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m1s

- Add reopenRound() to round engine (CLOSED → ACTIVE) with auto-pause of subsequent active rounds
- Add reopen endpoint to roundEngine router and UI button on round detail page
- Replace free-text MIME type input with toggle-only badge buttons in file requirements editor
- Enable refetchOnWindowFocus and shorter polling intervals for readiness checklist queries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt
2026-02-16 12:06:07 +01:00
parent de73a6f080
commit 079468d2ca
4 changed files with 242 additions and 53 deletions

View File

@@ -5,6 +5,7 @@ import {
activateRound,
closeRound,
archiveRound,
reopenRound,
transitionProject,
batchTransitionProjects,
getProjectRoundStates,
@@ -53,6 +54,23 @@ export const roundEngineRouter = router({
return result
}),
/**
* Reopen a round: ROUND_CLOSED → ROUND_ACTIVE
* Pauses any subsequent active rounds in the same competition.
*/
reopen: adminProcedure
.input(z.object({ roundId: z.string() }))
.mutation(async ({ ctx, input }) => {
const result = await reopenRound(input.roundId, ctx.user.id, ctx.prisma)
if (!result.success) {
throw new TRPCError({
code: 'BAD_REQUEST',
message: result.errors?.join('; ') ?? 'Failed to reopen round',
})
}
return result
}),
/**
* Archive a round: ROUND_CLOSED → ROUND_ARCHIVED
*/