Commit a9dfa8c954400fe8212908cda8f39fbc6143f32b

Authored by Андрей Ларионов
1 parent 99a41e7618

Обновление на 7 марта

Showing 29 changed files with 839 additions and 271 deletions Inline Diff

app/Classes/StatusUser.php
File was created 1 <?php
2
3
4 namespace App\Classes;
5
6
7 class StatusUser
8 {
9 public static function Status() {
10 if (isset(Auth()->user()->id)) {
11 $is_worker = Auth()->user()->is_worker;
12 return $is_worker;
13 } else {
14 return false;
15 }
16 }
17 }
18
app/Http/Controllers/CompanyController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Models\Employer; 5 use App\Models\Employer;
6 use Illuminate\Http\Request; 6 use Illuminate\Http\Request;
7 7
8 class CompanyController extends Controller 8 class CompanyController extends Controller
9 { 9 {
10 public function shipping_companies(Request $request) { 10 public function shipping_companies(Request $request) {
11 $emps = Employer::query()->with('ads'); 11 $emps = Employer::query()->with('ads');
12 if ($request->get('search')) { 12 if (($request->has('search')) && (!empty($request->get('search')))) {
13 $search = $request->get('search'); 13 $search = $request->get('search');
14 $emps = $emps->where('name_company', 'LIKE', "%$search%"); 14 $emps = $emps->where('name_company', 'LIKE', "%$search%");
15 } 15 }
16 16
17 $count_emps = $emps->count(); 17 $count_emps = $emps->count();
18 18
19 if ($request->get('sort')) { 19 if ($request->get('sort')) {
20 $sort = $request->get('sort'); 20 $sort = $request->get('sort');
21 switch ($sort) { 21 switch ($sort) {
22 case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break; 22 case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break;
23 case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break; 23 case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break;
24 case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break; 24 case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break;
25 case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break; 25 case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break;
26 case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break; 26 case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break;
27 default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; 27 default: $emps = $emps->orderBy('id')->orderby('updated_at'); break;
28 } 28 }
29 } 29 }
30 30
31 $emps = $emps->paginate(4); 31 $emps = $emps->paginate(4);
32 32
33 if ($request->ajax()) { 33 if ($request->ajax()) {
34 if ($request->get('block') == '1') 34 if ($request->get('block') == '1')
35 return view('ajax.companies', compact('emps', 'count_emps')); 35 return view('ajax.companies', compact('emps', 'count_emps'));
36 else 36 else
37 return view('ajax.companies2', compact('emps', 'count_emps')); 37 return view('ajax.companies2', compact('emps', 'count_emps'));
38 } else { 38 } else {
39 return view('companies', compact('emps', 'count_emps')); 39 return view('companies', compact('emps', 'count_emps'));
40 } 40 }
41 } 41 }
42 42
43 public function info_company(Employer $company) { 43 public function info_company(Employer $company) {
44 $company = Employer::with('ads')->with('flots') 44 $user_id = Auth()->user()->id;
45 $company = Employer::with('ads')->with('flots')->with('users')
45 ->where('id', '=', $company->id)->get(); 46 ->where('id', '=', $company->id)->get();
46 $title = $company[0]->name_company; 47 $title = $company[0]->name_company;
47 return view('info_company', compact('company', 'title')); 48 return view('info_company', compact('company', 'user_id', 'title'));
48 } 49 }
49 } 50 }
50 51
app/Http/Controllers/MainController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Models\Ad_employer; 5 use App\Models\Ad_employer;
6 use App\Models\Category; 6 use App\Models\Category;
7 use App\Models\Education; 7 use App\Models\Education;
8 use App\Models\Employer; 8 use App\Models\Employer;
9 use App\Models\Job_title; 9 use App\Models\Job_title;
10 use App\Models\News; 10 use App\Models\News;
11 use App\Models\reclame; 11 use App\Models\reclame;
12 use Illuminate\Http\Request; 12 use Illuminate\Http\Request;
13 use Illuminate\Support\Facades\Auth; 13 use Illuminate\Support\Facades\Auth;
14 use Illuminate\Support\Facades\Validator; 14 use Illuminate\Support\Facades\Validator;
15 use App\Classes\StatusUser;
15 16
16 class MainController extends Controller 17 class MainController extends Controller
17 { 18 {
18 // Главная страница публичной части 19 // Главная страница публичной части
19 public function index() { 20 public function index() {
20 $news = News::query()->orderBy('id')->limit(6)->get(); 21 $news = News::query()->orderBy('id')->limit(6)->get();
21 22
22 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') 23 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*')
23 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') 24 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id')
24 ->OrderByDesc('created_at') 25 ->OrderByDesc('created_at')
25 ->GroupBy('categories.id') 26 ->GroupBy('categories.id')
26 ->get(); 27 ->get();
27 28
28 $employers = Employer::query()->orderBy('id')->limit(20)->get(); 29 $employers = Employer::query()->orderBy('id')->limit(20)->get();
29 30
30 return view('index', compact('news', 'categories', 'employers')); 31 return view('index', compact('news', 'categories', 'employers'));
31 } 32 }
32 33
33 public function search_vacancies(Request $request) { 34 public function search_vacancies(Request $request) {
34 if ($request->has('search')) { 35 if ($request->has('search')) {
35 $search = $request->get('search'); 36 $search = $request->get('search');
36 $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); 37 $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first();
37 if (isset($job_titles->id)) 38 if (isset($job_titles->id))
38 if ($job_titles->id > 0) 39 if ($job_titles->id > 0)
39 return redirect()->route('vacancies', ['job' => $job_titles->id]); 40 return redirect()->route('vacancies', ['job' => $job_titles->id]);
40 } 41 }
41 } 42 }
42 43
43 public function vacancies(Request $request) { 44 public function vacancies(Request $request) {
44 //должности 45 //должности
45 $Job_title = Job_title::query()->orderBy('name')->get(); 46 $Job_title = Job_title::query()->orderBy('name')->get();
46 47
47 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') 48 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*')
48 ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') 49 ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary')
49 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') 50 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id')
50 ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); 51 ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id');
51 52
52 //категории и вакансии 53 //категории и вакансии
53 if (($request->has('job')) && ($request->get('job') > 0)) { 54 if (($request->has('job')) && ($request->get('job') > 0)) {
54 $categories = $categories->Where('job_title_id', '=', $request->get('job')) 55 $categories = $categories->Where('job_title_id', '=', $request->get('job'))
55 ->OrderByDesc('created_at') 56 ->OrderByDesc('created_at')
56 ->GroupBy('categories.id') 57 ->GroupBy('categories.id')
57 ->get(); 58 ->get();
58 } else { 59 } else {
59 $categories = $categories->OrderByDesc('created_at') 60 $categories = $categories->OrderByDesc('created_at')
60 ->GroupBy('categories.id') 61 ->GroupBy('categories.id')
61 ->get(); 62 ->get();
62 } 63 }
63 64
64 if ($request->ajax()) { 65 if ($request->ajax()) {
65 return view('ajax.vacancies', compact('categories')); 66 return view('ajax.vacancies', compact('categories'));
66 } else { 67 } else {
67 return view('vacancies', compact('Job_title', 'categories')); 68 return view('vacancies', compact('Job_title', 'categories'));
68 } 69 }
69 } 70 }
70 71
71 //Вакансии категория детальная 72 //Вакансии категория детальная
72 public function list_vacancies(Category $categories, Request $request) { 73 public function list_vacancies(Category $categories, Request $request) {
74 if (isset(Auth()->user()->id))
75 $uid = Auth()->user()->id;
76 else
77 $uid = 0;
73 78
74 $Query = Ad_employer::with('jobs')-> 79 $Query = Ad_employer::with('jobs')->
75 with('cat')-> 80 with('cat')->
76 with('employer')-> 81 with('employer')->
77 whereHas('jobs_code', function ($query) use ($request) { 82 whereHas('jobs_code', function ($query) use ($request) {
78 if ($request->ajax()) { 83 if ($request->ajax()) {
79 if (null !== ($request->get('job'))) { 84 if (null !== ($request->get('job')) && ($request->get('job') !== 0)) {
80 $query->where('job_title_id', $request->get('job')); 85 $query->where('job_title_id', $request->get('job'));
81 } 86 }
82 } 87 }
83 }) 88 })
84 ->select('ad_employers.*'); 89 ->select('ad_employers.*');
85 90
91
92
86 if ($categories->id > 0) { 93 if ($categories->id > 0) {
87 $Query = $Query->where('category_id', '=', $categories->id); 94 $Query = $Query->where('category_id', '=', $categories->id);
88 $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); 95 $Name_categori = Category::query()->where('id', '=', $categories->id)->get();
89 } 96 }
90 97
98 if ($request->get('sort')) {
99 $sort = $request->get('sort');
100 switch ($sort) {
101 case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break;
102 case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break;
103 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break;
104 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break;
105 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break;
106 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break;
107 }
108 }
109
91 $Job_title = Job_title::query()->OrderBy('name')->get(); 110 $Job_title = Job_title::query()->OrderBy('name')->get();
92 111
93 $Query_count = $Query->count(); 112 $Query_count = $Query->count();
94 113
95 $Query = $Query->OrderBy('updated_at')->paginate(3); 114 $Query = $Query->OrderBy('updated_at')->paginate(3);
96 115
97 $Reclama = reclame::query()->limit(3)->get(); 116 $Reclama = reclame::query()->limit(3)->get();
98 117
99 118
100 119
101 if ($request->ajax()) { 120 if ($request->ajax()) {
102 return view('ajax.list_vacancies', compact('Query', 'Query_count', 'Name_categori', 'Reclama', 'categories')); 121 return view('ajax.list_vacancies', compact('Query',
122 'Query_count',
123 'Name_categori',
124 'Reclama',
125 'categories',
126 'uid'));
103 } else { 127 } else {
104 //Вернуть все 128 //Вернуть все
105 return view('list_vacancies', compact('Query', 129 return view('list_vacancies', compact('Query',
106 'Query_count', 130 'Query_count',
107 'Reclama', 131 'Reclama',
108 'Name_categori', 132 'Name_categori',
109 'categories', 133 'categories',
110 'Job_title')); 134 'Job_title',
135 'uid'));
111 } 136 }
112 } 137 }
113 138
114 // Образование 139 // Образование
115 public function education(Request $request) { 140 public function education(Request $request) {
116 $educations = Education::query(); 141 $educations = Education::query();
117 if ($request->has('search')) { 142 if (($request->has('search')) && (!empty($request->get('search')))) {
118 $search = trim($request->has('search')); 143 $search = trim($request->get('search'));
119 $educations = $educations->where('name', 'LIKE', "%$search%"); 144 $educations = $educations->where('name', 'LIKE', "%$search%");
120 } 145 }
146
147 if ($request->get('sort')) {
148 $sort = $request->get('sort');
149 switch ($sort) {
150 case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break;
151 case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break;
152 case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break;
153 case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break;
154 case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break;
155 default: $educations = $educations->orderBy('id')->orderby('updated_at'); break;
156 }
157 }
158
121 $count_edu = $educations->count(); 159 $count_edu = $educations->count();
122 $educations = $educations->paginate(6); 160 $educations = $educations->paginate(6);
123 return view('education', compact('educations', 'count_edu')); 161 if ($request->ajax()) {
162 return view('ajax.education', compact('educations'));
163 } else {
164 return view('education', compact('educations', 'count_edu'));
165 }
124 } 166 }
125 167
126 // Контакты 168 // Контакты
127 public function contacts() { 169 public function contacts() {
128 return view('contacts'); 170 return view('contacts');
129 } 171 }
130 172
131 // Вход в личный кабинет 173 // Вход в личный кабинет
132 public function input_login(Request $request) 174 public function input_login(Request $request)
133 { 175 {
134 $rules = [ 176 $rules = [
135 'email' => 'required|string|email', 177 'email' => 'required|string|email',
136 'password' => 'required|string', 178 'password' => 'required|string',
137 ]; 179 ];
138 180
139 $messages = [ 181 $messages = [
140 'required' => 'Укажите обязательное поле «:attribute»', 182 'required' => 'Укажите обязательное поле «:attribute»',
141 'email' => 'Введите корректный email', 183 'email' => 'Введите корректный email',
142 'min' => [ 184 'min' => [
143 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 185 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
144 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 186 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
145 ], 187 ],
146 'max' => [ 188 'max' => [
147 'string' => 'Поле «:attribute» должно быть не больше :max символов', 189 'string' => 'Поле «:attribute» должно быть не больше :max символов',
148 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 190 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
149 ], 191 ],
150 ]; 192 ];
151 193
152 $validator = Validator::make($request->all(), $rules, $messages); 194 $validator = Validator::make($request->all(), $rules, $messages);
153 195
154 if ($validator->fails()) { 196 if ($validator->fails()) {
155 return redirect()->route('index')->with('Error', "Email или пароль невалидный"); 197 return redirect()->route('index')->with('Error', "Email или пароль невалидный");
156 } else { 198 } else {
157 $credentials = $request->only('email', 'password'); 199 $credentials = $request->only('email', 'password');
158 200
159 if (Auth::attempt($credentials, $request->has('remember'))) { 201 if (Auth::attempt($credentials, $request->has('remember'))) {
160 202
161 if (is_null(Auth::user()->email_verified_at)) { 203 if (is_null(Auth::user()->email_verified_at)) {
162 Auth::logout(); 204 Auth::logout();
163 return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); 205 return json_encode(Array("ERROR" => "Адрес почты не подтвержден"));
164 } 206 }
165 207
166 if (Auth::user()->is_worker) { 208 if (Auth::user()->is_worker) {
167 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); 209 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));
168 } else { 210 } else {
169 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); 211 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));
170 } 212 }
171 213
172 return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); 214 return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет"));
173 //->route('index') 215 //->route('index')
174 //->with('success', 'Вы вошли в личный кабинет.'); 216 //->with('success', 'Вы вошли в личный кабинет.');
175 } else { 217 } else {
176 return json_encode(Array("ERROR" => "Неверный логин или пароль!")); 218 return json_encode(Array("ERROR" => "Неверный логин или пароль!"));
177 } 219 }
178 } 220 }
179 } 221 }
180 } 222 }
181 223
app/Http/Controllers/WorkerController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Classes\RusDate; 5 use App\Classes\RusDate;
6 use App\Http\Requests\DocumentsRequest;
6 use App\Models\Ad_employer; 7 use App\Models\Ad_employer;
8 use App\Models\ad_response;
7 use App\Models\Category; 9 use App\Models\Category;
8 use App\Models\Dop_info; 10 use App\Models\Dop_info;
9 use App\Models\Employer; 11 use App\Models\Employer;
10 use App\Models\infobloks; 12 use App\Models\infobloks;
11 use App\Models\Job_title; 13 use App\Models\Job_title;
12 use App\Models\Message; 14 use App\Models\Message;
15 use App\Models\place_works;
13 use App\Models\reclame; 16 use App\Models\reclame;
14 use App\Models\sertification; 17 use App\Models\sertification;
15 use App\Models\Static_worker; 18 use App\Models\Static_worker;
16 use App\Models\User; 19 use App\Models\User;
17 use App\Models\User as User_Model; 20 use App\Models\User as User_Model;
18 use App\Models\Worker; 21 use App\Models\Worker;
19 use Carbon\Carbon; 22 use Carbon\Carbon;
20 use Illuminate\Auth\Events\Registered; 23 use Illuminate\Auth\Events\Registered;
21 use Illuminate\Database\Eloquent\Builder; 24 use Illuminate\Database\Eloquent\Builder;
22 use Illuminate\Http\JsonResponse; 25 use Illuminate\Http\JsonResponse;
23 use Illuminate\Http\Request; 26 use Illuminate\Http\Request;
24 use Illuminate\Support\Facades\Auth; 27 use Illuminate\Support\Facades\Auth;
25 use Illuminate\Support\Facades\Hash; 28 use Illuminate\Support\Facades\Hash;
26 use Illuminate\Support\Facades\Storage; 29 use Illuminate\Support\Facades\Storage;
27 use Illuminate\Support\Facades\Validator; 30 use Illuminate\Support\Facades\Validator;
28 31
29 class WorkerController extends Controller 32 class WorkerController extends Controller
30 { 33 {
31 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); 34 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу');
32 35
33 //профиль 36 //профиль
34 public function profile(Worker $worker) 37 public function profile(Worker $worker)
35 { 38 {
36 $get_date = date('Y.m'); 39 $get_date = date('Y.m');
37 40
38 $c = Static_worker::query()->where('year_month', '=', $get_date) 41 $c = Static_worker::query()->where('year_month', '=', $get_date)
39 ->where('user_id', '=', $worker->users->id) 42 ->where('user_id', '=', $worker->users->id)
40 ->get(); 43 ->get();
41 44
42 if ($c->count() > 0) { 45 if ($c->count() > 0) {
43 $upd = Static_worker::find($c[0]->id); 46 $upd = Static_worker::find($c[0]->id);
44 $upd->lookin = $upd->lookin + 1; 47 $upd->lookin = $upd->lookin + 1;
45 $upd->save(); 48 $upd->save();
46 } else { 49 } else {
47 $crt = new Static_worker(); 50 $crt = new Static_worker();
48 $crt->lookin = 1; 51 $crt->lookin = 1;
49 $crt->year_month = $get_date; 52 $crt->year_month = $get_date;
50 $crt->user_id = $worker->user_id; 53 $crt->user_id = $worker->user_id;
51 $crt->save(); 54 $crt->save();
52 } 55 }
53 56
54 $stat = Static_worker::query()->where('year_month', '=', $get_date) 57 $stat = Static_worker::query()->where('year_month', '=', $get_date)
55 ->where('user_id', '=', $worker->users->id) 58 ->where('user_id', '=', $worker->users->id)
56 ->get(); 59 ->get();
57 60
58 return view('public.workers.profile', compact('worker', 'stat')); 61 return view('public.workers.profile', compact('worker', 'stat'));
59 } 62 }
60 63
61 // лист база резюме 64 // лист база резюме
62 public function bd_resume() 65 public function bd_resume()
63 { 66 {
64 $status_work = $this->status_work; 67 $status_work = $this->status_work;
65 $resumes = Worker::query()->with('users')->with('job_titles'); 68 $resumes = Worker::query()->with('users')->with('job_titles');
66 69
67 $res_count = $resumes->count(); 70 $res_count = $resumes->count();
68 $resumes = $resumes->paginate(5); 71 $resumes = $resumes->paginate(5);
69 72
70 return view('resume', compact('resumes', 'status_work', 'res_count')); 73 return view('resume', compact('resumes', 'status_work', 'res_count'));
71 } 74 }
72 75
73 // анкета соискателя 76 // анкета соискателя
74 public function resume_profile(Worker $worker) 77 public function resume_profile(Worker $worker)
75 { 78 {
76 $status_work = $this->status_work; 79 $status_work = $this->status_work;
77 $Query = Worker::query()->with('users')->with('job_titles') 80 $Query = Worker::query()->with('users')->with('job_titles')
78 ->with('place_worker')->with('sertificate')->with('prev_company') 81 ->with('place_worker')->with('sertificate')->with('prev_company')
79 ->with('infobloks'); 82 ->with('infobloks');
80 $Query = $Query->where('id', '=', $worker->id); 83 $Query = $Query->where('id', '=', $worker->id);
81 $Query = $Query->get(); 84 $Query = $Query->get();
82 return view('worker', compact('Query', 'status_work')); 85 return view('worker', compact('Query', 'status_work'));
83 } 86 }
84 87
85 // скачать анкету соискателя 88 // скачать анкету соискателя
86 public function resume_download(Worker $worker) 89 public function resume_download(Worker $worker)
87 { 90 {
88 print_r('Резюме для скачивания'); 91 print_r('Резюме для скачивания');
89 } 92 }
90 93
91 // Кабинет работника 94 // Кабинет работника
92 public function cabinet() 95 public function cabinet()
93 { 96 {
94 $id = Auth()->user()->id; 97 $id = Auth()->user()->id;
95 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> 98 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')->
96 with('infobloks')->with('place_worker')-> 99 with('infobloks')->with('place_worker')->
97 WhereHas('users', 100 WhereHas('users',
98 function (Builder $query) use ($id) {$query->Where('id', $id); 101 function (Builder $query) use ($id) {$query->Where('id', $id);
99 })->get(); 102 })->get();
100 103
101 $Job_titles = Job_title::query()->OrderBy('name')->get(); 104 $Job_titles = Job_title::query()->OrderBy('name')->get();
102 $Infoblocks = infobloks::query()->OrderBy('name')->get(); 105 $Infoblocks = infobloks::query()->OrderBy('name')->get();
103 106
104 return view('workers.cabinet', compact('Worker', 'Job_titles', 'Infoblocks')); 107 return view('workers.cabinet', compact('Worker', 'Job_titles', 'Infoblocks'));
105 } 108 }
106 109
107 // Сохранение данных 110 // Сохранение данных
108 public function cabinet_save(Worker $worker, Request $request) 111 public function cabinet_save(Worker $worker, Request $request)
109 { 112 {
110 $id = $worker->id; 113 $id = $worker->id;
111 $params = $request->all(); 114 $params = $request->all();
112 115
113 $job_title_id = $request->get('job_title_id'); 116 $job_title_id = $request->get('job_title_id');
114 117
115 unset($params['new_diplom']); 118 unset($params['new_diplom']);
116 unset($params['new_data_begin']); 119 unset($params['new_data_begin']);
117 unset($params['new_data_end']); 120 unset($params['new_data_end']);
118 unset($params['new_job_title']); 121 unset($params['new_job_title']);
119 unset($params['new_teplohod']); 122 unset($params['new_teplohod']);
120 unset($params['new_GWT']); 123 unset($params['new_GWT']);
121 unset($params['new_KBT']); 124 unset($params['new_KBT']);
122 unset($params['new_Begin_work']); 125 unset($params['new_Begin_work']);
123 unset($params['new_End_work']); 126 unset($params['new_End_work']);
124 unset($params['new_name_company']); 127 unset($params['new_name_company']);
125 128
126 $rules = [ 129 $rules = [
127 'surname' => ['required', 'string', 'max:255'], 130 'surname' => ['required', 'string', 'max:255'],
128 'name_man' => ['required', 'string', 'max:255'], 131 'name_man' => ['required', 'string', 'max:255'],
129 'email' => ['required', 'string', 'email', 'max:255'], 132 'email' => ['required', 'string', 'email', 'max:255'],
130 133
131 ]; 134 ];
132 135
133 $messages = [ 136 $messages = [
134 'required' => 'Укажите обязательное поле', 137 'required' => 'Укажите обязательное поле',
135 'min' => [ 138 'min' => [
136 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 139 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
137 'integer' => 'Поле «:attribute» должно быть :min или больше', 140 'integer' => 'Поле «:attribute» должно быть :min или больше',
138 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 141 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
139 ], 142 ],
140 'max' => [ 143 'max' => [
141 'string' => 'Поле «:attribute» должно быть не больше :max символов', 144 'string' => 'Поле «:attribute» должно быть не больше :max символов',
142 'integer' => 'Поле «:attribute» должно быть :max или меньше', 145 'integer' => 'Поле «:attribute» должно быть :max или меньше',
143 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 146 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
144 ] 147 ]
145 ]; 148 ];
146 149
147 $validator = Validator::make($params, $rules, $messages); 150 $validator = Validator::make($params, $rules, $messages);
148 151
149 if ($validator->fails()) { 152 if ($validator->fails()) {
150 return redirect()->route('worker.cabinet')->withErrors($validator); 153 return redirect()->route('worker.cabinet')->withErrors($validator);
151 } else { 154 } else {
152 155
153 if ($request->has('photo')) { 156 if ($request->has('photo')) {
154 if (!empty($Worker->photo)) { 157 if (!empty($Worker->photo)) {
155 Storage::delete($Worker->photo); 158 Storage::delete($Worker->photo);
156 } 159 }
157 $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); 160 $params['photo'] = $request->file('photo')->store("worker/$id", 'public');
158 } 161 }
159 162
160 if ($request->has('file')) { 163 if ($request->has('file')) {
161 if (!empty($Worker->file)) { 164 if (!empty($Worker->file)) {
162 Storage::delete($Worker->file); 165 Storage::delete($Worker->file);
163 } 166 }
164 $params['file'] = $request->file('file')->store("worker/$id", 'public'); 167 $params['file'] = $request->file('file')->store("worker/$id", 'public');
165 } 168 }
166 169
167 $id_wor = $worker->update($params); 170 $id_wor = $worker->update($params);
168 171
169 $use = User_Model::find($id_wor); 172 $use = User_Model::find($id_wor);
170 $use->surname = $request->get('surname'); 173 $use->surname = $request->get('surname');
171 $use->name_man = $request->get('name_man'); 174 $use->name_man = $request->get('name_man');
172 $use->surname2 = $request->get('surname2'); 175 $use->surname2 = $request->get('surname2');
173 176
174 $use->save(); 177 $use->save();
175 $worker->job_titles()->sync($job_title_id); 178 $worker->job_titles()->sync($job_title_id);
176 179
177 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); 180 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены');
178 } 181 }
179 } 182 }
180 183
181 // Сообщения данные 184 // Сообщения данные
182 public function messages($type_message) 185 public function messages($type_message)
183 { 186 {
184 $user_id = Auth()->user()->id; 187 $user_id = Auth()->user()->id;
185 188
186 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 189 $messages_input = Message::query()->with('vacancies')->with('user_from')->
187 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 190 Where('to_user_id', $user_id)->OrderByDesc('created_at');
188 191
189 $messages_output = Message::query()->with('vacancies')-> 192 $messages_output = Message::query()->with('vacancies')->
190 with('user_to')->where('user_id', $user_id)-> 193 with('user_to')->where('user_id', $user_id)->
191 OrderByDesc('created_at'); 194 OrderByDesc('created_at');
192 195
193 196
194 $count_input = $messages_input->count(); 197 $count_input = $messages_input->count();
195 $count_output = $messages_output->count(); 198 $count_output = $messages_output->count();
196 199
197 if ($type_message == 'input') { 200 if ($type_message == 'input') {
198 $messages = $messages_input->paginate(15); 201 $messages = $messages_input->paginate(15);
199 } 202 }
200 203
201 if ($type_message == 'output') { 204 if ($type_message == 'output') {
202 $messages = $messages_output->paginate(15); 205 $messages = $messages_output->paginate(15);
203 } 206 }
204 // Вернуть все 100% 207 // Вернуть все 100%
205 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 208 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
206 } 209 }
207 210
208 // Избранный 211 // Избранный
209 public function favorite() 212 public function favorite()
210 { 213 {
211 return view('workers.favorite'); 214 return view('workers.favorite');
212 } 215 }
213 216
214 // Сменить пароль 217 // Сменить пароль
215 public function new_password() 218 public function new_password()
216 { 219 {
217 $email = Auth()->user()->email; 220 $email = Auth()->user()->email;
218 return view('workers.new_password', compact('email')); 221 return view('workers.new_password', compact('email'));
219 } 222 }
220 223
221 // Обновление пароля 224 // Обновление пароля
222 public function save_new_password(Request $request) { 225 public function save_new_password(Request $request) {
223 $use = Auth()->user(); 226 $use = Auth()->user();
224 $request->validate([ 227 $request->validate([
225 'password' => 'required|string', 228 'password' => 'required|string',
226 'new_password' => 'required|string', 229 'new_password' => 'required|string',
227 'new_password2' => 'required|string' 230 'new_password2' => 'required|string'
228 ]); 231 ]);
229 232
230 if ($request->get('new_password') == $request->get('new_password2')) 233 if ($request->get('new_password') == $request->get('new_password2'))
231 if ($request->get('password') !== $request->get('new_password')) { 234 if ($request->get('password') !== $request->get('new_password')) {
232 $credentials = $request->only('email', 'password'); 235 $credentials = $request->only('email', 'password');
233 if (Auth::attempt($credentials)) { 236 if (Auth::attempt($credentials)) {
234 237
235 if (!is_null($use->email_verified_at)){ 238 if (!is_null($use->email_verified_at)){
236 239
237 $user_data = User_Model::find($use->id); 240 $user_data = User_Model::find($use->id);
238 $user_data->update([ 241 $user_data->update([
239 'password' => Hash::make($request->get('new_password')), 242 'password' => Hash::make($request->get('new_password')),
240 'pubpassword' => base64_encode($request->get('new_password')), 243 'pubpassword' => base64_encode($request->get('new_password')),
241 ]); 244 ]);
242 return redirect() 245 return redirect()
243 ->route('worker.new_password') 246 ->route('worker.new_password')
244 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 247 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
245 } 248 }
246 249
247 return redirect() 250 return redirect()
248 ->route('worker.new_password') 251 ->route('worker.new_password')
249 ->withError('Данная учетная запись не было верифицированна!'); 252 ->withError('Данная учетная запись не было верифицированна!');
250 } 253 }
251 } 254 }
252 255
253 return redirect() 256 return redirect()
254 ->route('worker.new_password') 257 ->route('worker.new_password')
255 ->withErrors('Не совпадение данных, обновите пароли!'); 258 ->withErrors('Не совпадение данных, обновите пароли!');
256 } 259 }
257 260
258 // Удаление профиля форма 261 // Удаление профиля форма
259 public function delete_profile() 262 public function delete_profile()
260 { 263 {
261 $login = Auth()->user()->email; 264 $login = Auth()->user()->email;
262 return view('workers.delete_profile', compact('login')); 265 return view('workers.delete_profile', compact('login'));
263 } 266 }
264 267
265 // Удаление профиля код 268 // Удаление профиля код
266 public function delete_profile_result(Request $request) { 269 public function delete_profile_result(Request $request) {
267 $Answer = $request->all(); 270 $Answer = $request->all();
268 $user_id = Auth()->user()->id; 271 $user_id = Auth()->user()->id;
269 $request->validate([ 272 $request->validate([
270 'password' => 'required|string', 273 'password' => 'required|string',
271 ]); 274 ]);
272 275
273 $credentials = $request->only('email', 'password'); 276 $credentials = $request->only('email', 'password');
274 if (Auth::attempt($credentials)) { 277 if (Auth::attempt($credentials)) {
275 Auth::logout(); 278 Auth::logout();
276 $it = User_Model::find($user_id); 279 $it = User_Model::find($user_id);
277 //$it->delete(); 280 //$it->delete();
278 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 281 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
279 } else { 282 } else {
280 return redirect()->route('worker.delete_profile') 283 return redirect()->route('worker.delete_profile')
281 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 284 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
282 } 285 }
283 } 286 }
284 287
285 // Регистрация соискателя 288 // Регистрация соискателя
286 public function register_worker(Request $request) 289 public function register_worker(Request $request)
287 { 290 {
288 $params = $request->all(); 291 $params = $request->all();
289 292
290 $rules = [ 293 $rules = [
291 'surname' => ['required', 'string', 'max:255'], 294 'surname' => ['required', 'string', 'max:255'],
292 'name_man' => ['required', 'string', 'max:255'], 295 'name_man' => ['required', 'string', 'max:255'],
293 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 296 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
294 'password' => ['required', 'string', 'min:8'], 297 'password' => ['required', 'string', 'min:8'],
295 ]; 298 ];
296 299
297 $messages = [ 300 $messages = [
298 'required' => 'Укажите обязательное поле', 301 'required' => 'Укажите обязательное поле',
299 'min' => [ 302 'min' => [
300 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 303 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
301 'integer' => 'Поле «:attribute» должно быть :min или больше', 304 'integer' => 'Поле «:attribute» должно быть :min или больше',
302 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 305 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
303 ], 306 ],
304 'max' => [ 307 'max' => [
305 'string' => 'Поле «:attribute» должно быть не больше :max символов', 308 'string' => 'Поле «:attribute» должно быть не больше :max символов',
306 'integer' => 'Поле «:attribute» должно быть :max или меньше', 309 'integer' => 'Поле «:attribute» должно быть :max или меньше',
307 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 310 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
308 ] 311 ]
309 ]; 312 ];
310 313
311 314
312 315
313 316
314 if ($request->get('password') !== $request->get('confirmed')){ 317 if ($request->get('password') !== $request->get('confirmed')){
315 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 318 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
316 } 319 }
317 320
318 $validator = Validator::make($request->all(), $rules, $messages); 321 $validator = Validator::make($request->all(), $rules, $messages);
319 322
320 if ($validator->fails()) { 323 if ($validator->fails()) {
321 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 324 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
322 } else { 325 } else {
323 $user = $this->create($params); 326 $user = $this->create($params);
324 event(new Registered($user)); 327 event(new Registered($user));
325 328
326 Auth::guard()->login($user); 329 Auth::guard()->login($user);
327 } 330 }
328 if ($user) { 331 if ($user) {
329 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; 332 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));;
330 } else { 333 } else {
331 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 334 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
332 } 335 }
333 } 336 }
334 337
335 // Создание пользователя 338 // Создание пользователя
336 protected function create(array $data) 339 protected function create(array $data)
337 { 340 {
338 $Use = new User(); 341 $Use = new User();
339 $Code_user = $Use->create([ 342 $Code_user = $Use->create([
340 'name' => $data['surname']." ".$data['name_man'], 343 'name' => $data['surname']." ".$data['name_man'],
341 'name_man' => $data['name_man'], 344 'name_man' => $data['name_man'],
342 'surname' => $data['surname'], 345 'surname' => $data['surname'],
343 'surname2' => $data['surname2'], 346 'surname2' => $data['surname2'],
344 'subscribe_email' => $data['email'], 347 'subscribe_email' => $data['email'],
345 'email' => $data['email'], 348 'email' => $data['email'],
346 'telephone' => $data['telephone'], 349 'telephone' => $data['telephone'],
347 'password' => Hash::make($data['password']), 350 'password' => Hash::make($data['password']),
348 'pubpassword' => base64_encode($data['password']), 351 'pubpassword' => base64_encode($data['password']),
349 'email_verified_at' => Carbon::now() 352 'email_verified_at' => Carbon::now()
350 ]); 353 ]);
351 if ($Code_user->id > 0) { 354 if ($Code_user->id > 0) {
352 $Worker = new Worker(); 355 $Worker = new Worker();
353 $Worker->user_id = $Code_user->id; 356 $Worker->user_id = $Code_user->id;
354 $Worker->position_work = $data['job_titles']; 357 $Worker->position_work = $data['job_titles'];
355 $Worker->email = $data['email']; 358 $Worker->email = $data['email'];
356 $Worker->telephone = $data['telephone']; 359 $Worker->telephone = $data['telephone'];
357 $Worker->save(); 360 $Worker->save();
358 361
359 return $Code_user; 362 return $Code_user;
360 } 363 }
361 } 364 }
362 365
363 // Борьба против колорадских жуков, хотя жуков победил все таки 45. 366 // Борьба против колорадских жуков, хотя жуков победил все таки 45.
364 public function colorado(Request $request) { 367 public function colorado(Request $request) {
365 if (isset($_COOKIE['favorite_vac'])) { 368 if (isset($_COOKIE['favorite_vac'])) {
366 $items = RusDate::count_vacancy_fav(); 369 $items = RusDate::count_vacancy_fav();
367 $it = $_COOKIE['favorite_vac']; 370 $it = $_COOKIE['favorite_vac'];
368 $it = str_replace('"', "", $it); 371 $it = str_replace('"', "", $it);
369 $it = str_replace('[', "", $it); 372 $it = str_replace('[', "", $it);
370 $it = str_replace(']', "", $it); 373 $it = str_replace(']', "", $it);
371 $Arr = explode(",", $it); 374 $Arr = explode(",", $it);
372 } else { 375 } else {
373 $Arr = Array(); 376 $Arr = Array();
374 } 377 }
375 378
376 $Query = Ad_employer::Query(); 379 $Query = Ad_employer::Query();
377 if (count($Arr) > 0) { 380 if (count($Arr) > 0) {
378 $Query = $Query->whereIn('id', $Arr); 381 $Query = $Query->whereIn('id', $Arr);
379 } 382 }
380 $Query = $Query->with('jobs')-> 383 $Query = $Query->with('jobs')->
381 with('cat')-> 384 with('cat')->
382 with('employer')-> 385 with('employer')->
383 whereHas('jobs_code', function ($query) use ($request) { 386 whereHas('jobs_code', function ($query) use ($request) {
384 if ($request->ajax()) { 387 if ($request->ajax()) {
385 if (null !== ($request->get('job'))) { 388 if (null !== ($request->get('job'))) {
386 $query->where('job_title_id', $request->get('job')); 389 $query->where('job_title_id', $request->get('job'));
387 } 390 }
388 } 391 }
389 })->select('ad_employers.*'); 392 })->select('ad_employers.*');
390 393
391 $Job_title = Job_title::query()->OrderBy('name')->get(); 394 $Job_title = Job_title::query()->OrderBy('name')->get();
392 395
393 $Query_count = $Query->count(); 396 $Query_count = $Query->count();
394 397
395 $Query = $Query->OrderBy('updated_at')->paginate(3); 398 $Query = $Query->OrderBy('updated_at')->paginate(3);
396 399
397 return view('workers.favorite', compact('Query', 400 return view('workers.favorite', compact('Query',
398 'Query_count', 401 'Query_count',
399 'Job_title')); 402 'Job_title'));
400 403
401 } 404 }
402 405
403 //Переписка пись-пись-пись 406 //Переписка пись-пись-пись
404 public function dialog(User_Model $user1, User_Model $user2) { 407 public function dialog(User_Model $user1, User_Model $user2) {
405 if (isset($user2->id)) { 408 if (isset($user2->id)) {
406 $companion = User_Model::query()->with('workers')-> 409 $companion = User_Model::query()->with('workers')->
407 with('employers')-> 410 with('employers')->
408 where('id', $user2->id)->first(); 411 where('id', $user2->id)->first();
409 } 412 }
410 413
411 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 414 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
412 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 415 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
413 })->orWhere(function($query) use ($user1, $user2) { 416 })->orWhere(function($query) use ($user1, $user2) {
414 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 417 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
415 })->OrderBy('created_at')->get(); 418 })->OrderBy('created_at')->get();
416 419
417 $id_vac = null; 420 $id_vac = null;
418 foreach ($Messages as $it) { 421 foreach ($Messages as $it) {
419 if (isset($it->response)) { 422 if (isset($it->response)) {
420 foreach ($it->response as $r) { 423 foreach ($it->response as $r) {
421 if (isset($r->ad_employer_id)) { 424 if (isset($r->ad_employer_id)) {
422 $id_vac = $r->ad_employer_id; 425 $id_vac = $r->ad_employer_id;
423 break; 426 break;
424 } 427 }
425 } 428 }
426 } 429 }
427 if (!is_null($id_vac)) break; 430 if (!is_null($id_vac)) break;
428 } 431 }
429 432
430 $ad_employer = null; 433 $ad_employer = null;
431 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 434 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
432 $sender = $user1; 435 $sender = $user1;
433 436
434 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 437 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
435 } 438 }
436 439
437 // Даунлоады 440 // Даунлоады
438 public function download(Worker $worker) { 441 public function download(Worker $worker) {
439 442
440 } 443 }
441 444
442 // Поднятие анкеты 445 // Поднятие анкеты
443 public function up(Worker $worker) { 446 public function up(Worker $worker) {
444 $worker->updated_at = Carbon::now(); 447 $worker->updated_at = Carbon::now();
445 $worker->save(); 448 $worker->save();
446 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); 449 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных');
447 } 450 }
448 451
449 // Добавление сертификата 452 // Добавление сертификата
450 public function add_serificate(Request $request) { 453 public function add_serificate(Request $request) {
451 $params = $request->all(); 454 $params = $request->all();
452 $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); 455 $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin']));
453 $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); 456 $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin']));
454 $Sertificate = new sertification(); 457 $Sertificate = new sertification();
455 $Sertificate->create($params); 458 $Sertificate->create($params);
456 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); 459 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get();
457 return view('ajax.documents', compact('Docs')); 460 return view('ajax.documents', compact('Docs'));
458 } 461 }
459 462
460 463
461 // Удалить сертификат 464 // Удалить сертификат
462 public function delete_sertificate(sertification $doc) { 465 public function delete_sertificate(sertification $doc) {
463 $doc->delete(); 466 $doc->delete();
464 467
465 return redirect()->route('worker.cabinet'); 468 return redirect()->route('worker.cabinet');
466 } 469 }
467 470
468 // Добавление диплома 471 // Добавление диплома
469 public function add_diplom_ajax(Request $request) { 472 public function add_diplom_ajax(Request $request) {
470 // конец 473 // конец
471 $params = $request->all(); 474 $params = $request->all();
472 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 475 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
473 476
474 if ($count == 0) $dop_info = Dop_info::create($params); 477 if ($count == 0) $dop_info = Dop_info::create($params);
475 $Infoblocks = infobloks::query()->get(); 478 $Infoblocks = infobloks::query()->get();
476 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); 479 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get();
477 $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); 480 $data = Dop_info::query()->where('worker_id', $request->has('worker_id'));
478 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); 481 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker'));
479 } 482 }
480 483
481 // Добавление диплома без ajax 484 // Добавление диплома без ajax
482 public function add_diplom(Worker $worker) { 485 public function add_diplom(Worker $worker) {
483 $worker_id = $worker->id; 486 $worker_id = $worker->id;
484 $Infoblocks = infobloks::query()->get(); 487 $Infoblocks = infobloks::query()->get();
485 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); 488 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks'));
486 } 489 }
487 // Сохранить 490 // Сохранить
488 // Сохраняю диплом 491 // Сохраняю диплом
489 public function add_diplom_save(Request $request) { 492 public function add_diplom_save(Request $request) {
490 $params = $request->all(); 493 $params = $request->all();
491 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 494 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
492 if ($count == 0) $dop_info = Dop_info::create($params); 495 if ($count == 0) $dop_info = Dop_info::create($params);
493 return redirect()->route('worker.cabinet'); 496 return redirect()->route('worker.cabinet');
494 } 497 }
498
499 // Добавление стандартного документа
500 public function add_document(Worker $worker) {
501 return view('workers.docs', compact('worker'));
502 }
503
504 //Сохранение стандартого документа
505 public function add_document_save(DocumentsRequest $request) {
506 $params = $request->all();
507 $place_work = place_works::create($params);
508 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!');
509 }
510
511 // Редактирование документа
512 public function edit_document(place_works $doc, Worker $worker) {
513 return view('workers.docs-edit', compact('doc', 'worker'));
514 }
515
516 //Сохранение отредактированного документа
517 public function edit_document_save(DocumentsRequest $request, place_works $doc) {
518 $params = $request->all();
519 $doc->update($params);
520
521 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
522 }
523
524 // Удаление документа
525 public function delete_document(place_works $doc) {
526 $doc->delete();
527 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!');
528 }
529
530 //Отправка нового сообщения
531 public function new_message(Request $request) {
532 $params = $request->all();
533
534 $id = $params['send_user_id'];
535 $message = new Message();
536 $message->user_id = $params['send_user_id'];
537 $message->to_user_id = $params['send_to_user_id'];
538 $message->title = $params['send_title'];
539 $message->text = $params['send_text'];
540 if ($request->has('send_file')) {
541 $message->file = $request->file('send_file')->store("worker/$id", 'public');
542 }
543 $message->flag_new = 1;
544 $id_message = $message->save();
545
546 $data['message_id'] = $id_message;
547 $data['ad_employer_id'] = $params['send_vacancy'];
548 $data['job_title_id'] = $params['send_job_title_id'];
549 $data['flag'] = 1;
550 $ad_responce = ad_response::create($data);
551 return redirect()->route('worker.messages', ['type_message' => 'output']);
552 }
495 } 553 }
496 554
497 555
app/Http/Requests/DocumentsRequest.php
File was created 1 <?php
2
3 namespace App\Http\Requests;
4
5 use Illuminate\Foundation\Http\FormRequest;
6
7 class DocumentsRequest extends FormRequest
8 {
9 /**
10 * Determine if the user is authorized to make this request.
11 *
12 * @return bool
13 */
14 public function authorize()
15 {
16 return true;
17 }
18
19 /**
20 * Get the validation rules that apply to the request.
21 *
22 * @return array<string, mixed>
23 */
24 public function rules()
25 {
26 return [
27 'job_title' => ['required', 'string', 'max:255'],
28 'teplohod' => ['required', 'string', 'max:255'],
29 'name_company' => ['required', 'string', 'max:255'],
30 ];
31 }
32
33 public function messages() {
34 return [
35 'required' => 'Укажите обязательное поле «:attribute»',
36 'min' => [
37 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
38 'integer' => 'Поле «:attribute» должно быть :min или больше',
39 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
40 ],
41 'max' => [
42 'string' => 'Поле «:attribute» должно быть не больше :max символов',
43 'integer' => 'Поле «:attribute» должно быть :max или меньше',
44 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
45 ]];
46 }
47 }
48
app/Models/place_works.php
1 <?php 1 <?php
2 2
3 namespace App\Models; 3 namespace App\Models;
4 4
5 use Illuminate\Database\Eloquent\Factories\HasFactory; 5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model; 6 use Illuminate\Database\Eloquent\Model;
7 7
8 class place_works extends Model 8 class place_works extends Model
9 { 9 {
10 use HasFactory; 10 use HasFactory;
11
12 public $fillable = [
13 'job_title',
14 'tanker',
15 'teplohod',
16 'GWT',
17 'KBT',
18 'Begin_work',
19 'End_work',
20 'name_company',
21 'worker_id'
22 ];
11 } 23 }
12 24
app/Providers/MyServiceProvider.php
1 <?php 1 <?php
2 2
3 namespace App\Providers; 3 namespace App\Providers;
4 4
5 use App\Models\Company; 5 use App\Models\Company;
6 use App\Models\ContentRoles; 6 use App\Models\ContentRoles;
7 use App\Models\Employer; 7 use App\Models\Employer;
8 use App\Models\Job_title; 8 use App\Models\Job_title;
9 use App\Models\Worker; 9 use App\Models\Worker;
10 use Illuminate\Support\Facades\Auth; 10 use Illuminate\Support\Facades\Auth;
11 use Illuminate\Support\Facades\DB; 11 use Illuminate\Support\Facades\DB;
12 use Illuminate\Support\Facades\View; 12 use Illuminate\Support\Facades\View;
13 use Illuminate\Support\ServiceProvider; 13 use Illuminate\Support\ServiceProvider;
14 14
15 class MyServiceProvider extends ServiceProvider 15 class MyServiceProvider extends ServiceProvider
16 { 16 {
17 /** 17 /**
18 * Register services. 18 * Register services.
19 * 19 *
20 * @return void 20 * @return void
21 */ 21 */
22 public function register() 22 public function register()
23 { 23 {
24 // 24 //
25 } 25 }
26 26
27 /** 27 /**
28 * Bootstrap services. 28 * Bootstrap services.
29 * 29 *
30 * @return void 30 * @return void
31 */ 31 */
32 public function boot() 32 public function boot()
33 { 33 {
34 $views = ['admin.job_titles.parent_id']; 34 $views = ['admin.job_titles.parent_id'];
35 View::composer($views, 35 View::composer($views,
36 function($view) 36 function($view)
37 { 37 {
38 static $items = null; 38 static $items = null;
39 39
40 if (is_null($items)) { 40 if (is_null($items)) {
41 $items = Job_title::query()-> 41 $items = Job_title::query()->
42 orderByDesc('sort')-> 42 orderByDesc('sort')->
43 orderBy('name')-> 43 orderBy('name')->
44 active()-> 44 active()->
45 get(); 45 get();
46 $parent = 0; 46 $parent = 0;
47 $view->with(['items' => $items, 'parent' => $parent]); 47 $view->with(['items' => $items, 'parent' => $parent]);
48 } else { 48 } else {
49 $view->with(['items' => $items]); 49 $view->with(['items' => $items]);
50 } 50 }
51 51
52 } 52 }
53 ); 53 );
54 54
55 $views2 = ['layout.admin', 'admin.index']; 55 $views2 = ['layout.admin', 'admin.index'];
56 56
57 View::composer($views2, 57 View::composer($views2,
58 function($view){ 58 function($view){
59 $id = Auth::user()->id; 59 $id = Auth::user()->id;
60 $is_manager = Auth::user()->is_manager; 60 $is_manager = Auth::user()->is_manager;
61 $admin = Auth::user()->admin; 61 $admin = Auth::user()->admin;
62 62
63 $contents = ContentRoles::query()->get(); 63 $contents = ContentRoles::query()->get();
64 64
65 $query = DB::select(DB::raw('SELECT count(*) as MsgCount 65 $query = DB::select(DB::raw('SELECT count(*) as MsgCount
66 FROM messages m1 66 FROM messages m1
67 Where ((m1.flag_new = 1) and (m1.to_user_id = :uid)) 67 Where ((m1.flag_new = 1) and (m1.to_user_id = :uid))
68 '), ['uid' => $id] 68 '), ['uid' => $id]
69 ); 69 );
70 70
71 $view->with(['MsgCount' => $query[0]->MsgCount, 71 $view->with(['MsgCount' => $query[0]->MsgCount,
72 'UserId' => $id, 72 'UserId' => $id,
73 'is_manager' => $is_manager, 73 'is_manager' => $is_manager,
74 'admin' => $admin, 74 'admin' => $admin,
75 'contents' => $contents]); 75 'contents' => $contents]);
76 } 76 }
77 ); 77 );
78 78
79 $views3 = ['layout.frontend']; 79 $views3 = ['layout.frontend', 'index'];
80 80
81 View::composer($views3, 81 View::composer($views3,
82 function($view){ 82 function($view){
83 $id = Auth::user(); 83 $id = Auth::user();
84 $companies = Company::query()->limit(1)->get(); 84 $companies = Company::query()->limit(1)->get();
85 85 $jobs = Job_title::query()->get();
86 $view->with(['UserId' => $id, 'companies' => $companies]); 86 $view->with(['UserId' => $id, 'companies' => $companies, 'jobs' => $jobs]);
87 } 87 }
88 ); 88 );
89 89
90 $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all']; 90 $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all'];
91 View::composer($view1, 91 View::composer($view1,
92 function($view){ 92 function($view){
93 $user = Auth::user(); 93 $user = Auth::user();
94 $id = $user->id; 94 $id = $user->id;
95 $employer = Employer::query()->where('user_id', $id)->get(); 95 $employer = Employer::query()->where('user_id', $id)->get();
96 $id_employer = $employer[0]->id; 96 $id_employer = $employer[0]->id;
97 $view->with(['id_employer' => $id_employer, 'Employer' => $employer]); 97 $view->with(['id_employer' => $id_employer, 'Employer' => $employer]);
98 } 98 }
99 ); 99 );
100 100
101 $view_worker = ['workers.emblema']; 101 $view_worker = ['workers.emblema'];
102 View::composer($view_worker, 102 View::composer($view_worker,
103 function($view_worker) { 103 function($view_worker) {
104 $user = Auth::user(); 104 $user = Auth::user();
105 $id = $user->id; 105 $id = $user->id;
106 $Worker = Worker::query()->where('user_id', $id)->get(); 106 $Worker = Worker::query()->where('user_id', $id)->get();
107 $id_worker = $Worker[0]->id; 107 $id_worker = $Worker[0]->id;
108 $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]); 108 $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]);
109 } 109 }
110 ); 110 );
111 111
112 $view_job_title = ['modals.register']; 112 $view_job_title = ['modals.register'];
113 View::composer($view_job_title, 113 View::composer($view_job_title,
114 function($view_job_title) { 114 function($view_job_title) {
115 $Job_titles = Job_title::query()->get(); 115 $Job_titles = Job_title::query()->get();
116 $view_job_title->with(['Job_titles' => $Job_titles]); 116 $view_job_title->with(['Job_titles' => $Job_titles]);
117 } 117 }
118 ); 118 );
119 119
120 } 120 }
121 } 121 }
122 122
resources/views/ajax/companies.blade.php
1 <div class="main__employers-one"> 1 <div class="main__employers-one">
2 @if ($emps->count()) 2 @if ($emps->count())
3 @foreach($emps as $emp) 3 @foreach($emps as $emp)
4 <div class="main__employers-item"> 4 <div class="main__employers-item">
5 <span class="main__employers-item-inner"> 5 <span class="main__employers-item-inner">
6 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 6 @if (!empty($emp->logo))
7 <span class="main__employers-item-body"> 7 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
8 @else
9 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
10 @endif
11 <span class="main__employers-item-body">
8 <b>{{ $emp->name_company }}</b> 12 <b>{{ $emp->name_company }}</b>
9 <i>{{ $emp->ads->count() }} вакансия(ий)</i> 13 <i>{{ $emp->ads->count() }} вакансия(ий)</i>
10 </span> 14 </span>
11 </span> 15 </span>
12 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> 16 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a>
13 17
14 @if ($emp->oficial_status == 1) 18 @if ($emp->oficial_status == 1)
15 <span class="main__employers-item-label"> 19 <span class="main__employers-item-label">
16 <svg> 20 <svg>
17 <use xlink:href="images/sprite.svg#v"></use> 21 <use xlink:href="images/sprite.svg#v"></use>
18 </svg> 22 </svg>
19 <span>Компания одобрена сервисом rekamore.su</span> 23 <span>Компания одобрена сервисом rekamore.su</span>
20 </span> 24 </span>
21 @endif 25 @endif
22 </div> 26 </div>
23 @endforeach 27 @endforeach
24 </div> 28 </div>
25 29
26 {{ $emps->appends($_GET)->links('paginate') }} 30 {{ $emps->appends($_GET)->links('paginate') }}
27 @else 31 @else
28 <H2>Нет данных</H2> 32 <H2>Нет данных</H2>
29 @endif 33 @endif
30 34
31 35
resources/views/ajax/companies2.blade.php
1 @if ($emps->count()) 1 @if ($emps->count())
2 <div class="main__employers-two"> 2 <div class="main__employers-two">
3 @foreach($emps as $emp) 3 @foreach($emps as $emp)
4 <div class="main__employers-item"> 4 <div class="main__employers-item">
5 <span class="main__employers-item-inner"> 5 <span class="main__employers-item-inner">
6 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 6 @if (!empty($emp->logo))
7 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
8 @else
9 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
10 @endif
7 <span class="main__employers-item-body"> 11 <span class="main__employers-item-body">
8 <b>{{ $emp->name_company }}</b> 12 <b>{{ $emp->name_company }}</b>
9 <i>{{ $emp->ads->count() }} вакансия(ий)</i> 13 <i>{{ $emp->ads->count() }} вакансия(ий)</i>
10 </span> 14 </span>
11 </span> 15 </span>
12 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> 16 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a>
13 @if ($emp->oficial_status == 1) 17 @if ($emp->oficial_status == 1)
14 <span class="main__employers-item-label"> 18 <span class="main__employers-item-label">
15 <svg> 19 <svg>
16 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 20 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
17 </svg> 21 </svg>
18 <span>Компания одобрена сервисом rekamore.su</span> 22 <span>Компания одобрена сервисом rekamore.su</span>
19 </span> 23 </span>
20 @endif 24 @endif
21 </div> 25 </div>
22 @endforeach 26 @endforeach
23 </div> 27 </div>
24 {{ $emps->appends($_GET)->links('paginate') }} 28 {{ $emps->appends($_GET)->links('paginate') }}
25 @else 29 @else
26 <H2>Нет данных</H2> 30 <H2>Нет данных</H2>
27 @endif 31 @endif
28 32
29 33
30 34
resources/views/ajax/education.blade.php
File was created 1 <div class="main__ads" id="block" name="block">
2 @if ($educations->count())
3 @foreach($educations as $edu)
4 <div class="main__ads-item">
5 <div class="main__ads-item-pic">
6 <img src="@if (!empty($edu->image)) {{ asset(Storage::url($edu->image)) }} @else {{ asset('images/education.jpg') }} @endif" alt="{{ $edu->name }}">
7 <span>
8 <svg>
9 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
10 </svg>
11 </span>
12 </div>
13 <div class="main__ads-item-body">
14 <b>{{ $edu->name }}</b>
15 <span>{{ $edu->program_education->count() }} учебных направлений</span>
16 <a href="" class="button button_light">Читать далее</a>
17 </div>
18 </div>
19 @endforeach
20
21 {{ $educations->appends($_GET)->links('paginate') }}
22 @else
23 <H2>Нет данных</H2>
24 @endif
25 </div>
26
resources/views/companies.blade.php
1 @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('change', '#sort_ajax', function() { 6 $(document).on('change', '#sort_ajax', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.val(); 8 var val_ = this_.val();
9 console.log('sort items '+val_); 9 console.log('sort items '+val_);
10 10
11 $.ajax({ 11 $.ajax({
12 type: "GET", 12 type: "GET",
13 url: "{{ route('shipping_companies') }}", 13 url: "{{ route('shipping_companies') }}",
14 data: "sort="+val_+"&block=1", 14 data: "sort="+val_+"&block=1",
15 success: function (data) { 15 success: function (data) {
16 console.log('Выбор сортировки'); 16 console.log('Выбор сортировки');
17 console.log(data); 17 console.log(data);
18 $('#block_1').html(data); 18 $('#block_1').html(data);
19 }, 19 },
20 headers: { 20 headers: {
21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
22 }, 22 },
23 error: function (data) { 23 error: function (data) {
24 data = JSON.stringify(data); 24 data = JSON.stringify(data);
25 console.log('Error: ' + data); 25 console.log('Error: ' + data);
26 } 26 }
27 }); 27 });
28 28
29 $.ajax({ 29 $.ajax({
30 type: "GET", 30 type: "GET",
31 url: "{{ route('shipping_companies') }}", 31 url: "{{ route('shipping_companies') }}",
32 data: "sort="+val_+"&block=2", 32 data: "sort="+val_+"&block=2",
33 success: function (data) { 33 success: function (data) {
34 console.log('Выбор сортировки2'); 34 console.log('Выбор сортировки2');
35 console.log(data); 35 console.log(data);
36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
37 $('#block_2').html(data); 37 $('#block_2').html(data);
38 }, 38 },
39 headers: { 39 headers: {
40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
41 }, 41 },
42 error: function (data) { 42 error: function (data) {
43 data = JSON.stringify(data); 43 data = JSON.stringify(data);
44 console.log('Error: ' + data); 44 console.log('Error: ' + data);
45 } 45 }
46 }); 46 });
47 }); 47 });
48 48
49 $(document).ready(function(){ 49 $(document).ready(function(){
50 var sel = $('#select2-sort_ajax-container'); 50 var sel = $('#select2-sort_ajax-container');
51 var key = getUrlParameter('sort'); 51 var key = getUrlParameter('sort');
52 52
53 if (key !=='') { 53 if (key !=='') {
54 console.log(key); 54 console.log(key);
55 switch (key) { 55 switch (key) {
56 case "default": sel.html('Сортировка (по умолчанию)'); break; 56 case "default": sel.html('Сортировка (по умолчанию)'); break;
57 case "name_up": sel.html('По имени (возрастание)'); break; 57 case "name_up": sel.html('По имени (возрастание)'); break;
58 case "name_down": sel.html('По дате (убывание)'); break; 58 case "name_down": sel.html('По дате (убывание)'); break;
59 case "created_at_up": sel.html('По дате (возрастание)'); break; 59 case "created_at_up": sel.html('По дате (возрастание)'); break;
60 case "created_at_down": sel.html('По дате (убывание)'); break; 60 case "created_at_down": sel.html('По дате (убывание)'); break;
61 } 61 }
62 62
63 } 63 }
64 }); 64 });
65 </script> 65 </script>
66 @endsection 66 @endsection
67 67
68 @section('content') 68 @section('content')
69 <section class="thing"> 69 <section class="thing">
70 <div class="container"> 70 <div class="container">
71 <form class="thing__body"> 71 <form class="thing__body">
72 @csrf 72 @csrf
73 <ul class="breadcrumbs thing__breadcrumbs"> 73 <ul class="breadcrumbs thing__breadcrumbs">
74 <li><a href="{{ route('index') }}">Главная</a></li> 74 <li><a href="{{ route('index') }}">Главная</a></li>
75 <li><b>Работодатели</b></li> 75 <li><b>Работодатели</b></li>
76 </ul> 76 </ul>
77 <h1 class="thing__title">Работодатели</h1> 77 <h1 class="thing__title">Работодатели</h1>
78 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 78 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
79 существующих финансовых и административных условий.</p> 79 существующих финансовых и административных условий.</p>
80 <div class="search thing__search"> 80 <div class="search thing__search">
81 <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя" required> 81 <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя">
82 <button type="submit" class="button">Найти</button> 82 <button type="submit" class="button">Найти</button>
83 <span> 83 <span>
84 <svg> 84 <svg>
85 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 85 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
86 </svg> 86 </svg>
87 </span> 87 </span>
88 </div> 88 </div>
89 </form> 89 </form>
90 </div> 90 </div>
91 </section> 91 </section>
92 <main class="main"> 92 <main class="main">
93 <div class="container"> 93 <div class="container">
94 <div class="main__employers"> 94 <div class="main__employers">
95 <div class="filters"> 95 <div class="filters">
96 <div class="filters__label">Показано @if ($count_emps < 4) 1 - {{ $count_emps }} @else 1 – 4 @endif из {{ $count_emps }} результатов поиска</div> 96 <div class="filters__label">Показано @if ($count_emps < 4) 1 - {{ $count_emps }} @else 1 – 4 @endif из {{ $count_emps }} результатов поиска</div>
97 <div class="filters__body"> 97 <div class="filters__body">
98 <div class="select filters__select"> 98 <div class="select filters__select">
99 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 99 <select class="js-select2" id="sort_ajax" name="sort_ajax">
100 <option value="default">Сортировка (по умолчанию)</option> 100 <option value="default">Сортировка (по умолчанию)</option>
101 <option value="name_up">По имени (возрастание)</option> 101 <option value="name_up">По имени (возрастание)</option>
102 <option value="name_down">По имени (убывание)</option> 102 <option value="name_down">По имени (убывание)</option>
103 <option value="created_at_up">По дате (возрастание)</option> 103 <option value="created_at_up">По дате (возрастание)</option>
104 <option value="created_at_down">По дате (убывание)</option> 104 <option value="created_at_down">По дате (убывание)</option>
105 </select> 105 </select>
106 </div> 106 </div>
107 <button type="button" class="filters__item active" data-tab="1"> 107 <button type="button" class="filters__item active" data-tab="1">
108 <svg> 108 <svg>
109 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 109 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
110 </svg> 110 </svg>
111 </button> 111 </button>
112 <button type="button" class="filters__item" data-tab="2"> 112 <button type="button" class="filters__item" data-tab="2">
113 <svg> 113 <svg>
114 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> 114 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use>
115 </svg> 115 </svg>
116 </button> 116 </button>
117 </div> 117 </div>
118 </div> 118 </div>
119 <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1"> 119 <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1">
120 <div class="main__employers-one"> 120 <div class="main__employers-one">
121 @if ($emps->count()) 121 @if ($emps->count())
122 @foreach($emps as $emp) 122 @foreach($emps as $emp)
123 <div class="main__employers-item"> 123 <div class="main__employers-item">
124 <span class="main__employers-item-inner"> 124 <span class="main__employers-item-inner">
125 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 125 @if (!empty($emp->logo))
126 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
127 @else
128 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
129 @endif
126 <span class="main__employers-item-body"> 130 <span class="main__employers-item-body">
127 <b>{{ $emp->name_company }}</b> 131 <b>{{ $emp->name_company }}</b>
128 <i>{{ $emp->ads->count() }} вакансия(ий)</i> 132 <i>{{ $emp->ads->count() }} вакансия(ий)</i>
129 </span> 133 </span>
130 </span> 134 </span>
131 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> 135 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a>
132 136
133 @if ($emp->oficial_status == 1) 137 @if ($emp->oficial_status == 1)
134 <span class="main__employers-item-label"> 138 <span class="main__employers-item-label">
135 <svg> 139 <svg>
136 <use xlink:href="images/sprite.svg#v"></use> 140 <use xlink:href="images/sprite.svg#v"></use>
137 </svg> 141 </svg>
138 <span>Компания одобрена сервисом rekamore.su</span> 142 <span>Компания одобрена сервисом rekamore.su</span>
139 </span> 143 </span>
140 @endif 144 @endif
141 </div> 145 </div>
142 @endforeach 146 @endforeach
143 </div> 147 </div>
144 148
145 {{ $emps->appends($_GET)->links('paginate') }} 149 {{ $emps->appends($_GET)->links('paginate') }}
146 @else 150 @else
147 <H2>Нет данных</H2> 151 <H2>Нет данных</H2>
148 @endif 152 @endif
149 </div> 153 </div>
150 <div class="main__employers-body" data-body="2" id="block_2" name="block_2"> 154 <div class="main__employers-body" data-body="2" id="block_2" name="block_2">
151 @if ($emps->count()) 155 @if ($emps->count())
152 <div class="main__employers-two"> 156 <div class="main__employers-two">
153 @foreach($emps as $emp) 157 @foreach($emps as $emp)
154 <div class="main__employers-item"> 158 <div class="main__employers-item">
155 <span class="main__employers-item-inner"> 159 <span class="main__employers-item-inner">
156 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 160 @if (!empty($emp->logo))
161 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
162 @else
163 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
164 @endif
157 <span class="main__employers-item-body"> 165 <span class="main__employers-item-body">
158 <b>{{ $emp->name_company }}</b> 166 <b>{{ $emp->name_company }}</b>
159 <i>{{ $emp->ads->count() }} вакансия(ий)</i> 167 <i>{{ $emp->ads->count() }} вакансия(ий)</i>
160 </span> 168 </span>
161 </span> 169 </span>
162 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> 170 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a>
163 @if ($emp->oficial_status == 1) 171 @if ($emp->oficial_status == 1)
164 <span class="main__employers-item-label"> 172 <span class="main__employers-item-label">
165 <svg> 173 <svg>
166 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 174 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
167 </svg> 175 </svg>
168 <span>Компания одобрена сервисом rekamore.su</span> 176 <span>Компания одобрена сервисом rekamore.su</span>
169 </span> 177 </span>
170 @endif 178 @endif
171 </div> 179 </div>
172 @endforeach 180 @endforeach
173 </div> 181 </div>
174 {{ $emps->appends($_GET)->links('paginate') }} 182 {{ $emps->appends($_GET)->links('paginate') }}
175 @else 183 @else
176 <H2>Нет данных</H2> 184 <H2>Нет данных</H2>
177 @endif 185 @endif
178 </div> 186 </div>
179 </div> 187 </div>
180 </div> 188 </div>
181 </main> 189 </main>
182 @endsection 190 @endsection
183 191
resources/views/education.blade.php
1 @extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('change', '#sort_ajax', function() { 6 $(document).on('change', '#sort_ajax', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.val(); 8 var val_ = this_.val();
9 console.log('sort items '+val_); 9 console.log('sort items '+val_);
10 10
11 $.ajax({ 11 $.ajax({
12 type: "GET", 12 type: "GET",
13 url: "{{ route('shipping_companies') }}", 13 url: "{{ route('education') }}",
14 data: "sort="+val_+"&block=1", 14 data: "sort="+val_+"&block=1",
15 success: function (data) { 15 success: function (data) {
16 console.log('Выбор сортировки'); 16 console.log('Выбор сортировки');
17 console.log(data); 17 console.log(data);
18 $('#block_1').html(data); 18 $('#block').html(data);
19 }, 19 history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
20 headers: {
21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
22 },
23 error: function (data) {
24 data = JSON.stringify(data);
25 console.log('Error: ' + data);
26 }
27 });
28
29 $.ajax({
30 type: "GET",
31 url: "{{ route('shipping_companies') }}",
32 data: "sort="+val_+"&block=2",
33 success: function (data) {
34 console.log('Выбор сортировки2');
35 console.log(data);
36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
37 $('#block_2').html(data);
38 }, 20 },
39 headers: { 21 headers: {
40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 22 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
41 }, 23 },
42 error: function (data) { 24 error: function (data) {
43 data = JSON.stringify(data); 25 data = JSON.stringify(data);
44 console.log('Error: ' + data); 26 console.log('Error: ' + data);
45 } 27 }
46 }); 28 });
47 }); 29 });
48 30
49 $(document).ready(function(){ 31 $(document).ready(function(){
50 var sel = $('#select2-sort_ajax-container'); 32 var sel = $('#select2-sort_ajax-container');
51 var key = getUrlParameter('sort'); 33 var key = getUrlParameter('sort');
34 console.log(sel);
35 console.log(key);
52 36
53 if (key !=='') { 37 if (key !=='') {
54 console.log(key); 38 console.log(key);
55 switch (key) { 39 switch (key) {
56 case "default": sel.html('Сортировка (по умолчанию)'); break; 40 case "default": sel.html('Сортировка (по умолчанию)'); break;
57 case "name_up": sel.html('По имени (возрастание)'); break; 41 case "name_up": sel.html('По имени (возрастание)'); break;
58 case "name_down": sel.html('По дате (убывание)'); break; 42 case "name_down": sel.html('По дате (убывание)'); break;
59 case "created_at_up": sel.html('По дате (возрастание)'); break; 43 case "created_at_up": sel.html('По дате (возрастание)'); break;
60 case "created_at_down": sel.html('По дате (убывание)'); break; 44 case "created_at_down": sel.html('По дате (убывание)'); break;
61 } 45 }
62 46
63 } 47 }
64 }); 48 });
65 </script> 49 </script>
66 @endsection 50 @endsection
67 51
68 @section('content') 52 @section('content')
69 <section class="thing"> 53 <section class="thing">
70 <div class="container"> 54 <div class="container">
71 <form class="thing__body" active="{{ route('education') }}"> 55 <form class="thing__body" active="{{ route('education') }}">
72 <ul class="breadcrumbs thing__breadcrumbs"> 56 <ul class="breadcrumbs thing__breadcrumbs">
73 <li><a href="{{ route('index') }}">Главная</a></li> 57 <li><a href="{{ route('index') }}">Главная</a></li>
74 <li><b>Образование</b></li> 58 <li><b>Образование</b></li>
75 </ul> 59 </ul>
76 <h1 class="thing__title">Образование</h1> 60 <h1 class="thing__title">Образование</h1>
77 <p class="thing__text">Прежде всего, современная методология разработки представляет собой интересный эксперимент проверки направлений прогрессивного развития.</p> 61 <p class="thing__text">Прежде всего, современная методология разработки представляет собой интересный эксперимент проверки направлений прогрессивного развития.</p>
78 <div class="search thing__search"> 62 <div class="search thing__search">
79 <input type="search" class="input" id="search" name="search" placeholder="Введите наименование работодателя" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif"> 63 <input type="search" class="input" id="search" name="search" placeholder="Введите наименование работодателя" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif">
80 <button type="submit" class="button">Найти</button> 64 <button type="submit" class="button">Найти</button>
81 <span> 65 <span>
82 <svg> 66 <svg>
83 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 67 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
84 </svg> 68 </svg>
85 </span> 69 </span>
86 </div> 70 </div>
87 </form> 71 </form>
88 </div> 72 </div>
89 </section> 73 </section>
90 <main class="main"> 74 <main class="main">
91 <div class="container"> 75 <div class="container">
92 <div class="filters"> 76 <div class="filters">
93 <div class="filters__label">Показано 1 – @if($count_edu < 6) {{ $count_edu }}@else 6 @endif из {{ $count_edu }} результатов поиска</div> 77 <div class="filters__label">Показано 1 – @if($count_edu < 6) {{ $count_edu }}@else 6 @endif из {{ $count_edu }} результатов поиска</div>
94 <div class="filters__body"> 78 <div class="filters__body">
95 <div class="select filters__select"> 79 <div class="select filters__select">
96 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 80 <select class="js-select2" id="sort_ajax" name="sort_ajax">
97 <option value="default">Сортировка (по умолчанию)</option> 81 <option value="default">Сортировка (по умолчанию)</option>
98 <option value="name_up">По имени (возрастание)</option> 82 <option value="name_up">По имени (возрастание)</option>
99 <option value="name_down">По имени (убывание)</option> 83 <option value="name_down">По имени (убывание)</option>
100 <option value="created_at_up">По дате (возрастание)</option> 84 <option value="created_at_up">По дате (возрастание)</option>
101 <option value="created_at_down">По дате (убывание)</option> 85 <option value="created_at_down">По дате (убывание)</option>
102 </select> 86 </select>
103 </div> 87 </div>
104 </div> 88 </div>
105 </div> 89 </div>
106 @if ($educations->count()) 90
107 <div class="main__ads"> 91
92 <div class="main__ads" id="block" name="block">
93 @if ($educations->count())
108 @foreach($educations as $edu) 94 @foreach($educations as $edu)
109 <div class="main__ads-item"> 95 <div class="main__ads-item">
110 <div class="main__ads-item-pic"> 96 <div class="main__ads-item-pic">
111 <img src="@if (!empty($edu->image)) {{ asset(Storage::url($edu->image)) }} @else {{ asset('images/education.jpg') }} @endif" alt="{{ $edu->name }}"> 97 <img src="@if (!empty($edu->image)) {{ asset(Storage::url($edu->image)) }} @else {{ asset('images/education.jpg') }} @endif" alt="{{ $edu->name }}">
112 <span> 98 <span>
113 <svg> 99 <svg>
114 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 100 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
115 </svg> 101 </svg>
116 </span> 102 </span>
117 </div> 103 </div>
118 <div class="main__ads-item-body"> 104 <div class="main__ads-item-body">
119 <b>{{ $edu->name }}</b> 105 <b>{{ $edu->name }}</b>
120 <span>{{ $edu->program_education->count() }} учебных направлений</span> 106 <span>{{ $edu->program_education->count() }} учебных направлений</span>
121 <a href="" class="button button_light">Читать далее</a> 107 <a href="" class="button button_light">Читать далее</a>
122 </div> 108 </div>
123 </div> 109 </div>
124 @endforeach 110 @endforeach
125 111
112 {{ $educations->appends($_GET)->links('paginate') }}
113 @else
114 <H2>Нет данных</H2>
115 @endif
126 </div> 116 </div>
127 {{ $educations->appends($_GET)->links('paginate') }} 117
128 @else
129 <H2>Нет данных</H2>
130 @endif
131 <!--<div class="pagination"> 118 <!--<div class="pagination">
132 <a href="#" class="pagination__nav pagination__nav_prev"> 119 <a href="#" class="pagination__nav pagination__nav_prev">
133 <svg> 120 <svg>
134 <use xlink:href="images/sprite.svg#arrow-bold"></use> 121 <use xlink:href="images/sprite.svg#arrow-bold"></use>
135 </svg> 122 </svg>
136 </a> 123 </a>
137 <span class="pagination__item active">1</span> 124 <span class="pagination__item active">1</span>
138 <a href="#" class="pagination__item">2</a> 125 <a href="#" class="pagination__item">2</a>
139 <a href="#" class="pagination__item">3</a> 126 <a href="#" class="pagination__item">3</a>
140 <a href="#" class="pagination__item">4</a> 127 <a href="#" class="pagination__item">4</a>
141 <a href="#" class="pagination__item">5</a> 128 <a href="#" class="pagination__item">5</a>
142 <span class="pagination__dots"> 129 <span class="pagination__dots">
143 <svg> 130 <svg>
144 <use xlink:href="images/sprite.svg#dots"></use> 131 <use xlink:href="images/sprite.svg#dots"></use>
145 </svg> 132 </svg>
146 </span> 133 </span>
147 <a href="#" class="pagination__item">25</a> 134 <a href="#" class="pagination__item">25</a>
148 <a href="#" class="pagination__nav pagination__nav_next"> 135 <a href="#" class="pagination__nav pagination__nav_next">
149 <svg> 136 <svg>
150 <use xlink:href="images/sprite.svg#arrow-bold"></use> 137 <use xlink:href="images/sprite.svg#arrow-bold"></use>
resources/views/index.blade.php
1 @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Главная страница РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script>
5 console.log('Test system');
6 $(document).on('click', '#button_send', function() {
7 var field_login = $('#email');
8 var field_pwd = $('#password');
9 var login_val = field_login.val();
10 var pwd_val = field_pwd.val();
11 4
12 console.log('login: '+login_val+' password: '+pwd_val);
13
14 $.ajax({
15 type: "GET",
16 url: "{{ route('login') }}",
17 data: "email="+login_val+"&password="+pwd_val,
18 success: function (data) {
19 console.log('Вход в систему');
20 let d = JSON.parse(data);
21 if(typeof d['REDIRECT'] !== "undefined") {
22 location.href = d['REDIRECT'];
23 console.log(d['REDIRECT']);
24 }
25 if (typeof d['ERROR'] !== "undefined") {
26 console.log(d['ERROR']);
27 $('#message_error').html(d['ERROR']);
28 }
29 console.log(d['REDIRECT']);
30 //$('#block_1').html(data);
31 },
32 headers: {
33 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
34 },
35 error: function (data) {
36 data = JSON.stringify(data);
37 console.log('Error: ' + data);
38 }
39 });
40 });
41
42 $(document).on('click', '#button_reg_worker', function() {
43 var field_login = $('#email_worker');
44 var field_pwd = $('#password_worker');
45 var field_confirm_pwd = $('#password_confirmation_worker');
46 var field_politik_worker = $('#politik_worker');
47 var field_telephone_worker = $('#telephone_worker');
48 var field_job_titles_worker = $('#job_titles_worker');
49 var field_surname_worker = $('#surname_worker');
50 var field_name_man = $('#name_man_worker');
51 var field_surname2_worker = $('#surname2_worker');
52
53 var login = field_login.val();
54 var pwd = field_pwd.val();
55 var confirm_pwd = field_confirm_pwd.val();
56 var politik = field_politik_worker.val();
57 var telephone = field_telephone_worker.val();
58 var job_titles = field_job_titles_worker.val();
59 var surname = field_surname_worker.val();
60 var name_man = field_name_man.val();
61 var surname2 = field_surname2_worker.val();
62
63
64 console.log('login: '+login+' password: '+pwd);
65
66 $.ajax({
67 type: "GET",
68 url: "{{ route('register_worker') }}",
69 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
70 "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+
71 "&surname2="+surname2+"&subscribe_email="+login,
72 success: function (data) {
73 console.log('Вход в систему');
74 let d = JSON.parse(data);
75 if(typeof d['REDIRECT'] !== "undefined") {
76 console.log(d['REDIRECT']);
77 location.href = d['REDIRECT'];
78 }
79 if (typeof d['ERROR'] !== "undefined") {
80 console.log(d['ERROR']);
81 $('#block-info').css({'display': 'block'});
82 $('#messages_error_reg').html(d['ERROR']);
83 }
84 console.log(d['REDIRECT']);
85
86 },
87 headers: {
88 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
89 },
90 error: function (data) {
91 data = JSON.stringify(data);
92 console.log('Error: ' + data);
93 }
94 });
95
96 return false;
97 });
98
99 $(document).on('click', '#button_reg_employer', function() {
100 var field_login = $('#email_employer');
101 var field_pwd = $('#password_employer');
102 var field_confirm_pwd = $('#password_confirmation_employer');
103 var field_politik_employer = $('#politik_employer');
104 var field_telephone_employer = $('#telephone_employer');
105 var field_company_employer = $('#company_employer');
106 var field_surname_employer = $('#surname_employer');
107 var field_name_man_employer = $('#name_man_employer');
108 var field_surname2_employer = $('#surname2_employer');
109
110 var login = field_login.val();
111 var pwd = field_pwd.val();
112 var confirm_pwd = field_confirm_pwd.val();
113 var politik = field_politik_employer.val();
114 var telephone = field_telephone_employer.val();
115 var company_employer = field_company_employer.val();
116 var surname = field_surname_employer.val();
117 var name_man = field_name_man_employer.val();
118 var surname2 = field_surname2_employer.val();
119
120
121 console.log('login: '+login+' password: '+pwd);
122
123
124 $.ajax({
125 type: "GET",
126 url: "{{ route('register_employer') }}",
127 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
128 "&telephone="+telephone+"&name_company="+company_employer+"&surname="+surname+"&name_man="+name_man+
129 "&surname2="+surname2+"&subscribe_email="+login,
130 success: function (data) {
131 console.log('Вход в систему');
132 let d = JSON.parse(data);
133 if(typeof d['REDIRECT'] !== "undefined") {
134 console.log(d['REDIRECT']);
135 location.href = d['REDIRECT'];
136 }
137 if (typeof d['ERROR'] !== "undefined") {
138 console.log(d['ERROR']);
139 $('#block-info').css({'display': 'block'});
140 $('#messages_error_reg').html(d['ERROR']);
141 }
142 console.log(d['REDIRECT']);
143
144 },
145 headers: {
146 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
147 },
148 error: function (data) {
149 data = JSON.stringify(data);
150 console.log('Error: ' + data);
151 }
152 });
153
154 return false;
155 });
156 </script>
157 @endsection 5 @endsection
158 6
159 @section('content') 7 @section('content')
160 <section class="work"> 8 <section class="work">
161 <div class="container"> 9 <div class="container">
162 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> 10 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic">
163 <div class="work__body"> 11 <div class="work__body">
164 <div class="work__title"> 12 <div class="work__title">
165 Работа в море / 13 Работа в море /
166 <span class="br">Работа на реке</span> 14 <span class="br">Работа на реке</span>
167 </div> 15 </div>
168 <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — 16 <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас —
169 тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в 17 тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в
170 сложных, но очень интересных условиях. </div> 18 сложных, но очень интересных условиях. </div>
171 <div class="work__list"> 19 <div class="work__list">
172 <div>Тысячи соискателей увидят Ваше объявление</div> 20 <div>Тысячи соискателей увидят Ваше объявление</div>
173 <div>Десятки компаний выкладывают объявления каждый день</div> 21 <div>Десятки компаний выкладывают объявления каждый день</div>
174 </div> 22 </div>
175 <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> 23 <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET">
176 <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> 24 <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required>
177 <button type="submit" class="button button_light">Посмотреть вакансии</button> 25 <button type="submit" class="button button_light">Посмотреть вакансии</button>
178 <span> 26 <span>
179 <svg> 27 <svg>
180 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 28 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
181 </svg> 29 </svg>
182 </span> 30 </span>
183 </form> 31 </form>
184 <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> 32 <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a>
185 <div class="work__get"> 33 <div class="work__get">
186 <b>Скачать приложение</b> 34 <b>Скачать приложение</b>
187 <a href=""> 35 <a href="">
188 <img src="{{ asset('images/google.svg') }}" alt=""> 36 <img src="{{ asset('images/google.svg') }}" alt="">
189 </a> 37 </a>
190 <a href=""> 38 <a href="">
191 <img src="{{ asset('images/apple.svg') }}" alt=""> 39 <img src="{{ asset('images/apple.svg') }}" alt="">
192 </a> 40 </a>
193 </div> 41 </div>
194 </div> 42 </div>
195 </div> 43 </div>
196 </section> 44 </section>
197 <section class="numbers"> 45 <section class="numbers">
198 <div class="container"> 46 <div class="container">
199 <div class="numbers__body"> 47 <div class="numbers__body">
200 <div class="numbers__item"> 48 <div class="numbers__item">
201 <b>500+</b> 49 <b>500+</b>
202 <span>Резюме</span> 50 <span>Резюме</span>
203 Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют 51 Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют
204 фракционных разногласий и призваны к ответу. 52 фракционных разногласий и призваны к ответу.
205 </div> 53 </div>
206 <div class="numbers__item"> 54 <div class="numbers__item">
207 <b>1 000+</b> 55 <b>1 000+</b>
208 <span>Вакансий</span> 56 <span>Вакансий</span>
209 В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих 57 В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих
210 собственных рациональных ограничений. 58 собственных рациональных ограничений.
211 </div> 59 </div>
212 <div class="numbers__item"> 60 <div class="numbers__item">
213 <b>265</b> 61 <b>265</b>
214 <span>Компаний</span> 62 <span>Компаний</span>
215 Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных 63 Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных
216 ограничений. 64 ограничений.
217 </div> 65 </div>
218 </div> 66 </div>
219 </div> 67 </div>
220 </section> 68 </section>
221 <section class="vacancies"> 69 <section class="vacancies">
222 <div class="container"> 70 <div class="container">
223 <div class="title">Новые вакансии</div> 71 <div class="title">Новые вакансии</div>
224 <div class="vacancies__body"> 72 <div class="vacancies__body">
225 <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> 73 <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a>
226 <div class="vacancies__list"> 74 <div class="vacancies__list">
227 @if ($categories->count()) 75 @if ($categories->count())
228 @foreach ($categories as $cat) 76 @foreach ($categories as $cat)
229 <a href="#" class="vacancies__item"> 77 <a href="#" class="vacancies__item">
230 <span style="border-color:#F4C4C2"> 78 <span style="border-color:#F4C4C2">
231 <b>{{ $cat->name }}</b> 79 <b>{{ $cat->name }}</b>
232 <i>Вакансий: <span>{{ $cat->cnt }}</span></i> 80 <i>Вакансий: <span>{{ $cat->cnt }}</span></i>
233 </span> 81 </span>
234 </a> 82 </a>
235 @endforeach 83 @endforeach
236 @else 84 @else
237 Тут пока нет никаких вакансий 85 Тут пока нет никаких вакансий
238 @endif 86 @endif
239 </div> 87 </div>
240 </div> 88 </div>
241 </div> 89 </div>
242 </section> 90 </section>
243 <section class="employer"> 91 <section class="employer">
244 <div class="container"> 92 <div class="container">
245 <div class="title">Работодатели</div> 93 <div class="title">Работодатели</div>
246 <div class="swiper js-employer-swiper"> 94 <div class="swiper js-employer-swiper">
247 <div class="swiper-wrapper"> 95 <div class="swiper-wrapper">
248 96
249 @if ($employers->count()) 97 @if ($employers->count())
250 @php 98 @php
251 $rec = 0; 99 $rec = 0;
252 $count = $employers->count(); 100 $count = $employers->count();
253 @endphp 101 @endphp
254 @foreach($employers as $emp) 102 @foreach($employers as $emp)
255 @php $rec++ @endphp 103 @php $rec++ @endphp
256 @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) 104 @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17))
257 <div class="swiper-slide"> 105 <div class="swiper-slide">
258 <div class="employer__item"> 106 <div class="employer__item">
259 @endif 107 @endif
260 @if (!empty($emp->logo)) 108 @if (!empty($emp->logo))
261 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> 109 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}">
262 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> 110 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}">
263 </a> 111 </a>
264 @else 112 @else
265 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> 113 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}">
266 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> 114 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}">
267 </a> 115 </a>
268 @endif 116 @endif
269 @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) 117 @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count))
270 </div> 118 </div>
271 </div> 119 </div>
272 @endif 120 @endif
273 @endforeach 121 @endforeach
274 @else 122 @else
275 <h5>Тут нет никаких записей</h5> 123 <h5>Тут нет никаких записей</h5>
276 @endif 124 @endif
277 </div> 125 </div>
278 <div class="swiper-pagination"></div> 126 <div class="swiper-pagination"></div>
279 </div> 127 </div>
280 <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> 128 <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a>
281 </div> 129 </div>
282 </section> 130 </section>
283 <section class="about"> 131 <section class="about">
284 <div class="container"> 132 <div class="container">
285 <div class="about__wrapper"> 133 <div class="about__wrapper">
286 <div class="title about__title">О нас</div> 134 <div class="title about__title">О нас</div>
287 <div class="about__body"> 135 <div class="about__body">
288 <div class="about__line"></div> 136 <div class="about__line"></div>
289 <div class="about__item"> 137 <div class="about__item">
290 <b>Для работодателей</b> 138 <b>Для работодателей</b>
291 <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие 139 <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие
292 сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> 140 сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span>
293 <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a> 141 <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a>
294 </div> 142 </div>
295 <div class="about__item"> 143 <div class="about__item">
296 <b>Для сотрудников</b> 144 <b>Для сотрудников</b>
297 <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и 145 <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и
298 СНГ ищут сотрудников через наши ресурсы</span> 146 СНГ ищут сотрудников через наши ресурсы</span>
299 <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a> 147 <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a>
300 </div> 148 </div>
301 </div> 149 </div>
302 </div> 150 </div>
303 </div> 151 </div>
304 </section> 152 </section>
305 <section class="news"> 153 <section class="news">
306 <div class="container"> 154 <div class="container">
307 <div class="news__toper"> 155 <div class="news__toper">
308 <div class="title">Новости и статьи</div> 156 <div class="title">Новости и статьи</div>
309 <div class="navs"> 157 <div class="navs">
310 <button class="js-news-swiper-button-prev"> 158 <button class="js-news-swiper-button-prev">
311 <svg class="rotate180"> 159 <svg class="rotate180">
312 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 160 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
313 </svg> 161 </svg>
314 </button> 162 </button>
315 <button class="js-news-swiper-button-next"> 163 <button class="js-news-swiper-button-next">
316 <svg> 164 <svg>
317 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 165 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
318 </svg> 166 </svg>
319 </button> 167 </button>
320 </div> 168 </div>
321 </div> 169 </div>
322 <div class="swiper js-news-swiper"> 170 <div class="swiper js-news-swiper">
323 <div class="swiper-wrapper"> 171 <div class="swiper-wrapper">
324 @if ($news->count()) 172 @if ($news->count())
325 @foreach ($news as $new) 173 @foreach ($news as $new)
326 <div class="swiper-slide"> 174 <div class="swiper-slide">
327 <div class="news__item"> 175 <div class="news__item">
328 <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> 176 <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic">
329 <div class="news__item-body"> 177 <div class="news__item-body">
330 <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time> 178 <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time>
331 <span class="news__item-title">{{ $new->title }}</span> 179 <span class="news__item-title">{{ $new->title }}</span>
332 <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> 180 <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span>
333 <a href="#" class="news__item-more button button_light">Читать далее</a> 181 <a href="#" class="news__item-more button button_light">Читать далее</a>
334 </div> 182 </div>
335 </div> 183 </div>
336 </div> 184 </div>
337 @endforeach 185 @endforeach
338 @endif 186 @endif
339 </div> 187 </div>
340 <div class="swiper-pagination"></div> 188 <div class="swiper-pagination"></div>
341 </div> 189 </div>
342 <div class="news__all button button_light">Все новости</div> 190 <div class="news__all button button_light">Все новости</div>
343 </div> 191 </div>
344 </section> 192 </section>
345 <section class="info"> 193 <section class="info">
346 <div class="container"> 194 <div class="container">
347 <img src="images/5.png" alt="" class="info__pic"> 195 <img src="images/5.png" alt="" class="info__pic">
348 <div class="info__body"> 196 <div class="info__body">
349 <div class="title info__title">Мы в социальных сетях</div> 197 <div class="title info__title">Мы в социальных сетях</div>
350 <div class="info__item"> 198 <div class="info__item">
351 <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о 199 <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о
352 новых вакансиях прямо на свой смартфон</div> 200 новых вакансиях прямо на свой смартфон</div>
353 <a href="#" class="info__link" style="background:#20A0E1"> 201 <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1">
354 <svg> 202 <svg>
355 <use xlink:href="images/sprite.svg#tg"></use> 203 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
356 </svg> 204 </svg>
357 Телеграм 205 Телеграм
358 </a> 206 </a>
359 </div> 207 </div>
360 <div class="info__item"> 208 <div class="info__item">
361 <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация 209 <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация
362 о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> 210 о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div>
363 <a href="#" class="info__link" style="background:#2787F5"> 211 <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5">
364 <svg> 212 <svg>
365 <use xlink:href="images/sprite.svg#vk"></use> 213 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
366 </svg> 214 </svg>
367 ВКонтакте 215 ВКонтакте
368 </a> 216 </a>
369 </div> 217 </div>
370 </div> 218 </div>
371 </div> 219 </div>
372 </section> 220 </section>
373 @endsection 221 @endsection
374 222
resources/views/info_company.blade.php
1 @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('change', '#sort_ajax', function() { 6 $(document).on('change', '#sort_ajax', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.val(); 8 var val_ = this_.val();
9 console.log('sort items '+val_); 9 console.log('sort items '+val_);
10 10
11 $.ajax({ 11 $.ajax({
12 type: "GET", 12 type: "GET",
13 url: "{{ route('shipping_companies') }}", 13 url: "{{ route('shipping_companies') }}",
14 data: "sort="+val_+"&block=1", 14 data: "sort="+val_+"&block=1",
15 success: function (data) { 15 success: function (data) {
16 console.log('Выбор сортировки'); 16 console.log('Выбор сортировки');
17 console.log(data); 17 console.log(data);
18 $('#block_1').html(data); 18 $('#block_1').html(data);
19 }, 19 },
20 headers: { 20 headers: {
21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
22 }, 22 },
23 error: function (data) { 23 error: function (data) {
24 data = JSON.stringify(data); 24 data = JSON.stringify(data);
25 console.log('Error: ' + data); 25 console.log('Error: ' + data);
26 } 26 }
27 }); 27 });
28 28
29 $.ajax({ 29 $.ajax({
30 type: "GET", 30 type: "GET",
31 url: "{{ route('shipping_companies') }}", 31 url: "{{ route('shipping_companies') }}",
32 data: "sort="+val_+"&block=2", 32 data: "sort="+val_+"&block=2",
33 success: function (data) { 33 success: function (data) {
34 console.log('Выбор сортировки2'); 34 console.log('Выбор сортировки2');
35 console.log(data); 35 console.log(data);
36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
37 $('#block_2').html(data); 37 $('#block_2').html(data);
38 }, 38 },
39 headers: { 39 headers: {
40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
41 }, 41 },
42 error: function (data) { 42 error: function (data) {
43 data = JSON.stringify(data); 43 data = JSON.stringify(data);
44 console.log('Error: ' + data); 44 console.log('Error: ' + data);
45 } 45 }
46 }); 46 });
47 }); 47 });
48 48
49 $(document).ready(function(){ 49 $(document).ready(function(){
50 var sel = $('#select2-sort_ajax-container'); 50 var sel = $('#select2-sort_ajax-container');
51 var key = getUrlParameter('sort'); 51 var key = getUrlParameter('sort');
52 52
53 if (key !=='') { 53 if (key !=='') {
54 console.log(key); 54 console.log(key);
55 switch (key) { 55 switch (key) {
56 case "default": sel.html('Сортировка (по умолчанию)'); break; 56 case "default": sel.html('Сортировка (по умолчанию)'); break;
57 case "name_up": sel.html('По имени (возрастание)'); break; 57 case "name_up": sel.html('По имени (возрастание)'); break;
58 case "name_down": sel.html('По дате (убывание)'); break; 58 case "name_down": sel.html('По дате (убывание)'); break;
59 case "created_at_up": sel.html('По дате (возрастание)'); break; 59 case "created_at_up": sel.html('По дате (возрастание)'); break;
60 case "created_at_down": sel.html('По дате (убывание)'); break; 60 case "created_at_down": sel.html('По дате (убывание)'); break;
61 } 61 }
62 62
63 } 63 }
64 }); 64 });
65
66 //end
67 $(document).on('click', '.js_send_it_button', function() {
68 var this_ = $(this);
69 var code_user_id = this_.attr('data-uid');
70 var code_to_user_id = this_.attr('data-tuid');
71 var code_vacancy = this_.attr('data-vacancy');
72 var user_id = $('#send_user_id');
73 var to_user_id = $('#send_to_user_id');
74 var vacancy = $('#send_vacancy');
75
76 console.log('Клик на кнопки...');
77
78 user_id.val(code_user_id);
79 to_user_id.val(code_to_user_id);
80 vacancy.val(code_vacancy);
81 });
65 </script> 82 </script>
66 @endsection 83 @endsection
67 84
68 @section('content') 85 @section('content')
69 <section class="thing"> 86 <section class="thing">
70 <div class="container"> 87 <div class="container">
71 <div class="thing__body"> 88 <div class="thing__body">
72 <ul class="breadcrumbs thing__breadcrumbs"> 89 <ul class="breadcrumbs thing__breadcrumbs">
73 <li><a href="{{ route('index') }}">Главная</a></li> 90 <li><a href="{{ route('index') }}">Главная</a></li>
74 <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> 91 <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li>
75 <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> 92 <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li>
76 </ul> 93 </ul>
77 @if ($company[0]->oficial_status == 1) 94 @if ($company[0]->oficial_status == 1)
78 <div class="thing__badge"> 95 <div class="thing__badge">
79 <svg> 96 <svg>
80 <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> 97 <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use>
81 </svg> 98 </svg>
82 Компания проверена 99 Компания проверена
83 </div> 100 </div>
84 @endif 101 @endif
85 102
86 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> 103 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic">
87 <h1 class="thing__title">{{ $company[0]->name_company }}</h1> 104 <h1 class="thing__title">{{ $company[0]->name_company }}</h1>
88 <p class="thing__text">{{ $company[0]->text }}</p> 105 <p class="thing__text">{{ $company[0]->text }}</p>
89 <div class="thing__buttons"> 106 <div class="thing__buttons">
90 <button type="button" class="button"> 107 <button type="button" class="button">
91 <svg> 108 <svg>
92 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 109 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
93 </svg> 110 </svg>
94 {{ $company[0]->ads->count() }} вакансии 111 {{ $company[0]->ads->count() }} вакансии
95 </button> 112 </button>
96 <a href="" class="button"> 113 <a data-fancybox data-src="#send" data-vacancy="0" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button">
97 Написать сообщение 114 Написать сообщение
98 </a> 115 </a>
99 </div> 116 </div>
100 </div> 117 </div>
101 </div> 118 </div>
102 </section> 119 </section>
103 <main class="main"> 120 <main class="main">
104 <div class="container"> 121 <div class="container">
105 <div class="main__employer-page"> 122 <div class="main__employer-page">
106 <h2 class="main__employer-page-title">О компании</h2> 123 <h2 class="main__employer-page-title">О компании</h2>
107 <div class="main__employer-page-info"> 124 <div class="main__employer-page-info">
108 <div class="main__employer-page-item"> 125 <div class="main__employer-page-item">
109 <b>Адрес компании</b> 126 <b>Адрес компании</b>
110 <span> 127 <span>
111 {{ $company[0]->address }} 128 {{ $company[0]->address }}
112 </span> 129 </span>
113 </div> 130 </div>
114 <div class="main__employer-page-item"> 131 <div class="main__employer-page-item">
115 <b>Сайт</b> 132 <b>Сайт</b>
116 <span> 133 <span>
117 <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> 134 <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a>
118 </span> 135 </span>
119 </div> 136 </div>
120 <div class="main__employer-page-item"> 137 <div class="main__employer-page-item">
121 <b>Почта</b> 138 <b>Почта</b>
122 <span> 139 <span>
123 <a href="mailto:">{{ $company[0]->email }}</a> 140 <a href="mailto:">{{ $company[0]->email }}</a>
124 </span> 141 </span>
125 </div> 142 </div>
126 <div class="main__employer-page-item"> 143 <div class="main__employer-page-item">
127 <b>Телефон</b> 144 <b>Телефон</b>
128 <span> 145 <span>
129 <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> 146 <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a>
130 </span> 147 </span>
131 </div> 148 </div>
132 </div> 149 </div>
133 <div class="main__employer-page-item"> 150 <div class="main__employer-page-item">
134 <b>Описание</b> 151 <b>Описание</b>
135 <span> 152 <span>
136 {{ $company[0]->text }} 153 {{ $company[0]->text }}
137 </span> 154 </span>
138 </div> 155 </div>
139 <div> 156 <div>
140 <div class="main__employer-page-tabs"> 157 <div class="main__employer-page-tabs">
141 <button type="button" class="main__employer-page-tabs-item active" 158 <button type="button" class="main__employer-page-tabs-item active"
142 data-tab="1">Флот</button> 159 data-tab="1">Флот</button>
143 <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> 160 <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button>
144 </div> 161 </div>
145 <div class="main__employer-page-body"> 162 <div class="main__employer-page-body">
146 <div class="main__employer-page-body-item showed" data-body="1"> 163 <div class="main__employer-page-body-item showed" data-body="1">
147 <div class="main__employer-page-one"> 164 <div class="main__employer-page-one">
148 @if ($company[0]->flots->count()) 165 @if ($company[0]->flots->count())
149 @foreach ($company[0]->flots as $flot) 166 @foreach ($company[0]->flots as $flot)
150 <a href="" class="main__employer-page-one-item"> 167 <a href="" class="main__employer-page-one-item">
151 <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> 168 <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}">
152 <b>{{ $flot->region }}</b> 169 <b>{{ $flot->region }}</b>
153 <span>{{ $flot->power }}</span> 170 <span>{{ $flot->power }}</span>
154 </a> 171 </a>
155 @endforeach 172 @endforeach
156 @endif 173 @endif
157 </div> 174 </div>
158 </div> 175 </div>
159 176
160 <div class="main__employer-page-body-item" data-body="2"> 177 <div class="main__employer-page-body-item" data-body="2">
161 <div class="main__employer-page-two"> 178 <div class="main__employer-page-two">
162 @foreach ($company[0]->ads as $job) 179 @foreach ($company[0]->ads as $job)
163 @foreach ($job->ad_job as $item) 180 @foreach ($job->ad_job as $item)
164 <div class="main__employer-page-two-item"> 181 <div class="main__employer-page-two-item">
165 <div class="main__employer-page-two-item-toper"> 182 <div class="main__employer-page-two-item-toper">
166 <!-- end --> 183 <!-- end -->
167 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> 184 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}">
168 <span>{{ $job->name }}</span> 185 <span>{{ $job->name }}</span>
169 </div> 186 </div>
170 <div class="main__employer-page-two-item-title">{{ $item->flot }}</div> 187 <div class="main__employer-page-two-item-title">{{ $item->flot }}</div>
171 <div class="main__employer-page-two-item-text"> 188 <div class="main__employer-page-two-item-text">
172 <div class="main__employer-page-two-item-text-name"> 189 <div class="main__employer-page-two-item-text-name">
173 {{ $item->job_title->name }} 190 {{ $item->job_title->name }}
174 </div> 191 </div>
175 <div class="main__employer-page-two-item-text-body"> 192 <div class="main__employer-page-two-item-text-body">
176 <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p> 193 <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p>
177 <p>Контракт: {{ $item->period }} мес.</p> 194 <p>Контракт: {{ $item->period }} мес.</p>
178 </div> 195 </div>
179 </div> 196 </div>
180 <div class="main__employer-page-two-item-text"> 197 <div class="main__employer-page-two-item-text">
181 <div class="main__employer-page-two-item-text-name">Район работы</div> 198 <div class="main__employer-page-two-item-text-name">Район работы</div>
182 <div class="main__employer-page-two-item-text-body"> 199 <div class="main__employer-page-two-item-text-body">
183 <p>{{ $item->region }}</p> 200 <p>{{ $item->region }}</p>
184 </div> 201 </div>
185 </div> 202 </div>
186 <div class="main__employer-page-two-item-text"> 203 <div class="main__employer-page-two-item-text">
187 <div class="main__employer-page-two-item-text-name">Посадка</div> 204 <div class="main__employer-page-two-item-text-name">Посадка</div>
188 <div class="main__employer-page-two-item-text-body"> 205 <div class="main__employer-page-two-item-text-body">
189 <p> {{ $item->start }}</p> 206 <p> {{ $item->start }}</p>
190 {!! $item->description !!} 207 {!! $item->description !!}
191 </div> 208 </div>
192 </div> 209 </div>
193 <div class="main__employer-page-two-item-text"> 210 <div class="main__employer-page-two-item-text">
194 <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: 211 <div class="main__employer-page-two-item-text-name">Звонить по вопросам на:
195 </div> 212 </div>
196 <div class="main__employer-page-two-item-text-body"> 213 <div class="main__employer-page-two-item-text-body">
197 <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a> 214 <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a>
198 </div> 215 </div>
199 </div> 216 </div>
200 <div class="main__employer-page-two-item-text"> 217 <div class="main__employer-page-two-item-text">
201 <div class="main__employer-page-two-item-text-name">Анкеты присылать на 218 <div class="main__employer-page-two-item-text-name">Анкеты присылать на
202 почту: 219 почту:
203 </div> 220 </div>
204 <div class="main__employer-page-two-item-text-body"> 221 <div class="main__employer-page-two-item-text-body">
205 <a href="mailto: {{ $job->email }}">{{ $job->email }}</a> 222 <a href="mailto: {{ $job->email }}">{{ $job->email }}</a>
206 </div> 223 </div>
207 </div> 224 </div>
208 <div class="main__employer-page-two-item-tags"> 225 <div class="main__employer-page-two-item-tags">
209 <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> 226 <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span>
210 </div> 227 </div>
211 <div class="main__employer-page-two-item-buttons"> 228 <div class="main__employer-page-two-item-buttons">
212 <button type="button" 229 <button type="button"
213 class="button main__employer-page-two-item-button">Оставить 230 class="button main__employer-page-two-item-button">Оставить
214 отклик</button> 231 отклик</button>
215 <a href="#" 232 <a href="#"
216 class="button button_light main__employer-page-two-item-button">Подробнее</a> 233 class="button button_light main__employer-page-two-item-button">Подробнее</a>
217 </div> 234 </div>
218 <div class="main__employer-page-two-item-bottom"> 235 <div class="main__employer-page-two-item-bottom">
219 <div class="main__employer-page-two-item-bottom-date">{{ $job->updated_at }}</div> 236 <div class="main__employer-page-two-item-bottom-date">{{ $job->updated_at }}</div>
220 <button type="button" 237 <button type="button"
221 class="like main__employer-page-two-item-bottom-like js-toggle"> 238 class="like main__employer-page-two-item-bottom-like js-toggle">
222 <svg> 239 <svg>
223 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 240 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
224 </svg> 241 </svg>
225 </button> 242 </button>
226 </div> 243 </div>
227 </div> 244 </div>
228 @endforeach 245 @endforeach
229 @endforeach 246 @endforeach
230 <button type="button" 247 <button type="button"
231 class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> 248 class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle">
232 <span>Показать ещё</span> 249 <span>Показать ещё</span>
233 <span>Скрыть</span> 250 <span>Скрыть</span>
234 </button> 251 </button>
235 </div> 252 </div>
236 </div> 253 </div>
237 </div> 254 </div>
238 </div> 255 </div>
239 </div> 256 </div>
240 </div> 257 </div>
241 </main> 258 </main>
242 @endsection 259 @endsection
243 260
resources/views/js/modals.blade.php
File was created 1 <script>
2 console.log('Test system');
3 $(document).on('click', '#button_send', function() {
4 var field_login = $('#email');
5 var field_pwd = $('#password');
6 var login_val = field_login.val();
7 var pwd_val = field_pwd.val();
8
9 console.log('login: '+login_val+' password: '+pwd_val);
10
11 $.ajax({
12 type: "GET",
13 url: "{{ route('login') }}",
14 data: "email="+login_val+"&password="+pwd_val,
15 success: function (data) {
16 console.log('Вход в систему');
17 let d = JSON.parse(data);
18 if(typeof d['REDIRECT'] !== "undefined") {
19 location.href = d['REDIRECT'];
20 console.log(d['REDIRECT']);
21 }
22 if (typeof d['ERROR'] !== "undefined") {
23 console.log(d['ERROR']);
24 $('#message_error').html(d['ERROR']);
25 }
26 console.log(d['REDIRECT']);
27 //$('#block_1').html(data);
28 },
29 headers: {
30 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
31 },
32 error: function (data) {
33 data = JSON.stringify(data);
34 console.log('Error: ' + data);
35 }
36 });
37 });
38
39 $(document).on('click', '#button_reg_worker', function() {
40 var field_login = $('#email_worker');
41 var field_pwd = $('#password_worker');
42 var field_confirm_pwd = $('#password_confirmation_worker');
43 var field_politik_worker = $('#politik_worker');
44 var field_telephone_worker = $('#telephone_worker');
45 var field_job_titles_worker = $('#job_titles_worker');
46 var field_surname_worker = $('#surname_worker');
47 var field_name_man = $('#name_man_worker');
48 var field_surname2_worker = $('#surname2_worker');
49
50 var login = field_login.val();
51 var pwd = field_pwd.val();
52 var confirm_pwd = field_confirm_pwd.val();
53 var politik = field_politik_worker.val();
54 var telephone = field_telephone_worker.val();
55 var job_titles = field_job_titles_worker.val();
56 var surname = field_surname_worker.val();
57 var name_man = field_name_man.val();
58 var surname2 = field_surname2_worker.val();
59
60
61 console.log('login: '+login+' password: '+pwd);
62
63 $.ajax({
64 type: "GET",
65 url: "{{ route('register_worker') }}",
66 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
67 "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+
68 "&surname2="+surname2+"&subscribe_email="+login,
69 success: function (data) {
70 console.log('Вход в систему');
71 let d = JSON.parse(data);
72 if(typeof d['REDIRECT'] !== "undefined") {
73 console.log(d['REDIRECT']);
74 location.href = d['REDIRECT'];
75 }
76 if (typeof d['ERROR'] !== "undefined") {
77 console.log(d['ERROR']);
78 $('#block-info').css({'display': 'block'});
79 $('#messages_error_reg').html(d['ERROR']);
80 }
81 console.log(d['REDIRECT']);
82
83 },
84 headers: {
85 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
86 },
87 error: function (data) {
88 data = JSON.stringify(data);
89 console.log('Error: ' + data);
90 }
91 });
92
93 return false;
94 });
95
96 $(document).on('click', '#button_reg_employer', function() {
97 var field_login = $('#email_employer');
98 var field_pwd = $('#password_employer');
99 var field_confirm_pwd = $('#password_confirmation_employer');
100 var field_politik_employer = $('#politik_employer');
101 var field_telephone_employer = $('#telephone_employer');
102 var field_company_employer = $('#company_employer');
103 var field_surname_employer = $('#surname_employer');
104 var field_name_man_employer = $('#name_man_employer');
105 var field_surname2_employer = $('#surname2_employer');
106
107 var login = field_login.val();
108 var pwd = field_pwd.val();
109 var confirm_pwd = field_confirm_pwd.val();
110 var politik = field_politik_employer.val();
111 var telephone = field_telephone_employer.val();
112 var company_employer = field_company_employer.val();
113 var surname = field_surname_employer.val();
114 var name_man = field_name_man_employer.val();
115 var surname2 = field_surname2_employer.val();
116
117
118 console.log('login: '+login+' password: '+pwd);
119
120
121 $.ajax({
122 type: "GET",
123 url: "{{ route('register_employer') }}",
124 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
125 "&telephone="+telephone+"&name_company="+company_employer+"&surname="+surname+"&name_man="+name_man+
126 "&surname2="+surname2+"&subscribe_email="+login,
127 success: function (data) {
128 console.log('Вход в систему');
129 let d = JSON.parse(data);
130 if(typeof d['REDIRECT'] !== "undefined") {
131 console.log(d['REDIRECT']);
132 location.href = d['REDIRECT'];
133 }
134 if (typeof d['ERROR'] !== "undefined") {
135 console.log(d['ERROR']);
136 $('#block-info').css({'display': 'block'});
137 $('#messages_error_reg').html(d['ERROR']);
138 }
139 console.log(d['REDIRECT']);
140
141 },
142 headers: {
143 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
144 },
145 error: function (data) {
146 data = JSON.stringify(data);
147 console.log('Error: ' + data);
148 }
149 });
150
151 return false;
152 });
153
154 </script>
155
resources/views/layout/frontend.blade.php
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> 2 <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
3 3
4 <head> 4 <head>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 <title>{{ $title }}</title> 6 <title>{{ $title }}</title>
7 <meta name="viewport" content="width=device-width,initial-scale=1"> 7 <meta name="viewport" content="width=device-width,initial-scale=1">
8 <meta name="theme-color" content="#377D87"> 8 <meta name="theme-color" content="#377D87">
9 <script src="{{ asset('js/jquery.js') }}"></script> 9 <script src="{{ asset('js/jquery.js') }}"></script>
10 <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> 10 <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script>
11 <link rel="stylesheet" href="{{ asset('css/style.css') }}"> 11 <link rel="stylesheet" href="{{ asset('css/style.css') }}">
12 <style> 12 <style>
13 .err_red { 13 .err_red {
14 border: red 2px solid; 14 border: red 2px solid;
15 } 15 }
16 </style> 16 </style>
17 </head> 17 </head>
18 18
19 <body id="body"> 19 <body id="body">
20 <a href="#body" class="to-top js-scroll-to"> 20 <a href="#body" class="to-top js-scroll-to">
21 <svg> 21 <svg>
22 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 22 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
23 </svg> 23 </svg>
24 </a> 24 </a>
25 25
26 <div> <!-- BEGIN TOP WRAPPER --> 26 <div> <!-- BEGIN TOP WRAPPER -->
27 <header class="header"> 27 <header class="header">
28 <div class="container"> 28 <div class="container">
29 <div class="header__body"> 29 <div class="header__body">
30 <div class="header__left"> 30 <div class="header__left">
31 <a href="{{ route('index') }}" class="header__logo"> 31 <a href="{{ route('index') }}" class="header__logo">
32 <svg> 32 <svg>
33 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 33 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
34 </svg> 34 </svg>
35 </a> 35 </a>
36 <nav class="header__menu"> 36 <nav class="header__menu">
37 <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> 37 <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a>
38 <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> 38 <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a>
39 <a href="{{ route('education') }}" class="header__menu-item">Образование</a> 39 <a href="{{ route('education') }}" class="header__menu-item">Образование</a>
40 </nav> 40 </nav>
41 </div> 41 </div>
42 <div class="header__right"> 42 <div class="header__right">
43 @guest 43 @guest
44 44
45 @else 45 @else
46 <button class="header__notifs header__notifs_actived"> 46 <button class="header__notifs header__notifs_actived">
47 <svg> 47 <svg>
48 <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> 48 <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use>
49 </svg> 49 </svg>
50 <span>Уведомления</span> 50 <span>Уведомления</span>
51 </button> 51 </button>
52 <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs"> 52 <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs">
53 Кабинет 53 Кабинет
54 </a> 54 </a>
55 @endguest 55 @endguest
56 <div class="header__right-line"></div> 56 <div class="header__right-line"></div>
57 <button class="header__burger"> 57 <button class="header__burger">
58 <svg> 58 <svg>
59 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> 59 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use>
60 </svg> 60 </svg>
61 </button> 61 </button>
62 @guest 62 @guest
63 <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> 63 <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a>
64 @else 64 @else
65 <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> 65 <a class="button header__sign" href="{{ route('logout') }}">Выйти</a>
66 @endguest 66 @endguest
67 </div> 67 </div>
68 </div> 68 </div>
69 </div> 69 </div>
70 </header> 70 </header>
71 @yield('content') 71 @yield('content')
72 </div> <!-- END TOP WRAPPER --> 72 </div> <!-- END TOP WRAPPER -->
73 73
74 <div> <!-- BEGIN BOTTOM WRAPPER --> 74 <div> <!-- BEGIN BOTTOM WRAPPER -->
75 <footer class="footer"> 75 <footer class="footer">
76 <div class="container"> 76 <div class="container">
77 <div class="footer__mobile"> 77 <div class="footer__mobile">
78 78
79 <button class="footer__mobile-toper js-toggle active"> 79 <button class="footer__mobile-toper js-toggle active">
80 <a href="{{ route('index') }}"> 80 <a href="{{ route('index') }}">
81 <svg> 81 <svg>
82 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 82 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
83 </svg> 83 </svg>
84 </a> 84 </a>
85 <span> 85 <span>
86 <svg> 86 <svg>
87 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 87 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
88 </svg> 88 </svg>
89 </span> 89 </span>
90 </button> 90 </button>
91 <div class="footer__mobile-menu"> 91 <div class="footer__mobile-menu">
92 <div class="footer__mobile-menu-item"> 92 <div class="footer__mobile-menu-item">
93 <button class="js-toggle"> 93 <button class="js-toggle">
94 <b>Соискателям</b> 94 <b>Соискателям</b>
95 <span><svg> 95 <span><svg>
96 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 96 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
97 </svg></span> 97 </svg></span>
98 </button> 98 </button>
99 <div> 99 <div>
100 <a href="{{ route('vacancies') }}">Вакансии</a> 100 <a href="{{ route('vacancies') }}">Вакансии</a>
101 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> 101 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
102 <a href="{{ route('education') }}">Образование</a> 102 <a href="{{ route('education') }}">Образование</a>
103 <a href="{{ route('news') }}">Новости</a> 103 <a href="{{ route('news') }}">Новости</a>
104 <a href="{{ route('contacts') }}">Контакты</a> 104 <a href="{{ route('contacts') }}">Контакты</a>
105 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> 105 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
106 </div> 106 </div>
107 </div> 107 </div>
108 <div class="footer__mobile-menu-item"> 108 <div class="footer__mobile-menu-item">
109 <button class="js-toggle"> 109 <button class="js-toggle">
110 <b>Работодателям</b> 110 <b>Работодателям</b>
111 <span><svg> 111 <span><svg>
112 <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> 112 <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use>
113 </svg></span> 113 </svg></span>
114 </button> 114 </button>
115 <div> 115 <div>
116 <a href="{{ route('register') }}">Регистрация</a> 116 <a href="{{ route('register') }}">Регистрация</a>
117 <a href="{{ route('bd_resume') }}">База резюме</a> 117 <a href="{{ route('bd_resume') }}">База резюме</a>
118 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> 118 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
119 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> 119 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
120 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> 120 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
121 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> 121 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
122 </div> 122 </div>
123 </div> 123 </div>
124 </div> 124 </div>
125 <div class="footer__mobile-contacts"> 125 <div class="footer__mobile-contacts">
126 <b>Контакты</b> 126 <b>Контакты</b>
127 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> 127 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a>
128 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> 128 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a>
129 </div> 129 </div>
130 <div class="footer__mobile-bottom"> 130 <div class="footer__mobile-bottom">
131 <div class="socials"> 131 <div class="socials">
132 <a href="{{ $companies[0]->vkontact }}" target="_blank"> 132 <a href="{{ $companies[0]->vkontact }}" target="_blank">
133 <svg> 133 <svg>
134 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 134 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
135 </svg> 135 </svg>
136 </a> 136 </a>
137 <a href="{{ $companies[0]->telegram }}" target="_blank"> 137 <a href="{{ $companies[0]->telegram }}" target="_blank">
138 <svg> 138 <svg>
139 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 139 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
140 </svg> 140 </svg>
141 </a> 141 </a>
142 </div> 142 </div>
143 <nav class="footer__mobile-links"> 143 <nav class="footer__mobile-links">
144 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> 144 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a>
145 <span></span> 145 <span></span>
146 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> 146 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a>
147 </nav> 147 </nav>
148 &copy; 2023 &mdash; RekaMore.su 148 &copy; 2023 &mdash; RekaMore.su
149 <a href="{{ route('index') }}" class="nls" target="_blank"> 149 <a href="{{ route('index') }}" class="nls" target="_blank">
150 <svg> 150 <svg>
151 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> 151 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use>
152 </svg> 152 </svg>
153 <span> 153 <span>
154 Дизайн и разработка: 154 Дизайн и разработка:
155 <b>NoLogoStudio.ru</b> 155 <b>NoLogoStudio.ru</b>
156 </span> 156 </span>
157 </a> 157 </a>
158 </div> 158 </div>
159 </div> 159 </div>
160 <div class="footer__main"> 160 <div class="footer__main">
161 <div class="footer__main-body"> 161 <div class="footer__main-body">
162 162
163 <a href="" class="footer__main-logo"> 163 <a href="" class="footer__main-logo">
164 <svg> 164 <svg>
165 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 165 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
166 </svg> 166 </svg>
167 </a> 167 </a>
168 <div class="footer__main-col"> 168 <div class="footer__main-col">
169 <div class="footer__main-title">Соискателям</div> 169 <div class="footer__main-title">Соискателям</div>
170 <nav> 170 <nav>
171 <a href="{{ route('vacancies') }}">Вакансии</a> 171 <a href="{{ route('vacancies') }}">Вакансии</a>
172 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> 172 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
173 <a href="{{ route('education') }}">Образование</a> 173 <a href="{{ route('education') }}">Образование</a>
174 <a href="{{ route('news') }}">Новости</a> 174 <a href="{{ route('news') }}">Новости</a>
175 <a href="{{ route('contacts') }}">Контакты</a> 175 <a href="{{ route('contacts') }}">Контакты</a>
176 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> 176 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
177 </nav> 177 </nav>
178 </div> 178 </div>
179 <div class="footer__main-col"> 179 <div class="footer__main-col">
180 <div class="footer__main-title">Работодателям</div> 180 <div class="footer__main-title">Работодателям</div>
181 <nav> 181 <nav>
182 <a href="{{ route('register') }}">Регистрация</a> 182 <a href="{{ route('register') }}">Регистрация</a>
183 <a href="{{ route('bd_resume') }}">База резюме</a> 183 <a href="{{ route('bd_resume') }}">База резюме</a>
184 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> 184 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
185 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> 185 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
186 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> 186 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
187 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> 187 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
188 </nav> 188 </nav>
189 </div> 189 </div>
190 190
191 <div class="footer__main-col"> 191 <div class="footer__main-col">
192 <div class="footer__main-title">Контакты</div> 192 <div class="footer__main-title">Контакты</div>
193 <div class="footer__main-contacts"> 193 <div class="footer__main-contacts">
194 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> 194 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a>
195 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> 195 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a>
196 </div> 196 </div>
197 <div class="socials"> 197 <div class="socials">
198 <a href="{{ $companies[0]->vkontact }}" target="_blank"> 198 <a href="{{ $companies[0]->vkontact }}" target="_blank">
199 <svg> 199 <svg>
200 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 200 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
201 </svg> 201 </svg>
202 </a> 202 </a>
203 <a href="{{ $companies[0]->telegram }}" target="_blank"> 203 <a href="{{ $companies[0]->telegram }}" target="_blank">
204 <svg> 204 <svg>
205 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 205 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
206 </svg> 206 </svg>
207 </a> 207 </a>
208 </div> 208 </div>
209 </div> 209 </div>
210 </div> 210 </div>
211 <pre>{{ print_r($_COOKIE) }}</pre> 211 <pre>{{ print_r($_COOKIE) }}</pre>
212 <div class="footer__main-copy"> 212 <div class="footer__main-copy">
213 <div>&copy; 2023 &mdash; RekaMore.su</div> 213 <div>&copy; 2023 &mdash; RekaMore.su</div>
214 <nav> 214 <nav>
215 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> 215 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a>
216 <span></span> 216 <span></span>
217 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> 217 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a>
218 </nav> 218 </nav>
219 <a href="{{ route('index') }}" class="nls" target="_blank"> 219 <a href="{{ route('index') }}" class="nls" target="_blank">
220 <svg> 220 <svg>
221 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> 221 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use>
222 </svg> 222 </svg>
223 <span> 223 <span>
224 Дизайн и разработка: 224 Дизайн и разработка:
225 <b>NoLogoStudio.ru</b> 225 <b>NoLogoStudio.ru</b>
226 </span> 226 </span>
227 </a> 227 </a>
228 </div> 228 </div>
229 </div> 229 </div>
230 </div> 230 </div>
231 </footer> 231 </footer>
232 </div> <!-- END BOTTOM WRAPPER --> 232 </div> <!-- END BOTTOM WRAPPER -->
233 233
234 <div hidden> <!-- BEGIN MODALS WRAPPER --> 234 <div hidden> <!-- BEGIN MODALS WRAPPER -->
235 <!-- Отправить сообщение соискателю --> 235 <!-- Соискатель отправляет сообщение работодателю -->
236 @include('modals.send_worker') 236 @include('modals.send_worker')
237 237
238 <!-- Работодатель отправляет сообщение соискателю -->
239 @include('modals.send_employer')
240
238 <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> 241 <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям -->
239 @include('modals.send_message_noaut') 242 @include('modals.send_message_noaut')
240 243
241 <!-- Форма авторизации --> 244 <!-- Форма авторизации -->
242 @include('modals.send_login') 245 @include('modals.send_login')
243 246
244 <!-- Сбросить пароль --> 247 <!-- Сбросить пароль -->
245 @include('modals.reset_password') 248 @include('modals.reset_password')
246 249
247 <!-- Регистрация --> 250 <!-- Регистрация -->
248 @include('modals.register') 251 @include('modals.register')
249 252
250 <!-- Благодарность по отправке сообщения работодателю --> 253 <!-- Благодарность по отправке сообщения работодателю -->
251 @include('modals.thank_you_send_employer') 254 @include('modals.thank_you_send_employer')
252 255
253 <!-- Благодарность по отправке сообщения менеджеру --> 256 <!-- Благодарность по отправке сообщения менеджеру -->
254 @include('modals.thank_you_send_manager') 257 @include('modals.thank_you_send_manager')
255 258
259 <!-- Благодарность после регистрации -->
260 @include('modals.thank_you_send_for_employer')
256 261
257 <div id="thanks-3" class="modal modal_bg"> 262 <!-- Благодарность после регистрации для работника -->
258 <div class="modal__body"> 263 @include('modals.thank_you_send_for_worker')
259 <div class="modal__title">Спасибо!</div> 264
260 <div class="modal__text">Вы успешно зарегистрировались</div> 265 <!-- Подтверждение удаления профиля -->
261 <div class="modal__text left"><span>Ваш аккаунт требует подтверждение администратора сайта. Администратор сайта должен изменить статус работодателя, чтобы вы смогли авторизоваться в системе.</span></div> 266 @include('modals.delete_profile')
262 <div class="modal__text left"><span>После подтверждения администратором, вам прейдет сообщение на электронную почту, о подтверждении регистрации.</span></div> 267
263 <a href="#" class="button button_light modal__button">Войти</a> 268 <!-- Подверждение об удалении профиля -->
264 </div> 269 @include('modals.success_delete_profile')
265 </div>
266 270
267 <div id="thanks-4" class="modal modal_bg">
268 <div class="modal__body">
269 <div class="modal__title">Спасибо!</div>
270 <div class="modal__text">Ваше сообщение успешно отправлено администратору сайта на подтверждение.</div>
271 <a href="#" class="button button_light modal__button">На главную</a>
272 </div>
273 </div>
274 <div id="delete" class="modal modal_bg">
275 <div class="modal__body">
276 <div class="modal__title">Удалить профиль?</div>
277 <div class="modal__text">Вы действительно хотите удалить свой профиль?</div>
278 <div class="modal__buttons">
279 <button href="button" class="button">Да</button>
280 <button href="button" class="button button_light">Нет</button>
281 </div>
282 </div>
283 </div>
284 <div id="is-deleted" class="modal modal_bg">
285 <div class="modal__body">
286 <div class="modal__title">Профиль удален</div>
287 <div class="modal__text">Вы успешно удалили свой профиль.</div>
288 <a href="#" class="button button_light modal__button">На главную</a>
289 </div>
290 </div>
291 </div> <!-- END MODALS WRAPPER --> 271 </div> <!-- END MODALS WRAPPER -->
292 272
293 273
294 <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> 274 <script src="{{ asset('js/jquery.maskedinput.js') }}"></script>
295 <script src="{{ asset('js/jquery.fancybox.js') }}"></script> 275 <script src="{{ asset('js/jquery.fancybox.js') }}"></script>
296 <script src="{{ asset('js/jquery.select2.js') }}"></script> 276 <script src="{{ asset('js/jquery.select2.js') }}"></script>
297 <script src="{{ asset('js/swiper.js') }}"></script> 277 <script src="{{ asset('js/swiper.js') }}"></script>
298 <script src="{{ asset('js/script.js') }}"></script> 278 <script src="{{ asset('js/script.js') }}"></script>
299 <script> 279 <script>
300 var getUrlParameter = function getUrlParameter(sParam) { 280 var getUrlParameter = function getUrlParameter(sParam) {
301 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 281 var sPageURL = decodeURIComponent(window.location.search.substring(1)),
302 sURLVariables = sPageURL.split('&'), 282 sURLVariables = sPageURL.split('&'),
303 sParameterName, 283 sParameterName,
304 i; 284 i;
305 for (i = 0; i < sURLVariables.length; i++) { 285 for (i = 0; i < sURLVariables.length; i++) {
306 sParameterName = sURLVariables[i].split('='); 286 sParameterName = sURLVariables[i].split('=');
307 if (sParameterName[0] === sParam) { 287 if (sParameterName[0] === sParam) {
308 return sParameterName[1] === undefined ? true : sParameterName[1]; 288 return sParameterName[1] === undefined ? true : sParameterName[1];
309 } 289 }
310 } 290 }
311 }; 291 };
resources/views/list_vacancies.blade.php
1 @php
2 use App\Classes\StatusUser;
3 @endphp
4
1 @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) 5 @extends('layout.frontend', ['title' => 'Вакансии РекаМоре'])
2 6
3 @section('scripts') 7 @section('scripts')
4 <script> 8 <script>
5 console.log('Test system'); 9 console.log('Test system');
6 $(document).on('change', '#jobs', function() { 10 $(document).on('change', '#jobs', function() {
7 var val = $(this).val(); 11 var val = $(this).val();
8 var main_oskar = $('#main_ockar'); 12 var main_oskar = $('#main_ockar');
9 13
10 console.log('Code='+val); 14 console.log('Code='+val);
11 console.log('Click change...'); 15 console.log('Click change...');
12 $.ajax({ 16 $.ajax({
13 type: "GET", 17 type: "GET",
14 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", 18 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}",
15 data: "job="+val, 19 data: "job="+val,
16 success: function (data) { 20 success: function (data) {
17 console.log('Выбор сделан!'); 21 console.log('Выбор сделан!');
18 console.log(data); 22 console.log(data);
19 main_oskar.html(data); 23 main_oskar.html(data);
24 history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
20 }, 25 },
21 headers: { 26 headers: {
22 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 27 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
23 }, 28 },
24 error: function (data) { 29 error: function (data) {
25 data = JSON.stringify(data); 30 data = JSON.stringify(data);
26 console.log('Error: ' + data); 31 console.log('Error: ' + data);
27 } 32 }
28 }); 33 });
29 }); 34 });
35
36 $(document).on('click', '.js_send_it_button', function() {
37 var this_ = $(this);
38 var code_user_id = this_.attr('data-uid');
39 var code_to_user_id = this_.attr('data-tuid');
40 var code_vacancy = this_.attr('data-vacancy');
41 var user_id = $('#send_user_id');
42 var to_user_id = $('#send_to_user_id');
43 var vacancy = $('#send_vacancy');
44
45 console.log('Клик на кнопки...');
46
47 user_id.val(code_user_id);
48 to_user_id.val(code_to_user_id);
49 vacancy.val(code_vacancy);
50 });
51
52 $(document).on('change', '#sort_ajax', function() {
53 var this_ = $(this);
54 var val_ = this_.val();
55 console.log('sort items '+val_);
56
57 $.ajax({
58 type: "GET",
59 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}",
60 data: "sort="+val_+"&block=1",
61 success: function (data) {
62 console.log('Выбор сортировки');
63 console.log(data);
64 $('#main_ockar').html(data);
65 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
66 },
67 headers: {
68 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
69 },
70 error: function (data) {
71 data = JSON.stringify(data);
72 console.log('Error: ' + data);
73 }
74 });
75 });
76
77
78
79 $(document).ready(function(){
80 var sel = $('#select2-sort_ajax-container');
81 var key = getUrlParameter('sort');
82 console.log(sel);
83 console.log(key);
84
85 if (key !=='') {
86 console.log(key);
87 switch (key) {
88 case "default": sel.html('Сортировка (по умолчанию)'); break;
89 case "name_up": sel.html('По имени (возрастание)'); break;
90 case "name_down": sel.html('По дате (убывание)'); break;
91 case "created_at_up": sel.html('По дате (возрастание)'); break;
92 case "created_at_down": sel.html('По дате (убывание)'); break;
93 }
94
95 }
96 });
30 </script> 97 </script>
31 @include('js.favorite-vacancy') 98 @include('js.favorite-vacancy')
32 @endsection 99 @endsection
33 @section('content') 100 @section('content')
34 <section class="thing"> 101 <section class="thing">
35 <div class="container"> 102 <div class="container">
36 <form class="thing__body"> 103 <form class="thing__body" action="{{ route('list-vacancies', ['categories' => $Name_categori[0]->id]) }}" method="POST">
37 <ul class="breadcrumbs thing__breadcrumbs"> 104 <ul class="breadcrumbs thing__breadcrumbs">
38 <li><a href="{{ route('index') }}">Главная</a></li> 105 <li><a href="{{ route('index') }}">Главная</a></li>
39 <li><a href="{{ route('vacancies') }}">Вакансии</a></li> 106 <li><a href="{{ route('vacancies') }}">Вакансии</a></li>
40 <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> 107 <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li>
41 </ul> 108 </ul>
42 <h1 class="thing__title">Вакансии</h1> 109 <h1 class="thing__title">Вакансии</h1>
43 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 110 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
44 существующих финансовых и административных условий.</p> 111 существующих финансовых и административных условий.</p>
45 <div class="select select_search thing__select"> 112 <div class="select select_search thing__select">
46 <div class="select__icon"> 113 <div class="select__icon">
47 <svg> 114 <svg>
48 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 115 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
49 </svg> 116 </svg>
50 </div> 117 </div>
51 <select class="js-select2" id="jobs" name="jobs"> 118 <select class="js-select2" id="jobs" name="jobs">
52 <option value="0" disabled selected>Выберите должность</option> 119 <option value="0" selected>Выберите должность</option>
53 @if ($Job_title->count()) 120 @if ($Job_title->count())
54 @foreach($Job_title as $JT) 121 @foreach($Job_title as $JT)
55 <option value="{{ $JT->id }}">{{ $JT->name }}</option> 122 <option value="{{ $JT->id }}">{{ $JT->name }}</option>
56 @endforeach 123 @endforeach
57 @endif 124 @endif
58 </select> 125 </select>
59 </div> 126 </div>
60 </form> 127 </form>
61 </div> 128 </div>
62 </section> 129 </section>
63 <main class="main"> 130 <main class="main">
64 <div class="container"> 131 <div class="container">
65 <div class="main__vacancies"> 132 <div class="main__vacancies">
66 @if (isset($job)) 133 @if (isset($job))
67 <h2 class="main__vacancies-title">Категория вакансий {{ $job }}</h2> 134 <h2 class="main__vacancies-title">Категория вакансий {{ $job }}</h2>
68 @else 135 @else
69 <h2 class="main__vacancies-title">Все категории</h2> 136 <h2 class="main__vacancies-title">Все категории</h2>
70 @endif 137 @endif
71 <div class="filters main__vacancies-filters"> 138 <div class="filters main__vacancies-filters">
72 <div class="filters__label" id="col-vo" name="col-vo">Показано @if ($Query_count < 3) {{$Query_count}} @else 3 @endif из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> 139 <div class="filters__label" id="col-vo" name="col-vo">Показано @if ($Query_count < 3) {{$Query_count}} @else 3 @endif из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div>
73 <div class="filters__body"> 140 <div class="filters__body">
74 <div class="select filters__select"> 141 <div class="select filters__select">
75 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 142 <select class="js-select2" id="sort_ajax" name="sort_ajax">
76 <option value="default">Сортировка (по умолчанию)</option> 143 <option value="default">Сортировка (по умолчанию)</option>
77 <option value="name (asc)">По имени (возрастание)</option> 144 <option value="name_up">По имени (возрастание)</option>
78 <option value="name (desc)">По имени (убывание)</option> 145 <option value="name_down">По имени (убывание)</option>
79 <option value="created_at (asc)">По дате (возрастание)</option> 146 <option value="created_at_up">По дате (возрастание)</option>
80 <option value="created_at (desc)">По дате (убывание)</option> 147 <option value="created_at_down">По дате (убывание)</option>
81 </select> 148 </select>
82 </div> 149 </div>
83 </div> 150 </div>
84 </div> 151 </div>
152
85 <div id="main_ockar" class="main__vacancies" name="main_ockar" style="width:100%;"> 153 <div id="main_ockar" class="main__vacancies" name="main_ockar" style="width:100%;">
86 @foreach ($Query as $Q) 154 @foreach ($Query as $Q)
87 <div class="main__vacancies-item main__employer-page-two-item"> 155 <div class="main__vacancies-item main__employer-page-two-item">
88 <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> 156 <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back">
89 <svg> 157 <svg>
90 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> 158 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use>
91 </svg> 159 </svg>
92 <span> 160 <span>
93 Вернуться к списку вакансий 161 Вернуться к списку вакансий
94 </span> 162 </span>
95 </a> 163 </a>
96 <div class="main__employer-page-two-item-toper"> 164 <div class="main__employer-page-two-item-toper">
97 @if (isset($Q->employer)) 165 @if (isset($Q->employer))
98 <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> 166 <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}">
99 @endif 167 @endif
100 <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> 168 <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span>
101 </div> 169 </div>
102 <div class="main__employer-page-two-item-text"> 170 <div class="main__employer-page-two-item-text">
103 <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор 171 <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор
104 специалистов на следующие должности:</div> 172 специалистов на следующие должности:</div>
105 <div class="main__employer-page-two-item-text-links"> 173 <div class="main__employer-page-two-item-text-links">
106 @if (isset($Q->jobs)) 174 @if (isset($Q->jobs))
107 @foreach ($Q->jobs as $key => $j) 175 @foreach ($Q->jobs as $key => $j)
108 <a>“{{ $j->name }}” – з/п от @if (isset($Q->jobs_code[$key]->min_salary)) {{ $Q->jobs_code[$key]->min_salary }} @endif - @if (isset($Q->jobs_code[$key]->max_salary)) {{ $Q->jobs_code[$key]->max_salary }} @endif рублей (на руки)</a> 176 <a>“{{ $j->name }}” – з/п от @if (isset($Q->jobs_code[$key]->min_salary)) {{ $Q->jobs_code[$key]->min_salary }} @endif - @if (isset($Q->jobs_code[$key]->max_salary)) {{ $Q->jobs_code[$key]->max_salary }} @endif рублей (на руки)</a>
109 @endforeach 177 @endforeach
110 @endif 178 @endif
111 </div> 179 </div>
112 </div> 180 </div>
113 <div class="main__employer-page-two-item-text"> 181 <div class="main__employer-page-two-item-text">
114 <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> 182 <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div>
115 <div class="main__employer-page-two-item-text-body"> 183 <div class="main__employer-page-two-item-text-body">
116 {!! $Q->text !!} 184 {!! $Q->text !!}
117 </div> 185 </div>
118 </div> 186 </div>
119 <div class="main__employer-page-two-item-text"> 187 <div class="main__employer-page-two-item-text">
120 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> 188 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div>
121 <div class="main__employer-page-two-item-text-body"> 189 <div class="main__employer-page-two-item-text-body">
122 {!! $Q->description !!} 190 {!! $Q->description !!}
123 </div> 191 </div>
124 </div> 192 </div>
125 <div class="main__employer-page-two-item-text"> 193 <div class="main__employer-page-two-item-text">
126 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> 194 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div>
127 <div class="main__employer-page-two-item-text-body"> 195 <div class="main__employer-page-two-item-text-body">
128 {!! $Q->contacts_emails !!} 196 {!! $Q->contacts_emails !!}
129 </div> 197 </div>
130 </div> 198 </div>
131 <div class="main__employer-page-two-item-text"> 199 <div class="main__employer-page-two-item-text">
132 <div class="main__employer-page-two-item-text-name">Или звоните:</div> 200 <div class="main__employer-page-two-item-text-name">Или звоните:</div>
133 <div class="main__employer-page-two-item-text-body"> 201 <div class="main__employer-page-two-item-text-body">
134 {!! $Q->contacts_telephones !!} 202 {!! $Q->contacts_telephones !!}
135 </div> 203 </div>
136 </div> 204 </div>
137 <div class="main__employer-page-two-item-tags"> 205 <div class="main__employer-page-two-item-tags">
138 @if (isset($Q->jobs)) 206 @if (isset($Q->jobs))
139 @foreach ($Q->jobs as $key => $j) 207 @foreach ($Q->jobs as $key => $j)
140 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> 208 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
141 @endforeach 209 @endforeach
142 @endif 210 @endif
143 </div> 211 </div>
144 <div class="main__employer-page-two-item-buttons"> 212 <div class="main__employer-page-two-item-buttons">
145 <button type="button" 213 @guest
146 class="button main__employer-page-two-item-button">Откликнуться</button> 214 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
215 class="button main__employer-page-two-item-button">Откликнуться</button>
216 @else
217 @if (App\Classes\StatusUser::Status()==1)
218 <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}'
219 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button>
220 @else
221 <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}'
222 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button>
223 @endif
224 @endguest
147 <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> 225 <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a>
148 </div> 226 </div>
149 <div class="main__employer-page-two-item-bottom"> 227 <div class="main__employer-page-two-item-bottom">
150 <div class="main__employer-page-two-item-bottom-date">{{ $Q->created_at }}</div> 228 <div class="main__employer-page-two-item-bottom-date">{{ $Q->created_at }}</div>
151 <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vacancy_favorites <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> 229 <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vacancy_favorites <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>">
152 <svg> 230 <svg>
153 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 231 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
154 </svg> 232 </svg>
155 </button> 233 </button>
156 </div> 234 </div>
157 </div> 235 </div>
158 @endforeach 236 @endforeach
159 <div style="margin-top: 20px"> 237 <div style="margin-top: 20px">
160 {{ $Query->appends($_GET)->links('paginate') }} 238 {{ $Query->appends($_GET)->links('paginate') }}
161 </div> 239 </div>
162
163 </div><!-- конец --> 240 </div><!-- конец -->
164 </div> 241 </div>
165 </div> 242 </div>
166 </main> 243 </main>
167 @endsection 244 @endsection
resources/views/modals/delete_profile.blade.php
File was created 1 <div id="delete" class="modal modal_bg">
2 <div class="modal__body">
3 <div class="modal__title">Удалить профиль?</div>
4 <div class="modal__text">Вы действительно хотите удалить свой профиль?</div>
5 <div class="modal__buttons">
6 <button href="button" class="button">Да</button>
7 <button href="button" class="button button_light">Нет</button>
8 </div>
9 </div>
10 </div>
11
resources/views/modals/send_employer.blade.php
1 <div id="send" class="modal"> 1 <div id="send2" class="modal">
2 <div class="modal__body"> 2 <div class="modal__body">
3 <div class="modal__title">Отправить сообщение "Наяда"</div> 3 <div class="modal__title">Отправить сообщение соискателю</div>
4 <div class="modal__text">Если у вас возникли вопросы насчет вакансии, вы можете задать их работодателю</div> 4 <div class="modal__text">Если у вас есть предложение для соискателя, вы можете сделать предложение</div>
5 <form class="modal__form"> 5 <form class="modal__form">
6 <div class="modal__form-item error"> 6 <div class="modal__form-item error">
7 <input id="i1" type="text" class="input" placeholder="Тема" required> 7 <input id="i1" type="text" class="input" placeholder="Тема" required>
8 <label for="i1">Не заполнено поле</label> 8 <label for="i1">Не заполнено поле</label>
9 </div> 9 </div>
10 <div class="modal__form-item"> 10 <div class="modal__form-item">
11 <textarea id="i2" class="textarea" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации.&#10;&#10;ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea> 11 <textarea id="i2" class="textarea" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации.&#10;&#10;ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea>
12 <label for="i2">Не заполнено поле</label> 12 <label for="i2">Не заполнено поле</label>
13 </div> 13 </div>
14 <div class="modal__form-item"> 14 <div class="modal__form-item">
15 <div class="file"> 15 <div class="file">
16 <label class="file__input"> 16 <label class="file__input">
17 <input type="file"> 17 <input type="file">
18 <span class="button button_light"> 18 <span class="button button_light">
19 <svg> 19 <svg>
20 <use xlink:href="images/sprite.svg#share"></use> 20 <use xlink:href="images/sprite.svg#share"></use>
21 </svg> 21 </svg>
22 Прикрепить резюме 22 Прикрепить резюме
23 </span> 23 </span>
24 </label> 24 </label>
25 <div class="file__list"> 25 <div class="file__list">
26 <div class="file__list-item"> 26 <div class="file__list-item">
27 <div class="file__list-item-left"> 27 <div class="file__list-item-left">
28 <svg> 28 <svg>
29 <use xlink:href="images/sprite.svg#clip"></use> 29 <use xlink:href="images/sprite.svg#clip"></use>
30 </svg> 30 </svg>
31 <span>image1.png</span> 31 <span>image1.png</span>
32 </div> 32 </div>
33 <button type="button" class="file__list-item-right js-parent-remove"> 33 <button type="button" class="file__list-item-right js-parent-remove">
34 <svg> 34 <svg>
35 <use xlink:href="images/sprite.svg#cross-bold"></use> 35 <use xlink:href="images/sprite.svg#cross-bold"></use>
36 </svg> 36 </svg>
37 </button> 37 </button>
38 </div> 38 </div>
39 <div class="file__list-item"> 39 <div class="file__list-item">
40 <div class="file__list-item-left"> 40 <div class="file__list-item-left">
41 <svg> 41 <svg>
42 <use xlink:href="images/sprite.svg#clip"></use> 42 <use xlink:href="images/sprite.svg#clip"></use>
43 </svg> 43 </svg>
44 <span>Резюме капитана корабля</span> 44 <span>Резюме капитана корабля</span>
45 </div> 45 </div>
46 <button type="button" class="file__list-item-right js-parent-remove"> 46 <button type="button" class="file__list-item-right js-parent-remove">
47 <svg> 47 <svg>
48 <use xlink:href="images/sprite.svg#cross-bold"></use> 48 <use xlink:href="images/sprite.svg#cross-bold"></use>
49 </svg> 49 </svg>
50 </button> 50 </button>
51 </div> 51 </div>
52 </div> 52 </div>
53 </div> 53 </div>
54 </div> 54 </div>
55 <div class="modal__form-item"> 55 <div class="modal__form-item">
56 <button type="submit" class="button">Отправить</button> 56 <button type="submit" class="button">Отправить</button>
57 </div> 57 </div>
58 </form> 58 </form>
59 </div> 59 </div>
60 </div> 60 </div>
61 61
resources/views/modals/send_message_noaut.blade.php
1 <div id="question" class="modal modal_bg"> 1 <div id="question" class="modal modal_bg">
2 <div class="modal__body"> 2 <div class="modal__body">
3 <div class="modal__title">Отправить сообщение "Наяда"</div> 3 <div class="modal__title">Отправить сообщение "Наяда"</div>
4 <div class="modal__text">Вы должны быть авторизованы, чтобы отправить личное сообщение</div> 4 <div class="modal__text">Вы должны быть авторизованы, чтобы отправить личное сообщение</div>
5 <div class="modal__buttons"> 5 <div class="modal__buttons">
6 <a href="#" class="button">Войти</a> 6 <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}' class="button">Войти</a>
7 <a href="#" class="button button_light">Зарегистрироваться</a> 7 <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}' class="button button_light">Зарегистрироваться</a>
8 </div> 8 </div>
9 </div> 9 </div>
10 </div> 10 </div>
11 11
resources/views/modals/send_worker.blade.php
1 <script>
2 console.log('Сообщение работнику');
3 $("#form_worker" ).submit(function(event) {
4 var val = $(this).val();
5 var send_title = $('#send_title');
6 var send_title_val = send_title.val();
7
8 console.log('Click form.');
9 });
10
11 $(document).on('change', '#btn_send_file', function() {
12
13 var send_name = $('#send_name');
14 var send_name_val = send_name.val();
15 var send_name_file = $('#send_name_file');
16
17 console.log(send_name_val);
18 send_name_file.html(send_name_val);
19
20 });
21 </script>
1 <div id="send" class="modal"> 22 <div id="send" class="modal">
2 <div class="modal__body"> 23 <div class="modal__body">
3 <div class="modal__title">Отправить сообщение соискателю</div> 24 <div class="modal__title">Отправить сообщение работодателю</div>
4 <div class="modal__text">Если у вас есть предложение для данного работника, напишите ему письмо</div> 25 <div class="modal__text">Если вы готовы владеете компитентыми навыками, напишите данному работодателю письмо</div>
5 <form class="modal__form" id="form_worker" name="form_worker"> 26 <form class="modal__form" id="form_worker" name="form_worker" enctype="multipart/form-data" action="{{ route('worker.new_message') }}" method="POST">
6 <div class="modal__form-item error"> 27 @csrf
7 <input id="title" name="title" type="text" class="input" placeholder="Тема" required> 28 <div class="modal__form-item">
29 Отправитель сообщения:
30 <input type="text" id="send_user_id" name="send_user_id" class="input" placeholder="user_id" value="">
31 Получатель сообщения:
32 <input type="text" id="send_to_user_id" name="send_to_user_id" class="input" placeholder="to_user_id" value="">
33 Вакансия:
34 <input type="text" id="send_vacancy" name="send_vacancy" class="input" placeholder="vacancy" value="">
35 </div>
36 <div class="modal__form-item send_title_div error_">
37 <input id="send_title" name="send_title" type="text" class="input" placeholder="Тема" required>
8 <label for="title">Не заполнено поле</label> 38 <label for="title">Не заполнено поле</label>
9 </div> 39 </div>
10 <div class="modal__form-item"> 40 <div class="modal__form-item send_title_div error_">
11 <textarea id="i2" class="textarea" id="text" name="text" placeholder="Напишите текст с предложением о работе" required></textarea> 41 <select class="js-select2" name="send_job_title_id" id="send_job_title_id">
42 @if ($jobs->count())
43 @foreach($jobs as $j)
44 <option value="{{ $j->id }}">{{ $j->name }} ({{ $j->id }})</option>
45 @endforeach
46 @endif
47 </select>
48 <label for="title">Не заполнено поле</label>
49 </div>
50 <div class="modal__form-item send_text_div">
51 <textarea id="i2" class="textarea" id="send_text" name="send_text" placeholder="Напишите текст с предложением о работе" required></textarea>
12 <label for="i2">Не заполнено поле</label> 52 <label for="i2">Не заполнено поле</label>
13 </div> 53 </div>
14 <div class="modal__form-item"> 54 <div class="modal__form-item">
15 <div class="file"> 55 <div class="file">
16 <label class="file__input"> 56 <label class="file__input" id="btn_send_file" name="btn_send_file">
17 <input type="file" name="file" id="name"> 57 <input type="file" name="send_file" id="send_name">
18 <span class="button button_light"> 58 <span class="button button_light">
19 <svg> 59 <svg>
20 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 60 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
21 </svg> 61 </svg>
22 Прикрепить файл-документ 62 Прикрепить файл-документ
23 </span> 63 </span>
24 </label> 64 </label>
25 65
26 <div class="file__list"> 66 <div class="file__list" id="div_file" name="div_file">
27 <div class="file__list-item"> 67 <div class="file__list-item">
28 <div class="file__list-item-left"> 68 <div class="file__list-item-left">
29 <svg> 69 <svg>
30 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 70 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
31 </svg> 71 </svg>
32 <span id="name_file" name="name_file">123</span> 72 <span id="send_name_file" name="send_name_file"></span>
33 </div> 73 </div>
34 <button type="button" class="file__list-item-right js-parent-remove"> 74 <button type="button" class="file__list-item-right js-parent-remove">
35 <svg> 75 <svg>
36 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use> 76 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use>
37 </svg> 77 </svg>
38 </button> 78 </button>
39 </div> 79 </div>
40 </div> 80 </div>
41 </div> 81 </div>
42 </div> 82 </div>
43 <div class="modal__form-item"> 83 <div class="modal__form-item">
44 <button type="submit" class="button">Отправить</button> 84 <button type="submit" id="submit_form_worker" name="submit_form_worker" class="button">Отправить</button>
45 </div> 85 </div>
46 </form> 86 </form>
47 </div> 87 </div>
48 </div> 88 </div>
49 89
resources/views/modals/success_delete_profile.blade.php
File was created 1 <div id="is-deleted" class="modal modal_bg">
2 <div class="modal__body">
3 <div class="modal__title">Профиль удален</div>
4 <div class="modal__text">Вы успешно удалили свой профиль.</div>
5 <a href="#" class="button button_light modal__button">На главную</a>
6 </div>
7 </div>
8
resources/views/modals/thank_you_send_for_employer.blade.php
File was created 1 <div id="thanks-3" class="modal modal_bg">
2 <div class="modal__body">
3 <div class="modal__title">Спасибо!</div>
4 <div class="modal__text">Вы успешно зарегистрировались</div>
5 <div class="modal__text left"><span>Ваш аккаунт требует подтверждение администратора сайта. Администратор сайта должен изменить статус работодателя, чтобы вы смогли авторизоваться в системе.</span></div>
6 <div class="modal__text left"><span>После подтверждения администратором, вам прейдет сообщение на электронную почту, о подтверждении регистрации.</span></div>
7 <a href="#" class="button button_light modal__button">Войти</a>
8 </div>
9 </div>
10
resources/views/modals/thank_you_send_for_worker.blade.php
File was created 1 <div id="thanks-4" class="modal modal_bg">
2 <div class="modal__body">
3 <div class="modal__title">Спасибо!</div>
4 <div class="modal__text">Ваше сообщение успешно отправлено администратору сайта на подтверждение.</div>
5 <a href="#" class="button button_light modal__button">На главную</a>
6 </div>
7 </div>
8
resources/views/workers/cabinet.blade.php
1 @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('click', '#button_new_doc', function() { 6 $(document).on('click', '#button_new_doc', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.attr('data-val'); 8 var val_ = this_.attr('data-val');
9 var new_diplom = $('#new_diplom'); 9 var new_diplom = $('#new_diplom');
10 var new_diplom_val = new_diplom.val(); 10 var new_diplom_val = new_diplom.val();
11 var new_data_begin = $('#new_data_begin'); 11 var new_data_begin = $('#new_data_begin');
12 var new_data_begin_val = new_data_begin.val(); 12 var new_data_begin_val = new_data_begin.val();
13 var new_data_end = $('#new_data_end'); 13 var new_data_end = $('#new_data_end');
14 var new_data_end_val = new_data_end.val(); 14 var new_data_end_val = new_data_end.val();
15 var education = $('#education'); 15 var education = $('#education');
16 var education_val = education.val(); 16 var education_val = education.val();
17 var worker_id = $('#new_id'); 17 var worker_id = $('#new_id');
18 var worker_val = worker_id.val(); 18 var worker_val = worker_id.val();
19 19
20 console.log('sort items ' + val_); 20 console.log('sort items ' + val_);
21 21
22 if (new_diplom_val == '') { 22 if (new_diplom_val == '') {
23 new_diplom.addClass('err_red'); 23 new_diplom.addClass('err_red');
24 console.log('Border Up'); 24 console.log('Border Up');
25 } else { 25 } else {
26 $.ajax({ 26 $.ajax({
27 type: "GET", 27 type: "GET",
28 url: "{{ route('worker.add_serificate') }}", 28 url: "{{ route('worker.add_serificate') }}",
29 data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val, 29 data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val,
30 success: function (data) { 30 success: function (data) {
31 console.log('Блокировка...'); 31 console.log('Блокировка...');
32 console.log(data); 32 console.log(data);
33 $('#sertificate').html(data); 33 $('#sertificate').html(data);
34 if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); 34 if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red');
35 }, 35 },
36 headers: { 36 headers: {
37 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 37 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
38 }, 38 },
39 error: function (data) { 39 error: function (data) {
40 data = JSON.stringify(data); 40 data = JSON.stringify(data);
41 console.log('Error: ' + data); 41 console.log('Error: ' + data);
42 } 42 }
43 }); 43 });
44 } 44 }
45 }); 45 });
46 46
47 $(document).on('click', '#btn_new_diplom123', function() { 47 $(document).on('click', '#btn_new_diplom123', function() {
48 var this_ = $(this); 48 var this_ = $(this);
49 var val_ = this_.attr('data-val'); 49 var val_ = this_.attr('data-val');
50 var documents = $('#documents'); 50 var documents = $('#documents');
51 var doc_val = documents.val(); 51 var doc_val = documents.val();
52 var block = $('#ajax_dop_diplomi'); 52 var block = $('#ajax_dop_diplomi');
53 53
54 console.log('worker_id='+val_+'it_infoblock='+ doc_val); 54 console.log('worker_id='+val_+'it_infoblock='+ doc_val);
55 55
56 $.ajax({ 56 $.ajax({
57 type: "GET", 57 type: "GET",
58 url: "", 58 url: "",
59 data: "worker_id="+val_+"&infoblok_id="+doc_val, 59 data: "worker_id="+val_+"&infoblok_id="+doc_val,
60 success: function (data) { 60 success: function (data) {
61 location.url = data; 61 location.url = data;
62 console.log('Добавление документа-диплома'); 62 console.log('Добавление документа-диплома');
63 console.log(data); 63 console.log(data);
64 block.html(data); 64 block.html(data);
65 }, 65 },
66 headers: { 66 headers: {
67 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 67 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
68 }, 68 },
69 error: function (data) { 69 error: function (data) {
70 data = JSON.stringify(data); 70 data = JSON.stringify(data);
71 console.log('Error: ' + data); 71 console.log('Error: ' + data);
72 } 72 }
73 }); 73 });
74 }); 74 });
75 75
76 $(document).on('click', '#new_work', function() { 76 $(document).on('click', '#new_work', function() {
77 var this_ = $(this); 77 var this_ = $(this);
78 var val_ = this_.attr('data-val'); 78 var val_ = this_.attr('data-val');
79 var new_diplom = $('#new_diplom').val(); 79 var new_diplom = $('#new_diplom').val();
80 var new_data_begin = $('#new_data_begin').val(); 80 var new_data_begin = $('#new_data_begin').val();
81 var new_data_end = $('#new_data_end').val(); 81 var new_data_end = $('#new_data_end').val();
82 var new_job_title = $('#new_job_title').val(); 82 var new_job_title = $('#new_job_title').val();
83 var new_teplohod = $('#new_teplohod').val(); 83 var new_teplohod = $('#new_teplohod').val();
84 var new_GWT = $('#new_GWT').val(); 84 var new_GWT = $('#new_GWT').val();
85 var new_KBT = $('#new_KBT').val(); 85 var new_KBT = $('#new_KBT').val();
86 var new_Begin_work = $('#new_Begin_work').val(); 86 var new_Begin_work = $('#new_Begin_work').val();
87 var new_End_work = $('#new_End_work').val(); 87 var new_End_work = $('#new_End_work').val();
88 var new_name_company = $('#new_name_company').val(); 88 var new_name_company = $('#new_name_company').val();
89 89
90 console.log('worker_id='+val_+'it_infoblock='+ doc_val); 90 console.log('worker_id='+val_+'it_infoblock='+ doc_val);
91 91
92 $.ajax({ 92 $.ajax({
93 type: "GET", 93 type: "GET",
94 url: "", 94 url: "",
95 data: "worker_id="+val_+"&infoblok_id="+doc_val, 95 data: "worker_id="+val_+"&infoblok_id="+doc_val,
96 success: function (data) { 96 success: function (data) {
97 location.url = data; 97 location.url = data;
98 console.log('Добавление документа-диплома'); 98 console.log('Добавление документа-диплома');
99 console.log(data); 99 console.log(data);
100 block.html(data); 100 block.html(data);
101 }, 101 },
102 headers: { 102 headers: {
103 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 103 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
104 }, 104 },
105 error: function (data) { 105 error: function (data) {
106 data = JSON.stringify(data); 106 data = JSON.stringify(data);
107 console.log('Error: ' + data); 107 console.log('Error: ' + data);
108 } 108 }
109 }); 109 });
110 }); 110 });
111 </script> 111 </script>
112 @endsection 112 @endsection
113 113
114 @section('content') 114 @section('content')
115 <section class="cabinet"> 115 <section class="cabinet">
116 <div class="container"> 116 <div class="container">
117 <ul class="breadcrumbs cabinet__breadcrumbs"> 117 <ul class="breadcrumbs cabinet__breadcrumbs">
118 <li><a href="{{ route('index') }}">Главная</a></li> 118 <li><a href="{{ route('index') }}">Главная</a></li>
119 <li><b>Личный кабинет</b></li> 119 <li><b>Личный кабинет</b></li>
120 </ul> 120 </ul>
121 <div class="cabinet__wrapper"> 121 <div class="cabinet__wrapper">
122 <div class="cabinet__side"> 122 <div class="cabinet__side">
123 <div class="cabinet__side-toper"> 123 <div class="cabinet__side-toper">
124 @include('workers.emblema') 124 @include('workers.emblema')
125 125
126 </div> 126 </div>
127 127
128 @include('workers.menu', ['item' => 1]) 128 @include('workers.menu', ['item' => 1])
129 </div> 129 </div>
130 <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> 130 <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST">
131 @csrf 131 @csrf
132 @include('messages_error') 132 @include('messages_error')
133 <div class="cabinet__body-item"> 133 <div class="cabinet__body-item">
134 <div class="cabinet__anketa"> 134 <div class="cabinet__anketa">
135 <h2 class="title cabinet__title">Моя анкета</h2> 135 <h2 class="title cabinet__title">Моя анкета</h2>
136 <div class="cabinet__anketa-buttons"> 136 <div class="cabinet__anketa-buttons">
137 <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> 137 <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a>
138 <a href="{{ route('worker.download', ['worker' => $Worker[0]->id]) }}" class="button"> 138 <a href="{{ route('worker.download', ['worker' => $Worker[0]->id]) }}" class="button">
139 <svg> 139 <svg>
140 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 140 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
141 </svg> 141 </svg>
142 Скачать резюме 142 Скачать резюме
143 </a> 143 </a>
144 </div> 144 </div>
145 </div> 145 </div>
146 </div> 146 </div>
147 <div class="cabinet__body-item"> 147 <div class="cabinet__body-item">
148 <div class="cabinet__stats"> 148 <div class="cabinet__stats">
149 <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> 149 <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3>
150 <div class="cabinet__stats-body"> 150 <div class="cabinet__stats-body">
151 <div class="cabinet__stats-item"> 151 <div class="cabinet__stats-item">
152 <svg> 152 <svg>
153 <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> 153 <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use>
154 </svg> 154 </svg>
155 <span>Просмотров:</span> 155 <span>Просмотров:</span>
156 <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b> 156 <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b>
157 </div> 157 </div>
158 <div class="cabinet__stats-item"> 158 <div class="cabinet__stats-item">
159 <svg> 159 <svg>
160 <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> 160 <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use>
161 </svg> 161 </svg>
162 <span>Отзывов:</span> 162 <span>Отзывов:</span>
163 <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b> 163 <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b>
164 </div> 164 </div>
165 </div> 165 </div>
166 <div class="cabinet__stats-subtitle">Анкета заполнена на @if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif</div> 166 <div class="cabinet__stats-subtitle">Анкета заполнена на @if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif</div>
167 <div class="cabinet__stats-line"> 167 <div class="cabinet__stats-line">
168 <span style="width:@if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif"></span> 168 <span style="width:@if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif"></span>
169 </div> 169 </div>
170 <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> 170 <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div>
171 </div> 171 </div>
172 </div> 172 </div>
173 <div class="cabinet__body-item"> 173 <div class="cabinet__body-item">
174 <h3 class="cabinet__subtitle">Профиль</h3> 174 <h3 class="cabinet__subtitle">Профиль</h3>
175 <div class="cabinet__avatar"> 175 <div class="cabinet__avatar">
176 <div class="cabinet__avatar-pic"> 176 <div class="cabinet__avatar-pic">
177 177
178 @if (!empty($Worker[0]->photo)) 178 @if (!empty($Worker[0]->photo))
179 <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> 179 <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/>
180 @else 180 @else
181 <svg> 181 <svg>
182 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 182 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
183 </svg> 183 </svg>
184 @endif 184 @endif
185 </div> 185 </div>
186 <div class="cabinet__avatar-form"> 186 <div class="cabinet__avatar-form">
187 <label class="file"> 187 <label class="file">
188 <span class="file__input"> 188 <span class="file__input">
189 <input type="file" name="photo" id="photo"> 189 <input type="file" name="photo" id="photo">
190 190
191 <span class="button"> 191 <span class="button">
192 <svg> 192 <svg>
193 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 193 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
194 </svg> 194 </svg>
195 Загрузить 195 Загрузить
196 </span> 196 </span>
197 </span> 197 </span>
198 </label> 198 </label>
199 <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> 199 <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p>
200 </div> 200 </div>
201 </div> 201 </div>
202 </div> 202 </div>
203 <div class="cabinet__body-item"> 203 <div class="cabinet__body-item">
204 <div class="cabinet__inputs"> 204 <div class="cabinet__inputs">
205 <div class="cabinet__inputs-item form-group"> 205 <div class="cabinet__inputs-item form-group">
206 <label class="form-group__label">Электронная почта *</label> 206 <label class="form-group__label">Электронная почта *</label>
207 <div class="form-group__item"> 207 <div class="form-group__item">
208 <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required> 208 <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required>
209 </div> 209 </div>
210 </div> 210 </div>
211 <div class="cabinet__inputs-item form-group"> 211 <div class="cabinet__inputs-item form-group">
212 <label class="form-group__label">Статус</label> 212 <label class="form-group__label">Статус</label>
213 <div class="form-group__item"> 213 <div class="form-group__item">
214 <div class="select"> 214 <div class="select">
215 <select class="js-select2" name="status_work" id="status_work"> 215 <select class="js-select2" name="status_work" id="status_work">
216 <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option> 216 <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option>
217 <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option> 217 <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option>
218 <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option> 218 <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option>
219 </select> 219 </select>
220 </div> 220 </div>
221 </div> 221 </div>
222 </div> 222 </div>
223 <!--<div class="cabinet__inputs-item form-group"> 223 <!--<div class="cabinet__inputs-item form-group">
224 <label class="form-group__label">Статус *</label> 224 <label class="form-group__label">Статус *</label>
225 <div class="form-group__item"> 225 <div class="form-group__item">
226 <input type="text" class="input" required> 226 <input type="text" class="input" required>
227 </div> 227 </div>
228 </div>--> 228 </div>-->
229 @if (isset($Worker[0]->users)) 229 @if (isset($Worker[0]->users))
230 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 230 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
231 <label class="form-group__label">Фамилия *</label> 231 <label class="form-group__label">Фамилия *</label>
232 <div class="form-group__item"> 232 <div class="form-group__item">
233 <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> 233 <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required>
234 </div> 234 </div>
235 </div> 235 </div>
236 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 236 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
237 <label class="form-group__label">Имя *</label> 237 <label class="form-group__label">Имя *</label>
238 <div class="form-group__item"> 238 <div class="form-group__item">
239 <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> 239 <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required>
240 </div> 240 </div>
241 </div> 241 </div>
242 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 242 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
243 <label class="form-group__label">Отчество *</label> 243 <label class="form-group__label">Отчество *</label>
244 <div class="form-group__item"> 244 <div class="form-group__item">
245 <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> 245 <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич">
246 </div> 246 </div>
247 </div> 247 </div>
248 @endif 248 @endif
249 </div> 249 </div>
250 </div> 250 </div>
251 <div class="cabinet__body-item"> 251 <div class="cabinet__body-item">
252 <h3 class="cabinet__subtitle">Основная информация</h3> 252 <h3 class="cabinet__subtitle">Основная информация</h3>
253 <div class="cabinet__inputs"> 253 <div class="cabinet__inputs">
254 <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> 254 <div class="cabinet__inputs-item cabinet__inputs-item_min form-group">
255 <label class="form-group__label">Возраст</label> 255 <label class="form-group__label">Возраст</label>
256 <div class="form-group__item"> 256 <div class="form-group__item">
257 <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required> 257 <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required>
258 </div> 258 </div>
259 </div> 259 </div>
260 <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> 260 <div class="cabinet__inputs-item cabinet__inputs-item_max form-group">
261 <label class="form-group__label">Желаемые вакансии</label> 261 <label class="form-group__label">Желаемые вакансии</label>
262 <div class="form-group__item"> 262 <div class="form-group__item">
263 <div class="select"> 263 <div class="select">
264 <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> 264 <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple">
265 @if ($Job_titles->count()) 265 @if ($Job_titles->count())
266 @foreach($Job_titles as $it) 266 @foreach($Job_titles as $it)
267 @if (isset($Worker[0]->job_titles)) 267 @if (isset($Worker[0]->job_titles))
268 @if ($Worker[0]->job_titles->count()) 268 @if ($Worker[0]->job_titles->count())
269 @foreach($Worker[0]->job_titles as $select) 269 @foreach($Worker[0]->job_titles as $select)
270 <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option> 270 <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option>
271 @endforeach 271 @endforeach
272 @else 272 @else
273 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> 273 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option>
274 @endif 274 @endif
275 @else 275 @else
276 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> 276 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option>
277 @endif 277 @endif
278 @endforeach 278 @endforeach
279 @endif 279 @endif
280 </select> 280 </select>
281 </div> 281 </div>
282 </div> 282 </div>
283 </div> 283 </div>
284 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 284 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
285 <label class="form-group__label">Город</label> 285 <label class="form-group__label">Город</label>
286 <div class="form-group__item"> 286 <div class="form-group__item">
287 <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> 287 <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required>
288 </div> 288 </div>
289 </div> 289 </div>
290 <div class="cabinet__inputs-item form-group"> 290 <div class="cabinet__inputs-item form-group">
291 <label class="form-group__label">Опыт работы</label> 291 <label class="form-group__label">Опыт работы</label>
292 <div class="form-group__item"> 292 <div class="form-group__item">
293 <div class="select"> 293 <div class="select">
294 <select class="js-select2" id="experience" name="experience"> 294 <select class="js-select2" id="experience" name="experience">
295 <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> 295 <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option>
296 <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> 296 <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option>
297 <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> 297 <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option>
298 <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> 298 <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option>
299 <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> 299 <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option>
300 <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> 300 <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option>
301 </select> 301 </select>
302 </div> 302 </div>
303 </div> 303 </div>
304 </div> 304 </div>
305 305
306 <div class="cabinet__inputs-item form-group"> 306 <div class="cabinet__inputs-item form-group">
307 <label class="form-group__label">Номер телефона 1</label> 307 <label class="form-group__label">Номер телефона 1</label>
308 <div class="form-group__item"> 308 <div class="form-group__item">
309 <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> 309 <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required>
310 </div> 310 </div>
311 </div> 311 </div>
312 <div class="cabinet__inputs-item form-group"> 312 <div class="cabinet__inputs-item form-group">
313 <label class="form-group__label">Номер телефона 2</label> 313 <label class="form-group__label">Номер телефона 2</label>
314 <div class="form-group__item"> 314 <div class="form-group__item">
315 <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> 315 <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__">
316 </div> 316 </div>
317 </div> 317 </div>
318 </div> 318 </div>
319 </div> 319 </div>
320 320
321 <div id="sertificate" name="sertificate"> 321 <div id="sertificate" name="sertificate">
322 @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) 322 @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0))
323 @php $i = 0; @endphp 323 @php $i = 0; @endphp
324 @foreach($Worker[0]->sertificate as $it) 324 @foreach($Worker[0]->sertificate as $it)
325 <div style="margin-bottom: 20px" class="cabinet__body-item"> 325 <div style="margin-bottom: 20px" class="cabinet__body-item">
326 @if ($i == 0) 326 @if ($i == 0)
327 <h3 class="cabinet__subtitle">Сертификаты / документы</h3> 327 <h3 class="cabinet__subtitle">Сертификаты / документы</h3>
328 @endif 328 @endif
329 <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> 329 <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4>
330 <div class="cabinet__inputs"> 330 <div class="cabinet__inputs">
331 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 331 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
332 <label class="form-group__label">Название сертификата</label> 332 <label class="form-group__label">Название сертификата</label>
333 <div class="form-group__item"> 333 <div class="form-group__item">
334 <input type="text" class="input" value="{{ $it->name }}" disabled> 334 <input type="text" class="input" value="{{ $it->name }}" disabled>
335 </div> 335 </div>
336 </div> 336 </div>
337 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 337 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
338 <label class="form-group__label">Название сертификата</label> 338 <label class="form-group__label">Название сертификата</label>
339 <div class="form-group__item"> 339 <div class="form-group__item">
340 <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> 340 <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled>
341 </div> 341 </div>
342 </div> 342 </div>
343 <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> 343 <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light">
344 <svg> 344 <svg>
345 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> 345 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
346 </svg> 346 </svg>
347 Удалить 347 Удалить
348 </a> 348 </a>
349 </div> 349 </div>
350 </div> 350 </div>
351 @php $i++ @endphp 351 @php $i++ @endphp
352 @endforeach 352 @endforeach
353 @else 353 @else
354 <div style="margin-bottom: 20px" class="cabinet__body-item"> 354 <div style="margin-bottom: 20px" class="cabinet__body-item">
355 <h3 class="cabinet__subtitle">Сертификаты / документы</h3> 355 <h3 class="cabinet__subtitle">Сертификаты / документы</h3>
356 Нет сертификатов 356 Нет сертификатов
357 </div> 357 </div>
358 @endif 358 @endif
359 </div> 359 </div>
360 360
361 <div class="cabinet__body-item"> 361 <div class="cabinet__body-item">
362 <h4 class="cabinet__h4">Добавить сертификат</h4> 362 <h4 class="cabinet__h4">Добавить сертификат</h4>
363 <div class="cabinet__inputs"> 363 <div class="cabinet__inputs">
364 <input type="hidden" name="new_id" id="new_id" class="input" value="{{ $Worker[0]->id }}"> 364 <input type="hidden" name="new_id" id="new_id" class="input" value="{{ $Worker[0]->id }}">
365 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 365 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
366 <label class="form-group__label">Название сертификата</label> 366 <label class="form-group__label">Название сертификата</label>
367 <div class="form-group__item"> 367 <div class="form-group__item">
368 <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании"> 368 <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании">
369 </div> 369 </div>
370 </div> 370 </div>
371 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 371 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
372 <label class="form-group__label">Дата поступления</label> 372 <label class="form-group__label">Дата поступления</label>
373 <div class="form-group__item"> 373 <div class="form-group__item">
374 <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23"> 374 <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23">
375 </div> 375 </div>
376 </div> 376 </div>
377 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 377 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
378 <label class="form-group__label">Дата окончания</label> 378 <label class="form-group__label">Дата окончания</label>
379 <div class="form-group__item"> 379 <div class="form-group__item">
380 <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26"> 380 <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26">
381 </div> 381 </div>
382 </div> 382 </div>
383 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 383 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
384 <label class="form-group__label">Дата окончания</label> 384 <label class="form-group__label">Дата окончания</label>
385 <div class="form-group__item"> 385 <div class="form-group__item">
386 <input type="text" name="education" id="education" class="input" value="Учебное заведение"> 386 <input type="text" name="education" id="education" class="input" value="Учебное заведение">
387 </div> 387 </div>
388 </div> 388 </div>
389 <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc"> 389 <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc">
390 Добавить сертификат 390 Добавить сертификат
391 </div> 391 </div>
392 </div> 392 </div>
393 </div> 393 </div>
394 394
395 <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> 395 <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi">
396 <h4 class="cabinet__h4">Дополнительная информация</h4> 396 <h4 class="cabinet__h4">Дополнительная информация</h4>
397 <div class="cabinet__inputs" > 397 <div class="cabinet__inputs" >
398 @if (isset($Worker[0]->infobloks)) 398 @if (isset($Worker[0]->infobloks))
399 @if ($Worker[0]->infobloks->count()) 399 @if ($Worker[0]->infobloks->count())
400 @php $i = 1; @endphp 400 @php $i = 1; @endphp
401 @foreach ($Worker[0]->infobloks as $info) 401 @foreach ($Worker[0]->infobloks as $info)
402 <div class="cabinet__inputs-item form-group"> 402 <div class="cabinet__inputs-item form-group">
403 <label class="form-group__label">{{ $info->name }}</label> 403 <label class="form-group__label">{{ $info->name }}</label>
404 <div class="form-group__item"> 404 <div class="form-group__item">
405 <div class="select"> 405 <div class="select">
406 <select class="js-select2 sertificates_js"> 406 <select class="js-select2 sertificates_js">
407 <option value="0">Нет</option> 407 <option value="0">Нет</option>
408 <option value="1" selected>Да</option> 408 <option value="1" selected>Да</option>
409 </select> 409 </select>
410 </div> 410 </div>
411 </div> 411 </div>
412 </div> 412 </div>
413 @php $i++; @endphp 413 @php $i++; @endphp
414 @endforeach 414 @endforeach
415 @endif 415 @endif
416 @endif 416 @endif
417 417
418 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 418 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
419 <label class="form-group__label">Образцы дипломов и документов</label> 419 <label class="form-group__label">Образцы дипломов и документов</label>
420 <div class="form-group__item"> 420 <div class="form-group__item">
421 <div class="select"> 421 <div class="select">
422 <select class="js-select2" id="documents" name="documents"> 422 <select class="js-select2" id="documents" name="documents">
423 @if ($Infoblocks->count()) 423 @if ($Infoblocks->count())
424 @foreach ($Infoblocks as $it) 424 @foreach ($Infoblocks as $it)
425 <option value="{{ $it->id }}">{{ $it->name }}</option> 425 <option value="{{ $it->id }}">{{ $it->name }}</option>
426 @endforeach 426 @endforeach
427 @endif 427 @endif
428 </select> 428 </select>
429 </div> 429 </div>
430 </div> 430 </div>
431 </div> 431 </div>
432 <a href="{{ route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light"> 432 <a href="{{ route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light">
433 Добавить документ 433 Добавить документ
434 </a> 434 </a>
435 </div> 435 </div>
436 </div> 436 </div>
437 <div class="cabinet__body-item"> 437 <div class="cabinet__body-item">
438 <div class="cabinet__works"> 438 <div class="cabinet__works">
439 @if (isset($Worker[0]->place_worker)) 439 @if (isset($Worker[0]->place_worker))
440 @php $i = 1; @endphp 440 @php $i = 1; @endphp
441 @foreach($Worker[0]->place_worker as $company) 441 @foreach($Worker[0]->place_worker as $company)
442 <div class="cabinet__works-item"> 442 <div class="cabinet__works-item">
443 <div class="cabinet__works-spoiler active"> 443 <div class="cabinet__works-spoiler active">
444 <div class="cabinet__works-spoiler-left"> 444 <div class="cabinet__works-spoiler-left">
445 <div class="cabinet__works-spoiler-buttons"> 445 <div class="cabinet__works-spoiler-buttons">
446 <button type="button" class="button button_light js-works-remove"> 446 <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove">
447 <svg> 447 <svg>
448 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> 448 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
449 </svg> 449 </svg>
450 </button> 450 </a>
451 <button type="button" class="button button_light js-works-edit"> 451 <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit">
452 <svg> 452 <svg>
453 <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> 453 <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use>
454 </svg> 454 </svg>
455 </button> 455 </a>
456 </div> 456 </div>
457 <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> 457 <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div>
458 </div> 458 </div>
459 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> 459 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
460 <svg> 460 <svg>
461 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> 461 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
462 </svg> 462 </svg>
463 </button> 463 </button>
464 </div> 464 </div>
465 <div class="cabinet__works-body"> 465 <div class="cabinet__works-body">
466 <div class="cabinet__inputs"> 466 <div class="cabinet__inputs">
467 <div class="cabinet__inputs-item form-group"> 467 <div class="cabinet__inputs-item form-group">
468 <label class="form-group__label">Должность</label> 468 <label class="form-group__label">Должность</label>
469 <div class="form-group__item"> 469 <div class="form-group__item">
470 <input type="text" class="input" value="{{ $company->job_title }}"> 470 <input type="text" class="input" value="{{ $company->job_title }}">
471 </div> 471 </div>
472 </div> 472 </div>
473 <div class="cabinet__inputs-item form-group"> 473 <div class="cabinet__inputs-item form-group">
474 <label class="form-group__label">Опыт работы в танкерном флоте</label> 474 <label class="form-group__label">Опыт работы в танкерном флоте</label>
475 <div class="form-group__item"> 475 <div class="form-group__item">
476 <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif"> 476 <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif">
477 </div> 477 </div>
478 </div> 478 </div>
479 <div class="cabinet__inputs-item form-group"> 479 <div class="cabinet__inputs-item form-group">
480 <label class="form-group__label">Название теплохода</label> 480 <label class="form-group__label">Название теплохода</label>
481 <div class="form-group__item"> 481 <div class="form-group__item">
482 <input type="text" class="input" value="{{ $company->teplohod }}"> 482 <input type="text" class="input" value="{{ $company->teplohod }}">
483 </div> 483 </div>
484 </div> 484 </div>
485 <div class="cabinet__inputs-item form-group"> 485 <div class="cabinet__inputs-item form-group">
486 <label class="form-group__label">Тип (GWT)</label> 486 <label class="form-group__label">Тип (GWT)</label>
487 <div class="form-group__item"> 487 <div class="form-group__item">
488 <input type="text" class="input" value="{{ $company->GWT }}"> 488 <input type="text" class="input" value="{{ $company->GWT }}">
489 </div> 489 </div>
490 </div> 490 </div>
491 <div class="cabinet__inputs-item form-group"> 491 <div class="cabinet__inputs-item form-group">
492 <label class="form-group__label">ГД (кВТ)</label> 492 <label class="form-group__label">ГД (кВТ)</label>
493 <div class="form-group__item"> 493 <div class="form-group__item">
494 <input type="text" class="input" value="{{ $company->KBT }}"> 494 <input type="text" class="input" value="{{ $company->KBT }}">
495 </div> 495 </div>
496 </div> 496 </div>
497 <div class="cabinet__inputs-item form-group"> 497 <div class="cabinet__inputs-item form-group">
498 <label class="form-group__label">Начало контракта</label> 498 <label class="form-group__label">Начало контракта</label>
499 <div class="form-group__item"> 499 <div class="form-group__item">
500 <input type="text" class="input" value="{{ $company->begin_work }}"> 500 <input type="text" class="input" value="{{ $company->begin_work }}">
501 </div> 501 </div>
502 </div> 502 </div>
503 <div class="cabinet__inputs-item form-group"> 503 <div class="cabinet__inputs-item form-group">
504 <label class="form-group__label">Окончание контракта</label> 504 <label class="form-group__label">Окончание контракта</label>
505 <div class="form-group__item"> 505 <div class="form-group__item">
506 <input type="text" class="input" value="{{ $company->end_work }}"> 506 <input type="text" class="input" value="{{ $company->end_work }}">
507 </div> 507 </div>
508 </div> 508 </div>
509 <div class="cabinet__inputs-item form-group"> 509 <div class="cabinet__inputs-item form-group">
510 <label class="form-group__label">Название компании</label> 510 <label class="form-group__label">Название компании</label>
511 <div class="form-group__item"> 511 <div class="form-group__item">
512 <input type="text" class="input" value="{{ $company->name_company }}"> 512 <input type="text" class="input" value="{{ $company->name_company }}">
513 </div> 513 </div>
514 </div> 514 </div>
515 </div> 515 </div>
516 </div> 516 </div>
517 </div> 517 </div>
518 @php $i++ @endphp 518 @php $i++ @endphp
519 @endforeach 519 @endforeach
520 @endif 520 @endif
521 521
522 <div class="cabinet__works-item"> 522 <!--<div class="cabinet__works-item">
523 <div class="cabinet__works-spoiler"> 523 <div class="cabinet__works-spoiler">
524 <div class="cabinet__works-spoiler-left"> 524 <div class="cabinet__works-spoiler-left">
525 <div class="cabinet__works-spoiler-text">Новая работа</div> 525 <div class="cabinet__works-spoiler-text">Новая работа</div>
526 </div> 526 </div>
527 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> 527 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
528 <svg> 528 <svg>
529 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> 529 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
530 </svg> 530 </svg>
531 </button> 531 </button>
532 </div> 532 </div>
533 <div class="cabinet__works-body"> 533 <div class="cabinet__works-body">
534 <div class="cabinet__inputs"> 534 <div class="cabinet__inputs">
535 <div class="cabinet__inputs-item form-group"> 535 <div class="cabinet__inputs-item form-group">
536 <label class="form-group__label">Должность</label> 536 <label class="form-group__label">Должность</label>
537 <div class="form-group__item"> 537 <div class="form-group__item">
538 <input type="text" name="new_job_title" id="new_job_title" class="input" value="Не указано"> 538 <input type="text" name="new_job_title" id="new_job_title" class="input" value="Не указано">
539 </div> 539 </div>
540 </div> 540 </div>
541 <div class="cabinet__inputs-item form-group"> 541 <div class="cabinet__inputs-item form-group">
542 <label class="form-group__label">Опыт работы в танкерном флоте</label> 542 <label class="form-group__label">Опыт работы в танкерном флоте</label>
543 <div class="form-group__item"> 543 <div class="form-group__item">
544 <select class="js-select2" name="new_job_title" id="new_job_title"> 544 <select class="js-select2" name="new_job_title" id="new_job_title">
545 <option value="0">Нет</option> 545 <option value="0">Нет</option>
546 <option value="1">Да</option> 546 <option value="1">Да</option>
547 </select> 547 </select>
548 </div> 548 </div>
549 </div> 549 </div>
550 <div class="cabinet__inputs-item form-group"> 550 <div class="cabinet__inputs-item form-group">
551 <label class="form-group__label">Название теплохода</label> 551 <label class="form-group__label">Название теплохода</label>
552 <div class="form-group__item"> 552 <div class="form-group__item">
553 <input type="text" name="new_teplohod" id="new_teplohod" class="input" value="Не указано"> 553 <input type="text" name="new_teplohod" id="new_teplohod" class="input" value="Не указано">
554 </div> 554 </div>
555 </div> 555 </div>
556 <div class="cabinet__inputs-item form-group"> 556 <div class="cabinet__inputs-item form-group">
557 <label class="form-group__label">Тип (GWT)</label> 557 <label class="form-group__label">Тип (GWT)</label>
558 <div class="form-group__item"> 558 <div class="form-group__item">
559 <input type="text" name="new_GWT" id="new_GWT" class="input" value="Не указано"> 559 <input type="text" name="new_GWT" id="new_GWT" class="input" value="Не указано">
560 </div> 560 </div>
561 </div> 561 </div>
562 <div class="cabinet__inputs-item form-group"> 562 <div class="cabinet__inputs-item form-group">
563 <label class="form-group__label">ГД (кВТ)</label> 563 <label class="form-group__label">ГД (кВТ)</label>
564 <div class="form-group__item"> 564 <div class="form-group__item">
565 <input type="text" name="new_KBT" id="new_KBT" class="input" value="Не указано"> 565 <input type="text" name="new_KBT" id="new_KBT" class="input" value="Не указано">
566 </div> 566 </div>
567 </div> 567 </div>
568 <div class="cabinet__inputs-item form-group"> 568 <div class="cabinet__inputs-item form-group">
569 <label class="form-group__label">Начало контракта</label> 569 <label class="form-group__label">Начало контракта</label>
570 <div class="form-group__item"> 570 <div class="form-group__item">
571 <input type="text" name="new_Begin_work" id="new_Begin_work" class="input" value="Не указано"> 571 <input type="text" name="new_Begin_work" id="new_Begin_work" class="input" value="Не указано">
572 </div> 572 </div>
573 </div> 573 </div>
574 <div class="cabinet__inputs-item form-group"> 574 <div class="cabinet__inputs-item form-group">
575 <label class="form-group__label">Окончание контракта</label> 575 <label class="form-group__label">Окончание контракта</label>
576 <div class="form-group__item"> 576 <div class="form-group__item">
577 <input type="text" name="new_End_work" id="new_End_work" class="input" value="Не указано"> 577 <input type="text" name="new_End_work" id="new_End_work" class="input" value="Не указано">
578 </div> 578 </div>
579 </div> 579 </div>
580 <div class="cabinet__inputs-item form-group"> 580 <div class="cabinet__inputs-item form-group">
581 <label class="form-group__label">Название компании</label> 581 <label class="form-group__label">Название компании</label>
582 <div class="form-group__item"> 582 <div class="form-group__item">
583 <input type="text" name="new_name_company" id="new_name_company" class="input" value="Не указано"> 583 <input type="text" name="new_name_company" id="new_name_company" class="input" value="Не указано">
584 </div> 584 </div>
585 </div> 585 </div>
586 </div> 586 </div>
587 </div> 587 </div>
588 </div> 588 </div>-->
589 <button type="button" id="new_work" name="new_work" class="button button_light cabinet__works-add">Новое место работы</button> 589 <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add">Новое место работы</a>
590 </div> 590 </div>
591 </div> 591 </div>
592 592
593 <div class="cabinet__body-item"> 593 <div class="cabinet__body-item">
594 <h4 class="cabinet__h4">О себе</h4> 594 <h4 class="cabinet__h4">О себе</h4>
595 <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> 595 <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea>
596 <div class="cabinet__buttons"> 596 <div class="cabinet__buttons">
597 <button type="submit" class="button">Сохранить</button> 597 <button type="submit" class="button">Сохранить</button>
598 <label class="file"> 598 <label class="file">
599 <span class="file__input"> 599 <span class="file__input">
600 <input type="file" name="file" id="file"> 600 <input type="file" name="file" id="file">
601 <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else {{ $Worker[0]->file }}@endif</span> 601 <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else {{ $Worker[0]->file }}@endif</span>
602 </span> 602 </span>
603 </label> 603 </label>
604 </div> 604 </div>
605 </div> 605 </div>
606 </form> 606 </form>
607 </div> 607 </div>
608 </div> 608 </div>
609 </section> 609 </section>
610 </div> 610 </div>
611 <div> 611 <div>
612 @endsection 612 @endsection
613 613
resources/views/workers/docs-edit.blade.php
File was created 1 @extends('layout.frontend', ['title' => 'Редактирование стандартного документа - РекаМоре'])
2
3 @section('scripts')
4
5 @endsection
6
7 @section('content')
8 <section class="cabinet">
9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li>
13 </ul>
14 <div class="cabinet__wrapper">
15 <div class="cabinet__side">
16 <div class="cabinet__side-toper">
17 @include('workers.emblema')
18
19 </div>
20
21 @include('workers.menu', ['item' => 1])
22 </div>
23
24 <form class="cabinet__body" action="{{ route('worker.edit_document_save', ['doc' => $doc->id]) }}" method="POST">
25 @csrf
26 <div class="cabinet__works-item">
27 @include('messages_error')
28 <div class="cabinet__works-spoiler active">
29 <div class="cabinet__works-spoiler-left">
30 <div class="cabinet__works-spoiler-text">Редактирование работы</div>
31 </div>
32 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
33 <svg>
34 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
35 </svg>
36 </button>
37 </div>
38 <div class="cabinet__works-body">
39 <div class="cabinet__inputs">
40 <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/>
41 <div class="cabinet__inputs-item form-group">
42 <label class="form-group__label">Должность</label>
43 <div class="form-group__item">
44 <input type="text" name="job_title" id="job_title" class="input" value="{{ old('job_title') ?? $doc->job_title ?? '' }}">
45 </div>
46 </div>
47 <div class="cabinet__inputs-item form-group">
48 <label class="form-group__label">Опыт работы в танкерном флоте</label>
49 <div class="form-group__item">
50 <select class="js-select2" name="tanker" id="tanker">
51 <option value="0" @if ($doc->tanker == 0) seleted @endif>Нет</option>
52 <option value="1" @if ($doc->tanker == 1) seleted @endif>Да</option>
53 </select>
54 </div>
55 </div>
56 <div class="cabinet__inputs-item form-group">
57 <label class="form-group__label">Название теплохода</label>
58 <div class="form-group__item">
59 <input type="text" name="teplohod" id="teplohod" class="input" value="{{ old('teplohod') ?? $doc->teplohod ?? '' }}">
60 </div>
61 </div>
62 <div class="cabinet__inputs-item form-group">
63 <label class="form-group__label">Тип (GWT)</label>
64 <div class="form-group__item">
65 <input type="text" name="GWT" id="GWT" class="input" value="{{ old('GWT') ?? $doc->GWT ?? '' }}">
66 </div>
67 </div>
68 <div class="cabinet__inputs-item form-group">
69 <label class="form-group__label">ГД (кВТ)</label>
70 <div class="form-group__item">
71 <input type="text" name="KBT" id="KBT" class="input" value="{{ old('KBT') ?? $doc->KBT ?? '' }}">
72 </div>
73 </div>
74 <div class="cabinet__inputs-item form-group">
75 <label class="form-group__label">Начало контракта</label>
76 <div class="form-group__item">
77 <input type="text" name="Begin_work" id="Begin_work" class="input" value="{{ old('begin_work') ?? $doc->begin_work ?? '' }}">
78 </div>
79 </div>
80 <div class="cabinet__inputs-item form-group">
81 <label class="form-group__label">Окончание контракта</label>
82 <div class="form-group__item">
83 <input type="text" name="End_work" id="End_work" class="input" value="{{ old('end_work') ?? $doc->end_work ?? '' }}">
84 </div>
85 </div>
86 <div class="cabinet__inputs-item form-group">
87 <label class="form-group__label">Название компании</label>
88 <div class="form-group__item">
89 <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}">
90 </div>
91 </div>
92 <button type="submit" class="button">Сохранить</button>
93 </div>
94 </div>
95 </div>
96 </form>
97 </div>
98 </div>
99 </section>
100 </div>
101 @endsection
102
resources/views/workers/docs.blade.php
File was created 1 @extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре'])
2
3 @section('scripts')
4
5 @endsection
6
7 @section('content')
8 <section class="cabinet">
9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li>
13 </ul>
14 <div class="cabinet__wrapper">
15 <div class="cabinet__side">
16 <div class="cabinet__side-toper">
17 @include('workers.emblema')
18
19 </div>
20
21 @include('workers.menu', ['item' => 1])
22 </div>
23
24 <form class="cabinet__body" action="{{ route('worker.add_document_save') }}" method="POST">
25 @csrf
26 <div class="cabinet__works-item">
27 @include('messages_error')
28 <div class="cabinet__works-spoiler active">
29 <div class="cabinet__works-spoiler-left">
30 <div class="cabinet__works-spoiler-text">Новая работа</div>
31 </div>
32 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
33 <svg>
34 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
35 </svg>
36 </button>
37 </div>
38 <div class="cabinet__works-body">
39 <div class="cabinet__inputs">
40 <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/>
41 <div class="cabinet__inputs-item form-group">
42 <label class="form-group__label">Должность</label>
43 <div class="form-group__item">
44 <input type="text" name="job_title" id="job_title" class="input" value="Не указано">
45 </div>
46 </div>
47 <div class="cabinet__inputs-item form-group">
48 <label class="form-group__label">Опыт работы в танкерном флоте</label>
49 <div class="form-group__item">
50 <select class="js-select2" name="tanker" id="tanker">
51 <option value="0">Нет</option>
52 <option value="1">Да</option>
53 </select>
54 </div>
55 </div>
56 <div class="cabinet__inputs-item form-group">
57 <label class="form-group__label">Название теплохода</label>
58 <div class="form-group__item">
59 <input type="text" name="teplohod" id="teplohod" class="input" value="Не указано">
60 </div>
61 </div>
62 <div class="cabinet__inputs-item form-group">
63 <label class="form-group__label">Тип (GWT)</label>
64 <div class="form-group__item">
65 <input type="text" name="GWT" id="GWT" class="input" value="Не указано">
66 </div>
67 </div>
68 <div class="cabinet__inputs-item form-group">
69 <label class="form-group__label">ГД (кВТ)</label>
70 <div class="form-group__item">
71 <input type="text" name="KBT" id="KBT" class="input" value="Не указано">
72 </div>
73 </div>
74 <div class="cabinet__inputs-item form-group">
75 <label class="form-group__label">Начало контракта</label>
76 <div class="form-group__item">
77 <input type="text" name="Begin_work" id="Begin_work" class="input" value="Не указано">
78 </div>
79 </div>
80 <div class="cabinet__inputs-item form-group">
81 <label class="form-group__label">Окончание контракта</label>
82 <div class="form-group__item">
83 <input type="text" name="End_work" id="End_work" class="input" value="Не указано">
84 </div>
85 </div>
86 <div class="cabinet__inputs-item form-group">
87 <label class="form-group__label">Название компании</label>
88 <div class="form-group__item">
89 <input type="text" name="name_company" id="name_company" class="input" value="Не указано">
90 </div>
91 </div>
92 <button type="submit" class="button">Сохранить</button>
93 <a href="{{ route('worker.cabinet') }}" class="button">Назад</a>
94 </div>
95 </div>
96 </div>
97 </form>
98 </div>
99 </div>
100 </section>
101 </div>
102 @endsection
103
resources/views/workers/dop_info.blade.php
1 @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('workers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 1]) 21 @include('workers.menu', ['item' => 1])
22 </div> 22 </div>
23 <form class="cabinet__body" action="{{ route('worker.dop_info_save') }}" method="POST"> 23 <form class="cabinet__body" action="{{ route('worker.dop_info_save') }}" method="POST">
24 @csrf 24 @csrf
25 @include('messages_error') 25 @include('messages_error')
26 <input type="hidden" id="worker_id" name="worker_id" value="{{ $worker_id }}"/> 26 <input type="hidden" id="worker_id" name="worker_id" value="{{ $worker_id }}"/>
27 <div class="cabinet__body-item"> 27 <div class="cabinet__body-item">
28 <div class="cabinet__anketa"> 28 <div class="cabinet__anketa">
29 <h2 class="title cabinet__title">Добавление диплома</h2> 29 <h2 class="title cabinet__title">Добавление диплома</h2>
30 </div> 30 </div>
31 </div> 31 </div>
32 <div class="form-group__item"> 32 <div class="form-group__item">
33 <div class="select"> 33 <div class="select">
34 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 34 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
35 <label class="form-group__label">Образцы дипломов и документов</label> 35 <label class="form-group__label">Образцы дипломов и документов</label>
36 </div> 36 </div>
37 <select class="js-select2" id="infoblok_id" name="infoblok_id"> 37 <select class="js-select2" id="infoblok_id" name="infoblok_id">
38 @if ($Infoblocks->count()) 38 @if ($Infoblocks->count())
39 @foreach ($Infoblocks as $it) 39 @foreach ($Infoblocks as $it)
40 <option value="{{ $it->id }}">{{ $it->name }}</option> 40 <option value="{{ $it->id }}">{{ $it->name }}</option>
41 @endforeach 41 @endforeach
42 @endif 42 @endif
43 </select> 43 </select>
44 </div> 44 </div>
45 </div> 45 </div>
46 <div class="cabinet__body-item"> 46 <div class="cabinet__body-item">
47 <h4 class="cabinet__h4">Описание-комментарий</h4> 47 <h4 class="cabinet__h4">Описание-комментарий</h4>
48 <textarea class="textarea" name="text" id="text" placeholder="Не указано"></textarea> 48 <textarea class="textarea" name="text" id="text" placeholder="Не указано"></textarea>
49 <div class="cabinet__buttons"> 49 <div class="cabinet__buttons">
50 <button type="submit" class="button">Сохранить</button> 50 <button type="submit" class="button">Сохранить</button>
51 </div> 51 </div>
52 </div> 52 </div>
53 </div> 53 </div>
54 </form> 54 </form>
55 </div> 55 </div>
56 </div> 56 </div>
57 </section> 57 </section>
58 </div> 58 </div>
59
60 @endsection 59 @endsection
61 60
1 <?php 1 <?php
2 2
3 use App\Http\Controllers\AdEmployerController; 3 use App\Http\Controllers\AdEmployerController;
4 use App\Http\Controllers\Admin\AdminController; 4 use App\Http\Controllers\Admin\AdminController;
5 use App\Http\Controllers\Admin\CategoryController; 5 use App\Http\Controllers\Admin\CategoryController;
6 use App\Http\Controllers\Admin\CategoryEmpController; 6 use App\Http\Controllers\Admin\CategoryEmpController;
7 use App\Http\Controllers\Admin\EducationController; 7 use App\Http\Controllers\Admin\EducationController;
8 use App\Http\Controllers\Admin\EmployersController; 8 use App\Http\Controllers\Admin\EmployersController;
9 use App\Http\Controllers\EmployerController as FrontEmployersController; 9 use App\Http\Controllers\EmployerController as FrontEmployersController;
10 use App\Http\Controllers\Admin\InfoBloksController; 10 use App\Http\Controllers\Admin\InfoBloksController;
11 use App\Http\Controllers\Admin\JobTitlesController; 11 use App\Http\Controllers\Admin\JobTitlesController;
12 use App\Http\Controllers\Admin\UsersController; 12 use App\Http\Controllers\Admin\UsersController;
13 use App\Http\Controllers\Admin\WorkersController; 13 use App\Http\Controllers\Admin\WorkersController;
14 use App\Http\Controllers\Auth\ForgotPasswordController; 14 use App\Http\Controllers\Auth\ForgotPasswordController;
15 use App\Http\Controllers\Auth\LoginController; 15 use App\Http\Controllers\Auth\LoginController;
16 use App\Http\Controllers\Auth\RegisterController; 16 use App\Http\Controllers\Auth\RegisterController;
17 use App\Http\Controllers\CKEditorController; 17 use App\Http\Controllers\CKEditorController;
18 use App\Http\Controllers\MediaController; 18 use App\Http\Controllers\MediaController;
19 use App\Http\Controllers\WorkerController; 19 use App\Http\Controllers\WorkerController;
20 use App\Models\User; 20 use App\Models\User;
21 use App\Http\Controllers\MainController; 21 use App\Http\Controllers\MainController;
22 use App\Http\Controllers\HomeController; 22 use App\Http\Controllers\HomeController;
23 use Illuminate\Support\Facades\Route; 23 use Illuminate\Support\Facades\Route;
24 use App\Http\Controllers\Admin\CompanyController; 24 use App\Http\Controllers\Admin\CompanyController;
25 use App\Http\Controllers\Admin\Ad_EmployersController; 25 use App\Http\Controllers\Admin\Ad_EmployersController;
26 use App\Http\Controllers\Admin\MsgAnswersController; 26 use App\Http\Controllers\Admin\MsgAnswersController;
27 use App\Http\Controllers\Admin\GroupsController; 27 use App\Http\Controllers\Admin\GroupsController;
28 use App\Http\Controllers\PagesController; 28 use App\Http\Controllers\PagesController;
29 use Illuminate\Support\Facades\Storage; 29 use Illuminate\Support\Facades\Storage;
30 use App\Http\Controllers\EmployerController; 30 use App\Http\Controllers\EmployerController;
31 use App\Http\Controllers\CompanyController as FrontCompanyController; 31 use App\Http\Controllers\CompanyController as FrontCompanyController;
32 32
33 33
34 /* 34 /*
35 |-------------------------------------------------------------------------- 35 |--------------------------------------------------------------------------
36 | Web Routes 36 | Web Routes
37 |-------------------------------------------------------------------------- 37 |--------------------------------------------------------------------------
38 | 38 |
39 | Here is where you can register web routes for your application. These 39 | Here is where you can register web routes for your application. These
40 | routes are loaded by the RouteServiceProvider within a group which 40 | routes are loaded by the RouteServiceProvider within a group which
41 | contains the "web" middleware group. Now create something great! 41 | contains the "web" middleware group. Now create something great!
42 | 42 |
43 */ 43 */
44 /* 44 /*
45 Route::get('/', function () { 45 Route::get('/', function () {
46 return view('welcome'); 46 return view('welcome');
47 })->name('index'); 47 })->name('index');
48 */ 48 */
49 Route::get('/', [MainController::class, 'index'])->name('index'); 49 Route::get('/', [MainController::class, 'index'])->name('index');
50 50
51 //Роуты авторизации, регистрации, восстановления, аутентификации 51 //Роуты авторизации, регистрации, восстановления, аутентификации
52 Auth::routes(['verify' => true]); 52 Auth::routes(['verify' => true]);
53 53
54 // роуты регистрации, авторизации, восстановления пароля, верификации почты 54 // роуты регистрации, авторизации, восстановления пароля, верификации почты
55 /*Route::group([ 55 /*Route::group([
56 'as' => 'auth.', //имя маршрута, например auth.index 56 'as' => 'auth.', //имя маршрута, например auth.index
57 'prefix' => 'auth', // префикс маршрута, например, auth/index 57 'prefix' => 'auth', // префикс маршрута, например, auth/index
58 ], function () { 58 ], function () {
59 //форма регистрации 59 //форма регистрации
60 Route::get('register', [RegisterController::class, 'register'])->name('register'); 60 Route::get('register', [RegisterController::class, 'register'])->name('register');
61 61
62 //создание пользователя 62 //создание пользователя
63 Route::post('register', [RegisterController::class, 'create'])->name('create'); 63 Route::post('register', [RegisterController::class, 'create'])->name('create');
64 64
65 //форма входа авторизации 65 //форма входа авторизации
66 Route::get('login', [LoginController::class, 'login'])->name('login'); 66 Route::get('login', [LoginController::class, 'login'])->name('login');
67 67
68 //аутентификация 68 //аутентификация
69 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 69 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
70 70
71 //выход 71 //выход
72 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 72 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
73 73
74 //форма ввода адреса почты 74 //форма ввода адреса почты
75 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 75 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
76 76
77 //письмо на почту 77 //письмо на почту
78 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 78 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
79 79
80 //форма восстановления пароля 80 //форма восстановления пароля
81 Route::get('reset-password/token/{token}/email/{email}', 81 Route::get('reset-password/token/{token}/email/{email}',
82 [ResetPasswordController::class, 'form'] 82 [ResetPasswordController::class, 'form']
83 )->name('reset-form'); 83 )->name('reset-form');
84 84
85 //восстановление пароля 85 //восстановление пароля
86 Route::post('reset-password', 86 Route::post('reset-password',
87 [ResetPasswordController::class, 'reset'] 87 [ResetPasswordController::class, 'reset']
88 )->name('reset-password'); 88 )->name('reset-password');
89 89
90 //сообщение о необходимости проверки адреса почты 90 //сообщение о необходимости проверки адреса почты
91 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 91 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
92 92
93 //подтверждение адреса почты нового пользователя 93 //подтверждение адреса почты нового пользователя
94 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 94 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
95 ->where('token', '[a-f0-9]{32}') 95 ->where('token', '[a-f0-9]{32}')
96 ->where('id', '[0-9]+') 96 ->where('id', '[0-9]+')
97 ->name('verify-email'); 97 ->name('verify-email');
98 });*/ 98 });*/
99 99
100 //Личный кабинет пользователя 100 //Личный кабинет пользователя
101 Route::get('/home', [HomeController::class, 'index'])->name('home'); 101 Route::get('/home', [HomeController::class, 'index'])->name('home');
102 102
103 /* 103 /*
104 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 104 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
105 $user = User::where('email',$request->input('email'))->first(); 105 $user = User::where('email',$request->input('email'))->first();
106 106
107 $user->sendEmailVerificationNotification(); 107 $user->sendEmailVerificationNotification();
108 108
109 return 'your response'; 109 return 'your response';
110 })->middleware('throttle:6,1')->name('verification.resend'); 110 })->middleware('throttle:6,1')->name('verification.resend');
111 */ 111 */
112 112
113 // Авторизация, регистрация в админку 113 // Авторизация, регистрация в админку
114 Route::group([ 114 Route::group([
115 'as' => 'admin.', // имя маршрута, например auth.index 115 'as' => 'admin.', // имя маршрута, например auth.index
116 'prefix' => 'admin', // префикс маршрута, например auth/index 116 'prefix' => 'admin', // префикс маршрута, например auth/index
117 'middleware' => ['guest'], 117 'middleware' => ['guest'],
118 ], function () { 118 ], function () {
119 // Форма регистрации 119 // Форма регистрации
120 Route::get('register', [AdminController::class, 'register'])->name('register'); 120 Route::get('register', [AdminController::class, 'register'])->name('register');
121 // Создание пользователя 121 // Создание пользователя
122 Route::post('register', [AdminController::class, 'create'])->name('create'); 122 Route::post('register', [AdminController::class, 'create'])->name('create');
123 123
124 //Форма входа 124 //Форма входа
125 Route::get('login', [AdminController::class, 'login'])->name('login'); 125 Route::get('login', [AdminController::class, 'login'])->name('login');
126 126
127 // аутентификация 127 // аутентификация
128 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 128 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
129 129
130 }); 130 });
131 131
132 // Личный кабинет админки 132 // Личный кабинет админки
133 Route::group([ 133 Route::group([
134 'as' => 'admin.', // имя маршрута, например auth.index 134 'as' => 'admin.', // имя маршрута, например auth.index
135 'prefix' => 'admin', // префикс маршрута, например auth/index 135 'prefix' => 'admin', // префикс маршрута, например auth/index
136 'middleware' => ['auth'], ['admin'], 136 'middleware' => ['auth'], ['admin'],
137 ], function() { 137 ], function() {
138 138
139 // выход 139 // выход
140 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 140 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
141 141
142 // кабинет главная страница 142 // кабинет главная страница
143 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 143 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
144 144
145 // кабинет профиль админа - форма 145 // кабинет профиль админа - форма
146 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 146 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
147 // кабинет профиль админа - сохранение формы 147 // кабинет профиль админа - сохранение формы
148 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 148 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
149 149
150 //кабинет сообщения админа 150 //кабинет сообщения админа
151 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 151 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
152 152
153 153
154 // кабинет профиль - форма пароли 154 // кабинет профиль - форма пароли
155 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 155 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
156 // кабинет профиль - сохранение формы пароля 156 // кабинет профиль - сохранение формы пароля
157 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 157 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
158 158
159 159
160 // кабинет профиль пользователя - форма 160 // кабинет профиль пользователя - форма
161 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 161 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
162 // кабинет профиль пользователя - сохранение формы 162 // кабинет профиль пользователя - сохранение формы
163 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 163 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
164 164
165 // кабинет профиль работодатель - форма 165 // кабинет профиль работодатель - форма
166 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 166 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
167 // кабинет профиль работодатель - сохранение формы 167 // кабинет профиль работодатель - сохранение формы
168 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 168 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
169 // кабинет удаление профиль работодателя и юзера 169 // кабинет удаление профиль работодателя и юзера
170 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 170 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
171 171
172 // кабинет профиль работник - форма 172 // кабинет профиль работник - форма
173 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 173 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
174 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 174 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
175 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 175 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
176 // кабинет профиль работник - сохранение формы 176 // кабинет профиль работник - сохранение формы
177 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 177 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
178 178
179 // Медиа 179 // Медиа
180 Route::get('media', [MediaController::class, 'index'])->name('media'); 180 Route::get('media', [MediaController::class, 'index'])->name('media');
181 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 181 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
182 182
183 // кабинет настройки сайта - форма 183 // кабинет настройки сайта - форма
184 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 184 Route::get('config', [AdminController::class, 'config_form'])->name('config');
185 // кабинет настройки сайта сохранение формы 185 // кабинет настройки сайта сохранение формы
186 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 186 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
187 187
188 // кабинет - пользователи 188 // кабинет - пользователи
189 Route::get('users', [UsersController::class, 'index'])->name('users'); 189 Route::get('users', [UsersController::class, 'index'])->name('users');
190 190
191 // кабинет - пользователи 191 // кабинет - пользователи
192 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 192 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
193 193
194 // кабинет - работодатели 194 // кабинет - работодатели
195 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 195 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
196 196
197 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 197 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
198 198
199 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 199 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
200 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 200 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
201 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 201 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
202 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 202 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
203 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 203 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
204 204
205 // кабинет - соискатели 205 // кабинет - соискатели
206 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 206 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
207 207
208 // кабинет - база данных 208 // кабинет - база данных
209 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 209 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
210 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 210 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
211 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 211 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
212 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 212 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
213 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 213 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
214 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 214 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
215 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 215 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
216 216
217 // кабинет - вакансии 217 // кабинет - вакансии
218 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 218 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
219 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 219 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
220 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 220 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
221 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 221 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
222 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 222 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
223 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 223 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
224 224
225 // Редактирование должности в вакансии 225 // Редактирование должности в вакансии
226 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 226 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
227 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 227 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
228 228
229 229
230 // кабинет - категории 230 // кабинет - категории
231 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 231 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
232 /* 232 /*
233 * CRUD-операции над Справочником Категории 233 * CRUD-операции над Справочником Категории
234 */ 234 */
235 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 235 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
236 236
237 // CRUD-операции над справочником Категории для работодателей 237 // CRUD-операции над справочником Категории для работодателей
238 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 238 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
239 239
240 // CRUD-операции над справочником Образование 240 // CRUD-операции над справочником Образование
241 Route::resource('education', EducationController::class, ['except' => ['show']]); 241 Route::resource('education', EducationController::class, ['except' => ['show']]);
242 242
243 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 243 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
244 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 244 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
245 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 245 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
246 246
247 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 247 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
248 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 248 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
249 249
250 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 250 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
251 251
252 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 252 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
253 /* 253 /*
254 * кабинет - CRUD-операции по справочнику должности 254 * кабинет - CRUD-операции по справочнику должности
255 * 255 *
256 */ 256 */
257 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 257 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
258 258
259 // кабинет - сообщения (чтение чужих) 259 // кабинет - сообщения (чтение чужих)
260 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 260 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
261 // кабинет - просмотр сообщения чужого (чтение) 261 // кабинет - просмотр сообщения чужого (чтение)
262 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 262 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
263 263
264 // кабинет - сообщения (админские) 264 // кабинет - сообщения (админские)
265 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 265 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
266 // кабинет - сообщения (админские) 266 // кабинет - сообщения (админские)
267 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 267 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
268 // кабинет - sql - конструкция запросов 268 // кабинет - sql - конструкция запросов
269 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 269 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
270 270
271 /* 271 /*
272 * Расписанный подход в описании каждой директорий групп пользователей. 272 * Расписанный подход в описании каждой директорий групп пользователей.
273 */ 273 */
274 // кабинет - группы пользователей 274 // кабинет - группы пользователей
275 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 275 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
276 // кабинет - добавление форма группы пользователей 276 // кабинет - добавление форма группы пользователей
277 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 277 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
278 // кабинет - сохранение формы группы пользователей 278 // кабинет - сохранение формы группы пользователей
279 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 279 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
280 // кабинет - редактирование форма группы пользователей 280 // кабинет - редактирование форма группы пользователей
281 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 281 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
282 // кабинет - сохранение редактированной формы группы пользователей 282 // кабинет - сохранение редактированной формы группы пользователей
283 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 283 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
284 // кабинет - удаление группы пользователей 284 // кабинет - удаление группы пользователей
285 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 285 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
286 286
287 287
288 // кабинет - список админов 288 // кабинет - список админов
289 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 289 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
290 290
291 291
292 /////редактор////// кабинет - редактор сайта//////////////////////// 292 /////редактор////// кабинет - редактор сайта////////////////////////
293 Route::get('editor-site', function() { 293 Route::get('editor-site', function() {
294 return view('admin.editor.index'); 294 return view('admin.editor.index');
295 })->name('editor-site'); 295 })->name('editor-site');
296 296
297 297
298 // кабинет - редактор шапки-футера сайта 298 // кабинет - редактор шапки-футера сайта
299 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 299 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
300 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 300 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
301 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 301 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
302 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 302 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
303 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 303 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
304 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 304 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
305 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 305 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
306 306
307 307
308 // кабинет - редактор должности на главной 308 // кабинет - редактор должности на главной
309 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 309 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
310 310
311 // кабинет - редактор работодатели на главной 311 // кабинет - редактор работодатели на главной
312 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 312 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
313 313
314 314
315 // кабинет - редактор seo-сайта 315 // кабинет - редактор seo-сайта
316 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 316 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
317 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 317 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
318 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 318 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
319 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 319 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
320 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 320 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
321 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 321 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
322 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 322 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
323 323
324 324
325 // кабинет - редактор страниц 325 // кабинет - редактор страниц
326 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 326 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
327 // кабинет - добавление страницы 327 // кабинет - добавление страницы
328 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 328 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
329 // кабинет - сохранение формы страницы 329 // кабинет - сохранение формы страницы
330 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 330 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
331 // кабинет - редактирование форма страницы 331 // кабинет - редактирование форма страницы
332 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 332 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
333 // кабинет - сохранение редактированной формы страницы 333 // кабинет - сохранение редактированной формы страницы
334 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 334 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
335 // кабинет - удаление страницы 335 // кабинет - удаление страницы
336 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 336 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
337 337
338 338
339 // кабинет - реклама сайта 339 // кабинет - реклама сайта
340 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 340 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
341 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 341 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
342 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 342 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
343 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 343 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
344 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 344 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
345 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 345 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
346 //////////////////////////////////////////////////////////////////////// 346 ////////////////////////////////////////////////////////////////////////
347 347
348 348
349 // кабинет - отзывы о работодателе для модерации 349 // кабинет - отзывы о работодателе для модерации
350 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 350 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
351 351
352 // Общая страница статистики 352 // Общая страница статистики
353 Route::get('statics', function () { 353 Route::get('statics', function () {
354 return view('admin.static.index'); 354 return view('admin.static.index');
355 })->name('statics'); 355 })->name('statics');
356 356
357 // кабинет - статистика работников 357 // кабинет - статистика работников
358 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 358 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
359 359
360 // кабинет - статистика вакансий работодателя 360 // кабинет - статистика вакансий работодателя
361 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 361 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
362 362
363 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 363 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
364 /* 364 /*
365 * CRUD-операции над справочником дипломы и документы 365 * CRUD-операции над справочником дипломы и документы
366 */ 366 */
367 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 367 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
368 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 368 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
369 369
370 // кабинет - роли пользователя 370 // кабинет - роли пользователя
371 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 371 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
372 372
373 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 373 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
374 374
375 Route::get('logs', function() { 375 Route::get('logs', function() {
376 $files = Storage::files('logs/laravel.log'); 376 $files = Storage::files('logs/laravel.log');
377 })->name('logs'); 377 })->name('logs');
378 }); 378 });
379 379
380 // Инструментальные страницы 380 // Инструментальные страницы
381 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 381 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
382 382
383 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 383 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
384 384
385 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 385 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
386 386
387 // Страницы с произвольным контентом 387 // Страницы с произвольным контентом
388 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 388 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
389 389
390 // Публичные страницы соискателя 390 // Публичные страницы соискателя
391 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 391 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
392 392
393 //Страница вакансии 393 //Страница вакансии
394 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 394 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
395 395
396 //Вакансии 396 //Вакансии
397 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 397 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
398 398
399 //Вакансии поиск на главной 399 //Вакансии поиск на главной
400 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 400 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
401 401
402 //Вакансии категория детальная 402 //Вакансии категория детальная
403 Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 403 Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
404 404
405 //Детальная страница вакансии - работодателя 405 //Детальная страница вакансии - работодателя
406 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 406 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
407 407
408 //Судоходные компании 408 //Судоходные компании
409 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 409 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
410 410
411 //Детальная инфа о компании 411 //Детальная инфа о компании
412 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 412 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
413 413
414 //Образование 414 //Образование
415 Route::get('education', [MainController::class, 'education'])->name('education'); 415 Route::get('education', [MainController::class, 'education'])->name('education');
416 416
417 //Новости 417 //Новости
418 Route::get('news', [MainController::class, 'news'])->name('news'); 418 Route::get('news', [MainController::class, 'news'])->name('news');
419 419
420 //Контакты 420 //Контакты
421 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 421 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
422 422
423 //База резюме 423 //База резюме
424 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 424 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
425 425
426 //Анкета соискателя 426 //Анкета соискателя
427 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 427 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
428 428
429 //Скачать резюме 429 //Скачать резюме
430 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 430 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
431 431
432 //Вход в кабинет 432 //Вход в кабинет
433 Route::get('login', [MainController::class, 'input_login'])->name('login'); 433 Route::get('login', [MainController::class, 'input_login'])->name('login');
434 434
435 // Выход из кабинета 435 // Выход из кабинета
436 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 436 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
437 437
438 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 438 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
439 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 439 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
440 440
441 // Борьба против колорадских жуков и их геориевской ленточки 441 // Борьба против колорадских жуков
442 Route::get('clear_cookie', function() { 442 Route::get('clear_cookie', function() {
443 \App\Classes\Cookies_vacancy::clear_vacancy(); 443 \App\Classes\Cookies_vacancy::clear_vacancy();
444 return redirect()->route('index'); 444 return redirect()->route('index');
445 })->name('clear_cookie'); 445 })->name('clear_cookie');
446 446
447 // Личный кабинет работника 447 // Личный кабинет работника
448 Route::group([ 448 Route::group([
449 'as' => 'worker.', // имя маршрута, например auth.index 449 'as' => 'worker.', // имя маршрута, например auth.index
450 'prefix' => 'worker', // префикс маршрута, например auth/index 450 'prefix' => 'worker', // префикс маршрута, например auth/index
451 'middleware' => ['auth'], ['is_worker'], 451 'middleware' => ['auth'], ['is_worker'],
452 ], function() { 452 ], function() {
453 // 1 страница - Моя анкета 453 // 1 страница - Моя анкета
454 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 454 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
455 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 455 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
456 456
457 // 2 страница - Сообщения 457 // 2 страница - Сообщения
458 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 458 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
459 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); 459 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog');
460 // 3 страница - Избранные вакансии 460 // 3 страница - Избранные вакансии
461 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 461 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
462 // Продолжение борьбы против колорадов - избранные вакансии 462 // Продолжение борьбы против колорадов - избранные вакансии
463 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 463 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
464 464
465 // 4 страница - Сменить пароль 465 // 4 страница - Сменить пароль
466 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 466 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
467 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); 467 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
468 468
469 // 5 страница - Удалить профиль 469 // 5 страница - Удалить профиль
470 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 470 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
471 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); 471 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
472 472
473 // Резюме -pdf 473 // Резюме -pdf
474 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 474 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
475 475
476 // Поднятие анкеты 476 // Поднятие анкеты
477 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 477 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
478 478
479 // Добавление сертификата 479 // Добавление сертификата
480 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 480 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
481 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); 481 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
482 482
483 // Добавление документа-диплома 483 // Добавление документа-диплома
484 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); 484 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
485 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); 485 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
486
487 // Добавление стандартного диплома
488 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
489 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
490 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
491 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
492 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
493
494 // Отправка сообщения работодателю от соискателя
495 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
486 }); 496 });
487 497
488 // Личный кабинет работодателя 498 // Личный кабинет работодателя
489 Route::group([ 499 Route::group([
490 'as' => 'employer.', // имя маршрута, например auth.index 500 'as' => 'employer.', // имя маршрута, например auth.index
491 'prefix' => 'employer', // префикс маршрута, например auth/index 501 'prefix' => 'employer', // префикс маршрута, например auth/index
492 'middleware' => ['auth'], !['is_worker'], 502 'middleware' => ['auth'], !['is_worker'],
493 ], function() { 503 ], function() {
494 // 1 страница - Профиль 504 // 1 страница - Профиль
495 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 505 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
496 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 506 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
497 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 507 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
498 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 508 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
499 509
500 // 2 страница - Добавление вакансий 510 // 2 страница - Добавление вакансий
501 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 511 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
502 Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save'); 512 Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save');
503 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 513 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
504 514
505 // 3 страница - Мои вакансии 515 // 3 страница - Мои вакансии
506 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 516 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
507 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 517 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
508 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 518 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
509 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 519 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
510 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 520 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
511 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 521 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
512 522
513 // 4 страница - Отклики на вакансии 523 // 4 страница - Отклики на вакансии
514 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 524 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
515 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 525 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
516 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 526 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
517 527
518 // 5 страница - Сообщения 528 // 5 страница - Сообщения
519 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 529 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
520 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); 530 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog');
521 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 531 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
522 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 532 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
523 533
524 // 6 страница - Избранный 534 // 6 страница - Избранный
525 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 535 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
526 536
527 //7 страница - База данных 537 //7 страница - База данных
528 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 538 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
529 539
530 //8 страница - База резюме 540 //8 страница - База резюме
531 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 541 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
532 542
533 // 9 рассылка сообщений 543 // 9 рассылка сообщений
534 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 544 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
535 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 545 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
536 546
537 // 10 страница FAQ вопросы 547 // 10 страница FAQ вопросы
538 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); 548 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
539 549
540 // 11 страница - Настройка уведомлений 550 // 11 страница - Настройка уведомлений
541 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 551 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
542 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 552 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
543 553
544 // 12 страница - Сменить пароль 554 // 12 страница - Сменить пароль
545 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 555 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
546 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 556 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
547 557
548 // 13 страница - Удаление профиля 558 // 13 страница - Удаление профиля
549 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 559 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
550 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 560 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
551 }); 561 });
552 562