Add juror quick actions to Members section, redistribute button, dropout emails, and transfer duplicate detection
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled

- Add mail/transfer/reshuffle/redistribute icons to each juror row in Members card
- New redistributeJurorAssignments procedure: reassign all pending projects without dropping juror from group
- New DROPOUT_REASSIGNED email template with project names, deadline, and dropped juror context
- Update reassignDroppedJuror to send per-juror DROPOUT_REASSIGNED emails instead of generic BATCH_ASSIGNED
- Transfer dialog now shows all candidates with "Already assigned" / "At cap" labels instead of hiding them
- SQL script for prod DB insertion of new notification setting without seeding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 16:08:46 +01:00
parent 49e9405e01
commit 95d51e7de3
7 changed files with 570 additions and 15 deletions

View File

@@ -0,0 +1,16 @@
-- Insert DROPOUT_REASSIGNED notification email setting into production DB
-- Run manually: psql -d mopc -f prisma/migrations/insert-dropout-reassigned-setting.sql
-- Safe to run multiple times (uses ON CONFLICT to skip if already exists)
INSERT INTO "NotificationEmailSetting" (
"id", "notificationType", "category", "label", "description", "sendEmail", "createdAt", "updatedAt"
) VALUES (
gen_random_uuid()::text,
'DROPOUT_REASSIGNED',
'jury',
'Juror Dropout Reassignment',
'When projects are reassigned to you because a juror dropped out or became unavailable',
true,
NOW(),
NOW()
) ON CONFLICT ("notificationType") DO NOTHING;

View File

@@ -104,6 +104,13 @@ const NOTIFICATION_EMAIL_SETTINGS = [
description: 'When an admin manually reassigns a project to you',
sendEmail: true,
},
{
notificationType: 'DROPOUT_REASSIGNED',
category: 'jury',
label: 'Juror Dropout Reassignment',
description: 'When projects are reassigned to you because a juror dropped out or became unavailable',
sendEmail: true,
},
{
notificationType: 'ROUND_NOW_OPEN',
category: 'jury',