From d834955fe29df252960fac321210d7b0a495f8ad Mon Sep 17 00:00:00 2001 From: Fedor Date: Thu, 29 Aug 2024 21:10:34 +0700 Subject: [PATCH] =?UTF-8?q?task-132687=20=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=BE=D0=BC=D0=B5=D1=80=2073.2,=2073.3,=2073.6,=20?= =?UTF-8?q?73.7,=2074,=2076,=2077?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/WorkerController.php | 44 +++++++++++--------- config/database.php | 2 +- public/images/sprite.svg | 4 +- resources/views/admin/job_titles/index.blade.php | 1 - resources/views/chats/chats_list.blade.php | 11 +++-- resources/views/companies.blade.php | 1 - resources/views/contacts.blade.php | 1 - resources/views/detail_new.blade.php | 1 - .../views/employers/add_vacancy_danger.blade.php | 1 - .../views/employers/bd_resume_danger.blade.php | 1 - resources/views/employers/bd_tupe.blade.php | 1 - resources/views/employers/cabinet.blade.php | 3 -- resources/views/employers/faq.blade.php | 1 - resources/views/employers/favorite.blade.php | 1 - resources/views/employers/list_answer.blade.php | 1 - resources/views/employers/list_vacancy.blade.php | 1 - .../views/employers/send_all_danger.blade.php | 1 - resources/views/info_company.blade.php | 1 - resources/views/info_company_new.blade.php | 31 ++++++++------ resources/views/js/captha.blade.php | 3 -- resources/views/js/favorite-vacancy-45.blade.php | 4 -- resources/views/js/modals.blade.php | 3 -- resources/views/layout/frontend.blade.php | 8 ++++ resources/views/list_vacancies.blade.php | 1 - resources/views/modals/send_employer.blade.php | 1 - resources/views/modals/send_worker.blade.php | 1 - resources/views/modals/send_worker_new.blade.php | 1 - resources/views/new_sky.blade.php | 1 - resources/views/news-list.blade.php | 1 - resources/views/resume.blade.php | 2 - resources/views/vacancies.blade.php | 1 - resources/views/worker.blade.php | 1 - resources/views/workers/cabinet.blade.php | 2 +- 33 files changed, 63 insertions(+), 75 deletions(-) diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index 5d9f733..052e61e 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -277,8 +277,7 @@ class WorkerController extends Controller $query = User::select($columns) ->leftJoin('workers', 'users.id', '=', 'workers.user_id') ->leftJoin('job_titles', 'workers.position_work', '=', 'job_titles.id') - ->where('users.is_bd', '=', 1) - ; + ->where('users.is_bd', '=', 1); $job_title_list = $request->input('job_title_list', []); if (!empty($job_title_list)){ @@ -320,16 +319,16 @@ class WorkerController extends Controller $Infobloks = infobloks::query()->get(); - $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> - with('infobloks')->with('place_worker')-> - WhereHas('users', - function (Builder $query) use ($id) {$query->Where('id', $id); + $Worker = Worker::query() + ->with(['users', 'sertificate', 'prev_company', 'infobloks', 'place_worker']) + ->WhereHas('users', function (Builder $query) use ($id) { + $query->Where('id', $id); })->get(); - $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> - where('is_bd', '=' , '1')-> - OrderByDesc('sort')->OrderBy('name')->get(); - + $Job_titles = Job_title::query()->where('is_remove', '=', '0') + ->where('is_bd', '=' , '1') + ->OrderByDesc('sort')->OrderBy('name') + ->get(); $stat = Static_worker::query()->where('year_month', '=', $get_date) ->where('user_id', '=', $id) @@ -781,16 +780,22 @@ class WorkerController extends Controller $Query = Ad_employer::query()->where('id', '=', '0'); } - $Query = $Query->with('jobs')-> - with('cat')-> - with('employer')-> - whereHas('jobs_code', function ($query) use ($request) { - if ($request->ajax()) { - if (null !== ($request->get('job'))) { - $query->where('job_title_id', $request->get('job')); + $Query = $Query->with(['jobs', 'cat', 'employer']) + ->whereHas('jobs_code', function ($query) use ($request) { + if ($request->ajax()) { + if (null !== ($request->get('job'))) { + $query->where('job_title_id', $request->get('job')); + } } - } - })->select('ad_employers.*'); + }) + ->select('ad_employers.*'); + + if ($request->get('search') !== null) { + $search = $request->get('search'); + $Query->where('name', 'LIKE', "%$search%"); + } + + //dd($Query->get()); $Job_title = Job_title::query()->OrderBy('name')->get(); @@ -798,7 +803,6 @@ class WorkerController extends Controller $Query = $Query->OrderBy('updated_at')->paginate(3); - return view('workers.favorite', compact('Query', 'Query_count', 'Job_title')); diff --git a/config/database.php b/config/database.php index c2e215d..9f5df8b 100644 --- a/config/database.php +++ b/config/database.php @@ -56,7 +56,7 @@ return [ 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, - 'strict' => true, + //'strict' => true, 'engine' => 'InnoDB ROW_FORMAT=DYNAMIC', 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), diff --git a/public/images/sprite.svg b/public/images/sprite.svg index 9786335..db6ecd3 100644 --- a/public/images/sprite.svg +++ b/public/images/sprite.svg @@ -46,7 +46,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/resources/views/admin/job_titles/index.blade.php b/resources/views/admin/job_titles/index.blade.php index 4b11e1f..57dcb88 100644 --- a/resources/views/admin/job_titles/index.blade.php +++ b/resources/views/admin/job_titles/index.blade.php @@ -2,7 +2,6 @@ @section('script') @include('js.favorite-vacancy-45') @endsection @@ -109,12 +115,14 @@

{{ $company[0]->name_company }}

- + + + @if ($user_id == 0) Написать сообщение @@ -186,13 +194,12 @@
- - + +
-
+
@if ($company[0]->flots->count()) @foreach ($company[0]->flots as $flot) @@ -217,7 +224,7 @@
-
+
@foreach ($ads as $job)
diff --git a/resources/views/js/captha.blade.php b/resources/views/js/captha.blade.php index 6301c3e..3aefe09 100644 --- a/resources/views/js/captha.blade.php +++ b/resources/views/js/captha.blade.php @@ -7,9 +7,6 @@ var captha1 = $('#captcha1').html(); var captha2 = $('#captcha2').html(); - console.log('captha1='+captha1); - console.log('captha2='+captha2); - document.getElementById('captcha1').innerHTML = ""; document.getElementById('captcha2').innerHTML = ""; var charsArray = diff --git a/resources/views/js/favorite-vacancy-45.blade.php b/resources/views/js/favorite-vacancy-45.blade.php index 7719459..1f30c48 100644 --- a/resources/views/js/favorite-vacancy-45.blade.php +++ b/resources/views/js/favorite-vacancy-45.blade.php @@ -1,6 +1,4 @@