Commit c40f2b065cea930f5629b64a4516523032e7b56f

Authored by Fedor K
Exists in master

Merge branch 'task-132687' into 'master'

task-132687 Доделки по сайту

Showing 33 changed files Side-by-side Diff

app/Http/Controllers/WorkerController.php
... ... @@ -277,8 +277,7 @@ class WorkerController extends Controller
277 277 $query = User::select($columns)
278 278 ->leftJoin('workers', 'users.id', '=', 'workers.user_id')
279 279 ->leftJoin('job_titles', 'workers.position_work', '=', 'job_titles.id')
280   - ->where('users.is_bd', '=', 1)
281   - ;
  280 + ->where('users.is_bd', '=', 1);
282 281  
283 282 $job_title_list = $request->input('job_title_list', []);
284 283 if (!empty($job_title_list)){
... ... @@ -320,16 +319,16 @@ class WorkerController extends Controller
320 319  
321 320 $Infobloks = infobloks::query()->get();
322 321  
323   - $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')->
324   - with('infobloks')->with('place_worker')->
325   - WhereHas('users',
326   - function (Builder $query) use ($id) {$query->Where('id', $id);
  322 + $Worker = Worker::query()
  323 + ->with(['users', 'sertificate', 'prev_company', 'infobloks', 'place_worker'])
  324 + ->WhereHas('users', function (Builder $query) use ($id) {
  325 + $query->Where('id', $id);
327 326 })->get();
328 327  
329   - $Job_titles = Job_title::query()->where('is_remove', '=', '0')->
330   - where('is_bd', '=' , '1')->
331   - OrderByDesc('sort')->OrderBy('name')->get();
332   -
  328 + $Job_titles = Job_title::query()->where('is_remove', '=', '0')
  329 + ->where('is_bd', '=' , '1')
  330 + ->OrderByDesc('sort')->OrderBy('name')
  331 + ->get();
333 332  
334 333 $stat = Static_worker::query()->where('year_month', '=', $get_date)
335 334 ->where('user_id', '=', $id)
... ... @@ -781,16 +780,22 @@ class WorkerController extends Controller
781 780 $Query = Ad_employer::query()->where('id', '=', '0');
782 781 }
783 782  
784   - $Query = $Query->with('jobs')->
785   - with('cat')->
786   - with('employer')->
787   - whereHas('jobs_code', function ($query) use ($request) {
788   - if ($request->ajax()) {
789   - if (null !== ($request->get('job'))) {
790   - $query->where('job_title_id', $request->get('job'));
  783 + $Query = $Query->with(['jobs', 'cat', 'employer'])
  784 + ->whereHas('jobs_code', function ($query) use ($request) {
  785 + if ($request->ajax()) {
  786 + if (null !== ($request->get('job'))) {
  787 + $query->where('job_title_id', $request->get('job'));
  788 + }
791 789 }
792   - }
793   - })->select('ad_employers.*');
  790 + })
  791 + ->select('ad_employers.*');
  792 +
  793 + if ($request->get('search') !== null) {
  794 + $search = $request->get('search');
  795 + $Query->where('name', 'LIKE', "%$search%");
  796 + }
  797 +
  798 + //dd($Query->get());
794 799  
795 800 $Job_title = Job_title::query()->OrderBy('name')->get();
796 801  
... ... @@ -798,7 +803,6 @@ class WorkerController extends Controller
798 803  
799 804 $Query = $Query->OrderBy('updated_at')->paginate(3);
800 805  
801   -
802 806 return view('workers.favorite', compact('Query',
803 807 'Query_count',
804 808 'Job_title'));
... ... @@ -56,7 +56,7 @@ return [
56 56 'collation' => 'utf8mb4_unicode_ci',
57 57 'prefix' => '',
58 58 'prefix_indexes' => true,
59   - 'strict' => true,
  59 + //'strict' => true,
60 60 'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
61 61 'options' => extension_loaded('pdo_mysql') ? array_filter([
62 62 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
public/images/sprite.svg
... ... @@ -46,7 +46,7 @@
46 46 </symbol>
47 47  
48 48 <symbol id="arrow" viewBox="0 0 17 31" fill="none">
49   -<path d="M1.5 2L15 15.5L1.5 29" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
  49 +<path d="M1.5 2L15 15.5L1.5 29" stroke="#377d87" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
50 50 </symbol>
51 51  
52 52 <symbol id="arrow-top" viewBox="0 0 13 7" fill="none">
... ... @@ -126,7 +126,7 @@
126 126 </symbol>
127 127  
128 128 <symbol id="clip" viewBox="0 0 11 16" fill="none">
129   -<path d="M1 5.02548V10.9091C1 12.0664 1.45153 13.1763 2.25526 13.9947C3.05898 14.813 4.14907 15.2727 5.28571 15.2727C6.42236 15.2727 7.51244 14.813 8.31617 13.9947C9.1199 13.1763 9.57143 12.0664 9.57143 10.9091V3.63639C9.57143 2.86485 9.27041 2.12491 8.73459 1.57935C8.19877 1.03379 7.47205 0.727295 6.71429 0.727295C5.95652 0.727295 5.2298 1.03379 4.69398 1.57935C4.15816 2.12491 3.85714 2.86485 3.85714 3.63639V10.3142C3.85714 10.5052 3.89409 10.6944 3.96589 10.8708C4.03768 11.0473 4.14291 11.2077 4.27556 11.3427C4.40822 11.4778 4.5657 11.5849 4.73902 11.658C4.91235 11.7311 5.09811 11.7687 5.28571 11.7687V11.7687C5.66459 11.7687 6.02796 11.6155 6.29587 11.3427C6.56378 11.0699 6.71429 10.7 6.71429 10.3142V5.09093" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
  129 +<path d="M1 5.02548V10.9091C1 12.0664 1.45153 13.1763 2.25526 13.9947C3.05898 14.813 4.14907 15.2727 5.28571 15.2727C6.42236 15.2727 7.51244 14.813 8.31617 13.9947C9.1199 13.1763 9.57143 12.0664 9.57143 10.9091V3.63639C9.57143 2.86485 9.27041 2.12491 8.73459 1.57935C8.19877 1.03379 7.47205 0.727295 6.71429 0.727295C5.95652 0.727295 5.2298 1.03379 4.69398 1.57935C4.15816 2.12491 3.85714 2.86485 3.85714 3.63639V10.3142C3.85714 10.5052 3.89409 10.6944 3.96589 10.8708C4.03768 11.0473 4.14291 11.2077 4.27556 11.3427C4.40822 11.4778 4.5657 11.5849 4.73902 11.658C4.91235 11.7311 5.09811 11.7687 5.28571 11.7687V11.7687C5.66459 11.7687 6.02796 11.6155 6.29587 11.3427C6.56378 11.0699 6.71429 10.7 6.71429 10.3142V5.09093" stroke="#377d87" stroke-linecap="round" stroke-linejoin="round"/>
130 130 </symbol>
131 131  
132 132 <symbol id="eye" viewBox="0 0 22 18" fill="none">
resources/views/admin/job_titles/index.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('script')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/chats/chats_list.blade.php
  1 +<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
  2 +<meta http-equiv="Pragma" content="no-cache">
  3 +<meta http-equiv="Expires" content="0">
  4 +
  5 +
1 6 @if ($chats->count() || $admin_chat)
2 7 @csrf
3 8  
... ... @@ -41,7 +46,7 @@
41 46 </div>
42 47 <div class="messages__item-text">
43 48 <div>
44   - <b>
  49 + <b id="chat_name">
45 50 @if ($chat->employer && $chat->employer->name_company)
46 51 {{ $chat->employer->name_company }}
47 52 @else
... ... @@ -65,7 +70,7 @@
65 70 <button class="pin-chat {{ intval($chat->is_fixed) == 1 ? 'pin-on' : 'pin-off' }} mr-15">
66 71 @include('svg.pin_off')
67 72 </button>
68   - <button class="remove-chat" data-fancybox data-src="#remove_chat">
  73 + <button class="remove-chat" data-user="{{ $chat->user_id }}" data-fancybox data-src="#remove_chat">
69 74 <svg>
70 75 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
71 76 </svg>
... ... @@ -115,7 +120,7 @@
115 120 var this_btn = $(this);
116 121 var chat_id = this_btn.closest('.messages__item-actions').data('chat-id');
117 122 var wrap = this_btn.closest('.messages__item');
118   - var target = wrap.find('.messages__item-target').text();
  123 + var target = wrap.find('.messages__item-text').find('#chat_name').text();
119 124  
120 125 $('#remove_chat').data('chat-id', chat_id);
121 126 $('#remove_chat').find('.target-chat').text(target.trim());
resources/views/companies.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/contacts.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/detail_new.blade.php
1 1 @extends('layout.frontend', ['title' => $title.' - РекаМоре'])
2 2 @section('scripts')
3 3 <script>
4   - console.log('Test system');
5 4 $(document).on('change', '#sort_ajax', function() {
6 5 var this_ = $(this);
7 6 var val_ = this_.val();
resources/views/employers/add_vacancy_danger.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('click', '.die_black', function() {
7 6 var this_ = $(this);
8 7 var ajax_ = $('#ajax_flot_div');
resources/views/employers/bd_resume_danger.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('click', '.die_black', function() {
7 6 var this_ = $(this);
8 7 var ajax_ = $('#ajax_flot_div');
resources/views/employers/bd_tupe.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('click', '.die_black', function() {
7 6 var this_ = $(this);
8 7 var ajax_ = $('#ajax_flot_div');
resources/views/employers/cabinet.blade.php
... ... @@ -2,9 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6   -
7   -
8 5 $(document).on('click', '.die_black', function() {
9 6 var this_ = $(this);
10 7 var ajax_ = $('#ajax_flot_div');
resources/views/employers/faq.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/employers/favorite.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/employers/list_answer.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/employers/list_vacancy.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/employers/send_all_danger.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('click', '.die_black', function() {
7 6 var this_ = $(this);
8 7 var ajax_ = $('#ajax_flot_div');
resources/views/info_company.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
resources/views/info_company_new.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#sort_ajax', function() {
7 6 var this_ = $(this);
8 7 var val_ = this_.val();
... ... @@ -78,6 +77,13 @@
78 77 to_user_id.val(code_to_user_id);
79 78 vacancy.val(code_vacancy);
80 79 });
  80 +
  81 + $("#list_button").on('click', function () {
  82 + $('#flot').removeClass('active');
  83 + $('#flot_list').removeClass('showed');
  84 + $('#vacancy').addClass('active');
  85 + $('#vacancy_list').addClass('showed');
  86 + })
81 87 </script>
82 88 @include('js.favorite-vacancy-45')
83 89 @endsection
... ... @@ -109,12 +115,14 @@
109 115 <h1 class="thing__title">{{ $company[0]->name_company }}</h1>
110 116 <!--<p class="thing__text"> $company[0]->text !!}</p>-->
111 117 <div class="thing__buttons">
112   - <button type="button" class="button">
113   - <svg>
114   - <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
115   - </svg>
116   - {{ $company[0]->ads->count() }} вакансии
117   - </button>
  118 + <a href="#vacancy" id="list_button">
  119 + <button type="button" class="button">
  120 + <svg>
  121 + <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
  122 + </svg>
  123 + {{ $company[0]->ads->count() }} вакансии
  124 + </button>
  125 + </a>
118 126 @if ($user_id == 0)
119 127 <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button">
120 128 Написать сообщение
... ... @@ -186,13 +194,12 @@
186 194 <div>
187 195  
188 196 <div class="main__employer-page-tabs">
189   - <button type="button" class="main__employer-page-tabs-item active"
190   - data-tab="1">Флот</button>
191   - <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button>
  197 + <button id="flot" type="button" class="main__employer-page-tabs-item active" data-tab="1">Флот</button>
  198 + <button id="vacancy" type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button>
192 199 </div>
193 200  
194 201 <div class="main__employer-page-body">
195   - <div class="main__employer-page-body-item showed" data-body="1">
  202 + <div id="flot_list" class="main__employer-page-body-item showed" data-body="1">
196 203 <div class="main__employer-page-one">
197 204 @if ($company[0]->flots->count())
198 205 @foreach ($company[0]->flots as $flot)
... ... @@ -217,7 +224,7 @@
217 224 </div>
218 225 </div>
219 226  
220   - <div class="main__employer-page-body-item" data-body="2">
  227 + <div id="vacancy_list" class="main__employer-page-body-item" data-body="2">
221 228 <div class="main__employer-page-two">
222 229 @foreach ($ads as $job)
223 230 <div class="main__employer-page-two-item">
resources/views/js/captha.blade.php
... ... @@ -7,9 +7,6 @@
7 7 var captha1 = $('#captcha1').html();
8 8 var captha2 = $('#captcha2').html();
9 9  
10   - console.log('captha1='+captha1);
11   - console.log('captha2='+captha2);
12   -
13 10 document.getElementById('captcha1').innerHTML = "";
14 11 document.getElementById('captcha2').innerHTML = "";
15 12 var charsArray =
resources/views/js/favorite-vacancy-45.blade.php
1 1 <script>
2   - console.log('js выполняется...123');
3   -
4 2 $(document).ready(function() {
5 3 $(document).on('click', '.js_vac_favorite', function () {
6 4 var _this = $(this);
... ... @@ -9,7 +7,6 @@
9 7 console.log('active='+id);
10 8  
11 9 if ($( "#"+id ).hasClass( "active" )) {
12   - console.log('Download 41... final');
13 10 $.ajax({
14 11 type: "GET",
15 12 url: "{{ route('like-vacancy') }}",
... ... @@ -28,7 +25,6 @@
28 25 }
29 26 });
30 27 } else {
31   - console.log('Не выполнить условие никогда');
32 28 $.ajax({
33 29 type: "GET",
34 30 url: "{{ route('like-vacancy') }}",
resources/views/js/modals.blade.php
... ... @@ -6,8 +6,6 @@
6 6 //clear the contents of captcha div first
7 7 var captha1 = $('#captcha1').html();
8 8  
9   - console.log('captha1='+captha1);
10   -
11 9 document.getElementById('captcha1').innerHTML = "";
12 10 document.getElementById('captcha2').innerHTML = "";
13 11 var charsArray =
... ... @@ -87,7 +85,6 @@
87 85 }
88 86 }
89 87  
90   - console.log('Test system');
91 88 $(document).on('click', '#button_send', function() {
92 89 var field_login = $('#email_input');
93 90 var field_pwd = $('#password');
resources/views/layout/frontend.blade.php
... ... @@ -108,7 +108,9 @@
108 108 </svg></span>
109 109 </button>
110 110 <div>
  111 + @if (\Illuminate\Support\Facades\Auth::user() === null)
111 112 <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
  113 + @endif
112 114 <a href="{{ route('vacancies') }}">Вакансии</a>
113 115 <!--<a href=" route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>-->
114 116 <a href="{{ route('education') }}">Образование</a>
... ... @@ -127,7 +129,9 @@
127 129 </svg></span>
128 130 </button>
129 131 <div>
  132 + @if (\Illuminate\Support\Facades\Auth::user() === null)
130 133 <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
  134 + @endif
131 135 <!--<a href=" route('register') }}">Регистрация</a>-->
132 136 <a href="{{ route('bd_resume') }}">База резюме</a>
133 137 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
... ... @@ -186,7 +190,9 @@
186 190 <div class="footer__main-col">
187 191 <div class="footer__main-title">Соискателям</div>
188 192 <nav>
  193 + @if (\Illuminate\Support\Facades\Auth::user() === null)
189 194 <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
  195 + @endif
190 196 <a href="{{ route('vacancies') }}">Вакансии</a>
191 197 <!--<a href=" route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>-->
192 198 <a href="{{ route('education') }}">Образование</a>
... ... @@ -200,7 +206,9 @@
200 206 <div class="footer__main-col">
201 207 <div class="footer__main-title">Работодателям</div>
202 208 <nav>
  209 + @if (\Illuminate\Support\Facades\Auth::user() === null)
203 210 <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
  211 + @endif
204 212 <!--<a href=" route('register') }}">Регистрация</a>-->
205 213 <a href="{{ route('bd_resume') }}">База резюме</a>
206 214 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
resources/views/list_vacancies.blade.php
... ... @@ -6,7 +6,6 @@
6 6  
7 7 @section('scripts')
8 8 <script>
9   - console.log('Test system');
10 9 $(document).on('change', '#jobs', function() {
11 10 var val = $(this).val();
12 11 var main_oskar = $('#main_ockar');
resources/views/modals/send_employer.blade.php
1 1 <script>
2   - console.log('Сообщение работнику');
3 2 $(document).on('change', '#btn_send_file', function() {
4 3 var send_name = $('#send_name');
5 4 var send_name_val = send_name.val();
resources/views/modals/send_worker.blade.php
1 1 <script>
2   - console.log('Сообщение работнику');
3 2 $("#form_worker" ).submit(function(event) {
4 3 var val = $(this).val();
5 4 var send_title = $('#send_title');
resources/views/modals/send_worker_new.blade.php
1 1 <script>
2   - console.log('Сообщение работнику');
3 2 $("#form_worker" ).submit(function(event) {
4 3 var val = $(this).val();
5 4 var send_title = $('#send_title');
resources/views/new_sky.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '.jobs', function() {
7 6 var val = $(this).val();
8 7  
resources/views/news-list.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '#jobs', function() {
7 6 var val = $(this).val();
8 7 var main_oskar = $('#Main_Ajax');
resources/views/resume.blade.php
... ... @@ -3,7 +3,6 @@
3 3 @section('scripts')
4 4 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
5 5 <script>
6   - console.log('Test system');
7 6 $(document).on('change', '#jobs', function() {
8 7 var val = $(this).val();
9 8 var main_oskar = $('#main_ockar');
... ... @@ -158,7 +157,6 @@
158 157 </script>
159 158  
160 159 <script>
161   - console.log('Test system');
162 160 $(document).on('change', '.jobs', function() {
163 161 var val = $(this).val();
164 162  
resources/views/vacancies.blade.php
... ... @@ -2,7 +2,6 @@
2 2  
3 3 @section('scripts')
4 4 <script>
5   - console.log('Test system');
6 5 $(document).on('change', '.jobs', function() {
7 6 var val = $(this).val();
8 7  
resources/views/worker.blade.php
... ... @@ -12,7 +12,6 @@
12 12 });
13 13 });
14 14  
15   - console.log('Test system');
16 15 $(document).on('change', '#jobs', function() {
17 16 var val = $(this).val();
18 17 var main_oskar = $('#main_ockar');
resources/views/workers/cabinet.blade.php
... ... @@ -279,7 +279,7 @@
279 279  
280 280 <div class="width100">
281 281 <h4 class="cabinet__h4 mb-10">О себе</h4>
282   - <div>{{ $worker->text }}</div>
  282 + <div style="white-space:break-spaces; word-break: break-word;">{{ $worker->text }}</div>
283 283 </div>
284 284  
285 285 <div class="">