AI Analysis: JobPosition infrastructure and candidate association
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user