Commit ac8b91cfd96c51dc2321862831795bb868132392

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

Обновление системы.

Showing 19 changed files with 919 additions and 112 deletions Inline Diff

app/Classes/Capcha.php
File was created 1 <?php
2
3
4 namespace App\Classes;
5
6
7 class Capcha
8 {
9 public $USE_SESSION;
10 public $chars;
11 public $length;
12
13 function __construct() {
14 $this->USE_SESSION = true;
15 // 1. Генерируем код капчи
16 // 1.1. Устанавливаем символы, из которых будет составляться код капчи
17 $this->chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz';
18 // 1.2. Количество символов в капче
19 $this->length = 6;
20 }
21
22 public function Release() {
23 // 1.3. Генерируем код
24 $code = substr(str_shuffle($this->chars), 0, $this->length);
25
26 if ($this->USE_SESSION) {
27 // 2a. Используем сессию
28 session_start();
29 $_SESSION['captcha'] = crypt($code, '$1$itchief$7');
30 session_write_close();
31 } else {
32 // 2a. Используем куки (время действия 600 секунд)
33 $value = crypt($code, '$1$itchief$7');
34 $expires = time() + 600;
35 setcookie('captcha', $value, $expires, '/', 'test.ru', false, true);
36 }
37
38 // 3. Генерируем изображение
39 // 3.1. Создаем новое изображение из файла
40 $image = imagecreatefrompng(__DIR__ . '/files/bg.png');
41 // 3.2 Устанавливаем размер шрифта в пунктах
42 $size = 36;
43 // 3.3. Создаём цвет, который будет использоваться в изображении
44 $color = imagecolorallocate($image, 66, 182, 66);
45 // 3.4. Устанавливаем путь к шрифту
46 $font = __DIR__ . '/files//oswald.ttf';
47 // 3.5 Задаём угол в градусах
48 $angle = rand(-10, 10);
49 // 3.6. Устанавливаем координаты точки для первого символа текста
50 $x = 56;
51 $y = 64;
52 // 3.7. Наносим текст на изображение
53 imagefttext($image, $size, $angle, $x, $y, $color, $font, $code);
54 // 3.8 Устанавливаем заголовки
55 header('Cache-Control: no-store, must-revalidate');
56 header('Expires: 0');
57 header('Content-Type: image/png');
58 // 3.9. Выводим изображение
59 imagepng($image);
60 // 3.10. Удаляем изображение
61 imagedestroy($image);
62 }
63 }
64
app/Http/Controllers/EmployerController.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\Classes\Tools; 6 use App\Classes\Tools;
7 use App\Http\Requests\FlotRequest; 7 use App\Http\Requests\FlotRequest;
8 use App\Http\Requests\MessagesRequiest; 8 use App\Http\Requests\MessagesRequiest;
9 use App\Http\Requests\VacancyRequestEdit; 9 use App\Http\Requests\VacancyRequestEdit;
10 use App\Http\Requests\VacansiaRequiest; 10 use App\Http\Requests\VacansiaRequiest;
11 use App\Mail\MailSotrudnichestvo; 11 use App\Mail\MailSotrudnichestvo;
12 use App\Mail\SendAllMessages; 12 use App\Mail\SendAllMessages;
13 use App\Models\Ad_employer; 13 use App\Models\Ad_employer;
14 use App\Models\Ad_jobs; 14 use App\Models\Ad_jobs;
15 use App\Models\ad_response; 15 use App\Models\ad_response;
16 use App\Models\Category; 16 use App\Models\Category;
17 use App\Models\Education; 17 use App\Models\Education;
18 use App\Models\Employer; 18 use App\Models\Employer;
19 use App\Models\employers_main; 19 use App\Models\employers_main;
20 use App\Models\Flot; 20 use App\Models\Flot;
21 use App\Models\Job_title; 21 use App\Models\Job_title;
22 use App\Models\Like_vacancy; 22 use App\Models\Like_vacancy;
23 use App\Models\Like_worker; 23 use App\Models\Like_worker;
24 use App\Models\Message; 24 use App\Models\Message;
25 use App\Models\Positions; 25 use App\Models\Positions;
26 use App\Models\Worker; 26 use App\Models\Worker;
27 use Carbon\Carbon; 27 use Carbon\Carbon;
28 use Illuminate\Auth\Events\Registered; 28 use Illuminate\Auth\Events\Registered;
29 use Illuminate\Database\Eloquent\Builder; 29 use Illuminate\Database\Eloquent\Builder;
30 use Illuminate\Database\Eloquent\Model; 30 use Illuminate\Database\Eloquent\Model;
31 use Illuminate\Foundation\Auth\User; 31 use Illuminate\Foundation\Auth\User;
32 use Illuminate\Http\Request; 32 use Illuminate\Http\Request;
33 use Illuminate\Support\Facades\Auth; 33 use Illuminate\Support\Facades\Auth;
34 use Illuminate\Support\Facades\Hash; 34 use Illuminate\Support\Facades\Hash;
35 use Illuminate\Support\Facades\Mail; 35 use Illuminate\Support\Facades\Mail;
36 use Illuminate\Support\Facades\Storage; 36 use Illuminate\Support\Facades\Storage;
37 use App\Models\User as User_Model; 37 use App\Models\User as User_Model;
38 use Illuminate\Support\Facades\Validator; 38 use Illuminate\Support\Facades\Validator;
39 39
40 class EmployerController extends Controller 40 class EmployerController extends Controller
41 { 41 {
42 public function vacancie($vacancy, Request $request) { 42 public function vacancie($vacancy, Request $request) {
43 $title = 'Заголовок вакансии'; 43 $title = 'Заголовок вакансии';
44 $Query = Ad_employer::with('jobs')-> 44 $Query = Ad_employer::with('jobs')->
45 with('cat')-> 45 with('cat')->
46 with('employer')-> 46 with('employer')->
47 with('jobs_code')-> 47 with('jobs_code')->
48 select('ad_employers.*')-> 48 select('ad_employers.*')->
49 where('id', '=', $vacancy)->get(); 49 where('id', '=', $vacancy)->get();
50 50
51 if (isset(Auth()->user()->id)) 51 if (isset(Auth()->user()->id))
52 $uid = Auth()->user()->id; 52 $uid = Auth()->user()->id;
53 else 53 else
54 $uid = 0; 54 $uid = 0;
55 $title = $Query[0]->name; 55 $title = $Query[0]->name;
56 if ($request->ajax()) { 56 if ($request->ajax()) {
57 return view('ajax.vacance-item', compact('Query','uid')); 57 return view('ajax.vacance-item', compact('Query','uid'));
58 } else { 58 } else {
59 return view('vacance-item', compact('title', 'Query', 'uid')); 59 return view('vacance-item', compact('title', 'Query', 'uid'));
60 } 60 }
61 } 61 }
62 62
63 public function logout() { 63 public function logout() {
64 Auth::logout(); 64 Auth::logout();
65 return redirect()->route('index') 65 return redirect()->route('index')
66 ->with('success', 'Вы вышли из личного кабинета'); 66 ->with('success', 'Вы вышли из личного кабинета');
67 } 67 }
68 68
69 public function cabinet() { 69 public function cabinet() {
70 $id = Auth()->user()->id; 70 $id = Auth()->user()->id;
71 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 71 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
72 WhereHas('users', 72 WhereHas('users',
73 function (Builder $query) use ($id) {$query->Where('id', $id); 73 function (Builder $query) use ($id) {$query->Where('id', $id);
74 })->get(); 74 })->get();
75 return view('employers.cabinet45', compact('Employer')); 75 return view('employers.cabinet45', compact('Employer'));
76 } 76 }
77 77
78 public function slider_flot() { 78 public function slider_flot() {
79 $id = Auth()->user()->id; 79 $id = Auth()->user()->id;
80 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 80 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
81 WhereHas('users', 81 WhereHas('users',
82 function (Builder $query) use ($id) {$query->Where('id', $id); 82 function (Builder $query) use ($id) {$query->Where('id', $id);
83 })->get(); 83 })->get();
84 return view('employers.fly-flot', compact('Employer')); 84 return view('employers.fly-flot', compact('Employer'));
85 } 85 }
86 86
87 public function cabinet_save(Employer $Employer, Request $request) { 87 public function cabinet_save(Employer $Employer, Request $request) {
88 $params = $request->all(); 88 $params = $request->all();
89 $params['user_id'] = Auth()->user()->id; 89 $params['user_id'] = Auth()->user()->id;
90 $id = $Employer->id; 90 $id = $Employer->id;
91 91
92 if ($request->has('logo')) { 92 if ($request->has('logo')) {
93 if (!empty($Employer->logo)) { 93 if (!empty($Employer->logo)) {
94 Storage::delete($Employer->logo); 94 Storage::delete($Employer->logo);
95 } 95 }
96 $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); 96 $params['logo'] = $request->file('logo')->store("employer/$id", 'public');
97 } 97 }
98 98
99 $Employer->update($params); 99 $Employer->update($params);
100 100
101 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); 101 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены');
102 } 102 }
103 103
104 public function save_add_flot(FlotRequest $request) { 104 public function save_add_flot(FlotRequest $request) {
105 // отмена 105 // отмена
106 $params = $request->all(); 106 $params = $request->all();
107 107
108 if ($request->has('image')) { 108 if ($request->has('image')) {
109 $params['image'] = $request->file('image')->store("flot", 'public'); 109 $params['image'] = $request->file('image')->store("flot", 'public');
110 } 110 }
111 Flot::create($params); 111 Flot::create($params);
112 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); 112 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get();
113 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); 113 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен');
114 } 114 }
115 115
116 public function delete_flot(Flot $Flot) { 116 public function delete_flot(Flot $Flot) {
117 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); 117 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get();
118 118
119 if (isset($Flot->id)) $Flot->delete(); 119 if (isset($Flot->id)) $Flot->delete();
120 return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); 120 return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален');
121 } 121 }
122 122
123 // Форма добавления вакансий 123 // Форма добавления вакансий
124 public function cabinet_vacancie() { 124 public function cabinet_vacancie() {
125 $id = Auth()->user()->id; 125 $id = Auth()->user()->id;
126 126
127 $categories = Category::query()->active()->get(); 127 $categories = Category::query()->active()->get();
128 $Positions = Category::query()->active()->get(); 128 $Positions = Category::query()->active()->get();
129 if ($Positions->count()) { 129 if ($Positions->count()) {
130 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); 130 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get();
131 } else { 131 } else {
132 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); 132 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get();
133 } 133 }
134 134
135 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 135 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
136 WhereHas('users', 136 WhereHas('users',
137 function (Builder $query) use ($id) {$query->Where('id', $id); 137 function (Builder $query) use ($id) {$query->Where('id', $id);
138 })->get(); 138 })->get();
139 139
140 return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions')); 140 return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions'));
141 } 141 }
142 142
143 // Сохранение вакансии 143 // Сохранение вакансии
144 public function cabinet_vacancy_save1(VacancyRequestEdit $request) { 144 public function cabinet_vacancy_save1(VacancyRequestEdit $request) {
145 $params = $request->all(); 145 $params = $request->all();
146 146
147 $ad_jobs = Ad_employer::create($params); 147 $ad_jobs = Ad_employer::create($params);
148 return redirect()->route('employer.vacancy_list'); 148 return redirect()->route('employer.vacancy_list');
149 } 149 }
150 150
151 // Список вакансий 151 // Список вакансий
152 public function vacancy_list(Request $request) { 152 public function vacancy_list(Request $request) {
153 $id = Auth()->user()->id; 153 $id = Auth()->user()->id;
154 $Employer = Employer::query()->where('user_id', $id)->first(); 154 $Employer = Employer::query()->where('user_id', $id)->first();
155 $vacancy_list = Ad_employer::query()->with('jobs')->with('jobs_code')->where('employer_id', $Employer->id); 155 $vacancy_list = Ad_employer::query()->with('jobs')->with('jobs_code')->where('employer_id', $Employer->id);
156 156
157 157
158 if ($request->get('sort')) { 158 if ($request->get('sort')) {
159 $sort = $request->get('sort'); 159 $sort = $request->get('sort');
160 switch ($sort) { 160 switch ($sort) {
161 case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; 161 case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break;
162 case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; 162 case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break;
163 case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; 163 case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break;
164 case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; 164 case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break;
165 case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; 165 case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break;
166 default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; 166 default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break;
167 } 167 }
168 } 168 }
169 $vacancy_list = $vacancy_list->paginate(4); 169 $vacancy_list = $vacancy_list->paginate(4);
170 170
171 //ajax 171 //ajax
172 if ($request->ajax()) { 172 if ($request->ajax()) {
173 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); 173 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer'));
174 } else { 174 } else {
175 return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); 175 return view('employers.list_vacancy', compact('vacancy_list', 'Employer'));
176 } 176 }
177 } 177 }
178 178
179 // Карточка вакансии 179 // Карточка вакансии
180 public function vacancy_edit(Ad_employer $ad_employer) { 180 public function vacancy_edit(Ad_employer $ad_employer) {
181 $id = Auth()->user()->id; 181 $id = Auth()->user()->id;
182 182
183 $Positions = Category::query()->active()->get(); 183 $Positions = Category::query()->active()->get();
184 if ($Positions->count()) { 184 if ($Positions->count()) {
185 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); 185 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get();
186 } else { 186 } else {
187 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); 187 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get();
188 } 188 }
189 $categories = Category::query()->get(); 189 $categories = Category::query()->get();
190 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 190 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
191 where('user_id', $id)->first(); 191 where('user_id', $id)->first();
192 192
193 return view('employers.edit_vacancy', compact('ad_employer', 'Positions', 'categories','Employer', 'jobs')); 193 return view('employers.edit_vacancy', compact('ad_employer', 'Positions', 'categories','Employer', 'jobs'));
194 } 194 }
195 195
196 // Сохранение-редактирование записи 196 // Сохранение-редактирование записи
197 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { 197 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) {
198 $params = $request->all(); 198 $params = $request->all();
199 199
200 //$jobs['flot'] = $params['flot']; 200 //$jobs['flot'] = $params['flot'];
201 //$jobs['job_title_id'] = $params['job_title_id']; 201 //$jobs['job_title_id'] = $params['job_title_id'];
202 //$titles['position_id'] = $params['position_id']; 202 //$titles['position_id'] = $params['position_id'];
203 //unset($params['job_title_id']); 203 //unset($params['job_title_id']);
204 204
205 $ad_employer->update($params); 205 $ad_employer->update($params);
206 206
207 //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> 207 //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])->
208 // where('ad_employer_id', $ad_employer->id)->first(); 208 // where('ad_employer_id', $ad_employer->id)->first();
209 //$data = Ad_jobs::find($job_->id); 209 //$data = Ad_jobs::find($job_->id);
210 //$ad_jobs = $data->update($jobs); 210 //$ad_jobs = $data->update($jobs);
211 211
212 return redirect()->route('employer.vacancy_list'); 212 return redirect()->route('employer.vacancy_list');
213 } 213 }
214 214
215 // Сохранение карточки вакансии 215 // Сохранение карточки вакансии
216 public function vacancy_save(Request $request, Ad_employer $ad_employer) { 216 public function vacancy_save(Request $request, Ad_employer $ad_employer) {
217 $all = $request->all(); 217 $all = $request->all();
218 $ad_employer->update($all); 218 $ad_employer->update($all);
219 return redirect()->route('employer.cabinet_vacancie'); 219 return redirect()->route('employer.cabinet_vacancie');
220 } 220 }
221 221
222 // Удаление карточки вакансии 222 // Удаление карточки вакансии
223 public function vacancy_delete(Ad_employer $ad_employer) { 223 public function vacancy_delete(Ad_employer $ad_employer) {
224 $ad_employer->delete(); 224 $ad_employer->delete();
225 225
226 return redirect()->route('employer.vacancy_list') 226 return redirect()->route('employer.vacancy_list')
227 ->with('success', 'Данные были успешно сохранены'); 227 ->with('success', 'Данные были успешно сохранены');
228 } 228 }
229 229
230 // Обновление даты 230 // Обновление даты
231 public function vacancy_up(Ad_employer $ad_employer) { 231 public function vacancy_up(Ad_employer $ad_employer) {
232 $up = date('m/d/Y h:i:s', time());; 232 $up = date('m/d/Y h:i:s', time());;
233 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 233 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
234 $vac_emp->updated_at = $up; 234 $vac_emp->updated_at = $up;
235 $vac_emp->save(); 235 $vac_emp->save();
236 236
237 return redirect()->route('employer.vacancy_list'); 237 return redirect()->route('employer.vacancy_list');
238 // начало конца 238 // начало конца
239 } 239 }
240 240
241 //Видимость вакансии 241 //Видимость вакансии
242 public function vacancy_eye(Ad_employer $ad_employer, $status) { 242 public function vacancy_eye(Ad_employer $ad_employer, $status) {
243 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 243 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
244 $vac_emp->active_is = $status; 244 $vac_emp->active_is = $status;
245 $vac_emp->save(); 245 $vac_emp->save();
246 246
247 return redirect()->route('employer.vacancy_list'); 247 return redirect()->route('employer.vacancy_list');
248 } 248 }
249 249
250 //Вакансия редактирования (шаблон) 250 //Вакансия редактирования (шаблон)
251 public function vacancy_update(Ad_employer $id) { 251 public function vacancy_update(Ad_employer $id) {
252 252
253 } 253 }
254 254
255 //Отклики на вакансию - лист 255 //Отклики на вакансию - лист
256 public function answers(Employer $employer, Request $request) { 256 public function answers(Employer $employer, Request $request) {
257 $user_id = Auth()->user()->id; 257 $user_id = Auth()->user()->id;
258 $answer = Ad_employer::query()->where('employer_id', $employer->id); 258 $answer = Ad_employer::query()->where('employer_id', $employer->id);
259 if ($request->has('search')) { 259 if ($request->has('search')) {
260 $search = trim($request->get('search')); 260 $search = trim($request->get('search'));
261 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); 261 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%");
262 } 262 }
263 263
264 $answer = $answer->with('response')->get(); 264 $answer = $answer->with('response')->get();
265 265
266 return view('employers.list_answer', compact('answer', 'user_id', 'employer')); 266 return view('employers.list_answer', compact('answer', 'user_id', 'employer'));
267 } 267 }
268 268
269 //Обновление статуса 269 //Обновление статуса
270 public function supple_status(employer $employer, ad_response $ad_response, $flag) { 270 public function supple_status(employer $employer, ad_response $ad_response, $flag) {
271 $ad_response->update(Array('flag' => $flag)); 271 $ad_response->update(Array('flag' => $flag));
272 return redirect()->route('employer.answers', ['employer' => $employer->id]); 272 return redirect()->route('employer.answers', ['employer' => $employer->id]);
273 } 273 }
274 274
275 //Страницы сообщений список 275 //Страницы сообщений список
276 public function messages($type_message) { 276 public function messages($type_message) {
277 $user_id = Auth()->user()->id; 277 $user_id = Auth()->user()->id;
278 278
279 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 279 $messages_input = Message::query()->with('vacancies')->with('user_from')->
280 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 280 Where('to_user_id', $user_id)->OrderByDesc('created_at');
281 281
282 $messages_output = Message::query()->with('vacancies')-> 282 $messages_output = Message::query()->with('vacancies')->
283 with('user_to')->where('user_id', $user_id)-> 283 with('user_to')->where('user_id', $user_id)->
284 OrderByDesc('created_at'); 284 OrderByDesc('created_at');
285 285
286 286
287 $count_input = $messages_input->count(); 287 $count_input = $messages_input->count();
288 $count_output = $messages_output->count(); 288 $count_output = $messages_output->count();
289 289
290 if ($type_message == 'input') { 290 if ($type_message == 'input') {
291 $messages = $messages_input->paginate(15); 291 $messages = $messages_input->paginate(15);
292 } 292 }
293 293
294 if ($type_message == 'output') { 294 if ($type_message == 'output') {
295 $messages = $messages_output->paginate(15); 295 $messages = $messages_output->paginate(15);
296 } 296 }
297 297
298 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 298 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
299 } 299 }
300 300
301 // Диалог между пользователями 301 // Диалог между пользователями
302 public function dialog(User_Model $user1, User_Model $user2) { 302 public function dialog(User_Model $user1, User_Model $user2) {
303 if (isset($user2->id)) { 303 if (isset($user2->id)) {
304 $companion = User_Model::query()->with('workers')-> 304 $companion = User_Model::query()->with('workers')->
305 with('employers')-> 305 with('employers')->
306 where('id', $user2->id)->first(); 306 where('id', $user2->id)->first();
307 } 307 }
308 308
309 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 309 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
310 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 310 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
311 })->orWhere(function($query) use ($user1, $user2) { 311 })->orWhere(function($query) use ($user1, $user2) {
312 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 312 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
313 })->OrderBy('created_at')->get(); 313 })->OrderBy('created_at')->get();
314 314
315 $id_vac = null; 315 $id_vac = null;
316 foreach ($Messages as $it) { 316 foreach ($Messages as $it) {
317 if (isset($it->response)) { 317 if (isset($it->response)) {
318 foreach ($it->response as $r) { 318 foreach ($it->response as $r) {
319 if (isset($r->ad_employer_id)) { 319 if (isset($r->ad_employer_id)) {
320 $id_vac = $r->ad_employer_id; 320 $id_vac = $r->ad_employer_id;
321 break; 321 break;
322 } 322 }
323 } 323 }
324 } 324 }
325 if (!is_null($id_vac)) break; 325 if (!is_null($id_vac)) break;
326 } 326 }
327 327
328 $ad_employer = null; 328 $ad_employer = null;
329 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 329 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
330 $sender = $user1; 330 $sender = $user1;
331 331
332 return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 332 return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
333 } 333 }
334 334
335 // Регистрация работодателя 335 // Регистрация работодателя
336 public function register_employer(Request $request) { 336 public function register_employer(Request $request) {
337 $params = $request->all(); 337 $params = $request->all();
338 338
339 $rules = [ 339 $rules = [
340 'surname' => ['required', 'string', 'max:255'], 340 //'surname' => ['required', 'string', 'max:255'],
341 'name_man' => ['required', 'string', 'max:255'], 341 //'name_man' => ['required', 'string', 'max:255'],
342 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 342 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
343 'name_company' => ['required', 'string', 'max:255'], 343 'name_company' => ['required', 'string', 'max:255'],
344 'password' => ['required', 'string', 'min:8'], 344 'password' => ['required', 'string', 'min:8'],
345 ]; 345 ];
346 346
347 347
348 $messages = [ 348 $messages = [
349 'required' => 'Укажите обязательное поле', 349 'required' => 'Укажите обязательное поле',
350 'min' => [ 350 'min' => [
351 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 351 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
352 'integer' => 'Поле «:attribute» должно быть :min или больше', 352 'integer' => 'Поле «:attribute» должно быть :min или больше',
353 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 353 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
354 ], 354 ],
355 'max' => [ 355 'max' => [
356 'string' => 'Поле «:attribute» должно быть не больше :max символов', 356 'string' => 'Поле «:attribute» должно быть не больше :max символов',
357 'integer' => 'Поле «:attribute» должно быть :max или меньше', 357 'integer' => 'Поле «:attribute» должно быть :max или меньше',
358 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 358 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
359 ] 359 ]
360 ]; 360 ];
361 361
362 if ($request->get('password') !== $request->get('confirmed')){ 362 if ($request->get('password') !== $request->get('confirmed')){
363 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 363 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
364 } 364 }
365 365
366 $validator = Validator::make($request->all(), $rules, $messages); 366 if (empty($request->get('surname'))) {
367 $params['surname'] = 'Неизвестно';
368 }
369
370 if (empty($request->get('name_man'))) {
371 $params['name_man'] = 'Неизвестно';
372 }
373
374 $validator = Validator::make($params, $rules, $messages);
367 375
368 if ($validator->fails()) { 376 if ($validator->fails()) {
369 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 377 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
370 } else { 378 } else {
371 $user = $this->create($params); 379 $user = $this->create($params);
372 event(new Registered($user)); 380 event(new Registered($user));
373 381
374 Auth::guard()->login($user); 382 Auth::guard()->login($user);
375 } 383 }
376 if ($user) { 384 if ($user) {
377 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; 385 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));;
378 } else { 386 } else {
379 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 387 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
380 } 388 }
381 } 389 }
382 390
383 // Создание пользователя 391 // Создание пользователя
384 protected function create(array $data) 392 protected function create(array $data)
385 { 393 {
386 $Use = new User_Model(); 394 $Use = new User_Model();
387 $Code_user = $Use->create([ 395 $Code_user = $Use->create([
388 'name' => $data['surname']." ".$data['name_man'], 396 'name' => $data['surname']." ".$data['name_man'],
389 'name_man' => $data['name_man'], 397 'name_man' => $data['name_man'],
390 'surname' => $data['surname'], 398 'surname' => $data['surname'],
391 'surname2' => $data['surname2'], 399 'surname2' => $data['surname2'],
392 'subscribe_email' => $data['email'], 400 'subscribe_email' => $data['email'],
393 'email' => $data['email'], 401 'email' => $data['email'],
394 'telephone' => $data['telephone'], 402 'telephone' => $data['telephone'],
395 'is_worker' => 0, 403 'is_worker' => 0,
396 'password' => Hash::make($data['password']), 404 'password' => Hash::make($data['password']),
397 'pubpassword' => base64_encode($data['password']), 405 'pubpassword' => base64_encode($data['password']),
398 'email_verified_at' => Carbon::now() 406 'email_verified_at' => Carbon::now()
399 ]); 407 ]);
400 408
401 if ($Code_user->id > 0) { 409 if ($Code_user->id > 0) {
402 $Employer = new Employer(); 410 $Employer = new Employer();
403 $Employer->user_id = $Code_user->id; 411 $Employer->user_id = $Code_user->id;
404 $Employer->name_company = $data['name_company']; 412 $Employer->name_company = $data['name_company'];
405 $Employer->email = $data['email']; 413 $Employer->email = $data['email'];
406 $Employer->telephone = $data['telephone']; 414 $Employer->telephone = $data['telephone'];
407 $Employer->code = Tools::generator_id(10); 415 $Employer->code = Tools::generator_id(10);
408 $Employer->save(); 416 $Employer->save();
409 417
410 return $Code_user; 418 return $Code_user;
411 } 419 }
412 } 420 }
413 421
414 // Отправка сообщения от работодателя 422 // Отправка сообщения от работодателя
415 public function send_message(MessagesRequiest $request) { 423 public function send_message(MessagesRequiest $request) {
416 $params = $request->all(); 424 $params = $request->all();
417 dd($params); 425 dd($params);
418 $user1 = $params['user_id']; 426 $user1 = $params['user_id'];
419 $user2 = $params['to_user_id']; 427 $user2 = $params['to_user_id'];
420 428
421 if ($request->has('file')) { 429 if ($request->has('file')) {
422 $params['file'] = $request->file('file')->store("messages", 'public'); 430 $params['file'] = $request->file('file')->store("messages", 'public');
423 } 431 }
424 Message::create($params); 432 Message::create($params);
425 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 433 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
426 } 434 }
427 435
428 public function test123(Request $request) { 436 public function test123(Request $request) {
429 $params = $request->all(); 437 $params = $request->all();
430 $user1 = $params['user_id']; 438 $user1 = $params['user_id'];
431 $user2 = $params['to_user_id']; 439 $user2 = $params['to_user_id'];
432 440
433 $rules = [ 441 $rules = [
434 'text' => 'required|min:1|max:150000', 442 'text' => 'required|min:1|max:150000',
435 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' 443 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000'
436 ]; 444 ];
437 $messages = [ 445 $messages = [
438 'required' => 'Укажите обязательное поле', 446 'required' => 'Укажите обязательное поле',
439 'min' => [ 447 'min' => [
440 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 448 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
441 'integer' => 'Поле «:attribute» должно быть :min или больше', 449 'integer' => 'Поле «:attribute» должно быть :min или больше',
442 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 450 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
443 ], 451 ],
444 'max' => [ 452 'max' => [
445 'string' => 'Поле «:attribute» должно быть не больше :max символов', 453 'string' => 'Поле «:attribute» должно быть не больше :max символов',
446 'integer' => 'Поле «:attribute» должно быть :max или меньше', 454 'integer' => 'Поле «:attribute» должно быть :max или меньше',
447 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 455 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
448 ] 456 ]
449 ]; 457 ];
450 458
451 $validator = Validator::make($request->all(), $rules, $messages); 459 $validator = Validator::make($request->all(), $rules, $messages);
452 460
453 if ($validator->fails()) { 461 if ($validator->fails()) {
454 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) 462 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2])
455 ->withErrors($validator); 463 ->withErrors($validator);
456 } else { 464 } else {
457 if ($request->has('file')) { 465 if ($request->has('file')) {
458 $params['file'] = $request->file('file')->store("messages", 'public'); 466 $params['file'] = $request->file('file')->store("messages", 'public');
459 } 467 }
460 Message::create($params); 468 Message::create($params);
461 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 469 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
462 470
463 } 471 }
464 } 472 }
465 473
466 //Избранные люди 474 //Избранные люди
467 public function favorites(Request $request) { 475 public function favorites(Request $request) {
468 $IP_address = RusDate::ip_addr_client(); 476 $IP_address = RusDate::ip_addr_client();
469 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 477 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
470 478
471 if ($Arr->count()) { 479 if ($Arr->count()) {
472 $A = Array(); 480 $A = Array();
473 foreach ($Arr as $it) { 481 foreach ($Arr as $it) {
474 $A[] = $it->code_record; 482 $A[] = $it->code_record;
475 } 483 }
476 484
477 $Workers = Worker::query()->whereIn('id', $A); 485 $Workers = Worker::query()->whereIn('id', $A);
478 } else { 486 } else {
479 $Workers = Worker::query()->where('id', '=', '0'); 487 $Workers = Worker::query()->where('id', '=', '0');
480 } 488 }
481 489
482 if (($request->has('search')) && (!empty($request->get('search')))) { 490 if (($request->has('search')) && (!empty($request->get('search')))) {
483 $search = $request->get('search'); 491 $search = $request->get('search');
484 492
485 $Workers = $Workers->WhereHas('users', 493 $Workers = $Workers->WhereHas('users',
486 function (Builder $query) use ($search) { 494 function (Builder $query) use ($search) {
487 $query->Where('surname', 'LIKE', "%$search%") 495 $query->Where('surname', 'LIKE', "%$search%")
488 ->orWhere('name_man', 'LIKE', "%$search%") 496 ->orWhere('name_man', 'LIKE', "%$search%")
489 ->orWhere('surname2', 'LIKE', "%$search%"); 497 ->orWhere('surname2', 'LIKE', "%$search%");
490 }); 498 });
491 } else { 499 } else {
492 $Workers = $Workers->with('users'); 500 $Workers = $Workers->with('users');
493 } 501 }
494 502
495 $Workers = $Workers->get(); 503 $Workers = $Workers->get();
496 return view('employers.favorite', compact('Workers')); 504 return view('employers.favorite', compact('Workers'));
497 } 505 }
498 506
499 // База данных 507 // База данных
500 public function bd(Request $request) { 508 public function bd(Request $request) {
501 // для типа BelongsTo 509 // для типа BelongsTo
502 //$documents = Document::query()->orderBy(Location::select('name') 510 //$documents = Document::query()->orderBy(Location::select('name')
503 // ->whereColumn('locations.id', 'documents.location_id') 511 // ->whereColumn('locations.id', 'documents.location_id')
504 //); 512 //);
505 513
506 // для типа HasOne/Many 514 // для типа HasOne/Many
507 // $documents = Document::::query()->orderBy(Location::select('name') 515 // $documents = Document::::query()->orderBy(Location::select('name')
508 // ->whereColumn('locations.document_id', 'documents.id') 516 // ->whereColumn('locations.document_id', 'documents.id')
509 //); 517 //);
510 518
519
511 $users = User_Model::query()->with('workers'); 520 $users = User_Model::query()->with('workers');
512 if (isset($request->find)) { 521
513 $find_key = $request->find; 522 if ($request->has('search')) {
523 $find_key = $request->get('search');
514 $users = $users->where('name', 'LIKE', "%$find_key%") 524 $users = $users->where('name', 'LIKE', "%$find_key%")
525 ->orWhere('surname', 'LIKE', "%$find_key%")
526 ->orWhere('name_man', 'LIKE', "%$find_key%")
515 ->orWhere('email', 'LIKE', "%$find_key%") 527 ->orWhere('email', 'LIKE', "%$find_key%")
516 ->orWhere('telephone', 'LIKE', "%$find_key%"); 528 ->orWhere('telephone', 'LIKE', "%$find_key%");
517 } 529 }
518 530
519 // Данные 531 // Данные
520 $users = $users->Baseuser()-> 532 $users = $users->Baseuser()->
521 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> 533 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))->
522 paginate(5); 534 paginate(5);
523 535
536
524 return view('employers.bd', compact('users')); 537 return view('employers.bd', compact('users'));
525 } 538 }
526 539
527 //Настройка уведомлений 540 //Настройка уведомлений
528 public function subscribe() { 541 public function subscribe() {
529 return view('employers.subcribe'); 542 return view('employers.subcribe');
530 } 543 }
531 544
532 //Установка уведомлений сохранение 545 //Установка уведомлений сохранение
533 public function save_subscribe(Request $request) { 546 public function save_subscribe(Request $request) {
534 dd($request->all()); 547 dd($request->all());
535 $msg = $request->validate([ 548 $msg = $request->validate([
536 'subscribe_email' => 'required|email|min:5|max:255', 549 'subscribe_email' => 'required|email|min:5|max:255',
537 ]); 550 ]);
538 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); 551 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку');
539 } 552 }
540 553
541 //Сбросить форму с паролем 554 //Сбросить форму с паролем
542 public function password_reset() { 555 public function password_reset() {
543 $email = Auth()->user()->email; 556 $email = Auth()->user()->email;
544 return view('employers.password-reset', compact('email')); 557 return view('employers.password-reset', compact('email'));
545 } 558 }
546 559
547 //Обновление пароля 560 //Обновление пароля
548 public function new_password(Request $request) { 561 public function new_password(Request $request) {
549 $use = Auth()->user(); 562 $use = Auth()->user();
550 $request->validate([ 563 $request->validate([
551 'password' => 'required|string', 564 'password' => 'required|string',
552 'new_password' => 'required|string', 565 'new_password' => 'required|string',
553 'new_password2' => 'required|string' 566 'new_password2' => 'required|string'
554 ]); 567 ]);
555 568
556 if ($request->get('new_password') == $request->get('new_password2')) 569 if ($request->get('new_password') == $request->get('new_password2'))
557 if ($request->get('password') !== $request->get('new_password')) { 570 if ($request->get('password') !== $request->get('new_password')) {
558 $credentials = $request->only('email', 'password'); 571 $credentials = $request->only('email', 'password');
559 if (Auth::attempt($credentials)) { 572 if (Auth::attempt($credentials)) {
560 573
561 if (!is_null($use->email_verified_at)){ 574 if (!is_null($use->email_verified_at)){
562 575
563 $user_data = User_Model::find($use->id); 576 $user_data = User_Model::find($use->id);
564 $user_data->update([ 577 $user_data->update([
565 'password' => Hash::make($request->get('new_password')), 578 'password' => Hash::make($request->get('new_password')),
566 'pubpassword' => base64_encode($request->get('new_password')), 579 'pubpassword' => base64_encode($request->get('new_password')),
567 ]); 580 ]);
568 return redirect() 581 return redirect()
569 ->route('employer.password_reset') 582 ->route('employer.password_reset')
570 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 583 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
571 } 584 }
572 585
573 return redirect() 586 return redirect()
574 ->route('employer.password_reset') 587 ->route('employer.password_reset')
575 ->withError('Данная учетная запись не было верифицированна!'); 588 ->withError('Данная учетная запись не было верифицированна!');
576 } 589 }
577 } 590 }
578 591
579 return redirect() 592 return redirect()
580 ->route('employer.password_reset') 593 ->route('employer.password_reset')
581 ->withErrors('Не совпадение данных, обновите пароли!'); 594 ->withErrors('Не совпадение данных, обновите пароли!');
582 } 595 }
583 596
584 597
585 598
586 // Форма Удаление пипла 599 // Форма Удаление пипла
587 public function delete_people() { 600 public function delete_people() {
588 $login = Auth()->user()->email; 601 $login = Auth()->user()->email;
589 return view('employers.delete_people', compact('login')); 602 return view('employers.delete_people', compact('login'));
590 } 603 }
591 604
592 // Удаление аккаунта 605 // Удаление аккаунта
593 public function action_delete_user(Request $request) { 606 public function action_delete_user(Request $request) {
594 $Answer = $request->all(); 607 $Answer = $request->all();
595 $user_id = Auth()->user()->id; 608 $user_id = Auth()->user()->id;
596 $request->validate([ 609 $request->validate([
597 'password' => 'required|string', 610 'password' => 'required|string',
598 ]); 611 ]);
599 612
600 $credentials = $request->only('email', 'password'); 613 $credentials = $request->only('email', 'password');
601 if (Auth::attempt($credentials)) { 614 if (Auth::attempt($credentials)) {
602 Auth::logout(); 615 Auth::logout();
603 $it = User_Model::find($user_id); 616 $it = User_Model::find($user_id);
604 $it->delete(); 617 $it->delete();
605 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 618 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
606 } else { 619 } else {
607 return redirect()->route('employer.delete_people') 620 return redirect()->route('employer.delete_people')
608 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 621 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
609 } 622 }
610 } 623 }
611 624
612 public function ajax_delete_user(Request $request) { 625 public function ajax_delete_user(Request $request) {
613 $Answer = $request->all(); 626 $Answer = $request->all();
614 $user_id = Auth()->user()->id; 627 $user_id = Auth()->user()->id;
615 $request->validate([ 628 $request->validate([
616 'password' => 'required|string', 629 'password' => 'required|string',
617 ]); 630 ]);
618 $credentials = $request->only('email', 'password'); 631 $credentials = $request->only('email', 'password');
619 if (Auth::attempt($credentials)) { 632 if (Auth::attempt($credentials)) {
620 633
621 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', 634 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт',
622 'email' => $request->get('email'), 635 'email' => $request->get('email'),
623 'password' => $request->get('password'))); 636 'password' => $request->get('password')));
624 } else { 637 } else {
625 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); 638 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль'));
626 } 639 }
627 } 640 }
628 641
629 642
630 // FAQ - Вопросы/ответы для работодателей и соискателей 643 // FAQ - Вопросы/ответы для работодателей и соискателей
631 public function faq() { 644 public function faq() {
632 return view('employers.faq'); 645 return view('employers.faq');
633 } 646 }
634 647
635 // Рассылка сообщений 648 // Рассылка сообщений
636 public function send_all_messages() { 649 public function send_all_messages() {
637 return view('employers.send_all'); 650 return view('employers.send_all');
638 } 651 }
639 652
640 // Отправка сообщений для информации 653 // Отправка сообщений для информации
641 public function send_all_post(Request $request) { 654 public function send_all_post(Request $request) {
642 $data = $request->all(); 655 $data = $request->all();
643 656
644 $emails = User_Model::query()->where('is_worker', '1')->get(); 657 $emails = User_Model::query()->where('is_worker', '1')->get();
645 658
646 foreach ($emails as $e) { 659 foreach ($emails as $e) {
647 Mail::to($e->email)->send(new SendAllMessages($data)); 660 Mail::to($e->email)->send(new SendAllMessages($data));
648 } 661 }
649 662
650 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); 663 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены');
651 } 664 }
652 665
653 // База резюме 666 // База резюме
654 public function bd_tupe(Request $request) { 667 public function bd_tupe(Request $request) {
655 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); 668 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get();
656 669
657 return view('employers.bd_tupe', compact('Resume')); 670 return view('employers.bd_tupe', compact('Resume'));
658 } 671 }
659 672
660 ////////////////////////////////////////////////////////////////// 673 //////////////////////////////////////////////////////////////////
661 // 674 //
662 // 675 //
663 // Отправил сообщение 676 // Отправил сообщение
664 // 677 //
665 // 678 //
666 // 679 //
667 // 680 //
668 ////////////////////////////////////////////////////////////////// 681 //////////////////////////////////////////////////////////////////
669 public function new_message(Request $request) { 682 public function new_message(Request $request) {
670 $params = $request->all(); 683 $params = $request->all();
671 684
672 $id = $params['_user_id']; 685 $id = $params['_user_id'];
673 $message = new Message(); 686 $message = new Message();
674 $message->user_id = $params['_user_id']; 687 $message->user_id = $params['_user_id'];
675 $message->to_user_id = $params['_to_user_id']; 688 $message->to_user_id = $params['_to_user_id'];
676 $message->title = $params['title']; 689 $message->title = $params['title'];
677 $message->text = $params['text']; 690 $message->text = $params['text'];
678 if ($request->has('_file')) { 691 if ($request->has('_file')) {
679 $message->file = $request->file('_file')->store("worker/$id", 'public'); 692 $message->file = $request->file('_file')->store("worker/$id", 'public');
680 } 693 }
681 $message->flag_new = 1; 694 $message->flag_new = 1;
682 $id_message = $message->save(); 695 $id_message = $message->save();
683 696
684 $data['message_id'] = $id_message; 697 $data['message_id'] = $id_message;
685 $data['ad_employer_id'] = $params['_vacancy']; 698 $data['ad_employer_id'] = $params['_vacancy'];
686 $data['job_title_id'] = 0; 699 $data['job_title_id'] = 0;
687 700
688 $data['flag'] = 1; 701 $data['flag'] = 1;
689 $ad_responce = ad_response::create($data); 702 $ad_responce = ad_response::create($data);
690 return redirect()->route('employer.messages', ['type_message' => 'output']); 703 return redirect()->route('employer.messages', ['type_message' => 'output']);
691 } 704 }
692 705
693 // Восстановление пароля 706 // Восстановление пароля
694 public function repair_password(Request $request) { 707 public function repair_password(Request $request) {
695 $params = $request->get('email'); 708 $params = $request->get('email');
696 } 709 }
697 710
698 // Избранные люди на корабль 711 // Избранные люди на корабль
699 public function selected_people(Request $request) { 712 public function selected_people(Request $request) {
700 $id = $request->get('id'); 713 $id = $request->get('id');
701 $favorite_people = Job_title::query()->where('position_id', $id)->get(); 714 $favorite_people = Job_title::query()->where('position_id', $id)->get();
702 715
703 return view('favorite_people', compact('favorite_people')); 716 return view('favorite_people', compact('favorite_people'));
704 } 717 }
705 } 718 }
706 719
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\Classes\RusDate; 5 use App\Classes\RusDate;
6 use App\Classes\Tools; 6 use App\Classes\Tools;
7 use App\Mail\MailRegistration; 7 use App\Mail\MailRegistration;
8 use App\Mail\MailRepair; 8 use App\Mail\MailRepair;
9 use App\Models\Ad_employer; 9 use App\Models\Ad_employer;
10 use App\Models\Ad_jobs; 10 use App\Models\Ad_jobs;
11 use App\Models\Category; 11 use App\Models\Category;
12 use App\Models\Education; 12 use App\Models\Education;
13 use App\Models\Employer; 13 use App\Models\Employer;
14 use App\Models\employers_main; 14 use App\Models\employers_main;
15 use App\Models\Job_title; 15 use App\Models\Job_title;
16 use App\Models\Like_vacancy; 16 use App\Models\Like_vacancy;
17 use App\Models\Like_worker; 17 use App\Models\Like_worker;
18 use App\Models\News; 18 use App\Models\News;
19 use App\Models\Positions; 19 use App\Models\Positions;
20 use App\Models\reclame; 20 use App\Models\reclame;
21 use App\Models\User; 21 use App\Models\User;
22 use Illuminate\Http\Request; 22 use Illuminate\Http\Request;
23 use Illuminate\Support\Facades\Auth; 23 use Illuminate\Support\Facades\Auth;
24 use Illuminate\Support\Facades\DB; 24 use Illuminate\Support\Facades\DB;
25 use Illuminate\Support\Facades\Hash; 25 use Illuminate\Support\Facades\Hash;
26 use Illuminate\Support\Facades\Mail; 26 use Illuminate\Support\Facades\Mail;
27 use Illuminate\Support\Facades\Validator; 27 use Illuminate\Support\Facades\Validator;
28 use App\Classes\StatusUser; 28 use App\Classes\StatusUser;
29 29
30 class MainController extends Controller 30 class MainController extends Controller
31 { 31 {
32 // Главная страница публичной части 32 // Главная страница публичной части
33 public function index() { 33 public function index() {
34 $news = News::query()->orderBy('id')->limit(6)->get(); 34 $news = News::query()->orderBy('id')->limit(6)->get();
35 35
36 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') 36 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*')
37 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') 37 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id')
38 ->OrderByDesc('created_at') 38 ->OrderByDesc('created_at')
39 ->GroupBy('categories.id') 39 ->GroupBy('categories.id')
40 ->get(); 40 ->get();
41 41
42 $Position = Category::query()->where('is_remove', '=', '0')->get(); 42 $Position = Category::query()->where('is_remove', '=', '0')->get();
43 43
44 /*$BigFlot = Array(); 44 /*$BigFlot = Array();
45 foreach ($Position as $position) { 45 foreach ($Position as $position) {
46 $BigFlot[] = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> 46 $BigFlot[] = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')->
47 orderBy('job_titles.sort')-> 47 orderBy('job_titles.sort')->
48 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> 48 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')->
49 where('position_ship', "$position->name")-> 49 where('position_ship', "$position->name")->
50 groupby('job_title_id','position_ship')-> 50 groupby('job_title_id','position_ship')->
51 get(); 51 get();
52 } 52 }
53 53
54 $BigFlot = Array(); 54 $BigFlot = Array();
55 55
56 foreach ($Position as $position) { 56 foreach ($Position as $position) {
57 57
58 $BigFlot[] = Ad_jobs::query()->with(['job_title' => function($query) { 58 $BigFlot[] = Ad_jobs::query()->with(['job_title' => function($query) {
59 $query->OrderBy('sort'); 59 $query->OrderBy('sort');
60 }])->whereHas('job_title', function ($query) use ($position) { 60 }])->whereHas('job_title', function ($query) use ($position) {
61 $query->where('position_id', $position->id); 61 $query->where('position_id', $position->id);
62 })-> 62 })->
63 distinct('job_title_id')-> 63 distinct('job_title_id')->
64 get(); 64 get();
65 }*/ 65 }*/
66 66
67 $BigFlot = Array(); 67 $BigFlot = Array();
68 foreach ($Position as $position) { 68 foreach ($Position as $position) {
69 $BigFlot[] = DB::table('ad_jobs')-> 69 $BigFlot[] = DB::table('ad_jobs')->
70 selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')-> 70 selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')->
71 orderByDesc('job_titles.sort')-> 71 orderByDesc('job_titles.sort')->
72 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> 72 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')->
73 where('job_titles.position_id', $position->id)-> 73 where('job_titles.position_id', $position->id)->
74 groupby('job_title_id')-> 74 groupby('job_title_id')->
75 get(); 75 get();
76 } 76 }
77 77
78 $employers = employers_main::query()->with('employer')->orderBy('id')->limit(8)->get(); 78 $employers = employers_main::query()->with('employer')->orderBy('id')->limit(8)->get();
79 $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get(); 79 $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get();
80 return view('index', compact('news', 'categories', 'employers', 'vacancy', 'BigFlot', 'Position')); 80 return view('index', compact('news', 'categories', 'employers', 'vacancy', 'BigFlot', 'Position'));
81 } 81 }
82 82
83 public function search_vacancies(Request $request) { 83 public function search_vacancies(Request $request) {
84 if ($request->has('search')) { 84 if ($request->has('search')) {
85 $search = $request->get('search'); 85 $search = $request->get('search');
86 $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); 86 $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first();
87 if (isset($job_titles->id)) 87 if (isset($job_titles->id))
88 if ($job_titles->id > 0) 88 if ($job_titles->id > 0)
89 return redirect()->route('vacancies', ['job' => $job_titles->id]); 89 return redirect()->route('vacancies', ['job' => $job_titles->id]);
90 } 90 }
91 } 91 }
92 92
93 // Лайк вакансии 93 // Лайк вакансии
94 public function like_vacancy(Request $request) { 94 public function like_vacancy(Request $request) {
95 $IP_address = RusDate::ip_addr_client(); 95 $IP_address = RusDate::ip_addr_client();
96 96
97 if ($request->has('code_record')) { 97 if ($request->has('code_record')) {
98 if ($request->has('delete')) { 98 if ($request->has('delete')) {
99 $atomic_era = Like_vacancy::select('id')-> 99 $atomic_era = Like_vacancy::select('id')->
100 where('code_record', '=', $request-> 100 where('code_record', '=', $request->
101 get('code_record'))->first(); 101 get('code_record'))->first();
102 102
103 DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete(); 103 DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete();
104 104
105 } else { 105 } else {
106 $params = $request->all(); 106 $params = $request->all();
107 $params['ip_address'] = $IP_address; 107 $params['ip_address'] = $IP_address;
108 Like_vacancy::create($params); 108 Like_vacancy::create($params);
109 } 109 }
110 } 110 }
111 } 111 }
112 112
113 // Лайк соискателю. 113 // Лайк соискателю.
114 public function like_worker(Request $request) { 114 public function like_worker(Request $request) {
115 $IP_address = RusDate::ip_addr_client(); 115 $IP_address = RusDate::ip_addr_client();
116 116
117 if ($request->has('code_record')) { 117 if ($request->has('code_record')) {
118 if ($request->has('delete')) { 118 if ($request->has('delete')) {
119 $atomic_era = Like_worker::select('id')-> 119 $atomic_era = Like_worker::select('id')->
120 where('code_record', '=', $request-> 120 where('code_record', '=', $request->
121 get('code_record'))->first(); 121 get('code_record'))->first();
122 122
123 DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete(); 123 DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete();
124 124
125 return "Вот и результат удаления!"; 125 return "Вот и результат удаления!";
126 126
127 } else { 127 } else {
128 $params = $request->all(); 128 $params = $request->all();
129 $params['ip_address'] = $IP_address; 129 $params['ip_address'] = $IP_address;
130 Like_worker::create($params); 130 Like_worker::create($params);
131 } 131 }
132 } 132 }
133 } 133 }
134 134
135 135
136 public function vacancies(Request $request) { 136 public function vacancies(Request $request) {
137 //должности 137 //должности
138 $Job_title = Job_title::query()->orderBy('name')->get(); 138 $Job_title = Job_title::query()->orderBy('name')->get();
139 139
140 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') 140 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*')
141 ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') 141 ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary')
142 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') 142 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id')
143 ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); 143 ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id');
144 144
145 //категории и вакансии 145 //категории и вакансии
146 if (($request->has('job')) && ($request->get('job') > 0)) { 146 if (($request->has('job')) && ($request->get('job') > 0)) {
147 $categories = $categories->Where('job_title_id', '=', $request->get('job')); 147 $categories = $categories->Where('job_title_id', '=', $request->get('job'));
148 } 148 }
149 149
150 $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); 150 $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get();
151 151
152 $Position = Category::query()->where('is_remove', '=', '0')->get(); 152 $Position = Category::query()->where('is_remove', '=', '0')->get();
153 153
154 /*$BigFlot = Array(); 154 /*$BigFlot = Array();
155 foreach ($Position as $position) { 155 foreach ($Position as $position) {
156 $War_flot = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> 156 $War_flot = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')->
157 orderBy('job_titles.sort')-> 157 orderBy('job_titles.sort')->
158 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> 158 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')->
159 where('position_ship', "$position->name"); 159 where('position_ship', "$position->name");
160 if (($request->has('job')) && ($request->get('job') > 0)) { 160 if (($request->has('job')) && ($request->get('job') > 0)) {
161 $War_flot = $War_flot->where('job_title_id', $request->get('job')); 161 $War_flot = $War_flot->where('job_title_id', $request->get('job'));
162 } 162 }
163 $War_flot = $War_flot->groupby('job_title_id','position_ship')->get(); 163 $War_flot = $War_flot->groupby('job_title_id','position_ship')->get();
164 $BigFlot[] = $War_flot; 164 $BigFlot[] = $War_flot;
165 }*/ 165 }*/
166 166
167 $BigFlot = Array(); 167 $BigFlot = Array();
168 foreach ($Position as $position) { 168 foreach ($Position as $position) {
169 $WarFlot = DB::table('ad_jobs')-> 169 $WarFlot = DB::table('ad_jobs')->
170 selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')-> 170 selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')->
171 orderByDesc('job_titles.sort')-> 171 orderByDesc('job_titles.sort')->
172 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> 172 join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')->
173 where('job_titles.position_id', $position->id); 173 where('job_titles.position_id', $position->id);
174 if (($request->has('job')) && ($request->get('job') > 0)) { 174 if (($request->has('job')) && ($request->get('job') > 0)) {
175 $WarFlot = $WarFlot->where('job_title_id', $request->get('job')); 175 $WarFlot = $WarFlot->where('job_title_id', $request->get('job'));
176 } 176 }
177 $WarFlot = $WarFlot->groupby('job_title_id')->get(); 177 $WarFlot = $WarFlot->groupby('job_title_id')->get();
178 $BigFlot[] = $WarFlot; 178 $BigFlot[] = $WarFlot;
179 } 179 }
180 180
181 if ($request->ajax()) { 181 if ($request->ajax()) {
182 return view('ajax.new_sky', compact('categories', 'BigFlot', 'Position')); 182 return view('ajax.new_sky', compact('categories', 'BigFlot', 'Position'));
183 } else { 183 } else {
184 return view('new_sky', compact('Job_title', 'categories', 'BigFlot', 'Position')); 184 return view('new_sky', compact('Job_title', 'categories', 'BigFlot', 'Position'));
185 } 185 }
186 } 186 }
187 187
188 //Вакансии категория детальная 188 //Вакансии категория детальная
189 public function list_vacancies(Category $categories, Request $request) { 189 public function list_vacancies(Category $categories, Request $request) {
190 if (isset(Auth()->user()->id)) 190 if (isset(Auth()->user()->id))
191 $uid = Auth()->user()->id; 191 $uid = Auth()->user()->id;
192 else 192 else
193 $uid = 0; 193 $uid = 0;
194 194
195 if ($request->get('job') == 0)
196 $job_search = '';
197 else
198 $job_search = $request->get('job');
199
195 $Query = Ad_employer::with('jobs')-> 200 $Query = Ad_employer::with('jobs')->
196 with('cat')-> 201 with('cat')->
197 with('employer')-> 202 with('employer')->
198 whereHas('jobs_code', function ($query) use ($request) {
199 if (null !== ($request->get('job')) && ($request->get('job') !== 0)) {
200 $query->where('job_title_id', $request->get('job'));
201 }
202 })
203 ->select('ad_employers.*');
204 203
204 whereHas('jobs_code', function ($query) use ($job_search) {
205 if (!empty($job_search)) {
206 $query->where('job_title_id', $job_search);
207 }
208 })->select('ad_employers.*');
205 209
206 if (isset($categories->id) && ($categories->id > 0)) { 210 if (isset($categories->id) && ($categories->id > 0)) {
207 $Query = $Query->where('category_id', '=', $categories->id); 211 $Query = $Query->where('category_id', '=', $categories->id);
208 $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); 212 $Name_categori = Category::query()->where('id', '=', $categories->id)->get();
209 } else { 213 } else {
210 $Name_categori = ''; 214 $Name_categori = '';
211 } 215 }
212 216
213 if ($request->get('sort')) { 217 if ($request->get('sort')) {
214 $sort = $request->get('sort'); 218 $sort = $request->get('sort');
215
216
217 switch ($sort) { 219 switch ($sort) {
218 case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; 220 case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break;
219 case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; 221 case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break;
220 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; 222 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break;
221 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; 223 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break;
222 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; 224 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break;
223 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; 225 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break;
224 } 226 }
225 } 227 }
226 228
227 $Job_title = Job_title::query()->OrderBy('name')->get(); 229 $Job_title = Job_title::query()->OrderBy('name')->get();
228 230
229 $Query_count = $Query->count(); 231 $Query_count = $Query->count();
230 232
231 $Query = $Query->OrderBy('updated_at')->paginate(3); 233 $Query = $Query->OrderBy('updated_at')->paginate(3);
232 234
233 $Reclama = reclame::query()->get(); 235 $Reclama = reclame::query()->get();
234 236
235
236
237 if ($request->ajax()) { 237 if ($request->ajax()) {
238 if ($request->has('title')) { 238 if ($request->has('title')) {
239 return view('ajax.list_category', compact( 239 return view('ajax.list_category', compact(
240 'Name_categori' 240 'Name_categori'
241 )); 241 ));
242 } else { 242 } else {
243 return view('ajax.list_vacancies', compact('Query', 243 return view('ajax.list_vacancies', compact('Query',
244 'Query_count', 244 'Query_count',
245 'Name_categori', 245 'Name_categori',
246 'Reclama', 246 'Reclama',
247 'categories', 247 'categories',
248 'Job_title', 248 'Job_title',
249 'uid')); 249 'uid'));
250 } 250 }
251 } else { 251 } else {
252 //Вернуть все 252 //Вернуть все
253 return view('list_vacancies', compact('Query', 253 return view('list_vacancies', compact('Query',
254 'Query_count', 254 'Query_count',
255 'Reclama', 255 'Reclama',
256 'Name_categori', 256 'Name_categori',
257 'categories', 257 'categories',
258 'Job_title', 258 'Job_title',
259 'uid')); 259 'uid'));
260 } 260 }
261 } 261 }
262 262
263 // Образование 263 // Образование
264 public function education(Request $request) { 264 public function education(Request $request) {
265 $educations = Education::query(); 265 $educations = Education::query();
266 if (($request->has('search')) && (!empty($request->get('search')))) { 266 if (($request->has('search')) && (!empty($request->get('search')))) {
267 $search = trim($request->get('search')); 267 $search = trim($request->get('search'));
268 $educations = $educations->where('name', 'LIKE', "%$search%"); 268 $educations = $educations->where('name', 'LIKE', "%$search%");
269 } 269 }
270 270
271 if ($request->get('sort')) { 271 if ($request->get('sort')) {
272 $sort = $request->get('sort'); 272 $sort = $request->get('sort');
273 switch ($sort) { 273 switch ($sort) {
274 case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break; 274 case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break;
275 case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break; 275 case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break;
276 case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break; 276 case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break;
277 case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break; 277 case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break;
278 case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break; 278 case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break;
279 default: $educations = $educations->orderBy('id')->orderby('updated_at'); break; 279 default: $educations = $educations->orderBy('id')->orderby('updated_at'); break;
280 } 280 }
281 } 281 }
282 282
283 $count_edu = $educations->count(); 283 $count_edu = $educations->count();
284 $educations = $educations->paginate(6); 284 $educations = $educations->paginate(6);
285 if ($request->ajax()) { 285 if ($request->ajax()) {
286 return view('ajax.education', compact('educations')); 286 return view('ajax.education', compact('educations'));
287 } else { 287 } else {
288 return view('education', compact('educations', 'count_edu')); 288 return view('education', compact('educations', 'count_edu'));
289 } 289 }
290 } 290 }
291 291
292 // Контакты 292 // Контакты
293 public function contacts() { 293 public function contacts() {
294 return view('contacts'); 294 return view('contacts');
295 } 295 }
296 296
297 // Вход в личный кабинет 297 // Вход в личный кабинет
298 public function input_login(Request $request) 298 public function input_login(Request $request)
299 { 299 {
300 $params = $request->all(); 300 $params = $request->all();
301 301
302 302
303 $rules = [ 303 $rules = [
304 'email' => 'required|string|email', 304 'email' => 'required|string|email',
305 'password' => 'required|string|min:3|max:25', 305 'password' => 'required|string|min:3|max:25',
306 ]; 306 ];
307 307
308 $messages = [ 308 $messages = [
309 'required' => 'Укажите обязательное поле «:attribute»', 309 'required' => 'Укажите обязательное поле «:attribute»',
310 'email' => 'Введите корректный email', 310 'email' => 'Введите корректный email',
311 'min' => [ 311 'min' => [
312 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 312 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
313 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 313 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
314 ], 314 ],
315 'max' => [ 315 'max' => [
316 'string' => 'Поле «:attribute» должно быть не больше :max символов', 316 'string' => 'Поле «:attribute» должно быть не больше :max символов',
317 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 317 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
318 ], 318 ],
319 ]; 319 ];
320 320
321 $validator = Validator::make($request->all(), $rules, $messages); 321 $validator = Validator::make($request->all(), $rules, $messages);
322 322
323 323
324 if ($validator->fails()) { 324 if ($validator->fails()) {
325 return redirect()->route('index')->with('Error', "Email или пароль невалидный"); 325 return redirect()->route('index')->with('Error', "Email или пароль невалидный");
326 } else { 326 } else {
327 $credentials = $request->only('email', 'password'); 327 $credentials = $request->only('email', 'password');
328 328
329 if (Auth::attempt($credentials, $request->has('remember'))) { 329 if (Auth::attempt($credentials, $request->has('remember'))) {
330 330
331 if (is_null(Auth::user()->email_verified_at)) { 331 if (is_null(Auth::user()->email_verified_at)) {
332 Auth::logout(); 332 Auth::logout();
333 return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); 333 return json_encode(Array("ERROR" => "Адрес почты не подтвержден"));
334 } 334 }
335 335
336 if (Auth::user()->is_worker) { 336 if (Auth::user()->is_worker) {
337 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); 337 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));
338 } else { 338 } else {
339 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); 339 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));
340 } 340 }
341 341
342 return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); 342 return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет"));
343 //->route('index') 343 //->route('index')
344 //->with('success', 'Вы вошли в личный кабинет.'); 344 //->with('success', 'Вы вошли в личный кабинет.');
345 } else { 345 } else {
346 return json_encode(Array("ERROR" => "Неверный логин или пароль!")); 346 return json_encode(Array("ERROR" => "Неверный логин или пароль!"));
347 } 347 }
348 } 348 }
349 } 349 }
350 350
351 // Восстановление пароля 351 // Восстановление пароля
352 public function repair_password(Request $request) { 352 public function repair_password(Request $request) {
353 $rules = [ 353 $rules = [
354 'email' => 'required|string|email', 354 'email' => 'required|string|email',
355 ]; 355 ];
356 356
357 $messages = [ 357 $messages = [
358 'required' => 'Укажите обязательное поле «:attribute»', 358 'required' => 'Укажите обязательное поле «:attribute»',
359 'email' => 'Введите корректный email', 359 'email' => 'Введите корректный email',
360 'min' => [ 360 'min' => [
361 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 361 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
362 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 362 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
363 ], 363 ],
364 'max' => [ 364 'max' => [
365 'string' => 'Поле «:attribute» должно быть не больше :max символов', 365 'string' => 'Поле «:attribute» должно быть не больше :max символов',
366 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 366 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
367 ], 367 ],
368 ]; 368 ];
369 369
370 $validator = Validator::make($request->all(), $rules, $messages); 370 $validator = Validator::make($request->all(), $rules, $messages);
371 371
372 if ($validator->fails()) { 372 if ($validator->fails()) {
373 return redirect()->back()->with('Error', "Email невалидный"); 373 return redirect()->back()->with('Error', "Email невалидный");
374 } else { 374 } else {
375 $new_password = Tools::generator_id(10); 375 $new_password = Tools::generator_id(10);
376 $hash_password = Hash::make($new_password); 376 $hash_password = Hash::make($new_password);
377 $user = User::query()->where('email', $request->get('email'))->first(); 377 $user = User::query()->where('email', $request->get('email'))->first();
378 $EditRec = User::find($user->id); 378 $EditRec = User::find($user->id);
379 $EditRec->password = $hash_password; 379 $EditRec->password = $hash_password;
380 $EditRec->save(); 380 $EditRec->save();
381 381
382 foreach ([$request->get('email')] as $recipient) { 382 foreach ([$request->get('email')] as $recipient) {
383 Mail::to($recipient)->send(new MailRepair($new_password)); 383 Mail::to($recipient)->send(new MailRepair($new_password));
384 } 384 }
385 return redirect()->route('index'); 385 return redirect()->route('index');
386 386
387 } 387 }
388 388
389 } 389 }
390 390
391 // Вывод новостей 391 // Вывод новостей
392 public function news(Request $request) { 392 public function news(Request $request) {
393 $Query = News::query(); 393 $Query = News::query();
394 if ($request->has('search')) { 394 if ($request->has('search')) {
395 $search = $request->get('search'); 395 $search = $request->get('search');
396 $Query = $Query->where('title', 'LIKE', "%$search%")-> 396 $Query = $Query->where('title', 'LIKE', "%$search%")->
397 orWhere('text', 'LIKE', "%$search%"); 397 orWhere('text', 'LIKE', "%$search%");
398 } 398 }
399 399
400 if ($request->ajax()) { 400 if ($request->ajax()) {
401 if ($request->get('sort')) { 401 if ($request->get('sort')) {
402 $sort = $request->get('sort'); 402 $sort = $request->get('sort');
403 switch ($sort) { 403 switch ($sort) {
404 case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; 404 case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break;
405 case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; 405 case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break;
406 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; 406 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break;
407 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; 407 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break;
408 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; 408 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break;
409 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; 409 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break;
410 } 410 }
411 } 411 }
412 } 412 }
413 $Query_count = $Query->count(); 413 $Query_count = $Query->count();
414 $Query = $Query->paginate(6); 414 $Query = $Query->paginate(6);
415 415
416 if ($request->ajax()) { 416 if ($request->ajax()) {
417 return view('ajax.news-list', compact('Query', 'Query_count')); 417 return view('ajax.news-list', compact('Query', 'Query_count'));
418 } else { 418 } else {
419 return view('news-list', compact('Query', 'Query_count')); 419 return view('news-list', compact('Query', 'Query_count'));
420 } 420 }
421 } 421 }
422 422
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\Http\Requests\DocumentsRequest;
7 use App\Models\Ad_employer; 7 use App\Models\Ad_employer;
8 use App\Models\ad_response; 8 use App\Models\ad_response;
9 use App\Models\Category; 9 use App\Models\Category;
10 use App\Models\Dop_info; 10 use App\Models\Dop_info;
11 use App\Models\Employer; 11 use App\Models\Employer;
12 use App\Models\infobloks; 12 use App\Models\infobloks;
13 use App\Models\Job_title; 13 use App\Models\Job_title;
14 use App\Models\Like_vacancy; 14 use App\Models\Like_vacancy;
15 use App\Models\Like_worker; 15 use App\Models\Like_worker;
16 use App\Models\Message; 16 use App\Models\Message;
17 use App\Models\place_works; 17 use App\Models\place_works;
18 use App\Models\reclame; 18 use App\Models\reclame;
19 use App\Models\ResponseWork; 19 use App\Models\ResponseWork;
20 use App\Models\sertification; 20 use App\Models\sertification;
21 use App\Models\Static_worker; 21 use App\Models\Static_worker;
22 use App\Models\User; 22 use App\Models\User;
23 use App\Models\User as User_Model; 23 use App\Models\User as User_Model;
24 use App\Models\Worker; 24 use App\Models\Worker;
25 use Barryvdh\DomPDF\Facade\Pdf; 25 use Barryvdh\DomPDF\Facade\Pdf;
26 use Carbon\Carbon; 26 use Carbon\Carbon;
27 use Illuminate\Auth\Events\Registered; 27 use Illuminate\Auth\Events\Registered;
28 use Illuminate\Database\Eloquent\Builder; 28 use Illuminate\Database\Eloquent\Builder;
29 use Illuminate\Database\Eloquent\Model; 29 use Illuminate\Database\Eloquent\Model;
30 use Illuminate\Http\JsonResponse; 30 use Illuminate\Http\JsonResponse;
31 use Illuminate\Http\Request; 31 use Illuminate\Http\Request;
32 use Illuminate\Support\Facades\Auth; 32 use Illuminate\Support\Facades\Auth;
33 use Illuminate\Support\Facades\Hash; 33 use Illuminate\Support\Facades\Hash;
34 use Illuminate\Support\Facades\Storage; 34 use Illuminate\Support\Facades\Storage;
35 use Illuminate\Support\Facades\Validator; 35 use Illuminate\Support\Facades\Validator;
36 36
37 class WorkerController extends Controller 37 class WorkerController extends Controller
38 { 38 {
39 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); 39 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу');
40 40
41 //профиль 41 //профиль
42 public function profile(Worker $worker) 42 public function profile(Worker $worker)
43 { 43 {
44 $get_date = date('Y.m'); 44 $get_date = date('Y.m');
45 45
46 $c = Static_worker::query()->where('year_month', '=', $get_date) 46 $c = Static_worker::query()->where('year_month', '=', $get_date)
47 ->where('user_id', '=', $worker->users->id) 47 ->where('user_id', '=', $worker->users->id)
48 ->get(); 48 ->get();
49 49
50 if ($c->count() > 0) { 50 if ($c->count() > 0) {
51 $upd = Static_worker::find($c[0]->id); 51 $upd = Static_worker::find($c[0]->id);
52 $upd->lookin = $upd->lookin + 1; 52 $upd->lookin = $upd->lookin + 1;
53 $upd->save(); 53 $upd->save();
54 } else { 54 } else {
55 $crt = new Static_worker(); 55 $crt = new Static_worker();
56 $crt->lookin = 1; 56 $crt->lookin = 1;
57 $crt->year_month = $get_date; 57 $crt->year_month = $get_date;
58 $crt->user_id = $worker->user_id; 58 $crt->user_id = $worker->user_id;
59 $crt->save(); 59 $crt->save();
60 } 60 }
61 61
62 $stat = Static_worker::query()->where('year_month', '=', $get_date) 62 $stat = Static_worker::query()->where('year_month', '=', $get_date)
63 ->where('user_id', '=', $worker->users->id) 63 ->where('user_id', '=', $worker->users->id)
64 ->get(); 64 ->get();
65 65
66 return view('public.workers.profile', compact('worker', 'stat')); 66 return view('public.workers.profile', compact('worker', 'stat'));
67 } 67 }
68 68
69 // лист база резюме 69 // лист база резюме
70 public function bd_resume(Request $request) 70 public function bd_resume(Request $request)
71 { 71 {
72 if (isset(Auth()->user()->id)) { 72 if (isset(Auth()->user()->id)) {
73 $idiot = Auth()->user()->id; 73 $idiot = Auth()->user()->id;
74 } else { 74 } else {
75 $idiot = 0; 75 $idiot = 0;
76 } 76 }
77 77
78
79
78 $status_work = $this->status_work; 80 $status_work = $this->status_work;
79 $resumes = Worker::query()->with('users')->with('job_titles'); 81 $resumes = Worker::query()->with('users')->with('job_titles');
80 $resumes = $resumes->whereHas('users', function (Builder $query) { 82 $resumes = $resumes->whereHas('users', function (Builder $query) {
81 $query->Where('is_worker', '=', '1') 83 $query->Where('is_worker', '=', '1')
82 ->Where('is_bd', '=', '0'); 84 ->Where('is_bd', '=', '0');
83 }); 85 });
84 86
87 //dd($request->get('job'));
88 if (($request->has('job')) && ($request->get('job') > 0)) {
89 $resumes = $resumes->whereHas('job_titles', function(Builder $query) use ($request) {
90 $query->Where('job_titles.id', $request->get('job'));
91 });
92 }
93
94 $Job_title = Job_title::query()->get();
95
85 if ($request->get('sort')) { 96 if ($request->get('sort')) {
86 $sort = $request->get('sort'); 97 $sort = $request->get('sort');
87 switch ($sort) { 98 switch ($sort) {
88 case 'name_up': 99 case 'name_up':
89 $resumes = $resumes->orderBy(User::select('surname') 100 $resumes = $resumes->orderBy(User::select('surname')
90 ->whereColumn('Workers.user_id', 'users.id') 101 ->whereColumn('Workers.user_id', 'users.id')
91 ); 102 );
92 break; 103 break;
93 case 'name_down': 104 case 'name_down':
94 $resumes = $resumes->orderByDesc(User::select('surname') 105 $resumes = $resumes->orderByDesc(User::select('surname')
95 ->whereColumn('Workers.user_id', 'users.id') 106 ->whereColumn('Workers.user_id', 'users.id')
96 ); 107 );
97 break; 108 break;
98 case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; 109 case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break;
99 case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; 110 case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break;
100 case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; 111 case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
101 default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; 112 default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
102 } 113 }
103 } 114 }
104 115
105 $res_count = $resumes->count(); 116 $res_count = $resumes->count();
117 //$resumes = $resumes->get();
118
106 $resumes = $resumes->paginate(4); 119 $resumes = $resumes->paginate(4);
107 if ($request->ajax()) { 120 if ($request->ajax()) {
108 // Условия обставлены 121 // Условия обставлены
109 if ($request->has('block') && ($request->get('block') == 1)) { 122 if ($request->has('block') && ($request->get('block') == 1)) {
110 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); 123 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot'));
111 } 124 }
112 125
113 if ($request->has('block') && ($request->get('block') == 2)) { 126 if ($request->has('block') && ($request->get('block') == 2)) {
114 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); 127 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot'));
115 } 128 }
116 } else { 129 } else {
117 return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); 130 return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title'));
118 } 131 }
119 } 132 }
120 133
121 //Лайк резюме 134 //Лайк резюме
122 public function like_controller() { 135 public function like_controller() {
123 136
124 } 137 }
125 138
126 // анкета соискателя 139 // анкета соискателя
127 public function resume_profile(Worker $worker) 140 public function resume_profile(Worker $worker)
128 { 141 {
129 if (isset(Auth()->user()->id)) { 142 if (isset(Auth()->user()->id)) {
130 $idiot = Auth()->user()->id; 143 $idiot = Auth()->user()->id;
131 } else { 144 } else {
132 $idiot = 0; 145 $idiot = 0;
133 } 146 }
134 147
135 $status_work = $this->status_work; 148 $status_work = $this->status_work;
136 $Query = Worker::query()->with('users')->with('job_titles') 149 $Query = Worker::query()->with('users')->with('job_titles')
137 ->with('place_worker')->with('sertificate')->with('prev_company') 150 ->with('place_worker')->with('sertificate')->with('prev_company')
138 ->with('infobloks'); 151 ->with('infobloks');
139 $Query = $Query->where('id', '=', $worker->id); 152 $Query = $Query->where('id', '=', $worker->id);
140 $Query = $Query->get(); 153 $Query = $Query->get();
141 154
142 $get_date = date('Y.m'); 155 $get_date = date('Y.m');
143 $c = Static_worker::query()->where('year_month', '=', $get_date) 156 $c = Static_worker::query()->where('year_month', '=', $get_date)
144 ->where('user_id', '=', $worker->id) 157 ->where('user_id', '=', $worker->id)
145 ->get(); 158 ->get();
146 159
147 if ($c->count() > 0) { 160 if ($c->count() > 0) {
148 $upd = Static_worker::find($c[0]->id); 161 $upd = Static_worker::find($c[0]->id);
149 $upd->lookin = $upd->lookin + 1; 162 $upd->lookin = $upd->lookin + 1;
150 $upd->save(); 163 $upd->save();
151 } else { 164 } else {
152 $crt = new Static_worker(); 165 $crt = new Static_worker();
153 $crt->lookin = 1; 166 $crt->lookin = 1;
154 $crt->year_month = $get_date; 167 $crt->year_month = $get_date;
155 $crt->user_id = $worker->user_id; 168 $crt->user_id = $worker->user_id;
156 $crt->save(); 169 $crt->save();
157 } 170 }
158 171
159 $stat = Static_worker::query()->where('year_month', '=', $get_date) 172 $stat = Static_worker::query()->where('year_month', '=', $get_date)
160 ->where('user_id', '=', $worker->id) 173 ->where('user_id', '=', $worker->id)
161 ->get(); 174 ->get();
162 175
163 return view('worker', compact('Query', 'status_work', 'idiot')); 176 return view('worker', compact('Query', 'status_work', 'idiot'));
164 } 177 }
165 178
166 // скачать анкету соискателя 179 // скачать анкету соискателя
167 public function resume_download(Worker $worker) 180 public function resume_download(Worker $worker)
168 { 181 {
169 $status_work = $this->status_work; 182 $status_work = $this->status_work;
170 $Query = Worker::query()->with('users')->with('job_titles') 183 $Query = Worker::query()->with('users')->with('job_titles')
171 ->with('place_worker')->with('sertificate')->with('prev_company') 184 ->with('place_worker')->with('sertificate')->with('prev_company')
172 ->with('infobloks'); 185 ->with('infobloks');
173 $Query = $Query->where('id', '=', $worker->id); 186 $Query = $Query->where('id', '=', $worker->id);
174 $Query = $Query->get()->toArray(); 187 $Query = $Query->get()->toArray();
175 188
176 view()->share('Query',$Query); 189 view()->share('Query',$Query);
177 190
178 $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); 191 $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape');
179 192
180 return $pdf->stream(); 193 return $pdf->stream();
181 } 194 }
182 195
196 public function resume_download_all() {
197 $status_work = $this->status_work;
198 $Query = Worker::query()->with('users')->with('job_titles')
199 ->with('place_worker')->with('sertificate')->with('prev_company')
200 ->with('infobloks');
201 //$Query = $Query->where('id', '=', $worker->id);
202 $Query = $Query->get()->toArray();
203
204 view()->share('Query',$Query);
205
206 $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape');
207
208 return $pdf->stream();
209 }
210
183 // Кабинет работника 211 // Кабинет работника
184 public function cabinet(Request $request) 212 public function cabinet(Request $request)
185 { 213 {
186 $get_date = date('Y.m'); 214 $get_date = date('Y.m');
187 215
188 $id = Auth()->user()->id; 216 $id = Auth()->user()->id;
189 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> 217 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')->
190 with('infobloks')->with('place_worker')-> 218 with('infobloks')->with('place_worker')->
191 WhereHas('users', 219 WhereHas('users',
192 function (Builder $query) use ($id) {$query->Where('id', $id); 220 function (Builder $query) use ($id) {$query->Where('id', $id);
193 })->get(); 221 })->get();
194 222
195 $Job_titles = Job_title::query()->OrderBy('name')->get(); 223 $Job_titles = Job_title::query()->OrderBy('name')->get();
196 $Infoblocks = infobloks::query()->OrderBy('name')->get(); 224 $Infoblocks = infobloks::query()->OrderBy('name')->get();
197 225
198 $stat = Static_worker::query()->where('year_month', '=', $get_date) 226 $stat = Static_worker::query()->where('year_month', '=', $get_date)
199 ->where('user_id', '=', $Worker[0]->id) 227 ->where('user_id', '=', $Worker[0]->id)
200 ->get(); 228 ->get();
201 229
202 $persent = 10; 230 $persent = 10;
203 if ((!empty($Worker[0]->status_work)) && (!empty($Worker[0]->telephone)) && 231 if ((!empty($Worker[0]->status_work)) && (!empty($Worker[0]->telephone)) &&
204 (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && 232 (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) &&
205 (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { 233 (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) {
206 $persent = $persent + 40; 234 $persent = $persent + 40;
207 } 235 }
208 236
209 if ($Worker[0]->sertificate->count() > 0) { 237 if ($Worker[0]->sertificate->count() > 0) {
210 $persent = $persent + 15; 238 $persent = $persent + 15;
211 } 239 }
212 240
213 if ($Worker[0]->infobloks->count() > 0) { 241 if ($Worker[0]->infobloks->count() > 0) {
214 $persent = $persent + 20; 242 $persent = $persent + 20;
215 } 243 }
216 244
217 if ($Worker[0]->prev_company->count() > 0) { 245 if ($Worker[0]->prev_company->count() > 0) {
218 $persent = $persent + 10; 246 $persent = $persent + 10;
219 } 247 }
220 248
221 if (!empty($Worker[0]->photo)) { 249 if (!empty($Worker[0]->photo)) {
222 // 5% 250 // 5%
223 $persent = $persent + 5; 251 $persent = $persent + 5;
224 } 252 }
225 253
226 if ($request->has('print')) { 254 if ($request->has('print')) {
227 dd($Worker); 255 dd($Worker);
228 } else { 256 } else {
229 return view('workers.cabinet', compact('Worker', 'persent', 'Job_titles', 'Infoblocks', 'stat')); 257 return view('workers.cabinet', compact('Worker', 'persent', 'Job_titles', 'Infoblocks', 'stat'));
230 } 258 }
231 } 259 }
232 260
233 // Сохранение данных 261 // Сохранение данных
234 public function cabinet_save(Worker $worker, Request $request) 262 public function cabinet_save(Worker $worker, Request $request)
235 { 263 {
236 $id = $worker->id; 264 $id = $worker->id;
237 $params = $request->all(); 265 $params = $request->all();
238 266
239 $job_title_id = $request->get('job_title_id'); 267 $job_title_id = $request->get('job_title_id');
240 268
241 unset($params['new_diplom']); 269 unset($params['new_diplom']);
242 unset($params['new_data_begin']); 270 unset($params['new_data_begin']);
243 unset($params['new_data_end']); 271 unset($params['new_data_end']);
244 unset($params['new_job_title']); 272 unset($params['new_job_title']);
245 unset($params['new_teplohod']); 273 unset($params['new_teplohod']);
246 unset($params['new_GWT']); 274 unset($params['new_GWT']);
247 unset($params['new_KBT']); 275 unset($params['new_KBT']);
248 unset($params['new_Begin_work']); 276 unset($params['new_Begin_work']);
249 unset($params['new_End_work']); 277 unset($params['new_End_work']);
250 unset($params['new_name_company']); 278 unset($params['new_name_company']);
251 279
252 $rules = [ 280 $rules = [
253 'surname' => ['required', 'string', 'max:255'], 281 'surname' => ['required', 'string', 'max:255'],
254 'name_man' => ['required', 'string', 'max:255'], 282 'name_man' => ['required', 'string', 'max:255'],
255 'email' => ['required', 'string', 'email', 'max:255'], 283 'email' => ['required', 'string', 'email', 'max:255'],
256 284
257 ]; 285 ];
258 286
259 $messages = [ 287 $messages = [
260 'required' => 'Укажите обязательное поле', 288 'required' => 'Укажите обязательное поле',
261 'min' => [ 289 'min' => [
262 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 290 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
263 'integer' => 'Поле «:attribute» должно быть :min или больше', 291 'integer' => 'Поле «:attribute» должно быть :min или больше',
264 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 292 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
265 ], 293 ],
266 'max' => [ 294 'max' => [
267 'string' => 'Поле «:attribute» должно быть не больше :max символов', 295 'string' => 'Поле «:attribute» должно быть не больше :max символов',
268 'integer' => 'Поле «:attribute» должно быть :max или меньше', 296 'integer' => 'Поле «:attribute» должно быть :max или меньше',
269 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 297 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
270 ] 298 ]
271 ]; 299 ];
272 300
273 $validator = Validator::make($params, $rules, $messages); 301 $validator = Validator::make($params, $rules, $messages);
274 302
275 if ($validator->fails()) { 303 if ($validator->fails()) {
276 return redirect()->route('worker.cabinet')->withErrors($validator); 304 return redirect()->route('worker.cabinet')->withErrors($validator);
277 } else { 305 } else {
278 306
279 if ($request->has('photo')) { 307 if ($request->has('photo')) {
280 if (!empty($Worker->photo)) { 308 if (!empty($Worker->photo)) {
281 Storage::delete($Worker->photo); 309 Storage::delete($Worker->photo);
282 } 310 }
283 $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); 311 $params['photo'] = $request->file('photo')->store("worker/$id", 'public');
284 } 312 }
285 313
286 if ($request->has('file')) { 314 if ($request->has('file')) {
287 if (!empty($Worker->file)) { 315 if (!empty($Worker->file)) {
288 Storage::delete($Worker->file); 316 Storage::delete($Worker->file);
289 } 317 }
290 $params['file'] = $request->file('file')->store("worker/$id", 'public'); 318 $params['file'] = $request->file('file')->store("worker/$id", 'public');
291 } 319 }
292 320
293 $id_wor = $worker->update($params); 321 $id_wor = $worker->update($params);
294 322
295 $use = User_Model::find($id_wor); 323 $use = User_Model::find($id_wor);
296 $use->surname = $request->get('surname'); 324 $use->surname = $request->get('surname');
297 $use->name_man = $request->get('name_man'); 325 $use->name_man = $request->get('name_man');
298 $use->surname2 = $request->get('surname2'); 326 $use->surname2 = $request->get('surname2');
299 327
300 $use->save(); 328 $use->save();
301 $worker->job_titles()->sync($job_title_id); 329 $worker->job_titles()->sync($job_title_id);
302 330
303 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); 331 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены');
304 } 332 }
305 } 333 }
306 334
307 // Сообщения данные 335 // Сообщения данные
308 public function messages($type_message) 336 public function messages($type_message)
309 { 337 {
310 $user_id = Auth()->user()->id; 338 $user_id = Auth()->user()->id;
311 339
312 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 340 $messages_input = Message::query()->with('vacancies')->with('user_from')->
313 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 341 Where('to_user_id', $user_id)->OrderByDesc('created_at');
314 342
315 $messages_output = Message::query()->with('vacancies')-> 343 $messages_output = Message::query()->with('vacancies')->
316 with('user_to')->where('user_id', $user_id)-> 344 with('user_to')->where('user_id', $user_id)->
317 OrderByDesc('created_at'); 345 OrderByDesc('created_at');
318 346
319 347
320 $count_input = $messages_input->count(); 348 $count_input = $messages_input->count();
321 $count_output = $messages_output->count(); 349 $count_output = $messages_output->count();
322 350
323 if ($type_message == 'input') { 351 if ($type_message == 'input') {
324 $messages = $messages_input->paginate(15); 352 $messages = $messages_input->paginate(15);
325 } 353 }
326 354
327 if ($type_message == 'output') { 355 if ($type_message == 'output') {
328 $messages = $messages_output->paginate(15); 356 $messages = $messages_output->paginate(15);
329 } 357 }
330 // Вернуть все 100% 358 // Вернуть все 100%
331 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 359 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
332 } 360 }
333 361
334 // Избранный 362 // Избранный
335 public function favorite() 363 public function favorite()
336 { 364 {
337 return view('workers.favorite'); 365 return view('workers.favorite');
338 } 366 }
339 367
340 // Сменить пароль 368 // Сменить пароль
341 public function new_password() 369 public function new_password()
342 { 370 {
343 $email = Auth()->user()->email; 371 $email = Auth()->user()->email;
344 return view('workers.new_password', compact('email')); 372 return view('workers.new_password', compact('email'));
345 } 373 }
346 374
347 // Обновление пароля 375 // Обновление пароля
348 public function save_new_password(Request $request) { 376 public function save_new_password(Request $request) {
349 $use = Auth()->user(); 377 $use = Auth()->user();
350 $request->validate([ 378 $request->validate([
351 'password' => 'required|string', 379 'password' => 'required|string',
352 'new_password' => 'required|string', 380 'new_password' => 'required|string',
353 'new_password2' => 'required|string' 381 'new_password2' => 'required|string'
354 ]); 382 ]);
355 383
356 if ($request->get('new_password') == $request->get('new_password2')) 384 if ($request->get('new_password') == $request->get('new_password2'))
357 if ($request->get('password') !== $request->get('new_password')) { 385 if ($request->get('password') !== $request->get('new_password')) {
358 $credentials = $request->only('email', 'password'); 386 $credentials = $request->only('email', 'password');
359 if (Auth::attempt($credentials, $request->has('save_me'))) { 387 if (Auth::attempt($credentials, $request->has('save_me'))) {
360 388
361 if (!is_null($use->email_verified_at)){ 389 if (!is_null($use->email_verified_at)){
362 390
363 $user_data = User_Model::find($use->id); 391 $user_data = User_Model::find($use->id);
364 $user_data->update([ 392 $user_data->update([
365 'password' => Hash::make($request->get('new_password')), 393 'password' => Hash::make($request->get('new_password')),
366 'pubpassword' => base64_encode($request->get('new_password')), 394 'pubpassword' => base64_encode($request->get('new_password')),
367 ]); 395 ]);
368 return redirect() 396 return redirect()
369 ->route('worker.new_password') 397 ->route('worker.new_password')
370 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 398 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
371 } 399 }
372 400
373 return redirect() 401 return redirect()
374 ->route('worker.new_password') 402 ->route('worker.new_password')
375 ->withError('Данная учетная запись не было верифицированна!'); 403 ->withError('Данная учетная запись не было верифицированна!');
376 } 404 }
377 } 405 }
378 406
379 return redirect() 407 return redirect()
380 ->route('worker.new_password') 408 ->route('worker.new_password')
381 ->withErrors('Не совпадение данных, обновите пароли!'); 409 ->withErrors('Не совпадение данных, обновите пароли!');
382 } 410 }
383 411
384 // Удаление профиля форма 412 // Удаление профиля форма
385 public function delete_profile() 413 public function delete_profile()
386 { 414 {
387 $login = Auth()->user()->email; 415 $login = Auth()->user()->email;
388 return view('workers.delete_profile', compact('login')); 416 return view('workers.delete_profile', compact('login'));
389 } 417 }
390 418
391 // Удаление профиля код 419 // Удаление профиля код
392 public function delete_profile_result(Request $request) { 420 public function delete_profile_result(Request $request) {
393 $Answer = $request->all(); 421 $Answer = $request->all();
394 $user_id = Auth()->user()->id; 422 $user_id = Auth()->user()->id;
395 $request->validate([ 423 $request->validate([
396 'password' => 'required|string', 424 'password' => 'required|string',
397 ]); 425 ]);
398 426
399 $credentials = $request->only('email', 'password'); 427 $credentials = $request->only('email', 'password');
400 if (Auth::attempt($credentials)) { 428 if (Auth::attempt($credentials)) {
401 Auth::logout(); 429 Auth::logout();
402 $it = User_Model::find($user_id); 430 $it = User_Model::find($user_id);
403 $it->delete(); 431 $it->delete();
404 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 432 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
405 } else { 433 } else {
406 return redirect()->route('worker.delete_profile') 434 return redirect()->route('worker.delete_profile')
407 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 435 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
408 } 436 }
409 } 437 }
410 438
411 // Регистрация соискателя 439 // Регистрация соискателя
412 public function register_worker(Request $request) 440 public function register_worker(Request $request)
413 { 441 {
414 $params = $request->all(); 442 $params = $request->all();
415 $params['is_worker'] = 1; 443 $params['is_worker'] = 1;
416 444
417 $rules = [ 445 $rules = [
418 'surname' => ['required', 'string', 'max:255'], 446 'surname' => ['required', 'string', 'max:255'],
419 'name_man' => ['required', 'string', 'max:255'], 447 'name_man' => ['required', 'string', 'max:255'],
420 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 448 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
421 'password' => ['required', 'string', 'min:8'] 449 'password' => ['required', 'string', 'min:8']
422 ]; 450 ];
423 451
424 $messages = [ 452 $messages = [
425 'required' => 'Укажите обязательное поле', 453 'required' => 'Укажите обязательное поле',
426 'min' => [ 454 'min' => [
427 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 455 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
428 'integer' => 'Поле «:attribute» должно быть :min или больше', 456 'integer' => 'Поле «:attribute» должно быть :min или больше',
429 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 457 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
430 ], 458 ],
431 'max' => [ 459 'max' => [
432 'string' => 'Поле «:attribute» должно быть не больше :max символов', 460 'string' => 'Поле «:attribute» должно быть не больше :max символов',
433 'integer' => 'Поле «:attribute» должно быть :max или меньше', 461 'integer' => 'Поле «:attribute» должно быть :max или меньше',
434 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 462 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
435 ] 463 ]
436 ]; 464 ];
437 465
438 if ($request->get('password') !== $request->get('confirmed')){ 466 if ($request->get('password') !== $request->get('confirmed')){
439 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 467 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
440 } 468 }
441 469
442 $haystack = $request->get('password'); 470 $haystack = $request->get('password');
443 471
444 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); 472 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?');
445 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 473 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z',
446 'X', 'C', 'V', 'B', 'N', 'M'); 474 'X', 'C', 'V', 'B', 'N', 'M');
447 $spec_bool = false; 475 $spec_bool = false;
448 $alpha_bool = false; 476 $alpha_bool = false;
449 477
450 foreach ($specsumbol as $it) { 478 foreach ($specsumbol as $it) {
451 if (strpos($haystack, $it) !== false) { 479 if (strpos($haystack, $it) !== false) {
452 $spec_bool = true; 480 $spec_bool = true;
453 } 481 }
454 } 482 }
455 483
456 foreach ($alpha as $it) { 484 foreach ($alpha as $it) {
457 if (strpos($haystack, $it) !== false) { 485 if (strpos($haystack, $it) !== false) {
458 $alpha_bool = true; 486 $alpha_bool = true;
459 } 487 }
460 } 488 }
461 489
462 if ((!$spec_bool) || (!$alpha_bool)) { 490 if ((!$spec_bool) || (!$alpha_bool)) {
463 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); 491 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?"));
464 } 492 }
465 493
466 if (($request->has('politik')) && ($request->get('politik') == 1)) { 494 if (($request->has('politik')) && ($request->get('politik') == 1)) {
467 $validator = Validator::make($request->all(), $rules, $messages); 495 $validator = Validator::make($params, $rules, $messages);
468 496
469 if ($validator->fails()) { 497 if ($validator->fails()) {
470 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 498 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
471 } else { 499 } else {
500
472 $user = $this->create($params); 501 $user = $this->create($params);
473 event(new Registered($user)); 502 event(new Registered($user));
474 Auth::guard()->login($user); 503 Auth::guard()->login($user);
475 } 504 }
476 if ($user) { 505 if ($user) {
477 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; 506 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));;
478 } else { 507 } else {
479 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 508 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
480 } 509 }
481 510
482 } else { 511 } else {
483 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); 512 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!"));
484 } 513 }
485 } 514 }
486 515
487 // Звездная оценка и ответ 516 // Звездная оценка и ответ
488 public function stars_answer(Request $request) { 517 public function stars_answer(Request $request) {
489 $params = $request->all(); 518 $params = $request->all();
490 $rules = [ 519 $rules = [
491 'message' => ['required', 'string', 'max:255'], 520 'message' => ['required', 'string', 'max:255'],
492 ]; 521 ];
493 522
494 $messages = [ 523 $messages = [
495 'required' => 'Укажите обязательное поле', 524 'required' => 'Укажите обязательное поле',
496 'min' => [ 525 'min' => [
497 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 526 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
498 'integer' => 'Поле «:attribute» должно быть :min или больше', 527 'integer' => 'Поле «:attribute» должно быть :min или больше',
499 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 528 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
500 ], 529 ],
501 'max' => [ 530 'max' => [
502 'string' => 'Поле «:attribute» должно быть не больше :max символов', 531 'string' => 'Поле «:attribute» должно быть не больше :max символов',
503 'integer' => 'Поле «:attribute» должно быть :max или меньше', 532 'integer' => 'Поле «:attribute» должно быть :max или меньше',
504 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 533 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
505 ] 534 ]
506 ]; 535 ];
507 $response_worker = ResponseWork::create($params); 536 $response_worker = ResponseWork::create($params);
508 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); 537 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!');
509 } 538 }
510 539
511 // Создание пользователя 540 // Создание пользователя
512 protected function create(array $data) 541 protected function create(array $data)
513 { 542 {
514 $Use = new User(); 543 $Use = new User();
515 $Code_user = $Use->create([ 544 $Code_user = $Use->create([
516 'name' => $data['surname']." ".$data['name_man'], 545 'name' => $data['surname']." ".$data['name_man'],
517 'name_man' => $data['name_man'], 546 'name_man' => $data['name_man'],
518 'surname' => $data['surname'], 547 'surname' => $data['surname'],
519 'surname2' => $data['surname2'], 548 'surname2' => $data['surname2'],
520 'subscribe_email' => $data['email'], 549 'subscribe_email' => $data['email'],
521 'email' => $data['email'], 550 'email' => $data['email'],
522 'telephone' => $data['telephone'], 551 'telephone' => $data['telephone'],
523 'password' => Hash::make($data['password']), 552 'password' => Hash::make($data['password']),
524 'pubpassword' => base64_encode($data['password']), 553 'pubpassword' => base64_encode($data['password']),
525 'email_verified_at' => Carbon::now() 554 'email_verified_at' => Carbon::now(),
555 'is_worker' => $data['is_worker'],
526 ]); 556 ]);
527 if ($Code_user->id > 0) { 557 if ($Code_user->id > 0) {
528 $Worker = new Worker(); 558 $Worker = new Worker();
529 $Worker->user_id = $Code_user->id; 559 $Worker->user_id = $Code_user->id;
530 $Worker->position_work = $data['job_titles']; 560 $Worker->position_work = $data['job_titles'];
531 $Worker->email = $data['email']; 561 $Worker->email = $data['email'];
532 $Worker->telephone = $data['telephone']; 562 $Worker->telephone = $data['telephone'];
533 $Worker->save(); 563 $Worker->save();
534 564
535 return $Code_user; 565 return $Code_user;
536 } 566 }
537 } 567 }
538 568
539 // Вакансии избранные 569 // Вакансии избранные
540 public function colorado(Request $request) { 570 public function colorado(Request $request) {
541 $IP_address = RusDate::ip_addr_client(); 571 $IP_address = RusDate::ip_addr_client();
542 $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 572 $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
543 573
544 if ($Arr->count()) { 574 if ($Arr->count()) {
545 $A = Array(); 575 $A = Array();
546 foreach ($Arr as $it) { 576 foreach ($Arr as $it) {
547 $A[] = $it->code_record; 577 $A[] = $it->code_record;
548 } 578 }
549 579
550 $Query = Ad_employer::query()->whereIn('id', $A); 580 $Query = Ad_employer::query()->whereIn('id', $A);
551 } else { 581 } else {
552 $Query = Ad_employer::query()->where('id', '=', '0'); 582 $Query = Ad_employer::query()->where('id', '=', '0');
553 } 583 }
554 584
555 $Query = $Query->with('jobs')-> 585 $Query = $Query->with('jobs')->
556 with('cat')-> 586 with('cat')->
557 with('employer')-> 587 with('employer')->
558 whereHas('jobs_code', function ($query) use ($request) { 588 whereHas('jobs_code', function ($query) use ($request) {
559 if ($request->ajax()) { 589 if ($request->ajax()) {
560 if (null !== ($request->get('job'))) { 590 if (null !== ($request->get('job'))) {
561 $query->where('job_title_id', $request->get('job')); 591 $query->where('job_title_id', $request->get('job'));
562 } 592 }
563 } 593 }
564 })->select('ad_employers.*'); 594 })->select('ad_employers.*');
565 595
566 $Job_title = Job_title::query()->OrderBy('name')->get(); 596 $Job_title = Job_title::query()->OrderBy('name')->get();
567 597
568 $Query_count = $Query->count(); 598 $Query_count = $Query->count();
569 599
570 $Query = $Query->OrderBy('updated_at')->paginate(3); 600 $Query = $Query->OrderBy('updated_at')->paginate(3);
571 601
572 return view('workers.favorite', compact('Query', 602 return view('workers.favorite', compact('Query',
573 'Query_count', 603 'Query_count',
574 'Job_title')); 604 'Job_title'));
575 605
576 } 606 }
577 607
578 //Переписка 608 //Переписка
579 public function dialog(User_Model $user1, User_Model $user2) { 609 public function dialog(User_Model $user1, User_Model $user2) {
580 if (isset($user2->id)) { 610 if (isset($user2->id)) {
581 $companion = User_Model::query()->with('workers')-> 611 $companion = User_Model::query()->with('workers')->
582 with('employers')-> 612 with('employers')->
583 where('id', $user2->id)->first(); 613 where('id', $user2->id)->first();
584 } 614 }
585 615
586 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 616 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
587 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 617 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
588 })->orWhere(function($query) use ($user1, $user2) { 618 })->orWhere(function($query) use ($user1, $user2) {
589 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 619 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
590 })->OrderBy('created_at')->get(); 620 })->OrderBy('created_at')->get();
591 621
592 $id_vac = null; 622 $id_vac = null;
593 foreach ($Messages as $it) { 623 foreach ($Messages as $it) {
594 if (isset($it->response)) { 624 if (isset($it->response)) {
595 foreach ($it->response as $r) { 625 foreach ($it->response as $r) {
596 if (isset($r->ad_employer_id)) { 626 if (isset($r->ad_employer_id)) {
597 $id_vac = $r->ad_employer_id; 627 $id_vac = $r->ad_employer_id;
598 break; 628 break;
599 } 629 }
600 } 630 }
601 } 631 }
602 if (!is_null($id_vac)) break; 632 if (!is_null($id_vac)) break;
603 } 633 }
604 634
605 $ad_employer = null; 635 $ad_employer = null;
606 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 636 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
607 $sender = $user1; 637 $sender = $user1;
608 638
609 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 639 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
610 } 640 }
611 641
612 // Даунылоады 642 // Даунылоады
613 public function download(Worker $worker) { 643 public function download(Worker $worker) {
614 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; 644 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...'];
615 view()->share('house',$arr_house); 645 view()->share('house',$arr_house);
616 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); 646 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape');
617 return $pdf->stream(); 647 return $pdf->stream();
618 } 648 }
619 649
620 // Поднятие анкеты 650 // Поднятие анкеты
621 public function up(Worker $worker) { 651 public function up(Worker $worker) {
622 $worker->updated_at = Carbon::now(); 652 $worker->updated_at = Carbon::now();
623 $worker->save(); 653 $worker->save();
624 // 0 654 // 0
625 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); 655 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных');
626 } 656 }
627 657
628 // Форма сертификате 658 // Форма сертификате
629 public function new_sertificate(Worker $worker) { 659 public function new_sertificate(Worker $worker) {
630 return view('workers.sertificate_add', compact('worker')); 660 return view('workers.sertificate_add', compact('worker'));
631 } 661 }
632 662
633 // Добавление сертификата 663 // Добавление сертификата
634 public function add_serificate(Request $request) { 664 public function add_serificate(Request $request) {
635 $params = $request->all(); 665 $params = $request->all();
636 666
637 $Sertificate = new sertification(); 667 $Sertificate = new sertification();
638 $Sertificate->create($params); 668 $Sertificate->create($params);
639 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); 669 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get();
640 return redirect()->route('worker.cabinet'); 670 return redirect()->route('worker.cabinet');
641 //return view('ajax.documents', compact('Docs')); 671 //return view('ajax.documents', compact('Docs'));
642 } 672 }
643 673
644 public function delete_diplom(Request $request, Worker $worker) { 674 public function delete_diplom(Request $request, Worker $worker) {
645 $infoblok_id = $request->get('infoblok_id'); 675 $infoblok_id = $request->get('infoblok_id');
646 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); 676 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete();
647 677
648 //$Infoblocks = infobloks::query()->get(); 678 //$Infoblocks = infobloks::query()->get();
649 return redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); 679 return redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks'));
650 } 680 }
651 681
652 // Удалить сертификат 682 // Удалить сертификат
653 public function delete_sertificate(sertification $doc) { 683 public function delete_sertificate(sertification $doc) {
654 $doc->delete(); 684 $doc->delete();
655 685
656 return redirect()->route('worker.cabinet'); 686 return redirect()->route('worker.cabinet');
657 } 687 }
658 688
659 // Добавление диплома 689 // Добавление диплома
660 public function add_diplom_ajax(Request $request) { 690 public function add_diplom_ajax(Request $request) {
661 // конец 691 // конец
662 $params = $request->all(); 692 $params = $request->all();
663 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 693 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
664 694
665 if ($count == 0) $dop_info = Dop_info::create($params); 695 if ($count == 0) $dop_info = Dop_info::create($params);
666 $Infoblocks = infobloks::query()->get(); 696 $Infoblocks = infobloks::query()->get();
667 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); 697 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get();
668 $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); 698 $data = Dop_info::query()->where('worker_id', $request->has('worker_id'));
669 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); 699 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker'));
670 } 700 }
671 701
672 // Добавление диплома без ajax 702 // Добавление диплома без ajax
673 public function add_diplom(Worker $worker) { 703 public function add_diplom(Worker $worker) {
674 $worker_id = $worker->id; 704 $worker_id = $worker->id;
675 $Infoblocks = infobloks::query()->get(); 705 $Infoblocks = infobloks::query()->get();
676 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); 706 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks'));
677 } 707 }
678 // Сохранить 708 // Сохранить
679 // Сохраняю диплом 709 // Сохраняю диплом
680 public function add_diplom_save(Request $request) { 710 public function add_diplom_save(Request $request) {
681 $params = $request->all(); 711 $params = $request->all();
682 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 712 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
683 if ($count == 0) $dop_info = Dop_info::create($params); 713 if ($count == 0) $dop_info = Dop_info::create($params);
684 return redirect()->route('worker.cabinet'); 714 return redirect()->route('worker.cabinet');
685 } 715 }
686 716
687 // Добавление стандартного документа 717 // Добавление стандартного документа
688 public function add_document(Worker $worker) { 718 public function add_document(Worker $worker) {
689 return view('workers.docs', compact('worker')); 719 return view('workers.docs', compact('worker'));
690 } 720 }
691 721
692 //Сохранение стандартого документа 722 //Сохранение стандартого документа
693 public function add_document_save(DocumentsRequest $request) { 723 public function add_document_save(DocumentsRequest $request) {
694 $params = $request->all(); 724 $params = $request->all();
695 $place_work = place_works::create($params); 725 $place_work = place_works::create($params);
696 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); 726 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!');
697 } 727 }
698 728
699 // Редактирование документа 729 // Редактирование документа
700 public function edit_document(place_works $doc, Worker $worker) { 730 public function edit_document(place_works $doc, Worker $worker) {
701 return view('workers.docs-edit', compact('doc', 'worker')); 731 return view('workers.docs-edit', compact('doc', 'worker'));
702 } 732 }
703 733
704 //Сохранение отредактированного документа 734 //Сохранение отредактированного документа
705 public function edit_document_save(DocumentsRequest $request, place_works $doc) { 735 public function edit_document_save(DocumentsRequest $request, place_works $doc) {
706 $params = $request->all(); 736 $params = $request->all();
707 $doc->update($params); 737 $doc->update($params);
708 738
709 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); 739 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
710 } 740 }
711 741
712 // Удаление документа 742 // Удаление документа
713 public function delete_document(place_works $doc) { 743 public function delete_document(place_works $doc) {
714 $doc->delete(); 744 $doc->delete();
715 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); 745 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!');
716 } 746 }
717 747
718 //Отправка нового сообщения 748 //Отправка нового сообщения
719 public function new_message(Request $request) { 749 public function new_message(Request $request) {
720 $params = $request->all(); 750 $params = $request->all();
721 751
722 $id = $params['send_user_id']; 752 $id = $params['send_user_id'];
723 $message = new Message(); 753 $message = new Message();
724 $message->user_id = $params['send_user_id']; 754 $message->user_id = $params['send_user_id'];
725 $message->to_user_id = $params['send_to_user_id']; 755 $message->to_user_id = $params['send_to_user_id'];
726 $message->title = $params['send_title']; 756 $message->title = $params['send_title'];
727 $message->text = $params['send_text']; 757 $message->text = $params['send_text'];
728 if ($request->has('send_file')) { 758 if ($request->has('send_file')) {
729 $message->file = $request->file('send_file')->store("worker/$id", 'public'); 759 $message->file = $request->file('send_file')->store("worker/$id", 'public');
730 } 760 }
731 $message->flag_new = 1; 761 $message->flag_new = 1;
732 $id_message = $message->save(); 762 $id_message = $message->save();
733 763
734 $data['message_id'] = $id_message; 764 $data['message_id'] = $id_message;
735 $data['ad_employer_id'] = $params['send_vacancy']; 765 $data['ad_employer_id'] = $params['send_vacancy'];
736 $data['job_title_id'] = $params['send_job_title_id']; 766 $data['job_title_id'] = $params['send_job_title_id'];
737 $data['flag'] = 1; 767 $data['flag'] = 1;
738 $ad_responce = ad_response::create($data); 768 $ad_responce = ad_response::create($data);
739 return redirect()->route('worker.messages', ['type_message' => 'output']); 769 return redirect()->route('worker.messages', ['type_message' => 'output']);
740 } 770 }
741 771
742 } 772 }
743 773
744 774
1 <?php 1 <?php
2 2
3 namespace App\Models; 3 namespace App\Models;
4 4
5 // use Illuminate\Contracts\Auth\MustVerifyEmail; 5 // use Illuminate\Contracts\Auth\MustVerifyEmail;
6 use Illuminate\Database\Eloquent\Factories\HasFactory; 6 use Illuminate\Database\Eloquent\Factories\HasFactory;
7 use Illuminate\Foundation\Auth\User as Authenticatable; 7 use Illuminate\Foundation\Auth\User as Authenticatable;
8 use Illuminate\Notifications\Notifiable; 8 use Illuminate\Notifications\Notifiable;
9 use Laravel\Sanctum\HasApiTokens; 9 use Laravel\Sanctum\HasApiTokens;
10 10
11 class User extends Authenticatable 11 class User extends Authenticatable
12 { 12 {
13 use HasApiTokens, HasFactory, Notifiable; 13 use HasApiTokens, HasFactory, Notifiable;
14 14
15 /** 15 /**
16 * The attributes that are mass assignable. 16 * The attributes that are mass assignable.
17 * 17 *
18 * @var array<int, string> 18 * @var array<int, string>
19 */ 19 */
20 20
21 protected $fillable = [ 21 protected $fillable = [
22 'name', 22 'name',
23 'email', 23 'email',
24 'password', 24 'password',
25 'admin', 25 'admin',
26 'telephone', 26 'telephone',
27 'surname', 27 'surname',
28 'name_man', 28 'name_man',
29 'surname2', 29 'surname2',
30 'is_worker', 30 'is_worker',
31 'is_lookin', 31 'is_lookin',
32 'is_message', 32 'is_message',
33 'is_public', 33 'is_public',
34 'is_worker',
34 'is_remove', 35 'is_remove',
35 'is_ban', 36 'is_ban',
36 'is_new', 37 'is_new',
37 'is_bd', 38 'is_bd',
38 'email_verified_at', 39 'email_verified_at',
39 'created_at', 40 'created_at',
40 'updated_at', 41 'updated_at',
41 'birthday', 42 'birthday',
42 'file', 43 'file',
43 'pubpassword', 44 'pubpassword',
44 'is_manager', 45 'is_manager',
45 'subscribe_email', 46 'subscribe_email',
46 'subscribe', 47 'subscribe',
47 ]; 48 ];
48 49
49 /** 50 /**
50 * The attributes that should be hidden for serialization. 51 * The attributes that should be hidden for serialization.
51 * 52 *
52 * @var array<int, string> 53 * @var array<int, string>
53 */ 54 */
54 protected $hidden = [ 55 protected $hidden = [
55 'password', 56 'password',
56 'remember_token', 57 'remember_token',
57 ]; 58 ];
58 59
59 /** 60 /**
60 * The attributes that should be cast. 61 * The attributes that should be cast.
61 * 62 *
62 * @var array<string, string> 63 * @var array<string, string>
63 */ 64 */
64 protected $casts = [ 65 protected $casts = [
65 'email_verified_at' => 'datetime', 66 'email_verified_at' => 'datetime',
66 ]; 67 ];
67 68
68 /* 69 /*
69 * Связь Пользователей системы с работодателями 70 * Связь Пользователей системы с работодателями
70 * users - employers 71 * users - employers
71 */ 72 */
72 public function employers() { 73 public function employers() {
73 return $this->hasMany(Employer::class, 'user_id'); 74 return $this->hasMany(Employer::class, 'user_id');
74 } 75 }
75 76
76 /* 77 /*
77 * Связь Пользователей системы с работниками 78 * Связь Пользователей системы с работниками
78 * users - workers 79 * users - workers
79 */ 80 */
80 public function workers() { 81 public function workers() {
81 return $this->hasMany(Worker::class, 'user_id'); 82 return $this->hasMany(Worker::class, 'user_id');
82 } 83 }
83 84
84 /* 85 /*
85 * Связь Пользователей системы с работниками 86 * Связь Пользователей системы с работниками
86 * users - workers 87 * users - workers
87 */ 88 */
88 public function work() { 89 public function work() {
89 return $this->hasMany(Worker::class, 'user_id')->select('telephone', 'email', 'position_work', 'persent_anketa'); 90 return $this->hasMany(Worker::class, 'user_id')->select('telephone', 'email', 'position_work', 'persent_anketa');
90 } 91 }
91 92
92 /* 93 /*
93 * Связь Модели Пользователей(Users) с Группами (Group_users) 94 * Связь Модели Пользователей(Users) с Группами (Group_users)
94 * users - group_users 95 * users - group_users
95 многие-ко-многим 96 многие-ко-многим
96 */ 97 */
97 public function ingroup() { 98 public function ingroup() {
98 return $this->belongsToMany(Group_user::class, 'group_works'); 99 return $this->belongsToMany(Group_user::class, 'group_works');
99 } 100 }
100 101
101 /* 102 /*
102 * Связь Пользователей системы с ссобщениями 103 * Связь Пользователей системы с ссобщениями
103 * users - messages 104 * users - messages
104 */ 105 */
105 public function messages() { 106 public function messages() {
106 return $this->hasMany(Message::class); 107 return $this->hasMany(Message::class);
107 } 108 }
108 109
109 /* 110 /*
110 * Связь Пользователей системы с статистика 111 * Связь Пользователей системы с статистика
111 * users - static_workers 112 * users - static_workers
112 */ 113 */
113 public function static_user() { 114 public function static_user() {
114 return $this->hasMany(Static_worker::class); 115 return $this->hasMany(Static_worker::class);
115 } 116 }
116 117
117 /* 118 /*
118 * Связь модели Юзеры (users) с моделью Группы пользователей (Group_works) 119 * Связь модели Юзеры (users) с моделью Группы пользователей (Group_works)
119 один-ко-многим 120 один-ко-многим
120 */ 121 */
121 public function peoples() { 122 public function peoples() {
122 return $this->hasMany(Group_works::class); 123 return $this->hasMany(Group_works::class);
123 } 124 }
124 125
125 /* 126 /*
126 * Связь Модели Пользователей(Users) с Группами (Group_users) 127 * Связь Модели Пользователей(Users) с Группами (Group_users)
127 * users - group_users 128 * users - group_users
128 многие-ко-многим 129 многие-ко-многим
129 */ 130 */
130 public function jobtitles() { 131 public function jobtitles() {
131 return $this->belongsToMany(Job_title::class, 'Workers', 'user_id', 'position_work'); 132 return $this->belongsToMany(Job_title::class, 'Workers', 'user_id', 'position_work');
132 } 133 }
133 134
134 public function scopeActive($query) { 135 public function scopeActive($query) {
135 return $query->where('is_remove', '=', '0'); 136 return $query->where('is_remove', '=', '0');
136 } 137 }
137 138
138 public function scopeWorker($query) { 139 public function scopeWorker($query) {
139 return $query->where('is_worker', '=', '1'); 140 return $query->where('is_worker', '=', '1');
140 } 141 }
141 142
142 public function scopeBaseuser($query) { 143 public function scopeBaseuser($query) {
143 return $query->where('is_bd', '=', '1'); 144 return $query->where('is_bd', '=', '1');
144 } 145 }
145 146
146 public function scopeRealuser($query) { 147 public function scopeRealuser($query) {
147 return $query->where('is_bd', '=', '0'); 148 return $query->where('is_bd', '=', '0');
148 } 149 }
149 150
150 public function scopeAdmin($query) { 151 public function scopeAdmin($query) {
151 return $query->where('admin', '=', '1'); 152 return $query->where('admin', '=', '1');
152 } 153 }
153 154
154 public function scopeNotadmin($query) { 155 public function scopeNotadmin($query) {
155 return $query->where('admin', '=', '0'); 156 return $query->where('admin', '=', '0');
156 } 157 }
157 158
158 } 159 }
159 160
resources/views/ajax/resume_1.blade.php
1
1 @if ($resumes->count()) 2 @if ($resumes->count())
2 @foreach ($resumes as $res) 3 @foreach ($resumes as $res)
3 <div class="main__resume-base-body-item"> 4 <div class="main__resume-base-body-item">
4 <div class="main__resume-base-body-item-buttons"> 5 <div class="main__resume-base-body-item-buttons">
5 <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}"> 6 <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}">
6 <svg> 7 <svg>
7 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 8 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
8 </svg> 9 </svg>
9 </button> 10 </button>
10 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> 11 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
11 <svg> 12 <svg>
12 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 13 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
13 </svg> 14 </svg>
14 </button> 15 </button>
15 </div> 16 </div>
16 <div class="main__resume-base-body-item-wrapper"> 17 <div class="main__resume-base-body-item-wrapper">
17 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 18 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
18 <div class="main__resume-base-body-item-inner"> 19 <div class="main__resume-base-body-item-inner">
19 <div> 20 <div>
20 <b>Статус</b> 21 <b>Статус</b>
21 <span>{{ $status_work[$res->status_work] }}</span> 22 <span>{{ $status_work[$res->status_work] }}</span>
22 </div> 23 </div>
23 <div> 24 <div>
24 <b>Имя работника</b> 25 <b>Имя работника</b>
25 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> 26 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
26 </div> 27 </div>
27 <div> 28 <div>
28 <b>Номер телефона</b> 29 <b>Номер телефона</b>
29 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> 30 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
30 </div> 31 </div>
31 <div> 32 <div>
32 <b>Электронный адрес</b> 33 <b>Электронный адрес</b>
33 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> 34 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
34 </div> 35 </div>
35 <div> 36 <div>
36 <b>Город проживания</b> 37 <b>Город проживания</b>
37 <span>{{ $res->city }}</span> 38 <span>{{ $res->city }}</span>
38 </div> 39 </div>
39 <div> 40 <div>
40 <b>Опыт работы</b> 41 <b>Опыт работы</b>
41 <span>{{ $res->experience }}</span> 42 <span>{{ $res->experience }}</span>
42 </div> 43 </div>
43 </div> 44 </div>
44 </div> 45 </div>
46 <div class="main__employer-page-two-item-tags">
47 @if ($res->job_titles->count())
48 @if (isset($res->job_titles))
49 @foreach ($res->job_titles as $key => $j)
50 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
51 @endforeach
52 @endif
53 @endif
54 </div>
45 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a> 55 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
46 </div> 56 </div>
47 @endforeach 57 @endforeach
48 58
49 {{ $resumes->appends($_GET)->links('paginate') }} 59 {{ $resumes->appends($_GET)->links('paginate') }}
60 @else
61 <p>По данному запросу ничего не найдено</p>
50 @endif 62 @endif
51 63
resources/views/ajax/resume_2.blade.php
1 @if ($resumes->count()) 1 @if ($resumes->count())
2 @foreach ($resumes as $res) 2 @foreach ($resumes as $res)
3 <div class="main__resume-base-body-item"> 3 <div class="main__resume-base-body-item">
4 <div class="main__resume-base-body-item-buttons"> 4 <div class="main__resume-base-body-item-buttons">
5 <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}"> 5 <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}">
6 <svg> 6 <svg>
7 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 7 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
8 </svg> 8 </svg>
9 </button> 9 </button>
10 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> 10 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
11 <svg> 11 <svg>
12 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 12 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
13 </svg> 13 </svg>
14 </button> 14 </button>
15 </div> 15 </div>
16 <div class="main__resume-base-body-item-wrapper"> 16 <div class="main__resume-base-body-item-wrapper">
17 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 17 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
18 <div class="main__resume-base-body-item-inner"> 18 <div class="main__resume-base-body-item-inner">
19 <div> 19 <div>
20 <b>Статус</b> 20 <b>Статус</b>
21 <span>{{ $status_work[$res->status_work] }}</span> 21 <span>{{ $status_work[$res->status_work] }}</span>
22 </div> 22 </div>
23 <div> 23 <div>
24 <b>Имя работника</b> 24 <b>Имя работника</b>
25 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> 25 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
26 </div> 26 </div>
27 <div> 27 <div>
28 <b>Номер телефона</b> 28 <b>Номер телефона</b>
29 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> 29 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
30 </div> 30 </div>
31 <div> 31 <div>
32 <b>Электронный адрес</b> 32 <b>Электронный адрес</b>
33 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> 33 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
34 </div> 34 </div>
35 <div> 35 <div>
36 <b>Город проживания</b> 36 <b>Город проживания</b>
37 <span>{{ $res->city }}</span> 37 <span>{{ $res->city }}</span>
38 </div> 38 </div>
39 <div> 39 <div>
40 <b>Опыт работы</b> 40 <b>Опыт работы</b>
41 <span>{{ $res->experience }}</span> 41 <span>{{ $res->experience }}</span>
42 </div> 42 </div>
43 </div> 43 </div>
44 </div> 44 </div>
45 <div class="main__employer-page-two-item-tags">
46 @if ($res->job_titles->count())
47 @if (isset($res->job_titles))
48 @foreach ($res->job_titles as $key => $j)
49 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
50 @endforeach
51 @endif
52 @endif
53 </div>
45 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в 54 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в
46 резюме</a> 55 резюме</a>
47 </div> 56 </div>
48 @endforeach 57 @endforeach
49 58
50 {{ $resumes->appends($_GET)->links('paginate') }} 59 {{ $resumes->appends($_GET)->links('paginate') }}
60 @else
61 <p>По данному запросу ничего не найдено</p>
51 @endif 62 @endif
52 63
resources/views/employers/add_vacancy.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('Приближаемся к системе, нас рой тут...'); 5 console.log('Приближаемся к системе, нас рой тут...');
6 $(document).on('change', '#position_id', function() { 6 $(document).on('change', '#position_id', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.val(); 8 var val_ = this_.val();
9 var ajax_ = $('#job_title_id'); 9 var ajax_ = $('#job_title_id');
10 10
11 console.log('Создания списка людей, которые поднимутся на корабль...'); 11 console.log('Создания списка людей, которые поднимутся на корабль...');
12 12
13 $.ajax({ 13 $.ajax({
14 type: "GET", 14 type: "GET",
15 url: "{{ route('employer.selected_people') }}", 15 url: "{{ route('employer.selected_people') }}",
16 data: "id="+val_, 16 data: "id="+val_,
17 success: function (data) { 17 success: function (data) {
18 console.log('Ответка пришла'); 18 console.log('Ответка пришла');
19 console.log('Список избранных людей создан'); 19 console.log('Список избранных людей создан');
20 ajax_.html(data); 20 ajax_.html(data);
21 }, 21 },
22 headers: { 22 headers: {
23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
24 }, 24 },
25 error: function (data) { 25 error: function (data) {
26 console.log('Обрыв связи'); 26 console.log('Обрыв связи');
27 console.log('Error: ' + data); 27 console.log('Error: ' + data);
28 } 28 }
29 }); 29 });
30 }); 30 });
31 </script> 31 </script>
32 @endsection 32 @endsection
33 @section('content') 33 @section('content')
34 <section class="cabinet"> 34 <section class="cabinet">
35 <div class="container"> 35 <div class="container">
36 <ul class="breadcrumbs cabinet__breadcrumbs"> 36 <ul class="breadcrumbs cabinet__breadcrumbs">
37 <li><a href="{{ route('index') }}">Главная</a></li> 37 <li><a href="{{ route('index') }}">Главная</a></li>
38 <li><b>Личный кабинет</b></li> 38 <li><b>Личный кабинет</b></li>
39 </ul> 39 </ul>
40 <div class="cabinet__wrapper"> 40 <div class="cabinet__wrapper">
41 <div class="cabinet__side"> 41 <div class="cabinet__side">
42 <div class="cabinet__side-toper"> 42 <div class="cabinet__side-toper">
43 43
44 @include('employers.emblema') 44 @include('employers.emblema')
45 45
46 </div> 46 </div>
47 47
48 @include('employers.menu', ['item' => 2]) 48 @include('employers.menu', ['item' => 2])
49 49
50 </div> 50 </div>
51 51
52 <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> 52 <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST">
53 @csrf 53 @csrf
54 <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/> 54 <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/>
55 <div class="cabinet__body-item"> 55 <div class="cabinet__body-item">
56 <div class="cabinet__descr"> 56 <div class="cabinet__descr">
57 <h2 class="title cabinet__title">Разместить вакансию</h2> 57 <h2 class="title cabinet__title">Разместить вакансию</h2>
58 <p class="cabinet__text"><b>Данные по вакансии</b></p> 58 <p class="cabinet__text"><b>Данные по вакансии</b></p>
59 <p class="cabinet__text">Все поля обязательны для заполнения *</p> 59 <p class="cabinet__text">Все поля обязательны для заполнения *</p>
60 </div> 60 </div>
61 </div> 61 </div>
62 62
63 <div class="cabinet__body-item"> 63 <div class="cabinet__body-item">
64 <h4>Поля для вакансии</h4> 64 <h4>Поля для вакансии</h4>
65 <div class="cabinet__inputs"> 65 <div class="cabinet__inputs">
66 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 66 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
67 <label class="form-group__label">Название вакансии</label> 67 <label class="form-group__label">Название вакансии</label>
68 <div class="form-group__item"> 68 <div class="form-group__item">
69 <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required> 69 <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required>
70 @error('name') 70 @error('name')
71 <span class="text-xs text-red-600 dark:text-red-400"> 71 <span class="text-xs text-red-600 dark:text-red-400">
72 {{ $message }} 72 {{ $message }}
73 </span> 73 </span>
74 @enderror 74 @enderror
75 </div> 75 </div>
76 </div> 76 </div>
77 77
78 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 78 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
79 <label class="form-group__label">Телефон</label> 79 <label class="form-group__label">Телефон</label>
80 <div class="form-group__item"> 80 <div class="form-group__item">
81 <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> 81 <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон">
82 @error('telephone') 82 @error('telephone')
83 <span class="text-xs text-red-600 dark:text-red-400"> 83 <span class="text-xs text-red-600 dark:text-red-400">
84 {{ $message }} 84 {{ $message }}
85 </span> 85 </span>
86 @enderror 86 @enderror
87 </div> 87 </div>
88 </div> 88 </div>
89 89
90 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 90 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
91 <label class="form-group__label">Емайл</label> 91 <label class="form-group__label">Емайл</label>
92 <div class="form-group__item"> 92 <div class="form-group__item">
93 <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> 93 <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту">
94 @error('email') 94 @error('email')
95 <span class="text-xs text-red-600 dark:text-red-400"> 95 <span class="text-xs text-red-600 dark:text-red-400">
96 {{ $message }} 96 {{ $message }}
97 </span> 97 </span>
98 @enderror 98 @enderror
99 </div> 99 </div>
100 </div> 100 </div>
101 101
102 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 102 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none">
103 <label class="form-group__label">Зарплата среднестатистическая для вакансии</label> 103 <label class="form-group__label">Зарплата среднестатистическая для вакансии</label>
104 <div class="form-group__item"> 104 <div class="form-group__item">
105 <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? '' }}" placeholder="Среднестатистическая зарплата"> 105 <input type="text" class="input" name="salary" id="salary" value="0" placeholder="Среднестатистическая зарплата">
106 @error('salary') 106 @error('salary')
107 <span class="text-xs text-red-600 dark:text-red-400"> 107 <span class="text-xs text-red-600 dark:text-red-400">
108 {{ $message }} 108 {{ $message }}
109 </span> 109 </span>
110 @enderror 110 @enderror
111 </div> 111 </div>
112 </div> 112 </div>
113 113
114 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 114 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none">
115 <label class="form-group__label">Город посадки</label> 115 <label class="form-group__label">Город посадки</label>
116 <div class="form-group__item"> 116 <div class="form-group__item">
117 <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> 117 <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь">
118 @error('city') 118 @error('city')
119 <span class="text-xs text-red-600"> 119 <span class="text-xs text-red-600">
120 {{ $message }} 120 {{ $message }}
121 </span> 121 </span>
122 @enderror 122 @enderror
123 </div> 123 </div>
124 </div> 124 </div>
125 125
126 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 126 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
127 <label class="form-group__label">Категория (локация)</label> 127 <label class="form-group__label">Категория (локация)</label>
128 <div class="form-group__item"> 128 <div class="form-group__item">
129 <div class="select"> 129 <div class="select">
130 <select class="js-select2" name="category_id" id="category_id"> 130 <select class="js-select2" name="category_id" id="category_id">
131 @php $i = 1 @endphp 131 @php $i = 1 @endphp
132 @if ($categories->count()) 132 @if ($categories->count())
133 @foreach($categories as $j) 133 @foreach($categories as $j)
134 @if ($i == 1) <option selected> Выберите категорию из списка</option> 134 @if ($i == 1) <option selected> Выберите категорию из списка</option>
135 @else 135 @else
136 <option value="{{ $j->id }}">{{ $j->name }}</option> 136 <option value="{{ $j->id }}">{{ $j->name }}</option>
137 @endif 137 @endif
138 @php $i++ @endphp 138 @php $i++ @endphp
139 @endforeach 139 @endforeach
140 @endif 140 @endif
141 </select> 141 </select>
142 @error('category_id') 142 @error('category_id')
143 <span class="text-xs text-red-600 dark:text-red-400"> 143 <span class="text-xs text-red-600 dark:text-red-400">
144 {{ $message }} 144 {{ $message }}
145 </span> 145 </span>
146 @enderror 146 @enderror
147 </div> 147 </div>
148 </div> 148 </div>
149 </div> 149 </div>
150 150
151 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 151 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
152 <label class="form-group__label">Описание вакансии</label> 152 <label class="form-group__label">Описание вакансии</label>
153 <div class="form-group__item"> 153 <div class="form-group__item">
154 <textarea class="textarea" name="text" id="text">{{ $Employer[0]->text ?? '' }}</textarea> 154 <textarea class="textarea" name="text" id="text">{{ $Employer[0]->text ?? '' }}</textarea>
155 @error('text') 155 @error('text')
156 <span class="text-xs text-red-600"> 156 <span class="text-xs text-red-600">
157 {{ $message }} 157 {{ $message }}
158 </span> 158 </span>
159 @enderror 159 @enderror
160 </div> 160 </div>
161 </div> 161 </div>
162 </div> 162 </div>
163 <button type="submit" class="button cabinet__submit">Опубликовать</button> 163 <button type="submit" class="button cabinet__submit">Опубликовать</button>
164 </div> 164 </div>
165 </form> 165 </form>
166 </div> 166 </div>
167 </div> 167 </div>
168 </section> 168 </section>
169 </div> 169 </div>
170 @endsection 170 @endsection
171 171
resources/views/employers/bd.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', '.die_black', function() { 6 $(document).on('click', '.die_black', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var ajax_ = $('#ajax_flot_div'); 8 var ajax_ = $('#ajax_flot_div');
9 var id_ = this_.attr('data-test'); 9 var id_ = this_.attr('data-test');
10 var url_ = this_.attr('data-link'); 10 var url_ = this_.attr('data-link');
11 11
12 console.log(url_); 12 console.log(url_);
13 $.ajax({ 13 $.ajax({
14 type: "GET", 14 type: "GET",
15 url: url_, 15 url: url_,
16 success: function (data) { 16 success: function (data) {
17 console.log('Ответка'); 17 console.log('Ответка');
18 ajax_.html(data); 18 ajax_.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 console.log('Error: ' + data); 24 console.log('Error: ' + data);
25 } 25 }
26 }); 26 });
27 27
28 }); 28 });
29 </script> 29 </script>
30 @endsection 30 @endsection
31 31
32 @section('content') 32 @section('content')
33 <section class="cabinet"> 33 <section class="cabinet">
34 <div class="container"> 34 <div class="container">
35 <ul class="breadcrumbs cabinet__breadcrumbs"> 35 <ul class="breadcrumbs cabinet__breadcrumbs">
36 <li><a href="{{ route('index') }}">Главная</a></li> 36 <li><a href="{{ route('index') }}">Главная</a></li>
37 <li><b>Личный кабинет</b></li> 37 <li><b>Личный кабинет</b></li>
38 </ul> 38 </ul>
39 <div class="cabinet__wrapper"> 39 <div class="cabinet__wrapper">
40 <div class="cabinet__side"> 40 <div class="cabinet__side">
41 <div class="cabinet__side-toper"> 41 <div class="cabinet__side-toper">
42 @include('employers.emblema') 42 @include('employers.emblema')
43 </div> 43 </div>
44 @include('employers.menu', ['item' => 7]) 44 @include('employers.menu', ['item' => 7])
45 </div> 45 </div>
46 46
47 <div class="cabinet__body"> 47 <div class="cabinet__body">
48 <div class="cabinet__body-item"> 48 <div class="cabinet__body-item">
49 <h2 class="title cabinet__title">База данных</h2> 49 <h2 class="title cabinet__title">База данных</h2>
50 </div> 50 </div>
51 <div class="cabinet__body-item"> 51 <div class="cabinet__body-item">
52 <div class="cabinet__filters"> 52 <div class="cabinet__filters">
53 <div class="cabinet__filters-item"> 53 <div class="cabinet__filters-item">
54 <form class="search" action="{{ route('employer.bd') }}"> 54 <form class="search" action="{{ route('employer.bd') }}">
55 <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" required> 55 <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" value="@if (isset($_GET['search'])) {{ $_GET['search'] }} @endif">
56 <button type="submit" class="button">Найти</button> 56 <button type="submit" class="button">Найти</button>
57 <span> 57 <span>
58 <svg> 58 <svg>
59 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 59 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
60 </svg> 60 </svg>
61 </span> 61 </span>
62 </form> 62 </form>
63 </div> 63 </div>
64 64
65 <div class="cabinet__filters-item"> 65 <div class="cabinet__filters-item">
66 <a href="" class="button"> 66 <a href="{{ route('resume_download_all') }}" class="button">
67 <svg> 67 <svg>
68 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 68 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
69 </svg> 69 </svg>
70 Экспорт 70 Экспорт
71 </a> 71 </a>
72 </div> 72 </div>
73 </div> 73 </div>
74 </div> 74 </div>
75
76 <div class="cabinet__body-item">
77 <div class="cabinet__table-header">
78 <div><!--_if (isset($it->workers[0]->job_titles[0]->name)) _ $it->workers[0]->job_titles[0]->name }}_else Не указано _endif-->
79 Позиции работников
80 </div>
81 <span>
82 Всего вакансий найдено:
83 <b>{{ $users->count() }}</b>
84 </span>
85 </div>
86 <div class="table table_spoiler">
87 <!--<button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more">
88 <span>Показать ещё</span>
89 <span>Свернуть</span>
90 </button>-->
91
92 <div class="table__scroll">
93 <div class="table__body table__body_min-width">
94 <table>
95 <thead>
96 <tr>
97 <th>ФИО соискателя</th>
98 <th>Номер телефона</th>
99 <th>Электронная<br>почта</th>
100 <th>Наличие<br>анкеты</th>
101 </tr>
102 </thead>
103 <tbody>
75 @php 104 @php
76 $categories = 0; 105 $categories = 0;
77 106
78 @endphp 107 @endphp
79 @if ($users->count()) 108 @if ($users->count())
80 @foreach ($users as $key => $it) 109 @foreach ($users as $key => $it)
81 @if (isset($it->workers[0]->position_work)) 110 @if (isset($it->workers[0]->position_work))
82 @if ($categories !== $it->workers[0]->position_work) 111 @if ($categories !== $it->workers[0]->position_work)
83 @php 112 @php
84 $categories = $it->workers[0]->position_work; 113 $categories = $it->workers[0]->position_work;
85 $i = 0; 114 $i = 0;
86 @endphp 115 @endphp
87 @endif 116 @endif
88 117
89 @if ($i == 0) 118 @if ($i == 0)
90 <div class="cabinet__body-item"> 119
91 <div class="cabinet__table-header">
92 <div>@if (isset($it->workers[0]->job_titles[0]->name)) {{ $it->workers[0]->job_titles[0]->name }}@else Не указано @endif </div>
93 <span>
94 Всего вакансий найдено:
95 <b>{{ $it->workers[0]->count() }}</b>
96 </span>
97 </div>
98 <div class="table table_spoiler">
99 <button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more">
100 <span>Показать ещё</span>
101 <span>Свернуть</span>
102 </button>
103
104 <div class="table__scroll">
105 <div class="table__body table__body_min-width">
106 <table>
107 <thead>
108 <tr>
109 <th>ФИО соискателя</th>
110 <th>Номер телефона</th>
111 <th>Электронная<br>почта</th>
112 <th>Наличие<br>анкеты</th>
113 <th>Комментарии</th>
114 </tr>
115 </thead>
116 <tbody>
117 @endif 120 @endif
118 <tr> 121 <tr>
119 <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td> 122 <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td>
120 123
121 <td> 124 <td>
122 125
123 @if (!empty($it->workers[0]->telephone)) 126 @if (!empty($it->workers[0]->telephone))
124 <a href="tel:{{ $it->workers[0]->telephone }}"> 127 <a href="tel:{{ $it->workers[0]->telephone }}">
125 {{ $it->workers[0]->telephone }} 128 {{ $it->workers[0]->telephone }}
126 </a> 129 </a>
127 @else 130 @else
128 - 131 -
129 @endif 132 @endif
130 133
131 @if (!empty($it->workers[0]->telephone2)) 134 @if (!empty($it->workers[0]->telephone2))
132 <br><a href="tel:{{ $it->workers[0]->telephone2 }}"> 135 <br><a href="tel:{{ $it->workers[0]->telephone2 }}">
133 {{ $it->workers[0]->telephone2 }} 136 {{ $it->workers[0]->telephone2 }}
134 </a> 137 </a>
135 @endif 138 @endif
136 </td> 139 </td>
137 140
138 <td> 141 <td>
139 @if (!empty($it->workers[0]->email)) 142 @if (!empty($it->workers[0]->email))
140 <a href="emailto:{{ $it->workers[0]->email }}">{{ $it->workers[0]->email }}</a> 143 <a href="emailto:{{ $it->workers[0]->email }}">{{ $it->workers[0]->email }}</a>
141 @else 144 @else
142 - 145 -
143 @endif 146 @endif
144 </td> 147 </td>
145 148
146 <td> 149 <td>
147 <a href="" class="table__link"> 150 @if (isset($it->workers[0]->id))
148 <svg> 151 <a href="{{ route('resume_download', ['worker' => $it->workers[0]->id]) }}" class="table__link">
149 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 152 <svg>
150 </svg> 153 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
151 Скачать 154 </svg>
resources/views/employers/cabinet45.blade.php
1 @extends('layout.frontend', ['title' => 'Кабинет работодателя - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Кабинет работодателя - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> 4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 <script> 5 <script>
6 ClassicEditor 6 ClassicEditor
7 .create( document.querySelector( '#txtarea' ) ) 7 .create( document.querySelector( '#text' ) )
8 .catch( error => { 8 .catch( error => {
9 console.error( error ); 9 console.error( error );
10 } ); 10 } );
11 </script> 11 </script>
12 @endsection 12 @endsection
13 @section('content') 13 @section('content')
14 <section class="cabinet"> 14 <section class="cabinet">
15 <div class="container"> 15 <div class="container">
16 <ul class="breadcrumbs cabinet__breadcrumbs"> 16 <ul class="breadcrumbs cabinet__breadcrumbs">
17 <li><a href="{{ route('index') }}">Главная</a></li> 17 <li><a href="{{ route('index') }}">Главная</a></li>
18 <li><b>Личный кабинет</b></li> 18 <li><b>Личный кабинет</b></li>
19 </ul> 19 </ul>
20 <div class="cabinet__wrapper"> 20 <div class="cabinet__wrapper">
21 <div class="cabinet__side"> 21 <div class="cabinet__side">
22 <div class="cabinet__side-toper"> 22 <div class="cabinet__side-toper">
23 @include('employers.emblema') 23 @include('employers.emblema')
24 </div> 24 </div>
25 25
26 @include('employers.menu', ['item' => 1]) 26 @include('employers.menu', ['item' => 1])
27 27
28 </div> 28 </div>
29 <div class="cabinet__body"> 29 <div class="cabinet__body">
30 @include('messages_error') 30 @include('messages_error')
31 31
32 <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data"> 32 <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data">
33 @csrf 33 @csrf
34 <div class="cabinet__body-item"> 34 <div class="cabinet__body-item">
35 <div class="cabinet__descr"> 35 <div class="cabinet__descr">
36 <h2 class="title cabinet__title">Мой профиль</h2> 36 <h2 class="title cabinet__title">Мой профиль</h2>
37 <p class="cabinet__text">Все поля обязательны для заполнения *</p> 37 <p class="cabinet__text">Все поля обязательны для заполнения *</p>
38 </div> 38 </div>
39 <div class="cabinet__avatar"> 39 <div class="cabinet__avatar">
40 <div class="cabinet__avatar-pic"> 40 <div class="cabinet__avatar-pic">
41 @if (!empty($Employer[0]->logo)) 41 @if (!empty($Employer[0]->logo))
42 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> 42 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}">
43 @else 43 @else
44 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> 44 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/>
45 @endif 45 @endif
46 </div> 46 </div>
47 <div class="cabinet__avatar-form"> 47 <div class="cabinet__avatar-form">
48 <label class="file"> 48 <label class="file">
49 <span class="file__input"> 49 <span class="file__input">
50 <input type="file" name="logo"> 50 <input type="file" name="logo">
51 <span class="button"> 51 <span class="button">
52 <svg> 52 <svg>
53 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 53 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
54 </svg> 54 </svg>
55 Загрузить 55 Загрузить
56 </span> 56 </span>
57 </span> 57 </span>
58 </label> 58 </label>
59 <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p> 59 <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p>
60 </div> 60 </div>
61 </div> 61 </div>
62 <div class="cabinet__inputs"> 62 <div class="cabinet__inputs">
63 <div class="cabinet__inputs-item form-group"> 63 <div class="cabinet__inputs-item form-group">
64 <label class="form-group__label">Название судоходной компании</label> 64 <label class="form-group__label">Название судоходной компании</label>
65 <div class="form-group__item"> 65 <div class="form-group__item">
66 <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required> 66 <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required>
67 @error('name_company') 67 @error('name_company')
68 <span class="text-xs text-red-600"> 68 <span class="text-xs text-red-600">
69 {{ $message }} 69 {{ $message }}
70 </span> 70 </span>
71 @enderror 71 @enderror
72 </div> 72 </div>
73 </div> 73 </div>
74 <div class="cabinet__inputs-item form-group"> 74 <div class="cabinet__inputs-item form-group">
75 <label class="form-group__label">Электронная почта</label> 75 <label class="form-group__label">Электронная почта</label>
76 <div class="form-group__item"> 76 <div class="form-group__item">
77 <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required> 77 <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required>
78 @error('email') 78 @error('email')
79 <span class="text-xs text-red-600"> 79 <span class="text-xs text-red-600">
80 {{ $message }} 80 {{ $message }}
81 </span> 81 </span>
82 @enderror 82 @enderror
83 </div> 83 </div>
84 </div> 84 </div>
85 85
86 <div class="cabinet__inputs-item form-group"> 86 <div class="cabinet__inputs-item form-group">
87 <label class="form-group__label">Электронная почта (alt)</label> 87 <label class="form-group__label">Электронная почта (alt)</label>
88 <div class="form-group__item"> 88 <div class="form-group__item">
89 <input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}"> 89 <input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}">
90 @error('email') 90 @error('email')
91 <span class="text-xs text-red-600"> 91 <span class="text-xs text-red-600">
92 {{ $message }} 92 {{ $message }}
93 </span> 93 </span>
94 @enderror 94 @enderror
95 </div> 95 </div>
96 </div> 96 </div>
97 97
98 <div class="cabinet__inputs-item form-group"> 98 <div class="cabinet__inputs-item form-group">
99 <label class="form-group__label">Номер телефона</label> 99 <label class="form-group__label">Номер телефона</label>
100 <div class="form-group__item"> 100 <div class="form-group__item">
101 <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required> 101 <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required>
102 @error('telephone') 102 @error('telephone')
103 <span class="text-xs text-red-600"> 103 <span class="text-xs text-red-600">
104 {{ $message }} 104 {{ $message }}
105 </span> 105 </span>
106 @enderror 106 @enderror
107 </div> 107 </div>
108 </div> 108 </div>
109 109
110 <div class="cabinet__inputs-item form-group"> 110 <div class="cabinet__inputs-item form-group">
111 <label class="form-group__label">Номер телефона (alt)</label> 111 <label class="form-group__label">Номер телефона (alt)</label>
112 <div class="form-group__item"> 112 <div class="form-group__item">
113 <input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}"> 113 <input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}">
114 @error('telephone') 114 @error('telephone')
115 <span class="text-xs text-red-600"> 115 <span class="text-xs text-red-600">
116 {{ $message }} 116 {{ $message }}
117 </span> 117 </span>
118 @enderror 118 @enderror
119 </div> 119 </div>
120 </div> 120 </div>
121 121
122 <div class="cabinet__inputs-item form-group"> 122 <div class="cabinet__inputs-item form-group">
123 <label class="form-group__label">Адрес компании</label> 123 <label class="form-group__label">Адрес компании</label>
124 <div class="form-group__item"> 124 <div class="form-group__item">
125 <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required> 125 <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required>
126 @error('address') 126 @error('address')
127 <span class="text-xs text-red-600"> 127 <span class="text-xs text-red-600">
128 {{ $message }} 128 {{ $message }}
129 </span> 129 </span>
130 @enderror 130 @enderror
131 </div> 131 </div>
132 </div> 132 </div>
133 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 133 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
134 <label class="form-group__label">Ссылка на сайт</label> 134 <label class="form-group__label">Ссылка на сайт</label>
135 <div class="form-group__item"> 135 <div class="form-group__item">
136 <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required> 136 <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required>
137 @error('site') 137 @error('site')
138 <span class="text-xs text-red-600"> 138 <span class="text-xs text-red-600">
139 {{ $message }} 139 {{ $message }}
140 </span> 140 </span>
141 @enderror 141 @enderror
142 </div> 142 </div>
143 </div> 143 </div>
144 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 144 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
145 <label class="form-group__label">О компании</label> 145 <label class="form-group__label">О компании</label>
146 <div class="form-group__item"> 146 <div class="form-group__item">
147 <textarea name="text" id="txtarea" class="textarea ckeditor" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> 147 <textarea name="text" id="txtarea" class="textarea ckeditor" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea>
148 @error('text') 148 @error('text')
149 <span class="text-xs text-red-600"> 149 <span class="text-xs text-red-600">
150 {{ $message }} 150 {{ $message }}
151 </span> 151 </span>
152 @enderror 152 @enderror
153 </div> 153 </div>
154 </div> 154 </div>
155 </div> 155 </div>
156 </div><br> 156 </div><br>
157 <button type="submit" class="button cabinet__submit">Сохранить изменения</button> 157 <button type="submit" class="button cabinet__submit">Сохранить изменения</button>
158 </form> 158 </form>
159 159
160 </div> 160 </div>
161 </div> 161 </div>
162 </div> 162 </div>
163 163
164 </section> 164 </section>
165 </div> 165 </div>
166 <!-- END TOP WRAPPER --> 166 <!-- END TOP WRAPPER -->
167 @endsection 167 @endsection
168 168
resources/views/js/captha.blade.php
File was created 1 <script>
2 var code;
3 var code2;
4
5 function createCaptcha() {
6 //clear the contents of captcha div first
7 var captha1 = $('#captcha1').html();
8 var captha2 = $('#captcha2').html();
9
10 console.log('captha1='+captha1);
11 console.log('captha2='+captha2);
12
13 document.getElementById('captcha1').innerHTML = "";
14 document.getElementById('captcha2').innerHTML = "";
15 var charsArray =
16 "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
17 var lengthOtp = 6;
18 var captcha = [];
19 for (var i = 0; i < lengthOtp; i++) {
20 //below code will not allow Repetition of Characters
21 var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
22 if (captcha.indexOf(charsArray[index]) == -1)
23 captcha.push(charsArray[index]);
24 else i--;
25 }
26 var canv = document.createElement("canvas");
27 canv.id = "captcha";
28 canv.width = 100;
29 canv.height = 50;
30 var ctx = canv.getContext("2d");
31 ctx.font = "25px Georgia";
32 ctx.strokeText(captcha.join(""), 0, 30);
33 //storing captcha so that can validate you can save it somewhere else according to your specific requirements
34 code = captcha.join("");
35
36 document.getElementById("captcha1").appendChild(canv);
37 // adds the canvas to the body element
38
39 createCaptcha2()
40 }
41
42 function createCaptcha2() {
43 //clear the contents of captcha div first
44 document.getElementById('captcha2').innerHTML = "";
45 var charsArray =
46 "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
47 var lengthOtp = 6;
48 var captcha = [];
49 for (var i = 0; i < lengthOtp; i++) {
50 //below code will not allow Repetition of Characters
51 var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
52 if (captcha.indexOf(charsArray[index]) == -1)
53 captcha.push(charsArray[index]);
54 else i--;
55 }
56 var canv = document.createElement("canvas");
57 canv.id = "captcha";
58 canv.width = 100;
59 canv.height = 50;
60 var ctx = canv.getContext("2d");
61 ctx.font = "25px Georgia";
62 ctx.strokeText(captcha.join(""), 0, 30);
63 //storing captcha so that can validate you can save it somewhere else according to your specific requirements
64 code2 = captcha.join("");
65
66 document.getElementById("captcha2").appendChild(canv);
67 // adds the canvas to the body element
68 }
69
70 function validateCaptcha() {
71 if (document.getElementById("cpatchaTextBox").value == code) {
72 console.log('Валидная капча 1!');
73 }else{
74 alert("Неверная капча! Повторите вновь");
75 createCaptcha();
76 }
77 }
78
79 function validateCaptcha2() {
80 if (document.getElementById("cpatchaTextBox2").value == code2) {
81 console.log('Валидная капча 2!');
82 }else{
83 alert("Неверная капча! Повторите вновь");
84 createCaptcha();
85 }
86 }
87 </script>
88
89 <script>
90 $(document).ready(function() {
91 let form1 = document.getElementById('form1');
92 form1.addEventListener('submit', function (event) {
93 if (document.getElementById("cpatchaTextBox").value == code) {
94 console.log('Валидный кот');
95 return true;
96 } else {
97 console.log('Ошибка1');
98 event.preventDefault();
99 return false;
100 }
101 });
102
103 let form2 = document.getElementById('form2');
104 form2.addEventListener('submit', function (event) {
105 if (document.getElementById("cpatchaTextBox2").value == code2) {
106 console.log('Валидный кот');
107 return true;
108 } else {
109 console.log('Ошибка2');
110 event.preventDefault();
111 return false;
112 }
113 });
114 });
115 </script>
116
resources/views/js/modals.blade.php
1 <script> 1 <script>
2 var code;
3 var code2;
4
5 function createCaptcha() {
6 //clear the contents of captcha div first
7 var captha1 = $('#captcha1').html();
8
9 console.log('captha1='+captha1);
10
11 document.getElementById('captcha1').innerHTML = "";
12 document.getElementById('captcha2').innerHTML = "";
13 var charsArray =
14 "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
15 var lengthOtp = 6;
16 var captcha = [];
17 for (var i = 0; i < lengthOtp; i++) {
18 //below code will not allow Repetition of Characters
19 var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
20 if (captcha.indexOf(charsArray[index]) == -1)
21 captcha.push(charsArray[index]);
22 else i--;
23 }
24 var canv = document.createElement("canvas");
25 canv.id = "captcha";
26 canv.width = 100;
27 canv.height = 50;
28 var ctx = canv.getContext("2d");
29 ctx.font = "25px Georgia";
30 ctx.strokeText(captcha.join(""), 0, 30);
31 //storing captcha so that can validate you can save it somewhere else according to your specific requirements
32 code = captcha.join("");
33
34 document.getElementById("captcha1").appendChild(canv);
35 // adds the canvas to the body element
36
37 createCaptcha2()
38 }
39
40 function createCaptcha2() {
41 //clear the contents of captcha div first
42 document.getElementById('captcha2').innerHTML = "";
43
44 var captha2 = $('#captcha2').html();
45
46 var charsArray =
47 "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%^&*";
48 var lengthOtp = 6;
49 var captcha = [];
50 for (var i = 0; i < lengthOtp; i++) {
51 //below code will not allow Repetition of Characters
52 var index = Math.floor(Math.random() * charsArray.length + 1); //get the next character from the array
53 if (captcha.indexOf(charsArray[index]) == -1)
54 captcha.push(charsArray[index]);
55 else i--;
56 }
57 var canv = document.createElement("canvas");
58 canv.id = "captcha";
59 canv.width = 100;
60 canv.height = 50;
61 var ctx = canv.getContext("2d");
62 ctx.font = "25px Georgia";
63 ctx.strokeText(captcha.join(""), 0, 30);
64 //storing captcha so that can validate you can save it somewhere else according to your specific requirements
65 code2 = captcha.join("");
66
67 document.getElementById("captcha2").appendChild(canv);
68 // adds the canvas to the body element
69 }
70
71 function validateCaptcha() {
72
73 if (document.getElementById("cpatchaTextBox").value == code) {
74 console.log('Валидная капча 1!');
75 }else{
76 alert("Неверная капча! Повторите вновь");
77 createCaptcha();
78 }
79 }
80
81 function validateCaptcha2() {
82 if (document.getElementById("cpatchaTextBox2").value == code2) {
83 console.log('Валидная капча 2!');
84 }else{
85 alert("Неверная капча! Повторите вновь");
86 createCaptcha();
87 }
88 }
89
2 console.log('Test system'); 90 console.log('Test system');
3 $(document).on('click', '#button_send', function() { 91 $(document).on('click', '#button_send', function() {
4 var field_login = $('#email_input'); 92 var field_login = $('#email_input');
5 var field_pwd = $('#password'); 93 var field_pwd = $('#password');
6 var login_val = field_login.val(); 94 var login_val = field_login.val();
7 var pwd_val = field_pwd.val(); 95 var pwd_val = field_pwd.val();
8 96
9 console.log('login: '+login_val+' password: '+pwd_val); 97 console.log('login: '+login_val+' password: '+pwd_val);
10 98
11 $.ajax({ 99 $.ajax({
12 type: "GET", 100 type: "GET",
13 url: "{{ route('login') }}", 101 url: "{{ route('login') }}",
14 data: "email="+login_val+"&password="+pwd_val, 102 data: "email="+login_val+"&password="+pwd_val,
15 success: function (data) { 103 success: function (data) {
16 console.log('Вход в систему'); 104 console.log('Вход в систему');
17 console.log(data); 105 console.log(data);
18 let d = JSON.parse(data); 106 let d = JSON.parse(data);
19 if(typeof d['REDIRECT'] !== "undefined") { 107 if(typeof d['REDIRECT'] !== "undefined") {
20 location.href = d['REDIRECT']; 108 location.href = d['REDIRECT'];
21 console.log(d['REDIRECT']); 109 console.log(d['REDIRECT']);
22 } 110 }
23 if (typeof d['ERROR'] !== "undefined") { 111 if (typeof d['ERROR'] !== "undefined") {
24 console.log(d['ERROR']); 112 console.log(d['ERROR']);
25 $('#message_error').html(d['ERROR']); 113 $('#message_error').html(d['ERROR']);
26 } 114 }
27 //console.log(d['REDIRECT']); 115 //console.log(d['REDIRECT']);
28 //$('#block_1').html(data); 116 //$('#block_1').html(data);
29 }, 117 },
30 headers: { 118 headers: {
31 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 119 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
32 }, 120 },
33 error: function (data) { 121 error: function (data) {
34 data = JSON.stringify(data); 122 data = JSON.stringify(data);
35 console.log('Error: ' + data); 123 console.log('Error: ' + data);
36 } 124 }
37 }); 125 });
38 }); 126 });
39 127
40 $(document).on('click', '#button_reg_worker', function() { 128 $(document).on('click', '#button_reg_worker', function() {
41 var field_login = $('#email_worker'); 129 var field_login = $('#email_worker');
42 var field_pwd = $('#password_worker'); 130 var field_pwd = $('#password_worker');
43 var field_confirm_pwd = $('#password_confirmation_worker'); 131 var field_confirm_pwd = $('#password_confirmation_worker');
44 var field_politik_worker = $('#politik'); 132 var field_politik_worker = $('#politik');
45 var field_telephone_worker = $('#telephone_worker'); 133 var field_telephone_worker = $('#telephone_worker');
46 var field_job_titles_worker = $('#job_titles_worker'); 134 var field_job_titles_worker = $('#job_titles_worker');
47 var field_surname_worker = $('#surname_worker'); 135 var field_surname_worker = $('#surname_worker');
48 var field_name_man = $('#name_man_worker'); 136 var field_name_man = $('#name_man_worker');
49 var field_surname2_worker = $('#surname2_worker'); 137 var field_surname2_worker = $('#surname2_worker');
50 138
51 var login = field_login.val(); 139 var login = field_login.val();
52 var pwd = field_pwd.val(); 140 var pwd = field_pwd.val();
53 var confirm_pwd = field_confirm_pwd.val(); 141 var confirm_pwd = field_confirm_pwd.val();
54 var politik = field_politik_worker.val(); 142 var politik = field_politik_worker.val();
55 var telephone = field_telephone_worker.val(); 143 var telephone = field_telephone_worker.val();
56 var job_titles = field_job_titles_worker.val(); 144 var job_titles = field_job_titles_worker.val();
57 var surname = field_surname_worker.val(); 145 var surname = field_surname_worker.val();
58 var name_man = field_name_man.val(); 146 var name_man = field_name_man.val();
59 var surname2 = field_surname2_worker.val(); 147 var surname2 = field_surname2_worker.val();
60 148
61 149
150 if (document.getElementById("cpatchaTextBox1").value == code) {
151 console.log('Валидный кот');
152
153 } else {
154 console.log('Ошибка1');
155 event.preventDefault();
156 $('#block-info').css({'display': 'block'});
157 $('#messages_error_reg').html('ERROR: Капча неверная!');
158
159 return false;
160 }
161
62 if (field_politik_worker.attr('checked')) { 162 if (field_politik_worker.attr('checked')) {
63 console.log('politik=1'); 163 console.log('politik=1');
64 politik = 1; 164 politik = 1;
65 } else { 165 } else {
66 politik = 0; 166 politik = 0;
67 console.log('politik=0'); 167 console.log('politik=0');
168
68 } 169 }
69 170
70 console.log('login: '+login+' password: '+pwd); 171 console.log('login: '+login+' password: '+pwd);
71 172
72 $.ajax({ 173 $.ajax({
73 type: "GET", 174 type: "GET",
74 url: "{{ route('register_worker') }}", 175 url: "{{ route('register_worker') }}",
75 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+ 176 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
76 "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+ 177 "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+
77 "&surname2="+surname2+"&subscribe_email="+login, 178 "&surname2="+surname2+"&subscribe_email="+login,
78 success: function (data) { 179 success: function (data) {
79 console.log('Вход в систему'); 180 console.log('Вход в систему');
80 let d = JSON.parse(data); 181 let d = JSON.parse(data);
81 if(typeof d['REDIRECT'] !== "undefined") { 182 if(typeof d['REDIRECT'] !== "undefined") {
82 console.log(d['REDIRECT']); 183 console.log(d['REDIRECT']);
83 location.href = d['REDIRECT']; 184 location.href = d['REDIRECT'];
84 } 185 }
85 if (typeof d['ERROR'] !== "undefined") { 186 if (typeof d['ERROR'] !== "undefined") {
86 console.log(d['ERROR']); 187 console.log(d['ERROR']);
87 $('#block-info').css({'display': 'block'}); 188 $('#block-info').css({'display': 'block'});
88 $('#messages_error_reg').html(d['ERROR']); 189 $('#messages_error_reg').html(d['ERROR']);
89 } 190 }
90 console.log(d['REDIRECT']); 191 console.log(d['REDIRECT']);
91 192
92 }, 193 },
93 headers: { 194 headers: {
94 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 195 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
95 }, 196 },
96 error: function (data) { 197 error: function (data) {
97 data = JSON.stringify(data); 198 data = JSON.stringify(data);
98 console.log('Error: ' + data); 199 console.log('Error: ' + data);
99 } 200 }
100 }); 201 });
101 202
102 return false; 203 return false;
103 }); 204 });
104 205
105 $(document).on('click', '#button_reg_employer', function() { 206 $(document).on('click', '#button_reg_employer', function() {
106 var field_login = $('#email_employer'); 207 var field_login = $('#email_employer');
107 var field_pwd = $('#password_employer'); 208 var field_pwd = $('#password_employer');
108 var field_confirm_pwd = $('#password_confirmation_employer'); 209 var field_confirm_pwd = $('#password_confirmation_employer');
109 var field_politik_employer = $('#politik_employer'); 210 var field_politik_employer = $('#politik_employer');
110 var field_telephone_employer = $('#telephone_employer'); 211 var field_telephone_employer = $('#telephone_employer');
111 var field_company_employer = $('#company_employer'); 212 var field_company_employer = $('#company_employer');
112 var field_surname_employer = $('#surname_employer'); 213 var field_surname_employer = $('#surname_employer');
113 var field_name_man_employer = $('#name_man_employer'); 214 var field_name_man_employer = $('#name_man_employer');
114 var field_surname2_employer = $('#surname2_employer'); 215 var field_surname2_employer = $('#surname2_employer');
115 216
116 var login = field_login.val(); 217 var login = field_login.val();
117 var pwd = field_pwd.val(); 218 var pwd = field_pwd.val();
118 var confirm_pwd = field_confirm_pwd.val(); 219 var confirm_pwd = field_confirm_pwd.val();
119 var politik = field_politik_employer.val(); 220 var politik = field_politik_employer.val();
120 var telephone = field_telephone_employer.val(); 221 var telephone = field_telephone_employer.val();
121 var company_employer = field_company_employer.val(); 222 var company_employer = field_company_employer.val();
122 var surname = field_surname_employer.val(); 223 var surname = field_surname_employer.val();
123 var name_man = field_name_man_employer.val(); 224 var name_man = field_name_man_employer.val();
124 var surname2 = field_surname2_employer.val(); 225 var surname2 = field_surname2_employer.val();
125 226
227 if (document.getElementById("cpatchaTextBox2").value == code2) {
228 console.log('Валидный кот');
229
230 } else {
231 console.log('Ошибка2');
232 event.preventDefault();
233 $('#block-info').css({'display': 'block'});
234 $('#messages_error_reg').html('ERROR: Капча неверная!');
235 return false;
236 }
126 237
127 console.log('login: '+login+' password: '+pwd); 238 console.log('login: '+login+' password: '+pwd);
128 239
129 if (field_politik_employer.attr('checked')) { 240 if (field_politik_employer.attr('checked')) {
130 console.log('politik=1'); 241 console.log('politik=1');
131 politik = 1; 242 politik = 1;
132 } else { 243 } else {
133 politik = 0; 244 politik = 0;
134 console.log('politik=0'); 245 console.log('politik=0');
135 } 246 }
247
136 $.ajax({ 248 $.ajax({
137 type: "GET", 249 type: "GET",
138 url: "{{ route('register_employer') }}", 250 url: "{{ route('register_employer') }}",
139 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+ 251 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
140 "&telephone="+telephone+"&name_company="+company_employer+"&surname="+surname+"&name_man="+name_man+ 252 "&telephone="+telephone+"&name_company="+company_employer+"&surname="+surname+"&name_man="+name_man+
141 "&surname2="+surname2+"&subscribe_email="+login, 253 "&surname2="+surname2+"&subscribe_email="+login,
142 success: function (data) { 254 success: function (data) {
143 console.log('Вход в систему'); 255 console.log('Вход в систему');
144 let d = JSON.parse(data); 256 let d = JSON.parse(data);
145 if(typeof d['REDIRECT'] !== "undefined") { 257 if(typeof d['REDIRECT'] !== "undefined") {
146 console.log(d['REDIRECT']); 258 console.log(d['REDIRECT']);
147 location.href = d['REDIRECT']; 259 location.href = d['REDIRECT'];
148 } 260 }
149 if (typeof d['ERROR'] !== "undefined") { 261 if (typeof d['ERROR'] !== "undefined") {
150 console.log(d['ERROR']); 262 console.log(d['ERROR']);
151 $('#block-info').css({'display': 'block'}); 263 $('#block-info').css({'display': 'block'});
152 $('#messages_error_reg').html(d['ERROR']); 264 $('#messages_error_reg').html(d['ERROR']);
153 } 265 }
154 console.log(d['REDIRECT']); 266 console.log(d['REDIRECT']);
155 }, 267 },
156 headers: { 268 headers: {
157 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 269 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
158 }, 270 },
159 error: function (data) { 271 error: function (data) {
160 data = JSON.stringify(data); 272 data = JSON.stringify(data);
161 console.log('Error: ' + data); 273 console.log('Error: ' + data);
162 } 274 }
163 }); 275 });
164
165 return false; 276 return false;
166 }); 277 });
167
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/star-rating.min.css') }}"> 11 <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}">
12 <link rel="stylesheet" href="{{ asset('css/style45.css') }}"> 12 <link rel="stylesheet" href="{{ asset('css/style45.css') }}">
13 <style> 13 <style>
14 .err_red { 14 .err_red {
15 border: red 2px solid; 15 border: red 2px solid;
16 } 16 }
17 </style> 17 </style>
18 </head> 18 </head>
19 19
20 <body id="body"> 20 <body id="body" onload="createCaptcha()">
21 <a href="#body" class="to-top js-scroll-to"> 21 <a href="#body" class="to-top js-scroll-to">
22 <svg> 22 <svg>
23 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 23 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
24 </svg> 24 </svg>
25 </a> 25 </a>
26 26
27 <div> <!-- BEGIN TOP WRAPPER --> 27 <div> <!-- BEGIN TOP WRAPPER -->
28 <header class="header"> 28 <header class="header">
29 <div class="container"> 29 <div class="container">
30 <div class="header__body"> 30 <div class="header__body">
31 <div class="header__left"> 31 <div class="header__left">
32 <a href="{{ route('index') }}" class="header__logo"> 32 <a href="{{ route('index') }}" class="header__logo">
33 <svg> 33 <svg>
34 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 34 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
35 </svg> 35 </svg>
36 </a> 36 </a>
37 <nav class="header__menu"> 37 <nav class="header__menu">
38 <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> 38 <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a>
39 <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> 39 <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a>
40 <a href="{{ route('education') }}" class="header__menu-item">Образование</a> 40 <a href="{{ route('education') }}" class="header__menu-item">Образование</a>
41 </nav> 41 </nav>
42 </div> 42 </div>
43 <div class="header__right"> 43 <div class="header__right">
44 @guest 44 @guest
45 45
46 @else 46 @else
47 <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> 47 <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived">
48 <svg> 48 <svg>
49 <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> 49 <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use>
50 </svg> 50 </svg>
51 <span>Уведомления</span> 51 <span>Уведомления</span>
52 </a> 52 </a>
53 53
54 @endguest 54 @endguest
55 <div class="header__right-line"></div> 55 <div class="header__right-line"></div>
56 <button class="header__burger"> 56 <button class="header__burger">
57 <svg> 57 <svg>
58 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> 58 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use>
59 </svg> 59 </svg>
60 </button> 60 </button>
61 @guest 61 @guest
62 <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> 62 <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a>
63 @else 63 @else
64 <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> 64 <a class="button header__sign" href="{{ route('logout') }}">Выйти</a>
65 @endguest 65 @endguest
66 </div> 66 </div>
67 </div> 67 </div>
68 </div> 68 </div>
69 </header> 69 </header>
70 @yield('content') 70 @yield('content')
71 </div> <!-- END TOP WRAPPER --> 71 </div> <!-- END TOP WRAPPER -->
72 72
73 <div> <!-- BEGIN BOTTOM WRAPPER --> 73 <div> <!-- BEGIN BOTTOM WRAPPER -->
74 <footer class="footer"> 74 <footer class="footer">
75 <div class="container"> 75 <div class="container">
76 <div class="footer__mobile"> 76 <div class="footer__mobile">
77 77
78 <button class="footer__mobile-toper js-toggle active"> 78 <button class="footer__mobile-toper js-toggle active">
79 <a href="{{ route('index') }}"> 79 <a href="{{ route('index') }}">
80 <svg> 80 <svg>
81 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 81 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
82 </svg> 82 </svg>
83 </a> 83 </a>
84 <span> 84 <span>
85 <svg> 85 <svg>
86 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 86 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
87 </svg> 87 </svg>
88 </span> 88 </span>
89 </button> 89 </button>
90 <div class="footer__mobile-menu"> 90 <div class="footer__mobile-menu">
91 <div class="footer__mobile-menu-item"> 91 <div class="footer__mobile-menu-item">
92 <button class="js-toggle"> 92 <button class="js-toggle">
93 <b>Соискателям</b> 93 <b>Соискателям</b>
94 <span><svg> 94 <span><svg>
95 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 95 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
96 </svg></span> 96 </svg></span>
97 </button> 97 </button>
98 <div> 98 <div>
99 <a href="{{ route('vacancies') }}">Вакансии</a> 99 <a href="{{ route('vacancies') }}">Вакансии</a>
100 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> 100 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
101 <a href="{{ route('education') }}">Образование</a> 101 <a href="{{ route('education') }}">Образование</a>
102 <a href="{{ route('news') }}">Новости</a> 102 <a href="{{ route('news') }}">Новости</a>
103 <a href="{{ route('contacts') }}">Контакты</a> 103 <a href="{{ route('contacts') }}">Контакты</a>
104 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> 104 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
105 </div> 105 </div>
106 </div> 106 </div>
107 <div class="footer__mobile-menu-item"> 107 <div class="footer__mobile-menu-item">
108 <button class="js-toggle"> 108 <button class="js-toggle">
109 <b>Работодателям</b> 109 <b>Работодателям</b>
110 <span><svg> 110 <span><svg>
111 <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> 111 <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use>
112 </svg></span> 112 </svg></span>
113 </button> 113 </button>
114 <div> 114 <div>
115 <a href="{{ route('register') }}">Регистрация</a> 115 <a href="{{ route('register') }}">Регистрация</a>
116 <a href="{{ route('bd_resume') }}">База резюме</a> 116 <a href="{{ route('bd_resume') }}">База резюме</a>
117 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> 117 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
118 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> 118 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
119 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> 119 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
120 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> 120 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
121 </div> 121 </div>
122 </div> 122 </div>
123 </div> 123 </div>
124 <div class="footer__mobile-contacts"> 124 <div class="footer__mobile-contacts">
125 <b>Контакты</b> 125 <b>Контакты</b>
126 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> 126 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a>
127 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> 127 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a>
128 </div> 128 </div>
129 <div class="footer__mobile-bottom"> 129 <div class="footer__mobile-bottom">
130 <div class="socials"> 130 <div class="socials">
131 <a href="{{ $companies[0]->vkontact }}" target="_blank"> 131 <a href="{{ $companies[0]->vkontact }}" target="_blank">
132 <svg> 132 <svg>
133 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 133 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
134 </svg> 134 </svg>
135 </a> 135 </a>
136 <a href="{{ $companies[0]->telegram }}" target="_blank"> 136 <a href="{{ $companies[0]->telegram }}" target="_blank">
137 <svg> 137 <svg>
138 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 138 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
139 </svg> 139 </svg>
140 </a> 140 </a>
141 </div> 141 </div>
142 <nav class="footer__mobile-links"> 142 <nav class="footer__mobile-links">
143 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> 143 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a>
144 <span></span> 144 <span></span>
145 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> 145 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a>
146 </nav> 146 </nav>
147 &copy; 2023 &mdash; RekaMore.su 147 &copy; 2023 &mdash; RekaMore.su
148 <a href="{{ route('index') }}" class="nls" target="_blank"> 148 <a href="{{ route('index') }}" class="nls" target="_blank">
149 <svg> 149 <svg>
150 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> 150 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use>
151 </svg> 151 </svg>
152 <span> 152 <span>
153 Дизайн и разработка: 153 Дизайн и разработка:
154 <b>NoLogoStudio.ru</b> 154 <b>NoLogoStudio.ru</b>
155 </span> 155 </span>
156 </a> 156 </a>
157 </div> 157 </div>
158 </div> 158 </div>
159 <div class="footer__main"> 159 <div class="footer__main">
160 <div class="footer__main-body"> 160 <div class="footer__main-body">
161 161
162 <a href="" class="footer__main-logo"> 162 <a href="" class="footer__main-logo">
163 <svg> 163 <svg>
164 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 164 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
165 </svg> 165 </svg>
166 </a> 166 </a>
167 <div class="footer__main-col"> 167 <div class="footer__main-col">
168 <div class="footer__main-title">Соискателям</div> 168 <div class="footer__main-title">Соискателям</div>
169 <nav> 169 <nav>
170 <a href="{{ route('vacancies') }}">Вакансии</a> 170 <a href="{{ route('vacancies') }}">Вакансии</a>
171 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> 171 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
172 <a href="{{ route('education') }}">Образование</a> 172 <a href="{{ route('education') }}">Образование</a>
173 <a href="{{ route('news') }}">Новости</a> 173 <a href="{{ route('news') }}">Новости</a>
174 <a href="{{ route('contacts') }}">Контакты</a> 174 <a href="{{ route('contacts') }}">Контакты</a>
175 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> 175 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
176 </nav> 176 </nav>
177 </div> 177 </div>
178 <div class="footer__main-col"> 178 <div class="footer__main-col">
179 <div class="footer__main-title">Работодателям</div> 179 <div class="footer__main-title">Работодателям</div>
180 <nav> 180 <nav>
181 <a href="{{ route('register') }}">Регистрация</a> 181 <a href="{{ route('register') }}">Регистрация</a>
182 <a href="{{ route('bd_resume') }}">База резюме</a> 182 <a href="{{ route('bd_resume') }}">База резюме</a>
183 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> 183 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
184 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> 184 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
185 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> 185 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
186 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> 186 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
187 </nav> 187 </nav>
188 </div> 188 </div>
189 189
190 <div class="footer__main-col"> 190 <div class="footer__main-col">
191 <div class="footer__main-title">Контакты</div> 191 <div class="footer__main-title">Контакты</div>
192 <div class="footer__main-contacts"> 192 <div class="footer__main-contacts">
193 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> 193 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a>
194 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> 194 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a>
195 </div> 195 </div>
196 <div class="socials"> 196 <div class="socials">
197 <a href="{{ $companies[0]->vkontact }}" target="_blank"> 197 <a href="{{ $companies[0]->vkontact }}" target="_blank">
198 <svg> 198 <svg>
199 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 199 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
200 </svg> 200 </svg>
201 </a> 201 </a>
202 <a href="{{ $companies[0]->telegram }}" target="_blank"> 202 <a href="{{ $companies[0]->telegram }}" target="_blank">
203 <svg> 203 <svg>
204 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 204 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
205 </svg> 205 </svg>
206 </a> 206 </a>
207 </div> 207 </div>
208 </div> 208 </div>
209 </div> 209 </div>
210 210
211 <div class="footer__main-copy"> 211 <div class="footer__main-copy">
212 <div>&copy; 2023 &mdash; RekaMore.su</div> 212 <div>&copy; 2023 &mdash; RekaMore.su</div>
213 <nav> 213 <nav>
214 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> 214 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a>
215 <span></span> 215 <span></span>
216 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> 216 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a>
217 </nav> 217 </nav>
218 <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div> 218 <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div>
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_new') 236 @include('modals.send_worker_new')
237 237
238 <!-- Работодатель отправляет сообщение соискателю --> 238 <!-- Работодатель отправляет сообщение соискателю -->
239 @include('modals.send_employer') 239 @include('modals.send_employer')
240 240
241 <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> 241 <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям -->
242 @include('modals.send_message_noaut') 242 @include('modals.send_message_noaut')
243 243
244 @include('modals.send_message_noaut2') 244 @include('modals.send_message_noaut2')
245 245
246 <!-- Форма авторизации --> 246 <!-- Форма авторизации -->
247 @include('modals.send_login') 247 @include('modals.send_login')
248 248
249 <!-- Сбросить пароль --> 249 <!-- Сбросить пароль -->
250 @include('modals.reset_password') 250 @include('modals.reset_password')
251 251
252 <!-- Регистрация --> 252 <!-- Регистрация -->
253 @include('modals.register') 253 @include('modals.register')
254 254
255 <!-- Благодарность по отправке сообщения работодателю --> 255 <!-- Благодарность по отправке сообщения работодателю -->
256 @include('modals.thank_you_send_employer') 256 @include('modals.thank_you_send_employer')
257 257
258 <!-- Благодарность по отправке сообщения менеджеру --> 258 <!-- Благодарность по отправке сообщения менеджеру -->
259 @include('modals.thank_you_send_manager') 259 @include('modals.thank_you_send_manager')
260 260
261 <!-- Благодарность после регистрации --> 261 <!-- Благодарность после регистрации -->
262 @include('modals.thank_you_send_for_employer') 262 @include('modals.thank_you_send_for_employer')
263 263
264 <!-- Благодарность после регистрации для работника --> 264 <!-- Благодарность после регистрации для работника -->
265 @include('modals.thank_you_send_for_worker') 265 @include('modals.thank_you_send_for_worker')
266 266
267 <!-- Подтверждение удаления профиля --> 267 <!-- Подтверждение удаления профиля -->
268 @include('modals.delete_profile') 268 @include('modals.delete_profile')
269 269
270 <!-- Подверждение об удалении профиля --> 270 <!-- Подверждение об удалении профиля -->
271 @include('modals.success_delete_profile') 271 @include('modals.success_delete_profile')
272 272
273 </div> <!-- END MODALS WRAPPER --> 273 </div> <!-- END MODALS WRAPPER -->
274 274
275 275
276 <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> 276 <script src="{{ asset('js/jquery.maskedinput.js') }}"></script>
277 <script src="{{ asset('js/jquery.fancybox.js') }}"></script> 277 <script src="{{ asset('js/jquery.fancybox.js') }}"></script>
278 <script src="{{ asset('js/jquery.select2.js') }}"></script> 278 <script src="{{ asset('js/jquery.select2.js') }}"></script>
279 <script src="{{ asset('js/swiper.js') }}"></script> 279 <script src="{{ asset('js/swiper.js') }}"></script>
280 <script src="{{ asset('js/script-vc.js') }}"></script> 280 <script src="{{ asset('js/script-vc.js') }}"></script>
281 <script src="{{ asset('js/star-rating.min.js') }}"></script> 281 <script src="{{ asset('js/star-rating.min.js') }}"></script>
282 <script> 282 <script>
283 var getUrlParameter = function getUrlParameter(sParam) { 283 var getUrlParameter = function getUrlParameter(sParam) {
284 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 284 var sPageURL = decodeURIComponent(window.location.search.substring(1)),
285 sURLVariables = sPageURL.split('&'), 285 sURLVariables = sPageURL.split('&'),
286 sParameterName, 286 sParameterName,
287 i; 287 i;
288 for (i = 0; i < sURLVariables.length; i++) { 288 for (i = 0; i < sURLVariables.length; i++) {
289 sParameterName = sURLVariables[i].split('='); 289 sParameterName = sURLVariables[i].split('=');
290 if (sParameterName[0] === sParam) { 290 if (sParameterName[0] === sParam) {
291 return sParameterName[1] === undefined ? true : sParameterName[1]; 291 return sParameterName[1] === undefined ? true : sParameterName[1];
292 } 292 }
293 } 293 }
294 }; 294 };
295 </script> 295 </script>
296 @yield('scripts')
297
298 @include('js.modals') 296 @include('js.modals')
299 @include('js.cookies') 297 @include('js.captha')
300 298 @yield('scripts')
301 </body> 299 </body>
302 </html> 300 </html>
303 301
resources/views/layout/pdf-list-people.blade.php
File was created 1 <!DOCTYPE html>
2 <html lang="ru">
3
4 <head>
5 <meta charset="utf-8">
6 <title>Резюме соискателя</title>
7 <meta name="viewport" content="width=device-width,initial-scale=1">
8 <meta name="theme-color" content="#377D87">
9 <link rel="stylesheet" href="{{ asset('css/style.css') }}">
10 <style>
11 body {
12 font-family:'DejaVu Sans',sans-serif;
13 background:#fff;
14 font-size:1.6rem;
15 font-weight:400;
16 color:#363A3F;
17 }
18
19 .main {
20 padding: 30px 0;
21 }
22
23 .thing {
24 color: #3a3b3c;
25 /* background-color: #f2f5fc; */
26 }
27
28 .thing__profile {
29
30 }
31
32 .thing__profile-photo {
33 width: 200px;
34 border-radius: 8px;
35 float: left;
36 margin-right: 20px;
37 }
38
39 .thing__profile-body {
40
41 }
42
43 .thing__title {
44 width: 100%;
45 font-size: 32px;
46 font-weight: 700;
47 line-height: 1.1;
48 margin: 0;
49 }
50
51 .thing__text {
52 font-size: 14px;
53 line-height: 1.4;
54 margin: 15px 0 0 0;
55 }
56
57 .main__spoiler {
58 margin: 0px 0px 32px 0px;
59 }
60
61 .main__spoiler-body {
62
63 }
64
65 .main__table {
66 border-collapse: collapse;
67 table-layout: fixed;
68 font-size: 14px;
69 width: 100%;
70 background: #ffffff;
71 }
72
73 .main__table thead {
74 color: #ffffff;
75 font-size: 16px;
76 background-color: #377d87;
77 }
78
79 .main__table th {
80 padding: 8px 16px;
81 }
82
83 .main__table td {
84 width: 40%;
85 padding: 8px 16px;
86 border: 1px solid #cecece;
87 }
88
89 .main__table td b {
90 font-weight: 700;
91 }
92
93 .main__table b {
94 display: block;
95 }
96
97 .main__table a {
98 color: #377d87;
99 text-decoration: underline;
100 }
101
102 .main__table td + td {
103 width: 60%;
104 }
105
106 .main__table_three td {
107 width: 25% !important;
108 }
109
110 .main__table_three td:last-child {
111 width: 50% !important;
112 }
113
114 .main h2 {
115 margin: 0;
116 font-weight: 700;
117 font-size: 30px;
118 }
119
120 .main p {
121 margin: 0;
122 font-size: 14px;
123 line-height: 1.4;
124 margin: 15px 0 0 0;
125 }
126
127 .main__resume-profile-info {
128 margin: 30px 0px 0px 0px;
129 }
130
131 .main__resume-profile-info-title {
132 margin-bottom: 20px !important;
133 color: #3a3b3c;
134 }
135
136 .main__resume-profile-info-body-item {
137 margin: 0px 0px 20px 0px;
138 }
139
140 .main__resume-profile-info-body-subtitle {
141 color: #4d88d9;
142 margin: 0px 0px 10px 0px;
143 font-weight: 700;
144 font-size: 22px;
145 }
146
147 .main__resume-profile-info-body-inner {
148 margin: 0;
149 padding: 0;
150 font-size: 12px;
151 }
152
153 .main__resume-profile-info-body-inner li {
154 list-style-type: none;
155 margin: 0px 0px 20px 0px;
156 }
157
158 .main__resume-profile-info-body-inner b {
159 display: block;
160 margin: 0px 0px 6px 0px;
161 color: #377d87;
162 font-size: 14px;
163 }
164
165 .main__resume-profile-info-body-inner span {
166 display: block;
167 }
168
169 .main__resume-profile-info-body-inner a {
170 display: block;
171 text-decoration: none;
172 color: inherit;
173 }
174
175 </style>
176 </head>
177
178 <body id="body" class="pdf">
179 @if (count($Query) > 0)
180 @foreach ($Query as $Q)
181 <section class="thing thing_pdf">
182 <div class="container">
183 <div class="thing__profile">
184 <img src="{{ asset(Storage::url($Q['photo'])) }}" alt="" class="thing__profile-photo">
185 <div class="thing__profile-body">
186 <h1 class="thing__title">@if (isset($Q['users']['surname'])) {{ $Q['users']['surname']." ".$Q['users']['name_man']." ".$Q['users']['surname2'] }} @endif</h1>
187 <div style="clear:both;"></div>
188 <p class="thing__text">{{ $Q['text'] }}</p>
189 </div>
190 </div>
191 </div>
192 </section>
193 <main class="main">
194 <div class="container">
195
196 <!--php dd($Query); endphp-->
197
198 <div class="main__resume-profile">
199 <div class="main__content">
200 <div class="main__spoiler">
201
202 <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная
203 информация</button> -->
204 <div class="main__spoiler-body">
205 <table class="main__table">
206 <thead>
207 <tr>
208 <th colspan="2">Основная информация</th>
209 </tr>
210 </thead>
211 <tbody>
212 <tr>
213 <td>Имя:</td>
214 <td><b>@if (isset($Q['users']['name_man'])) {{ $Q['users']['name_man'] }} @endif</b></td>
215 </tr>
216 <tr>
217 <td>Должность:</td>
218 <td>
219 @foreach ($Q['job_titles'] as $it)
220 <b>{{ $it['name'] }}</b><br>
221 @endforeach
222 </td>
223 </tr>
224 <tr>
225 <td>Телефон:</td>
226 <td><b><a>{{ $Q['telephone'] }}</a></b>
227 <b><a>{{ $Q['telephone2'] }}</a></b>
228 </td>
229 </tr>
230 <tr>
231 <td>E-mail:</td>
232 <td><b><a>{{ $Q['email'] }}</a></b></td>
233 </tr>
234 <tr>
235 <td>Возраст:</td>
236 <td><b>{{ $Q['old_year'] }}</b></td>
237 </tr>
238 <tr>
239 <td>Статус:</td>
240 <td>
241 @php $code = $Q['status_work']; @endphp
242 <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td>
243 </tr>
244 <tr>
245 <td>Город проживания:</td>
246 <td><b>{{ $Q['city'] }}</b></td>
247 </tr>
248 <tr>
249 <td>Уровень английского:</td>
250 <td><b>{{ $Q['en_is'] }}</b></td>
251 </tr>
252 <tr>
253 <td>Опыт работы:</td>
254 <td><b>{{ $Q['old_year'] }}</b></td>
255 </tr>
256 </tbody>
257 </table>
258 </div>
259 </div>
260 <div class="main__spoiler">
261 <div class="main__spoiler-body">
262 <table class="main__table">
263 <thead>
264 <tr>
265 <th colspan="2">Сертификаты / документы</th>
266 </tr>
267 </thead>
268 <tbody>
269 @if (count($Q['sertificate']))
270 @foreach($Q['sertificate'] as $it)
271 <tr>
272 <td>{{ $it['name']." ".$it['education'] }}</td>
273 <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td>
274 </tr>
275 @endforeach
276 @else
277 <tr>
278 <td> - </td>
279 <td> - </td>
280 </tr>
281 @endif
282 </tbody>
283 </table>
284 </div>
285 </div>
286 <div class="main__spoiler">
287 <div class="main__spoiler-body">
288 <table class="main__table main__table_three">
289 <thead>
290 <tr>
291 <th colspan="3">Опыт работы</th>
292 </tr>
293 </thead>
294 <tbody>
295 @if (count($Q['place_worker']) > 0)
296 @foreach($Q['place_worker'] as $it)
297 <tr>
298 <td>{{ $it['begin_work']." - ".$it['end_work'] }}
299 </td>
300 <td><b>{{ $it['name_company'] }}</b>
301 </td>
302 <td><b>{{ $it['job_title'] }}</b>
303 Судно: {{ $it['teplohod'] }}
304 </td>
305 </tr>
306 @endforeach
307 @endif
308 </tbody>
309 </table>
310 </div>
311 </div>
312 </div>
313 <div class="main__resume-profile-about">
314 <h2 class="main__resume-profile-about-title">О себе</h2>
315 <p class="main__resume-profile-about-text">{{ $Q['text'] }}</p>
316
317 </div>
318 <div class="main__resume-profile-info">
319 <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2>
320 <div class="main__resume-profile-info-body">
321 @if ((isset($Q['prev_company'])) && (count($Q['prev_company']) > 0))
322 @foreach ($Q['prev_company'] as $it)
323 <div class="main__resume-profile-info-body-item">
324 <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3>
325 <ul class="main__resume-profile-info-body-inner">
326 <li>
327 <b>Руководитель</b>
328 <span>{{ $it['direct'] }}</span>
329 </li>
330 <li>
331 <b>Телефон того, кто может дать рекомендацию</b>
332 <span>
333 <a>{{ $it['telephone'] }}</a>
334 <a>{{ $it['telephone2'] }}</a>
335 </span>
336 </li>
337 </ul>
338 </div>
339 @endforeach
340 @endif
341 </div>
342 </div>
343 </div>
344
345 </div>
346 </main>
347 @endforeach
348 @endif
349 </body>
350 </html>
351
resources/views/list_vacancies.blade.php
1 @php 1 @php
2 use App\Classes\StatusUser; 2 use App\Classes\StatusUser;
3 @endphp 3 @endphp
4 4
5 @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) 5 @extends('layout.frontend', ['title' => 'Вакансии РекаМоре'])
6 6
7 @section('scripts') 7 @section('scripts')
8 <script> 8 <script>
9 console.log('Test system'); 9 console.log('Test system');
10 $(document).on('change', '#jobs', function() { 10 $(document).on('change', '#jobs', function() {
11 var val = $(this).val(); 11 var val = $(this).val();
12 var main_oskar = $('#main_ockar'); 12 var main_oskar = $('#main_ockar');
13 var ti_head = $('#title_head'); 13 var ti_head = $('#title_head');
14 14
15 console.log('Code='+val); 15 console.log('Code='+val);
16 console.log('Click change...'); 16 console.log('Click change...');
17 $.ajax({ 17 $.ajax({
18 type: "GET", 18 type: "GET",
19 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", 19 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}",
20 data: "job="+val, 20 data: "job="+val,
21 success: function (data) { 21 success: function (data) {
22 console.log('Выбор сделан!'); 22 console.log('Выбор сделан!');
23 23
24 main_oskar.html(data); 24 main_oskar.html(data);
25 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 25 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
26 }, 26 },
27 headers: { 27 headers: {
28 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 28 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
29 }, 29 },
30 error: function (data) { 30 error: function (data) {
31 data = JSON.stringify(data); 31 data = JSON.stringify(data);
32 console.log('Error: ' + data); 32 console.log('Error: ' + data);
33 } 33 }
34 }); 34 });
35 35
36 if ((val == '') || (val == '0')) { 36 if ((val == '') || (val == '0')) {
37 title_head.html('Все категории'); 37 title_head.html('Все категории');
38 } else { 38 } else {
39 $.ajax({ 39 $.ajax({
40 type: "GET", 40 type: "GET",
41 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif", 41 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif",
42 data: "job=" + val +"&title=1", 42 data: "job=" + val +"&title=1",
43 success: function (data) { 43 success: function (data) {
44 44
45 console.log(data); 45 console.log(data);
46 }, 46 },
47 47
48 headers: { 48 headers: {
49 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 49 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
50 }, 50 },
51 51
52 error: function (data) { 52 error: function (data) {
53 data = JSON.stringify(data); 53 data = JSON.stringify(data);
54 console.log('Error: ' + data); 54 console.log('Error: ' + data);
55 } 55 }
56 }); 56 });
57 57
58 } 58 }
59 }); 59 });
60 60
61 $(document).on('click', '.js_send_it_button', function() { 61 $(document).on('click', '.js_send_it_button', function() {
62 var this_ = $(this); 62 var this_ = $(this);
63 var code_user_id = this_.attr('data-uid'); 63 var code_user_id = this_.attr('data-uid');
64 var code_to_user_id = this_.attr('data-tuid'); 64 var code_to_user_id = this_.attr('data-tuid');
65 var code_vacancy = this_.attr('data-vacancy'); 65 var code_vacancy = this_.attr('data-vacancy');
66 var user_id = $('#_user_id'); 66 var user_id = $('#_user_id');
67 var to_user_id = $('#_to_user_id'); 67 var to_user_id = $('#_to_user_id');
68 var vacancy = $('#_vacancy'); 68 var vacancy = $('#_vacancy');
69 69
70 console.log('Клик на кнопки...'); 70 console.log('Клик на кнопки...');
71 71
72 user_id.val(code_user_id); 72 user_id.val(code_user_id);
73 to_user_id.val(code_to_user_id); 73 to_user_id.val(code_to_user_id);
74 vacancy.val(code_vacancy); 74 vacancy.val(code_vacancy);
75 }); 75 });
76 76
77 $(document).on('change', '#sort_ajax', function() { 77 $(document).on('change', '#sort_ajax', function() {
78 var this_ = $(this); 78 var this_ = $(this);
79 var val_ = this_.val(); 79 var val_ = this_.val();
80 console.log('sort items '+val_); 80 console.log('sort items '+val_);
81 81
82 $.ajax({ 82 $.ajax({
83 type: "GET", 83 type: "GET",
84 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", 84 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}",
85 data: "sort="+val_+"&block=1", 85 data: "sort="+val_+"&block=1",
86 success: function (data) { 86 success: function (data) {
87 console.log('Выбор сортировки'); 87 console.log('Выбор сортировки');
88 console.log(data); 88 console.log(data);
89 $('#main_ockar').html(data); 89 $('#main_ockar').html(data);
90 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 90 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
91 }, 91 },
92 headers: { 92 headers: {
93 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 93 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
94 }, 94 },
95 error: function (data) { 95 error: function (data) {
96 data = JSON.stringify(data); 96 data = JSON.stringify(data);
97 console.log('Error: ' + data); 97 console.log('Error: ' + data);
98 } 98 }
99 }); 99 });
100 }); 100 });
101 101
102 102
103 103
104 $(document).ready(function(){ 104 $(document).ready(function(){
105 var sel = $('#select2-sort_ajax-container'); 105 var sel = $('#select2-sort_ajax-container');
106 var key = getUrlParameter('sort'); 106 var key = getUrlParameter('sort');
107 console.log(sel); 107 console.log(sel);
108 console.log(key); 108 console.log(key);
109 109
110 if (key !=='') { 110 if (key !=='') {
111 console.log(key); 111 console.log(key);
112 switch (key) { 112 switch (key) {
113 case "default": sel.html('Сортировка (по умолчанию)'); break; 113 case "default": sel.html('Сортировка (по умолчанию)'); break;
114 case "name_up": sel.html('По имени (возрастание)'); break; 114 case "name_up": sel.html('По имени (возрастание)'); break;
115 case "name_down": sel.html('По дате (убывание)'); break; 115 case "name_down": sel.html('По дате (убывание)'); break;
116 case "created_at_up": sel.html('По дате (возрастание)'); break; 116 case "created_at_up": sel.html('По дате (возрастание)'); break;
117 case "created_at_down": sel.html('По дате (убывание)'); break; 117 case "created_at_down": sel.html('По дате (убывание)'); break;
118 } 118 }
119 119
120 } 120 }
121 }); 121 });
122 </script> 122 </script>
123 @include('js.favorite-vacancy-45') 123 @include('js.favorite-vacancy-45')
124 @endsection 124 @endsection
125 @section('content') 125 @section('content')
126 <section class="thing"> 126 <section class="thing">
127 <div class="container"> 127 <div class="container">
128 <form class="thing__body" action="{{ route('list-vacancies', ['categories' => (!empty($Name_categori)) ? $Name_categori[0]->id : '0']) }}" method="POST"> 128 <form class="thing__body" action="{{ route('list-vacancies', ['categories' => (!empty($Name_categori)) ? $Name_categori[0]->id : '0']) }}" method="POST">
129 <ul class="breadcrumbs thing__breadcrumbs"> 129 <ul class="breadcrumbs thing__breadcrumbs">
130 <li><a href="{{ route('index') }}">Главная</a></li> 130 <li><a href="{{ route('index') }}">Главная</a></li>
131 <li><a href="{{ route('vacancies') }}">Вакансии</a></li> 131 <li><a href="{{ route('vacancies') }}">Вакансии</a></li>
132 <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> 132 <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li>
133 </ul> 133 </ul>
134 <h1 class="thing__title">Вакансии</h1> 134 <h1 class="thing__title">Вакансии</h1>
135 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 135 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
136 существующих финансовых и административных условий.</p> 136 существующих финансовых и административных условий.</p>
137 <div class="select select_search thing__select"> 137 <div class="select select_search thing__select">
138 <div class="select__icon"> 138 <div class="select__icon">
139 <svg> 139 <svg>
140 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 140 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
141 </svg> 141 </svg>
142 </div> 142 </div>
143 <select class="js-select2" id="jobs" name="jobs"> 143 <select class="js-select2" id="jobs" name="jobs">
144 <option value="0" selected>Выберите должность</option> 144 <option value="0" selected>Выберите должность</option>
145 @if ($Job_title->count()) 145 @if ($Job_title->count())
146 @foreach($Job_title as $JT) 146 @foreach($Job_title as $JT)
147 <option value="{{ $JT->id }}">{{ $JT->name }}</option> 147 <option value="{{ $JT->id }}">{{ $JT->name }}</option>
148 @endforeach 148 @endforeach
149 @endif 149 @endif
150 </select> 150 </select>
151 </div> 151 </div>
152 </form> 152 </form>
153 </div> 153 </div>
154 </section> 154 </section>
155 <main class="main"> 155 <main class="main">
156 <div class="container"> 156 <div class="container">
157 <div class="main__vacancies" > 157 <div class="main__vacancies" >
158 @if (isset($Name_categori[0]->name)) 158 @if (isset($Name_categori[0]->name))
159 <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2> 159 <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2>
160 @else 160 @else
161 <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2> 161 <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2>
162 @endif 162 @endif
163 <div class="filters main__vacancies-filters"> 163 <div class="filters main__vacancies-filters">
164 <div class="filters__label" id="col-vo" name="col-vo">Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> 164 <div class="filters__label" id="col-vo" name="col-vo">Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div>
165 <div class="filters__body"> 165 <div class="filters__body">
166 <div class="select filters__select"> 166 <div class="select filters__select">
167 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 167 <select class="js-select2" id="sort_ajax" name="sort_ajax">
168 <option value="default">Сортировка (по умолчанию)</option> 168 <option value="default">Сортировка (по умолчанию)</option>
169 <option value="name_up">По имени (возрастание)</option> 169 <option value="name_up">По имени (возрастание)</option>
170 <option value="name_down">По имени (убывание)</option> 170 <option value="name_down">По имени (убывание)</option>
171 <option value="created_at_up">По дате (возрастание)</option> 171 <option value="created_at_up">По дате (возрастание)</option>
172 <option value="created_at_down">По дате (убывание)</option> 172 <option value="created_at_down">По дате (убывание)</option>
173 </select> 173 </select>
174 </div> 174 </div>
175 </div> 175 </div>
176 </div> 176 </div>
177 177
178 <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar"> 178 <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar">
179 @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp 179 @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp
180 180
181 @foreach ($Query as $Q) 181 @foreach ($Query as $Q)
182 @foreach ($Reclama as $Rec) 182 @foreach ($Reclama as $Rec)
183 @if ($Rec->position == $i) 183 @if ($Rec->position == $i)
184 <div class="main__vacancies-thing"> 184 <div class="main__vacancies-thing">
185 @if (!empty($Rec->image)) 185 @if (!empty($Rec->image))
186 <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> 186 <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic">
187 @else 187 @else
188 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> 188 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic">
189 @endif 189 @endif
190 <div class="main__vacancies-thing-body"> 190 <div class="main__vacancies-thing-body">
191 <h2>{{ $Rec->title }}</h2> 191 <h2>{{ $Rec->title }}</h2>
192 <div class="main__vacancies-thing-scroll"> 192 <div class="main__vacancies-thing-scroll">
193 {!! $Rec->text !!} 193 {!! $Rec->text !!}
194 </div> 194 </div>
195 <a href="{{ $Rec->link }}" class="button">Узнать больше</a> 195 <a href="{{ $Rec->link }}" class="button">Узнать больше</a>
196 </div> 196 </div>
197 </div> 197 </div>
198 @endif 198 @endif
199 @endforeach 199 @endforeach
200 <div class="main__vacancies-item main__employer-page-two-item"> 200 <div class="main__vacancies-item main__employer-page-two-item">
201 201
202 <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> 202 <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back">
203 <svg> 203 <svg>
204 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> 204 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use>
205 </svg> 205 </svg>
206 <span> 206 <span>
207 Вернуться к списку вакансий 207 Вернуться к списку вакансий
208 </span> 208 </span>
209 </a> 209 </a>
210 210
211 <div class="main__employer-page-two-item-toper"> 211 <div class="main__employer-page-two-item-toper">
212 @if (!empty($Q->employer->logo)) 212 @if (!empty($Q->employer->logo))
213 <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> 213 <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}">
214 @else 214 @else
215 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> 215 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic">
216 @endif 216 @endif
217 <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> 217 <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span>
218 </div> 218 </div>
219 219
220 <div class="main__employer-page-two-item-text"> 220 <div class="main__employer-page-two-item-text">
221 <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор 221 <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор
222 специалистов на следующие должности:</div> 222 специалистов на следующие должности:</div>
223 <div class="main__employer-page-two-item-text-links"> 223 <div class="main__employer-page-two-item-text-links">
224 @if (isset($Q->jobs)) 224 @if (isset($Q->jobs))
225 @foreach ($Q->jobs as $key => $j) 225 @foreach ($Q->jobs as $key => $j)
226 <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> 226 <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>
227 @endforeach 227 @endforeach
228 @endif 228 @endif
229 </div> 229 </div>
230 </div> 230 </div>
231 231
232 <div class="main__employer-page-two-item-text"> 232 <div class="main__employer-page-two-item-text">
233 <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> 233 <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div>
234 <div class="main__employer-page-two-item-text-body"> 234 <div class="main__employer-page-two-item-text-body">
235 {!! $Q->text !!} 235 {!! $Q->text !!}
236 </div> 236 </div>
237 </div> 237 </div>
238 <div class="main__employer-page-two-item-text"> 238 <div class="main__employer-page-two-item-text">
239 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> 239 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div>
240 <div class="main__employer-page-two-item-text-body"> 240 <div class="main__employer-page-two-item-text-body">
241 {!! $Q->description !!} 241 {!! $Q->description !!}
242 </div> 242 </div>
243 </div> 243 </div>
244 <div class="main__employer-page-two-item-text"> 244 <div class="main__employer-page-two-item-text">
245 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> 245 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div>
246 <div class="main__employer-page-two-item-text-body"> 246 <div class="main__employer-page-two-item-text-body">
247 {!! $Q->contacts_emails !!} 247 {!! $Q->contacts_emails !!}
248 </div> 248 </div>
249 </div> 249 </div>
250 <div class="main__employer-page-two-item-text"> 250 <div class="main__employer-page-two-item-text">
251 <div class="main__employer-page-two-item-text-name">Или звоните:</div> 251 <div class="main__employer-page-two-item-text-name">Или звоните:</div>
252 <div class="main__employer-page-two-item-text-body"> 252 <div class="main__employer-page-two-item-text-body">
253 {!! $Q->contacts_telephones !!} 253 {!! $Q->contacts_telephones !!}
254 </div> 254 </div>
255 </div> 255 </div>
256 256
257 <div class="main__employer-page-two-item-tags"> 257 <div class="main__employer-page-two-item-tags">
258 @if (!empty($Q->jobs_code[0]->position_ship)) 258 @if (!empty($Q->jobs_code[0]->position_ship))
259 <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> 259 <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span>
260 @else 260 @else
261 @if (isset($Q->jobs)) 261 @if (isset($Q->jobs))
262 @foreach ($Q->jobs as $key => $j) 262 @foreach ($Q->jobs as $key => $j)
263 <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> 263 <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span>
264 @endforeach 264 @endforeach
265 @endif 265 @endif
266 @endif 266 @endif
267 </div> 267 </div>
268 <div class="main__employer-page-two-item-buttons"> 268 <div class="main__employer-page-two-item-buttons">
269 @guest 269 @guest
270 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' 270 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
271 class="button main__employer-page-two-item-button">Откликнуться</button> 271 class="button main__employer-page-two-item-button">Откликнуться</button>
272 @else 272 @else
273 @if (App\Classes\StatusUser::Status()==1) 273 @if (App\Classes\StatusUser::Status()==1)
274 <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}' 274 <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}'
275 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> 275 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button>
276 @else 276 @else
277 <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}' 277 <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}'
278 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> 278 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button>
279 @endif 279 @endif
280 @endguest 280 @endguest
281 <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> 281 <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a>
282 </div> 282 </div>
283 <div class="main__employer-page-two-item-bottom"> 283 <div class="main__employer-page-two-item-bottom">
284 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> 284 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div>
285 <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> 285 <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}">
286 <svg> 286 <svg>
287 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 287 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
288 </svg> 288 </svg>
289 </button> 289 </button>
290 </div> 290 </div>
291 </div> 291 </div>
292 @php $i++ @endphp 292 @php $i++ @endphp
293 @endforeach 293 @endforeach
294 <div style="margin-top: 20px"> 294 <div style="margin-top: 20px">
295 {{ $Query->appends($_GET)->links('paginate') }} 295 {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }}
296 </div><!-- конец --> 296 </div><!-- конец -->
297 297
298 </div> 298 </div>
299 </div> 299 </div>
300 </div> 300 </div>
301 </main> 301 </main>
302 @endsection 302 @endsection
303 303
resources/views/modals/register.blade.php
1 <style>
2 #captcha {
3 background-color: #d0d0d0;
4 }
5
6 #captcha2 {
7 background-color: #d0d0d0;
8 }
9 </style>
1 <div id="reg" class="modal"> 10 <div id="reg" class="modal">
2 <div class="modal__body"> 11 <div class="modal__body">
3 <div class="modal__title left">Регистрация</div> 12 <div class="modal__title left">Регистрация</div>
4 <div class="notify notify_red" style="display:none" id="block-info"> 13 <div class="notify notify_red" style="display:none" id="block-info">
5 <svg> 14 <svg>
6 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> 15 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
7 </svg><br> 16 </svg><br>
8 <span id="messages_error_reg" name="messages_error_reg"></span> 17 <span id="messages_error_reg" name="messages_error_reg"></span>
9 </div> 18 </div>
10 <div class="modal__tabs"> 19 <div class="modal__tabs">
11 <button type="button" class="modal__tabs-item button button_light active" data-tab="1">Кандидат</button> 20 <button type="button" class="modal__tabs-item button button_light active" data-tab="1">Кандидат</button>
12 <button type="button" class="modal__tabs-item button button_light" data-tab="2">Работодатель</button> 21 <button type="button" class="modal__tabs-item button button_light" data-tab="2">Работодатель</button>
13 </div> 22 </div>
14 <form class="modal__reg showed" data-body="1"> 23 <div class="modal__reg showed" data-body="1" id="form1" name="form1" onsubmit="-validateCaptcha()">
24 <input type="hidden" name="is_worker" id="is_worker" value="1"/>
15 <div class="modal__reg-item form-group"> 25 <div class="modal__reg-item form-group">
16 <label class="form-group__label">Электронная почта</label> 26 <label class="form-group__label">Электронная почта</label>
17 <div class="form-group__item"> 27 <div class="form-group__item">
18 <input type="email" id="email_worker" name="email_worker" class="input" placeholder="info@rekamore.su" required> 28 <input type="email" id="email_worker" name="email_worker" class="input" placeholder="info@rekamore.su" required>
19 </div> 29 </div>
20 </div> 30 </div>
21 31
22 <div class="modal__reg-item form-group"> 32 <div class="modal__reg-item form-group">
23 <label class="form-group__label">Пароль</label> 33 <label class="form-group__label">Пароль</label>
24 <div class="form-group__item"> 34 <div class="form-group__item">
25 <input type="password" id="password_worker" name="password_worker" class="input" placeholder="**********" required> 35 <input type="password" id="password_worker" name="password_worker" class="input" placeholder="**********" required>
26 <button type="button" class="eye"> 36 <button type="button" class="eye">
27 <svg class="js-password-show"> 37 <svg class="js-password-show">
28 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 38 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
29 </svg> 39 </svg>
30 <svg class="js-password-hide"> 40 <svg class="js-password-hide">
31 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 41 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
32 </svg> 42 </svg>
33 </button> 43 </button>
34 </div> 44 </div>
35 </div> 45 </div>
36 46
37 <div class="modal__reg-item form-group"> 47 <div class="modal__reg-item form-group">
38 <label class="form-group__label">Подтвердить пароль</label> 48 <label class="form-group__label">Подтвердить пароль</label>
39 <div class="form-group__item"> 49 <div class="form-group__item">
40 <input type="password" name="password_confirmation_worker" id="password_confirmation_worker" class="input" placeholder="**********" required> 50 <input type="password" name="password_confirmation_worker" id="password_confirmation_worker" class="input" placeholder="**********" required>
41 <button type="button" class="eye"> 51 <button type="button" class="eye">
42 <svg class="js-password-show"> 52 <svg class="js-password-show">
43 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 53 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
44 </svg> 54 </svg>
45 <svg class="js-password-hide"> 55 <svg class="js-password-hide">
46 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 56 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
47 </svg> 57 </svg>
48 </button> 58 </button>
49 </div> 59 </div>
50 </div> 60 </div>
51 61
52 <div class="modal__reg-item form-group"> 62 <div class="modal__reg-item form-group">
53 <label class="form-group__label">Фамилия</label> 63 <label class="form-group__label">Фамилия</label>
54 <div class="form-group__item"> 64 <div class="form-group__item">
55 <input type="text" id="surname_worker" name="surname_worker" class="input" placeholder="Шестаков" required> 65 <input type="text" id="surname_worker" name="surname_worker" class="input" placeholder="Шестаков" required>
56 </div> 66 </div>
57 </div> 67 </div>
58 68
59 <div class="modal__reg-item form-group"> 69 <div class="modal__reg-item form-group">
60 <label class="form-group__label">Имя</label> 70 <label class="form-group__label">Имя</label>
61 <div class="form-group__item"> 71 <div class="form-group__item">
62 <input type="text" id="name_man_worker" name="name_man_worker" class="input" placeholder="Андрей" required> 72 <input type="text" id="name_man_worker" name="name_man_worker" class="input" placeholder="Андрей" required>
63 </div> 73 </div>
64 </div> 74 </div>
65 75
66 <div class="modal__reg-item form-group"> 76 <div class="modal__reg-item form-group">
67 <label class="form-group__label">Отчество</label> 77 <label class="form-group__label">Отчество</label>
68 <div class="form-group__item"> 78 <div class="form-group__item">
69 <input type="text" id="surname2_worker" name="surname2_worker" class="input" placeholder="Васильевич"> 79 <input type="text" id="surname2_worker" name="surname2_worker" class="input" placeholder="Васильевич">
70 </div> 80 </div>
71 </div> 81 </div>
72 <!-- 82 <!--
73 <div class="modal__reg-item form-group"> 83 <div class="modal__reg-item form-group">
74 <label class="form-group__label">Должность</label> 84 <label class="form-group__label">Должность</label>
75 <div class="form-group__item"> 85 <div class="form-group__item">
76 <input type="text" class="input" placeholder="Палуба" required> 86 <input type="text" class="input" placeholder="Палуба" required>
77 </div> 87 </div>
78 </div>--> 88 </div>-->
79 89
80 <div class="modal__reg-item form-group"> 90 <div class="modal__reg-item form-group">
81 <label class="form-group__label">Должность</label> 91 <label class="form-group__label">Должность</label>
82 <div class="form-group__item"> 92 <div class="form-group__item">
83 <div class="select"> 93 <div class="select">
84 <select class="js-select2" name="job_titles_worker" id="job_titles_worker"> 94 <select class="js-select2" name="job_titles_worker" id="job_titles_worker">
85 <option selected>Не указано</option> 95 <option selected>Не указано</option>
86 @if ($Job_titles->count()) 96 @if ($Job_titles->count())
87 @foreach($Job_titles as $it) 97 @foreach($Job_titles as $it)
88 <option value="{{ $it->id }}">{{ $it->name }}</option> 98 <option value="{{ $it->id }}">{{ $it->name }}</option>
89 @endforeach 99 @endforeach
90 @endif 100 @endif
91 </select> 101 </select>
92 </div> 102 </div>
93 </div> 103 </div>
94 </div> 104 </div>
95 105
96 <div class="modal__reg-item form-group"> 106 <div class="modal__reg-item form-group">
97 <label class="form-group__label">Номер телефона</label> 107 <label class="form-group__label">Номер телефона</label>
98 <div class="form-group__item"> 108 <div class="form-group__item">
99 <input type="tel" name="telephone_worker" id="telephone_worker" class="input" placeholder="+7 (___) ___-__-__" required> 109 <input type="tel" name="telephone_worker" id="telephone_worker" class="input" placeholder="+7 (___) ___-__-__" required>
100 </div> 110 </div>
101 </div> 111 </div>
102 <!--<div class="modal__reg-item"> 112 <!--<div class="modal__reg-item">
103 <img src="images/catpcha.jpg" alt="" class="captcha"> 113 <img src="images/catpcha.jpg" alt="" class="captcha">
104 </div>--> 114 </div>-->
115 <div id="captcha1" style="width:190px" class="modal__reg-item form-group">321</div>
116 <input type="text" placeholder="Captcha" class="input registr-form__input" id="cpatchaTextBox1" style="width: 100%"/>
105 117
106 <div class="modal__reg-item"> 118 <div class="modal__reg-item">
107 <label class="checkbox"> 119 <label class="checkbox">
108 <input type="checkbox" name="politik" id="politik" value="1" class="checkbox__input"> 120 <input type="checkbox" name="politik" id="politik" value="1" class="checkbox__input">
109 <span class="checkbox__icon"> 121 <span class="checkbox__icon">
110 <svg> 122 <svg>
111 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 123 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
112 </svg> 124 </svg>
113 </span> 125 </span>
114 <span class="checkbox__text"> 126 <span class="checkbox__text">
115 <span> 127 <span>
116 Я согласен(на) с <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a> 128 Я согласен(на) с <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a>
117 </span> 129 </span>
118 </span> 130 </span>
119 </label> 131 </label>
120 </div> 132 </div>
121 <button type="submit" id="button_reg_worker" name="button_reg_worker" class="button">Зарегистрироваться</button> 133 <button type="submit" id="button_reg_worker" name="button_reg_worker" class="button">Зарегистрироваться</button>
122 </form> 134 </div>
123 135
124 <form class="modal__reg" data-body="2"> 136 <div class="modal__reg" data-body="2" id="form2" name="name2" onsubmit="_validateCaptcha2()">
125 <div class="modal__reg-item form-group"> 137 <div class="modal__reg-item form-group">
126 <label class="form-group__label">Электронная почта</label> 138 <label class="form-group__label">Электронная почта</label>
127 <div class="form-group__item"> 139 <div class="form-group__item">
128 <input type="email" id="email_employer" name="email_employer" class="input" placeholder="info@rekamore.su" required> 140 <input type="email" id="email_employer" name="email_employer" class="input" placeholder="info@rekamore.su" required>
129 </div> 141 </div>
130 </div> 142 </div>
131 <div class="modal__reg-item form-group"> 143 <div class="modal__reg-item form-group">
132 <label class="form-group__label">Пароль</label> 144 <label class="form-group__label">Пароль</label>
133 <div class="form-group__item"> 145 <div class="form-group__item">
134 <input type="password" id="password_employer" name="password_employer" class="input" placeholder="**********" required> 146 <input type="password" id="password_employer" name="password_employer" class="input" placeholder="**********" required>
135 <button type="button" class="eye"> 147 <button type="button" class="eye">
136 <svg class="js-password-show"> 148 <svg class="js-password-show">
137 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 149 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
138 </svg> 150 </svg>
139 <svg class="js-password-hide"> 151 <svg class="js-password-hide">
140 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 152 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
141 </svg> 153 </svg>
142 </button> 154 </button>
143 </div> 155 </div>
144 </div> 156 </div>
145 <div class="modal__reg-item form-group"> 157 <div class="modal__reg-item form-group">
146 <label class="form-group__label">Подтвердить пароль</label> 158 <label class="form-group__label">Подтвердить пароль</label>
147 <div class="form-group__item"> 159 <div class="form-group__item">
148 <input type="password" id="password_confirmation_employer" name="password_confirmation_employer" class="input" placeholder="**********" required> 160 <input type="password" id="password_confirmation_employer" name="password_confirmation_employer" class="input" placeholder="**********" required>
149 <button type="button" class="eye"> 161 <button type="button" class="eye">
150 <svg class="js-password-show"> 162 <svg class="js-password-show">
151 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 163 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
152 </svg> 164 </svg>
153 <svg class="js-password-hide"> 165 <svg class="js-password-hide">
154 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 166 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
155 </svg> 167 </svg>
156 </button> 168 </button>
157 </div> 169 </div>
158 </div> 170 </div>
159 171
160 172
161 <div class="modal__reg-item form-group"> 173 <div class="modal__reg-item form-group">
162 <label class="form-group__label">Фамилия работодателя</label> 174 <label class="form-group__label">Фамилия работодателя</label>
163 <div class="form-group__item"> 175 <div class="form-group__item">
164 <input type="text" id="surname_employer" name="surname_employer" class="input" placeholder="Шестаков" required> 176 <input type="text" id="surname_employer" name="surname_employer" class="input" placeholder="Шестаков" required>
165 </div> 177 </div>
166 </div> 178 </div>
167 179
168 <div class="modal__reg-item form-group"> 180 <div class="modal__reg-item form-group">
169 <label class="form-group__label">Имя работодателя</label> 181 <label class="form-group__label">Имя работодателя</label>
170 <div class="form-group__item"> 182 <div class="form-group__item">
171 <input type="text" id="name_man_employer" name="name_man_employer" class="input" placeholder="Андрей" required> 183 <input type="text" id="name_man_employer" name="name_man_employer" class="input" placeholder="Андрей" required>
172 </div> 184 </div>
173 </div> 185 </div>
174 186
175 <div class="modal__reg-item form-group"> 187 <div class="modal__reg-item form-group">
176 <label class="form-group__label">Отчество работодателя</label> 188 <label class="form-group__label">Отчество работодателя</label>
177 <div class="form-group__item"> 189 <div class="form-group__item">
178 <input type="text" id="surname2_employer" name="surname2_employer" class="input" placeholder="Васильевич"> 190 <input type="text" id="surname2_employer" name="surname2_employer" class="input" placeholder="Васильевич">
179 </div> 191 </div>
180 </div> 192 </div>
181 193
182 <div class="modal__reg-item form-group"> 194 <div class="modal__reg-item form-group">
183 <label class="form-group__label">Название судоходной компании</label> 195 <label class="form-group__label">Название судоходной компании</label>
184 <div class="form-group__item"> 196 <div class="form-group__item">
185 <input type="text" name="company_employer" id="company_employer" class="input" placeholder="ООО Река Море" required> 197 <input type="text" name="company_employer" id="company_employer" class="input" placeholder="ООО Река Море" required>
186 </div> 198 </div>
187 </div> 199 </div>
188 200
189 <div class="modal__reg-item form-group"> 201 <div class="modal__reg-item form-group">
190 <label class="form-group__label">Номер телефона</label> 202 <label class="form-group__label">Номер телефона</label>
191 <div class="form-group__item"> 203 <div class="form-group__item">
192 <input type="tel" name="telephone_employer" id="telephone_employer" class="input" placeholder="+7 (___) ___-__-__" required> 204 <input type="tel" name="telephone_employer" id="telephone_employer" class="input" placeholder="+7 (___) ___-__-__" required>
193 </div> 205 </div>
194 </div> 206 </div>
195 <!--<div class="modal__reg-item"> 207 <!--<div class="modal__reg-item">
196 <img src="images/catpcha.jpg" alt="" class="captcha"> 208 <img src="images/catpcha.jpg" alt="" class="captcha">
197 </div>--> 209 </div>-->
198 210
211 <div id="captcha2" style="width:190px" class="modal__reg-item form-group">123</div>
212 <input type="text" placeholder="Captcha" class="input registr-form__input" id="cpatchaTextBox2" style="width: 100%"/>
213
199 <div class="modal__reg-item"> 214 <div class="modal__reg-item">
200 <label class="checkbox"> 215 <label class="checkbox">
201 <input type="checkbox" name="politik_employer" id="politik_employer" value="1" class="checkbox__input" required> 216 <input type="checkbox" name="politik_employer" id="politik_employer" value="1" class="checkbox__input" required>
202 <span class="checkbox__icon"> 217 <span class="checkbox__icon">
203 <svg> 218 <svg>
204 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 219 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
205 </svg> 220 </svg>
206 </span> 221 </span>
207 <span class="checkbox__text"> 222 <span class="checkbox__text">
208 <span> 223 <span>
209 Я согласен(на) с <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a> 224 Я согласен(на) с <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a>
210 </span> 225 </span>
211 </span> 226 </span>
212 </label> 227 </label>
213 </div> 228 </div>
214 <button type="submit" id="button_reg_employer" name="button_reg_employer" class="button">Зарегистрироваться</button> 229 <button type="submit" id="button_reg_employer" name="button_reg_employer" class="button">Зарегистрироваться</button>
215 </form> 230 </div>
216 <div class="modal__text"> 231 <div class="modal__text">
217 <span>Вспомнили пароль?</span> 232 <span>Вспомнили пароль?</span>
218 &nbsp; 233 &nbsp;
219 <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> 234 <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a>
220 </div> 235 </div>
221 </div> 236 </div>
222 </div> 237 </div>
223 238
resources/views/resume.blade.php
1 @extends('layout.frontend', ['title' => 'База резюме - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'База резюме - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 4 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
5 <script> 5 <script>
6 console.log('Test system'); 6 console.log('Test system');
7 $(document).on('change', '#jobs', function() { 7 $(document).on('change', '#jobs', function() {
8 var val = $(this).val(); 8 var val = $(this).val();
9 var main_oskar = $('#main_ockar'); 9 var main_oskar = $('#main_ockar');
10 10
11 console.log('Code='+val); 11 console.log('Code='+val);
12 console.log('Click change...'); 12 console.log('Click change...');
13 $.ajax({ 13 $.ajax({
14 type: "GET", 14 type: "GET",
15 url: "", 15 url: "",
16 data: "job="+val, 16 data: "job="+val,
17 success: function (data) { 17 success: function (data) {
18 console.log('Выбор сделан!'); 18 console.log('Выбор сделан!');
19 console.log(data); 19 console.log(data);
20 main_oskar.html(data); 20 main_oskar.html(data);
21 }, 21 },
22 headers: { 22 headers: {
23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
24 }, 24 },
25 error: function (data) { 25 error: function (data) {
26 data = JSON.stringify(data); 26 data = JSON.stringify(data);
27 console.log('Error: ' + data); 27 console.log('Error: ' + data);
28 } 28 }
29 }); 29 });
30 }); 30 });
31 </script> 31 </script>
32 32
33 <script> 33 <script>
34 $(document).ready(function() { 34 $(document).ready(function() {
35 $(document).on('click', '.js_box_favorites', function () { 35 $(document).on('click', '.js_box_favorites', function () {
36 var _this = $(this); 36 var _this = $(this);
37 var id_worker = _this.attr('data-val'); 37 var id_worker = _this.attr('data-val');
38 38
39 if (_this.hasClass('active')) { 39 if (_this.hasClass('active')) {
40 add_in_array(id_worker); 40 add_in_array(id_worker);
41 console.log('Добавлено в избранное id=' + id_worker); 41 console.log('Добавлено в избранное id=' + id_worker);
42 } else { 42 } else {
43 delete_in_array(id_worker); 43 delete_in_array(id_worker);
44 console.log('Удалено из избранных id='+id_worker) 44 console.log('Удалено из избранных id='+id_worker)
45 } 45 }
46 var str = $.cookie('favorite_worker'); 46 var str = $.cookie('favorite_worker');
47 console.log("Вывод куков "+str); 47 console.log("Вывод куков "+str);
48 48
49 }); 49 });
50 }); 50 });
51 51
52 //помеченный элемент 52 //помеченный элемент
53 function selected_item(obj) { 53 function selected_item(obj) {
54 var arr = read_array(); 54 var arr = read_array();
55 var index = arr.indexOf(obj); 55 var index = arr.indexOf(obj);
56 56
57 if (index > 0) 57 if (index > 0)
58 return "active"; 58 return "active";
59 else 59 else
60 return ""; 60 return "";
61 } 61 }
62 62
63 // запись элемента массива в cookie 63 // запись элемента массива в cookie
64 function add_in_array(obj){ 64 function add_in_array(obj){
65 var arr = read_array();//получаем текущее состояние массива 65 var arr = read_array();//получаем текущее состояние массива
66 arr[arr.length]=obj; //добавляем элемент в конец 66 arr[arr.length]=obj; //добавляем элемент в конец
67 //var str = JSON.stringify(arr);//конвертируем в строку 67 //var str = JSON.stringify(arr);//конвертируем в строку
68 //$.cookie('arr',str);//записываем массив в куки 68 //$.cookie('arr',str);//записываем массив в куки
69 $.cookie('favorite_worker', JSON.stringify(arr)); 69 $.cookie('favorite_worker', JSON.stringify(arr));
70 70
71 } 71 }
72 72
73 // удаление элемента из массива в cookie 73 // удаление элемента из массива в cookie
74 function delete_in_array(obj) { 74 function delete_in_array(obj) {
75 var arr = read_array(); 75 var arr = read_array();
76 var unique = [...new Set(arr)] 76 var unique = [...new Set(arr)]
77 var index = unique.indexOf(obj); 77 var index = unique.indexOf(obj);
78 78
79 unique.splice(index, 1); 79 unique.splice(index, 1);
80 80
81 //var str = JSON.stringify(arr);//конвертируем в строку 81 //var str = JSON.stringify(arr);//конвертируем в строку
82 //$.cookie('arr',str);//записываем массив в куки 82 //$.cookie('arr',str);//записываем массив в куки
83 $.cookie('favorite_worker', JSON.stringify(unique)); 83 $.cookie('favorite_worker', JSON.stringify(unique));
84 84
85 } 85 }
86 86
87 function read_array(){ 87 function read_array(){
88 var dataArr=$.cookie('favorite_worker');//считываем данные из куков 88 var dataArr=$.cookie('favorite_worker');//считываем данные из куков
89 89
90 //если массив не был обнаружен, иницилизируем его 90 //если массив не был обнаружен, иницилизируем его
91 if(dataArr===null){ 91 if(dataArr===null){
92 dataArr = init_array(); //возвращаем инициализированный пустой маасив 92 dataArr = init_array(); //возвращаем инициализированный пустой маасив
93 } 93 }
94 //возвращаем полученный массив 94 //возвращаем полученный массив
95 //return JSON.parse(dataArr); 95 //return JSON.parse(dataArr);
96 return JSON.parse(dataArr); 96 return JSON.parse(dataArr);
97 } 97 }
98 98
99 //другими словами создаем пустой массив 99 //другими словами создаем пустой массив
100 function init_array(){ 100 function init_array(){
101 //var str = JSON.stringify(new Array());//конвертируем в строку 101 //var str = JSON.stringify(new Array());//конвертируем в строку
102 var str = JSON.stringify(new Array()); 102 var str = JSON.stringify(new Array());
103 $.cookie('favorite_worker',str);//записываем массив в куки 103 $.cookie('favorite_worker',str);//записываем массив в куки
104 104
105 return str; 105 return str;
106 } 106 }
107 </script> 107 </script>
108 <script> 108 <script>
109 $(document).on('click', '.js_it_button', function() { 109 $(document).on('click', '.js_it_button', function() {
110 var this_ = $(this); 110 var this_ = $(this);
111 var code_user_id = this_.attr('data-uid'); 111 var code_user_id = this_.attr('data-uid');
112 var code_to_user_id = this_.attr('data-tuid'); 112 var code_to_user_id = this_.attr('data-tuid');
113 var code_vacancy = this_.attr('data-vacancy'); 113 var code_vacancy = this_.attr('data-vacancy');
114 var user_id = $('#_user_id'); 114 var user_id = $('#_user_id');
115 var to_user_id = $('#_to_user_id'); 115 var to_user_id = $('#_to_user_id');
116 var vacancy = $('#_vacancy'); 116 var vacancy = $('#_vacancy');
117 117
118 console.log('code_to_user_id='+code_to_user_id); 118 console.log('code_to_user_id='+code_to_user_id);
119 console.log('code_user_id='+code_user_id); 119 console.log('code_user_id='+code_user_id);
120 console.log('code_vacancy='+code_vacancy); 120 console.log('code_vacancy='+code_vacancy);
121 console.log('Клик на кнопке...'); 121 console.log('Клик на кнопке...');
122 122
123 user_id.val(code_user_id); 123 user_id.val(code_user_id);
124 to_user_id.val(code_to_user_id); 124 to_user_id.val(code_to_user_id);
125 vacancy.val(code_vacancy); 125 vacancy.val(code_vacancy);
126 }); 126 });
127 </script> 127 </script>
128 <script> 128 <script>
129 $(document).on('change', '#sort_ajax', function() { 129 $(document).on('change', '#sort_ajax', function() {
130 var this_ = $(this); 130 var this_ = $(this);
131 var val_ = this_.val(); 131 var val_ = this_.val();
132 console.log('sort items '+val_); 132 console.log('sort items '+val_);
133 133
134 $.ajax({ 134 $.ajax({
135 type: "GET", 135 type: "GET",
136 url: "{{ route('bd_resume') }}", 136 url: "{{ route('bd_resume') }}",
137 data: "sort="+val_+"&block=1", 137 data: "sort="+val_+"&block=1",
138 success: function (data) { 138 success: function (data) {
139 console.log('Выбор сортировки'); 139 console.log('Выбор сортировки');
140 console.log(data); 140 console.log(data);
141 $('#block1').html(data); 141 $('#block1').html(data);
142 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 142 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
143 }, 143 },
144 headers: { 144 headers: {
145 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 145 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
146 }, 146 },
147 error: function (data) { 147 error: function (data) {
148 data = JSON.stringify(data); 148 data = JSON.stringify(data);
149 console.log('Error: ' + data); 149 console.log('Error: ' + data);
150 } 150 }
151 }); 151 });
152 152
153 $.ajax({ 153 $.ajax({
154 type: "GET", 154 type: "GET",
155 url: "{{ route('bd_resume') }}", 155 url: "{{ route('bd_resume') }}",
156 data: "sort="+val_+"&block=2", 156 data: "sort="+val_+"&block=2",
157 success: function (data) { 157 success: function (data) {
158 console.log('Выбор сортировки'); 158 console.log('Выбор сортировки');
159 console.log(data); 159 console.log(data);
160 $('#block2').html(data); 160 $('#block2').html(data);
161 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 161 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
162 }, 162 },
163 headers: { 163 headers: {
164 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 164 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
165 }, 165 },
166 error: function (data) { 166 error: function (data) {
167 data = JSON.stringify(data); 167 data = JSON.stringify(data);
168 console.log('Error: ' + data); 168 console.log('Error: ' + data);
169 } 169 }
170 }); 170 });
171 171
172 }); 172 });
173 173
174 $(document).ready(function(){ 174 $(document).ready(function(){
175 var sel = $('#select2-sort_ajax-container'); 175 var sel = $('#select2-sort_ajax-container');
176 var key = getUrlParameter('sort'); 176 var key = getUrlParameter('sort');
177 console.log(sel); 177 console.log(sel);
178 console.log(key); 178 console.log(key);
179 179
180 if (key !=='') { 180 if (key !=='') {
181 console.log(key); 181 console.log(key);
182 switch (key) { 182 switch (key) {
183 case "default": sel.html('Сортировка (по умолчанию)'); break; 183 case "default": sel.html('Сортировка (по умолчанию)'); break;
184 case "name_up": sel.html('По имени (возрастание)'); break; 184 case "name_up": sel.html('По имени (возрастание)'); break;
185 case "name_down": sel.html('По дате (убывание)'); break; 185 case "name_down": sel.html('По дате (убывание)'); break;
186 case "created_at_up": sel.html('По дате (возрастание)'); break; 186 case "created_at_up": sel.html('По дате (возрастание)'); break;
187 case "created_at_down": sel.html('По дате (убывание)'); break; 187 case "created_at_down": sel.html('По дате (убывание)'); break;
188 } 188 }
189 189
190 } 190 }
191 }); 191 });
192 </script> 192 </script>
193
194 <script>
195 console.log('Test system');
196 $(document).on('change', '.jobs', function() {
197 var val = $(this).val();
198
199 console.log('Click filter вакансии...');
200 $.ajax({
201 type: "GET",
202 url: "{{ route('bd_resume') }}",
203 data: "job="+val+'&block=1',
204 success: function (data) {
205 console.log('Выбор должности');
206 console.log(data);
207 $('#block1').html(data);
208 history.pushState({}, '', "{{ route('bd_resume') }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
209 },
210 headers: {
211 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
212 },
213 error: function (data) {
214 data = JSON.stringify(data);
215 console.log('Error: ' + data);
216 }
217 });
218
219 $.ajax({
220 type: "GET",
221 url: "{{ route('bd_resume') }}",
222 data: "job="+val+'&block=2',
223 success: function (data) {
224 console.log('Выбор должности');
225 console.log(data);
226 $('#block2').html(data);
227 },
228 headers: {
229 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
230 },
231 error: function (data) {
232 data = JSON.stringify(data);
233 console.log('Error: ' + data);
234 }
235 });
236 });
237 </script>
193 @include('js.favorite-worker') 238 @include('js.favorite-worker')
194 @endsection 239 @endsection
195 240
196 241
197 @section('content') 242 @section('content')
198 <section class="thing"> 243 <section class="thing">
199 <div class="container"> 244 <div class="container">
200 <form class="thing__body" action="{{ url()->current() }}"> 245 <form class="thing__body" action="{{ url()->current() }}">
201 <ul class="breadcrumbs thing__breadcrumbs"> 246 <ul class="breadcrumbs thing__breadcrumbs">
202 <li><a href="{{ route('index') }}">Главная</a></li> 247 <li><a href="{{ route('index') }}">Главная</a></li>
203 <li><b>База резюме</b></li> 248 <li><b>База резюме</b></li>
204 </ul> 249 </ul>
205 <h1 class="thing__title">База резюме</h1> 250 <h1 class="thing__title">База резюме</h1>
206 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 251 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
207 существующих финансовых и административных условий.</p> 252 существующих финансовых и административных условий.</p>
208 <div class="search thing__search"> 253 <!--<div class="search thing__search">
209 <input type="search" class="input" name="search" id="search" placeholder="Введите наименование должности" required> 254 <input type="search" class="input" name="search" id="search" placeholder="Введите наименование должности" required>
210 <button type="submit" class="button">Найти</button> 255 <button type="submit" class="button">Найти</button>
211 <span> 256 <span>
212 <svg> 257 <svg>
213 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 258 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
214 </svg> 259 </svg>
215 </span> 260 </span>
261 </div>-->
262
263 <div class="select select_search thing__select">
264 <div class="select__icon">
265 <svg>
266 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
267 </svg>
268 </div>
269 <select class="js-select2 jobs" name="search" id="search">
270 <option value="0">Выберите должность</option>
271 @if($Job_title->count())
272 @foreach($Job_title as $JT)
273 <option value="{{ $JT->id }}" @if (isset($_GET['job'])) @if($_GET['job'] == $JT->id) selected @endif @endif>{{ $JT->name }}</option>
274 @endforeach
275 @endif
276 </select>
216 </div> 277 </div>
217 <label class="checkbox thing__checkbox"> 278
279 <!--<label class="checkbox thing__checkbox">
218 <input type="checkbox" class="checkbox__input" name="experience" id="experience"> 280 <input type="checkbox" class="checkbox__input" name="experience" id="experience">
219 <span class="checkbox__icon"> 281 <span class="checkbox__icon">
220 <svg> 282 <svg>
221 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 283 <use xlink:href=" asset('images/sprite.svg#v') }}"></use>
222 </svg> 284 </svg>
223 </span> 285 </span>
224 <span class="checkbox__text"> 286 <span class="checkbox__text">
225 <span> 287 <span>
226 Опыт работы 288 Опыт работы
227 </span> 289 </span>
228 </span> 290 </span>
229 </label> 291 </label>-->
230 </form> 292 </form>
231 </div> 293 </div>
232 </section> 294 </section>
233 <main class="main"> 295 <main class="main">
234 <div class="container"> 296 <div class="container">
235 <div class="main__resume-base"> 297 <div class="main__resume-base">
236 <h2>Резюме работников</h2> 298 <h2>Резюме работников</h2>
237 <div class="filters"> 299 <div class="filters">
238 <div class="filters__label">Показано {{ $resumes->firstItem() }} – {{ $resumes->lastItem() }} из {{ $res_count }} результатов поиска</div> 300 <div class="filters__label">Показано {{ $resumes->firstItem() }} – {{ $resumes->lastItem() }} из {{ $res_count }} результатов поиска</div>
239 <div class="filters__body"> 301 <div class="filters__body">
240 <div class="select filters__select"> 302 <div class="select filters__select">
241 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 303 <select class="js-select2" id="sort_ajax" name="sort_ajax">
242 <option value="default">Сортировка (по умолчанию)</option> 304 <option value="default">Сортировка (по умолчанию)</option>
243 <option value="name_up">По имени (возрастание)</option> 305 <option value="name_up">По имени (возрастание)</option>
244 <option value="name_down">По имени (убывание)</option> 306 <option value="name_down">По имени (убывание)</option>
245 <option value="created_at_up">По дате (возрастание)</option> 307 <option value="created_at_up">По дате (возрастание)</option>
246 <option value="created_at_down">По дате (убывание)</option> 308 <option value="created_at_down">По дате (убывание)</option>
247 </select> 309 </select>
248 </div> 310 </div>
249 <button type="button" class="filters__item active" data-tab="1"> 311 <button type="button" class="filters__item active" data-tab="1">
250 <svg> 312 <svg>
251 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 313 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
252 </svg> 314 </svg>
253 </button> 315 </button>
254 <button type="button" class="filters__item" data-tab="2"> 316 <button type="button" class="filters__item" data-tab="2">
255 <svg> 317 <svg>
256 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> 318 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use>
257 </svg> 319 </svg>
258 </button> 320 </button>
259 </div> 321 </div>
260 </div> 322 </div>
261 <div class="main__resume-base-body showed" data-body="1"> 323 <div class="main__resume-base-body showed" data-body="1">
262 <div class="main__resume-base-body-one" id="block1" name="block1"> 324 <div class="main__resume-base-body-one" id="block1" name="block1">
263 @if ($resumes->count()) 325 @if ($resumes->count())
264 @foreach ($resumes as $res) 326 @foreach ($resumes as $res)
265 <div class="main__resume-base-body-item"> 327 <div class="main__resume-base-body-item">
266 <div class="main__resume-base-body-item-buttons"> 328 <div class="main__resume-base-body-item-buttons">
267 <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> 329 <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}">
268 <svg> 330 <svg>
269 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 331 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
270 </svg> 332 </svg>
271 </button> 333 </button>
272 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> 334 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
273 <svg> 335 <svg>
274 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 336 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
275 </svg> 337 </svg>
276 </button> 338 </button>
277 </div> 339 </div>
278 <div class="main__resume-base-body-item-wrapper"> 340 <div class="main__resume-base-body-item-wrapper">
279 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 341 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
280 <div class="main__resume-base-body-item-inner"> 342 <div class="main__resume-base-body-item-inner">
281 <div> 343 <div>
282 <b>Статус</b> 344 <b>Статус</b>
283 <span>{{ $status_work[$res->status_work] }}</span> 345 <span>{{ $status_work[$res->status_work] }}</span>
284 </div> 346 </div>
285 <div> 347 <div>
286 <b>Имя работника</b> 348 <b>Имя работника</b>
287 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> 349 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
288 </div> 350 </div>
289 <div> 351 <div>
290 <b>Номер телефона</b> 352 <b>Номер телефона</b>
291 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> 353 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
292 </div> 354 </div>
293 <div> 355 <div>
294 <b>Электронный адрес</b> 356 <b>Электронный адрес</b>
295 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> 357 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
296 </div> 358 </div>
297 <div> 359 <div>
298 <b>Город проживания</b> 360 <b>Город проживания</b>
299 <span>{{ $res->city }}</span> 361 <span>{{ $res->city }}</span>
300 </div> 362 </div>
301 <div> 363 <div>
302 <b>Опыт работы</b> 364 <b>Опыт работы</b>
303 <span>{{ $res->experience }}</span> 365 <span>{{ $res->experience }}</span>
304 </div> 366 </div>
305 </div> 367 </div>
306 </div> 368 </div>
369 <div class="main__employer-page-two-item-tags">
370 @if ($res->job_titles->count())
371 @if (isset($res->job_titles))
372 @foreach ($res->job_titles as $key => $j)
373 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
374 @endforeach
375 @endif
376 @endif
377 </div>
307 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a> 378 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
308 </div> 379 </div>
309 @endforeach 380 @endforeach
310 381
311 {{ $resumes->appends($_GET)->links('paginate') }} 382 {{ $resumes->appends($_GET)->links('paginate') }}
383 @else
384 <p>По данному запросу ничего не найдено</p>
312 @endif 385 @endif
313 </div> 386 </div>
314 </div> 387 </div>
315 <div class="main__resume-base-body" data-body="2"> 388 <div class="main__resume-base-body" data-body="2">
316 <div class="main__resume-base-body-two" id="block2" name="block2"> 389 <div class="main__resume-base-body-two" id="block2" name="block2">
317 @if ($resumes->count()) 390 @if ($resumes->count())
318 @foreach ($resumes as $res) 391 @foreach ($resumes as $res)
319 <div class="main__resume-base-body-item"> 392 <div class="main__resume-base-body-item">
320 <div class="main__resume-base-body-item-buttons"> 393 <div class="main__resume-base-body-item-buttons">
321 <button type="button" id="elem_{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> 394 <button type="button" id="elem_{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}">
322 <svg> 395 <svg>
323 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 396 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
324 </svg> 397 </svg>
325 </button> 398 </button>
326 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> 399 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
327 <svg> 400 <svg>
328 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 401 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
329 </svg> 402 </svg>
330 </button> 403 </button>
331 </div> 404 </div>
332 <div class="main__resume-base-body-item-wrapper"> 405 <div class="main__resume-base-body-item-wrapper">
333 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 406 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
334 <div class="main__resume-base-body-item-inner"> 407 <div class="main__resume-base-body-item-inner">
335 <div> 408 <div>
336 <b>Статус</b> 409 <b>Статус</b>
337 <span>{{ $status_work[$res->status_work] }}</span> 410 <span>{{ $status_work[$res->status_work] }}</span>
338 </div> 411 </div>
339 <div> 412 <div>
340 <b>Имя работника</b> 413 <b>Имя работника</b>
341 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> 414 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
342 </div> 415 </div>
343 <div> 416 <div>
344 <b>Номер телефона</b> 417 <b>Номер телефона</b>
345 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> 418 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
346 </div> 419 </div>
347 <div> 420 <div>
348 <b>Электронный адрес</b> 421 <b>Электронный адрес</b>
349 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> 422 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
350 </div> 423 </div>
351 <div> 424 <div>
352 <b>Город проживания</b> 425 <b>Город проживания</b>
353 <span>{{ $res->city }}</span> 426 <span>{{ $res->city }}</span>
354 </div> 427 </div>
355 <div> 428 <div>
356 <b>Опыт работы</b> 429 <b>Опыт работы</b>
357 <span>{{ $res->experience }}</span> 430 <span>{{ $res->experience }}</span>
358 </div> 431 </div>
359 </div> 432 </div>
360 </div> 433 </div>
361 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в 434 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в
362 резюме</a> 435 резюме</a>
363 </div> 436 </div>
364 @endforeach 437 @endforeach
365 438
366 {{ $resumes->appends($_GET)->links('paginate') }} 439 {{ $resumes->appends($_GET)->links('paginate') }}
367 @endif 440 @endif
368 </div> 441 </div>
369 </div> 442 </div>
370 </div> 443 </div>
371 </div> 444 </div>
372 </main> 445 </main>
373 </div> 446 </div>
374 </div> 447 </div>
375 @endsection 448 @endsection
376 449
resources/views/worker.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', '#jobs', function() { 6 $(document).on('change', '#jobs', function() {
7 var val = $(this).val(); 7 var val = $(this).val();
8 var main_oskar = $('#main_ockar'); 8 var main_oskar = $('#main_ockar');
9 9
10 console.log('Code='+val); 10 console.log('Code='+val);
11 console.log('Click change...'); 11 console.log('Click change...');
12 $.ajax({ 12 $.ajax({
13 type: "GET", 13 type: "GET",
14 url: "", 14 url: "",
15 data: "job="+val, 15 data: "job="+val,
16 success: function (data) { 16 success: function (data) {
17 console.log('Выбор сделан!'); 17 console.log('Выбор сделан!');
18 console.log(data); 18 console.log(data);
19 main_oskar.html(data); 19 main_oskar.html(data);
20 }, 20 },
21 headers: { 21 headers: {
22 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 22 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
23 }, 23 },
24 error: function (data) { 24 error: function (data) {
25 data = JSON.stringify(data); 25 data = JSON.stringify(data);
26 console.log('Error: ' + data); 26 console.log('Error: ' + data);
27 } 27 }
28 }); 28 });
29 }); 29 });
30 </script> 30 </script>
31 @include('js.favorite-worker') 31 @include('js.favorite-worker')
32 @endsection 32 @endsection
33 33
34 @section('content') 34 @section('content')
35 <section class="thing"> 35 <section class="thing">
36 <div class="container"> 36 <div class="container">
37 <ul class="breadcrumbs thing__breadcrumbs"> 37 <ul class="breadcrumbs thing__breadcrumbs">
38 <li><a href="{{ route('index') }}">Главная</a></li> 38 <li><a href="{{ route('index') }}">Главная</a></li>
39 <li><a href="{{ route('bd_resume') }}">База резюме</a></li> 39 <li><a href="{{ route('bd_resume') }}">База резюме</a></li>
40 <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> 40 <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li>
41 </ul> 41 </ul>
42 <div class="thing__profile"> 42 <div class="thing__profile">
43 <img src="@isset($Query->photo) {{ asset(Storage::url($Query->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="thing__profile-photo"> 43 <img src="@isset($Query->photo) {{ asset(Storage::url($Query->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="thing__profile-photo">
44 <div class="thing__profile-body"> 44 <div class="thing__profile-body">
45 <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> 45 <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1>
46 <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены 46 <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены
47 исключительно в разрезе маркетинговых и финансовых предпосылок.</p> 47 исключительно в разрезе маркетинговых и финансовых предпосылок.</p>
48 <div class="thing__bottom"> 48 <div class="thing__bottom">
49 <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}"> 49 <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}">
50 Скачать резюме 50 Скачать резюме
51 <svg> 51 <svg>
52 <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> 52 <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use>
53 </svg> 53 </svg>
54 </a> 54 </a>
55 <button type="button" class="like js-toggle"> 55 <button type="button" class="like js-toggle">
56 <svg> 56 <svg>
57 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 57 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
58 </svg> 58 </svg>
59 </button> 59 </button>
60 </div> 60 </div>
61 </div> 61 </div>
62 </div> 62 </div>
63 </div> 63 </div>
64 </section> 64 </section>
65 <main class="main"> 65 <main class="main">
66 <div class="container"> 66 <div class="container">
67 <div class="main__resume-profile"> 67 <div class="main__resume-profile">
68 <div class="main__content"> 68 <div class="main__content">
69 <div class="main__spoiler"> 69 <div class="main__spoiler">
70 <button type="button" class="main__spoiler-toper js-toggle active"> 70 <button type="button" class="main__spoiler-toper js-toggle active">
71 Основная информация</button> 71 Основная информация</button>
72 72
73 <div class="main__spoiler-body"> 73 <div class="main__spoiler-body">
74 <table class="main__table"> 74 <table class="main__table">
75 <tbody> 75 <tbody>
76 <tr> 76 <tr>
77 <td>Имя:</td> 77 <td>Имя:</td>
78 <td><b>{{ $Query[0]->users->name_man }}</b></td> 78 <td><b>{{ $Query[0]->users->name_man }}</b></td>
79 </tr> 79 </tr>
80 <tr> 80 <tr>
81 <td>Должность:</td> 81 <td>Должность:</td>
82 <td><b>@if (isset($Query[0]->job_titles[0]->name)) {{ $Query[0]->job_titles[0]->name }} @else Не указано @endif</b></td> 82 <td>
83 @if ($Query[0]->job_titles->count())
84 @foreach ($Query[0]->job_titles as $it)
85 <b>{{ $it->name }}</b>
86 @endforeach
87 @endif
88 </td>
83 </tr> 89 </tr>
84 <tr> 90 <tr>
85 <td>Телефон:</td> 91 <td>Телефон:</td>
86 <td><b><a href="tel:{{ $Query[0]->telephone }}">{{ $Query[0]->telephone }}</a></b></td> 92 <td><b><a href="tel:{{ $Query[0]->telephone }}">{{ $Query[0]->telephone }}</a></b></td>
87 </tr> 93 </tr>
88 <tr> 94 <tr>
89 <td>E-mail:</td> 95 <td>E-mail:</td>
90 <td><b><a href="emailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> 96 <td><b><a href="emailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td>
91 </tr> 97 </tr>
92 <tr> 98 <tr>
93 <td>Возраст:</td> 99 <td>Возраст:</td>
94 <td><b>{{ $Query[0]->old_year }}</b></td> 100 <td><b>{{ $Query[0]->old_year }}</b></td>
95 </tr> 101 </tr>
96 <tr> 102 <tr>
97 <td>Статус:</td> 103 <td>Статус:</td>
98 <td><b>{{ $status_work[$Query[0]->status_work] }}</b></td> 104 <td><b>{{ $status_work[$Query[0]->status_work] }}</b></td>
99 </tr> 105 </tr>
100 <tr> 106 <tr>
101 <td>Город проживания:</td> 107 <td>Город проживания:</td>
102 <td><b>{{ $Query[0]->city }}</b></td> 108 <td><b>{{ $Query[0]->city }}</b></td>
103 </tr> 109 </tr>
104 <tr> 110 <tr>
105 <td>Уровень английского:</td> 111 <td>Уровень английского:</td>
106 <td><b>{{ $Query[0]->en_is }}</b></td> 112 <td><b>{{ $Query[0]->en_is }}</b></td>
107 </tr> 113 </tr>
108 <tr> 114 <tr>
109 <td>Опыт работы:</td> 115 <td>Опыт работы:</td>
110 <td><b>{{ $Query[0]->experience }}</b></td> 116 <td><b>{{ $Query[0]->experience }}</b></td>
111 </tr> 117 </tr>
112 </tbody> 118 </tbody>
113 </table> 119 </table>
114 </div> 120 </div>
115 </div> 121 </div>
116 <div class="main__spoiler"> 122 <div class="main__spoiler">
117 <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button> 123 <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button>
118 <div class="main__spoiler-body"> 124 <div class="main__spoiler-body">
119 125
120 @if (isset($Query[0]->sertificate)) 126 @if (isset($Query[0]->sertificate))
121 @if ($Query[0]->sertificate->count()) 127 @if ($Query[0]->sertificate->count())
122 @foreach($Query[0]->sertificate as $it) 128 @foreach($Query[0]->sertificate as $it)
123 <table class="main__table"> 129 <table class="main__table">
124 <tbody> 130 <tbody>
125 <tr> 131 <tr>
126 <td>Название сертификата:</td> 132 <td>Название сертификата:</td>
127 <td><b>{{ $it->name }}</b></td> 133 <td><b>{{ $it->name }}</b></td>
128 </tr> 134 </tr>
129 <tr> 135 <tr>
130 <td>Организация выдавшая документ:</td> 136 <td>Организация выдавшая документ:</td>
131 <td><b>{{ $it->education }}</b></td> 137 <td><b>{{ $it->education }}</b></td>
132 </tr> 138 </tr>
133 <tr> 139 <tr>
134 <td>Дата начала обучения:</td> 140 <td>Дата начала обучения:</td>
135 <td><b>{{ $it->date_begin }}</b></td> 141 <td><b>{{ $it->date_begin }}</b></td>
136 </tr> 142 </tr>
137 <tr> 143 <tr>
138 <td>Дата конца обучения:</td> 144 <td>Дата конца обучения:</td>
139 <td><b>{{ $it->end_begin }}</b></td> 145 <td><b>{{ $it->end_begin }}</b></td>
140 </tr> 146 </tr>
141 </tbody> 147 </tbody>
142 </table> 148 </table>
143 <br> 149 <br>
144 @endforeach 150 @endforeach
145 @endif 151 @endif
146 @endif 152 @endif
147 </div> 153 </div>
148 </div> 154 </div>
149 155
150 <div class="main__spoiler"> 156 <div class="main__spoiler">
151 <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button> 157 <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button>
152 <div class="main__spoiler-body"> 158 <div class="main__spoiler-body">
153 159
154 @if (isset($Query[0]->place_worker)) 160 @if (isset($Query[0]->place_worker))
155 @if ($Query[0]->place_worker->count()) 161 @if ($Query[0]->place_worker->count())
156 @foreach($Query[0]->place_worker as $it) 162 @foreach($Query[0]->place_worker as $it)
157 163
158 <table class="main__table"> 164 <table class="main__table">
159 <tbody> 165 <tbody>
160 <tr> 166 <tr>
161 <td>Должность:</td> 167 <td>Должность:</td>
162 <td><b>{{ $it->job_title }}</b></td> 168 <td><b>{{ $it->job_title }}</b></td>
163 </tr> 169 </tr>
164 <tr> 170 <tr>
165 <td>Опыт работы в танкерном флоте:</td> 171 <td>Опыт работы в танкерном флоте:</td>
166 <td><b>@if($it->tanker==1) Есть @else Нет @endif</b></td> 172 <td><b>@if($it->tanker==1) Есть @else Нет @endif</b></td>
167 </tr> 173 </tr>
168 <tr> 174 <tr>
169 <td>Дата начала работы:</td> 175 <td>Дата начала работы:</td>
170 <td><b>{{ $it->begin_work }}</b></td> 176 <td><b>{{ $it->begin_work }}</b></td>
171 </tr> 177 </tr>
172 <tr> 178 <tr>
173 <td>Дата конца работы:</td> 179 <td>Дата конца работы:</td>
174 <td><b>{{ $it->end_work }}</b></td> 180 <td><b>{{ $it->end_work }}</b></td>
175 </tr> 181 </tr>
176 <tr> 182 <tr>
177 <td>Название компании:</td> 183 <td>Название компании:</td>
178 <td><b>{{ $it->name_company }}</b></td> 184 <td><b>{{ $it->name_company }}</b></td>
179 </tr> 185 </tr>
180 <tr> 186 <tr>
181 <td>GWT тип</td> 187 <td>GWT тип</td>
182 <td><b>{{ $it->GWT }}</b></td> 188 <td><b>{{ $it->GWT }}</b></td>
183 </tr> 189 </tr>
184 <tr> 190 <tr>
185 <td>ГД:</td> 191 <td>ГД:</td>
186 <td><b>{{ $it->KBT }}</b></td> 192 <td><b>{{ $it->KBT }}</b></td>
187 </tr> 193 </tr>
188 </tbody> 194 </tbody>
189 </table> 195 </table>
190 <br> 196 <br>
191 @endforeach 197 @endforeach
192 @endif 198 @endif
193 @endif 199 @endif
194 </div> 200 </div>
195 </div> 201 </div>
196 202
197 <div class="main__spoiler"> 203 <div class="main__spoiler">
198 <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button> 204 <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button>
199 <div class="main__spoiler-body"> 205 <div class="main__spoiler-body">
200 206
201 @if (isset($Query[0]->infobloks)) 207 @if (isset($Query[0]->infobloks))
202 @if ($Query[0]->infobloks->count()) 208 @if ($Query[0]->infobloks->count())
203 <table class="main__table"> 209 <table class="main__table">
204 <tbody> 210 <tbody>
205 @foreach($Query[0]->infobloks as $it) 211 @foreach($Query[0]->infobloks as $it)
206 <tr> 212 <tr>
207 <td>Документ:</td> 213 <td>Документ:</td>
208 <td><b>{{ $it->name }}</b></td> 214 <td><b>{{ $it->name }}</b></td>
209 </tr> 215 </tr>
210 @endforeach 216 @endforeach
211 </tbody> 217 </tbody>
212 </table> 218 </table>
213 @endif 219 @endif
214 @endif 220 @endif
215 </div> 221 </div>
216 </div> 222 </div>
217 </div> 223 </div>
218 <div class="main__resume-profile-about"> 224 <div class="main__resume-profile-about">
219 <h2 class="main__resume-profile-about-title">О себе</h2> 225 <h2 class="main__resume-profile-about-title">О себе</h2>
220 <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p> 226 <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p>
221 <!--<div class="button main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $Query[0]->id }}" data-options='{"touch":false,"autoFocus":false}'>Написать сообщение</div>--> 227 <!--<div class="button main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $Query[0]->id }}" data-options='{"touch":false,"autoFocus":false}'>Написать сообщение</div>-->
222 </div> 228 </div>
223 <div class="main__resume-profile-info"> 229 <div class="main__resume-profile-info">
224 <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> 230 <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2>
225 <div class="main__resume-profile-info-body"> 231 <div class="main__resume-profile-info-body">
226 @if ((isset($Query[0]->prev_company)) && ($Query[0]->prev_company->count())) 232 @if ((isset($Query[0]->prev_company)) && ($Query[0]->prev_company->count()))
227 @foreach ($Query[0]->prev_company as $it) 233 @foreach ($Query[0]->prev_company as $it)
228 <div class="main__resume-profile-info-body-item"> 234 <div class="main__resume-profile-info-body-item">
229 <h3 class="main__resume-profile-info-body-subtitle">{{ $it->name_company }}</h3> 235 <h3 class="main__resume-profile-info-body-subtitle">{{ $it->name_company }}</h3>
230 <ul class="main__resume-profile-info-body-inner"> 236 <ul class="main__resume-profile-info-body-inner">
231 <li> 237 <li>
232 <b>Руководитель</b> 238 <b>Руководитель</b>
233 <span>{{ $it->direct }}</span> 239 <span>{{ $it->direct }}</span>
234 </li> 240 </li>
235 <li> 241 <li>
236 <b>Телефон того, кто может дать рекомендацию</b> 242 <b>Телефон того, кто может дать рекомендацию</b>
237 <span> 243 <span>
238 @if (!empty($it->telephone)) 244 @if (!empty($it->telephone))
239 <a href="tel:{{$it->telephone }}">{{ $it->telephone }}</a> 245 <a href="tel:{{$it->telephone }}">{{ $it->telephone }}</a>
240 @endif 246 @endif
241 @if (!empty($it->telephone2)) 247 @if (!empty($it->telephone2))
242 <a href="tel:{{$it->telephone2 }}">{{ $it->telephone2 }}</a> 248 <a href="tel:{{$it->telephone2 }}">{{ $it->telephone2 }}</a>
243 @endif 249 @endif
244 </span> 250 </span>
245 </li> 251 </li>
246 </ul> 252 </ul>
247 </div> 253 </div>
248 @endforeach 254 @endforeach
249 @else 255 @else
250 <div class="main__resume-profile-info-body-item"> 256 <div class="main__resume-profile-info-body-item">
251 <h3 class="main__resume-profile-info-body-subtitle">Нету данных о компании</h3> 257 <h3 class="main__resume-profile-info-body-subtitle">Нету данных о компании</h3>
252 </div> 258 </div>
253 @endif 259 @endif
254 </div> 260 </div>
255 </div> 261 </div>
256 262
257 <div class="main__resume-profile-review"> 263 <div class="main__resume-profile-review">
258 <form action="{{ route('stars_answer') }}" method="POST"> 264 <form action="{{ route('stars_answer') }}" method="POST">
259 @csrf 265 @csrf
260 <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2> 266 <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2>
261 <div class="rate"> 267 <div class="rate">
262 <div class="rate__label">Ваша оценка:</div> 268 <div class="rate__label">Ваша оценка:</div>
263 <div class="rate__stars"> 269 <div class="rate__stars">
264 <select name="stars" id="stars" class="star-rating js-stars"> 270 <select name="stars" id="stars" class="star-rating js-stars">
265 <option value="5">5</option> 271 <option value="5">5</option>
266 <option value="4">4</option> 272 <option value="4">4</option>
267 <option value="3">3</option> 273 <option value="3">3</option>
268 <option value="2">2</option> 274 <option value="2">2</option>
269 <option value="1" selected>1</option> 275 <option value="1" selected>1</option>
270 </select> 276 </select>
271 </div> 277 </div>
272 </div> 278 </div>
273 <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/> 279 <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/>
274 <div class="main__resume-profile-review-body"> 280 <div class="main__resume-profile-review-body">
275 <h3>Ваш отзыв</h3> 281 <h3>Ваш отзыв</h3>
276 <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва&hellip;" required></textarea> 282 <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва&hellip;" required></textarea>
277 <button type="submit" class="button">Оставить отзыв</button> 283 <button type="submit" class="button">Оставить отзыв</button>
278 </div> 284 </div>
279 </form> 285 </form>
280 </div> 286 </div>
281 </div> 287 </div>
282 </div> 288 </div>
283 </main> 289 </main>
284 </div> 290 </div>
285 @endsection 291 @endsection
286 292
1 <?php 1 <?php
2 2
3 use App\Http\Controllers\Ad_jobsController; 3 use App\Http\Controllers\Ad_jobsController;
4 use App\Http\Controllers\AdEmployerController; 4 use App\Http\Controllers\AdEmployerController;
5 use App\Http\Controllers\Admin\AdminController; 5 use App\Http\Controllers\Admin\AdminController;
6 use App\Http\Controllers\Admin\CategoryController; 6 use App\Http\Controllers\Admin\CategoryController;
7 use App\Http\Controllers\Admin\CategoryEmpController; 7 use App\Http\Controllers\Admin\CategoryEmpController;
8 use App\Http\Controllers\Admin\EducationController; 8 use App\Http\Controllers\Admin\EducationController;
9 use App\Http\Controllers\Admin\EmployersController; 9 use App\Http\Controllers\Admin\EmployersController;
10 use App\Http\Controllers\EmployerController as FrontEmployersController; 10 use App\Http\Controllers\EmployerController as FrontEmployersController;
11 use App\Http\Controllers\Admin\InfoBloksController; 11 use App\Http\Controllers\Admin\InfoBloksController;
12 use App\Http\Controllers\Admin\JobTitlesController; 12 use App\Http\Controllers\Admin\JobTitlesController;
13 use App\Http\Controllers\Admin\UsersController; 13 use App\Http\Controllers\Admin\UsersController;
14 use App\Http\Controllers\Admin\WorkersController; 14 use App\Http\Controllers\Admin\WorkersController;
15 use App\Http\Controllers\Auth\ForgotPasswordController; 15 use App\Http\Controllers\Auth\ForgotPasswordController;
16 use App\Http\Controllers\Auth\LoginController; 16 use App\Http\Controllers\Auth\LoginController;
17 use App\Http\Controllers\Auth\RegisterController; 17 use App\Http\Controllers\Auth\RegisterController;
18 use App\Http\Controllers\CKEditorController; 18 use App\Http\Controllers\CKEditorController;
19 use App\Http\Controllers\MediaController; 19 use App\Http\Controllers\MediaController;
20 use App\Http\Controllers\WorkerController; 20 use App\Http\Controllers\WorkerController;
21 use App\Models\Ad_jobs; 21 use App\Models\Ad_jobs;
22 use App\Models\User; 22 use App\Models\User;
23 use App\Http\Controllers\MainController; 23 use App\Http\Controllers\MainController;
24 use App\Http\Controllers\HomeController; 24 use App\Http\Controllers\HomeController;
25 use Illuminate\Support\Facades\Route; 25 use Illuminate\Support\Facades\Route;
26 use App\Http\Controllers\Admin\CompanyController; 26 use App\Http\Controllers\Admin\CompanyController;
27 use App\Http\Controllers\Admin\Ad_EmployersController; 27 use App\Http\Controllers\Admin\Ad_EmployersController;
28 use App\Http\Controllers\Admin\MsgAnswersController; 28 use App\Http\Controllers\Admin\MsgAnswersController;
29 use App\Http\Controllers\Admin\GroupsController; 29 use App\Http\Controllers\Admin\GroupsController;
30 use App\Http\Controllers\PagesController; 30 use App\Http\Controllers\PagesController;
31 use Illuminate\Support\Facades\Storage; 31 use Illuminate\Support\Facades\Storage;
32 use App\Http\Controllers\EmployerController; 32 use App\Http\Controllers\EmployerController;
33 use App\Http\Controllers\CompanyController as FrontCompanyController; 33 use App\Http\Controllers\CompanyController as FrontCompanyController;
34 34
35 35
36 /* 36 /*
37 |-------------------------------------------------------------------------- 37 |--------------------------------------------------------------------------
38 | Web Routes 38 | Web Routes
39 |-------------------------------------------------------------------------- 39 |--------------------------------------------------------------------------
40 | 40 |
41 | Here is where you can register web routes for your application. These 41 | Here is where you can register web routes for your application. These
42 | routes are loaded by the RouteServiceProvider within a group which 42 | routes are loaded by the RouteServiceProvider within a group which
43 | contains the "web" middleware group. Now create something great! 43 | contains the "web" middleware group. Now create something great!
44 | 44 |
45 */ 45 */
46 /* 46 /*
47 Route::get('/', function () { 47 Route::get('/', function () {
48 return view('welcome'); 48 return view('welcome');
49 })->name('index'); 49 })->name('index');
50 */ 50 */
51 51
52 Route::get('/', [MainController::class, 'index'])->name('index'); 52 Route::get('/', [MainController::class, 'index'])->name('index');
53 53
54 //Роуты авторизации, регистрации, восстановления, аутентификации 54 //Роуты авторизации, регистрации, восстановления, аутентификации
55 Auth::routes(['verify' => true]); 55 Auth::routes(['verify' => true]);
56 56
57 // роуты регистрации, авторизации, восстановления пароля, верификации почты 57 // роуты регистрации, авторизации, восстановления пароля, верификации почты
58 /*Route::group([ 58 /*Route::group([
59 'as' => 'auth.', //имя маршрута, например auth.index 59 'as' => 'auth.', //имя маршрута, например auth.index
60 'prefix' => 'auth', // префикс маршрута, например, auth/index 60 'prefix' => 'auth', // префикс маршрута, например, auth/index
61 ], function () { 61 ], function () {
62 //форма регистрации 62 //форма регистрации
63 Route::get('register', [RegisterController::class, 'register'])->name('register'); 63 Route::get('register', [RegisterController::class, 'register'])->name('register');
64 64
65 //создание пользователя 65 //создание пользователя
66 Route::post('register', [RegisterController::class, 'create'])->name('create'); 66 Route::post('register', [RegisterController::class, 'create'])->name('create');
67 67
68 //форма входа авторизации 68 //форма входа авторизации
69 Route::get('login', [LoginController::class, 'login'])->name('login'); 69 Route::get('login', [LoginController::class, 'login'])->name('login');
70 70
71 //аутентификация 71 //аутентификация
72 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 72 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
73 73
74 //выход 74 //выход
75 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 75 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
76 76
77 //форма ввода адреса почты 77 //форма ввода адреса почты
78 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 78 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
79 79
80 //письмо на почту 80 //письмо на почту
81 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 81 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
82 82
83 //форма восстановления пароля 83 //форма восстановления пароля
84 Route::get('reset-password/token/{token}/email/{email}', 84 Route::get('reset-password/token/{token}/email/{email}',
85 [ResetPasswordController::class, 'form'] 85 [ResetPasswordController::class, 'form']
86 )->name('reset-form'); 86 )->name('reset-form');
87 87
88 //восстановление пароля 88 //восстановление пароля
89 Route::post('reset-password', 89 Route::post('reset-password',
90 [ResetPasswordController::class, 'reset'] 90 [ResetPasswordController::class, 'reset']
91 )->name('reset-password'); 91 )->name('reset-password');
92 92
93 //сообщение о необходимости проверки адреса почты 93 //сообщение о необходимости проверки адреса почты
94 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 94 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
95 95
96 //подтверждение адреса почты нового пользователя 96 //подтверждение адреса почты нового пользователя
97 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 97 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
98 ->where('token', '[a-f0-9]{32}') 98 ->where('token', '[a-f0-9]{32}')
99 ->where('id', '[0-9]+') 99 ->where('id', '[0-9]+')
100 ->name('verify-email'); 100 ->name('verify-email');
101 });*/ 101 });*/
102 102
103 //Личный кабинет пользователя 103 //Личный кабинет пользователя
104 Route::get('/home', [HomeController::class, 'index'])->name('home'); 104 Route::get('/home', [HomeController::class, 'index'])->name('home');
105 105
106 /* 106 /*
107 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 107 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
108 $user = User::where('email',$request->input('email'))->first(); 108 $user = User::where('email',$request->input('email'))->first();
109 109
110 $user->sendEmailVerificationNotification(); 110 $user->sendEmailVerificationNotification();
111 111
112 return 'your response'; 112 return 'your response';
113 })->middleware('throttle:6,1')->name('verification.resend'); 113 })->middleware('throttle:6,1')->name('verification.resend');
114 */ 114 */
115 115
116 // Авторизация, регистрация в админку 116 // Авторизация, регистрация в админку
117 Route::group([ 117 Route::group([
118 'as' => 'admin.', // имя маршрута, например auth.index 118 'as' => 'admin.', // имя маршрута, например auth.index
119 'prefix' => 'admin', // префикс маршрута, например auth/index 119 'prefix' => 'admin', // префикс маршрута, например auth/index
120 'middleware' => ['guest'], 120 'middleware' => ['guest'],
121 ], function () { 121 ], function () {
122 // Форма регистрации 122 // Форма регистрации
123 Route::get('register', [AdminController::class, 'register'])->name('register'); 123 Route::get('register', [AdminController::class, 'register'])->name('register');
124 // Создание пользователя 124 // Создание пользователя
125 Route::post('register', [AdminController::class, 'create'])->name('create'); 125 Route::post('register', [AdminController::class, 'create'])->name('create');
126 126
127 //Форма входа 127 //Форма входа
128 Route::get('login', [AdminController::class, 'login'])->name('login'); 128 Route::get('login', [AdminController::class, 'login'])->name('login');
129 129
130 // аутентификация 130 // аутентификация
131 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 131 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
132 132
133 }); 133 });
134 134
135 // Личный кабинет админки 135 // Личный кабинет админки
136 Route::group([ 136 Route::group([
137 'as' => 'admin.', // имя маршрута, например auth.index 137 'as' => 'admin.', // имя маршрута, например auth.index
138 'prefix' => 'admin', // префикс маршрута, например auth/index 138 'prefix' => 'admin', // префикс маршрута, например auth/index
139 'middleware' => ['auth'], ['admin'], 139 'middleware' => ['auth'], ['admin'],
140 ], function() { 140 ], function() {
141 141
142 // выход 142 // выход
143 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 143 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
144 144
145 // кабинет главная страница 145 // кабинет главная страница
146 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 146 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
147 147
148 // кабинет профиль админа - форма 148 // кабинет профиль админа - форма
149 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 149 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
150 // кабинет профиль админа - сохранение формы 150 // кабинет профиль админа - сохранение формы
151 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 151 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
152 152
153 //кабинет сообщения админа 153 //кабинет сообщения админа
154 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 154 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
155 155
156 156
157 // кабинет профиль - форма пароли 157 // кабинет профиль - форма пароли
158 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 158 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
159 // кабинет профиль - сохранение формы пароля 159 // кабинет профиль - сохранение формы пароля
160 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 160 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
161 161
162 162
163 // кабинет профиль пользователя - форма 163 // кабинет профиль пользователя - форма
164 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 164 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
165 // кабинет профиль пользователя - сохранение формы 165 // кабинет профиль пользователя - сохранение формы
166 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 166 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
167 167
168 // кабинет профиль работодатель - форма 168 // кабинет профиль работодатель - форма
169 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 169 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
170 // кабинет профиль работодатель - сохранение формы 170 // кабинет профиль работодатель - сохранение формы
171 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 171 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
172 // кабинет удаление профиль работодателя и юзера 172 // кабинет удаление профиль работодателя и юзера
173 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 173 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
174 174
175 // кабинет профиль работник - форма 175 // кабинет профиль работник - форма
176 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 176 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
177 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 177 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
178 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 178 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
179 // кабинет профиль работник - сохранение формы 179 // кабинет профиль работник - сохранение формы
180 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 180 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
181 181
182 // Медиа 182 // Медиа
183 Route::get('media', [MediaController::class, 'index'])->name('media'); 183 Route::get('media', [MediaController::class, 'index'])->name('media');
184 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 184 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
185 185
186 // кабинет настройки сайта - форма 186 // кабинет настройки сайта - форма
187 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 187 Route::get('config', [AdminController::class, 'config_form'])->name('config');
188 // кабинет настройки сайта сохранение формы 188 // кабинет настройки сайта сохранение формы
189 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 189 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
190 190
191 // кабинет - новости 191 // кабинет - новости
192 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); 192 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin');
193 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); 193 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add');
194 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); 194 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add');
195 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); 195 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit');
196 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); 196 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update');
197 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); 197 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete');
198 198
199 // кабинет - пользователи 199 // кабинет - пользователи
200 Route::get('users', [UsersController::class, 'index'])->name('users'); 200 Route::get('users', [UsersController::class, 'index'])->name('users');
201 201
202 // кабинет - пользователи 202 // кабинет - пользователи
203 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 203 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
204 204
205 // кабинет - работодатели 205 // кабинет - работодатели
206 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 206 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
207 207
208 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 208 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
209 209
210 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 210 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
211 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 211 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
212 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 212 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
213 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 213 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
214 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 214 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
215 215
216 // кабинет - соискатели 216 // кабинет - соискатели
217 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 217 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
218 218
219 // кабинет - база данных 219 // кабинет - база данных
220 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 220 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
221 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 221 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
222 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 222 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
223 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 223 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
224 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 224 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
225 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 225 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
226 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 226 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
227 227
228 // кабинет - вакансии 228 // кабинет - вакансии
229 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 229 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
230 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 230 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
231 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 231 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
232 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 232 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
233 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 233 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
234 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 234 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
235 235
236 // Редактирование должности в вакансии 236 // Редактирование должности в вакансии
237 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 237 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
238 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 238 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
239 239
240 240
241 // кабинет - категории 241 // кабинет - категории
242 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 242 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
243 243
244 // СRUD-операции над Справочником Категории 244 // СRUD-операции над Справочником Категории
245 245
246 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 246 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
247 247
248 // CRUD-операции над справочником Категории для работодателей 248 // CRUD-операции над справочником Категории для работодателей
249 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 249 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
250 250
251 // CRUD-операции над справочником Образование 251 // CRUD-операции над справочником Образование
252 Route::resource('education', EducationController::class, ['except' => ['show']]); 252 Route::resource('education', EducationController::class, ['except' => ['show']]);
253 253
254 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 254 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
255 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 255 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
256 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 256 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
257 257
258 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 258 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
259 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 259 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
260 260
261 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 261 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
262 262
263 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 263 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
264 /* 264 /*
265 * кабинет - CRUD-операции по справочнику должности 265 * кабинет - CRUD-операции по справочнику должности
266 * 266 *
267 */ 267 */
268 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 268 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
269 269
270 // кабинет - сообщения (чтение чужих) 270 // кабинет - сообщения (чтение чужих)
271 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 271 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
272 // кабинет - просмотр сообщения чужого (чтение) 272 // кабинет - просмотр сообщения чужого (чтение)
273 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 273 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
274 274
275 // кабинет - сообщения (админские) 275 // кабинет - сообщения (админские)
276 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 276 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
277 // кабинет - сообщения (админские) 277 // кабинет - сообщения (админские)
278 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 278 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
279 // кабинет - sql - конструкция запросов 279 // кабинет - sql - конструкция запросов
280 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 280 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
281 281
282 /* 282 /*
283 * Расписанный подход в описании каждой директорий групп пользователей. 283 * Расписанный подход в описании каждой директорий групп пользователей.
284 */ 284 */
285 // кабинет - группы пользователей 285 // кабинет - группы пользователей
286 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 286 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
287 // кабинет - добавление форма группы пользователей 287 // кабинет - добавление форма группы пользователей
288 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 288 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
289 // кабинет - сохранение формы группы пользователей 289 // кабинет - сохранение формы группы пользователей
290 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 290 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
291 // кабинет - редактирование форма группы пользователей 291 // кабинет - редактирование форма группы пользователей
292 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 292 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
293 // кабинет - сохранение редактированной формы группы пользователей 293 // кабинет - сохранение редактированной формы группы пользователей
294 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 294 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
295 // кабинет - удаление группы пользователей 295 // кабинет - удаление группы пользователей
296 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 296 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
297 297
298 298
299 // кабинет - список админов 299 // кабинет - список админов
300 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 300 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
301 301
302 // справочник Позиции 302 // справочник Позиции
303 Route::get('positions', [AdminController::class, 'position'])->name('position'); 303 Route::get('positions', [AdminController::class, 'position'])->name('position');
304 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); 304 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position');
305 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); 305 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position');
306 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); 306 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position');
307 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); 307 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position');
308 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); 308 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position');
309 309
310 /////редактор////// кабинет - редактор сайта//////////////////////// 310 /////редактор////// кабинет - редактор сайта////////////////////////
311 Route::get('editor-site', function() { 311 Route::get('editor-site', function() {
312 return view('admin.editor.index'); 312 return view('admin.editor.index');
313 })->name('editor-site'); 313 })->name('editor-site');
314 314
315 315
316 // кабинет - редактор шапки-футера сайта 316 // кабинет - редактор шапки-футера сайта
317 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 317 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
318 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 318 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
319 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 319 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
320 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 320 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
321 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 321 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
322 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 322 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
323 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 323 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
324 324
325 325
326 // кабинет - редактор должности на главной 326 // кабинет - редактор должности на главной
327 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 327 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
328 328
329 // кабинет - редактор работодатели на главной 329 // кабинет - редактор работодатели на главной
330 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 330 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
331 331
332 332
333 // кабинет - редактор seo-сайта 333 // кабинет - редактор seo-сайта
334 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 334 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
335 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 335 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
336 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 336 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
337 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 337 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
338 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 338 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
339 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 339 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
340 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 340 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
341 341
342 342
343 // кабинет - редактор страниц 343 // кабинет - редактор страниц
344 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 344 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
345 // кабинет - добавление страницы 345 // кабинет - добавление страницы
346 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 346 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
347 // кабинет - сохранение формы страницы 347 // кабинет - сохранение формы страницы
348 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 348 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
349 // кабинет - редактирование форма страницы 349 // кабинет - редактирование форма страницы
350 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 350 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
351 // кабинет - сохранение редактированной формы страницы 351 // кабинет - сохранение редактированной формы страницы
352 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 352 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
353 // кабинет - удаление страницы 353 // кабинет - удаление страницы
354 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 354 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
355 355
356 356
357 // кабинет - реклама сайта 357 // кабинет - реклама сайта
358 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 358 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
359 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 359 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
360 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 360 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
361 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 361 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
362 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 362 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
363 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 363 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
364 //////////////////////////////////////////////////////////////////////// 364 ////////////////////////////////////////////////////////////////////////
365 365
366 366
367 // кабинет - отзывы о работодателе для модерации 367 // кабинет - отзывы о работодателе для модерации
368 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 368 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
369 369
370 // Общая страница статистики 370 // Общая страница статистики
371 Route::get('statics', function () { 371 Route::get('statics', function () {
372 return view('admin.static.index'); 372 return view('admin.static.index');
373 })->name('statics'); 373 })->name('statics');
374 374
375 // кабинет - статистика работников 375 // кабинет - статистика работников
376 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 376 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
377 377
378 // кабинет - статистика вакансий работодателя 378 // кабинет - статистика вакансий работодателя
379 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 379 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
380 380
381 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 381 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
382 /* 382 /*
383 * CRUD-операции над справочником дипломы и документы 383 * CRUD-операции над справочником дипломы и документы
384 */ 384 */
385 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 385 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
386 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 386 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
387 387
388 // кабинет - роли пользователя 388 // кабинет - роли пользователя
389 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 389 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
390 390
391 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 391 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
392 392
393 Route::get('logs', function() { 393 Route::get('logs', function() {
394 $files = Storage::files('logs/laravel.log'); 394 $files = Storage::files('logs/laravel.log');
395 })->name('logs'); 395 })->name('logs');
396 }); 396 });
397 397
398 // Инструментальные страницы 398 // Инструментальные страницы
399 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 399 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
400 400
401 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 401 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
402 402
403 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 403 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
404 404
405 // Страницы с произвольным контентом 405 // Страницы с произвольным контентом
406 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 406 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
407 407
408 // Публичные страницы соискателя 408 // Публичные страницы соискателя
409 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 409 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
410 410
411 //Страница вакансии 411 //Страница вакансии
412 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 412 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
413 413
414 //Вакансии 414 //Вакансии
415 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 415 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
416 416
417 //Вакансии поиск на главной 417 //Вакансии поиск на главной
418 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 418 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
419 419
420 //Вакансии категория детальная 420 //Вакансии категория детальная
421 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 421 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
422 422
423 // Лайк вакансии 423 // Лайк вакансии
424 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); 424 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy');
425 425
426 //Детальная страница вакансии - работодателя 426 //Детальная страница вакансии - работодателя
427 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 427 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
428 428
429 //Судоходные компании 429 //Судоходные компании
430 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 430 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
431 431
432 //Детальная инфа о компании 432 //Детальная инфа о компании
433 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 433 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
434 434
435 //Образование 435 //Образование
436 Route::get('education', [MainController::class, 'education'])->name('education'); 436 Route::get('education', [MainController::class, 'education'])->name('education');
437 437
438 //Новости 438 //Новости
439 Route::get('news', [MainController::class, 'news'])->name('news'); 439 Route::get('news', [MainController::class, 'news'])->name('news');
440 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); 440 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new');
441 441
442 //Контакты 442 //Контакты
443 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 443 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
444 444
445 //База резюме 445 //База резюме
446 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 446 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
447 447
448 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); 448 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
449 449
450 //Анкета соискателя 450 //Анкета соискателя
451 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 451 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
452 452
453 //Скачать резюме 453 //Скачать резюме
454 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 454 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
455 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2');
456 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all');
457
455 458
456 //Вход в кабинет 459 //Вход в кабинет
457 Route::get('login', [MainController::class, 'input_login'])->name('login'); 460 Route::get('login', [MainController::class, 'input_login'])->name('login');
458 461
459 // Выход из кабинета 462 // Выход из кабинета
460 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 463 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
461 464
462 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 465 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
463 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 466 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
464 467
465 //восстановление пароля 468 //восстановление пароля
466 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); 469 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
467 // Звезда сообщения 470 // Звезда сообщения
468 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); 471 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
469 472
470 // Борьба 473 // Борьба
471 Route::get('clear_cookie', function() { 474 Route::get('clear_cookie', function() {
472 \App\Classes\Cookies_vacancy::clear_vacancy(); 475 \App\Classes\Cookies_vacancy::clear_vacancy();
473 return redirect()->route('index'); 476 return redirect()->route('index');
474 })->name('clear_cookie'); 477 })->name('clear_cookie');
475 478
476 Route::get('cookies', function() { 479 Route::get('cookies', function() {
477 return view('cookies'); 480 return view('cookies');
478 })->name('cookies'); 481 })->name('cookies');
479 482
480 483
481 484
482 485
483 // Личный кабинет работник 486 // Личный кабинет работник
484 Route::group([ 487 Route::group([
485 'as' => 'worker.', // имя маршрута, например auth.index 488 'as' => 'worker.', // имя маршрута, например auth.index
486 'prefix' => 'worker', // префикс маршрута, например auth/index 489 'prefix' => 'worker', // префикс маршрута, например auth/index
487 'middleware' => ['auth'], ['is_worker'], 490 'middleware' => ['auth'], ['is_worker'],
488 ], function() { 491 ], function() {
489 // 1 страница - Моя анкета 492 // 1 страница - Моя анкета
490 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 493 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
491 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 494 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
492 495
493 // 2 страница - Сообщения 496 // 2 страница - Сообщения
494 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 497 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
495 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); 498 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog');
496 // 3 страница - Избранные вакансии 499 // 3 страница - Избранные вакансии
497 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 500 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
498 // Продолжение борьбы против колорадов - избранные вакансии 501 // Продолжение борьбы против колорадов - избранные вакансии
499 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 502 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
500 503
501 // 4 страница - Сменить пароль 504 // 4 страница - Сменить пароль
502 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 505 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
503 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); 506 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
504 507
505 // 5 страница - Удалить профиль 508 // 5 страница - Удалить профиль
506 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 509 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
507 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); 510 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
508 511
509 // Резюме -pdf 512 // Резюме -pdf
510 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 513 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
511 514
512 // Поднятие анкеты 515 // Поднятие анкеты
513 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 516 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
514 517
515 // Добавление сертификата 518 // Добавление сертификата
516 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); 519 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate');
517 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 520 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
518 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); 521 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
519 522
520 // Добавление документа-диплома 523 // Добавление документа-диплома
521 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); 524 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
522 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); 525 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
523 Route::get('кабинет/delete_diplom/{worker}', [WorkerController::class, 'delete_diplom'])->name('delete_diplom'); 526 Route::get('кабинет/delete_diplom/{worker}', [WorkerController::class, 'delete_diplom'])->name('delete_diplom');
524 527
525 // Добавление стандартного диплома 528 // Добавление стандартного диплома
526 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); 529 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
527 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); 530 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
528 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); 531 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
529 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); 532 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
530 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); 533 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
531 534
532 // Отправка сообщения работодателю от соискателя 535 // Отправка сообщения работодателю от соискателя
533 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); 536 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
534 }); 537 });
535 538
536 // Личный кабинет работодателя 539 // Личный кабинет работодателя
537 Route::group([ 540 Route::group([
538 'as' => 'employer.', // имя маршрута, например auth.index 541 'as' => 'employer.', // имя маршрута, например auth.index
539 'prefix' => 'employer', // префикс маршрута, например auth/index 542 'prefix' => 'employer', // префикс маршрута, например auth/index
540 'middleware' => ['auth'], !['is_worker'], 543 'middleware' => ['auth'], !['is_worker'],
541 ], function() { 544 ], function() {
542 // 1 страница - Профиль 545 // 1 страница - Профиль
543 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 546 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
544 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 547 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
545 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 548 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
546 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 549 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
547 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); 550 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
548 551
549 // 2 страница - Добавление вакансий 552 // 2 страница - Добавление вакансий
550 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 553 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
551 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 554 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
552 555
553 556
554 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 557 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
555 558
556 559
557 // 3 страница - Мои вакансии 560 // 3 страница - Мои вакансии
558 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 561 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
559 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 562 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
560 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 563 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
561 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 564 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
562 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 565 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
563 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 566 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
564 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); 567 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
565 568
566 // 4.1Ю. 569 // 4.1Ю.
567 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); 570 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
568 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); 571 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
569 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); 572 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
570 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); 573 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
571 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); 574 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
572 575
573 // 4 страница - Отклики на вакансии 576 // 4 страница - Отклики на вакансии
574 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 577 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
575 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 578 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
576 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 579 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
577 580
578 // 5 страница - Сообщения 581 // 5 страница - Сообщения
579 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 582 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
580 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); 583 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog');
581 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 584 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
582 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 585 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
583 586
584 // 6 страница - Избранный 587 // 6 страница - Избранный
585 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 588 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
586 589
587 //7 страница - База данных 590 //7 страница - База данных
588 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 591 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
589 592
590 //8 страница - База резюме 593 //8 страница - База резюме
591 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 594 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
592 595
593 // 9 рассылка сообщений 596 // 9 рассылка сообщений
594 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 597 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
595 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 598 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
596 599
597 // 10 страница FAQ вопросы 600 // 10 страница FAQ вопросы
598 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); 601 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
599 602
600 // 11 страница - Настройка уведомлений 603 // 11 страница - Настройка уведомлений
601 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 604 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
602 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 605 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
603 606
604 // 12 страница - Сменить пароль 607 // 12 страница - Сменить пароль
605 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 608 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
606 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 609 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
607 610
608 // 13 страница - Удаление профиля 611 // 13 страница - Удаление профиля
609 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 612 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
610 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 613 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
611 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); 614 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
612 615
613 // Отправил сообщение 616 // Отправил сообщение
614 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); 617 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message');
615 }); 618 });
616 619
617 620
618 621