fix: update interview max score to 25 and recalculate weighted_score

This commit is contained in:
jeremy bayse
2026-05-08 11:43:47 +02:00
parent 29c274b23b
commit fd4a39a703
3 changed files with 9 additions and 9 deletions

View File

@@ -223,7 +223,7 @@ class CandidateController extends Controller
$request->validate([
'notes' => 'nullable|string',
'interview_details' => 'nullable|array',
'interview_score' => 'nullable|numeric|min:0|max:30',
'interview_score' => 'nullable|numeric|min:0|max:25',
]);
$candidate->update([
@@ -240,7 +240,7 @@ class CandidateController extends Controller
$request->validate([
'cv_score' => 'nullable|numeric|min:0|max:20',
'motivation_score' => 'nullable|numeric|min:0|max:10',
'interview_score' => 'nullable|numeric|min:0|max:30',
'interview_score' => 'nullable|numeric|min:0|max:25',
]);
$candidate->update($request->only(['cv_score', 'motivation_score', 'interview_score']));

View File

@@ -53,7 +53,7 @@ class Candidate extends Model
})->max() ?? 0;
$totalPoints = $cv + $motivation + $interview + $bestAttempt;
$maxPoints = 20 + 10 + 30 + 20; // Total potentiel = 80
$maxPoints = 20 + 10 + 25 + 20; // Total potentiel = 75
return round(($totalPoints / $maxPoints) * 20, 2);
}