fix: update interview max score to 25 and recalculate weighted_score
This commit is contained in:
@@ -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']));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user