Commit 1f9ea1ff9766bf4406f9209c7047308c6d29c7d1

Authored by Андрей Ларионов
Exists in master

Коммит 102пункт

Showing 11 changed files Side-by-side Diff

app/Http/Controllers/CompanyController.php
... ... @@ -48,6 +48,7 @@ class CompanyController extends Controller
48 48 } else {
49 49 $user_id = 0;
50 50 }
  51 +
51 52 $company = Employer::with('ads')->with('flots')->with('users')
52 53 ->where('id', '=', $company->id)->get();
53 54  
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')
... ... @@ -207,9 +208,6 @@
207 208 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}">
208 209 @endif
209 210 <span>{{ $job->name }}</span>
210   - <!--<span>Описание:
211   - $job->text !!}
212   - </span>-->
213 211 </div>
214 212 <!--<div class="main__employer-page-two-item-title"> $item->flot }}</div>-->
215 213 <div class="main__employer-page-two-item-text">
... ... @@ -220,6 +218,9 @@
220 218 </a>
221 219 @endforeach
222 220 @endif
  221 + <span>Описание:
  222 + {!! $job->text !!}
  223 + </span>
223 224 <!--<div class="main__employer-page-two-item-text-body">
224 225 <p>Зарплата: $item->min_salary }} - $item->max_salary }}р + $item->sytki }} суточные.</p>
225 226 <p>Контракт: $item->period }} мес.</p>
... ... @@ -238,11 +239,12 @@
238 239 !! $item->description !!}
239 240 </div>
240 241 </div>-->
241   - <div class="main__employer-page-two-item-text">
  242 +
  243 + <!--<div class="main__employer-page-two-item-text">
242 244 <div class="main__employer-page-two-item-text-name">Звонить по вопросам на:
243 245 </div>
244 246 <div class="main__employer-page-two-item-text-body">
245   - <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a>
  247 + <a href="tel: $job->telephone }}"> $job->telephone }}</a>
246 248 </div>
247 249 </div>
248 250 <div class="main__employer-page-two-item-text">
... ... @@ -250,9 +252,10 @@
250 252 почту:
251 253 </div>
252 254 <div class="main__employer-page-two-item-text-body">
253   - <a href="mailto: {{ $job->email }}">{{ $job->email }}</a>
  255 + <a href="mailto: $job->email }}"> $job->email }}</a>
254 256 </div>
255   - </div>
  257 + </div>-->
  258 +
256 259 @if ((isset($job->jobs)) && ($job->jobs->count()))
257 260 <div class="main__employer-page-two-item-tags">
258 261 @foreach ($job->jobs as $item)
... ... @@ -271,8 +274,8 @@
271 274 </div>
272 275 <div class="main__employer-page-two-item-bottom">
273 276 <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">
  277 + <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}"
  278 + class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}">
276 279 <svg>
277 280 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
278 281 </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/list_vacancies.blade.php
... ... @@ -242,7 +242,8 @@
242 242 <div class="main__employer-page-two-item-text-links">
243 243 @if (isset($Q->jobs))
244 244 @foreach ($Q->jobs as $key => $j)
245   - <a>“{{ $j->name }}” – з/п от @if (isset($Q->jobs_code[$key]->min_salary)) {{ $Q->jobs_code[$key]->min_salary }} @endif - @if (isset($Q->jobs_code[$key]->max_salary)) {{ $Q->jobs_code[$key]->max_salary }} @endif рублей (на руки)</a>
  245 + <a>“{{ $j->name }}” <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)-->
  246 + </a>
246 247 @endforeach
247 248 @endif
248 249 </div>
... ... @@ -254,24 +255,24 @@
254 255 {!! $Q->text !!}
255 256 </div>
256 257 </div>
257   - <div class="main__employer-page-two-item-text">
  258 + <!--<div class="main__employer-page-two-item-text">
258 259 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div>
259 260 <div class="main__employer-page-two-item-text-body">
260   - {!! $Q->description !!}
  261 + !! $Q->description !!}
261 262 </div>
262 263 </div>
263 264 <div class="main__employer-page-two-item-text">
264 265 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div>
265 266 <div class="main__employer-page-two-item-text-body">
266   - {!! $Q->contacts_emails !!}
  267 + !! $Q->contacts_emails !!}
267 268 </div>
268 269 </div>
269 270 <div class="main__employer-page-two-item-text">
270 271 <div class="main__employer-page-two-item-text-name">Или звоните:</div>
271 272 <div class="main__employer-page-two-item-text-body">
272   - {!! $Q->contacts_telephones !!}
  273 + !! $Q->contacts_telephones !!}
273 274 </div>
274   - </div>
  275 + </div>-->
275 276  
276 277 <div class="main__employer-page-two-item-tags">
277 278 @if (!empty($Q->jobs_code[0]->position_ship))
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
... ... @@ -136,7 +136,7 @@
136 136 <svg>
137 137 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
138 138 </svg>
139   - <span>Нет избранных должностей!</span>
  139 + <span>Нет избранных вакансий</span>
140 140 </div>
141 141 @endif
142 142 </div>