Commit 6f659072096c3a4e4e19461aea603c7a3528d24e
Exists in
master
коммит вторника
Showing 17 changed files Side-by-side Diff
- app/Http/Controllers/Admin/AdminController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/RequestAdminNews.php
- resources/views/admin/news/edit.blade.php
- resources/views/admin/news/form.blade.php
- resources/views/ajax/new_sky.blade.php
- resources/views/block_real_new.blade.php
- resources/views/employers/add_vacancy-first.blade.php
- resources/views/employers/add_vacancy.blade.php
- resources/views/employers/ajax/list_vacancy.blade.php
- resources/views/index.blade.php
- resources/views/list_vacancies.blade.php
- resources/views/new_sky.blade.php
- resources/views/worker.blade.php
- routes/web.php
app/Http/Controllers/Admin/AdminController.php
... | ... | @@ -407,16 +407,14 @@ class AdminController extends Controller |
407 | 407 | |
408 | 408 | public function new_admin_update_save(RequestAdminNews $request, News $new) { |
409 | 409 | $params = $request->all(); |
410 | + | |
410 | 411 | if ($request->has('image')) { |
411 | - if (!empty($request->get('image'))) { | |
412 | 412 | $params['image'] = $request->file('image')->store('news', 'public'); |
413 | - } else { | |
413 | + } else { | |
414 | 414 | if (!empty($new->image)) |
415 | 415 | $params['image'] = $new->image; |
416 | - else | |
417 | - unset($params['image']); | |
418 | - } | |
419 | 416 | } |
417 | + | |
420 | 418 | $new->update($params); |
421 | 419 | return redirect()->route('admin.news_admin'); |
422 | 420 | } |
app/Http/Controllers/EmployerController.php
... | ... | @@ -127,9 +127,9 @@ class EmployerController extends Controller |
127 | 127 | $categories = Category::query()->active()->get(); |
128 | 128 | $Positions = Category::query()->active()->get(); |
129 | 129 | if ($Positions->count()) { |
130 | - $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); | |
130 | + $jobs = Job_title::query()->OrderBy('name')->Notbdif()->where('position_id', $Positions[0]->id)->get(); | |
131 | 131 | } else { |
132 | - $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); | |
132 | + $jobs = Job_title::query()->OrderBy('name')->Notbdif()->where('position_id', 0)->get(); | |
133 | 133 | } |
134 | 134 | |
135 | 135 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
... | ... | @@ -142,9 +142,20 @@ class EmployerController extends Controller |
142 | 142 | |
143 | 143 | // Сохранение вакансии |
144 | 144 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { |
145 | - $params = $request->all(); | |
146 | - | |
147 | - $ad_jobs = Ad_employer::create($params); | |
145 | + $params_emp = $request->all(); | |
146 | + $params_job["job_title_id"] = $params_emp['job_title_id']; | |
147 | + $params_job["min_salary"] = $params_emp['min_salary']; | |
148 | + $params_job["max_salary"] = $params_emp['max_salary']; | |
149 | + $params_job["region"] = $params_emp['region']; | |
150 | + $params_job["power"] = $params_emp['power']; | |
151 | + $params_job["sytki"] = $params_emp['sytki']; | |
152 | + $params_job["start"] = $params_emp['start']; | |
153 | + $params_job["flot"] = $params_emp['flot']; | |
154 | + $params_job["description"] = $params_emp['description']; | |
155 | + | |
156 | + $ad_jobs = Ad_employer::create($params_emp); | |
157 | + $params_job['ad_employer_id'] = $ad_jobs->id; | |
158 | + Ad_jobs::create($params_job); | |
148 | 159 | return redirect()->route('employer.vacancy_list'); |
149 | 160 | } |
150 | 161 | |
... | ... | @@ -152,8 +163,9 @@ class EmployerController extends Controller |
152 | 163 | public function vacancy_list(Request $request) { |
153 | 164 | $id = Auth()->user()->id; |
154 | 165 | $Employer = Employer::query()->where('user_id', $id)->first(); |
155 | - $vacancy_list = Ad_employer::query()->with('jobs')->with('jobs_code')->where('employer_id', $Employer->id); | |
156 | - | |
166 | + $vacancy_list = Ad_employer::query()->with('jobs')-> | |
167 | + with('jobs_code')-> | |
168 | + where('employer_id', $Employer->id); | |
157 | 169 | |
158 | 170 | if ($request->get('sort')) { |
159 | 171 | $sort = $request->get('sort'); |
... | ... | @@ -359,18 +371,49 @@ class EmployerController extends Controller |
359 | 371 | ] |
360 | 372 | ]; |
361 | 373 | |
374 | + $email = $request->get('email'); | |
375 | + if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | |
376 | + return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | |
377 | + } | |
378 | + | |
362 | 379 | if ($request->get('password') !== $request->get('confirmed')){ |
363 | 380 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
364 | 381 | } |
365 | 382 | |
383 | + if (strlen($request->get('password')) < 8) { | |
384 | + return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | |
385 | + } | |
386 | + | |
387 | + $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); | |
388 | + $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', | |
389 | + 'X', 'C', 'V', 'B', 'N', 'M'); | |
390 | + $spec_bool = false; | |
391 | + $alpha_bool = false; | |
392 | + | |
393 | + $haystack = $request->get('password'); | |
394 | + | |
395 | + foreach ($specsumbol as $it) { | |
396 | + if (strpos($haystack, $it) !== false) { | |
397 | + $spec_bool = true; | |
398 | + } | |
399 | + } | |
400 | + | |
401 | + foreach ($alpha as $it) { | |
402 | + if (strpos($haystack, $it) !== false) { | |
403 | + $alpha_bool = true; | |
404 | + } | |
405 | + } | |
406 | + | |
407 | + if ((!$spec_bool) || (!$alpha_bool)) { | |
408 | + return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); | |
409 | + } | |
410 | + | |
366 | 411 | if (empty($request->get('surname'))) { |
367 | 412 | $params['surname'] = 'Неизвестно'; |
368 | 413 | } |
369 | - | |
370 | 414 | if (empty($request->get('name_man'))) { |
371 | 415 | $params['name_man'] = 'Неизвестно'; |
372 | 416 | } |
373 | - | |
374 | 417 | $validator = Validator::make($params, $rules, $messages); |
375 | 418 | |
376 | 419 | if ($validator->fails()) { |
... | ... | @@ -378,9 +421,9 @@ class EmployerController extends Controller |
378 | 421 | } else { |
379 | 422 | $user = $this->create($params); |
380 | 423 | event(new Registered($user)); |
381 | - | |
382 | 424 | Auth::guard()->login($user); |
383 | 425 | } |
426 | + | |
384 | 427 | if ($user) { |
385 | 428 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; |
386 | 429 | } else { |
app/Http/Controllers/MainController.php
... | ... | @@ -40,7 +40,7 @@ class MainController extends Controller |
40 | 40 | ->get(); |
41 | 41 | |
42 | 42 | $Position = Category::query()->where('is_remove', '=', '0')->get(); |
43 | - | |
43 | + $job_titles = Job_title::query()->where('is_remove', '=', 0)->get(); | |
44 | 44 | /*$BigFlot = Array(); |
45 | 45 | foreach ($Position as $position) { |
46 | 46 | $BigFlot[] = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> |
... | ... | @@ -50,11 +50,8 @@ class MainController extends Controller |
50 | 50 | groupby('job_title_id','position_ship')-> |
51 | 51 | get(); |
52 | 52 | } |
53 | - | |
54 | 53 | $BigFlot = Array(); |
55 | - | |
56 | 54 | foreach ($Position as $position) { |
57 | - | |
58 | 55 | $BigFlot[] = Ad_jobs::query()->with(['job_title' => function($query) { |
59 | 56 | $query->OrderBy('sort'); |
60 | 57 | }])->whereHas('job_title', function ($query) use ($position) { |
... | ... | @@ -63,21 +60,35 @@ class MainController extends Controller |
63 | 60 | distinct('job_title_id')-> |
64 | 61 | get(); |
65 | 62 | }*/ |
66 | - | |
67 | - $BigFlot = Array(); | |
63 | + /*$BigFlot = Array(); | |
68 | 64 | foreach ($Position as $position) { |
69 | - $BigFlot[] = DB::table('ad_jobs')-> | |
70 | - selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')-> | |
65 | + $BigFlot[$position->id] = DB::table('ad_jobs')-> | |
66 | + selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name, job_titles.position_id')-> | |
71 | 67 | orderByDesc('job_titles.sort')-> |
72 | 68 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> |
73 | 69 | where('job_titles.position_id', $position->id)-> |
74 | 70 | groupby('job_title_id')-> |
75 | 71 | get(); |
72 | + }*/ | |
73 | + $Data = DB::table('job_titles')-> | |
74 | + selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> | |
75 | + leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> | |
76 | + join('categories', 'categories.id', '=', 'job_titles.position_id')-> | |
77 | + groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> | |
78 | + orderByDesc('job_titles.sort')->get()->toArray(); | |
79 | + | |
80 | + $Main_Job = array(); | |
81 | + $name_cat = ''; | |
82 | + foreach ($Data as $it) { | |
83 | + $it_arr = (array)$it; | |
84 | + if ($name_cat != $it_arr['catname']) | |
85 | + $name_cat = $it_arr['catname']; | |
86 | + $Main_Job[$name_cat][] = $it_arr; | |
76 | 87 | } |
77 | 88 | |
78 | 89 | $employers = employers_main::query()->with('employer')->orderBy('id')->limit(8)->get(); |
79 | 90 | $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get(); |
80 | - return view('index', compact('news', 'categories', 'employers', 'vacancy', 'BigFlot', 'Position')); | |
91 | + return view('index', compact('news', 'job_titles', 'categories', 'employers', 'vacancy', 'Main_Job')); | |
81 | 92 | } |
82 | 93 | |
83 | 94 | public function search_vacancies(Request $request) { |
... | ... | @@ -132,7 +143,6 @@ class MainController extends Controller |
132 | 143 | } |
133 | 144 | } |
134 | 145 | |
135 | - | |
136 | 146 | public function vacancies(Request $request) { |
137 | 147 | //должности |
138 | 148 | $Job_title = Job_title::query()->orderBy('name')->get(); |
... | ... | @@ -149,7 +159,7 @@ class MainController extends Controller |
149 | 159 | |
150 | 160 | $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); |
151 | 161 | |
152 | - $Position = Category::query()->where('is_remove', '=', '0')->get(); | |
162 | + //$Position = Category::query()->where('is_remove', '=', '0')->get(); | |
153 | 163 | |
154 | 164 | /*$BigFlot = Array(); |
155 | 165 | foreach ($Position as $position) { |
... | ... | @@ -163,7 +173,7 @@ class MainController extends Controller |
163 | 173 | $War_flot = $War_flot->groupby('job_title_id','position_ship')->get(); |
164 | 174 | $BigFlot[] = $War_flot; |
165 | 175 | }*/ |
166 | - | |
176 | + /* | |
167 | 177 | $BigFlot = Array(); |
168 | 178 | foreach ($Position as $position) { |
169 | 179 | $WarFlot = DB::table('ad_jobs')-> |
... | ... | @@ -177,11 +187,31 @@ class MainController extends Controller |
177 | 187 | $WarFlot = $WarFlot->groupby('job_title_id')->get(); |
178 | 188 | $BigFlot[] = $WarFlot; |
179 | 189 | } |
190 | + */ | |
191 | + | |
192 | + $Data = DB::table('job_titles')-> | |
193 | + selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat'); | |
194 | + if (($request->has('job')) && ($request->get('job') > 0)) { | |
195 | + $Data = $Data->where('job_title_id', $request->get('job')); | |
196 | + } | |
197 | + $Data = $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> | |
198 | + join('categories', 'categories.id', '=', 'job_titles.position_id')-> | |
199 | + groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> | |
200 | + orderByDesc('job_titles.sort')->get()->toArray(); | |
201 | + | |
202 | + $Main_Job = array(); | |
203 | + $name_cat = ''; | |
204 | + foreach ($Data as $it) { | |
205 | + $it_arr = (array)$it; | |
206 | + if ($name_cat != $it_arr['catname']) | |
207 | + $name_cat = $it_arr['catname']; | |
208 | + $Main_Job[$name_cat][] = $it_arr; | |
209 | + } | |
180 | 210 | |
181 | 211 | if ($request->ajax()) { |
182 | - return view('ajax.new_sky', compact('categories', 'BigFlot', 'Position')); | |
212 | + return view('ajax.new_sky', compact('categories', 'Main_Job')); | |
183 | 213 | } else { |
184 | - return view('new_sky', compact('Job_title', 'categories', 'BigFlot', 'Position')); | |
214 | + return view('new_sky', compact('Job_title', 'categories', 'Main_Job')); | |
185 | 215 | } |
186 | 216 | } |
187 | 217 |
app/Http/Controllers/WorkerController.php
... | ... | @@ -22,6 +22,7 @@ use App\Models\reclame; |
22 | 22 | use App\Models\ResponseWork; |
23 | 23 | use App\Models\sertification; |
24 | 24 | use App\Models\Static_worker; |
25 | +use App\Models\Title_worker; | |
25 | 26 | use App\Models\User; |
26 | 27 | use App\Models\User as User_Model; |
27 | 28 | use App\Models\Worker; |
... | ... | @@ -343,8 +344,7 @@ class WorkerController extends Controller |
343 | 344 | } |
344 | 345 | |
345 | 346 | $id_wor = $worker->update($params); |
346 | - | |
347 | - $use = User_Model::find($id_wor); | |
347 | + $use = User::find($worker->user_id); | |
348 | 348 | $use->surname = $request->get('surname'); |
349 | 349 | $use->name_man = $request->get('name_man'); |
350 | 350 | $use->surname2 = $request->get('surname2'); |
... | ... | @@ -469,7 +469,7 @@ class WorkerController extends Controller |
469 | 469 | $rules = [ |
470 | 470 | 'surname' => ['required', 'string', 'max:255'], |
471 | 471 | 'name_man' => ['required', 'string', 'max:255'], |
472 | - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | |
472 | + 'email' => ['required', 'email', 'max:255', 'unique:users'], | |
473 | 473 | 'password' => ['required', 'string', 'min:8'] |
474 | 474 | ]; |
475 | 475 | |
... | ... | @@ -487,6 +487,11 @@ class WorkerController extends Controller |
487 | 487 | ] |
488 | 488 | ]; |
489 | 489 | |
490 | + $email = $request->get('email'); | |
491 | + if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | |
492 | + return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | |
493 | + } | |
494 | + | |
490 | 495 | if ($request->get('password') !== $request->get('confirmed')){ |
491 | 496 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
492 | 497 | } |
... | ... | @@ -496,9 +501,12 @@ class WorkerController extends Controller |
496 | 501 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); |
497 | 502 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', |
498 | 503 | 'X', 'C', 'V', 'B', 'N', 'M'); |
504 | + $lenpwd_bool = true; | |
499 | 505 | $spec_bool = false; |
500 | 506 | $alpha_bool = false; |
501 | 507 | |
508 | + if (strlen($haystack) < 8) $lenpwd_bool = false; | |
509 | + | |
502 | 510 | foreach ($specsumbol as $it) { |
503 | 511 | if (strpos($haystack, $it) !== false) { |
504 | 512 | $spec_bool = true; |
... | ... | @@ -511,6 +519,10 @@ class WorkerController extends Controller |
511 | 519 | } |
512 | 520 | } |
513 | 521 | |
522 | + if (!$lenpwd_bool) { | |
523 | + return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | |
524 | + } | |
525 | + | |
514 | 526 | if ((!$spec_bool) || (!$alpha_bool)) { |
515 | 527 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); |
516 | 528 | } |
... | ... | @@ -521,7 +533,7 @@ class WorkerController extends Controller |
521 | 533 | if ($validator->fails()) { |
522 | 534 | return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
523 | 535 | } else { |
524 | - | |
536 | + //dd($params); | |
525 | 537 | $user = $this->create($params); |
526 | 538 | event(new Registered($user)); |
527 | 539 | Auth::guard()->login($user); |
... | ... | @@ -561,10 +573,44 @@ class WorkerController extends Controller |
561 | 573 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); |
562 | 574 | } |
563 | 575 | |
576 | + public function TestWorker() | |
577 | + { | |
578 | + $Use = new User(); | |
579 | + | |
580 | + $Code_user = $Use->create([ | |
581 | + 'name' => 'surname name_man', | |
582 | + 'name_man' => 'name_man', | |
583 | + 'surname' => 'surname', | |
584 | + 'surname2' => 'surname2', | |
585 | + 'subscribe_email' => '1', | |
586 | + 'email' => 'email@mail.com', | |
587 | + 'telephone' => '1234567890', | |
588 | + 'password' => Hash::make('password'), | |
589 | + 'pubpassword' => base64_encode('password'), | |
590 | + 'email_verified_at' => Carbon::now(), | |
591 | + 'is_worker' => 1, | |
592 | + ]); | |
593 | + | |
594 | + if ($Code_user->id > 0) { | |
595 | + $Worker = new Worker(); | |
596 | + $Worker->user_id = $Code_user->id; | |
597 | + $Worker->position_work = 1; //'job_titles'; | |
598 | + $Worker->email = 'email@email.com'; | |
599 | + $Worker->telephone = '1234567890'; | |
600 | + $status = $Worker->save(); | |
601 | + | |
602 | + $Title_Worker = new Title_worker(); | |
603 | + $Title_Worker->worker_id = $Worker->id; | |
604 | + $Title_Worker->job_title_id = 1; | |
605 | + $Title_Worker->save(); | |
606 | + } | |
607 | + } | |
608 | + | |
564 | 609 | // Создание пользователя |
565 | 610 | protected function create(array $data) |
566 | 611 | { |
567 | 612 | $Use = new User(); |
613 | + | |
568 | 614 | $Code_user = $Use->create([ |
569 | 615 | 'name' => $data['surname']." ".$data['name_man'], |
570 | 616 | 'name_man' => $data['name_man'], |
... | ... | @@ -578,6 +624,7 @@ class WorkerController extends Controller |
578 | 624 | 'email_verified_at' => Carbon::now(), |
579 | 625 | 'is_worker' => $data['is_worker'], |
580 | 626 | ]); |
627 | + | |
581 | 628 | if ($Code_user->id > 0) { |
582 | 629 | $Worker = new Worker(); |
583 | 630 | $Worker->user_id = $Code_user->id; |
... | ... | @@ -586,6 +633,13 @@ class WorkerController extends Controller |
586 | 633 | $Worker->telephone = $data['telephone']; |
587 | 634 | $Worker->save(); |
588 | 635 | |
636 | + if (isset($Worker->id)) { | |
637 | + $Title_Worker = new Title_worker(); | |
638 | + $Title_Worker->worker_id = $Worker->id; | |
639 | + $Title_Worker->job_title_id = $data['job_titles']; | |
640 | + $Title_Worker->save(); | |
641 | + } | |
642 | + | |
589 | 643 | return $Code_user; |
590 | 644 | } |
591 | 645 | } |
app/Http/Requests/RequestAdminNews.php
resources/views/admin/news/edit.blade.php
1 | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование новости']) |
2 | 2 | |
3 | 3 | @section('content') |
4 | + <script> | |
5 | + function translit(word){ | |
6 | + var answer = ''; | |
7 | + var converter = { | |
8 | + 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', | |
9 | + 'е': 'e', 'ё': 'e', 'ж': 'zh', 'з': 'z', 'и': 'i', | |
10 | + 'й': 'y', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', | |
11 | + 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', | |
12 | + 'у': 'u', 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', | |
13 | + 'ш': 'sh', 'щ': 'sch', 'ь': '', 'ы': 'y', 'ъ': '', | |
14 | + 'э': 'e', 'ю': 'yu', 'я': 'ya', | |
15 | + | |
16 | + 'А': 'A', 'Б': 'B', 'В': 'V', 'Г': 'G', 'Д': 'D', | |
17 | + 'Е': 'E', 'Ё': 'E', 'Ж': 'Zh', 'З': 'Z', 'И': 'I', | |
18 | + 'Й': 'Y', 'К': 'K', 'Л': 'L', 'М': 'M', 'Н': 'N', | |
19 | + 'О': 'O', 'П': 'P', 'Р': 'R', 'С': 'S', 'Т': 'T', | |
20 | + 'У': 'U', 'Ф': 'F', 'Х': 'H', 'Ц': 'C', 'Ч': 'Ch', | |
21 | + 'Ш': 'Sh', 'Щ': 'Sch', 'Ь': '', 'Ы': 'Y', 'Ъ': '', | |
22 | + 'Э': 'E', 'Ю': 'Yu', 'Я': 'Ya', ' ': '-' | |
23 | + }; | |
24 | + | |
25 | + for (var i = 0; i < word.length; ++i ) { | |
26 | + if (converter[word[i]] == undefined){ | |
27 | + answer += word[i]; | |
28 | + } else { | |
29 | + answer += converter[word[i]]; | |
30 | + } | |
31 | + } | |
32 | + | |
33 | + return answer; | |
34 | + } | |
35 | + | |
36 | + window.addEventListener("DOMContentLoaded", (event) => { | |
37 | + let title = document.querySelector('#title'); | |
38 | + let text = document.querySelector('#slug'); | |
39 | + | |
40 | + title.addEventListener('input', function() { | |
41 | + text.value = translit(this.value); | |
42 | + }); | |
43 | + }); | |
44 | + | |
45 | +</script> | |
4 | 46 | <form method="POST" action="{{ route('admin.new_admin_update', ['new' => $new->id]) }}" enctype="multipart/form-data"> |
5 | 47 | @csrf |
6 | - @include('admin.news.form') | |
48 | + | |
49 | + | |
50 | + <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | |
51 | + <label class="block text-sm"> | |
52 | + <span class="text-gray-700 dark:text-gray-400">Заголовой новости</span> | |
53 | + <input name="title" id="title" | |
54 | + 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" | |
55 | + placeholder="Заголовой новости" value="{{ old('title') ?? ((isset($new->title)) ? $new->title : '') }}" | |
56 | + /> | |
57 | + @error('title') | |
58 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
59 | + {{ $message }} | |
60 | + </span> | |
61 | + @enderror | |
62 | + </label><br> | |
63 | + | |
64 | + <label class="block text-sm"> | |
65 | + <span class="text-gray-700 dark:text-gray-400">Код в URL-строке</span> | |
66 | + <input name="slug" id="slug" | |
67 | + 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" | |
68 | + placeholder="Код в URL-строке" value="{{ old('slug') ?? (isset($new->slug)) ? $new->slug : '' ?? '' }}" | |
69 | + /> | |
70 | + @error('slug') | |
71 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
72 | + {{ $message }} | |
73 | + </span> | |
74 | + @enderror | |
75 | + </label><br> | |
76 | + | |
77 | + <label class="block text-sm"> | |
78 | + <span class="text-gray-700 dark:text-gray-400">Текст</span> | |
79 | + <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 | |
80 | + rows="10">{{ old('text') ?? $new->text ?? '' }}</textarea> | |
81 | + @error('text') | |
82 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
83 | + {{ $message }} | |
84 | + </span> | |
85 | + @enderror | |
86 | + </label><br> | |
87 | + | |
88 | + <label class="block text-sm"> | |
89 | + <span class="text-gray-700 dark:text-gray-400">Картинка</span> | |
90 | + <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 | |
91 | + dark:bg-gray-700 focus:border-purple-400 | |
92 | + focus:outline-none focus:shadow-outline-purple | |
93 | + dark:text-gray-300 dark:focus:shadow-outline-gray | |
94 | + form-input" | |
95 | + id="image" name="image" accept="image/png, image/jpeg"> | |
96 | + @error('image') | |
97 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
98 | + {{ $message }} | |
99 | + </span> | |
100 | + @enderror | |
101 | + @isset($new->image) | |
102 | + <img src="{{asset(Storage::url($new->image))}}" width="100px"/> | |
103 | + @endisset | |
104 | + | |
105 | + </label><br> | |
106 | + | |
107 | + <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | |
108 | + <div> | |
109 | + <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"> | |
110 | + Сохранить | |
111 | + </button> | |
112 | + <a href="{{ route('admin.news_admin') }}" | |
113 | + 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" | |
114 | + style="display: -webkit-inline-box; height: 30px!important;" | |
115 | + >Назад</a> | |
116 | + </div> | |
117 | + </div> | |
118 | + </div> | |
7 | 119 | </form> |
120 | + <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> | |
121 | + <script> | |
122 | + CKEDITOR.replace( 'text', { | |
123 | + filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", | |
124 | + filebrowserUploadMethod: 'form' | |
125 | + }); | |
126 | + </script> | |
8 | 127 | @endsection |
resources/views/admin/news/form.blade.php
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | <span class="text-gray-700 dark:text-gray-400">Заголовой новости</span> |
47 | 47 | <input name="title" id="title" |
48 | 48 | 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" |
49 | - placeholder="Заголовой новости" value="{{ old('title') ?? ((isset($new->title)) ? $new->title : '') }}" | |
49 | + placeholder="Заголовой новости" value="{{ old('title') ?? '' }}" | |
50 | 50 | /> |
51 | 51 | @error('title') |
52 | 52 | <span class="text-xs text-red-600 dark:text-red-400"> |
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | <span class="text-gray-700 dark:text-gray-400">Код в URL-строке</span> |
60 | 60 | <input name="slug" id="slug" |
61 | 61 | 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" |
62 | - placeholder="Код в URL-строке" value="{{ old('slug') ?? (isset($new->slug)) ? $new->slug : '' }}" | |
62 | + placeholder="Код в URL-строке" value="{{ old('slug') ?? '' }}" | |
63 | 63 | /> |
64 | 64 | @error('slug') |
65 | 65 | <span class="text-xs text-red-600 dark:text-red-400"> |
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | <label class="block text-sm"> |
72 | 72 | <span class="text-gray-700 dark:text-gray-400">Текст</span> |
73 | 73 | <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 |
74 | - rows="10">{{ old('text') ?? $new->text ?? '' }}</textarea> | |
74 | + rows="10">{{ old('text') ?? '' }}</textarea> | |
75 | 75 | @error('text') |
76 | 76 | <span class="text-xs text-red-600 dark:text-red-400"> |
77 | 77 | {{ $message }} |
... | ... | @@ -92,9 +92,6 @@ |
92 | 92 | {{ $message }} |
93 | 93 | </span> |
94 | 94 | @enderror |
95 | - @isset($new->image) | |
96 | - <img src="{{asset(Storage::url($new->image))}}" width="100px"/> | |
97 | - @endisset | |
98 | 95 | |
99 | 96 | </label><br> |
100 | 97 |
resources/views/ajax/new_sky.blade.php
1 | -@foreach ($BigFlot as $key => $flot) | |
1 | +@foreach($Main_Job as $key => $it_main) | |
2 | 2 | <div class="vacancies__list-col"> |
3 | - @include('block_real', ['flot' => $flot, 'position' => $Position[$key]]) | |
3 | + @include('block_real_new', ['it_main' => $it_main, 'category' => $key]) | |
4 | 4 | </div> |
5 | 5 | @endforeach |
resources/views/block_real_new.blade.php
... | ... | @@ -0,0 +1,31 @@ |
1 | +@php $colors = Array('#F4C4C2', '#FBF1C8', '#ECFDEF', '#F3ECF6', '#ECFDEF'); | |
2 | + $i = 0; | |
3 | + $k = 0; | |
4 | +@endphp | |
5 | +@if (count($it_main) > 0) | |
6 | + @foreach ($it_main as $cat) | |
7 | + @if ($k == 0) | |
8 | + <div class="vacancies__list-label">{{ $category }}</div> | |
9 | + @endif | |
10 | + | |
11 | + <a href="{{ route('list-vacancies', ['job' => $cat['id_job']]) }}" class="vacancies__item"> | |
12 | + <span style="border-color:{{$colors[$i]}}"> | |
13 | + <b>{{ $cat['jn'] }}</b> | |
14 | + <i>Вакансий: <span>{{ $cat['cnt'] }}</span></i> | |
15 | + </span> | |
16 | + </a> | |
17 | + | |
18 | + @php | |
19 | + $i++; | |
20 | + $k++; | |
21 | + if ($i > 4) {$i = 0;} | |
22 | + @endphp | |
23 | + @endforeach | |
24 | +@else | |
25 | + <div class="vacancies__list-label">{{ $category }}</div> | |
26 | + <a class="vacancies__item"> | |
27 | + <span style="border-color:{{$colors[1]}}"> | |
28 | + <b>Тут нет информации</b> | |
29 | + </span> | |
30 | + </a> | |
31 | +@endif |
resources/views/employers/add_vacancy-first.blade.php
... | ... | @@ -0,0 +1,170 @@ |
1 | +@extends('layout.frontend', ['title' => 'Добавление вакансии РекаМоре']) | |
2 | + | |
3 | +@section('scripts') | |
4 | + <script> | |
5 | + console.log('Приближаемся к системе, нас рой тут...'); | |
6 | + $(document).on('change', '#position_id', function() { | |
7 | + var this_ = $(this); | |
8 | + var val_ = this_.val(); | |
9 | + var ajax_ = $('#job_title_id'); | |
10 | + | |
11 | + console.log('Создания списка людей, которые поднимутся на корабль...'); | |
12 | + | |
13 | + $.ajax({ | |
14 | + type: "GET", | |
15 | + url: "{{ route('employer.selected_people') }}", | |
16 | + data: "id="+val_, | |
17 | + success: function (data) { | |
18 | + console.log('Ответка пришла'); | |
19 | + console.log('Список избранных людей создан'); | |
20 | + ajax_.html(data); | |
21 | + }, | |
22 | + headers: { | |
23 | + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
24 | + }, | |
25 | + error: function (data) { | |
26 | + console.log('Обрыв связи'); | |
27 | + console.log('Error: ' + data); | |
28 | + } | |
29 | + }); | |
30 | + }); | |
31 | + </script> | |
32 | +@endsection | |
33 | +@section('content') | |
34 | + <section class="cabinet"> | |
35 | + <div class="container"> | |
36 | + <ul class="breadcrumbs cabinet__breadcrumbs"> | |
37 | + <li><a href="{{ route('index') }}">Главная</a></li> | |
38 | + <li><b>Личный кабинет</b></li> | |
39 | + </ul> | |
40 | + <div class="cabinet__wrapper"> | |
41 | + <div class="cabinet__side"> | |
42 | + <div class="cabinet__side-toper"> | |
43 | + | |
44 | + @include('employers.emblema') | |
45 | + | |
46 | + </div> | |
47 | + | |
48 | + @include('employers.menu', ['item' => 2]) | |
49 | + | |
50 | + </div> | |
51 | + | |
52 | + <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> | |
53 | + @csrf | |
54 | + <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/> | |
55 | + <div class="cabinet__body-item"> | |
56 | + <div class="cabinet__descr"> | |
57 | + <h2 class="title cabinet__title">Разместить вакансию</h2> | |
58 | + <p class="cabinet__text"><b>Данные по вакансии</b></p> | |
59 | + <p class="cabinet__text">Все поля обязательны для заполнения *</p> | |
60 | + </div> | |
61 | + </div> | |
62 | + | |
63 | + <div class="cabinet__body-item"> | |
64 | + <h4>Поля для вакансии</h4> | |
65 | + <div class="cabinet__inputs"> | |
66 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
67 | + <label class="form-group__label">Название вакансии</label> | |
68 | + <div class="form-group__item"> | |
69 | + <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required> | |
70 | + @error('name') | |
71 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
72 | + {{ $message }} | |
73 | + </span> | |
74 | + @enderror | |
75 | + </div> | |
76 | + </div> | |
77 | + | |
78 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
79 | + <label class="form-group__label">Телефон</label> | |
80 | + <div class="form-group__item"> | |
81 | + <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> | |
82 | + @error('telephone') | |
83 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
84 | + {{ $message }} | |
85 | + </span> | |
86 | + @enderror | |
87 | + </div> | |
88 | + </div> | |
89 | + | |
90 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
91 | + <label class="form-group__label">Емайл</label> | |
92 | + <div class="form-group__item"> | |
93 | + <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> | |
94 | + @error('email') | |
95 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
96 | + {{ $message }} | |
97 | + </span> | |
98 | + @enderror | |
99 | + </div> | |
100 | + </div> | |
101 | + | |
102 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
103 | + <label class="form-group__label">Зарплата среднестатистическая для вакансии</label> | |
104 | + <div class="form-group__item"> | |
105 | + <input type="text" class="input" name="salary" id="salary" value="0" placeholder="Среднестатистическая зарплата"> | |
106 | + @error('salary') | |
107 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
108 | + {{ $message }} | |
109 | + </span> | |
110 | + @enderror | |
111 | + </div> | |
112 | + </div> | |
113 | + | |
114 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
115 | + <label class="form-group__label">Город посадки</label> | |
116 | + <div class="form-group__item"> | |
117 | + <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> | |
118 | + @error('city') | |
119 | + <span class="text-xs text-red-600"> | |
120 | + {{ $message }} | |
121 | + </span> | |
122 | + @enderror | |
123 | + </div> | |
124 | + </div> | |
125 | + | |
126 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
127 | + <label class="form-group__label">Категория (локация)</label> | |
128 | + <div class="form-group__item"> | |
129 | + <div class="select"> | |
130 | + <select class="js-select2" name="category_id" id="category_id"> | |
131 | + @php $i = 1 @endphp | |
132 | + @if ($categories->count()) | |
133 | + @foreach($categories as $j) | |
134 | + @if ($i == 1) <option selected> Выберите категорию из списка</option> | |
135 | + @else | |
136 | + <option value="{{ $j->id }}">{{ $j->name }}</option> | |
137 | + @endif | |
138 | + @php $i++ @endphp | |
139 | + @endforeach | |
140 | + @endif | |
141 | + </select> | |
142 | + @error('category_id') | |
143 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
144 | + {{ $message }} | |
145 | + </span> | |
146 | + @enderror | |
147 | + </div> | |
148 | + </div> | |
149 | + </div> | |
150 | + | |
151 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
152 | + <label class="form-group__label">Описание вакансии</label> | |
153 | + <div class="form-group__item"> | |
154 | + <textarea class="textarea" name="text" id="text">{{ $Employer[0]->text ?? '' }}</textarea> | |
155 | + @error('text') | |
156 | + <span class="text-xs text-red-600"> | |
157 | + {{ $message }} | |
158 | + </span> | |
159 | + @enderror | |
160 | + </div> | |
161 | + </div> | |
162 | + </div> | |
163 | + <button type="submit" class="button cabinet__submit">Опубликовать</button> | |
164 | + </div> | |
165 | + </form> | |
166 | + </div> | |
167 | + </div> | |
168 | + </section> | |
169 | + </div> | |
170 | +@endsection |
resources/views/employers/add_vacancy.blade.php
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | @section('scripts') |
4 | 4 | <script> |
5 | 5 | console.log('Приближаемся к системе, нас рой тут...'); |
6 | - $(document).on('change', '#position_id', function() { | |
6 | + $(document).on('change', '#category_id', function() { | |
7 | 7 | var this_ = $(this); |
8 | 8 | var val_ = this_.val(); |
9 | 9 | var ajax_ = $('#job_title_id'); |
... | ... | @@ -160,6 +160,146 @@ |
160 | 160 | </div> |
161 | 161 | </div> |
162 | 162 | </div> |
163 | + </div> | |
164 | + | |
165 | + <div class="cabinet__body-item"> | |
166 | + <div class="cabinet__body-item"> | |
167 | + <div class="cabinet__descr"> | |
168 | + <p class="cabinet__text"><b>Добавление должности</b></p> | |
169 | + </div> | |
170 | + </div> | |
171 | + | |
172 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
173 | + <label class="form-group__label">Должность соискателя</label> | |
174 | + <div class="form-group__item"> | |
175 | + <div class="select"> | |
176 | + <select class="js-select2" name="job_title_id" id="job_title_id"> | |
177 | + @php $i = 1 @endphp | |
178 | + @if ($jobs->count()) | |
179 | + @foreach($jobs as $j) | |
180 | + @if ($i == 1) <option selected> Выберите должность из списка</option> | |
181 | + @else | |
182 | + <option value="{{ $j->id }}">{{ $j->name }}</option> | |
183 | + @endif | |
184 | + @php $i++ @endphp | |
185 | + @endforeach | |
186 | + @endif | |
187 | + </select> | |
188 | + @error('job_title_id') | |
189 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
190 | + {{ $message }} | |
191 | + </span> | |
192 | + @enderror | |
193 | + </div> | |
194 | + </div> | |
195 | + </div> | |
196 | + | |
197 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
198 | + <label class="form-group__label">Минимальная зарплата</label> | |
199 | + <div class="form-group__item"> | |
200 | + <input type="text" class="input" name="min_salary" id="min_salary" value="{{ old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> | |
201 | + @error('min_salary') | |
202 | + <span class="text-xs text-red-600"> | |
203 | + {{ $message }} | |
204 | + </span> | |
205 | + @enderror | |
206 | + </div> | |
207 | + </div> | |
208 | + | |
209 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
210 | + <label class="form-group__label">Максимальная зарплата</label> | |
211 | + <div class="form-group__item"> | |
212 | + <input type="text" class="input" name="max_salary" id="max_salary" value="{{ old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> | |
213 | + @error('salary') | |
214 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
215 | + {{ $message }} | |
216 | + </span> | |
217 | + @enderror | |
218 | + </div> | |
219 | + </div> | |
220 | + | |
221 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
222 | + <label class="form-group__label">Регион отплытия</label> | |
223 | + <div class="form-group__item"> | |
224 | + <input type="text" class="input" name="region" id="region" value="{{ old('region') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> | |
225 | + @error('region') | |
226 | + <span class="text-xs text-red-600"> | |
227 | + {{ $message }} | |
228 | + </span> | |
229 | + @enderror | |
230 | + </div> | |
231 | + </div> | |
232 | + | |
233 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
234 | + <label class="form-group__label">Мощность</label> | |
235 | + <div class="form-group__item"> | |
236 | + <input type="text" class="input" name="power" id="power" value="{{ old('power') ?? '' }}" placeholder="POWER-45"> | |
237 | + @error('power') | |
238 | + <span class="text-xs text-red-600"> | |
239 | + {{ $message }} | |
240 | + </span> | |
241 | + @enderror | |
242 | + </div> | |
243 | + </div> | |
244 | + | |
245 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
246 | + <label class="form-group__label">Суточные выплаты</label> | |
247 | + <div class="form-group__item"> | |
248 | + <input type="text" class="input" name="sytki" id="sytki" value="{{ old('sytki') ?? '' }}" placeholder="2000"> | |
249 | + @error('power') | |
250 | + <span class="text-xs text-red-600"> | |
251 | + {{ $message }} | |
252 | + </span> | |
253 | + @enderror | |
254 | + </div> | |
255 | + </div> | |
256 | + | |
257 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
258 | + <label class="form-group__label">Начало отплытия</label> | |
259 | + <div class="form-group__item"> | |
260 | + <input type="text" class="input" name="start" id="start" value="{{ old('start') ?? '' }}" placeholder="20 сентября 2024"> | |
261 | + @error('power') | |
262 | + <span class="text-xs text-red-600"> | |
263 | + {{ $message }} | |
264 | + </span> | |
265 | + @enderror | |
266 | + </div> | |
267 | + </div> | |
268 | + | |
269 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
270 | + <label class="form-group__label">Корабль для посадки</label> | |
271 | + <div class="form-group__item"> | |
272 | + <div class="select"> | |
273 | + <select class="js-select2" name="flot" id="flot"> | |
274 | + <option value="" selected> Не указан корабль</option> | |
275 | + @if ($Employer[0]->flots->count()) | |
276 | + @foreach($Employer[0]->flots as $j) | |
277 | + <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> | |
278 | + @endforeach | |
279 | + @endif | |
280 | + </select> | |
281 | + @error('flot') | |
282 | + <span class="text-xs text-red-600"> | |
283 | + {{ $message }} | |
284 | + </span> | |
285 | + @enderror | |
286 | + </div> | |
287 | + </div> | |
288 | + </div> | |
289 | + | |
290 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
291 | + <label class="form-group__label">Дополнительная информация</label> | |
292 | + <div class="form-group__item"> | |
293 | + <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> | |
294 | + @error('description') | |
295 | + <span class="text-xs text-red-600"> | |
296 | + {{ $message }} | |
297 | + </span> | |
298 | + @enderror | |
299 | + </div> | |
300 | + </div> | |
301 | + | |
302 | + </div> | |
163 | 303 | <button type="submit" class="button cabinet__submit">Опубликовать</button> |
164 | 304 | </div> |
165 | 305 | </form> |
resources/views/employers/ajax/list_vacancy.blade.php
1 | 1 | @if ($vacancy_list->count()) |
2 | - <!--<button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more"> | |
3 | - <span>Показать ещё</span> | |
4 | - <span>Свернуть</span> | |
5 | - </button>--> | |
6 | 2 | <div class="table__scroll"> |
7 | 3 | <div class="table__body table__body_min-width"> |
8 | 4 | <table> |
9 | 5 | <thead> |
10 | 6 | <tr> |
7 | + <th>№</th> | |
11 | 8 | <th>Название</th> |
12 | 9 | <th>Дата добавления<br>/ обновления</th> |
10 | + <th>Должности</th> | |
13 | 11 | <th>Статус</th> |
14 | 12 | <th>Действия</th> |
15 | 13 | </tr> |
... | ... | @@ -17,8 +15,23 @@ |
17 | 15 | <tbody> |
18 | 16 | @foreach($vacancy_list as $it) |
19 | 17 | <tr> |
18 | + <td>{{ $it->id }}</td> | |
20 | 19 | <td>{{ $it->name }}</td> |
21 | - <td>{{ date('d.m.Y H:i:s', strtotime($it->created_at)) }} / {{ date('d.m.Y H:i:s', strtotime($it->updated_at)) }}</td> | |
20 | + <td>{{ date('d.m.Y H:i:s', strtotime($it->created_at)) }} <br>/ {{ date('d.m.Y H:i:s', strtotime($it->updated_at)) }}</td> | |
21 | + <td> <a href="{{ route('employer.add_job_in_vac', ['ad_employer' => $it->id]) }}" class="button">Добавить</a> | |
22 | + | |
23 | + @if ($it->jobs->count()) | |
24 | + @foreach ($it->jobs as $key => $it_um) | |
25 | + <p>@if (isset($it->jobs_code[$key])) | |
26 | + <a href="{{ route('employer.edit_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id, 'ad_employer' => $it->id, 'job_title_id' => $it_um->id]) }}" style="text-decoration: underline">{{$it_um->name}}</a> | |
27 | + <a href="{{ route('employer.delete_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id]) }}" style="text-decoration: underline">(Del)</a> | |
28 | + @endif | |
29 | + </p> | |
30 | + @endforeach | |
31 | + @else | |
32 | + Нет связанных <br> с вакансией должностей | |
33 | + @endif | |
34 | + </td> | |
22 | 35 | <td> |
23 | 36 | @if ($it->active_is) |
24 | 37 | <span class="table__status green"><i></i>Опубликовано</span> |
... | ... | @@ -57,7 +70,13 @@ |
57 | 70 | </a> |
58 | 71 | @endif |
59 | 72 | |
60 | - </span> | |
73 | + <!--<button type="button" class="table__controls-item"> | |
74 | + <svg> | |
75 | + <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> | |
76 | + </svg> | |
77 | + </button> | |
78 | + --> | |
79 | + </span> | |
61 | 80 | </td> |
62 | 81 | </tr> |
63 | 82 | @endforeach |
resources/views/index.blade.php
... | ... | @@ -98,16 +98,13 @@ |
98 | 98 | <div class="main__vacancies"> |
99 | 99 | <h2 class="main__vacancies-title">Категории вакансий</h2> |
100 | 100 | <div class="vacancies__body"> |
101 | - <!--<button class="vacancies__more button button_more button_light js-toggle js-parent-toggle"> | |
102 | - <span>Показать ещё</span> | |
103 | - <span>Скрыть</span> | |
104 | - </button>--> | |
105 | 101 | <div class="vacancies__list" id="block_ajax" name="block_ajax"> |
106 | - @foreach ($BigFlot as $key => $flot) | |
102 | + @foreach($Main_Job as $key => $it_main) | |
107 | 103 | <div class="vacancies__list-col"> |
108 | - @include('block_real', ['flot' => $flot, 'position' => $Position[$key]]) | |
104 | + @include('block_real_new', ['it_main' => $it_main, 'category' => $key]) | |
109 | 105 | </div> |
110 | 106 | @endforeach |
107 | + <!--_include('block_real', ['flot' => $flot, 'position' => $Position[$flot->position_id]])--> | |
111 | 108 | </div> |
112 | 109 | </div> |
113 | 110 | </div> |
resources/views/list_vacancies.blade.php
... | ... | @@ -144,7 +144,7 @@ |
144 | 144 | <option value="0" selected>Выберите должность</option> |
145 | 145 | @if ($Job_title->count()) |
146 | 146 | @foreach($Job_title as $JT) |
147 | - <option value="{{ $JT->id }}">{{ $JT->name }}</option> | |
147 | + <option value="{{ $JT->id }}" @if(isset($_GET['job']) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option> | |
148 | 148 | @endforeach |
149 | 149 | @endif |
150 | 150 | </select> |
resources/views/new_sky.blade.php
... | ... | @@ -69,11 +69,16 @@ |
69 | 69 | <span>Скрыть</span> |
70 | 70 | </button>--> |
71 | 71 | <div class="vacancies__list" id="block_ajax" name="block_ajax"> |
72 | - @foreach ($BigFlot as $key => $flot) | |
72 | + @foreach($Main_Job as $key => $it_main) | |
73 | 73 | <div class="vacancies__list-col"> |
74 | - @include('block_real', ['flot' => $flot, 'position' => $Position[$key]]) | |
74 | + @include('block_real_new', ['it_main' => $it_main, 'category' => $key]) | |
75 | 75 | </div> |
76 | 76 | @endforeach |
77 | + <!--_foreach (BigFlot as $key => $flot) | |
78 | + <div class="vacancies__list-col"> | |
79 | + _include('block_real', ['flot' => $flot, 'position' => $Position[$key]]) | |
80 | + </div> | |
81 | + _endforeach--> | |
77 | 82 | </div> |
78 | 83 | </div> |
79 | 84 | </div> |
resources/views/worker.blade.php
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> |
62 | 62 | </ul> |
63 | 63 | <div class="thing__profile"> |
64 | - <img src="@isset($Query->photo) {{ asset(Storage::url($Query->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="thing__profile-photo"> | |
64 | + <img src="@if (isset($Query[0]->photo)) {{ asset(Storage::url($Query[0]->photo)) }} @elseif(!empty($Query[0]->users->file)) {{ asset(Storage::url($Query[0]->users->file)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="main__resume-base-body-item-photo"> | |
65 | 65 | <div class="thing__profile-body"> |
66 | 66 | <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> |
67 | 67 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены |
routes/web.php