Admin: implementation of the 'is_selected' feature for candidates for interviews

This commit is contained in:
jeremy bayse
2026-04-16 19:08:52 +02:00
parent c4ab5c97b2
commit d6e5b44e47
7 changed files with 133 additions and 21 deletions

View File

@@ -237,6 +237,15 @@ class CandidateController extends Controller
$this->storeDocument($candidate, $file, $type);
}
public function toggleSelection(Candidate $candidate)
{
$candidate->update([
'is_selected' => !$candidate->is_selected
]);
return back()->with('success', 'Statut de sélection mis à jour.');
}
private function storeDocument(Candidate $candidate, $file, string $type)
{
if (!$file) {