Auto-assign projects to first round, auto-filter on close, pipeline UX consolidation
- New projects (admin create, CSV import, public form) auto-assign to program's first round (by sortOrder) when no round is specified - Closing a FILTERING round auto-starts filtering job (configurable via autoFilterOnClose setting, defaults to true) - Add SUBMISSION_RECEIVED notification type for confirming submissions - Replace separate List/Pipeline toggle with integrated pipeline view below the sortable round list - Add autoFilterOnClose toggle to filtering round type settings UI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
15
src/server/utils/round-helpers.ts
Normal file
15
src/server/utils/round-helpers.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Get the first round (by sortOrder) for a program.
|
||||
* Used to auto-assign new projects to the intake round.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function getFirstRoundForProgram(
|
||||
prisma: any,
|
||||
programId: string
|
||||
): Promise<{ id: string; name: string; entryNotificationType: string | null } | null> {
|
||||
return prisma.round.findFirst({
|
||||
where: { programId },
|
||||
orderBy: { sortOrder: 'asc' },
|
||||
select: { id: true, name: true, entryNotificationType: true },
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user