Reopen rounds, file type buttons, checklist live-update
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m1s
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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user