Commit ad20c698a91ba734fc10b4c8ce749bf4593a6e40
1 parent
b6103c7497
Exists in
master
and in
1 other branch
Результаты на воскресенье 10 марта 2024
Showing 10 changed files with 553 additions and 21 deletions Side-by-side Diff
- app/Http/Controllers/CompanyController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- resources/views/ajax/resume_1.blade.php
- resources/views/ajax/resume_2.blade.php
- resources/views/info_company.blade.php
- resources/views/info_company_new.blade.php
- resources/views/js/modals.blade.php
- resources/views/modals/send_login.blade.php
- resources/views/resume.blade.php
app/Http/Controllers/CompanyController.php
... | ... | @@ -41,10 +41,16 @@ class CompanyController extends Controller |
41 | 41 | } |
42 | 42 | |
43 | 43 | public function info_company(Employer $company) { |
44 | - $user_id = Auth()->user()->id; | |
44 | + if (isset(Auth()->user()->id)) { | |
45 | + $user_id = Auth()->user()->id; | |
46 | + } else { | |
47 | + $user_id = 0; | |
48 | + } | |
45 | 49 | $company = Employer::with('ads')->with('flots')->with('users') |
46 | 50 | ->where('id', '=', $company->id)->get(); |
51 | + | |
47 | 52 | $title = $company[0]->name_company; |
48 | - return view('info_company', compact('company', 'user_id', 'title')); | |
53 | + | |
54 | + return view('info_company_new', compact('company', 'user_id', 'title')); | |
49 | 55 | } |
50 | 56 | } |
app/Http/Controllers/MainController.php
... | ... | @@ -179,6 +179,9 @@ class MainController extends Controller |
179 | 179 | // Вход в личный кабинет |
180 | 180 | public function input_login(Request $request) |
181 | 181 | { |
182 | + $params = $request->all(); | |
183 | + | |
184 | + | |
182 | 185 | $rules = [ |
183 | 186 | 'email' => 'required|string|email', |
184 | 187 | 'password' => 'required|string', |
... | ... | @@ -199,6 +202,7 @@ class MainController extends Controller |
199 | 202 | |
200 | 203 | $validator = Validator::make($request->all(), $rules, $messages); |
201 | 204 | |
205 | + | |
202 | 206 | if ($validator->fails()) { |
203 | 207 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); |
204 | 208 | } else { |
... | ... | @@ -260,6 +264,8 @@ class MainController extends Controller |
260 | 264 | foreach ([$request->get('email')] as $recipient) { |
261 | 265 | Mail::to($recipient)->send(new MailRepair($new_password)); |
262 | 266 | } |
267 | + return redirect()->route('index'); | |
268 | + | |
263 | 269 | } |
264 | 270 | |
265 | 271 | } |
app/Http/Controllers/WorkerController.php
... | ... | @@ -62,7 +62,7 @@ class WorkerController extends Controller |
62 | 62 | } |
63 | 63 | |
64 | 64 | // лист база резюме |
65 | - public function bd_resume() | |
65 | + public function bd_resume(Request $request) | |
66 | 66 | { |
67 | 67 | if (isset(Auth()->user()->id)) { |
68 | 68 | $idiot = Auth()->user()->id; |
... | ... | @@ -71,17 +71,47 @@ class WorkerController extends Controller |
71 | 71 | } |
72 | 72 | |
73 | 73 | $status_work = $this->status_work; |
74 | - $resumes = Worker::query()->with('users')->with('job_titles')-> | |
75 | - WhereHas('users', | |
74 | + $resumes = Worker::query()->with('users')->with('job_titles') | |
75 | + ->WhereHas('users', | |
76 | 76 | function (Builder $query) { |
77 | 77 | $query->Where('is_worker', '=', '1')-> |
78 | 78 | Where('is_bd', '=', '0'); |
79 | - }); | |
79 | + }); | |
80 | + | |
81 | + if ($request->get('sort')) { | |
82 | + $sort = $request->get('sort'); | |
83 | + switch ($sort) { | |
84 | + case 'name_up': | |
85 | + $resumes = $resumes->whereHas('users', function (Builder $query) { | |
86 | + $query = $query->orderBy('surname')->orderBy('id'); | |
87 | + }); | |
88 | + break; | |
89 | + case 'name_down': | |
90 | + $resumes = $resumes->whereHas('users', function (Builder $query) { | |
91 | + $query = $query->orderByDesc('surname')->orderby('id'); | |
92 | + }); | |
93 | + break; | |
94 | + case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; | |
95 | + case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; | |
96 | + case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; | |
97 | + default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; | |
98 | + } | |
99 | + } | |
80 | 100 | |
81 | 101 | $res_count = $resumes->count(); |
82 | - $resumes = $resumes->paginate(5); | |
102 | + $resumes = $resumes->paginate(6); | |
103 | + if ($request->ajax()) { | |
104 | + // Условия обставлены | |
105 | + if ($request->has('block') && ($request->get('block') == 1)) { | |
106 | + return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); | |
107 | + } | |
83 | 108 | |
84 | - return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); | |
109 | + if ($request->has('block') && ($request->get('block') == 2)) { | |
110 | + return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); | |
111 | + } | |
112 | + } else { | |
113 | + return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); | |
114 | + } | |
85 | 115 | } |
86 | 116 | |
87 | 117 | // анкета соискателя |
... | ... | @@ -244,7 +274,7 @@ class WorkerController extends Controller |
244 | 274 | if ($request->get('new_password') == $request->get('new_password2')) |
245 | 275 | if ($request->get('password') !== $request->get('new_password')) { |
246 | 276 | $credentials = $request->only('email', 'password'); |
247 | - if (Auth::attempt($credentials)) { | |
277 | + if (Auth::attempt($credentials, $request->has('save_me'))) { | |
248 | 278 | |
249 | 279 | if (!is_null($use->email_verified_at)){ |
250 | 280 | |
... | ... | @@ -322,9 +352,6 @@ class WorkerController extends Controller |
322 | 352 | ] |
323 | 353 | ]; |
324 | 354 | |
325 | - | |
326 | - | |
327 | - | |
328 | 355 | if ($request->get('password') !== $request->get('confirmed')){ |
329 | 356 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
330 | 357 | } |
resources/views/ajax/resume_1.blade.php
... | ... | @@ -0,0 +1,50 @@ |
1 | +@if ($resumes->count()) | |
2 | + @foreach ($resumes as $res) | |
3 | + <div class="main__resume-base-body-item"> | |
4 | + <div class="main__resume-base-body-item-buttons"> | |
5 | + <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}"> | |
6 | + <svg> | |
7 | + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
8 | + </svg> | |
9 | + </button> | |
10 | + <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> | |
11 | + <svg> | |
12 | + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
13 | + </svg> | |
14 | + </button> | |
15 | + </div> | |
16 | + <div class="main__resume-base-body-item-wrapper"> | |
17 | + <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> | |
18 | + <div class="main__resume-base-body-item-inner"> | |
19 | + <div> | |
20 | + <b>Статус</b> | |
21 | + <span>{{ $status_work[$res->status_work] }}</span> | |
22 | + </div> | |
23 | + <div> | |
24 | + <b>Имя работника</b> | |
25 | + <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> | |
26 | + </div> | |
27 | + <div> | |
28 | + <b>Номер телефона</b> | |
29 | + <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> | |
30 | + </div> | |
31 | + <div> | |
32 | + <b>Электронный адрес</b> | |
33 | + <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> | |
34 | + </div> | |
35 | + <div> | |
36 | + <b>Город проживания</b> | |
37 | + <span>{{ $res->city }}</span> | |
38 | + </div> | |
39 | + <div> | |
40 | + <b>Опыт работы</b> | |
41 | + <span>{{ $res->experience }}</span> | |
42 | + </div> | |
43 | + </div> | |
44 | + </div> | |
45 | + <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a> | |
46 | + </div> | |
47 | + @endforeach | |
48 | + | |
49 | + {{ $resumes->appends($_GET)->links('paginate') }} | |
50 | +@endif |
resources/views/ajax/resume_2.blade.php
... | ... | @@ -0,0 +1,51 @@ |
1 | +@if ($resumes->count()) | |
2 | + @foreach ($resumes as $res) | |
3 | + <div class="main__resume-base-body-item"> | |
4 | + <div class="main__resume-base-body-item-buttons"> | |
5 | + <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}"> | |
6 | + <svg> | |
7 | + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
8 | + </svg> | |
9 | + </button> | |
10 | + <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> | |
11 | + <svg> | |
12 | + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
13 | + </svg> | |
14 | + </button> | |
15 | + </div> | |
16 | + <div class="main__resume-base-body-item-wrapper"> | |
17 | + <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> | |
18 | + <div class="main__resume-base-body-item-inner"> | |
19 | + <div> | |
20 | + <b>Статус</b> | |
21 | + <span>{{ $status_work[$res->status_work] }}</span> | |
22 | + </div> | |
23 | + <div> | |
24 | + <b>Имя работника</b> | |
25 | + <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> | |
26 | + </div> | |
27 | + <div> | |
28 | + <b>Номер телефона</b> | |
29 | + <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> | |
30 | + </div> | |
31 | + <div> | |
32 | + <b>Электронный адрес</b> | |
33 | + <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> | |
34 | + </div> | |
35 | + <div> | |
36 | + <b>Город проживания</b> | |
37 | + <span>{{ $res->city }}</span> | |
38 | + </div> | |
39 | + <div> | |
40 | + <b>Опыт работы</b> | |
41 | + <span>{{ $res->experience }}</span> | |
42 | + </div> | |
43 | + </div> | |
44 | + </div> | |
45 | + <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в | |
46 | + резюме</a> | |
47 | + </div> | |
48 | + @endforeach | |
49 | + | |
50 | + {{ $resumes->appends($_GET)->links('paginate') }} | |
51 | +@endif |
resources/views/info_company.blade.php
... | ... | @@ -226,9 +226,15 @@ |
226 | 226 | <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> |
227 | 227 | </div> |
228 | 228 | <div class="main__employer-page-two-item-buttons"> |
229 | + @if ($user_id == 0) | |
230 | + <button type="button" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}' | |
231 | + class="button main__employer-page-two-item-button js_send_it_button">Оставить | |
232 | + отклик123</button> | |
233 | + @else | |
229 | 234 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $item->job_title->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' |
230 | 235 | class="button main__employer-page-two-item-button js_send_it_button">Оставить |
231 | - отклик</button> | |
236 | + отклик41-42-41</button> | |
237 | + @endif | |
232 | 238 | <!--<a href="#" |
233 | 239 | class="button button_light main__employer-page-two-item-button">Подробнее</a>--> |
234 | 240 | </div> |
resources/views/info_company_new.blade.php
... | ... | @@ -0,0 +1,266 @@ |
1 | +@extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) | |
2 | + | |
3 | +@section('scripts') | |
4 | + <script> | |
5 | + console.log('Test system'); | |
6 | + $(document).on('change', '#sort_ajax', function() { | |
7 | + var this_ = $(this); | |
8 | + var val_ = this_.val(); | |
9 | + console.log('sort items '+val_); | |
10 | + | |
11 | + $.ajax({ | |
12 | + type: "GET", | |
13 | + url: "{{ route('shipping_companies') }}", | |
14 | + data: "sort="+val_+"&block=1", | |
15 | + success: function (data) { | |
16 | + console.log('Выбор сортировки'); | |
17 | + console.log(data); | |
18 | + $('#block_1').html(data); | |
19 | + }, | |
20 | + headers: { | |
21 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
22 | + }, | |
23 | + error: function (data) { | |
24 | + data = JSON.stringify(data); | |
25 | + console.log('Error: ' + data); | |
26 | + } | |
27 | + }); | |
28 | + | |
29 | + $.ajax({ | |
30 | + type: "GET", | |
31 | + url: "{{ route('shipping_companies') }}", | |
32 | + data: "sort="+val_+"&block=2", | |
33 | + success: function (data) { | |
34 | + console.log('Выбор сортировки2'); | |
35 | + console.log(data); | |
36 | + history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | |
37 | + $('#block_2').html(data); | |
38 | + }, | |
39 | + headers: { | |
40 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
41 | + }, | |
42 | + error: function (data) { | |
43 | + data = JSON.stringify(data); | |
44 | + console.log('Error: ' + data); | |
45 | + } | |
46 | + }); | |
47 | + }); | |
48 | + | |
49 | + $(document).ready(function(){ | |
50 | + var sel = $('#select2-sort_ajax-container'); | |
51 | + var key = getUrlParameter('sort'); | |
52 | + | |
53 | + if (key !=='') { | |
54 | + console.log(key); | |
55 | + switch (key) { | |
56 | + case "default": sel.html('Сортировка (по умолчанию)'); break; | |
57 | + case "name_up": sel.html('По имени (возрастание)'); break; | |
58 | + case "name_down": sel.html('По дате (убывание)'); break; | |
59 | + case "created_at_up": sel.html('По дате (возрастание)'); break; | |
60 | + case "created_at_down": sel.html('По дате (убывание)'); break; | |
61 | + } | |
62 | + | |
63 | + } | |
64 | + }); | |
65 | + | |
66 | + //end | |
67 | + $(document).on('click', '.js_send_it_button', function() { | |
68 | + var this_ = $(this); | |
69 | + var code_user_id = this_.attr('data-uid'); | |
70 | + var code_to_user_id = this_.attr('data-tuid'); | |
71 | + var code_vacancy = this_.attr('data-vacancy'); | |
72 | + var user_id = $('#send_user_id'); | |
73 | + var to_user_id = $('#send_to_user_id'); | |
74 | + var vacancy = $('#send_vacancy'); | |
75 | + | |
76 | + console.log('Клик на кнопки...'); | |
77 | + | |
78 | + user_id.val(code_user_id); | |
79 | + to_user_id.val(code_to_user_id); | |
80 | + vacancy.val(code_vacancy); | |
81 | + }); | |
82 | + </script> | |
83 | +@endsection | |
84 | + | |
85 | +@section('content') | |
86 | + <section class="thing"> | |
87 | + <div class="container"> | |
88 | + <div class="thing__body"> | |
89 | + <ul class="breadcrumbs thing__breadcrumbs"> | |
90 | + <li><a href="{{ route('index') }}">Главная</a></li> | |
91 | + <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> | |
92 | + <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> | |
93 | + </ul> | |
94 | + @if ($company[0]->oficial_status == 1) | |
95 | + <div class="thing__badge"> | |
96 | + <svg> | |
97 | + <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> | |
98 | + </svg> | |
99 | + Компания проверена | |
100 | + </div> | |
101 | + @endif | |
102 | + | |
103 | + <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | |
104 | + <h1 class="thing__title">{{ $company[0]->name_company }}</h1> | |
105 | + <p class="thing__text">{{ $company[0]->text }}</p> | |
106 | + <div class="thing__buttons"> | |
107 | + <button type="button" class="button"> | |
108 | + <svg> | |
109 | + <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | |
110 | + </svg> | |
111 | + {{ $company[0]->ads->count() }} вакансии | |
112 | + </button> | |
113 | + @if ($user_id == 0) | |
114 | + <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> | |
115 | + Написать сообщение | |
116 | + </a> | |
117 | + @else | |
118 | + <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> | |
119 | + Написать сообщение | |
120 | + </a> | |
121 | + @endif | |
122 | + </div> | |
123 | + </div> | |
124 | + </div> | |
125 | + </section> | |
126 | + <main class="main"> | |
127 | + <div class="container"> | |
128 | + <div class="main__employer-page"> | |
129 | + <h2 class="main__employer-page-title">О компании</h2> | |
130 | + <div class="main__employer-page-info"> | |
131 | + <div class="main__employer-page-item"> | |
132 | + <b>Адрес компании</b> | |
133 | + <span> | |
134 | + {{ $company[0]->address }} | |
135 | + </span> | |
136 | + </div> | |
137 | + <div class="main__employer-page-item"> | |
138 | + <b>Сайт</b> | |
139 | + <span> | |
140 | + <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> | |
141 | + </span> | |
142 | + </div> | |
143 | + <div class="main__employer-page-item"> | |
144 | + <b>Почта</b> | |
145 | + <span> | |
146 | + <a href="mailto:">{{ $company[0]->email }}</a> | |
147 | + </span> | |
148 | + </div> | |
149 | + <div class="main__employer-page-item"> | |
150 | + <b>Телефон</b> | |
151 | + <span> | |
152 | + <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> | |
153 | + </span> | |
154 | + </div> | |
155 | + </div> | |
156 | + <div class="main__employer-page-item"> | |
157 | + <b>Описание</b> | |
158 | + <span> | |
159 | + {{ $company[0]->text }} | |
160 | + </span> | |
161 | + </div> | |
162 | + <div> | |
163 | + <div class="main__employer-page-tabs"> | |
164 | + <button type="button" class="main__employer-page-tabs-item active" | |
165 | + data-tab="1">Флот</button> | |
166 | + <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> | |
167 | + </div> | |
168 | + <div class="main__employer-page-body"> | |
169 | + <div class="main__employer-page-body-item showed" data-body="1"> | |
170 | + <div class="main__employer-page-one"> | |
171 | + @if ($company[0]->flots->count()) | |
172 | + @foreach ($company[0]->flots as $flot) | |
173 | + <a href="" class="main__employer-page-one-item"> | |
174 | + <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> | |
175 | + <b>{{ $flot->region }}</b> | |
176 | + <span>{{ $flot->power }}</span> | |
177 | + </a> | |
178 | + @endforeach | |
179 | + @endif | |
180 | + </div> | |
181 | + </div> | |
182 | + | |
183 | + <div class="main__employer-page-body-item" data-body="2"> | |
184 | + <div class="main__employer-page-two"> | |
185 | + @foreach ($company[0]->ads as $job) | |
186 | + @foreach ($job->ad_job as $item) | |
187 | + <div class="main__employer-page-two-item"> | |
188 | + <div class="main__employer-page-two-item-toper"> | |
189 | + <!-- end --> | |
190 | + <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> | |
191 | + <span>{{ $job->name }}</span> | |
192 | + </div> | |
193 | + <div class="main__employer-page-two-item-title">{{ $item->flot }}</div> | |
194 | + <div class="main__employer-page-two-item-text"> | |
195 | + <div class="main__employer-page-two-item-text-name"> | |
196 | + {{ $item->job_title->name }} | |
197 | + </div> | |
198 | + <div class="main__employer-page-two-item-text-body"> | |
199 | + <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p> | |
200 | + <p>Контракт: {{ $item->period }} мес.</p> | |
201 | + </div> | |
202 | + </div> | |
203 | + <div class="main__employer-page-two-item-text"> | |
204 | + <div class="main__employer-page-two-item-text-name">Район работы</div> | |
205 | + <div class="main__employer-page-two-item-text-body"> | |
206 | + <p>{{ $item->region }}</p> | |
207 | + </div> | |
208 | + </div> | |
209 | + <div class="main__employer-page-two-item-text"> | |
210 | + <div class="main__employer-page-two-item-text-name">Посадка</div> | |
211 | + <div class="main__employer-page-two-item-text-body"> | |
212 | + <p> {{ $item->start }}</p> | |
213 | + {!! $item->description !!} | |
214 | + </div> | |
215 | + </div> | |
216 | + <div class="main__employer-page-two-item-text"> | |
217 | + <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: | |
218 | + </div> | |
219 | + <div class="main__employer-page-two-item-text-body"> | |
220 | + <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a> | |
221 | + </div> | |
222 | + </div> | |
223 | + <div class="main__employer-page-two-item-text"> | |
224 | + <div class="main__employer-page-two-item-text-name">Анкеты присылать на | |
225 | + почту: | |
226 | + </div> | |
227 | + <div class="main__employer-page-two-item-text-body"> | |
228 | + <a href="mailto: {{ $job->email }}">{{ $job->email }}</a> | |
229 | + </div> | |
230 | + </div> | |
231 | + <div class="main__employer-page-two-item-tags"> | |
232 | + <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> | |
233 | + </div> | |
234 | + <div class="main__employer-page-two-item-buttons"> | |
235 | + | |
236 | + <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $item->job_title->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' | |
237 | + class="button main__employer-page-two-item-button js_send_it_button">Оставить | |
238 | + отклик...</button> | |
239 | + | |
240 | + <!--<a href="#" | |
241 | + class="button button_light main__employer-page-two-item-button">Подробнее</a>--> | |
242 | + </div> | |
243 | + <div class="main__employer-page-two-item-bottom"> | |
244 | + <div class="main__employer-page-two-item-bottom-date">{{ $job->updated_at }}</div> | |
245 | + <button type="button" | |
246 | + class="like main__employer-page-two-item-bottom-like js-toggle"> | |
247 | + <svg> | |
248 | + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
249 | + </svg> | |
250 | + </button> | |
251 | + </div> | |
252 | + </div> | |
253 | + @endforeach | |
254 | + @endforeach | |
255 | + <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> | |
256 | + <span>Показать ещё</span> | |
257 | + <span>Скрыть</span> | |
258 | + </button>--> | |
259 | + </div> | |
260 | + </div> | |
261 | + </div> | |
262 | + </div> | |
263 | + </div> | |
264 | + </div> | |
265 | + </main> | |
266 | +@endsection |
resources/views/js/modals.blade.php
1 | 1 | <script> |
2 | 2 | console.log('Test system'); |
3 | 3 | $(document).on('click', '#button_send', function() { |
4 | - var field_login = $('#email'); | |
4 | + var field_login = $('#email_input'); | |
5 | 5 | var field_pwd = $('#password'); |
6 | 6 | var login_val = field_login.val(); |
7 | 7 | var pwd_val = field_pwd.val(); |
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | data: "email="+login_val+"&password="+pwd_val, |
15 | 15 | success: function (data) { |
16 | 16 | console.log('Вход в систему'); |
17 | + console.log(data); | |
17 | 18 | let d = JSON.parse(data); |
18 | 19 | if(typeof d['REDIRECT'] !== "undefined") { |
19 | 20 | location.href = d['REDIRECT']; |
... | ... | @@ -23,7 +24,7 @@ |
23 | 24 | console.log(d['ERROR']); |
24 | 25 | $('#message_error').html(d['ERROR']); |
25 | 26 | } |
26 | - console.log(d['REDIRECT']); | |
27 | + //console.log(d['REDIRECT']); | |
27 | 28 | //$('#block_1').html(data); |
28 | 29 | }, |
29 | 30 | headers: { |
resources/views/modals/send_login.blade.php
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <div id="message_error" name="message_error"> |
6 | 6 | </div> |
7 | 7 | <div class="modal__sign-item"> |
8 | - <input type="email" class="input" id="email" name="email" placeholder="E-mail" required> | |
8 | + <input type="email" class="input" id="email_input" name="email" placeholder="E-mail" required> | |
9 | 9 | </div> |
10 | 10 | <div class="modal__sign-item"> |
11 | 11 | <input type="password" class="input" id="password" name="password" placeholder="Пароль" required> |
resources/views/resume.blade.php
... | ... | @@ -124,6 +124,71 @@ |
124 | 124 | vacancy.val(code_vacancy); |
125 | 125 | }); |
126 | 126 | </script> |
127 | + <script> | |
128 | + $(document).on('change', '#sort_ajax', function() { | |
129 | + var this_ = $(this); | |
130 | + var val_ = this_.val(); | |
131 | + console.log('sort items '+val_); | |
132 | + | |
133 | + $.ajax({ | |
134 | + type: "GET", | |
135 | + url: "{{ route('bd_resume') }}", | |
136 | + data: "sort="+val_+"&block=1", | |
137 | + success: function (data) { | |
138 | + console.log('Выбор сортировки'); | |
139 | + console.log(data); | |
140 | + $('#block1').html(data); | |
141 | + history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | |
142 | + }, | |
143 | + headers: { | |
144 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
145 | + }, | |
146 | + error: function (data) { | |
147 | + data = JSON.stringify(data); | |
148 | + console.log('Error: ' + data); | |
149 | + } | |
150 | + }); | |
151 | + | |
152 | + $.ajax({ | |
153 | + type: "GET", | |
154 | + url: "{{ route('bd_resume') }}", | |
155 | + data: "sort="+val_+"&block=2", | |
156 | + success: function (data) { | |
157 | + console.log('Выбор сортировки'); | |
158 | + console.log(data); | |
159 | + $('#block2').html(data); | |
160 | + history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | |
161 | + }, | |
162 | + headers: { | |
163 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
164 | + }, | |
165 | + error: function (data) { | |
166 | + data = JSON.stringify(data); | |
167 | + console.log('Error: ' + data); | |
168 | + } | |
169 | + }); | |
170 | + | |
171 | + }); | |
172 | + | |
173 | + $(document).ready(function(){ | |
174 | + var sel = $('#select2-sort_ajax-container'); | |
175 | + var key = getUrlParameter('sort'); | |
176 | + console.log(sel); | |
177 | + console.log(key); | |
178 | + | |
179 | + if (key !=='') { | |
180 | + console.log(key); | |
181 | + switch (key) { | |
182 | + case "default": sel.html('Сортировка (по умолчанию)'); break; | |
183 | + case "name_up": sel.html('По имени (возрастание)'); break; | |
184 | + case "name_down": sel.html('По дате (убывание)'); break; | |
185 | + case "created_at_up": sel.html('По дате (возрастание)'); break; | |
186 | + case "created_at_down": sel.html('По дате (убывание)'); break; | |
187 | + } | |
188 | + | |
189 | + } | |
190 | + }); | |
191 | + </script> | |
127 | 192 | @endsection |
128 | 193 | |
129 | 194 | |
... | ... | @@ -173,10 +238,10 @@ |
173 | 238 | <div class="select filters__select"> |
174 | 239 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
175 | 240 | <option value="default">Сортировка (по умолчанию)</option> |
176 | - <option value="name (asc)">По имени (возрастание)</option> | |
177 | - <option value="name (desc)">По имени (убывание)</option> | |
178 | - <option value="created_at (asc)">По дате (возрастание)</option> | |
179 | - <option value="created_at (desc)">По дате (убывание)</option> | |
241 | + <option value="name_up">По имени (возрастание)</option> | |
242 | + <option value="name_down">По имени (убывание)</option> | |
243 | + <option value="created_at_up">По дате (возрастание)</option> | |
244 | + <option value="created_at_down">По дате (убывание)</option> | |
180 | 245 | </select> |
181 | 246 | </div> |
182 | 247 | <button type="button" class="filters__item active" data-tab="1"> |
... | ... | @@ -192,7 +257,7 @@ |
192 | 257 | </div> |
193 | 258 | </div> |
194 | 259 | <div class="main__resume-base-body showed" data-body="1"> |
195 | - <div class="main__resume-base-body-one"> | |
260 | + <div class="main__resume-base-body-one" id="block1" name="block1"> | |
196 | 261 | @if ($resumes->count()) |
197 | 262 | @foreach ($resumes as $res) |
198 | 263 | <div class="main__resume-base-body-item"> |
... | ... | @@ -245,7 +310,61 @@ |
245 | 310 | @endif |
246 | 311 | </div> |
247 | 312 | </div> |
313 | + <div class="main__resume-base-body" data-body="2"> | |
314 | + <div class="main__resume-base-body-two" id="block2" name="block2"> | |
315 | + @if ($resumes->count()) | |
316 | + @foreach ($resumes as $res) | |
317 | + <div class="main__resume-base-body-item"> | |
318 | + <div class="main__resume-base-body-item-buttons"> | |
319 | + <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}"> | |
320 | + <svg> | |
321 | + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
322 | + </svg> | |
323 | + </button> | |
324 | + <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> | |
325 | + <svg> | |
326 | + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
327 | + </svg> | |
328 | + </button> | |
329 | + </div> | |
330 | + <div class="main__resume-base-body-item-wrapper"> | |
331 | + <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> | |
332 | + <div class="main__resume-base-body-item-inner"> | |
333 | + <div> | |
334 | + <b>Статус</b> | |
335 | + <span>{{ $status_work[$res->status_work] }}</span> | |
336 | + </div> | |
337 | + <div> | |
338 | + <b>Имя работника</b> | |
339 | + <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> | |
340 | + </div> | |
341 | + <div> | |
342 | + <b>Номер телефона</b> | |
343 | + <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> | |
344 | + </div> | |
345 | + <div> | |
346 | + <b>Электронный адрес</b> | |
347 | + <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> | |
348 | + </div> | |
349 | + <div> | |
350 | + <b>Город проживания</b> | |
351 | + <span>{{ $res->city }}</span> | |
352 | + </div> | |
353 | + <div> | |
354 | + <b>Опыт работы</b> | |
355 | + <span>{{ $res->experience }}</span> | |
356 | + </div> | |
357 | + </div> | |
358 | + </div> | |
359 | + <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в | |
360 | + резюме</a> | |
361 | + </div> | |
362 | + @endforeach | |
248 | 363 | |
364 | + {{ $resumes->appends($_GET)->links('paginate') }} | |
365 | + @endif | |
366 | + </div> | |
367 | + </div> | |
249 | 368 | </div> |
250 | 369 | </div> |
251 | 370 | </main> |