AI Analysis: JobPosition infrastructure and candidate association

This commit is contained in:
jeremy bayse
2026-03-22 22:22:45 +01:00
parent 2df0d6def0
commit 878f4bb102
12 changed files with 470 additions and 6 deletions

View File

@@ -75,11 +75,13 @@ class CandidateController extends Controller
'documents',
'attempts.quiz',
'attempts.answers.question',
'attempts.answers.option'
'attempts.answers.option',
'jobPosition'
]);
return \Inertia\Inertia::render('Admin/Candidates/Show', [
'candidate' => $candidate
'candidate' => $candidate,
'jobPositions' => \App\Models\JobPosition::all()
]);
}
@@ -142,6 +144,19 @@ class CandidateController extends Controller
return back()->with('success', 'Notes mises à jour avec succès.');
}
public function updatePosition(Request $request, Candidate $candidate)
{
$request->validate([
'job_position_id' => 'nullable|exists:job_positions,id',
]);
$candidate->update([
'job_position_id' => $request->job_position_id,
]);
return back()->with('success', 'Fiche de poste associée au candidat.');
}
public function resetPassword(Candidate $candidate)
{
$password = Str::random(10);