Add candidateTeam field to evaluations; update related components and API endpoints for consistency

This commit is contained in:
Julien Froidefond
2026-02-20 09:22:12 +01:00
parent f0c5d768db
commit 9fcceb2649
11 changed files with 79 additions and 38 deletions

View File

@@ -29,7 +29,7 @@ export async function GET(req: NextRequest) {
export async function POST(req: NextRequest) {
try {
const body = await req.json();
const { candidateName, candidateRole, evaluatorName, evaluationDate, templateId } = body;
const { candidateName, candidateRole, candidateTeam, evaluatorName, evaluationDate, templateId } = body;
if (!candidateName || !candidateRole || !evaluatorName || !evaluationDate || !templateId) {
return NextResponse.json(
@@ -50,6 +50,7 @@ export async function POST(req: NextRequest) {
data: {
candidateName,
candidateRole,
candidateTeam: candidateTeam || null,
evaluatorName,
evaluationDate: new Date(evaluationDate),
templateId,