Commit b3d27fa36b958bc0610d1bddc5da7e4fba8d661e
1 parent
73330ab088
Exists in
master
and in
1 other branch
Обновление проекта - критические замечания
Showing 18 changed files with 706 additions and 274 deletions Side-by-side Diff
- app/Http/Controllers/Admin/AdminController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/RequestAdminNews.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/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/layout/admin.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/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 | // Форма добавления вакансий |
app/Http/Controllers/WorkerController.php
... | ... | @@ -625,17 +625,29 @@ class WorkerController extends Controller |
625 | 625 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); |
626 | 626 | } |
627 | 627 | |
628 | + // Форма сертификате | |
629 | + public function new_sertificate(Worker $worker) { | |
630 | + return view('workers.sertificate_add', compact('worker')); | |
631 | + } | |
632 | + | |
628 | 633 | // Добавление сертификата |
629 | 634 | public function add_serificate(Request $request) { |
630 | 635 | $params = $request->all(); |
631 | - $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); | |
632 | - $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); | |
636 | + | |
633 | 637 | $Sertificate = new sertification(); |
634 | 638 | $Sertificate->create($params); |
635 | 639 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); |
636 | - return view('ajax.documents', compact('Docs')); | |
640 | + return redirect()->route('worker.cabinet'); | |
641 | + //return view('ajax.documents', compact('Docs')); | |
637 | 642 | } |
638 | 643 | |
644 | + public function delete_diplom(Request $request, Worker $worker) { | |
645 | + $infoblok_id = $request->get('infoblok_id'); | |
646 | + $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); | |
647 | + | |
648 | + //$Infoblocks = infobloks::query()->get(); | |
649 | + return redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); | |
650 | + } | |
639 | 651 | |
640 | 652 | // Удалить сертификат |
641 | 653 | 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 | +} |
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/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> |
... | ... | @@ -157,142 +157,6 @@ |
157 | 157 | <button type="submit" class="button cabinet__submit">Сохранить изменения</button> |
158 | 158 | </form> |
159 | 159 | |
160 | - <div class="cabinet__body-item"> | |
161 | - <div class="cabinet__descr"> | |
162 | - <h2 class="title cabinet__title">Мой флот</h2> | |
163 | - </div> | |
164 | - | |
165 | - <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> | |
166 | - @csrf | |
167 | - <label class="cabinet__add-pic" style="vertical-align: top"> | |
168 | - <input type="file" name="image" id="image"> | |
169 | - @error('image') | |
170 | - <span class="text-xs text-red-600"> | |
171 | - {{ $message }} | |
172 | - </span> | |
173 | - @enderror | |
174 | - <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> | |
175 | - <svg> | |
176 | - <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | |
177 | - </svg> | |
178 | - <span> | |
179 | - <svg> | |
180 | - <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | |
181 | - </svg> | |
182 | - Загрузить фото | |
183 | - </span> | |
184 | - </label> | |
185 | - | |
186 | - <div class="cabinet__add-body"> | |
187 | - <div class="form-group"> | |
188 | - <label class="form-group__label">Название корабля</label> | |
189 | - <div class="form-group__item"> | |
190 | - <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> | |
191 | - @error('name') | |
192 | - <span class="text-xs text-red-600"> | |
193 | - {{ $message }} | |
194 | - </span> | |
195 | - @enderror | |
196 | - </div> | |
197 | - </div> | |
198 | - <div class="form-group"> | |
199 | - <label class="form-group__label">Описание</label> | |
200 | - <div class="form-group__item"> | |
201 | - <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> | |
202 | - @error('text') | |
203 | - <span class="text-xs text-red-600"> | |
204 | - {{ $message }} | |
205 | - </span> | |
206 | - @enderror | |
207 | - </div> | |
208 | - </div> | |
209 | - <div class="form-group"> | |
210 | - <label class="form-group__label">Регион</label> | |
211 | - <div class="form-group__item"> | |
212 | - <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> | |
213 | - @error('region') | |
214 | - <span class="text-xs text-red-600"> | |
215 | - {{ $message }} | |
216 | - </span> | |
217 | - @enderror | |
218 | - </div> | |
219 | - </div> | |
220 | - <div class="form-group"> | |
221 | - <label class="form-group__label">Мощность</label> | |
222 | - <div class="form-group__item"> | |
223 | - <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> | |
224 | - @error('power') | |
225 | - <span class="text-xs text-red-600"> | |
226 | - {{ $message }} | |
227 | - </span> | |
228 | - @enderror | |
229 | - </div> | |
230 | - </div> | |
231 | - <div class="form-group"> | |
232 | - <label class="form-group__label">DWT</label> | |
233 | - <div class="form-group__item"> | |
234 | - <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т"> | |
235 | - @error('DWT') | |
236 | - <span class="text-xs text-red-600"> | |
237 | - {{ $message }} | |
238 | - </span> | |
239 | - @enderror | |
240 | - </div> | |
241 | - </div> | |
242 | - <div class="form-group"> | |
243 | - <label class="form-group__label">Мощность ГД</label> | |
244 | - <div class="form-group__item"> | |
245 | - <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт"> | |
246 | - @error('POWER_GD') | |
247 | - <span class="text-xs text-red-600"> | |
248 | - {{ $message }} | |
249 | - </span> | |
250 | - @enderror | |
251 | - </div> | |
252 | - </div> | |
253 | - <div class="form-group"> | |
254 | - <label class="form-group__label">IMO</label> | |
255 | - <div class="form-group__item"> | |
256 | - <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275"> | |
257 | - @error('IMO') | |
258 | - <span class="text-xs text-red-600"> | |
259 | - {{ $message }} | |
260 | - </span> | |
261 | - @enderror | |
262 | - </div> | |
263 | - </div> | |
264 | - <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> | |
265 | - </div> | |
266 | - | |
267 | - </form> | |
268 | - | |
269 | - <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> | |
270 | - @if (isset($Employer[0]->flots)) | |
271 | - @if ($Employer[0]->flots->count()) | |
272 | - @foreach ($Employer[0]->flots as $it) | |
273 | - <div class="cabinet__fleet-item main__employer-page-one-item"> | |
274 | - <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> | |
275 | - <svg> | |
276 | - <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | |
277 | - </svg> | |
278 | - </a> | |
279 | - @if (!empty($it->image)) | |
280 | - <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> | |
281 | - @else | |
282 | - <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> | |
283 | - @endif | |
284 | - <b>{{ $it->name }}</b> | |
285 | - <span>{{ $it->region }}</span> | |
286 | - <span><i>DWT</i>{{ $it->DWT }}</span> | |
287 | - <span><i>Мощность ГД</i>{{ $it->POWER_GD }}</span> | |
288 | - <span><i>IMO</i>{{ $it->IMO }}</span> | |
289 | - <span>{{ $it->power }}</span> | |
290 | - </div> | |
291 | - @endforeach | |
292 | - @endif | |
293 | - @endif | |
294 | - </div> | |
295 | - </div> | |
296 | 160 | </div> |
297 | 161 | </div> |
298 | 162 | </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/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/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 | |
... | ... | @@ -505,12 +513,14 @@ Route::group([ |
505 | 513 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); |
506 | 514 | |
507 | 515 | // Добавление сертификата |
516 | + Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); | |
508 | 517 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); |
509 | 518 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); |
510 | 519 | |
511 | 520 | // Добавление документа-диплома |
512 | 521 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); |
513 | 522 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); |
523 | + Route::get('кабинет/delete_diplom/{worker}', [WorkerController::class, 'delete_diplom'])->name('delete_diplom'); | |
514 | 524 | |
515 | 525 | // Добавление стандартного диплома |
516 | 526 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); |
... | ... | @@ -534,6 +544,7 @@ Route::group([ |
534 | 544 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
535 | 545 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); |
536 | 546 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); |
547 | + Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); | |
537 | 548 | |
538 | 549 | // 2 страница - Добавление вакансий |
539 | 550 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); |