Commit f4f73f6c1a21dc0c112c288ebb4811f97c75d027

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

Обновление критическое

Showing 10 changed files with 78 additions and 43 deletions 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
... ... @@ -266,7 +266,7 @@ class EmployerController extends Controller
266 266 //$jobs['job_title_id'] = $params['job_title_id'];
267 267 //$titles['position_id'] = $params['position_id'];
268 268 //unset($params['job_title_id']);
269   -
  269 + //dd($params);
270 270 $ad_employer->update($params);
271 271 $ad_employer->jobs()->sync($request->get('job_title_id'));
272 272  
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')
... ... @@ -242,7 +242,6 @@ class MainController extends Controller
242 242 $Query = Ad_employer::with('jobs')->
243 243 with('cat')->
244 244 with('employer')->
245   -
246 245 whereHas('jobs_code', function ($query) use ($job_search) {
247 246 if (!empty($job_search)) {
248 247 $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
... ... @@ -105,11 +105,14 @@
105 105 </svg></span>
106 106 </button>
107 107 <div>
  108 + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
108 109 <a href="{{ route('vacancies') }}">Вакансии</a>
109   - <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
  110 + <!--<a href=" route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>-->
110 111 <a href="{{ route('education') }}">Образование</a>
111 112 <a href="{{ route('news') }}">Новости</a>
112   - <a href="{{ route('contacts') }}">Контакты</a>
  113 + <a href="{{ $companies[0]->telegram }}">Телеграм</a>
  114 + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a>
  115 + <!--<a href=" route('contacts') }}">Контакты</a>-->
113 116 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
114 117 </div>
115 118 </div>
... ... @@ -121,11 +124,15 @@
121 124 </svg></span>
122 125 </button>
123 126 <div>
124   - <a href="{{ route('register') }}">Регистрация</a>
  127 + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
  128 + <!--<a href=" route('register') }}">Регистрация</a>-->
125 129 <a href="{{ route('bd_resume') }}">База резюме</a>
126   - <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
127   - <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
128   - <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
  130 + <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
  131 + <!--<a href=" route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>-->
  132 + <!--<a href=" route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>-->
  133 + <!--<a href=" route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>-->
  134 + <a href="{{ $companies[0]->telegram }}">Телеграм</a>
  135 + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a>
129 136 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
130 137 </div>
131 138 </div>
... ... @@ -176,22 +183,29 @@
176 183 <div class="footer__main-col">
177 184 <div class="footer__main-title">Соискателям</div>
178 185 <nav>
  186 + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
179 187 <a href="{{ route('vacancies') }}">Вакансии</a>
180   - <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
  188 + <!--<a href=" route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>-->
181 189 <a href="{{ route('education') }}">Образование</a>
182 190 <a href="{{ route('news') }}">Новости</a>
183   - <a href="{{ route('contacts') }}">Контакты</a>
  191 + <!--<a href=" route('contacts') }}">Контакты</a>-->
  192 + <a href="{{ $companies[0]->telegram }}">Телеграм</a>
  193 + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a>
184 194 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
185 195 </nav>
186 196 </div>
187 197 <div class="footer__main-col">
188 198 <div class="footer__main-title">Работодателям</div>
189 199 <nav>
190   - <a href="{{ route('register') }}">Регистрация</a>
  200 + <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Регистрация</a>
  201 + <!--<a href=" route('register') }}">Регистрация</a>-->
191 202 <a href="{{ route('bd_resume') }}">База резюме</a>
192   - <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
193   - <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
194   - <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
  203 + <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
  204 + <!--<a href=" route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>-->
  205 + <!--<a href=" route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>-->
  206 + <!--<a href=" route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>-->
  207 + <a href="{{ $companies[0]->telegram }}">Телеграм</a>
  208 + <a href="{{ $companies[0]->vkontact }}">ВКонтакте</a>
195 209 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
196 210 </nav>
197 211 </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
... ... @@ -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>