diff --git a/app/Http/Controllers/CandidateController.php b/app/Http/Controllers/CandidateController.php index bc9f196..3728b16 100644 --- a/app/Http/Controllers/CandidateController.php +++ b/app/Http/Controllers/CandidateController.php @@ -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'])); diff --git a/app/Models/Candidate.php b/app/Models/Candidate.php index d1971f0..be292ea 100644 --- a/app/Models/Candidate.php +++ b/app/Models/Candidate.php @@ -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); } diff --git a/resources/js/Pages/Admin/Candidates/Show.vue b/resources/js/Pages/Admin/Candidates/Show.vue index 078edad..2f6aeee 100644 --- a/resources/js/Pages/Admin/Candidates/Show.vue +++ b/resources/js/Pages/Admin/Candidates/Show.vue @@ -94,7 +94,7 @@ const updateDocuments = () => docForm.post(route('admin.candidates.update', prop const saveScores = () => { scoreForm.cv_score = Math.min(20, Math.max(0, scoreForm.cv_score)); scoreForm.motivation_score = Math.min(10, Math.max(0, scoreForm.motivation_score)); - scoreForm.interview_score = Math.min(30, Math.max(0, scoreForm.interview_score)); + scoreForm.interview_score = Math.min(25, Math.max(0, scoreForm.interview_score)); scoreForm.patch(route('admin.candidates.update-scores', props.candidate.id), { preserveScroll: true }); }; const openPreview = (doc) => { selectedDocument.value = doc; }; @@ -124,7 +124,7 @@ const softSkillsScore = computed(() => { const radarData = computed(() => ([ Math.round((parseFloat(scoreForm.cv_score) / 20) * 100), Math.round((parseFloat(scoreForm.motivation_score) / 10) * 100), - Math.round((parseFloat(scoreForm.interview_score) / 30) * 100), + Math.round((parseFloat(scoreForm.interview_score) / 25) * 100), Math.round((bestTestScore.value / 20) * 100), Math.round((softSkillsScore.value / 10) * 100), ])); @@ -184,7 +184,7 @@ const forceAnalysis = ref(false); const calculatedInterviewScore = computed(() => { const qScore = (notesForm.interview_details.questions || []).reduce((a, q) => a + (parseFloat(q.score) || 0), 0); - return Math.min(30, qScore + (parseFloat(notesForm.interview_details.appreciation) || 0)); + return Math.min(25, qScore + (parseFloat(notesForm.interview_details.appreciation) || 0)); }); watch(aiAnalysis, (val) => { @@ -343,7 +343,7 @@ const barColor = (pct) => pct >= 80 ? 'bg-success' : pct >= 60 ? 'bg-highlight'
{{ item.label }} @@ -453,7 +453,7 @@ const barColor = (pct) => pct >= 80 ? 'bg-success' : pct >= 60 ? 'bg-highlight'

{{ item.label }}

@@ -480,7 +480,7 @@ const barColor = (pct) => pct >= 80 ? 'bg-success' : pct >= 60 ? 'bg-highlight'