Admin: implementation of the 'is_selected' feature for candidates for interviews
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user