From 3e8ab15f22514b4315d6aa693342b75fe2405821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Thu, 25 Apr 2024 23:07:56 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D0=B0=D1=82=D1=83=D1=81=D1=8B=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=BB=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D0=B5=D0=B9=20=D0=B8=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=BD=D1=8B=D0=B5=20=D0=B2=D0=B8=D0=B4=D0=B8=D0?= =?UTF-8?q?=BC=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/EmployerController.php | 5 +++-- app/Http/Controllers/MainController.php | 4 +++- app/Http/Controllers/WorkerController.php | 4 +++- resources/views/admin/job_titles/form.blade.php | 6 +++--- resources/views/admin/job_titles/index.blade.php | 8 ++++---- resources/views/employers/edit_vacancy.blade.php | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 022f9c8..2792d02 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -168,7 +168,7 @@ class EmployerController extends Controller //} else { // $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', 0)->get(); //} - $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->get(); + $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=' , '0')->get(); $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> WhereHas('users', function (Builder $query) use ($id) {$query->Where('id', $id); @@ -231,7 +231,8 @@ class EmployerController extends Controller public function vacancy_edit(Ad_employer $ad_employer) { $id = Auth()->user()->id; $Positions = Category::query()->where('is_remove', '=', '0')->get(); - $jobs = Job_title::query()->OrderBy('name')->where('is_remove', 0)->get(); + $jobs = Job_title::query()->OrderBy('name')-> + where('is_remove', 0)->where('is_bd', '=' , '0')->get(); $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> where('user_id', $id)->first(); diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index e90e4c4..ffa0ec5 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -41,6 +41,7 @@ class MainController extends Controller $Position = Category::query()->where('is_remove', '=', '0')->get(); $job_titles = Job_title::query()->where('is_remove', '=', 0)->get(); + /*$BigFlot = Array(); foreach ($Position as $position) { $BigFlot[] = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> @@ -74,12 +75,12 @@ class MainController extends Controller selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> where('categories.is_remove', '=', '0')-> where('job_titles.is_remove', '=', '0')-> + where('job_titles.is_bd', '=' , '0')-> leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> join('categories', 'categories.id', '=', 'job_titles.position_id')-> groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> orderByDesc('job_titles.sort')->get()->toArray(); - $Main_Job = array(); $name_cat = ''; foreach ($Data as $it) { @@ -193,6 +194,7 @@ class MainController extends Controller $Data = DB::table('job_titles')-> selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> where('categories.is_remove', '=', '0')-> + where('job_titles.is_bd', '=' , '0')-> where('job_titles.is_remove', '=', '0'); if (($request->has('job')) && ($request->get('job') > 0)) { $Data = $Data->where('job_title_id', $request->get('job')); diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index 2632877..68e7bb1 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -229,7 +229,9 @@ class WorkerController extends Controller function (Builder $query) use ($id) {$query->Where('id', $id); })->get(); - $Job_titles = Job_title::query()->where('is_remove', '=', '0')->OrderBy('name')->get(); + $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> + where('is_bd', '=' , '1')-> + OrderBy('name')->get(); $Infoblocks = infobloks::query()->OrderBy('name')->get(); $stat = Static_worker::query()->where('year_month', '=', $get_date) diff --git a/resources/views/admin/job_titles/form.blade.php b/resources/views/admin/job_titles/form.blade.php index b985c6c..94246d1 100644 --- a/resources/views/admin/job_titles/form.blade.php +++ b/resources/views/admin/job_titles/form.blade.php @@ -59,9 +59,9 @@
diff --git a/resources/views/admin/job_titles/index.blade.php b/resources/views/admin/job_titles/index.blade.php index f930bc6..a16d6c8 100644 --- a/resources/views/admin/job_titles/index.blade.php +++ b/resources/views/admin/job_titles/index.blade.php @@ -43,10 +43,10 @@ @switch ($job->is_bd) - @case (0) База данных @break - @case (1) База резюме @break - @case (2) Везде @break - @default Везде @break + @case (0) Работодатель @break + @case (1) Работник @break + @case (2) База данных @break + @default База данных @break @endswitch diff --git a/resources/views/employers/edit_vacancy.blade.php b/resources/views/employers/edit_vacancy.blade.php index 6441d32..1ee7896 100644 --- a/resources/views/employers/edit_vacancy.blade.php +++ b/resources/views/employers/edit_vacancy.blade.php @@ -45,7 +45,7 @@ - @include('employers.menu', ['item' => 0]) + @include('employers.menu', ['item' => 3]) -- 1.7.10.4