Commit ad0b69c97b88a3c01fe1b4b8c9a75a1f4ebdddfb
1 parent
088323a407
Exists in
master
task-132687 tasks 73.3 73.4 73.6 90 91 94 95 96 97 98 99 100, half of 82
Showing 30 changed files with 499 additions and 465 deletions Side-by-side Diff
- app/Classes/LikesClass.php
- app/Classes/Tools.php
- app/Http/Controllers/AdEmployerController.php
- app/Http/Controllers/Admin/JobTitlesController.php
- app/Http/Controllers/CompanyController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Models/Like_vacancy.php
- app/Models/Like_worker.php
- app/Models/Message.php
- app/Models/Worker.php
- database/migrations/2024_09_18_104034_change_ip_to_id_in_likes_tables.php
- resources/views/admin/worker/index.blade.php
- resources/views/ajax/list_vacancies.blade.php
- resources/views/companies.blade.php
- resources/views/education/index.blade.php
- resources/views/index.blade.php
- resources/views/info_company_new.blade.php
- resources/views/js/favorite-vacancy-45.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/list_vacancies.blade.php
- resources/views/modals/chats/remove_chat.blade.php
- resources/views/modals/send_message_low_profile_percent.blade.php
- resources/views/modals/send_worker_new.blade.php
- resources/views/new_sky.blade.php
- resources/views/resume/resume_blocks.blade.php
- resources/views/vacance-item.blade.php
- resources/views/workers/cabinet.blade.php
- routes/web.php
app/Classes/LikesClass.php
... | ... | @@ -8,34 +8,51 @@ use App\Models\Ad_employer; |
8 | 8 | use App\Models\Like_vacancy; |
9 | 9 | use App\Models\Like_worker; |
10 | 10 | use App\Models\Worker; |
11 | +use Illuminate\Support\Facades\Auth; | |
11 | 12 | |
12 | 13 | class LikesClass |
13 | 14 | { |
14 | - // Вывод всех избранных вакансий у пользователя | |
15 | 15 | public static function ListVacancy(Ad_employer $ad_employer) { |
16 | - $ListVacancy = Like_vacancy::query()->where('code_record', '=', $ad_employer->id)->get(); | |
16 | + $ListVacancy = Like_vacancy::query() | |
17 | + ->where('code_record', '=', $ad_employer->id) | |
18 | + ->where('user_id', Auth::user()?->id) | |
19 | + ->get(); | |
20 | + | |
17 | 21 | return $ListVacancy; |
18 | 22 | } |
19 | 23 | |
20 | - // Вывод всех избранных работников у пользователя | |
21 | 24 | public static function ListWorkers(Worker $worker) { |
22 | - $ListWorker = Like_worker::query()->where('code_record', '=', $worker->id)->get(); | |
25 | + $ListWorker = Like_worker::query() | |
26 | + ->where('code_record', '=', $worker->id) | |
27 | + ->where('user_id', Auth::user()?->id) | |
28 | + ->get(); | |
29 | + | |
30 | + return $ListWorker; | |
23 | 31 | } |
24 | 32 | |
25 | - // Возвращение кода вакансии | |
26 | 33 | public static function get_status_vacancy(Ad_employer $ad_employer) { |
27 | - if (Like_vacancy::query()->where('code_record', '=', $ad_employer->id)->count() > 0) | |
28 | - $IdVacancy = " active "; | |
29 | - else | |
30 | - $IdVacancy = ""; | |
34 | + $isVacancyLiked = Like_worker::query() | |
35 | + ->where('code_record', $ad_employer->id) | |
36 | + ->where('user_id', Auth::user()?->id) | |
37 | + ->exists(); | |
31 | 38 | |
32 | - return $IdVacancy; | |
39 | + if ($isVacancyLiked) { | |
40 | + return 'active'; | |
41 | + } | |
42 | + | |
43 | + return ''; | |
33 | 44 | } |
34 | 45 | |
35 | 46 | public static function get_status_worker(Worker $worker) { |
36 | - if (Like_worker::query()->where('code_record', '=', $worker->id)->count() > 0) | |
37 | - { $IdWorker = " active"; } else { $IdWorker = "123"; } | |
47 | + $isWorkerLiked = Like_worker::query() | |
48 | + ->where('code_record', $worker->id) | |
49 | + ->where('user_id', Auth::user()?->id) | |
50 | + ->exists(); | |
51 | + | |
52 | + if ($isWorkerLiked) { | |
53 | + return 'active'; | |
54 | + } | |
38 | 55 | |
39 | - return $IdWorker; | |
56 | + return ''; | |
40 | 57 | } |
41 | 58 | } |
app/Classes/Tools.php
... | ... | @@ -4,6 +4,8 @@ |
4 | 4 | namespace App\Classes; |
5 | 5 | |
6 | 6 | |
7 | +use App\Models\Worker; | |
8 | + | |
7 | 9 | class Tools |
8 | 10 | { |
9 | 11 | static function generator_id($length = 6) |
... | ... | @@ -22,4 +24,33 @@ class Tools |
22 | 24 | } |
23 | 25 | return $word; |
24 | 26 | } |
27 | + | |
28 | + public static function getWorkerProfilePercent(Worker $Worker): int | |
29 | + { | |
30 | + $persent = 10; | |
31 | + | |
32 | + if ((!empty($Worker->telephone)) && | |
33 | + (!empty($Worker->email)) && (!empty($Worker->experience)) && | |
34 | + (!empty($Worker->city)) && (!empty($Worker->old_year))) { | |
35 | + $persent = $persent + 40; | |
36 | + } | |
37 | + | |
38 | + if ($Worker->sertificate->count() > 0) { | |
39 | + $persent = $persent + 15; | |
40 | + } | |
41 | + | |
42 | + if ($Worker->infobloks->count() > 0) { | |
43 | + $persent = $persent + 20; | |
44 | + } | |
45 | + | |
46 | + if ($Worker->prev_company->count() > 0) { | |
47 | + $persent = $persent + 10; | |
48 | + } | |
49 | + | |
50 | + if (!empty($Worker->photo)) { | |
51 | + $persent = $persent + 5; | |
52 | + } | |
53 | + | |
54 | + return $persent; | |
55 | + } | |
25 | 56 | } |
app/Http/Controllers/AdEmployerController.php
app/Http/Controllers/Admin/JobTitlesController.php
... | ... | @@ -19,13 +19,16 @@ class JobTitlesController extends Controller |
19 | 19 | public function index(Request $request) |
20 | 20 | { |
21 | 21 | if ($request->has('sort')) { |
22 | - $Jobs = Job_title::query()->where('is_remove', '=', '0'); | |
23 | - if ($request->get('sort') == 'up') | |
22 | + $Jobs = Job_title::query() | |
23 | + ->where('is_remove', '0'); | |
24 | + | |
25 | + if ($request->get('sort') == 'up') { | |
24 | 26 | $Jobs = $Jobs->orderBy('sort')->orderBy('name')->paginate(15); |
25 | - else | |
27 | + } else { | |
26 | 28 | $Jobs = $Jobs->orderByDesc('sort')->orderBy('name')->paginate(15); |
29 | + } | |
27 | 30 | } else { |
28 | - $Jobs = Job_title::query()->where('is_remove', '=', '0')-> | |
31 | + $Jobs = Job_title::query()->where('is_remove', '0')-> | |
29 | 32 | orderByDesc('sort')->orderBy('name')->paginate(15); |
30 | 33 | } |
31 | 34 |
app/Http/Controllers/CompanyController.php
... | ... | @@ -57,6 +57,7 @@ class CompanyController extends Controller |
57 | 57 | $ads = Ad_employer::query()->with('jobs')->with('jobs_code') |
58 | 58 | ->where('employer_id', '=', $company[0]->id) |
59 | 59 | ->where('is_remove', '=', '0') |
60 | + ->where('active_is', 1) | |
60 | 61 | ->OrderByDesc('id') |
61 | 62 | ->paginate(50) |
62 | 63 | ; |
app/Http/Controllers/EmployerController.php
... | ... | @@ -393,7 +393,6 @@ class EmployerController extends Controller |
393 | 393 | 'password' => ['required', 'string', 'min:6'], |
394 | 394 | ]; |
395 | 395 | |
396 | - | |
397 | 396 | $messages = [ |
398 | 397 | 'required' => 'Укажите обязательное поле', |
399 | 398 | 'min' => [ |
... | ... | @@ -430,12 +429,16 @@ class EmployerController extends Controller |
430 | 429 | $validator = Validator::make($params, $rules, $messages); |
431 | 430 | |
432 | 431 | if ($validator->fails()) { |
433 | - return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | |
432 | + return json_encode(Array("ERROR" => "Error: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | |
434 | 433 | } else { |
435 | 434 | $user = $this->create($params); |
436 | 435 | event(new Registered($user)); |
437 | 436 | |
438 | - Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params)); | |
437 | + try { | |
438 | + Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params)); | |
439 | + } catch (Throwable $e) { | |
440 | + Log::error($e); | |
441 | + } | |
439 | 442 | |
440 | 443 | Auth::guard()->login($user); |
441 | 444 | } |
... | ... | @@ -538,36 +541,28 @@ class EmployerController extends Controller |
538 | 541 | } |
539 | 542 | |
540 | 543 | //Избранные люди |
541 | - public function favorites(Request $request) { | |
542 | - $IP_address = RusDate::ip_addr_client(); | |
543 | - $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); | |
544 | - | |
545 | - if ($Arr->count()) { | |
546 | - $A = Array(); | |
547 | - foreach ($Arr as $it) { | |
548 | - $A[] = $it->code_record; | |
549 | - } | |
544 | + public function favorites(Request $request) | |
545 | + { | |
546 | + $likedWorkersIds = Like_worker::query() | |
547 | + ->where('user_id', Auth::user()->id) | |
548 | + ->get() | |
549 | + ->pluck('code_record') | |
550 | + ->toArray(); | |
550 | 551 | |
551 | - $Workers = Worker::query()->whereIn('id', $A); | |
552 | - } else { | |
553 | - $Workers = Worker::query()->where('id', '=', '0'); | |
554 | - } | |
552 | + $workerBuilder = Worker::query() | |
553 | + ->whereIn('id', $likedWorkersIds); | |
555 | 554 | |
556 | 555 | if (($request->has('search')) && (!empty($request->get('search')))) { |
557 | 556 | $search = $request->get('search'); |
558 | 557 | |
559 | - $Workers = $Workers->WhereHas('users', | |
560 | - function (Builder $query) use ($search) { | |
561 | - $query->Where('surname', 'LIKE', "%$search%") | |
562 | - ->orWhere('name_man', 'LIKE', "%$search%") | |
563 | - ->orWhere('surname2', 'LIKE', "%$search%"); | |
564 | - }); | |
565 | - } else { | |
566 | - $Workers = $Workers->with('users'); | |
558 | + $workerBuilder->whereHas('users', function (Builder $query) use ($search) { | |
559 | + $query->where('surname', 'LIKE', "%$search%") | |
560 | + ->oWhere('name_man', 'LIKE', "%$search%") | |
561 | + ->orWhere('surname2', 'LIKE', "%$search%"); | |
562 | + }); | |
567 | 563 | } |
568 | 564 | |
569 | - $Workers = $Workers->get(); | |
570 | - | |
565 | + $Workers = $workerBuilder->get(); | |
571 | 566 | |
572 | 567 | return view('employers.favorite', compact('Workers')); |
573 | 568 | } |
... | ... | @@ -714,7 +709,7 @@ class EmployerController extends Controller |
714 | 709 | |
715 | 710 | $job_titles = Job_title::query() |
716 | 711 | ->where('is_remove', '=', 0) |
717 | - //->where('is_bd', '=', 1) | |
712 | + ->where('is_bd', '=', 1) | |
718 | 713 | ->orderByDesc('sort') |
719 | 714 | ->get(); |
720 | 715 | |
... | ... | @@ -757,7 +752,8 @@ class EmployerController extends Controller |
757 | 752 | ////////////////////////////////////////////////////////////////// |
758 | 753 | // Отправил сообщение |
759 | 754 | ////////////////////////////////////////////////////////////////// |
760 | - public function new_message(Request $request) { | |
755 | + public function new_message(Request $request) | |
756 | + { | |
761 | 757 | $params = $request->all(); |
762 | 758 | |
763 | 759 | $id = $params['_user_id']; |
... | ... | @@ -768,6 +764,8 @@ class EmployerController extends Controller |
768 | 764 | 'flag_new' => 1 |
769 | 765 | ]; |
770 | 766 | |
767 | + dd($params); | |
768 | + | |
771 | 769 | Message::add_message( |
772 | 770 | $request, |
773 | 771 | $params['_user_id'], |
app/Http/Controllers/MainController.php
... | ... | @@ -89,41 +89,46 @@ class MainController extends Controller |
89 | 89 | } |
90 | 90 | |
91 | 91 | // Лайк вакансии |
92 | - public function like_vacancy(Request $request) { | |
93 | - $IP_address = RusDate::ip_addr_client(); | |
92 | + public function like_vacancy(Request $request) | |
93 | + { | |
94 | + if(Auth::user() === null) { | |
95 | + return;//todo unauthenticated behavior | |
96 | + } | |
94 | 97 | |
95 | - if ($request->has('code_record')) { | |
96 | - if ($request->has('delete')) { | |
97 | - $code = $request->get('code_record'); | |
98 | - $atomic_era = Like_vacancy::select('id')-> | |
99 | - where('code_record', '=', $code)->toSql(); | |
100 | - DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete(); | |
98 | + if ($request->has('code_record')) { | |
99 | + if ($request->has('delete')) { | |
100 | + DB::table('like_vacancy') | |
101 | + ->where('code_record', $request->get('code_record')) | |
102 | + ->where('user_id', Auth::user()->id) | |
103 | + ->delete(); | |
101 | 104 | |
102 | - } else { | |
103 | - $params = $request->all(); | |
104 | - $params['ip_address'] = $IP_address; | |
105 | - Like_vacancy::create($params); | |
106 | - } | |
105 | + } else { | |
106 | + $params = $request->all(); | |
107 | + $params['user_id'] = Auth::user()->id; | |
108 | + Like_vacancy::create($params); | |
107 | 109 | } |
110 | + } | |
108 | 111 | } |
109 | 112 | |
110 | 113 | // Лайк соискателю. |
111 | - public function like_worker(Request $request) { | |
112 | - $IP_address = RusDate::ip_addr_client(); | |
114 | + public function like_worker(Request $request) | |
115 | + { | |
116 | + if(Auth::user() === null) { | |
117 | + return;//todo unauthenticated behavior | |
118 | + } | |
113 | 119 | |
114 | - if ($request->has('code_record')) { | |
120 | + if ($request->has('code_record')) {//fixme make non-absurd validation | |
115 | 121 | if ($request->has('delete')) { |
116 | - $atomic_era = Like_worker::select('id')-> | |
117 | - where('code_record', '=', $request-> | |
118 | - get('code_record'))->first(); | |
119 | - | |
120 | - DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete(); | |
122 | + DB::table('like_worker') | |
123 | + ->where('code_record', $request->get('code_record')) | |
124 | + ->where('user_id', Auth::user()->id) | |
125 | + ->delete(); | |
121 | 126 | |
122 | 127 | return "Вот и результат удаления!"; |
123 | 128 | |
124 | 129 | } else { |
125 | 130 | $params = $request->all(); |
126 | - $params['ip_address'] = $IP_address; | |
131 | + $params['user_id'] = Auth::user()->id; | |
127 | 132 | Like_worker::create($params); |
128 | 133 | } |
129 | 134 | } |
app/Http/Controllers/WorkerController.php
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | namespace App\Http\Controllers; |
4 | 4 | |
5 | 5 | use App\Classes\RusDate; |
6 | +use App\Classes\Tools; | |
6 | 7 | use App\Http\Requests\DocumentsRequest; |
7 | 8 | use App\Http\Requests\PrevCompanyRequest; |
8 | 9 | use App\Http\Requests\SertificationRequest; |
... | ... | @@ -72,64 +73,64 @@ class WorkerController extends Controller |
72 | 73 | // лист база резюме |
73 | 74 | public function bd_resume(Request $request) |
74 | 75 | { |
75 | - $look = false; | |
76 | - $idiot = 0; | |
77 | 76 | if (isset(Auth()->user()->id)) { |
78 | - $idiot = Auth()->user()->id; | |
79 | - if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin)) | |
80 | - $look = true; | |
77 | + if ((Auth()->user()->is_worker) || (!Auth()->user()->is_lookin)) | |
78 | + return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); | |
81 | 79 | } |
82 | 80 | |
83 | - if ($look) { | |
84 | - $status_work = WorkerStatuses::getWorkerStatuses(); | |
85 | - $resumes = Worker::query()->with('users')->with('job_titles')->orderByDesc('updated_at');; | |
86 | - $resumes = $resumes->whereHas('users', function (Builder $query) { | |
87 | - $query->Where('is_worker', '=', '1') | |
88 | - ->Where('is_bd', '=', '0'); | |
89 | - }); | |
81 | + $status_work = WorkerStatuses::getWorkerStatuses(); | |
90 | 82 | |
91 | - //dd($request->get('job')); | |
92 | - if (($request->has('job')) && ($request->get('job') > 0)) { | |
93 | - $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) { | |
94 | - $query->Where('job_titles.id', $request->get('job')); | |
95 | - }); | |
96 | - } | |
83 | + $resumes = Worker::query()->with('users')->with('job_titles')->orderByDesc('updated_at'); | |
84 | + $resumes = $resumes->whereHas('users', function (Builder $query) { | |
85 | + $query->Where('is_worker', '=', '1') | |
86 | + ->Where('is_bd', '=', '0'); | |
87 | + }); | |
97 | 88 | |
98 | - $Job_title = Job_title::query() | |
99 | - ->where('is_remove', '=', '0') | |
100 | - ->where('is_bd', '=' , '1') | |
101 | - ->orderByDesc('sort') | |
102 | - ->get() | |
103 | - ; | |
89 | + if (($request->has('job')) && ($request->get('job') > 0)) { | |
90 | + $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) { | |
91 | + $query->Where('job_titles.id', $request->get('job')); | |
92 | + }); | |
93 | + } | |
104 | 94 | |
105 | - if ($request->get('sort')) { | |
106 | - $sort = $request->get('sort'); | |
107 | - switch ($sort) { | |
108 | - case 'looking_for_work': | |
109 | - $resumes->where('status_work', '=', WorkerStatuses::LookingForWork->value); | |
110 | - break; | |
111 | - case 'considering_offers': | |
112 | - $resumes->where('status_work', '=', WorkerStatuses::ConsideringOffers->value); | |
113 | - break; | |
114 | - case 'not_looking_for_work': | |
115 | - $resumes->where('status_work', '=', WorkerStatuses::NotLookingForWork->value); | |
116 | - break; | |
117 | - } | |
95 | + $Job_title = Job_title::query() | |
96 | + ->where('is_remove', '=', '0') | |
97 | + ->where('is_bd', '=' , '1') | |
98 | + ->orderByDesc('sort') | |
99 | + ->get(); | |
100 | + | |
101 | + if ($request->get('sort')) { | |
102 | + $sort = $request->get('sort'); | |
103 | + switch ($sort) { | |
104 | + case 'looking_for_work': | |
105 | + $resumes->where('status_work', '=', WorkerStatuses::LookingForWork->value); | |
106 | + break; | |
107 | + case 'considering_offers': | |
108 | + $resumes->where('status_work', '=', WorkerStatuses::ConsideringOffers->value); | |
109 | + break; | |
110 | + case 'not_looking_for_work': | |
111 | + $resumes->where('status_work', '=', WorkerStatuses::NotLookingForWork->value); | |
112 | + break; | |
118 | 113 | } |
114 | + } | |
119 | 115 | |
120 | - $res_count = $resumes->count(); | |
121 | - //$resumes = $resumes->get(); | |
122 | - $resumes = $resumes->paginate(4); | |
123 | - if ($request->ajax()) { | |
124 | - // Условия обставлены | |
125 | - if ($request->has('block') && ($request->get('block') == 1)) { | |
126 | - return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); | |
127 | - } | |
128 | - } else { | |
129 | - return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title')); | |
116 | + $resumes->where(function (Builder $query) { | |
117 | + $query->whereNotNull('telephone') | |
118 | + ->whereNotNull('email') | |
119 | + ->whereNotNull('city') | |
120 | + ->whereNotNull('experience') | |
121 | + ->whereNotNull('old_year'); | |
122 | + //fixme костыль, переделать | |
123 | + }); | |
124 | + | |
125 | + $res_count = $resumes->count(); | |
126 | + $resumes = $resumes->paginate(4); | |
127 | + if ($request->ajax()) { | |
128 | + // Условия обставлены | |
129 | + if ($request->has('block') && ($request->get('block') == 1)) { | |
130 | + return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count')); | |
130 | 131 | } |
131 | 132 | } else { |
132 | - return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); | |
133 | + return view('resume', compact('resumes', 'status_work', 'res_count', 'Job_title')); | |
133 | 134 | } |
134 | 135 | } |
135 | 136 | |
... | ... | @@ -323,7 +324,7 @@ class WorkerController extends Controller |
323 | 324 | ->with(['users', 'sertificate', 'prev_company', 'infobloks', 'place_worker']) |
324 | 325 | ->WhereHas('users', function (Builder $query) use ($id) { |
325 | 326 | $query->Where('id', $id); |
326 | - })->get(); | |
327 | + })->first(); | |
327 | 328 | |
328 | 329 | $Job_titles = Job_title::query()->where('is_remove', '=', '0') |
329 | 330 | ->where('is_bd', '=' , '1') |
... | ... | @@ -334,49 +335,7 @@ class WorkerController extends Controller |
334 | 335 | ->where('user_id', '=', $id) |
335 | 336 | ->get(); |
336 | 337 | |
337 | - | |
338 | - // 10% | |
339 | - | |
340 | - $persent = 10; | |
341 | - $persent1 = 0; | |
342 | - $persent2 = 0; | |
343 | - $persent3 = 0; | |
344 | - $persent4 = 0; | |
345 | - $persent5 = 0; | |
346 | - | |
347 | - if ((!empty($Worker[0]->telephone)) && | |
348 | - (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && | |
349 | - (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { | |
350 | - // 40% | |
351 | - $persent = $persent + 40; | |
352 | - $persent1 = 40; | |
353 | - } | |
354 | - | |
355 | - //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year); | |
356 | - | |
357 | - if ($Worker[0]->sertificate->count() > 0) { | |
358 | - // 15% | |
359 | - $persent = $persent + 15; | |
360 | - $persent2 = 15; | |
361 | - } | |
362 | - | |
363 | - if ($Worker[0]->infobloks->count() > 0) { | |
364 | - // 20% | |
365 | - $persent = $persent + 20; | |
366 | - $persent3 = 20; | |
367 | - } | |
368 | - | |
369 | - if ($Worker[0]->prev_company->count() > 0) { | |
370 | - // 10% | |
371 | - $persent = $persent + 10; | |
372 | - $persent4 = 10; | |
373 | - } | |
374 | - | |
375 | - if (!empty($Worker[0]->photo)) { | |
376 | - // 5% | |
377 | - $persent = $persent + 5; | |
378 | - $persent5 = 5; | |
379 | - } | |
338 | + $persent = Tools::getWorkerProfilePercent($Worker); | |
380 | 339 | |
381 | 340 | $status_work = WorkerStatuses::getWorkerStatuses(); |
382 | 341 | $additional_document_statuses = [0 => 'Не указано', 1 => 'В наличии', 2 => 'Отсутствует']; |
app/Models/Like_vacancy.php
... | ... | @@ -2,17 +2,25 @@ |
2 | 2 | |
3 | 3 | namespace App\Models; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Factories\HasFactory; | |
6 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | +use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
7 | 7 | |
8 | 8 | class Like_vacancy extends Model |
9 | 9 | { |
10 | - use HasFactory; | |
11 | - | |
12 | 10 | public $table = 'like_vacancy'; |
13 | 11 | |
14 | 12 | public $fillable = [ |
15 | 13 | 'code_record', |
16 | - 'ip_address' | |
14 | + 'user_id' | |
17 | 15 | ]; |
16 | + | |
17 | + public function user(): BelongsTo | |
18 | + { | |
19 | + return $this->belongsTo(User::class); | |
20 | + } | |
21 | + | |
22 | + public function vacancy(): BelongsTo | |
23 | + { | |
24 | + return $this->belongsTo(Ad_employer::class); | |
25 | + } | |
18 | 26 | } |
app/Models/Like_worker.php
... | ... | @@ -2,24 +2,25 @@ |
2 | 2 | |
3 | 3 | namespace App\Models; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Factories\HasFactory; | |
6 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | +use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
7 | 7 | |
8 | 8 | class Like_worker extends Model |
9 | 9 | { |
10 | - use HasFactory; | |
11 | - | |
12 | 10 | public $table = 'like_worker'; |
13 | 11 | |
14 | 12 | public $fillable = [ |
15 | 13 | 'code_record', |
16 | - 'ip_address' | |
14 | + 'user_id' | |
17 | 15 | ]; |
18 | 16 | |
19 | - /* | |
20 | - один-ко-многим | |
21 | - */ | |
22 | 17 | public function worker() { |
23 | 18 | return $this->hasMany(Worker::class); |
24 | 19 | } |
20 | + | |
21 | + public function user(): BelongsTo | |
22 | + { | |
23 | + return $this->belongsTo(User::class); | |
24 | + } | |
25 | + | |
25 | 26 | } |
app/Models/Message.php
... | ... | @@ -55,6 +55,7 @@ class Message extends Model |
55 | 55 | string $file_store_path = '/', |
56 | 56 | bool $is_admin_chat = false |
57 | 57 | ) { |
58 | + dd($request->all()); | |
58 | 59 | $message_params['user_id'] = $user_id; |
59 | 60 | $message_params['to_user_id'] = $to_user_id; |
60 | 61 | if ($request && $request->has('file')) { |
app/Models/Worker.php
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | namespace App\Models; |
4 | 4 | |
5 | +use Illuminate\Database\Eloquent\Builder; | |
5 | 6 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | 7 | use Illuminate\Database\Eloquent\Model; |
7 | 8 | |
... | ... | @@ -129,5 +130,4 @@ class Worker extends Model |
129 | 130 | $job_titles_ids = json_decode($this->attributes['positions_work'], true); |
130 | 131 | return Job_title::whereIn('id', $job_titles_ids)->get(); |
131 | 132 | } |
132 | - | |
133 | 133 | } |
database/migrations/2024_09_18_104034_change_ip_to_id_in_likes_tables.php
... | ... | @@ -0,0 +1,35 @@ |
1 | +<?php | |
2 | + | |
3 | +use Illuminate\Database\Migrations\Migration; | |
4 | +use Illuminate\Database\Schema\Blueprint; | |
5 | +use Illuminate\Support\Facades\Schema; | |
6 | + | |
7 | +return new class extends Migration | |
8 | +{ | |
9 | + /** | |
10 | + * Run the migrations. | |
11 | + * | |
12 | + * @return void | |
13 | + */ | |
14 | + public function up() | |
15 | + { | |
16 | + Schema::table('like_worker', function (Blueprint $table) { | |
17 | + $table->renameColumn('ip_address', 'user_id'); | |
18 | + }); | |
19 | + Schema::table('like_vacancy', function (Blueprint $table) { | |
20 | + $table->renameColumn('ip_address', 'user_id'); | |
21 | + }); | |
22 | + } | |
23 | + | |
24 | + /** | |
25 | + * Reverse the migrations. | |
26 | + * | |
27 | + * @return void | |
28 | + */ | |
29 | + public function down() | |
30 | + { | |
31 | +// Schema::table('id_in_likes_tables', function (Blueprint $table) { | |
32 | +// // | |
33 | +// }); | |
34 | + } | |
35 | +}; |
resources/views/admin/worker/index.blade.php
... | ... | @@ -143,7 +143,7 @@ |
143 | 143 | </span> |
144 | 144 | @else |
145 | 145 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
146 | - {{$user->workers[0]->persent_anketa}}% | |
146 | + {{ \App\Classes\Tools::getWorkerProfilePercent($user->workers[0]) }}% | |
147 | 147 | </span> |
148 | 148 | @endif |
149 | 149 | @else |
resources/views/ajax/list_vacancies.blade.php
... | ... | @@ -25,9 +25,7 @@ |
25 | 25 | <svg> |
26 | 26 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
27 | 27 | </svg> |
28 | - <span> | |
29 | - Вернуться к списку вакансий | |
30 | - </span> | |
28 | + <span> Вернуться к списку вакансий </span> | |
31 | 29 | </a> |
32 | 30 | |
33 | 31 | <div class="main__employer-page-two-item-toper"> |
... | ... | @@ -43,16 +41,6 @@ |
43 | 41 | <div class="main__employer-page-two-item-text-name"> |
44 | 42 | <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3> |
45 | 43 | </div> |
46 | - <!--Судоходная компания ведет набор | |
47 | - специалистов на следующие должности:</div> | |
48 | - <div class="main__employer-page-two-item-text-links"> | |
49 | - if (isset($Q->jobs)) | |
50 | - foreach ($Q->jobs as $key => $j) | |
51 | - <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 рублей (на руки)--> | |
52 | - <!-- </a> | |
53 | - endforeach | |
54 | - endif | |
55 | - </div>--> | |
56 | 44 | </div> |
57 | 45 | |
58 | 46 | <div class="main__employer-page-two-item-text"> |
... | ... | @@ -61,25 +49,6 @@ |
61 | 49 | {!! $Q->text !!} |
62 | 50 | </div> |
63 | 51 | </div> |
64 | - <!--<div class="main__employer-page-two-item-text"> | |
65 | - <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | |
66 | - <div class="main__employer-page-two-item-text-body"> | |
67 | - !! $Q->description !!} | |
68 | - </div> | |
69 | - </div> | |
70 | - <div class="main__employer-page-two-item-text"> | |
71 | - <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | |
72 | - <div class="main__employer-page-two-item-text-body"> | |
73 | - !! $Q->contacts_emails !!} | |
74 | - </div> | |
75 | - </div> | |
76 | - <div class="main__employer-page-two-item-text"> | |
77 | - <div class="main__employer-page-two-item-text-name">Или звоните:</div> | |
78 | - <div class="main__employer-page-two-item-text-body"> | |
79 | - !! $Q->contacts_telephones !!} | |
80 | - </div> | |
81 | - </div> | |
82 | - --> | |
83 | 52 | |
84 | 53 | <div class="main__employer-page-two-item-tags"> |
85 | 54 | @if (!empty($Q->jobs_code[0]->position_ship)) |
... | ... | @@ -121,4 +90,4 @@ |
121 | 90 | @endforeach |
122 | 91 | <div style="margin-top: 20px"> |
123 | 92 | {{ $Query->appends($_GET)->links('paginate') }} |
124 | -</div><!-- конец --> | |
93 | +</div> |
resources/views/companies.blade.php
... | ... | @@ -71,11 +71,18 @@ |
71 | 71 | @csrf |
72 | 72 | <ul class="breadcrumbs thing__breadcrumbs"> |
73 | 73 | <li><a href="{{ route('index') }}">Главная</a></li> |
74 | - <li><b>Работодатели</b></li> | |
74 | + <li><b>Судоходные компании</b></li> | |
75 | 75 | </ul> |
76 | - <h1 class="thing__title">Работодатели</h1> | |
77 | - <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | |
78 | - существующих финансовых и административных условий.</p> | |
76 | + <h1 class="thing__title">Судоходные компании</h1> | |
77 | + <p class="thing__text"> | |
78 | + В данном разделе представлены компании объявления от которых Вы можете увидеть на сайте | |
79 | + | |
80 | + Галочка "Компания одобрена сервисом rekamore.su" выдается компании в чьей репутации мы уверены, компания работает не первый год и у нее нет задержек по заработной плате | |
81 | + | |
82 | + Компании без галочки не стоит игнорировать, возможно она находится на проверке и в скором времени галочка будет выдана | |
83 | + | |
84 | + Мы очень дорожим нашей репутацией и стараемся оградить моряков от недобросовестных работодателей | |
85 | + </p> | |
79 | 86 | <div class="search thing__search"> |
80 | 87 | <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя"> |
81 | 88 | <button type="submit" class="button">Найти</button> |
resources/views/education/index.blade.php
... | ... | @@ -54,7 +54,11 @@ |
54 | 54 | <li><b>Образование</b></li> |
55 | 55 | </ul> |
56 | 56 | <h1 class="thing__title">Образование</h1> |
57 | - <p class="thing__text">Прежде всего, современная методология разработки представляет собой интересный эксперимент проверки направлений прогрессивного развития.</p> | |
57 | + <p class="thing__text"> | |
58 | + В данном разделе представлены образовательные учреждения (ОУ) и учебно-тренажерные центры (УТЦ) | |
59 | + | |
60 | + С услугами и ценами Вы можете ознакомиться перейдя в профиль ОУ или УТЦ | |
61 | + </p> | |
58 | 62 | <div class="search thing__search"> |
59 | 63 | <input type="search" class="input" id="search" name="search" placeholder="Введите наименование работодателя" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif"> |
60 | 64 | <button type="submit" class="button">Найти</button> |
resources/views/index.blade.php
... | ... | @@ -14,16 +14,16 @@ |
14 | 14 | <h4>Работа в море / |
15 | 15 | <span class="br">Работа на реке</span></h4> |
16 | 16 | </div> |
17 | - <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — | |
18 | - тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в | |
19 | - сложных, но очень интересных условиях. </div> | |
17 | + <div class="work__text">Информационный портал rekamore.su - место где работники морского и речного флота могут найти для себя хорошую работу, | |
18 | + а работодатели отличных специалистов | |
19 | + </div> | |
20 | 20 | <div class="work__list"> |
21 | 21 | <div>Тысячи соискателей увидят Ваше объявление</div> |
22 | 22 | <div>Десятки компаний выкладывают объявления каждый день</div> |
23 | 23 | </div> |
24 | - <form class="work__form width100 flex" action="{{ route('vacancies') }}" method="GET"> | |
24 | + <form class="work__form width100 flex" style="" action="{{ route('vacancies') }}" method="GET"> | |
25 | 25 | |
26 | - <div class="select select_search width100"> | |
26 | + <div class="select select_search" style="max-width: 60%"> | |
27 | 27 | <div class="select__icon"> |
28 | 28 | <svg> |
29 | 29 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
... | ... | @@ -132,14 +132,18 @@ |
132 | 132 | <div class="about__line"></div> |
133 | 133 | <div class="about__item"> |
134 | 134 | <b>Для работодателей</b> |
135 | - <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие | |
136 | - сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> | |
135 | + <span> | |
136 | + Нашим ресурсом пользуются более 150 судоходных компаний России и СНГ, в настоящее время мы самая эффективная площадка. | |
137 | + Подробности о работе сервиса и стоимости обслуживания можно получить перейдя по ссылке | |
138 | + <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>. | |
139 | + </span> | |
137 | 140 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> |
138 | 141 | </div> |
139 | 142 | <div class="about__item"> |
140 | 143 | <b>Для сотрудников</b> |
141 | - <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и | |
142 | - СНГ ищут сотрудников через наши ресурсы</span> | |
144 | + <span> | |
145 | + Работа найдется для каждого, а удобная фильтрация вакансий по должностям сделает поиск приятным | |
146 | + </span> | |
143 | 147 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> |
144 | 148 | </div> |
145 | 149 | </div> |
... | ... | @@ -202,8 +206,9 @@ |
202 | 206 | <div class="info__body"> |
203 | 207 | <div class="title info__title"><h4>Мы в социальных сетях</h4></div> |
204 | 208 | <div class="info__item"> |
205 | - <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о | |
206 | - новых вакансиях прямо на свой смартфон</div> | |
209 | + <div class="info__text"> | |
210 | + Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о новых вакансиях прямо на свой смартфон | |
211 | + </div> | |
207 | 212 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> |
208 | 213 | <svg> |
209 | 214 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
... | ... | @@ -212,8 +217,9 @@ |
212 | 217 | </a> |
213 | 218 | </div> |
214 | 219 | <div class="info__item"> |
215 | - <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация | |
216 | - о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> | |
220 | + <div class="info__text"> | |
221 | + Вконтакте — Сообщество работников морского и речного флота, актуальная подборка вакансий | |
222 | + </div> | |
217 | 223 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> |
218 | 224 | <svg> |
219 | 225 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
resources/views/info_company_new.blade.php
... | ... | @@ -151,19 +151,19 @@ |
151 | 151 | <div class="main__employer-page-item"> |
152 | 152 | <b>Сайт</b> |
153 | 153 | <span> |
154 | - <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> | |
154 | + {{ $company[0]->site }} | |
155 | 155 | </span> |
156 | 156 | </div> |
157 | 157 | <div class="main__employer-page-item"> |
158 | 158 | <b>Почта</b> |
159 | 159 | <span> |
160 | - <a href="mailto:">{{ $company[0]->email }}</a> | |
160 | + {{ $company[0]->email }} | |
161 | 161 | </span> |
162 | 162 | </div> |
163 | 163 | <div class="main__employer-page-item"> |
164 | 164 | <b>Телефон</b> |
165 | 165 | <span> |
166 | - <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> | |
166 | + {{ $company[0]->telephone }} | |
167 | 167 | </span> |
168 | 168 | </div> |
169 | 169 | </div> |
... | ... | @@ -179,7 +179,7 @@ |
179 | 179 | <div class="main__employer-page-item"> |
180 | 180 | <b>Телефон (alt)</b> |
181 | 181 | <span> |
182 | - <a href="{{ $company[0]->site }}">{{ $company[0]->telephone_2 }}</a> | |
182 | + {{ $company[0]->telephone_2 }} | |
183 | 183 | </span> |
184 | 184 | </div> |
185 | 185 | </div> |
... | ... | @@ -192,7 +192,6 @@ |
192 | 192 | </div> |
193 | 193 | |
194 | 194 | <div> |
195 | - | |
196 | 195 | <div class="main__employer-page-tabs"> |
197 | 196 | <button id="flot" type="button" class="main__employer-page-tabs-item active" data-tab="1">Флот</button> |
198 | 197 | <button id="vacancy" type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> |
resources/views/js/favorite-vacancy-45.blade.php
... | ... | @@ -4,7 +4,6 @@ |
4 | 4 | var _this = $(this); |
5 | 5 | var id = _this.attr('id'); |
6 | 6 | var id_vacancy = _this.attr('data-val'); |
7 | - console.log('active='+id); | |
8 | 7 | |
9 | 8 | if ($( "#"+id ).hasClass( "active" )) { |
10 | 9 | $.ajax({ |
... | ... | @@ -12,9 +11,7 @@ |
12 | 11 | url: "{{ route('like-vacancy') }}", |
13 | 12 | data: "code_record=" + id_vacancy, |
14 | 13 | success: function (data) { |
15 | - console.log('Выбор сортировки'); | |
16 | - console.log(data); | |
17 | - | |
14 | + /// | |
18 | 15 | }, |
19 | 16 | headers: { |
20 | 17 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
... | ... | @@ -30,8 +27,7 @@ |
30 | 27 | url: "{{ route('like-vacancy') }}", |
31 | 28 | data: "code_record=" + id_vacancy + "&delete=1", |
32 | 29 | success: function (data) { |
33 | - console.log('Выбор сортировки'); | |
34 | - console.log(data); | |
30 | + /// | |
35 | 31 | }, |
36 | 32 | headers: { |
37 | 33 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
resources/views/layout/frontend.blade.php
resources/views/list_vacancies.blade.php
... | ... | @@ -10,16 +10,11 @@ |
10 | 10 | var val = $(this).val(); |
11 | 11 | var main_oskar = $('#main_ockar'); |
12 | 12 | var ti_head = $('#title_head'); |
13 | - | |
14 | - console.log('Code='+val); | |
15 | - console.log('Click change...'); | |
16 | 13 | $.ajax({ |
17 | 14 | type: "GET", |
18 | 15 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
19 | 16 | data: "job="+val, |
20 | 17 | success: function (data) { |
21 | - console.log('Выбор сделан!'); | |
22 | - | |
23 | 18 | main_oskar.html(data); |
24 | 19 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
25 | 20 | }, |
... | ... | @@ -40,8 +35,6 @@ |
40 | 35 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif", |
41 | 36 | data: "job=" + val +"&title=1", |
42 | 37 | success: function (data) { |
43 | - | |
44 | - console.log(data); | |
45 | 38 | }, |
46 | 39 | |
47 | 40 | headers: { |
... | ... | @@ -53,7 +46,6 @@ |
53 | 46 | console.log('Error: ' + data); |
54 | 47 | } |
55 | 48 | }); |
56 | - | |
57 | 49 | } |
58 | 50 | }); |
59 | 51 | |
... | ... | @@ -66,8 +58,6 @@ |
66 | 58 | var to_user_id = $('#_to_user_id'); |
67 | 59 | var vacancy = $('#_vacancy'); |
68 | 60 | |
69 | - console.log('Клик на кнопки...'); | |
70 | - | |
71 | 61 | user_id.val(code_user_id); |
72 | 62 | to_user_id.val(code_to_user_id); |
73 | 63 | vacancy.val(code_vacancy); |
... | ... | @@ -82,28 +72,38 @@ |
82 | 72 | var to_user_id = $('#send_to_user_id'); |
83 | 73 | var vacancy = $('#send_vacancy'); |
84 | 74 | |
85 | - console.log('code_to_user_id='+code_to_user_id); | |
86 | - console.log('code_user_id='+code_user_id); | |
87 | - console.log('code_vacancy='+code_vacancy); | |
88 | - console.log('Клик на кнопке...'); | |
75 | + user_id.val(code_user_id); | |
76 | + to_user_id.val(code_to_user_id); | |
77 | + vacancy.val(code_vacancy); | |
78 | + }); | |
79 | + | |
80 | + $(document).on('click', '.js_ask_percent', function() { | |
81 | + var this_ = $(this); | |
82 | + var code_user_id = this_.attr('data-uid'); | |
83 | + var code_to_user_id = this_.attr('data-tuid'); | |
84 | + var code_vacancy = this_.attr('data-vacancy'); | |
85 | + var user_id = $('#modal_user_id'); | |
86 | + var to_user_id = $('#modal_to_user_id'); | |
87 | + var vacancy = $('#modal_vacancy'); | |
89 | 88 | |
90 | 89 | user_id.val(code_user_id); |
91 | 90 | to_user_id.val(code_to_user_id); |
92 | 91 | vacancy.val(code_vacancy); |
92 | + | |
93 | + user_id.trigger('change'); | |
94 | + to_user_id.trigger('change'); | |
95 | + vacancy.trigger('change'); | |
93 | 96 | }); |
94 | 97 | |
95 | 98 | $(document).on('change', '#sort_ajax', function() { |
96 | 99 | var this_ = $(this); |
97 | 100 | var val_ = this_.val(); |
98 | - console.log('sort items '+val_); | |
99 | 101 | |
100 | 102 | $.ajax({ |
101 | 103 | type: "GET", |
102 | 104 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
103 | 105 | data: "sort="+val_+"&block=1", |
104 | 106 | success: function (data) { |
105 | - console.log('Выбор сортировки'); | |
106 | - console.log(data); | |
107 | 107 | $('#main_ockar').html(data); |
108 | 108 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
109 | 109 | }, |
... | ... | @@ -117,16 +117,11 @@ |
117 | 117 | }); |
118 | 118 | }); |
119 | 119 | |
120 | - | |
121 | - | |
122 | 120 | $(document).ready(function(){ |
123 | 121 | var sel = $('#select2-sort_ajax-container'); |
124 | 122 | var key = getUrlParameter('sort'); |
125 | - console.log(sel); | |
126 | - console.log(key); | |
127 | 123 | |
128 | 124 | if (key !=='') { |
129 | - console.log(key); | |
130 | 125 | switch (key) { |
131 | 126 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
132 | 127 | case "name_up": sel.html('По имени (возрастание)'); break; |
... | ... | @@ -204,107 +199,84 @@ |
204 | 199 | </div> |
205 | 200 | @endif |
206 | 201 | @endforeach |
207 | - <div class="main__vacancies-item main__employer-page-two-item" data-id="{{ $Q->id }}"> | |
208 | - | |
209 | - <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | |
210 | - <svg> | |
211 | - <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | |
212 | - </svg> | |
213 | - <span> | |
214 | - Вернуться к списку вакансий | |
215 | - </span> | |
216 | - </a> | |
202 | + <div class="main__vacancies-item main__employer-page-two-item" data-id="{{ $Q->id }}"> | |
217 | 203 | |
218 | - <div class="main__employer-page-two-item-toper"> | |
219 | - @if (!empty($Q->employer->logo)) | |
220 | - <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | |
221 | - @else | |
222 | - <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | |
223 | - @endif | |
224 | - <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif</span> | |
225 | - </div> | |
204 | + <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | |
205 | + <svg> | |
206 | + <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | |
207 | + </svg> | |
208 | + <span> | |
209 | + Вернуться к списку вакансий | |
210 | + </span> | |
211 | + </a> | |
226 | 212 | |
227 | - <div class="main__employer-page-two-item-text"> | |
228 | - <div class="main__employer-page-two-item-text-name"> | |
229 | - <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3> | |
213 | + <div class="main__employer-page-two-item-toper"> | |
214 | + @if (!empty($Q->employer->logo)) | |
215 | + <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | |
216 | + @else | |
217 | + <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | |
218 | + @endif | |
219 | + <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif</span> | |
230 | 220 | </div> |
231 | - <!--Судоходная компания ведет набор | |
232 | - специалистов на следующие должности:</div> | |
233 | - <div class="main__employer-page-two-item-text-links"> | |
234 | - if (isset($Q->jobs)) | |
235 | - foreach ($Q->jobs as $key => $j) | |
236 | - <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 рублей (на руки)--> | |
237 | - <!-- </a> | |
238 | - endforeach | |
239 | - endif | |
240 | - </div>--> | |
241 | - </div> | |
242 | 221 | |
243 | - <div class="main__employer-page-two-item-text"> | |
244 | - <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | |
245 | - <div class="main__employer-page-two-item-text-body"> | |
246 | - {!! $Q->text !!} | |
247 | - </div> | |
248 | - </div> | |
249 | - <!--<div class="main__employer-page-two-item-text"> | |
250 | - <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | |
251 | - <div class="main__employer-page-two-item-text-body"> | |
252 | - !! $Q->description !!} | |
253 | - </div> | |
254 | - </div> | |
255 | - <div class="main__employer-page-two-item-text"> | |
256 | - <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | |
257 | - <div class="main__employer-page-two-item-text-body"> | |
258 | - !! $Q->contacts_emails !!} | |
222 | + <div class="main__employer-page-two-item-text"> | |
223 | + <div class="main__employer-page-two-item-text-name"> | |
224 | + <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3> | |
225 | + </div> | |
259 | 226 | </div> |
260 | - </div> | |
261 | - <div class="main__employer-page-two-item-text"> | |
262 | - <div class="main__employer-page-two-item-text-name">Или звоните:</div> | |
263 | - <div class="main__employer-page-two-item-text-body"> | |
264 | - !! $Q->contacts_telephones !!} | |
227 | + | |
228 | + <div class="main__employer-page-two-item-text"> | |
229 | + <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | |
230 | + <div class="main__employer-page-two-item-text-body"> | |
231 | + {!! $Q->text !!} | |
232 | + </div> | |
265 | 233 | </div> |
266 | - </div>--> | |
267 | 234 | |
268 | - <div class="main__employer-page-two-item-tags"> | |
269 | - @if (!empty($Q->jobs_code[0]->position_ship)) | |
270 | - <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> | |
271 | - @else | |
272 | - @if (isset($Q->jobs)) | |
273 | - @foreach ($Q->jobs as $key => $j) | |
274 | - <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> | |
275 | - @endforeach | |
276 | - @endif | |
277 | - @endif | |
278 | - </div> | |
279 | - <div class="main__employer-page-two-item-buttons"> | |
280 | - @guest | |
281 | - <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | |
282 | - class="button main__employer-page-two-item-button">Откликнуться</button> | |
283 | - @else | |
284 | - @if (App\Classes\StatusUser::Status()==1) | |
285 | - <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
286 | - class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> | |
235 | + <div class="main__employer-page-two-item-tags"> | |
236 | + @if (!empty($Q->jobs_code[0]->position_ship)) | |
237 | + <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> | |
287 | 238 | @else |
288 | - <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
289 | - class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | |
239 | + @if (isset($Q->jobs)) | |
240 | + @foreach ($Q->jobs as $key => $j) | |
241 | + <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> | |
242 | + @endforeach | |
243 | + @endif | |
290 | 244 | @endif |
291 | - @endguest | |
292 | - <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | |
293 | - </div> | |
294 | - <div class="main__employer-page-two-item-bottom"> | |
295 | - <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y', strtotime($Q->updated_at)) }}</div> | |
296 | - <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> | |
297 | - <svg> | |
298 | - <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
299 | - </svg> | |
300 | - </button> | |
245 | + </div> | |
246 | + <div class="main__employer-page-two-item-buttons"> | |
247 | + @guest | |
248 | + <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | |
249 | + class="button main__employer-page-two-item-button">Откликнуться</button> | |
250 | + @else | |
251 | + @if (App\Classes\StatusUser::Status() == 0) | |
252 | + <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
253 | + class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> | |
254 | + @else | |
255 | + @if(\App\Classes\Tools::getWorkerProfilePercent(Auth()->user()->workers[0]) > 51) | |
256 | + <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
257 | + class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | |
258 | + @else | |
259 | + <button type="button" data-fancybox data-src="#ask_percent" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
260 | + class="button main__employer-page-two-item-button js_ask_percent">Откликнуться</button> | |
261 | + @endif | |
262 | + @endif | |
263 | + @endguest | |
264 | + <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | |
265 | + </div> | |
266 | + <div class="main__employer-page-two-item-bottom"> | |
267 | + <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y', strtotime($Q->updated_at)) }}</div> | |
268 | + <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> | |
269 | + <svg> | |
270 | + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
271 | + </svg> | |
272 | + </button> | |
273 | + </div> | |
301 | 274 | </div> |
302 | - </div> | |
303 | - @php $i++ @endphp | |
275 | + @php $i++ @endphp | |
304 | 276 | @endforeach |
305 | - <div style="margin-top: 20px"> | |
277 | + <div style="margin-top: 20px"> | |
306 | 278 | {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }} |
307 | - </div><!-- конец --> | |
279 | + </div> | |
308 | 280 | |
309 | 281 | </div> |
310 | 282 | </div> |
resources/views/modals/chats/remove_chat.blade.php
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <h2>Удалить чат</h2> |
5 | 5 | </div> |
6 | 6 | <div class="modal-dialog-body"> |
7 | - <p>Вы действительно хотите удалить час с "<b><span class="target-chat"></span></b>"?</p> | |
7 | + <p>Вы действительно хотите удалить чат с "<b><span class="target-chat"></span></b>"?</p> | |
8 | 8 | </div> |
9 | 9 | <div class="modal-dialog-footer"> |
10 | 10 | <button type="button" class="button remove-chat-button">Удалить</button> |
resources/views/modals/send_message_low_profile_percent.blade.php
... | ... | @@ -0,0 +1,58 @@ |
1 | +<div id="ask_percent" class="modal modal_bg"> | |
2 | + <div style="display:none"> | |
3 | + <!-- Отправитель сообщения: --> | |
4 | + <input type="hidden" id="modal_user_id" name="_user_id" class="input" placeholder="user_id" value=""> | |
5 | + <!-- Получатель сообщения: --> | |
6 | + <input type="hidden" id="modal_to_user_id" name="_to_user_id" class="input" placeholder="to_user_id" value=""> | |
7 | + <!-- Вакансия: --> | |
8 | + <input type="hidden" id="modal_vacancy" name="_vacancy" class="input" placeholder="vacancy" value=""> | |
9 | + </div> | |
10 | + | |
11 | + <div class="modal__body"> | |
12 | + <div class="modal__title">Вы откликнулись на вакансию <span id="vac_name"></span></div> | |
13 | + <div class="modal__text">Ваше резюме заполнено менее чем на 50%</div> | |
14 | + <div class="modal__text">Вы хотите дополнить ваше резюме?</div> | |
15 | + <div class="modal__buttons"> | |
16 | + <a href="{{ route('worker.cabinet') }}" class="button main__employer-page-two-item-button">Да</a> | |
17 | + <button type="button" | |
18 | + data-fancybox | |
19 | + data-src="#send2" | |
20 | + {{--data-vacancy="{{ $Q->id }}" | |
21 | + data-uid="{{ $uid }}" | |
22 | + data-tuid="{{ $Q->employer->user_id }}"--}} | |
23 | + data-options='{"touch":false,"autoFocus":false}' | |
24 | + class="button main__employer-page-two-item-button js_send_wp_button">Нет</button> | |
25 | + </div> | |
26 | + </div> | |
27 | +</div> | |
28 | + | |
29 | +<script> | |
30 | + $(document).on('change', '#modal_user_id', function () { | |
31 | + $('.js_send_wp_button').data('uid', $('#modal_user_id').val()); | |
32 | + }) | |
33 | + $(document).on('change', '#modal_to_user_id', function () { | |
34 | + $('.js_send_wp_button').data('tuid', $('#modal_to_user_id').val()); | |
35 | + }) | |
36 | + $(document).on('change', '#modal_vacancy', function () { | |
37 | + $('.js_send_wp_button').data('vacancy', $('#modal_vacancy').val()); | |
38 | + $.ajax({ | |
39 | + url: 'vacancy/'+$('#modal_vacancy').val(), | |
40 | + type: 'GET', | |
41 | + dataType: "json", | |
42 | + success: function (data) { | |
43 | + $('#vac_name').html(data.name) | |
44 | + } | |
45 | + }) | |
46 | + }) | |
47 | + | |
48 | + $(document).on('click', '.js_send_wp_button', function() { | |
49 | + $('#_to_user_id').val($(this).data('tuid')); | |
50 | + $('#_vacancy').val($(this).data('vacancy')); | |
51 | + $('#_user_id').val($(this).data('uid')); | |
52 | + | |
53 | + console.log($(this).data('uid'), $('#_user_id')) | |
54 | + //console.log($('#_to_user_id')) | |
55 | + //console.log($('#_vacancy')) | |
56 | + }); | |
57 | + | |
58 | +</script> |
resources/views/modals/send_worker_new.blade.php
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | <input type="text" id="send_vacancy" name="send_vacancy" class="input" placeholder="vacancy" value=""> |
33 | 33 | Должность: |
34 | 34 | <input type="text" id="send_job_title_id" name="send_job_title_id" class="input" placeholder="vacancy" value="0"> |
35 | - | |
36 | 35 | </div> |
37 | 36 | <div class="modal__form-item send_title_div error_"> |
38 | 37 | <input id="send_title" name="send_title" type="text" class="input" placeholder="Тема" required> |
resources/views/new_sky.blade.php
... | ... | @@ -36,8 +36,10 @@ |
36 | 36 | <li><b>Вакансии</b></li> |
37 | 37 | </ul> |
38 | 38 | <h1 class="thing__title">Вакансии</h1> |
39 | - <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | |
40 | - существующих финансовых и административных условий.</p> | |
39 | + <p class="thing__text"> | |
40 | + Для удобного и быстрого поиска по определенной должности воспользуйтесь фильтром. В выпадающем списке выберите должность. | |
41 | + Если Вы хотите просмотреть общий список вакансий выберете "Все должности" | |
42 | + </p> | |
41 | 43 | <div class="select select_search thing__select"> |
42 | 44 | <div class="select__icon"> |
43 | 45 | <svg> |
resources/views/resume/resume_blocks.blade.php
... | ... | @@ -6,7 +6,12 @@ |
6 | 6 | <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"> |
7 | 7 | <div> |
8 | 8 | <div class="main__resume-base-body-item-buttons"> |
9 | - <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> | |
9 | + <button type="button" | |
10 | + data-id="{{ $res->id }}" | |
11 | + id="elem{{ $res->id }}" | |
12 | + class="like js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" | |
13 | + data-val="{{ $res->id }}" | |
14 | + > | |
10 | 15 | <svg> |
11 | 16 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
12 | 17 | </svg> |
... | ... | @@ -23,24 +28,24 @@ |
23 | 28 | <span>Написать</span> |
24 | 29 | </button> |
25 | 30 | @else |
26 | - @if (App\Classes\StatusUser::Status()==0) | |
27 | - @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) | |
28 | - <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'> | |
29 | - <svg> | |
30 | - <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
31 | - </svg> | |
32 | - <span>Написать</span> | |
33 | - </button> | |
34 | - @endif | |
35 | - @else | |
36 | - <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' | |
37 | - class="chat js-toggle js_it_button"> | |
38 | - <svg> | |
39 | - <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
40 | - </svg> | |
41 | - <span>Написать</span> | |
42 | - </button> | |
43 | - @endif | |
31 | + @if (App\Classes\StatusUser::Status()==0) | |
32 | + @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) | |
33 | + <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ Auth::user()->id }}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'> | |
34 | + <svg> | |
35 | + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
36 | + </svg> | |
37 | + <span>Написать</span> | |
38 | + </button> | |
39 | + @endif | |
40 | + @else | |
41 | + <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' | |
42 | + class="chat js-toggle js_it_button"> | |
43 | + <svg> | |
44 | + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | |
45 | + </svg> | |
46 | + <span>Написать</span> | |
47 | + </button> | |
48 | + @endif | |
44 | 49 | @endif |
45 | 50 | |
46 | 51 | <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Подробнее</a> |
resources/views/vacance-item.blade.php
... | ... | @@ -5,7 +5,6 @@ |
5 | 5 | @extends('layout.frontend', ['title' => $title]) |
6 | 6 | |
7 | 7 | @section('scripts') |
8 | - <!--include('js.favorite-vacancy')--> | |
9 | 8 | <script> |
10 | 9 | $(document).on('click', '.js_send_it_button', function() { |
11 | 10 | var this_ = $(this); |
... | ... | @@ -16,8 +15,6 @@ |
16 | 15 | var to_user_id = $('#_to_user_id'); |
17 | 16 | var vacancy = $('#_vacancy'); |
18 | 17 | |
19 | - console.log('Клик на кнопки...'); | |
20 | - | |
21 | 18 | user_id.val(code_user_id); |
22 | 19 | to_user_id.val(code_to_user_id); |
23 | 20 | vacancy.val(code_vacancy); |
... | ... | @@ -33,11 +30,6 @@ |
33 | 30 | var to_user_id = $('#send_to_user_id'); |
34 | 31 | var vacancy = $('#send_vacancy'); |
35 | 32 | |
36 | - console.log('code_to_user_id='+code_to_user_id); | |
37 | - console.log('code_user_id='+code_user_id); | |
38 | - console.log('code_vacancy='+code_vacancy); | |
39 | - console.log('Клик на кнопке...'); | |
40 | - | |
41 | 33 | user_id.val(code_user_id); |
42 | 34 | to_user_id.val(code_to_user_id); |
43 | 35 | vacancy.val(code_vacancy); |
... | ... | @@ -109,91 +101,56 @@ |
109 | 101 | </div> |
110 | 102 | |
111 | 103 | @foreach ($Query as $Q) |
112 | - <div class="main__vacancies-item-page main__employer-page-two-item"> | |
113 | - <!--<div class="main__employer-page-two-item-text"> | |
114 | - <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | |
115 | - специалистов на следующие должности:</div> | |
116 | - <div class="main__employer-page-two-item-text-links"> | |
117 | - if (isset($Q->jobs)) | |
118 | - foreach ($Q->jobs as $key => $j) | |
119 | - <a>“{ $j->name }}” | |
120 | - <!-- з/п от 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 рублей (на руки)--> | |
121 | - <!--</a> | |
122 | - endforeach | |
123 | - endif | |
104 | + <div class="main__vacancies-item-page main__employer-page-two-item"> | |
105 | + <div class="main__employer-page-two-item-text"> | |
106 | + <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | |
107 | + <div class="main__employer-page-two-item-text-body"> | |
108 | + {!! $Q->text !!} | |
109 | + </div> | |
124 | 110 | </div> |
125 | - </div>--> | |
126 | - <div class="main__employer-page-two-item-text"> | |
127 | - <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | |
128 | - <div class="main__employer-page-two-item-text-body"> | |
129 | - {!! $Q->text !!} | |
111 | + <div class="main__employer-page-two-item-tags"> | |
112 | + @if (!empty($Q->jobs_code[0]->position_ship)) | |
113 | + <span class="main__employer-page-two-item-tag">#{{ $Q->jobs_code[0]->position_ship }}</span> | |
114 | + @else | |
115 | + @if (isset($Q->jobs)) | |
116 | + @foreach ($Q->jobs as $key => $j) | |
117 | + <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | |
118 | + @endforeach | |
119 | + @endif | |
120 | + @endif | |
130 | 121 | </div> |
131 | - </div> | |
132 | - <!--<div class="main__employer-page-two-item-text"> | |
133 | - <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | |
134 | - <div class="main__employer-page-two-item-text-body"> | |
135 | - !! $Q->description !!} | |
122 | + <br> | |
123 | + <div class="main__employer-page-two-item-buttons"> | |
124 | + @guest | |
125 | + <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | |
126 | + class="button main__employer-page-two-item-button">Откликнуться</button> | |
127 | + @else | |
128 | + @if (App\Classes\StatusUser::Status()==1) | |
129 | + <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
130 | + class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> | |
131 | + @else | |
132 | + <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
133 | + class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | |
134 | + @endif | |
135 | + @endguest | |
136 | 136 | </div> |
137 | - </div> | |
138 | - <div class="main__employer-page-two-item-text"> | |
139 | - <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | |
140 | - <div class="main__employer-page-two-item-text-body"> | |
141 | - !! $Q->contacts_emails !!} | |
142 | - </div> | |
143 | - <div class="main__employer-page-two-item-text"> | |
144 | - <div class="main__employer-page-two-item-text-name">Или звоните:</div> | |
145 | - <div class="main__employer-page-two-item-text-body"> | |
146 | - !! $Q->contacts_telephones !!} | |
137 | + <div class="main__employer-page-two-item-bottom"> | |
138 | + <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y', strtotime($Q->updated_at)) }}</div> | |
139 | + <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js_vac_favorite js-toggle {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> | |
140 | + <svg> | |
141 | + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
142 | + </svg> | |
143 | + </button> | |
147 | 144 | </div> |
148 | - </div>--> | |
149 | - | |
150 | - <div class="main__employer-page-two-item-tags"> | |
151 | - @if (!empty($Q->jobs_code[0]->position_ship)) | |
152 | - <span class="main__employer-page-two-item-tag">#{{ $Q->jobs_code[0]->position_ship }}</span> | |
153 | - @else | |
154 | - @if (isset($Q->jobs)) | |
155 | - @foreach ($Q->jobs as $key => $j) | |
156 | - <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | |
157 | - @endforeach | |
158 | - @endif | |
159 | - @endif | |
160 | - </div> | |
161 | - <br> | |
162 | - <div class="main__employer-page-two-item-buttons"> | |
163 | - @guest | |
164 | - <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | |
165 | - class="button main__employer-page-two-item-button">Откликнуться</button> | |
166 | - @else | |
167 | - @if (App\Classes\StatusUser::Status()==1) | |
168 | - <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
169 | - class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> | |
170 | - @else | |
171 | - <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | |
172 | - class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | |
173 | - @endif | |
174 | - @endguest | |
175 | - </div> | |
176 | - <div class="main__employer-page-two-item-bottom"> | |
177 | - <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y', strtotime($Q->updated_at)) }}</div> | |
178 | - <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js_vac_favorite js-toggle {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> | |
179 | - <svg> | |
180 | - <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | |
181 | - </svg> | |
182 | - </button> | |
183 | 145 | </div> |
184 | - | |
185 | - </div> | |
186 | - | |
187 | 146 | @endforeach |
188 | 147 | |
189 | - <a href="{{ redirect()->back()->getTargetUrl() }}" class="back"> | |
190 | - <svg> | |
191 | - <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | |
192 | - </svg> | |
193 | - <span> | |
194 | - Вернуться к списку вакансий | |
195 | - </span> | |
196 | - </a> | |
148 | + <a href="{{ redirect()->back()->getTargetUrl() }}" class="back"> | |
149 | + <svg> | |
150 | + <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | |
151 | + </svg> | |
152 | + <span>Вернуться к списку вакансий</span> | |
153 | + </a> | |
197 | 154 | </div> |
198 | 155 | </main> |
199 | 156 | </div> |
resources/views/workers/cabinet.blade.php
... | ... | @@ -276,19 +276,10 @@ $user = $worker->users |
276 | 276 | </div> |
277 | 277 | </div> |
278 | 278 | </div> |
279 | - | |
280 | -<<<<<<< HEAD | |
281 | - <div class="width100"> | |
282 | - <h4 class="cabinet__h4 mb-10">О себе</h4> | |
283 | - <div>{{ $worker->text }}</div> | |
284 | - </div> | |
285 | -======= | |
286 | 279 | <div class="width100"> |
287 | 280 | <h4 class="cabinet__h4 mb-10">О себе</h4> |
288 | 281 | <div style="white-space:break-spaces; word-break: break-word;">{{ $worker->text }}</div> |
289 | 282 | </div> |
290 | ->>>>>>> c40f2b065cea930f5629b64a4516523032e7b56f | |
291 | - | |
292 | 283 | <div class=""> |
293 | 284 | <a href="{{ route('worker.basic_information') }}" class="button active">Редактировать основную информацию</a> |
294 | 285 | </div> |
routes/web.php
... | ... | @@ -266,7 +266,6 @@ Route::group([ |
266 | 266 | |
267 | 267 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); |
268 | 268 | |
269 | - //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | |
270 | 269 | /* |
271 | 270 | * кабинет - CRUD-операции по справочнику должности |
272 | 271 | * |
... | ... | @@ -455,6 +454,8 @@ Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like- |
455 | 454 | //Детальная страница вакансии - работодателя |
456 | 455 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); |
457 | 456 | |
457 | +Route::get('vacancy/{vacancy}', [AdEmployerController::class, 'getById'])->name('get-vacancy-by-id'); | |
458 | + | |
458 | 459 | //Судоходные компании |
459 | 460 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); |
460 | 461 | |
... | ... | @@ -674,7 +675,9 @@ Route::group([ |
674 | 675 | Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); |
675 | 676 | |
676 | 677 | // Отправил сообщение |
677 | - Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); | |
678 | + Route::post('сообщение/', [EmployerController::class, 'new_message']) | |
679 | + ->withoutMiddleware('is_employer') | |
680 | + ->name('new_message'); | |
678 | 681 | |
679 | 682 | Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat'); |
680 | 683 | Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat'); |