Commit b950f39563d56591a13ba256e556f9bbb3a14d9a
1 parent
f36e2a6312
Exists in
master
Обновление по проекту
Showing 33 changed files with 1627 additions and 387 deletions Side-by-side Diff
- app/Classes/Capcha.php
- app/Http/Controllers/Admin/AdminController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/RequestAdminNews.php
- app/Models/User.php
- resources/views/admin/news/add.blade.php
- resources/views/admin/news/edit.blade.php
- resources/views/admin/news/form.blade.php
- resources/views/admin/news/list.blade.php
- resources/views/ajax/resume_1.blade.php
- resources/views/ajax/resume_2.blade.php
- resources/views/employers/add_vacancy.blade.php
- resources/views/employers/bd.blade.php
- resources/views/employers/cabinet45.blade.php
- resources/views/employers/delete_people.blade.php
- resources/views/employers/fly-flot.blade.php
- resources/views/employers/menu.blade.php
- resources/views/employers/password-reset.blade.php
- resources/views/js/captha.blade.php
- resources/views/js/modals.blade.php
- resources/views/layout/admin.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/layout/pdf-list-people.blade.php
- resources/views/list_vacancies.blade.php
- resources/views/modals/register.blade.php
- resources/views/resume.blade.php
- resources/views/worker.blade.php
- resources/views/workers/ajax/diploms_dop.blade.php
- resources/views/workers/cabinet.blade.php
- resources/views/workers/sertificate_add.blade.php
- routes/web.php
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/Admin/AdminController.php
... | ... | @@ -5,9 +5,11 @@ namespace App\Http\Controllers\Admin; |
5 | 5 | use App\Classes\Tools; |
6 | 6 | use App\Http\Controllers\Controller; |
7 | 7 | use App\Http\Requests\CompanyRequest; |
8 | +use App\Http\Requests\RequestAdminNews; | |
8 | 9 | use App\Http\Requests\RequestPosition; |
9 | 10 | use App\Models\Company; |
10 | 11 | use App\Models\Employer; |
12 | +use App\Models\News; | |
11 | 13 | use App\Models\Positions; |
12 | 14 | use App\Models\User; |
13 | 15 | use Carbon\Carbon; |
... | ... | @@ -378,4 +380,50 @@ class AdminController extends Controller |
378 | 380 | $position->delete(); |
379 | 381 | return redirect()->route('admin.position'); |
380 | 382 | } |
383 | + | |
384 | + public function news_admin() { | |
385 | + $news = News::query()->paginate(10); | |
386 | + return view('admin.news.list', compact('news')); | |
387 | + } | |
388 | + | |
389 | + public function new_admin_add() { | |
390 | + return view('admin.news.add'); | |
391 | + } | |
392 | + | |
393 | + public function new_admin_add_save(RequestAdminNews $request) { | |
394 | + $params = $request->all(); | |
395 | + if ($request->has('image')) { | |
396 | + $params['image'] = $request->file('image')->store('news', 'public'); | |
397 | + } | |
398 | + | |
399 | + News::create($params); | |
400 | + return redirect()->route('admin.news_admin'); | |
401 | + } | |
402 | + | |
403 | + public function new_admin_edit(News $new) { | |
404 | + // Вернуть все | |
405 | + return view('admin.news.edit', compact('new')); | |
406 | + } | |
407 | + | |
408 | + public function new_admin_update_save(RequestAdminNews $request, News $new) { | |
409 | + $params = $request->all(); | |
410 | + if ($request->has('image')) { | |
411 | + if (!empty($request->get('image'))) { | |
412 | + $params['image'] = $request->file('image')->store('news', 'public'); | |
413 | + } else { | |
414 | + if (!empty($new->image)) | |
415 | + $params['image'] = $new->image; | |
416 | + else | |
417 | + unset($params['image']); | |
418 | + } | |
419 | + } | |
420 | + $new->update($params); | |
421 | + return redirect()->route('admin.news_admin'); | |
422 | + } | |
423 | + | |
424 | + public function new_admin_delete(News $new) | |
425 | + { | |
426 | + $new->delete(); | |
427 | + return redirect()->route('admin.news_admin'); | |
428 | + } | |
381 | 429 | } |
app/Http/Controllers/EmployerController.php
... | ... | @@ -75,6 +75,15 @@ class EmployerController extends Controller |
75 | 75 | return view('employers.cabinet45', compact('Employer')); |
76 | 76 | } |
77 | 77 | |
78 | + public function slider_flot() { | |
79 | + $id = Auth()->user()->id; | |
80 | + $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | |
81 | + WhereHas('users', | |
82 | + function (Builder $query) use ($id) {$query->Where('id', $id); | |
83 | + })->get(); | |
84 | + return view('employers.fly-flot', compact('Employer')); | |
85 | + } | |
86 | + | |
78 | 87 | public function cabinet_save(Employer $Employer, Request $request) { |
79 | 88 | $params = $request->all(); |
80 | 89 | $params['user_id'] = Auth()->user()->id; |
... | ... | @@ -101,14 +110,14 @@ class EmployerController extends Controller |
101 | 110 | } |
102 | 111 | Flot::create($params); |
103 | 112 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); |
104 | - return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен'); | |
113 | + return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | |
105 | 114 | } |
106 | 115 | |
107 | 116 | public function delete_flot(Flot $Flot) { |
108 | 117 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); |
109 | 118 | |
110 | 119 | if (isset($Flot->id)) $Flot->delete(); |
111 | - return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален'); | |
120 | + return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); | |
112 | 121 | } |
113 | 122 | |
114 | 123 | // Форма добавления вакансий |
... | ... | @@ -329,8 +338,8 @@ class EmployerController extends Controller |
329 | 338 | $params = $request->all(); |
330 | 339 | |
331 | 340 | $rules = [ |
332 | - 'surname' => ['required', 'string', 'max:255'], | |
333 | - 'name_man' => ['required', 'string', 'max:255'], | |
341 | + //'surname' => ['required', 'string', 'max:255'], | |
342 | + //'name_man' => ['required', 'string', 'max:255'], | |
334 | 343 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
335 | 344 | 'name_company' => ['required', 'string', 'max:255'], |
336 | 345 | 'password' => ['required', 'string', 'min:8'], |
... | ... | @@ -355,7 +364,15 @@ class EmployerController extends Controller |
355 | 364 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
356 | 365 | } |
357 | 366 | |
358 | - $validator = Validator::make($request->all(), $rules, $messages); | |
367 | + if (empty($request->get('surname'))) { | |
368 | + $params['surname'] = 'Неизвестно'; | |
369 | + } | |
370 | + | |
371 | + if (empty($request->get('name_man'))) { | |
372 | + $params['name_man'] = 'Неизвестно'; | |
373 | + } | |
374 | + | |
375 | + $validator = Validator::make($params, $rules, $messages); | |
359 | 376 | |
360 | 377 | if ($validator->fails()) { |
361 | 378 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
... | ... | @@ -500,10 +517,14 @@ class EmployerController extends Controller |
500 | 517 | // ->whereColumn('locations.document_id', 'documents.id') |
501 | 518 | //); |
502 | 519 | |
520 | + | |
503 | 521 | $users = User_Model::query()->with('workers'); |
504 | - if (isset($request->find)) { | |
505 | - $find_key = $request->find; | |
522 | + | |
523 | + if ($request->has('search')) { | |
524 | + $find_key = $request->get('search'); | |
506 | 525 | $users = $users->where('name', 'LIKE', "%$find_key%") |
526 | + ->orWhere('surname', 'LIKE', "%$find_key%") | |
527 | + ->orWhere('name_man', 'LIKE', "%$find_key%") | |
507 | 528 | ->orWhere('email', 'LIKE', "%$find_key%") |
508 | 529 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
509 | 530 | } |
... | ... | @@ -513,6 +534,7 @@ class EmployerController extends Controller |
513 | 534 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> |
514 | 535 | paginate(5); |
515 | 536 | |
537 | + | |
516 | 538 | return view('employers.bd', compact('users')); |
517 | 539 | } |
518 | 540 |
app/Http/Controllers/MainController.php
... | ... | @@ -193,16 +193,20 @@ class MainController extends Controller |
193 | 193 | else |
194 | 194 | $uid = 0; |
195 | 195 | |
196 | + if ($request->get('job') == 0) | |
197 | + $job_search = ''; | |
198 | + else | |
199 | + $job_search = $request->get('job'); | |
200 | + | |
196 | 201 | $Query = Ad_employer::with('jobs')-> |
197 | 202 | with('cat')-> |
198 | 203 | with('employer')-> |
199 | - whereHas('jobs_code', function ($query) use ($request) { | |
200 | - if (null !== ($request->get('job')) && ($request->get('job') !== 0)) { | |
201 | - $query->where('job_title_id', $request->get('job')); | |
202 | - } | |
203 | - }) | |
204 | - ->select('ad_employers.*'); | |
205 | 204 | |
205 | + whereHas('jobs_code', function ($query) use ($job_search) { | |
206 | + if (!empty($job_search)) { | |
207 | + $query->where('job_title_id', $job_search); | |
208 | + } | |
209 | + })->select('ad_employers.*'); | |
206 | 210 | |
207 | 211 | if (isset($categories->id) && ($categories->id > 0)) { |
208 | 212 | $Query = $Query->where('category_id', '=', $categories->id); |
... | ... | @@ -213,8 +217,6 @@ class MainController extends Controller |
213 | 217 | |
214 | 218 | if ($request->get('sort')) { |
215 | 219 | $sort = $request->get('sort'); |
216 | - | |
217 | - | |
218 | 220 | switch ($sort) { |
219 | 221 | case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; |
220 | 222 | case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; |
... | ... | @@ -233,8 +235,6 @@ class MainController extends Controller |
233 | 235 | |
234 | 236 | $Reclama = reclame::query()->get(); |
235 | 237 | |
236 | - | |
237 | - | |
238 | 238 | if ($request->ajax()) { |
239 | 239 | if ($request->has('title')) { |
240 | 240 | return view('ajax.list_category', compact( |
... | ... | @@ -323,7 +323,8 @@ class MainController extends Controller |
323 | 323 | |
324 | 324 | |
325 | 325 | if ($validator->fails()) { |
326 | - return redirect()->route('index')->with('Error', "Email или пароль невалидный"); | |
326 | + return json_encode(Array("ERROR" => "Email или пароль невалидный!")); | |
327 | + //redirect()->route('index')->with('Error', "Email или пароль невалидный"); | |
327 | 328 | } else { |
328 | 329 | $credentials = $request->only('email', 'password'); |
329 | 330 |
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(); |
... | ... | @@ -626,17 +656,29 @@ class WorkerController extends Controller |
626 | 656 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); |
627 | 657 | } |
628 | 658 | |
659 | + // Форма сертификате | |
660 | + public function new_sertificate(Worker $worker) { | |
661 | + return view('workers.sertificate_add', compact('worker')); | |
662 | + } | |
663 | + | |
629 | 664 | // Добавление сертификата |
630 | 665 | public function add_serificate(Request $request) { |
631 | 666 | $params = $request->all(); |
632 | - $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); | |
633 | - $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); | |
667 | + | |
634 | 668 | $Sertificate = new sertification(); |
635 | 669 | $Sertificate->create($params); |
636 | 670 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); |
637 | - return view('ajax.documents', compact('Docs')); | |
671 | + return redirect()->route('worker.cabinet'); | |
672 | + //return view('ajax.documents', compact('Docs')); | |
638 | 673 | } |
639 | 674 | |
675 | + public function delete_diplom(Request $request, Worker $worker) { | |
676 | + $infoblok_id = $request->get('infoblok_id'); | |
677 | + $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); | |
678 | + | |
679 | + //$Infoblocks = infobloks::query()->get(); | |
680 | + return redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); | |
681 | + } | |
640 | 682 | |
641 | 683 | // Удалить сертификат |
642 | 684 | public function delete_sertificate(sertification $doc) { |
app/Http/Requests/RequestAdminNews.php
... | ... | @@ -0,0 +1,30 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace App\Http\Requests; | |
4 | + | |
5 | +use Illuminate\Foundation\Http\FormRequest; | |
6 | + | |
7 | +class RequestAdminNews extends FormRequest | |
8 | +{ | |
9 | + /** | |
10 | + * Determine if the user is authorized to make this request. | |
11 | + * | |
12 | + * @return bool | |
13 | + */ | |
14 | + public function authorize() | |
15 | + { | |
16 | + return true; | |
17 | + } | |
18 | + | |
19 | + /** | |
20 | + * Get the validation rules that apply to the request. | |
21 | + * | |
22 | + * @return array<string, mixed> | |
23 | + */ | |
24 | + public function rules() | |
25 | + { | |
26 | + return [ | |
27 | + // | |
28 | + ]; | |
29 | + } | |
30 | +} |
app/Models/User.php
resources/views/admin/news/add.blade.php
resources/views/admin/news/edit.blade.php
... | ... | @@ -0,0 +1,8 @@ |
1 | +@extends('layout.admin', ['title' => 'Админка - Редактирование новости']) | |
2 | + | |
3 | +@section('content') | |
4 | + <form method="POST" action="{{ route('admin.new_admin_update', ['new' => $new->id]) }}" enctype="multipart/form-data"> | |
5 | + @csrf | |
6 | + @include('admin.news.form') | |
7 | + </form> | |
8 | +@endsection |
resources/views/admin/news/form.blade.php
... | ... | @@ -0,0 +1,77 @@ |
1 | + | |
2 | +<div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | |
3 | + <label class="block text-sm"> | |
4 | + <span class="text-gray-700 dark:text-gray-400">Заголовой новости</span> | |
5 | + <input name="title" id="title" | |
6 | + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
7 | + placeholder="Заголовой новости" value="{{ old('title') ?? (isset($new->title)) ? $new->title : '' }}" | |
8 | + /> | |
9 | + @error('title') | |
10 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
11 | + {{ $message }} | |
12 | + </span> | |
13 | + @enderror | |
14 | + </label><br> | |
15 | + | |
16 | + <label class="block text-sm"> | |
17 | + <span class="text-gray-700 dark:text-gray-400">Код в URL-строке</span> | |
18 | + <input name="slug" id="slug" | |
19 | + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
20 | + placeholder="Код в URL-строке" value="{{ old('slug') ?? (isset($new->slug)) ? $new->slug : '' }}" | |
21 | + /> | |
22 | + @error('slug') | |
23 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
24 | + {{ $message }} | |
25 | + </span> | |
26 | + @enderror | |
27 | + </label><br> | |
28 | + | |
29 | + <label class="block text-sm"> | |
30 | + <span class="text-gray-700 dark:text-gray-400">Текст</span> | |
31 | + <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" id="text" placeholder="Текст (html)" required | |
32 | + rows="10">{{ old('text') ?? $new->text ?? '' }}</textarea> | |
33 | + @error('text') | |
34 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
35 | + {{ $message }} | |
36 | + </span> | |
37 | + @enderror | |
38 | + </label><br> | |
39 | + | |
40 | + <label class="block text-sm"> | |
41 | + <span class="text-gray-700 dark:text-gray-400">Картинка</span> | |
42 | + <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 | |
43 | + dark:bg-gray-700 focus:border-purple-400 | |
44 | + focus:outline-none focus:shadow-outline-purple | |
45 | + dark:text-gray-300 dark:focus:shadow-outline-gray | |
46 | + form-input" | |
47 | + id="image" name="image" accept="image/png, image/jpeg"> | |
48 | + @error('image') | |
49 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
50 | + {{ $message }} | |
51 | + </span> | |
52 | + @enderror | |
53 | + @isset($new->image) | |
54 | + <img src="{{asset(Storage::url($new->image))}}" width="100px"/> | |
55 | + @endisset | |
56 | + | |
57 | + </label><br> | |
58 | + | |
59 | + <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | |
60 | + <div> | |
61 | + <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | |
62 | + Сохранить | |
63 | + </button> | |
64 | + <a href="{{ route('admin.news_admin') }}" | |
65 | + class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" | |
66 | + style="display: -webkit-inline-box; height: 30px!important;" | |
67 | + >Назад</a> | |
68 | + </div> | |
69 | + </div> | |
70 | +</div> | |
71 | +<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> | |
72 | +<script> | |
73 | + CKEDITOR.replace( 'text', { | |
74 | + filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", | |
75 | + filebrowserUploadMethod: 'form' | |
76 | + }); | |
77 | +</script> |
resources/views/admin/news/list.blade.php
... | ... | @@ -0,0 +1,92 @@ |
1 | +@extends('layout.admin', ['title' => 'Админка - Реклама сайта']) | |
2 | + | |
3 | +@section('script') | |
4 | + <script> | |
5 | + $(document).ready(function() { | |
6 | + $(document).on('click', '.btn-eye', function () { | |
7 | + var this_ = $(this); | |
8 | + var status_ = this_.attr('data-status'); | |
9 | + var id_ = this_.attr('data-id'); | |
10 | + var ajax_block = $('#ajax_block'); | |
11 | + | |
12 | + $.ajax({ | |
13 | + type: "GET", | |
14 | + url: "{{ url()->full()}}", | |
15 | + data: "id=" + id_ + "&status=" + status_, | |
16 | + success: function (data) { | |
17 | + console.log('Обновление таблицы '); | |
18 | + //data = JSON.parse(data); | |
19 | + //console.log(data); | |
20 | + ajax_block.html(data); | |
21 | + }, | |
22 | + headers: { | |
23 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
24 | + }, | |
25 | + error: function (data) { | |
26 | + console.log('Error: ' + data); | |
27 | + } | |
28 | + }); | |
29 | + }); | |
30 | + }); | |
31 | + </script> | |
32 | + | |
33 | +@endsection | |
34 | + | |
35 | +@section('modal') | |
36 | + @include('admin.reclames.modal') | |
37 | +@endsection | |
38 | + | |
39 | +@section('search') | |
40 | + | |
41 | +@endsection | |
42 | + | |
43 | +@section('content') | |
44 | + | |
45 | + <a href="{{ route('admin.new_admin_add') }}" style="width: 160px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | |
46 | + Добавить новость | |
47 | + </a> | |
48 | + <br> | |
49 | + | |
50 | + <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | |
51 | + | |
52 | + | |
53 | + <div class="w-full overflow-x-auto"> | |
54 | + <table class="w-full whitespace-no-wrap"> | |
55 | + <thead> | |
56 | + <tr | |
57 | + class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | |
58 | + > | |
59 | + <th class="px-4 py-3">№</th> | |
60 | + <th class="px-4 py-3">Заголовок новости</th> | |
61 | + <th class="px-4 py-3">Дата публикации/редактирования</th> | |
62 | + <th class="px-4 py-3">Редактировать</th> | |
63 | + </tr> | |
64 | + </thead> | |
65 | + <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | |
66 | + @foreach($news as $new) | |
67 | + <tr class="text-gray-700 dark:text-gray-400"> | |
68 | + <td class="px-4 py-3"> | |
69 | + {{$new->id}} | |
70 | + </td> | |
71 | + <td class="px-4 py-3"> | |
72 | + {{$new->title}} | |
73 | + </td> | |
74 | + | |
75 | + <td class="px-4 py-3"> | |
76 | + {{ $new->created_at }} / {{ $new->updated_at }} | |
77 | + </td> | |
78 | + <td class="px-4 py-3 text-sm_"> | |
79 | + <a href="{{ route('admin.new_admin_edit', ['new' => $new->id]) }}" style="float:left">Изменить</a> | | |
80 | + <a href="{{ route('admin.new_admin_delete', ['new' => $new->id]) }}" class="btn_del btn btn-danger">Удалить</a> | |
81 | + </td> | |
82 | + </tr> | |
83 | + @endforeach | |
84 | + </tbody> | |
85 | + </table> | |
86 | + </div> | |
87 | + | |
88 | + <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | |
89 | + <?=$news->appends($_GET)->links('admin.pagginate'); ?> | |
90 | + </div> | |
91 | + </div> | |
92 | +@endsection |
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="Поиск…" required> | |
55 | + <input type="search" name="search" id="search" class="input" placeholder="Поиск…" 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
1 | -@extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре']) | |
1 | +@extends('layout.frontend', ['title' => 'Кабинет работодателя - РекаМоре']) | |
2 | 2 | |
3 | 3 | @section('scripts') |
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 | } ); |
... | ... | @@ -159,142 +159,6 @@ |
159 | 159 | <button type="submit" class="button cabinet__submit">Сохранить изменения</button> |
160 | 160 | </form> |
161 | 161 | |
162 | - <div class="cabinet__body-item"> | |
163 | - <div class="cabinet__descr"> | |
164 | - <h2 class="title cabinet__title">Мой флот</h2> | |
165 | - </div> | |
166 | - | |
167 | - <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> | |
168 | - @csrf | |
169 | - <label class="cabinet__add-pic" style="vertical-align: top"> | |
170 | - <input type="file" name="image" id="image"> | |
171 | - @error('image') | |
172 | - <span class="text-xs text-red-600"> | |
173 | - {{ $message }} | |
174 | - </span> | |
175 | - @enderror | |
176 | - <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> | |
177 | - <svg> | |
178 | - <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | |
179 | - </svg> | |
180 | - <span> | |
181 | - <svg> | |
182 | - <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | |
183 | - </svg> | |
184 | - Загрузить фото | |
185 | - </span> | |
186 | - </label> | |
187 | - | |
188 | - <div class="cabinet__add-body"> | |
189 | - <div class="form-group"> | |
190 | - <label class="form-group__label">Название корабля</label> | |
191 | - <div class="form-group__item"> | |
192 | - <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> | |
193 | - @error('name') | |
194 | - <span class="text-xs text-red-600"> | |
195 | - {{ $message }} | |
196 | - </span> | |
197 | - @enderror | |
198 | - </div> | |
199 | - </div> | |
200 | - <div class="form-group"> | |
201 | - <label class="form-group__label">Описание</label> | |
202 | - <div class="form-group__item"> | |
203 | - <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> | |
204 | - @error('text') | |
205 | - <span class="text-xs text-red-600"> | |
206 | - {{ $message }} | |
207 | - </span> | |
208 | - @enderror | |
209 | - </div> | |
210 | - </div> | |
211 | - <div class="form-group"> | |
212 | - <label class="form-group__label">Регион</label> | |
213 | - <div class="form-group__item"> | |
214 | - <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> | |
215 | - @error('region') | |
216 | - <span class="text-xs text-red-600"> | |
217 | - {{ $message }} | |
218 | - </span> | |
219 | - @enderror | |
220 | - </div> | |
221 | - </div> | |
222 | - <div class="form-group"> | |
223 | - <label class="form-group__label">Мощность</label> | |
224 | - <div class="form-group__item"> | |
225 | - <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> | |
226 | - @error('power') | |
227 | - <span class="text-xs text-red-600"> | |
228 | - {{ $message }} | |
229 | - </span> | |
230 | - @enderror | |
231 | - </div> | |
232 | - </div> | |
233 | - <div class="form-group"> | |
234 | - <label class="form-group__label">DWT</label> | |
235 | - <div class="form-group__item"> | |
236 | - <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т"> | |
237 | - @error('DWT') | |
238 | - <span class="text-xs text-red-600"> | |
239 | - {{ $message }} | |
240 | - </span> | |
241 | - @enderror | |
242 | - </div> | |
243 | - </div> | |
244 | - <div class="form-group"> | |
245 | - <label class="form-group__label">Мощность ГД</label> | |
246 | - <div class="form-group__item"> | |
247 | - <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт"> | |
248 | - @error('POWER_GD') | |
249 | - <span class="text-xs text-red-600"> | |
250 | - {{ $message }} | |
251 | - </span> | |
252 | - @enderror | |
253 | - </div> | |
254 | - </div> | |
255 | - <div class="form-group"> | |
256 | - <label class="form-group__label">IMO</label> | |
257 | - <div class="form-group__item"> | |
258 | - <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275"> | |
259 | - @error('IMO') | |
260 | - <span class="text-xs text-red-600"> | |
261 | - {{ $message }} | |
262 | - </span> | |
263 | - @enderror | |
264 | - </div> | |
265 | - </div> | |
266 | - <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> | |
267 | - </div> | |
268 | - | |
269 | - </form> | |
270 | - | |
271 | - <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> | |
272 | - @if (isset($Employer[0]->flots)) | |
273 | - @if ($Employer[0]->flots->count()) | |
274 | - @foreach ($Employer[0]->flots as $it) | |
275 | - <div class="cabinet__fleet-item main__employer-page-one-item"> | |
276 | - <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> | |
277 | - <svg> | |
278 | - <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | |
279 | - </svg> | |
280 | - </a> | |
281 | - @if (!empty($it->image)) | |
282 | - <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> | |
283 | - @else | |
284 | - <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> | |
285 | - @endif | |
286 | - <b>{{ $it->name }}</b> | |
287 | - <span>{{ $it->region }}</span> | |
288 | - <span><i>DWT</i>{{ $it->DWT }}</span> | |
289 | - <span><i>Мощность ГД</i>{{ $it->POWER_GD }}</span> | |
290 | - <span><i>IMO</i>{{ $it->IMO }}</span> | |
291 | - <span>{{ $it->power }}</span> | |
292 | - </div> | |
293 | - @endforeach | |
294 | - @endif | |
295 | - @endif | |
296 | - </div> | |
297 | - </div> | |
298 | 162 | </div> |
299 | 163 | </div> |
300 | 164 | </div> |
resources/views/employers/delete_people.blade.php
resources/views/employers/fly-flot.blade.php
... | ... | @@ -0,0 +1,175 @@ |
1 | +@extends('layout.frontend', ['title' => 'Мой флот - РекаМоре']) | |
2 | + | |
3 | +@section('scripts') | |
4 | + <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> | |
5 | + <script> | |
6 | + ClassicEditor | |
7 | + .create( document.querySelector( '#txtarea' ) ) | |
8 | + .catch( error => { | |
9 | + console.error( error ); | |
10 | + } ); | |
11 | + </script> | |
12 | +@endsection | |
13 | +@section('content') | |
14 | + <section class="cabinet"> | |
15 | + <div class="container"> | |
16 | + <ul class="breadcrumbs cabinet__breadcrumbs"> | |
17 | + <li><a href="{{ route('index') }}">Главная</a></li> | |
18 | + <li><b>Личный кабинет</b></li> | |
19 | + </ul> | |
20 | + <div class="cabinet__wrapper"> | |
21 | + <div class="cabinet__side"> | |
22 | + <div class="cabinet__side-toper"> | |
23 | + @include('employers.emblema') | |
24 | + </div> | |
25 | + | |
26 | + @include('employers.menu', ['item' => 12]) | |
27 | + | |
28 | + </div> | |
29 | + <div class="cabinet__body"> | |
30 | + @include('messages_error') | |
31 | + | |
32 | + <div class="cabinet__body-item"> | |
33 | + <div class="cabinet__descr"> | |
34 | + <h2 class="title cabinet__title">Мой флот</h2> | |
35 | + </div> | |
36 | + | |
37 | + <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> | |
38 | + @csrf | |
39 | + <label class="cabinet__add-pic" style="vertical-align: top"> | |
40 | + <input type="file" name="image" id="image"> | |
41 | + @error('image') | |
42 | + <span class="text-xs text-red-600"> | |
43 | + {{ $message }} | |
44 | + </span> | |
45 | + @enderror | |
46 | + <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> | |
47 | + <svg> | |
48 | + <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | |
49 | + </svg> | |
50 | + <span> | |
51 | + <svg> | |
52 | + <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | |
53 | + </svg> | |
54 | + Загрузить фото | |
55 | + </span> | |
56 | + </label> | |
57 | + | |
58 | + <div class="cabinet__add-body"> | |
59 | + <div class="form-group"> | |
60 | + <label class="form-group__label">Название корабля</label> | |
61 | + <div class="form-group__item"> | |
62 | + <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> | |
63 | + @error('name') | |
64 | + <span class="text-xs text-red-600"> | |
65 | + {{ $message }} | |
66 | + </span> | |
67 | + @enderror | |
68 | + </div> | |
69 | + </div> | |
70 | + <div class="form-group"> | |
71 | + <label class="form-group__label">Описание</label> | |
72 | + <div class="form-group__item"> | |
73 | + <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> | |
74 | + @error('text') | |
75 | + <span class="text-xs text-red-600"> | |
76 | + {{ $message }} | |
77 | + </span> | |
78 | + @enderror | |
79 | + </div> | |
80 | + </div> | |
81 | + <div class="form-group"> | |
82 | + <label class="form-group__label">Регион</label> | |
83 | + <div class="form-group__item"> | |
84 | + <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> | |
85 | + @error('region') | |
86 | + <span class="text-xs text-red-600"> | |
87 | + {{ $message }} | |
88 | + </span> | |
89 | + @enderror | |
90 | + </div> | |
91 | + </div> | |
92 | + <div class="form-group"> | |
93 | + <label class="form-group__label">Мощность</label> | |
94 | + <div class="form-group__item"> | |
95 | + <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> | |
96 | + @error('power') | |
97 | + <span class="text-xs text-red-600"> | |
98 | + {{ $message }} | |
99 | + </span> | |
100 | + @enderror | |
101 | + </div> | |
102 | + </div> | |
103 | + <div class="form-group"> | |
104 | + <label class="form-group__label">DWT</label> | |
105 | + <div class="form-group__item"> | |
106 | + <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т"> | |
107 | + @error('DWT') | |
108 | + <span class="text-xs text-red-600"> | |
109 | + {{ $message }} | |
110 | + </span> | |
111 | + @enderror | |
112 | + </div> | |
113 | + </div> | |
114 | + <div class="form-group"> | |
115 | + <label class="form-group__label">Мощность ГД</label> | |
116 | + <div class="form-group__item"> | |
117 | + <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт"> | |
118 | + @error('POWER_GD') | |
119 | + <span class="text-xs text-red-600"> | |
120 | + {{ $message }} | |
121 | + </span> | |
122 | + @enderror | |
123 | + </div> | |
124 | + </div> | |
125 | + <div class="form-group"> | |
126 | + <label class="form-group__label">IMO</label> | |
127 | + <div class="form-group__item"> | |
128 | + <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275"> | |
129 | + @error('IMO') | |
130 | + <span class="text-xs text-red-600"> | |
131 | + {{ $message }} | |
132 | + </span> | |
133 | + @enderror | |
134 | + </div> | |
135 | + </div> | |
136 | + <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> | |
137 | + </div> | |
138 | + | |
139 | + </form> | |
140 | + | |
141 | + <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> | |
142 | + @if (isset($Employer[0]->flots)) | |
143 | + @if ($Employer[0]->flots->count()) | |
144 | + @foreach ($Employer[0]->flots as $it) | |
145 | + <div class="cabinet__fleet-item main__employer-page-one-item"> | |
146 | + <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> | |
147 | + <svg> | |
148 | + <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | |
149 | + </svg> | |
150 | + </a> | |
151 | + @if (!empty($it->image)) | |
152 | + <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> | |
153 | + @else | |
154 | + <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> | |
155 | + @endif | |
156 | + <b>{{ $it->name }}</b> | |
157 | + <span>{{ $it->region }}</span> | |
158 | + <span><i>DWT</i>{{ $it->DWT }}</span> | |
159 | + <span><i>Мощность ГД</i>{{ $it->POWER_GD }}</span> | |
160 | + <span><i>IMO</i>{{ $it->IMO }}</span> | |
161 | + <span>{{ $it->power }}</span> | |
162 | + </div> | |
163 | + @endforeach | |
164 | + @endif | |
165 | + @endif | |
166 | + </div> | |
167 | + </div> | |
168 | + </div> | |
169 | + </div> | |
170 | + </div> | |
171 | + | |
172 | + </section> | |
173 | + </div> | |
174 | + <!-- END TOP WRAPPER --> | |
175 | +@endsection |
resources/views/employers/menu.blade.php
... | ... | @@ -105,11 +105,19 @@ |
105 | 105 | </i> |
106 | 106 | <span>Настройки уведомлений</span> |
107 | 107 | </a> |
108 | - <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==12) active @endif"> | |
108 | + <a href="{{ route('employer.slider_flot') }}" class="cabinet__menu-item @if ($item==12) active @endif"> | |
109 | + <i> | |
110 | + <svg> | |
111 | + <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use> | |
112 | + </svg> | |
113 | + </i> | |
114 | + <span>Мой флот</span> | |
115 | + </a> | |
116 | + <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==13) active @endif"> | |
109 | 117 | <i></i> |
110 | 118 | <span>Сменить пароль</span> |
111 | 119 | </a> |
112 | - <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==13) active @endif"> | |
120 | + <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==14) active @endif"> | |
113 | 121 | <i></i> |
114 | 122 | <span>Удалить профиль</span> |
115 | 123 | </a> |
resources/views/employers/password-reset.blade.php
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/admin.blade.php
... | ... | @@ -487,6 +487,29 @@ |
487 | 487 | @endif |
488 | 488 | @endif |
489 | 489 | @endforeach |
490 | + | |
491 | + | |
492 | + <li class="relative px-6 py-3"> | |
493 | + <a | |
494 | + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.news_admin') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.news_admin') }}" | |
495 | + > | |
496 | + <svg | |
497 | + class="w-5 h-5" | |
498 | + aria-hidden="true" | |
499 | + fill="none" | |
500 | + stroke-linecap="round" | |
501 | + stroke-linejoin="round" | |
502 | + stroke-width="2" | |
503 | + viewBox="0 0 24 24" | |
504 | + stroke="currentColor" | |
505 | + > | |
506 | + <path | |
507 | + d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" | |
508 | + ></path> | |
509 | + </svg> | |
510 | + <span class="ml-4">Новости</span> | |
511 | + </a> | |
512 | + </li> | |
490 | 513 | <!-- Справочники --> |
491 | 514 | |
492 | 515 | <li class="relative px-6 py-3" x-data="{ open1: false }"> |
resources/views/layout/frontend.blade.php
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | </style> |
19 | 19 | </head> |
20 | 20 | |
21 | -<body id="body"> | |
21 | +<body id="body" onload="createCaptcha()"> | |
22 | 22 | <a href="#body" class="to-top js-scroll-to"> |
23 | 23 | <svg> |
24 | 24 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
... | ... | @@ -294,10 +294,8 @@ |
294 | 294 | } |
295 | 295 | }; |
296 | 296 | </script> |
297 | -@yield('scripts') | |
298 | - | |
299 | 297 | @include('js.modals') |
300 | -@include('js.cookies') | |
301 | - | |
298 | +@include('js.captha') | |
299 | +@yield('scripts') | |
302 | 300 | </body> |
303 | 301 | </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
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 | |
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> |
resources/views/workers/ajax/diploms_dop.blade.php
... | ... | @@ -0,0 +1,34 @@ |
1 | +@if (isset($worker->infobloks)) | |
2 | + @if ($worker->infobloks->count()) | |
3 | + @php $i = 1; @endphp | |
4 | + @foreach ($worker->infobloks as $info) | |
5 | + <div class="cabinet__inputs-item form-group"> | |
6 | + <label class="form-group__label">{{ $info->name }}</label> | |
7 | + <div class="form-group__item"> | |
8 | + <div class="select"> | |
9 | + <select data-info="{{ $info->id }}" class="js-select2 sertificates_js"> | |
10 | + <option value="0">Нет</option> | |
11 | + <option value="1" selected>Да</option> | |
12 | + </select> | |
13 | + </div> | |
14 | + </div> | |
15 | + </div> | |
16 | + @php $i++; @endphp | |
17 | + @endforeach | |
18 | + @endif | |
19 | +@endif | |
20 | + | |
21 | +<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
22 | + <label class="form-group__label">Образцы дипломов и документов</label> | |
23 | + <div class="form-group__item"> | |
24 | + <div class="select"> | |
25 | + <select class="js-select2" id="documents" name="documents"> | |
26 | + @if ($Infoblocks->count()) | |
27 | + @foreach ($Infoblocks as $it) | |
28 | + <option value="{{ $it->id }}">{{ $it->name }}</option> | |
29 | + @endforeach | |
30 | + @endif | |
31 | + </select> | |
32 | + </div> | |
33 | + </div> | |
34 | +</div> |
resources/views/workers/cabinet.blade.php
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | @section('scripts') |
4 | 4 | <script> |
5 | 5 | console.log('Test system'); |
6 | - $(document).on('click', '#button_new_doc', function() { | |
6 | + $(document).on('click', '#button_new_doc123', function() { | |
7 | 7 | var this_ = $(this); |
8 | 8 | var val_ = this_.attr('data-val'); |
9 | 9 | var new_diplom = $('#new_diplom'); |
... | ... | @@ -119,6 +119,37 @@ |
119 | 119 | console.log('Возраст не может выполнить такую операцию'); |
120 | 120 | }); |
121 | 121 | |
122 | + $(document).on('change', '.sertificates_js', function() { | |
123 | + var this_ = $(this); | |
124 | + var infoblock_id = this_.attr('data-info'); | |
125 | + var val = this_.val(); | |
126 | + var block = $('#block_sertificate'); | |
127 | + | |
128 | + console.log('infoblok='+infoblock_id); | |
129 | + console.log('val='+val); | |
130 | + if (val==0) { | |
131 | + $.ajax({ | |
132 | + type: "GET", | |
133 | + url: "{{ route('worker.delete_diplom', ['worker' => $Worker[0]->id]) }}", | |
134 | + data: "&infoblok_id=" + infoblock_id, | |
135 | + success: function (data) { | |
136 | + location.url = data; | |
137 | + console.log('Удаление левых документов'); | |
138 | + console.log(data); | |
139 | + window.location.href = data; | |
140 | + //block.html(data); | |
141 | + }, | |
142 | + headers: { | |
143 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
144 | + }, | |
145 | + error: function (data) { | |
146 | + data = JSON.stringify(data); | |
147 | + console.log('Error: ' + data); | |
148 | + } | |
149 | + }); | |
150 | + } | |
151 | + }); | |
152 | + | |
122 | 153 | </script> |
123 | 154 | @endsection |
124 | 155 | |
... | ... | @@ -329,6 +360,21 @@ |
329 | 360 | </div> |
330 | 361 | </div> |
331 | 362 | |
363 | + <div class="cabinet__body-item"> | |
364 | + <h4 class="cabinet__h4">О себе</h4> | |
365 | + <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> | |
366 | + <div class="cabinet__buttons"> | |
367 | + <button type="submit" class="button">Сохранить</button> | |
368 | + <label class="file"> | |
369 | + <span class="file__input"> | |
370 | + <input type="file" name="file" id="file"> | |
371 | + <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else Обновить резюме @endif</span> | |
372 | + </span> | |
373 | + </label> | |
374 | + </div> | |
375 | + </div> | |
376 | + | |
377 | + | |
332 | 378 | <div id="sertificate" name="sertificate"> |
333 | 379 | @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) |
334 | 380 | @php $i = 0; @endphp |
... | ... | @@ -346,7 +392,13 @@ |
346 | 392 | </div> |
347 | 393 | </div> |
348 | 394 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
349 | - <label class="form-group__label">Название сертификата</label> | |
395 | + <label class="form-group__label">Учебное заведение</label> | |
396 | + <div class="form-group__item"> | |
397 | + <input type="text" class="input" value="{{ $it->education }}" disabled> | |
398 | + </div> | |
399 | + </div> | |
400 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
401 | + <label class="form-group__label">Период обучения</label> | |
350 | 402 | <div class="form-group__item"> |
351 | 403 | <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> |
352 | 404 | </div> |
... | ... | @@ -370,43 +422,17 @@ |
370 | 422 | </div> |
371 | 423 | |
372 | 424 | <div class="cabinet__body-item"> |
373 | - <h4 class="cabinet__h4">Добавить сертификат</h4> | |
374 | - <div class="cabinet__inputs"> | |
375 | - <input type="hidden" name="new_id" id="new_id" class="input" value="{{ $Worker[0]->id }}"> | |
376 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
377 | - <label class="form-group__label">Название сертификата</label> | |
378 | - <div class="form-group__item"> | |
379 | - <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании"> | |
380 | - </div> | |
381 | - </div> | |
382 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
383 | - <label class="form-group__label">Дата поступления</label> | |
384 | - <div class="form-group__item"> | |
385 | - <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23"> | |
386 | - </div> | |
387 | - </div> | |
388 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
389 | - <label class="form-group__label">Дата окончания</label> | |
390 | - <div class="form-group__item"> | |
391 | - <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26"> | |
392 | - </div> | |
393 | - </div> | |
394 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
395 | - <label class="form-group__label">Дата окончания</label> | |
396 | - <div class="form-group__item"> | |
397 | - <input type="text" name="education" id="education" class="input" value="Учебное заведение"> | |
398 | - </div> | |
399 | - </div> | |
400 | - <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc"> | |
425 | + | |
426 | + <a class="button button_light" href="{{ route('worker.new_sertificate',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc"> | |
401 | 427 | Добавить сертификат |
402 | - </div> | |
403 | - </div> | |
428 | + </a> | |
429 | + | |
404 | 430 | </div> |
405 | 431 | |
406 | 432 | <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> |
407 | 433 | <h4 class="cabinet__h4">Дополнительная информация</h4> |
408 | - <div class="cabinet__inputs" > | |
409 | - @if (isset($Worker[0]->infobloks)) | |
434 | + <div class="cabinet__inputs" id="block_sertificate"> | |
435 | + @if (isset($Worker[0]->infobloks)) | |
410 | 436 | @if ($Worker[0]->infobloks->count()) |
411 | 437 | @php $i = 1; @endphp |
412 | 438 | @foreach ($Worker[0]->infobloks as $info) |
... | ... | @@ -414,7 +440,7 @@ |
414 | 440 | <label class="form-group__label">{{ $info->name }}</label> |
415 | 441 | <div class="form-group__item"> |
416 | 442 | <div class="select"> |
417 | - <select class="js-select2 sertificates_js"> | |
443 | + <select data-info="{{ $info->id }}" class="js-select2 sertificates_js"> | |
418 | 444 | <option value="0">Нет</option> |
419 | 445 | <option value="1" selected>Да</option> |
420 | 446 | </select> |
... | ... | @@ -426,24 +452,24 @@ |
426 | 452 | @endif |
427 | 453 | @endif |
428 | 454 | |
429 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
455 | + <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
430 | 456 | <label class="form-group__label">Образцы дипломов и документов</label> |
431 | 457 | <div class="form-group__item"> |
432 | 458 | <div class="select"> |
433 | 459 | <select class="js-select2" id="documents" name="documents"> |
434 | - @if ($Infoblocks->count()) | |
435 | - @foreach ($Infoblocks as $it) | |
436 | - <option value="{{ $it->id }}">{{ $it->name }}</option> | |
437 | - @endforeach | |
438 | - @endif | |
460 | + _if ($Infoblocks->count()) | |
461 | + _foreach ($Infoblocks as $it) | |
462 | + <option value="_$it->id }}">_$it->name }}</option> | |
463 | + _endforeach | |
464 | + _endif | |
439 | 465 | </select> |
440 | 466 | </div> |
441 | 467 | </div> |
442 | - </div> | |
443 | - <a href="{{ route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light"> | |
444 | - Добавить документ | |
445 | - </a> | |
468 | + </div>--> | |
446 | 469 | </div> |
470 | + <a href="{{ route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light"> | |
471 | + Добавить документ | |
472 | + </a> | |
447 | 473 | </div> |
448 | 474 | <div class="cabinet__body-item"> |
449 | 475 | <div class="cabinet__works"> |
... | ... | @@ -529,91 +555,10 @@ |
529 | 555 | @php $i++ @endphp |
530 | 556 | @endforeach |
531 | 557 | @endif |
532 | - | |
533 | - <!--<div class="cabinet__works-item"> | |
534 | - <div class="cabinet__works-spoiler"> | |
535 | - <div class="cabinet__works-spoiler-left"> | |
536 | - <div class="cabinet__works-spoiler-text">Новая работа</div> | |
537 | - </div> | |
538 | - <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | |
539 | - <svg> | |
540 | - <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | |
541 | - </svg> | |
542 | - </button> | |
543 | - </div> | |
544 | - <div class="cabinet__works-body"> | |
545 | - <div class="cabinet__inputs"> | |
546 | - <div class="cabinet__inputs-item form-group"> | |
547 | - <label class="form-group__label">Должность</label> | |
548 | - <div class="form-group__item"> | |
549 | - <input type="text" name="new_job_title" id="new_job_title" class="input" value="Не указано"> | |
550 | - </div> | |
551 | - </div> | |
552 | - <div class="cabinet__inputs-item form-group"> | |
553 | - <label class="form-group__label">Опыт работы в танкерном флоте</label> | |
554 | - <div class="form-group__item"> | |
555 | - <select class="js-select2" name="new_job_title" id="new_job_title"> | |
556 | - <option value="0">Нет</option> | |
557 | - <option value="1">Да</option> | |
558 | - </select> | |
559 | - </div> | |
560 | - </div> | |
561 | - <div class="cabinet__inputs-item form-group"> | |
562 | - <label class="form-group__label">Название теплохода</label> | |
563 | - <div class="form-group__item"> | |
564 | - <input type="text" name="new_teplohod" id="new_teplohod" class="input" value="Не указано"> | |
565 | - </div> | |
566 | - </div> | |
567 | - <div class="cabinet__inputs-item form-group"> | |
568 | - <label class="form-group__label">Тип (GWT)</label> | |
569 | - <div class="form-group__item"> | |
570 | - <input type="text" name="new_GWT" id="new_GWT" class="input" value="Не указано"> | |
571 | - </div> | |
572 | - </div> | |
573 | - <div class="cabinet__inputs-item form-group"> | |
574 | - <label class="form-group__label">ГД (кВТ)</label> | |
575 | - <div class="form-group__item"> | |
576 | - <input type="text" name="new_KBT" id="new_KBT" class="input" value="Не указано"> | |
577 | - </div> | |
578 | - </div> | |
579 | - <div class="cabinet__inputs-item form-group"> | |
580 | - <label class="form-group__label">Начало контракта</label> | |
581 | - <div class="form-group__item"> | |
582 | - <input type="text" name="new_Begin_work" id="new_Begin_work" class="input" value="Не указано"> | |
583 | - </div> | |
584 | - </div> | |
585 | - <div class="cabinet__inputs-item form-group"> | |
586 | - <label class="form-group__label">Окончание контракта</label> | |
587 | - <div class="form-group__item"> | |
588 | - <input type="text" name="new_End_work" id="new_End_work" class="input" value="Не указано"> | |
589 | - </div> | |
590 | - </div> | |
591 | - <div class="cabinet__inputs-item form-group"> | |
592 | - <label class="form-group__label">Название компании</label> | |
593 | - <div class="form-group__item"> | |
594 | - <input type="text" name="new_name_company" id="new_name_company" class="input" value="Не указано"> | |
595 | - </div> | |
596 | - </div> | |
597 | - </div> | |
598 | - </div> | |
599 | - </div>--> | |
600 | - <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add">Новое место работы</a> | |
601 | 558 | </div> |
602 | - </div> | |
603 | - | |
604 | - <div class="cabinet__body-item"> | |
605 | - <h4 class="cabinet__h4">О себе</h4> | |
606 | - <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> | |
607 | - <div class="cabinet__buttons"> | |
608 | - <button type="submit" class="button">Сохранить</button> | |
609 | - <label class="file"> | |
610 | - <span class="file__input"> | |
611 | - <input type="file" name="file" id="file"> | |
612 | - <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else {{ $Worker[0]->file }}@endif</span> | |
613 | - </span> | |
614 | - </label> | |
615 | 559 | </div> |
616 | - </div> | |
560 | + <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add">Новое место работы</a> | |
561 | + | |
617 | 562 | </form> |
618 | 563 | </div> |
619 | 564 | </div> |
resources/views/workers/sertificate_add.blade.php
... | ... | @@ -0,0 +1,88 @@ |
1 | +@extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре']) | |
2 | + | |
3 | +@section('scripts') | |
4 | + <script> | |
5 | + console.log('Test system'); | |
6 | + $(document).on('submit', '#submit_form', function() { | |
7 | + var this_ = $(this); | |
8 | + var new_diplom = $('#name'); | |
9 | + var new_diplom_val = new_diplom.val(); | |
10 | + var new_data_begin = $('#new_data_begin'); | |
11 | + var new_data_begin_val = new_data_begin.val(); | |
12 | + var new_data_end = $('#new_data_end'); | |
13 | + var new_data_end_val = new_data_end.val(); | |
14 | + var education = $('#education'); | |
15 | + var education_val = education.val(); | |
16 | + var worker_id = $('#new_id'); | |
17 | + var worker_val = worker_id.val(); | |
18 | + | |
19 | + console.log('Валидация формы.'); | |
20 | + | |
21 | + if (new_diplom_val == '') { | |
22 | + new_diplom.addClass('err_red'); | |
23 | + console.log('Border Up'); | |
24 | + return false; | |
25 | + } else { | |
26 | + return true; | |
27 | + } | |
28 | + }); | |
29 | + </script> | |
30 | +@endsection | |
31 | + | |
32 | +@section('content') | |
33 | + <section class="cabinet"> | |
34 | + <div class="container"> | |
35 | + <ul class="breadcrumbs cabinet__breadcrumbs"> | |
36 | + <li><a href="{{ route('index') }}">Главная</a></li> | |
37 | + <li><b>Личный кабинет</b></li> | |
38 | + </ul> | |
39 | + <div class="cabinet__wrapper"> | |
40 | + <div class="cabinet__side"> | |
41 | + <div class="cabinet__side-toper"> | |
42 | + @include('workers.emblema') | |
43 | + | |
44 | + </div> | |
45 | + | |
46 | + @include('workers.menu', ['item' => 1]) | |
47 | + </div> | |
48 | + | |
49 | + <div class="cabinet__body"> | |
50 | + <div class="cabinet__body-item"> | |
51 | + <h4 class="cabinet__h4">Добавить сертификат</h4> | |
52 | + <form id="submit_form" name="submit_form" action="{{ route('worker.add_serificate') }}" class="cabinet__inputs" method="GET"> | |
53 | + @csrf | |
54 | + <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}"> | |
55 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
56 | + <label class="form-group__label">Название сертификата</label> | |
57 | + <div class="form-group__item"> | |
58 | + <input type="text" name="name" id="name" class="input" value="Диплом о дополнительном образовании"> | |
59 | + </div> | |
60 | + </div> | |
61 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
62 | + <label class="form-group__label">Дата поступления</label> | |
63 | + <div class="form-group__item"> | |
64 | + <input type="text" name="date_begin" id="date_begin" class="input" value="01.09.23"> | |
65 | + </div> | |
66 | + </div> | |
67 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
68 | + <label class="form-group__label">Дата окончания</label> | |
69 | + <div class="form-group__item"> | |
70 | + <input type="text" name="end_begin" id="end_begin" class="input" value="04.11.26"> | |
71 | + </div> | |
72 | + </div> | |
73 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
74 | + <label class="form-group__label">Название учебного заведения</label> | |
75 | + <div class="form-group__item"> | |
76 | + <input type="text" name="education" id="education" class="input" value="Учебное заведение"> | |
77 | + </div> | |
78 | + </div> | |
79 | + <button type="submit" class="button">Сохранить</button> | |
80 | + <a href="{{ route('worker.cabinet') }}" class="button">Назад</a> | |
81 | + </form> | |
82 | + </div> | |
83 | + </div> | |
84 | + </div> | |
85 | + </div> | |
86 | + </section> | |
87 | + | |
88 | +@endsection |
routes/web.php
... | ... | @@ -188,6 +188,14 @@ Route::group([ |
188 | 188 | // кабинет настройки сайта сохранение формы |
189 | 189 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
190 | 190 | |
191 | + // кабинет - новости | |
192 | + Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); | |
193 | + Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); | |
194 | + Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); | |
195 | + Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); | |
196 | + Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); | |
197 | + Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); | |
198 | + | |
191 | 199 | // кабинет - пользователи |
192 | 200 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
193 | 201 | |
... | ... | @@ -444,6 +452,9 @@ Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile' |
444 | 452 | |
445 | 453 | //Скачать резюме |
446 | 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 | + | |
447 | 458 | |
448 | 459 | //Вход в кабинет |
449 | 460 | Route::get('login', [MainController::class, 'input_login'])->name('login'); |
... | ... | @@ -505,12 +516,14 @@ Route::group([ |
505 | 516 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); |
506 | 517 | |
507 | 518 | // Добавление сертификата |
519 | + Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); | |
508 | 520 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); |
509 | 521 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); |
510 | 522 | |
511 | 523 | // Добавление документа-диплома |
512 | 524 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); |
513 | 525 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); |
526 | + Route::get('кабинет/delete_diplom/{worker}', [WorkerController::class, 'delete_diplom'])->name('delete_diplom'); | |
514 | 527 | |
515 | 528 | // Добавление стандартного диплома |
516 | 529 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); |
... | ... | @@ -534,6 +547,7 @@ Route::group([ |
534 | 547 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
535 | 548 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); |
536 | 549 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); |
550 | + Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); | |
537 | 551 | |
538 | 552 | // 2 страница - Добавление вакансий |
539 | 553 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); |