diff --git a/app/Console/Commands/DispatchResumeLiftJobCommand.php b/app/Console/Commands/DispatchResumeLiftJobCommand.php index 9ae6992..1df006d 100644 --- a/app/Console/Commands/DispatchResumeLiftJobCommand.php +++ b/app/Console/Commands/DispatchResumeLiftJobCommand.php @@ -2,6 +2,7 @@ namespace App\Console\Commands; +use App\Jobs\LiftResumeJob; use App\Jobs\LiftVacancyJob; use App\Jobs\SendVacancyToTelegramJob; use App\Models\EmployerAutoliftOption; @@ -39,7 +40,7 @@ class DispatchResumeLiftJobCommand extends Command }) ->get(); - LiftVacancyJob::dispatch($workers->pluck('worker_id')->toArray()); + LiftResumeJob::dispatch($workers->pluck('worker_id')->toArray()); return Command::SUCCESS; } diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index df63ffd..4ec69a1 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -264,9 +264,10 @@ class EmployerController extends Controller // Сохранение-редактирование записи public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { $params = $request->all(); - $params_job["job_title_id"] = $params['job_title_id']; $ad_employer->update($params); + $ad_employer->active_is = 1; + $ad_employer->save(); $ad_employer->jobs()->sync($request->get('job_title_id')); $id = Auth()->user()->id; @@ -811,7 +812,7 @@ class EmployerController extends Controller 'employer_id' => $employer->id, ], [ - 'is_enabled' => $request->get('is_enabled') === 'on', + 'is_enabled' => $request->get('is_enabled') === 'true', 'times_per_day' => $request->get('times_per_day'), 'days_repeat' => $request->get('days_repeat'), 'time_send_first' => $request->get('time_send_first'), diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index 4c000f4..2a9be05 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -1111,7 +1111,7 @@ class WorkerController extends Controller 'worker_id' => $worker->id, ], [ - 'is_enabled' => $request->get('is_enabled') === 'on', + 'is_enabled' => $request->get('is_enabled') === 'true', 'times_per_day' => $request->get('times_per_day'), 'days_repeat' => $request->get('days_repeat'), 'time_send_first' => $request->get('time_send_first'), diff --git a/app/Jobs/LiftVacancyJob.php b/app/Jobs/LiftVacancyJob.php index 4d76da8..a0c9b48 100644 --- a/app/Jobs/LiftVacancyJob.php +++ b/app/Jobs/LiftVacancyJob.php @@ -23,7 +23,7 @@ class LiftVacancyJob implements ShouldQueue public function handle() { Ad_employer::query() - ->whereIn('id', $this->employerIds) + ->whereIn('employer_id', $this->employerIds) ->update([ 'updated_at' => now() ]); diff --git a/app/Jobs/SendVacancyToTelegramJob.php b/app/Jobs/SendVacancyToTelegramJob.php index 57453e5..d5e7a22 100644 --- a/app/Jobs/SendVacancyToTelegramJob.php +++ b/app/Jobs/SendVacancyToTelegramJob.php @@ -30,7 +30,7 @@ class SendVacancyToTelegramJob implements ShouldQueue public function handle(): void { $vacancies = Ad_employer::query() - ->whereIn('id', $this->employerIds) + ->whereIn('employer_id', $this->employerIds) ->get(); foreach ($vacancies as $vacancy) { diff --git a/resources/views/employers/edit_vacancy.blade.php b/resources/views/employers/edit_vacancy.blade.php index 1f61dff..c7c596c 100644 --- a/resources/views/employers/edit_vacancy.blade.php +++ b/resources/views/employers/edit_vacancy.blade.php @@ -121,34 +121,6 @@ @enderror - - -