Commit 8e4c0bff2192f8436cb0484cb2b4fa4aaa1a9a8a
1 parent
c54cbb05e5
Exists in
master
and in
1 other branch
Коммит по срочным задачам
Showing 10 changed files with 78 additions and 43 deletions Side-by-side Diff
- app/Http/Controllers/CompanyController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/VacancyRequestEdit.php
- resources/views/employers/edit_vacancy.blade.php
- resources/views/info_company_new.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/worker.blade.php
- resources/views/workers/favorite.blade.php
app/Http/Controllers/CompanyController.php
app/Http/Controllers/EmployerController.php
... | ... | @@ -264,7 +264,7 @@ class EmployerController extends Controller |
264 | 264 | //$jobs['job_title_id'] = $params['job_title_id']; |
265 | 265 | //$titles['position_id'] = $params['position_id']; |
266 | 266 | //unset($params['job_title_id']); |
267 | - | |
267 | + //dd($params); | |
268 | 268 | $ad_employer->update($params); |
269 | 269 | $ad_employer->jobs()->sync($request->get('job_title_id')); |
270 | 270 |
app/Http/Controllers/MainController.php
... | ... | @@ -153,7 +153,7 @@ class MainController extends Controller |
153 | 153 | public function vacancies(Request $request) { |
154 | 154 | //должности |
155 | 155 | $Job_title = Job_title::query()->where('is_remove', '=', '0')-> |
156 | - where('is_bd', '=', '0')->orderBy('name')->get(); | |
156 | + where('is_bd', '=', '0')->orderByDesc('sort')->orderBy('name')->get(); | |
157 | 157 | |
158 | 158 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
159 | 159 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') |
... | ... | @@ -241,7 +241,6 @@ class MainController extends Controller |
241 | 241 | $Query = Ad_employer::with('jobs')-> |
242 | 242 | with('cat')-> |
243 | 243 | with('employer')-> |
244 | - | |
245 | 244 | whereHas('jobs_code', function ($query) use ($job_search) { |
246 | 245 | if (!empty($job_search)) { |
247 | 246 | $query->where('job_title_id', $job_search); |
app/Http/Controllers/WorkerController.php
... | ... | @@ -172,6 +172,8 @@ class WorkerController extends Controller |
172 | 172 | |
173 | 173 | $get_date = date('Y.m'); |
174 | 174 | |
175 | + $infoblocks = infobloks::query()->get(); | |
176 | + | |
175 | 177 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
176 | 178 | ->where('user_id', '=', $worker->user_id) |
177 | 179 | ->get(); |
... | ... | @@ -187,11 +189,12 @@ class WorkerController extends Controller |
187 | 189 | $crt->user_id = $worker->user_id; |
188 | 190 | $status = $crt->save(); |
189 | 191 | } |
192 | + | |
190 | 193 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
191 | 194 | ->where('user_id', '=', $worker->user_id) |
192 | 195 | ->get(); |
193 | 196 | |
194 | - return view('worker', compact('Query', 'status_work', 'idiot', 'stat')); | |
197 | + return view('worker', compact('Query', 'infoblocks', 'status_work', 'idiot', 'stat')); | |
195 | 198 | } |
196 | 199 | |
197 | 200 | // скачать анкету соискателя |
app/Http/Requests/VacancyRequestEdit.php
... | ... | @@ -26,7 +26,7 @@ class VacancyRequestEdit extends FormRequest |
26 | 26 | 'max:255', |
27 | 27 | ], |
28 | 28 | |
29 | - 'category_id' => [ | |
29 | + /* 'category_id' => [ | |
30 | 30 | 'numeric', |
31 | 31 | 'min:0', |
32 | 32 | 'max:9999999', |
... | ... | @@ -63,9 +63,9 @@ class VacancyRequestEdit extends FormRequest |
63 | 63 | 'city' => [ |
64 | 64 | 'min:3', |
65 | 65 | 'max:255', |
66 | - ], | |
66 | + ],*/ | |
67 | 67 | |
68 | - 'job_title_id' => [ | |
68 | + 'job_title_id[]' => [ | |
69 | 69 | 'numeric', |
70 | 70 | 'min:1', |
71 | 71 | 'max:9999999' |
... | ... | @@ -78,7 +78,7 @@ class VacancyRequestEdit extends FormRequest |
78 | 78 | 'min:3', |
79 | 79 | 'max:255', |
80 | 80 | ], |
81 | - | |
81 | + /* | |
82 | 82 | 'category_id' => [ |
83 | 83 | 'numeric', |
84 | 84 | 'min:0', |
... | ... | @@ -93,7 +93,8 @@ class VacancyRequestEdit extends FormRequest |
93 | 93 | 'email' => [ |
94 | 94 | 'min:3', |
95 | 95 | 'max:255', |
96 | - ],]; | |
96 | + ],*/ | |
97 | + ]; | |
97 | 98 | } |
98 | 99 | |
99 | 100 | public function messages() { |
resources/views/employers/edit_vacancy.blade.php
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | |
50 | 50 | </div> |
51 | 51 | |
52 | - <form class="cabinet__body" action="{{ route('employer.vacancy_save_me', ['ad_employer' => $Employer->id]) }}" method="POST"> | |
52 | + <form class="cabinet__body" action="{{ route('employer.vacancy_save_me', ['ad_employer' => $ad_employer->id]) }}" method="POST"> | |
53 | 53 | @csrf |
54 | 54 | <input type="hidden" name="employer_id" value="{{ $Employer->id }}"/> |
55 | 55 | <div class="cabinet__body-item"> |
resources/views/info_company_new.blade.php
... | ... | @@ -79,6 +79,7 @@ |
79 | 79 | vacancy.val(code_vacancy); |
80 | 80 | }); |
81 | 81 | </script> |
82 | + @include('js.favorite-vacancy-45') | |
82 | 83 | @endsection |
83 | 84 | |
84 | 85 | @section('content') |
... | ... | @@ -271,8 +272,8 @@ |
271 | 272 | </div> |
272 | 273 | <div class="main__employer-page-two-item-bottom"> |
273 | 274 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> |
274 | - <button type="button" | |
275 | - class="like main__employer-page-two-item-bottom-like js-toggle"> | |
275 | + <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" | |
276 | + class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> | |
276 | 277 | <svg> |
277 | 278 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
278 | 279 | </svg> |
resources/views/layout/frontend.blade.php
... | ... | @@ -103,11 +103,14 @@ |
103 | 103 | </svg></span> |
104 | 104 | </button> |
105 | 105 | <div> |
106 | + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a> | |
106 | 107 | <a href="{{ route('vacancies') }}">Вакансии</a> |
107 | - <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | |
108 | + <!--<a href=" route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>--> | |
108 | 109 | <a href="{{ route('education') }}">Образование</a> |
109 | 110 | <a href="{{ route('news') }}">Новости</a> |
110 | - <a href="{{ route('contacts') }}">Контакты</a> | |
111 | + <a href="{{ $companies[0]->telegram }}">Телеграм</a> | |
112 | + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a> | |
113 | + <!--<a href=" route('contacts') }}">Контакты</a>--> | |
111 | 114 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
112 | 115 | </div> |
113 | 116 | </div> |
... | ... | @@ -119,11 +122,15 @@ |
119 | 122 | </svg></span> |
120 | 123 | </button> |
121 | 124 | <div> |
122 | - <a href="{{ route('register') }}">Регистрация</a> | |
125 | + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a> | |
126 | + <!--<a href=" route('register') }}">Регистрация</a>--> | |
123 | 127 | <a href="{{ route('bd_resume') }}">База резюме</a> |
124 | - <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | |
125 | - <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | |
126 | - <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | |
128 | + <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | |
129 | + <!--<a href=" route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>--> | |
130 | + <!--<a href=" route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>--> | |
131 | + <!--<a href=" route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>--> | |
132 | + <a href="{{ $companies[0]->telegram }}">Телеграм</a> | |
133 | + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a> | |
127 | 134 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
128 | 135 | </div> |
129 | 136 | </div> |
... | ... | @@ -174,22 +181,29 @@ |
174 | 181 | <div class="footer__main-col"> |
175 | 182 | <div class="footer__main-title">Соискателям</div> |
176 | 183 | <nav> |
184 | + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a> | |
177 | 185 | <a href="{{ route('vacancies') }}">Вакансии</a> |
178 | - <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | |
186 | + <!--<a href=" route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>--> | |
179 | 187 | <a href="{{ route('education') }}">Образование</a> |
180 | 188 | <a href="{{ route('news') }}">Новости</a> |
181 | - <a href="{{ route('contacts') }}">Контакты</a> | |
189 | + <!--<a href=" route('contacts') }}">Контакты</a>--> | |
190 | + <a href="{{ $companies[0]->telegram }}">Телеграм</a> | |
191 | + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a> | |
182 | 192 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
183 | 193 | </nav> |
184 | 194 | </div> |
185 | 195 | <div class="footer__main-col"> |
186 | 196 | <div class="footer__main-title">Работодателям</div> |
187 | 197 | <nav> |
188 | - <a href="{{ route('register') }}">Регистрация</a> | |
198 | + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a> | |
199 | + <!--<a href=" route('register') }}">Регистрация</a>--> | |
189 | 200 | <a href="{{ route('bd_resume') }}">База резюме</a> |
190 | - <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | |
191 | - <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | |
192 | - <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | |
201 | + <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | |
202 | + <!--<a href=" route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>--> | |
203 | + <!--<a href=" route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>--> | |
204 | + <!--<a href=" route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>--> | |
205 | + <a href="{{ $companies[0]->telegram }}">Телеграм</a> | |
206 | + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a> | |
193 | 207 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
194 | 208 | </nav> |
195 | 209 | </div> |
resources/views/worker.blade.php
... | ... | @@ -226,25 +226,41 @@ |
226 | 226 | <div class="main__spoiler"> |
227 | 227 | <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button> |
228 | 228 | <div class="main__spoiler-body"> |
229 | + @if ($infoblocks->count()) | |
230 | + <table class="main__table"> | |
231 | + <tbody> | |
232 | + @foreach ($infoblocks as $info) | |
233 | + @php $finder = false; @endphp | |
234 | + @if (isset($Query[0]->infobloks)) | |
235 | + @if ($Query[0]->infobloks->count()) | |
229 | 236 | |
230 | - @if (isset($Query[0]->infobloks)) | |
231 | - @if ($Query[0]->infobloks->count()) | |
232 | - <table class="main__table"> | |
233 | - <tbody> | |
234 | - @foreach($Query[0]->infobloks as $it) | |
235 | - <tr> | |
236 | - <td><b>{{ $it->name }}</b></td> | |
237 | - <td> | |
238 | - @if ($it->model_dop_info[0]->status == 0) Не указано | |
239 | - @elseif($it->model_dop_info[0]->status==1) В наличии | |
240 | - @else Отсутствует | |
241 | - @endif | |
242 | - </td> | |
243 | - </tr> | |
244 | - @endforeach | |
245 | - </tbody> | |
246 | - </table> | |
247 | - @endif | |
237 | + @foreach($Query[0]->infobloks as $it) | |
238 | + @if ($info->id == $it->id) | |
239 | + <tr> | |
240 | + <td><b>{{ $it->name }}</b></td> | |
241 | + <td> | |
242 | + @if ($it->model_dop_info[0]->status == 0) Не указано | |
243 | + @elseif($it->model_dop_info[0]->status==1) В наличии | |
244 | + @else Отсутствует | |
245 | + @endif | |
246 | + </td> | |
247 | + </tr> | |
248 | + @php $finder = true; @endphp | |
249 | + @endif | |
250 | + @endforeach | |
251 | + @endif | |
252 | + @endif | |
253 | + @if (!$finder) | |
254 | + <tr> | |
255 | + <td><b>{{ $info->name }}</b></td> | |
256 | + <td> | |
257 | + Не указано | |
258 | + </td> | |
259 | + </tr> | |
260 | + @endif | |
261 | + @endforeach | |
262 | + </tbody> | |
263 | + </table> | |
248 | 264 | @endif |
249 | 265 | </div> |
250 | 266 | </div> |
resources/views/workers/favorite.blade.php