Commit ac8b91cfd96c51dc2321862831795bb868132392

Authored by Андрей Ларионов
1 parent b3d27fa36b

Обновление системы.

Showing 19 changed files with 919 additions and 112 deletions Side-by-side Diff

app/Classes/Capcha.php
... ... @@ -0,0 +1,63 @@
  1 +<?php
  2 +
  3 +
  4 +namespace App\Classes;
  5 +
  6 +
  7 +class Capcha
  8 +{
  9 + public $USE_SESSION;
  10 + public $chars;
  11 + public $length;
  12 +
  13 + function __construct() {
  14 + $this->USE_SESSION = true;
  15 + // 1. Генерируем код капчи
  16 + // 1.1. Устанавливаем символы, из которых будет составляться код капчи
  17 + $this->chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz';
  18 + // 1.2. Количество символов в капче
  19 + $this->length = 6;
  20 + }
  21 +
  22 + public function Release() {
  23 + // 1.3. Генерируем код
  24 + $code = substr(str_shuffle($this->chars), 0, $this->length);
  25 +
  26 + if ($this->USE_SESSION) {
  27 + // 2a. Используем сессию
  28 + session_start();
  29 + $_SESSION['captcha'] = crypt($code, '$1$itchief$7');
  30 + session_write_close();
  31 + } else {
  32 + // 2a. Используем куки (время действия 600 секунд)
  33 + $value = crypt($code, '$1$itchief$7');
  34 + $expires = time() + 600;
  35 + setcookie('captcha', $value, $expires, '/', 'test.ru', false, true);
  36 + }
  37 +
  38 + // 3. Генерируем изображение
  39 + // 3.1. Создаем новое изображение из файла
  40 + $image = imagecreatefrompng(__DIR__ . '/files/bg.png');
  41 + // 3.2 Устанавливаем размер шрифта в пунктах
  42 + $size = 36;
  43 + // 3.3. Создаём цвет, который будет использоваться в изображении
  44 + $color = imagecolorallocate($image, 66, 182, 66);
  45 + // 3.4. Устанавливаем путь к шрифту
  46 + $font = __DIR__ . '/files//oswald.ttf';
  47 + // 3.5 Задаём угол в градусах
  48 + $angle = rand(-10, 10);
  49 + // 3.6. Устанавливаем координаты точки для первого символа текста
  50 + $x = 56;
  51 + $y = 64;
  52 + // 3.7. Наносим текст на изображение
  53 + imagefttext($image, $size, $angle, $x, $y, $color, $font, $code);
  54 + // 3.8 Устанавливаем заголовки
  55 + header('Cache-Control: no-store, must-revalidate');
  56 + header('Expires: 0');
  57 + header('Content-Type: image/png');
  58 + // 3.9. Выводим изображение
  59 + imagepng($image);
  60 + // 3.10. Удаляем изображение
  61 + imagedestroy($image);
  62 + }
  63 +}
app/Http/Controllers/EmployerController.php
... ... @@ -337,8 +337,8 @@ class EmployerController extends Controller
337 337 $params = $request->all();
338 338  
339 339 $rules = [
340   - 'surname' => ['required', 'string', 'max:255'],
341   - 'name_man' => ['required', 'string', 'max:255'],
  340 + //'surname' => ['required', 'string', 'max:255'],
  341 + //'name_man' => ['required', 'string', 'max:255'],
342 342 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
343 343 'name_company' => ['required', 'string', 'max:255'],
344 344 'password' => ['required', 'string', 'min:8'],
... ... @@ -363,7 +363,15 @@ class EmployerController extends Controller
363 363 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
364 364 }
365 365  
366   - $validator = Validator::make($request->all(), $rules, $messages);
  366 + if (empty($request->get('surname'))) {
  367 + $params['surname'] = 'Неизвестно';
  368 + }
  369 +
  370 + if (empty($request->get('name_man'))) {
  371 + $params['name_man'] = 'Неизвестно';
  372 + }
  373 +
  374 + $validator = Validator::make($params, $rules, $messages);
367 375  
368 376 if ($validator->fails()) {
369 377 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
... ... @@ -508,10 +516,14 @@ class EmployerController extends Controller
508 516 // ->whereColumn('locations.document_id', 'documents.id')
509 517 //);
510 518  
  519 +
511 520 $users = User_Model::query()->with('workers');
512   - if (isset($request->find)) {
513   - $find_key = $request->find;
  521 +
  522 + if ($request->has('search')) {
  523 + $find_key = $request->get('search');
514 524 $users = $users->where('name', 'LIKE', "%$find_key%")
  525 + ->orWhere('surname', 'LIKE', "%$find_key%")
  526 + ->orWhere('name_man', 'LIKE', "%$find_key%")
515 527 ->orWhere('email', 'LIKE', "%$find_key%")
516 528 ->orWhere('telephone', 'LIKE', "%$find_key%");
517 529 }
... ... @@ -521,6 +533,7 @@ class EmployerController extends Controller
521 533 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))->
522 534 paginate(5);
523 535  
  536 +
524 537 return view('employers.bd', compact('users'));
525 538 }
526 539  
app/Http/Controllers/MainController.php
... ... @@ -192,16 +192,20 @@ class MainController extends Controller
192 192 else
193 193 $uid = 0;
194 194  
  195 + if ($request->get('job') == 0)
  196 + $job_search = '';
  197 + else
  198 + $job_search = $request->get('job');
  199 +
195 200 $Query = Ad_employer::with('jobs')->
196 201 with('cat')->
197 202 with('employer')->
198   - whereHas('jobs_code', function ($query) use ($request) {
199   - if (null !== ($request->get('job')) && ($request->get('job') !== 0)) {
200   - $query->where('job_title_id', $request->get('job'));
201   - }
202   - })
203   - ->select('ad_employers.*');
204 203  
  204 + whereHas('jobs_code', function ($query) use ($job_search) {
  205 + if (!empty($job_search)) {
  206 + $query->where('job_title_id', $job_search);
  207 + }
  208 + })->select('ad_employers.*');
205 209  
206 210 if (isset($categories->id) && ($categories->id > 0)) {
207 211 $Query = $Query->where('category_id', '=', $categories->id);
... ... @@ -212,8 +216,6 @@ class MainController extends Controller
212 216  
213 217 if ($request->get('sort')) {
214 218 $sort = $request->get('sort');
215   -
216   -
217 219 switch ($sort) {
218 220 case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break;
219 221 case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break;
... ... @@ -232,8 +234,6 @@ class MainController extends Controller
232 234  
233 235 $Reclama = reclame::query()->get();
234 236  
235   -
236   -
237 237 if ($request->ajax()) {
238 238 if ($request->has('title')) {
239 239 return view('ajax.list_category', compact(
app/Http/Controllers/WorkerController.php
... ... @@ -75,6 +75,8 @@ class WorkerController extends Controller
75 75 $idiot = 0;
76 76 }
77 77  
  78 +
  79 +
78 80 $status_work = $this->status_work;
79 81 $resumes = Worker::query()->with('users')->with('job_titles');
80 82 $resumes = $resumes->whereHas('users', function (Builder $query) {
... ... @@ -82,6 +84,15 @@ class WorkerController extends Controller
82 84 ->Where('is_bd', '=', '0');
83 85 });
84 86  
  87 + //dd($request->get('job'));
  88 + if (($request->has('job')) && ($request->get('job') > 0)) {
  89 + $resumes = $resumes->whereHas('job_titles', function(Builder $query) use ($request) {
  90 + $query->Where('job_titles.id', $request->get('job'));
  91 + });
  92 + }
  93 +
  94 + $Job_title = Job_title::query()->get();
  95 +
85 96 if ($request->get('sort')) {
86 97 $sort = $request->get('sort');
87 98 switch ($sort) {
... ... @@ -103,6 +114,8 @@ class WorkerController extends Controller
103 114 }
104 115  
105 116 $res_count = $resumes->count();
  117 + //$resumes = $resumes->get();
  118 +
106 119 $resumes = $resumes->paginate(4);
107 120 if ($request->ajax()) {
108 121 // Условия обставлены
... ... @@ -114,7 +127,7 @@ class WorkerController extends Controller
114 127 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot'));
115 128 }
116 129 } else {
117   - return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot'));
  130 + return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title'));
118 131 }
119 132 }
120 133  
... ... @@ -180,6 +193,21 @@ class WorkerController extends Controller
180 193 return $pdf->stream();
181 194 }
182 195  
  196 + public function resume_download_all() {
  197 + $status_work = $this->status_work;
  198 + $Query = Worker::query()->with('users')->with('job_titles')
  199 + ->with('place_worker')->with('sertificate')->with('prev_company')
  200 + ->with('infobloks');
  201 + //$Query = $Query->where('id', '=', $worker->id);
  202 + $Query = $Query->get()->toArray();
  203 +
  204 + view()->share('Query',$Query);
  205 +
  206 + $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape');
  207 +
  208 + return $pdf->stream();
  209 + }
  210 +
183 211 // Кабинет работника
184 212 public function cabinet(Request $request)
185 213 {
... ... @@ -464,11 +492,12 @@ class WorkerController extends Controller
464 492 }
465 493  
466 494 if (($request->has('politik')) && ($request->get('politik') == 1)) {
467   - $validator = Validator::make($request->all(), $rules, $messages);
  495 + $validator = Validator::make($params, $rules, $messages);
468 496  
469 497 if ($validator->fails()) {
470 498 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
471 499 } else {
  500 +
472 501 $user = $this->create($params);
473 502 event(new Registered($user));
474 503 Auth::guard()->login($user);
... ... @@ -522,7 +551,8 @@ class WorkerController extends Controller
522 551 'telephone' => $data['telephone'],
523 552 'password' => Hash::make($data['password']),
524 553 'pubpassword' => base64_encode($data['password']),
525   - 'email_verified_at' => Carbon::now()
  554 + 'email_verified_at' => Carbon::now(),
  555 + 'is_worker' => $data['is_worker'],
526 556 ]);
527 557 if ($Code_user->id > 0) {
528 558 $Worker = new Worker();
... ... @@ -31,6 +31,7 @@ class User extends Authenticatable
31 31 'is_lookin',
32 32 'is_message',
33 33 'is_public',
  34 + 'is_worker',
34 35 'is_remove',
35 36 'is_ban',
36 37 'is_new',
resources/views/ajax/resume_1.blade.php
  1 +
1 2 @if ($resumes->count())
2 3 @foreach ($resumes as $res)
3 4 <div class="main__resume-base-body-item">
... ... @@ -42,9 +43,20 @@
42 43 </div>
43 44 </div>
44 45 </div>
  46 + <div class="main__employer-page-two-item-tags">
  47 + @if ($res->job_titles->count())
  48 + @if (isset($res->job_titles))
  49 + @foreach ($res->job_titles as $key => $j)
  50 + <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
  51 + @endforeach
  52 + @endif
  53 + @endif
  54 + </div>
45 55 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
46 56 </div>
47 57 @endforeach
48 58  
49 59 {{ $resumes->appends($_GET)->links('paginate') }}
  60 +@else
  61 + <p>По данному запросу ничего не найдено</p>
50 62 @endif
resources/views/ajax/resume_2.blade.php
... ... @@ -42,10 +42,21 @@
42 42 </div>
43 43 </div>
44 44 </div>
  45 + <div class="main__employer-page-two-item-tags">
  46 + @if ($res->job_titles->count())
  47 + @if (isset($res->job_titles))
  48 + @foreach ($res->job_titles as $key => $j)
  49 + <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
  50 + @endforeach
  51 + @endif
  52 + @endif
  53 + </div>
45 54 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в
46 55 резюме</a>
47 56 </div>
48 57 @endforeach
49 58  
50 59 {{ $resumes->appends($_GET)->links('paginate') }}
  60 +@else
  61 + <p>По данному запросу ничего не найдено</p>
51 62 @endif
resources/views/employers/add_vacancy.blade.php
... ... @@ -99,10 +99,10 @@
99 99 </div>
100 100 </div>
101 101  
102   - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
  102 + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none">
103 103 <label class="form-group__label">Зарплата среднестатистическая для вакансии</label>
104 104 <div class="form-group__item">
105   - <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? '' }}" placeholder="Среднестатистическая зарплата">
  105 + <input type="text" class="input" name="salary" id="salary" value="0" placeholder="Среднестатистическая зарплата">
106 106 @error('salary')
107 107 <span class="text-xs text-red-600 dark:text-red-400">
108 108 {{ $message }}
... ... @@ -111,7 +111,7 @@
111 111 </div>
112 112 </div>
113 113  
114   - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
  114 + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none">
115 115 <label class="form-group__label">Город посадки</label>
116 116 <div class="form-group__item">
117 117 <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь">
resources/views/employers/bd.blade.php
... ... @@ -52,7 +52,7 @@
52 52 <div class="cabinet__filters">
53 53 <div class="cabinet__filters-item">
54 54 <form class="search" action="{{ route('employer.bd') }}">
55   - <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" required>
  55 + <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" value="@if (isset($_GET['search'])) {{ $_GET['search'] }} @endif">
56 56 <button type="submit" class="button">Найти</button>
57 57 <span>
58 58 <svg>
... ... @@ -63,7 +63,7 @@
63 63 </div>
64 64  
65 65 <div class="cabinet__filters-item">
66   - <a href="" class="button">
  66 + <a href="{{ route('resume_download_all') }}" class="button">
67 67 <svg>
68 68 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
69 69 </svg>
... ... @@ -72,6 +72,35 @@
72 72 </div>
73 73 </div>
74 74 </div>
  75 +
  76 + <div class="cabinet__body-item">
  77 + <div class="cabinet__table-header">
  78 + <div><!--_if (isset($it->workers[0]->job_titles[0]->name)) _ $it->workers[0]->job_titles[0]->name }}_else Не указано _endif-->
  79 + Позиции работников
  80 + </div>
  81 + <span>
  82 + Всего вакансий найдено:
  83 + <b>{{ $users->count() }}</b>
  84 + </span>
  85 + </div>
  86 + <div class="table table_spoiler">
  87 + <!--<button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more">
  88 + <span>Показать ещё</span>
  89 + <span>Свернуть</span>
  90 + </button>-->
  91 +
  92 + <div class="table__scroll">
  93 + <div class="table__body table__body_min-width">
  94 + <table>
  95 + <thead>
  96 + <tr>
  97 + <th>ФИО соискателя</th>
  98 + <th>Номер телефона</th>
  99 + <th>Электронная<br>почта</th>
  100 + <th>Наличие<br>анкеты</th>
  101 + </tr>
  102 + </thead>
  103 + <tbody>
75 104 @php
76 105 $categories = 0;
77 106  
... ... @@ -87,83 +116,61 @@
87 116 @endif
88 117  
89 118 @if ($i == 0)
90   - <div class="cabinet__body-item">
91   - <div class="cabinet__table-header">
92   - <div>@if (isset($it->workers[0]->job_titles[0]->name)) {{ $it->workers[0]->job_titles[0]->name }}@else Не указано @endif </div>
93   - <span>
94   - Всего вакансий найдено:
95   - <b>{{ $it->workers[0]->count() }}</b>
96   - </span>
97   - </div>
98   - <div class="table table_spoiler">
99   - <button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more">
100   - <span>Показать ещё</span>
101   - <span>Свернуть</span>
102   - </button>
103   -
104   - <div class="table__scroll">
105   - <div class="table__body table__body_min-width">
106   - <table>
107   - <thead>
108   - <tr>
109   - <th>ФИО соискателя</th>
110   - <th>Номер телефона</th>
111   - <th>Электронная<br>почта</th>
112   - <th>Наличие<br>анкеты</th>
113   - <th>Комментарии</th>
114   - </tr>
115   - </thead>
116   - <tbody>
  119 +
117 120 @endif
118   - <tr>
119   - <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td>
120   -
121   - <td>
122   -
123   - @if (!empty($it->workers[0]->telephone))
124   - <a href="tel:{{ $it->workers[0]->telephone }}">
125   - {{ $it->workers[0]->telephone }}
126   - </a>
127   - @else
128   - -
129   - @endif
130   -
131   - @if (!empty($it->workers[0]->telephone2))
132   - <br><a href="tel:{{ $it->workers[0]->telephone2 }}">
133   - {{ $it->workers[0]->telephone2 }}
134   - </a>
135   - @endif
136   - </td>
137   -
138   - <td>
139   - @if (!empty($it->workers[0]->email))
140   - <a href="emailto:{{ $it->workers[0]->email }}">{{ $it->workers[0]->email }}</a>
141   - @else
142   - -
143   - @endif
144   - </td>
145   -
146   - <td>
147   - <a href="" class="table__link">
148   - <svg>
149   - <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
150   - </svg>
151   - Скачать
152   - </a>
153   - </td>
154   - <td>0</td>
155   - </tr>
  121 + <tr>
  122 + <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td>
  123 +
  124 + <td>
  125 +
  126 + @if (!empty($it->workers[0]->telephone))
  127 + <a href="tel:{{ $it->workers[0]->telephone }}">
  128 + {{ $it->workers[0]->telephone }}
  129 + </a>
  130 + @else
  131 + -
  132 + @endif
  133 +
  134 + @if (!empty($it->workers[0]->telephone2))
  135 + <br><a href="tel:{{ $it->workers[0]->telephone2 }}">
  136 + {{ $it->workers[0]->telephone2 }}
  137 + </a>
  138 + @endif
  139 + </td>
  140 +
  141 + <td>
  142 + @if (!empty($it->workers[0]->email))
  143 + <a href="emailto:{{ $it->workers[0]->email }}">{{ $it->workers[0]->email }}</a>
  144 + @else
  145 + -
  146 + @endif
  147 + </td>
  148 +
  149 + <td>
  150 + @if (isset($it->workers[0]->id))
  151 + <a href="{{ route('resume_download', ['worker' => $it->workers[0]->id]) }}" class="table__link">
  152 + <svg>
  153 + <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
  154 + </svg>
  155 + Скачать
  156 + </a>
  157 + @endif
  158 + </td>
  159 + </tr>
156 160 @php $i++ @endphp
157 161  
158   - </tbody>
159   - </table>
160   - </div>
161   - </div>
162   - </div>
163   - </div>
  162 +
164 163 @endif
165 164 @endforeach
166 165 @endif
  166 + </tbody>
  167 + </table>
  168 + </div>
  169 +
  170 + </div>
  171 + </div>
  172 + {{ $users->onEachSide(0)->appends($_GET)->links('paginate') }}
  173 + </div>
167 174 </div>
168 175 </div>
169 176 </div>
resources/views/employers/cabinet45.blade.php
... ... @@ -4,7 +4,7 @@
4 4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 5 <script>
6 6 ClassicEditor
7   - .create( document.querySelector( '#txtarea' ) )
  7 + .create( document.querySelector( '#text' ) )
8 8 .catch( error => {
9 9 console.error( error );
10 10 } );
resources/views/js/captha.blade.php
... ... @@ -0,0 +1,115 @@
  1 +<script>
  2 + var code;
  3 + var code2;
  4 +
  5 + function createCaptcha() {
  6 + //clear the contents of captcha div first
  7 + var captha1 = $('#captcha1').html();
  8 + var captha2 = $('#captcha2').html();
  9 +
  10 + console.log('captha1='+captha1);
  11 + console.log('captha2='+captha2);
  12 +
  13 + document.getElementById('captcha1').innerHTML = "";
  14 + document.getElementById('captcha2').innerHTML = "";
  15 + var charsArray =
  16 + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
  17 + var lengthOtp = 6;
  18 + var captcha = [];
  19 + for (var i = 0; i < lengthOtp; i++) {
  20 + //below code will not allow Repetition of Characters
  21 + var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
  22 + if (captcha.indexOf(charsArray[index]) == -1)
  23 + captcha.push(charsArray[index]);
  24 + else i--;
  25 + }
  26 + var canv = document.createElement("canvas");
  27 + canv.id = "captcha";
  28 + canv.width = 100;
  29 + canv.height = 50;
  30 + var ctx = canv.getContext("2d");
  31 + ctx.font = "25px Georgia";
  32 + ctx.strokeText(captcha.join(""), 0, 30);
  33 + //storing captcha so that can validate you can save it somewhere else according to your specific requirements
  34 + code = captcha.join("");
  35 +
  36 + document.getElementById("captcha1").appendChild(canv);
  37 + // adds the canvas to the body element
  38 +
  39 + createCaptcha2()
  40 + }
  41 +
  42 + function createCaptcha2() {
  43 + //clear the contents of captcha div first
  44 + document.getElementById('captcha2').innerHTML = "";
  45 + var charsArray =
  46 + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
  47 + var lengthOtp = 6;
  48 + var captcha = [];
  49 + for (var i = 0; i < lengthOtp; i++) {
  50 + //below code will not allow Repetition of Characters
  51 + var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
  52 + if (captcha.indexOf(charsArray[index]) == -1)
  53 + captcha.push(charsArray[index]);
  54 + else i--;
  55 + }
  56 + var canv = document.createElement("canvas");
  57 + canv.id = "captcha";
  58 + canv.width = 100;
  59 + canv.height = 50;
  60 + var ctx = canv.getContext("2d");
  61 + ctx.font = "25px Georgia";
  62 + ctx.strokeText(captcha.join(""), 0, 30);
  63 + //storing captcha so that can validate you can save it somewhere else according to your specific requirements
  64 + code2 = captcha.join("");
  65 +
  66 + document.getElementById("captcha2").appendChild(canv);
  67 + // adds the canvas to the body element
  68 + }
  69 +
  70 + function validateCaptcha() {
  71 + if (document.getElementById("cpatchaTextBox").value == code) {
  72 + console.log('Валидная капча 1!');
  73 + }else{
  74 + alert("Неверная капча! Повторите вновь");
  75 + createCaptcha();
  76 + }
  77 + }
  78 +
  79 + function validateCaptcha2() {
  80 + if (document.getElementById("cpatchaTextBox2").value == code2) {
  81 + console.log('Валидная капча 2!');
  82 + }else{
  83 + alert("Неверная капча! Повторите вновь");
  84 + createCaptcha();
  85 + }
  86 + }
  87 +</script>
  88 +
  89 +<script>
  90 + $(document).ready(function() {
  91 + let form1 = document.getElementById('form1');
  92 + form1.addEventListener('submit', function (event) {
  93 + if (document.getElementById("cpatchaTextBox").value == code) {
  94 + console.log('Валидный кот');
  95 + return true;
  96 + } else {
  97 + console.log('Ошибка1');
  98 + event.preventDefault();
  99 + return false;
  100 + }
  101 + });
  102 +
  103 + let form2 = document.getElementById('form2');
  104 + form2.addEventListener('submit', function (event) {
  105 + if (document.getElementById("cpatchaTextBox2").value == code2) {
  106 + console.log('Валидный кот');
  107 + return true;
  108 + } else {
  109 + console.log('Ошибка2');
  110 + event.preventDefault();
  111 + return false;
  112 + }
  113 + });
  114 + });
  115 +</script>
resources/views/js/modals.blade.php
1 1 <script>
  2 + var code;
  3 + var code2;
  4 +
  5 + function createCaptcha() {
  6 + //clear the contents of captcha div first
  7 + var captha1 = $('#captcha1').html();
  8 +
  9 + console.log('captha1='+captha1);
  10 +
  11 + document.getElementById('captcha1').innerHTML = "";
  12 + document.getElementById('captcha2').innerHTML = "";
  13 + var charsArray =
  14 + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
  15 + var lengthOtp = 6;
  16 + var captcha = [];
  17 + for (var i = 0; i < lengthOtp; i++) {
  18 + //below code will not allow Repetition of Characters
  19 + var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
  20 + if (captcha.indexOf(charsArray[index]) == -1)
  21 + captcha.push(charsArray[index]);
  22 + else i--;
  23 + }
  24 + var canv = document.createElement("canvas");
  25 + canv.id = "captcha";
  26 + canv.width = 100;
  27 + canv.height = 50;
  28 + var ctx = canv.getContext("2d");
  29 + ctx.font = "25px Georgia";
  30 + ctx.strokeText(captcha.join(""), 0, 30);
  31 + //storing captcha so that can validate you can save it somewhere else according to your specific requirements
  32 + code = captcha.join("");
  33 +
  34 + document.getElementById("captcha1").appendChild(canv);
  35 + // adds the canvas to the body element
  36 +
  37 + createCaptcha2()
  38 + }
  39 +
  40 + function createCaptcha2() {
  41 + //clear the contents of captcha div first
  42 + document.getElementById('captcha2').innerHTML = "";
  43 +
  44 + var captha2 = $('#captcha2').html();
  45 +
  46 + var charsArray =
  47 + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
  48 + var lengthOtp = 6;
  49 + var captcha = [];
  50 + for (var i = 0; i < lengthOtp; i++) {
  51 + //below code will not allow Repetition of Characters
  52 + var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
  53 + if (captcha.indexOf(charsArray[index]) == -1)
  54 + captcha.push(charsArray[index]);
  55 + else i--;
  56 + }
  57 + var canv = document.createElement("canvas");
  58 + canv.id = "captcha";
  59 + canv.width = 100;
  60 + canv.height = 50;
  61 + var ctx = canv.getContext("2d");
  62 + ctx.font = "25px Georgia";
  63 + ctx.strokeText(captcha.join(""), 0, 30);
  64 + //storing captcha so that can validate you can save it somewhere else according to your specific requirements
  65 + code2 = captcha.join("");
  66 +
  67 + document.getElementById("captcha2").appendChild(canv);
  68 + // adds the canvas to the body element
  69 + }
  70 +
  71 + function validateCaptcha() {
  72 +
  73 + if (document.getElementById("cpatchaTextBox").value == code) {
  74 + console.log('Валидная капча 1!');
  75 + }else{
  76 + alert("Неверная капча! Повторите вновь");
  77 + createCaptcha();
  78 + }
  79 + }
  80 +
  81 + function validateCaptcha2() {
  82 + if (document.getElementById("cpatchaTextBox2").value == code2) {
  83 + console.log('Валидная капча 2!');
  84 + }else{
  85 + alert("Неверная капча! Повторите вновь");
  86 + createCaptcha();
  87 + }
  88 + }
  89 +
2 90 console.log('Test system');
3 91 $(document).on('click', '#button_send', function() {
4 92 var field_login = $('#email_input');
... ... @@ -59,12 +147,25 @@
59 147 var surname2 = field_surname2_worker.val();
60 148  
61 149  
  150 + if (document.getElementById("cpatchaTextBox1").value == code) {
  151 + console.log('Валидный кот');
  152 +
  153 + } else {
  154 + console.log('Ошибка1');
  155 + event.preventDefault();
  156 + $('#block-info').css({'display': 'block'});
  157 + $('#messages_error_reg').html('ERROR: Капча неверная!');
  158 +
  159 + return false;
  160 + }
  161 +
62 162 if (field_politik_worker.attr('checked')) {
63 163 console.log('politik=1');
64 164 politik = 1;
65 165 } else {
66 166 politik = 0;
67 167 console.log('politik=0');
  168 +
68 169 }
69 170  
70 171 console.log('login: '+login+' password: '+pwd);
... ... @@ -123,6 +224,16 @@
123 224 var name_man = field_name_man_employer.val();
124 225 var surname2 = field_surname2_employer.val();
125 226  
  227 + if (document.getElementById("cpatchaTextBox2").value == code2) {
  228 + console.log('Валидный кот');
  229 +
  230 + } else {
  231 + console.log('Ошибка2');
  232 + event.preventDefault();
  233 + $('#block-info').css({'display': 'block'});
  234 + $('#messages_error_reg').html('ERROR: Капча неверная!');
  235 + return false;
  236 + }
126 237  
127 238 console.log('login: '+login+' password: '+pwd);
128 239  
... ... @@ -133,6 +244,7 @@
133 244 politik = 0;
134 245 console.log('politik=0');
135 246 }
  247 +
136 248 $.ajax({
137 249 type: "GET",
138 250 url: "{{ route('register_employer') }}",
... ... @@ -161,8 +273,6 @@
161 273 console.log('Error: ' + data);
162 274 }
163 275 });
164   -
165 276 return false;
166 277 });
167   -
168 278 </script>
resources/views/layout/frontend.blade.php
... ... @@ -17,7 +17,7 @@
17 17 </style>
18 18 </head>
19 19  
20   -<body id="body">
  20 +<body id="body" onload="createCaptcha()">
21 21 <a href="#body" class="to-top js-scroll-to">
22 22 <svg>
23 23 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
... ... @@ -293,10 +293,8 @@
293 293 }
294 294 };
295 295 </script>
296   -@yield('scripts')
297   -
298 296 @include('js.modals')
299   -@include('js.cookies')
300   -
  297 +@include('js.captha')
  298 +@yield('scripts')
301 299 </body>
302 300 </html>
resources/views/layout/pdf-list-people.blade.php
... ... @@ -0,0 +1,350 @@
  1 +<!DOCTYPE html>
  2 +<html lang="ru">
  3 +
  4 +<head>
  5 + <meta charset="utf-8">
  6 + <title>Резюме соискателя</title>
  7 + <meta name="viewport" content="width=device-width,initial-scale=1">
  8 + <meta name="theme-color" content="#377D87">
  9 + <link rel="stylesheet" href="{{ asset('css/style.css') }}">
  10 + <style>
  11 + body {
  12 + font-family:'DejaVu Sans',sans-serif;
  13 + background:#fff;
  14 + font-size:1.6rem;
  15 + font-weight:400;
  16 + color:#363A3F;
  17 + }
  18 +
  19 + .main {
  20 + padding: 30px 0;
  21 + }
  22 +
  23 + .thing {
  24 + color: #3a3b3c;
  25 + /* background-color: #f2f5fc; */
  26 + }
  27 +
  28 + .thing__profile {
  29 +
  30 + }
  31 +
  32 + .thing__profile-photo {
  33 + width: 200px;
  34 + border-radius: 8px;
  35 + float: left;
  36 + margin-right: 20px;
  37 + }
  38 +
  39 + .thing__profile-body {
  40 +
  41 + }
  42 +
  43 + .thing__title {
  44 + width: 100%;
  45 + font-size: 32px;
  46 + font-weight: 700;
  47 + line-height: 1.1;
  48 + margin: 0;
  49 + }
  50 +
  51 + .thing__text {
  52 + font-size: 14px;
  53 + line-height: 1.4;
  54 + margin: 15px 0 0 0;
  55 + }
  56 +
  57 + .main__spoiler {
  58 + margin: 0px 0px 32px 0px;
  59 + }
  60 +
  61 + .main__spoiler-body {
  62 +
  63 + }
  64 +
  65 + .main__table {
  66 + border-collapse: collapse;
  67 + table-layout: fixed;
  68 + font-size: 14px;
  69 + width: 100%;
  70 + background: #ffffff;
  71 + }
  72 +
  73 + .main__table thead {
  74 + color: #ffffff;
  75 + font-size: 16px;
  76 + background-color: #377d87;
  77 + }
  78 +
  79 + .main__table th {
  80 + padding: 8px 16px;
  81 + }
  82 +
  83 + .main__table td {
  84 + width: 40%;
  85 + padding: 8px 16px;
  86 + border: 1px solid #cecece;
  87 + }
  88 +
  89 + .main__table td b {
  90 + font-weight: 700;
  91 + }
  92 +
  93 + .main__table b {
  94 + display: block;
  95 + }
  96 +
  97 + .main__table a {
  98 + color: #377d87;
  99 + text-decoration: underline;
  100 + }
  101 +
  102 + .main__table td + td {
  103 + width: 60%;
  104 + }
  105 +
  106 + .main__table_three td {
  107 + width: 25% !important;
  108 + }
  109 +
  110 + .main__table_three td:last-child {
  111 + width: 50% !important;
  112 + }
  113 +
  114 + .main h2 {
  115 + margin: 0;
  116 + font-weight: 700;
  117 + font-size: 30px;
  118 + }
  119 +
  120 + .main p {
  121 + margin: 0;
  122 + font-size: 14px;
  123 + line-height: 1.4;
  124 + margin: 15px 0 0 0;
  125 + }
  126 +
  127 + .main__resume-profile-info {
  128 + margin: 30px 0px 0px 0px;
  129 + }
  130 +
  131 + .main__resume-profile-info-title {
  132 + margin-bottom: 20px !important;
  133 + color: #3a3b3c;
  134 + }
  135 +
  136 + .main__resume-profile-info-body-item {
  137 + margin: 0px 0px 20px 0px;
  138 + }
  139 +
  140 + .main__resume-profile-info-body-subtitle {
  141 + color: #4d88d9;
  142 + margin: 0px 0px 10px 0px;
  143 + font-weight: 700;
  144 + font-size: 22px;
  145 + }
  146 +
  147 + .main__resume-profile-info-body-inner {
  148 + margin: 0;
  149 + padding: 0;
  150 + font-size: 12px;
  151 + }
  152 +
  153 + .main__resume-profile-info-body-inner li {
  154 + list-style-type: none;
  155 + margin: 0px 0px 20px 0px;
  156 + }
  157 +
  158 + .main__resume-profile-info-body-inner b {
  159 + display: block;
  160 + margin: 0px 0px 6px 0px;
  161 + color: #377d87;
  162 + font-size: 14px;
  163 + }
  164 +
  165 + .main__resume-profile-info-body-inner span {
  166 + display: block;
  167 + }
  168 +
  169 + .main__resume-profile-info-body-inner a {
  170 + display: block;
  171 + text-decoration: none;
  172 + color: inherit;
  173 + }
  174 +
  175 + </style>
  176 +</head>
  177 +
  178 +<body id="body" class="pdf">
  179 +@if (count($Query) > 0)
  180 + @foreach ($Query as $Q)
  181 +<section class="thing thing_pdf">
  182 + <div class="container">
  183 + <div class="thing__profile">
  184 + <img src="{{ asset(Storage::url($Q['photo'])) }}" alt="" class="thing__profile-photo">
  185 + <div class="thing__profile-body">
  186 + <h1 class="thing__title">@if (isset($Q['users']['surname'])) {{ $Q['users']['surname']." ".$Q['users']['name_man']." ".$Q['users']['surname2'] }} @endif</h1>
  187 + <div style="clear:both;"></div>
  188 + <p class="thing__text">{{ $Q['text'] }}</p>
  189 + </div>
  190 + </div>
  191 + </div>
  192 +</section>
  193 +<main class="main">
  194 + <div class="container">
  195 +
  196 + <!--php dd($Query); endphp-->
  197 +
  198 + <div class="main__resume-profile">
  199 + <div class="main__content">
  200 + <div class="main__spoiler">
  201 +
  202 + <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная
  203 + информация</button> -->
  204 + <div class="main__spoiler-body">
  205 + <table class="main__table">
  206 + <thead>
  207 + <tr>
  208 + <th colspan="2">Основная информация</th>
  209 + </tr>
  210 + </thead>
  211 + <tbody>
  212 + <tr>
  213 + <td>Имя:</td>
  214 + <td><b>@if (isset($Q['users']['name_man'])) {{ $Q['users']['name_man'] }} @endif</b></td>
  215 + </tr>
  216 + <tr>
  217 + <td>Должность:</td>
  218 + <td>
  219 + @foreach ($Q['job_titles'] as $it)
  220 + <b>{{ $it['name'] }}</b><br>
  221 + @endforeach
  222 + </td>
  223 + </tr>
  224 + <tr>
  225 + <td>Телефон:</td>
  226 + <td><b><a>{{ $Q['telephone'] }}</a></b>
  227 + <b><a>{{ $Q['telephone2'] }}</a></b>
  228 + </td>
  229 + </tr>
  230 + <tr>
  231 + <td>E-mail:</td>
  232 + <td><b><a>{{ $Q['email'] }}</a></b></td>
  233 + </tr>
  234 + <tr>
  235 + <td>Возраст:</td>
  236 + <td><b>{{ $Q['old_year'] }}</b></td>
  237 + </tr>
  238 + <tr>
  239 + <td>Статус:</td>
  240 + <td>
  241 + @php $code = $Q['status_work']; @endphp
  242 + <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td>
  243 + </tr>
  244 + <tr>
  245 + <td>Город проживания:</td>
  246 + <td><b>{{ $Q['city'] }}</b></td>
  247 + </tr>
  248 + <tr>
  249 + <td>Уровень английского:</td>
  250 + <td><b>{{ $Q['en_is'] }}</b></td>
  251 + </tr>
  252 + <tr>
  253 + <td>Опыт работы:</td>
  254 + <td><b>{{ $Q['old_year'] }}</b></td>
  255 + </tr>
  256 + </tbody>
  257 + </table>
  258 + </div>
  259 + </div>
  260 + <div class="main__spoiler">
  261 + <div class="main__spoiler-body">
  262 + <table class="main__table">
  263 + <thead>
  264 + <tr>
  265 + <th colspan="2">Сертификаты / документы</th>
  266 + </tr>
  267 + </thead>
  268 + <tbody>
  269 + @if (count($Q['sertificate']))
  270 + @foreach($Q['sertificate'] as $it)
  271 + <tr>
  272 + <td>{{ $it['name']." ".$it['education'] }}</td>
  273 + <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td>
  274 + </tr>
  275 + @endforeach
  276 + @else
  277 + <tr>
  278 + <td> - </td>
  279 + <td> - </td>
  280 + </tr>
  281 + @endif
  282 + </tbody>
  283 + </table>
  284 + </div>
  285 + </div>
  286 + <div class="main__spoiler">
  287 + <div class="main__spoiler-body">
  288 + <table class="main__table main__table_three">
  289 + <thead>
  290 + <tr>
  291 + <th colspan="3">Опыт работы</th>
  292 + </tr>
  293 + </thead>
  294 + <tbody>
  295 + @if (count($Q['place_worker']) > 0)
  296 + @foreach($Q['place_worker'] as $it)
  297 + <tr>
  298 + <td>{{ $it['begin_work']." - ".$it['end_work'] }}
  299 + </td>
  300 + <td><b>{{ $it['name_company'] }}</b>
  301 + </td>
  302 + <td><b>{{ $it['job_title'] }}</b>
  303 + Судно: {{ $it['teplohod'] }}
  304 + </td>
  305 + </tr>
  306 + @endforeach
  307 + @endif
  308 + </tbody>
  309 + </table>
  310 + </div>
  311 + </div>
  312 + </div>
  313 + <div class="main__resume-profile-about">
  314 + <h2 class="main__resume-profile-about-title">О себе</h2>
  315 + <p class="main__resume-profile-about-text">{{ $Q['text'] }}</p>
  316 +
  317 + </div>
  318 + <div class="main__resume-profile-info">
  319 + <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2>
  320 + <div class="main__resume-profile-info-body">
  321 + @if ((isset($Q['prev_company'])) && (count($Q['prev_company']) > 0))
  322 + @foreach ($Q['prev_company'] as $it)
  323 + <div class="main__resume-profile-info-body-item">
  324 + <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3>
  325 + <ul class="main__resume-profile-info-body-inner">
  326 + <li>
  327 + <b>Руководитель</b>
  328 + <span>{{ $it['direct'] }}</span>
  329 + </li>
  330 + <li>
  331 + <b>Телефон того, кто может дать рекомендацию</b>
  332 + <span>
  333 + <a>{{ $it['telephone'] }}</a>
  334 + <a>{{ $it['telephone2'] }}</a>
  335 + </span>
  336 + </li>
  337 + </ul>
  338 + </div>
  339 + @endforeach
  340 + @endif
  341 + </div>
  342 + </div>
  343 + </div>
  344 +
  345 + </div>
  346 +</main>
  347 + @endforeach
  348 +@endif
  349 +</body>
  350 +</html>
resources/views/list_vacancies.blade.php
... ... @@ -292,7 +292,7 @@
292 292 @php $i++ @endphp
293 293 @endforeach
294 294 <div style="margin-top: 20px">
295   - {{ $Query->appends($_GET)->links('paginate') }}
  295 + {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }}
296 296 </div><!-- конец -->
297 297  
298 298 </div>
resources/views/modals/register.blade.php
  1 +<style>
  2 + #captcha {
  3 + background-color: #d0d0d0;
  4 + }
  5 +
  6 + #captcha2 {
  7 + background-color: #d0d0d0;
  8 + }
  9 +</style>
1 10 <div id="reg" class="modal">
2 11 <div class="modal__body">
3 12 <div class="modal__title left">Регистрация</div>
... ... @@ -11,7 +20,8 @@
11 20 <button type="button" class="modal__tabs-item button button_light active" data-tab="1">Кандидат</button>
12 21 <button type="button" class="modal__tabs-item button button_light" data-tab="2">Работодатель</button>
13 22 </div>
14   - <form class="modal__reg showed" data-body="1">
  23 + <div class="modal__reg showed" data-body="1" id="form1" name="form1" onsubmit="-validateCaptcha()">
  24 + <input type="hidden" name="is_worker" id="is_worker" value="1"/>
15 25 <div class="modal__reg-item form-group">
16 26 <label class="form-group__label">Электронная почта</label>
17 27 <div class="form-group__item">
... ... @@ -102,6 +112,8 @@
102 112 <!--<div class="modal__reg-item">
103 113 <img src="images/catpcha.jpg" alt="" class="captcha">
104 114 </div>-->
  115 + <div id="captcha1" style="width:190px" class="modal__reg-item form-group">321</div>
  116 + <input type="text" placeholder="Captcha" class="input registr-form__input" id="cpatchaTextBox1" style="width: 100%"/>
105 117  
106 118 <div class="modal__reg-item">
107 119 <label class="checkbox">
... ... @@ -119,9 +131,9 @@
119 131 </label>
120 132 </div>
121 133 <button type="submit" id="button_reg_worker" name="button_reg_worker" class="button">Зарегистрироваться</button>
122   - </form>
  134 + </div>
123 135  
124   - <form class="modal__reg" data-body="2">
  136 + <div class="modal__reg" data-body="2" id="form2" name="name2" onsubmit="_validateCaptcha2()">
125 137 <div class="modal__reg-item form-group">
126 138 <label class="form-group__label">Электронная почта</label>
127 139 <div class="form-group__item">
... ... @@ -196,6 +208,9 @@
196 208 <img src="images/catpcha.jpg" alt="" class="captcha">
197 209 </div>-->
198 210  
  211 + <div id="captcha2" style="width:190px" class="modal__reg-item form-group">123</div>
  212 + <input type="text" placeholder="Captcha" class="input registr-form__input" id="cpatchaTextBox2" style="width: 100%"/>
  213 +
199 214 <div class="modal__reg-item">
200 215 <label class="checkbox">
201 216 <input type="checkbox" name="politik_employer" id="politik_employer" value="1" class="checkbox__input" required>
... ... @@ -212,7 +227,7 @@
212 227 </label>
213 228 </div>
214 229 <button type="submit" id="button_reg_employer" name="button_reg_employer" class="button">Зарегистрироваться</button>
215   - </form>
  230 + </div>
216 231 <div class="modal__text">
217 232 <span>Вспомнили пароль?</span>
218 233 &nbsp;
resources/views/resume.blade.php
... ... @@ -190,6 +190,51 @@
190 190 }
191 191 });
192 192 </script>
  193 +
  194 + <script>
  195 + console.log('Test system');
  196 + $(document).on('change', '.jobs', function() {
  197 + var val = $(this).val();
  198 +
  199 + console.log('Click filter вакансии...');
  200 + $.ajax({
  201 + type: "GET",
  202 + url: "{{ route('bd_resume') }}",
  203 + data: "job="+val+'&block=1',
  204 + success: function (data) {
  205 + console.log('Выбор должности');
  206 + console.log(data);
  207 + $('#block1').html(data);
  208 + history.pushState({}, '', "{{ route('bd_resume') }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
  209 + },
  210 + headers: {
  211 + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  212 + },
  213 + error: function (data) {
  214 + data = JSON.stringify(data);
  215 + console.log('Error: ' + data);
  216 + }
  217 + });
  218 +
  219 + $.ajax({
  220 + type: "GET",
  221 + url: "{{ route('bd_resume') }}",
  222 + data: "job="+val+'&block=2',
  223 + success: function (data) {
  224 + console.log('Выбор должности');
  225 + console.log(data);
  226 + $('#block2').html(data);
  227 + },
  228 + headers: {
  229 + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  230 + },
  231 + error: function (data) {
  232 + data = JSON.stringify(data);
  233 + console.log('Error: ' + data);
  234 + }
  235 + });
  236 + });
  237 + </script>
193 238 @include('js.favorite-worker')
194 239 @endsection
195 240  
... ... @@ -205,7 +250,7 @@
205 250 <h1 class="thing__title">База резюме</h1>
206 251 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
207 252 существующих финансовых и административных условий.</p>
208   - <div class="search thing__search">
  253 + <!--<div class="search thing__search">
209 254 <input type="search" class="input" name="search" id="search" placeholder="Введите наименование должности" required>
210 255 <button type="submit" class="button">Найти</button>
211 256 <span>
... ... @@ -213,12 +258,29 @@
213 258 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
214 259 </svg>
215 260 </span>
  261 + </div>-->
  262 +
  263 + <div class="select select_search thing__select">
  264 + <div class="select__icon">
  265 + <svg>
  266 + <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
  267 + </svg>
  268 + </div>
  269 + <select class="js-select2 jobs" name="search" id="search">
  270 + <option value="0">Выберите должность</option>
  271 + @if($Job_title->count())
  272 + @foreach($Job_title as $JT)
  273 + <option value="{{ $JT->id }}" @if (isset($_GET['job'])) @if($_GET['job'] == $JT->id) selected @endif @endif>{{ $JT->name }}</option>
  274 + @endforeach
  275 + @endif
  276 + </select>
216 277 </div>
217   - <label class="checkbox thing__checkbox">
  278 +
  279 + <!--<label class="checkbox thing__checkbox">
218 280 <input type="checkbox" class="checkbox__input" name="experience" id="experience">
219 281 <span class="checkbox__icon">
220 282 <svg>
221   - <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
  283 + <use xlink:href=" asset('images/sprite.svg#v') }}"></use>
222 284 </svg>
223 285 </span>
224 286 <span class="checkbox__text">
... ... @@ -226,7 +288,7 @@
226 288 Опыт работы
227 289 </span>
228 290 </span>
229   - </label>
  291 + </label>-->
230 292 </form>
231 293 </div>
232 294 </section>
... ... @@ -304,11 +366,22 @@
304 366 </div>
305 367 </div>
306 368 </div>
  369 + <div class="main__employer-page-two-item-tags">
  370 + @if ($res->job_titles->count())
  371 + @if (isset($res->job_titles))
  372 + @foreach ($res->job_titles as $key => $j)
  373 + <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
  374 + @endforeach
  375 + @endif
  376 + @endif
  377 + </div>
307 378 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
308 379 </div>
309 380 @endforeach
310 381  
311 382 {{ $resumes->appends($_GET)->links('paginate') }}
  383 + @else
  384 + <p>По данному запросу ничего не найдено</p>
312 385 @endif
313 386 </div>
314 387 </div>
resources/views/worker.blade.php
... ... @@ -79,7 +79,13 @@
79 79 </tr>
80 80 <tr>
81 81 <td>Должность:</td>
82   - <td><b>@if (isset($Query[0]->job_titles[0]->name)) {{ $Query[0]->job_titles[0]->name }} @else Не указано @endif</b></td>
  82 + <td>
  83 + @if ($Query[0]->job_titles->count())
  84 + @foreach ($Query[0]->job_titles as $it)
  85 + <b>{{ $it->name }}</b>
  86 + @endforeach
  87 + @endif
  88 + </td>
83 89 </tr>
84 90 <tr>
85 91 <td>Телефон:</td>
... ... @@ -452,6 +452,9 @@ Route::get(&#39;resume-profile/{worker}&#39;, [WorkerController::class, &#39;resume_profile&#39;
452 452  
453 453 //Скачать резюме
454 454 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
  455 +Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2');
  456 +Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all');
  457 +
455 458  
456 459 //Вход в кабинет
457 460 Route::get('login', [MainController::class, 'input_login'])->name('login');