Commit 248330cb1eff449cc4b8d93ab68ef84539cf9eff

Authored by Fedor
1 parent 77ece55780
Exists in master

task-132687 bugfix

Showing 9 changed files with 32 additions and 33 deletions Inline Diff

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\BaseUser_min_Request; 7 use App\Http\Requests\BaseUser_min_Request;
8 use App\Http\Requests\FlotRequest; 8 use App\Http\Requests\FlotRequest;
9 use App\Http\Requests\MessagesRequiest; 9 use App\Http\Requests\MessagesRequiest;
10 use App\Http\Requests\VacancyRequestEdit; 10 use App\Http\Requests\VacancyRequestEdit;
11 use App\Mail\MailCreateEmployer; 11 use App\Mail\MailCreateEmployer;
12 use App\Mail\MailSotrudnichestvo; 12 use App\Mail\MailSotrudnichestvo;
13 use App\Mail\MassSendingMessages; 13 use App\Mail\MassSendingMessages;
14 use App\Mail\SendAllMessages; 14 use App\Mail\SendAllMessages;
15 use App\Models\Ad_employer; 15 use App\Models\Ad_employer;
16 use App\Models\ad_response; 16 use App\Models\ad_response;
17 use App\Models\Category; 17 use App\Models\Category;
18 use App\Models\Chat; 18 use App\Models\Chat;
19 use App\Models\Employer; 19 use App\Models\Employer;
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_worker; 22 use App\Models\Like_worker;
23 use App\Models\Message; 23 use App\Models\Message;
24 use App\Models\Worker; 24 use App\Models\Worker;
25 use App\Models\MessagesRequests; 25 use App\Models\MessagesRequests;
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\Http\Request; 29 use Illuminate\Http\Request;
30 use Illuminate\Support\Facades\Auth; 30 use Illuminate\Support\Facades\Auth;
31 use Illuminate\Support\Facades\Hash; 31 use Illuminate\Support\Facades\Hash;
32 use Illuminate\Support\Facades\Log; 32 use Illuminate\Support\Facades\Log;
33 use Illuminate\Support\Facades\Mail; 33 use Illuminate\Support\Facades\Mail;
34 use Illuminate\Support\Facades\Storage; 34 use Illuminate\Support\Facades\Storage;
35 use App\Models\User as User_Model; 35 use App\Models\User as User_Model;
36 use Illuminate\Support\Facades\Validator; 36 use Illuminate\Support\Facades\Validator;
37 use App\Enums\DbExportColumns; 37 use App\Enums\DbExportColumns;
38 use Throwable; 38 use Throwable;
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 employer_info() { 69 public function employer_info() {
70 // код юзера 70 // код юзера
71 $user_info = Auth()->user(); 71 $user_info = Auth()->user();
72 // вьюшка для вывода данных 72 // вьюшка для вывода данных
73 return view('employers.info', compact('user_info')); 73 return view('employers.info', compact('user_info'));
74 } 74 }
75 75
76 public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { 76 public function employer_info_save(User_Model $user, BaseUser_min_Request $request) {
77 // Все данные через реквест 77 // Все данные через реквест
78 $all = $request->all(); 78 $all = $request->all();
79 unset($all['_token']); 79 unset($all['_token']);
80 // обновление 80 // обновление
81 $user->update($all); 81 $user->update($all);
82 return redirect()->route('employer.employer_info'); 82 return redirect()->route('employer.employer_info');
83 } 83 }
84 84
85 public function cabinet() { 85 public function cabinet() {
86 $id = Auth()->user()->id; 86 $id = Auth()->user()->id;
87 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 87 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
88 WhereHas('users', 88 WhereHas('users',
89 function (Builder $query) use ($id) {$query->Where('id', $id); 89 function (Builder $query) use ($id) {$query->Where('id', $id);
90 })->get(); 90 })->get();
91 return view('employers.cabinet45', compact('Employer')); 91 return view('employers.cabinet45', compact('Employer'));
92 } 92 }
93 93
94 public function slider_flot() { 94 public function slider_flot() {
95 $id = Auth()->user()->id; 95 $id = Auth()->user()->id;
96 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 96 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
97 WhereHas('users', 97 WhereHas('users',
98 function (Builder $query) use ($id) {$query->Where('id', $id); 98 function (Builder $query) use ($id) {$query->Where('id', $id);
99 })->get(); 99 })->get();
100 return view('employers.fly-flot', compact('Employer')); 100 return view('employers.fly-flot', compact('Employer'));
101 } 101 }
102 102
103 public function cabinet_save(Employer $Employer, Request $request) { 103 public function cabinet_save(Employer $Employer, Request $request) {
104 $params = $request->all(); 104 $params = $request->all();
105 $params['user_id'] = Auth()->user()->id; 105 $params['user_id'] = Auth()->user()->id;
106 $id = $Employer->id; 106 $id = $Employer->id;
107 107
108 if ($request->has('logo')) { 108 if ($request->has('logo')) {
109 if (!empty($Employer->logo)) { 109 if (!empty($Employer->logo)) {
110 Storage::delete($Employer->logo); 110 Storage::delete($Employer->logo);
111 } 111 }
112 $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); 112 $params['logo'] = $request->file('logo')->store("employer/$id", 'public');
113 } 113 }
114 114
115 $Employer->update($params); 115 $Employer->update($params);
116 116
117 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); 117 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены');
118 } 118 }
119 119
120 public function save_add_flot(FlotRequest $request) { 120 public function save_add_flot(FlotRequest $request) {
121 // отмена 121 // отмена
122 $params = $request->all(); 122 $params = $request->all();
123 123
124 if ($request->has('image')) { 124 if ($request->has('image')) {
125 $params['image'] = $request->file('image')->store("flot", 'public'); 125 $params['image'] = $request->file('image')->store("flot", 'public');
126 } 126 }
127 Flot::create($params); 127 Flot::create($params);
128 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); 128 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get();
129 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); 129 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен');
130 } 130 }
131 131
132 public function edit_flot(Flot $Flot, Employer $Employer) { 132 public function edit_flot(Flot $Flot, Employer $Employer) {
133 return view('employers.edit-flot', compact('Flot', 'Employer')); 133 return view('employers.edit-flot', compact('Flot', 'Employer'));
134 } 134 }
135 135
136 public function update_flot(FlotRequest $request, Flot $Flot) { 136 public function update_flot(FlotRequest $request, Flot $Flot) {
137 $params = $request->all(); 137 $params = $request->all();
138 138
139 if ($request->has('image')) { 139 if ($request->has('image')) {
140 if (!empty($flot->image)) { 140 if (!empty($flot->image)) {
141 Storage::delete($flot->image); 141 Storage::delete($flot->image);
142 } 142 }
143 $params['image'] = $request->file('image')->store("flot", 'public'); 143 $params['image'] = $request->file('image')->store("flot", 'public');
144 } else { 144 } else {
145 if (!empty($flot->image)) $params['image'] = $flot->image; 145 if (!empty($flot->image)) $params['image'] = $flot->image;
146 } 146 }
147 147
148 $Flot->update($params); 148 $Flot->update($params);
149 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); 149 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен');
150 } 150 }
151 151
152 public function delete_flot(Flot $Flot) { 152 public function delete_flot(Flot $Flot) {
153 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); 153 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get();
154 154
155 if (isset($Flot->id)) $Flot->delete(); 155 if (isset($Flot->id)) $Flot->delete();
156 return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); 156 return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален');
157 } 157 }
158 158
159 // Форма добавления вакансий 159 // Форма добавления вакансий
160 public function cabinet_vacancie() { 160 public function cabinet_vacancie() {
161 $id = Auth()->user()->id; 161 $id = Auth()->user()->id;
162 162
163 if (Auth()->user()->is_public) { 163 if (Auth()->user()->is_public) {
164 $categories = Category::query()->active()->get(); 164 $categories = Category::query()->active()->get();
165 $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> 165 $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')->
166 where('is_remove', '=', '0')-> 166 where('is_remove', '=', '0')->
167 where('is_bd', '=', '0')-> 167 where('is_bd', '=', '0')->
168 get(); 168 get();
169 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 169 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
170 WhereHas('users', 170 WhereHas('users',
171 function (Builder $query) use ($id) { 171 function (Builder $query) use ($id) {
172 $query->Where('id', $id); 172 $query->Where('id', $id);
173 })->get(); 173 })->get();
174 return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories')); 174 return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories'));
175 } else { 175 } else {
176 return redirect()->route('employer.cabinet_vacancie_danger'); 176 return redirect()->route('employer.cabinet_vacancie_danger');
177 } 177 }
178 } 178 }
179 179
180 // Форма предупреждения об оплате 180 // Форма предупреждения об оплате
181 public function cabinet_vacancie_danger() { 181 public function cabinet_vacancie_danger() {
182 return view('employers.add_vacancy_danger'); 182 return view('employers.add_vacancy_danger');
183 } 183 }
184 184
185 // Сохранение вакансии 185 // Сохранение вакансии
186 public function cabinet_vacancy_save1(VacancyRequestEdit $request) { 186 public function cabinet_vacancy_save1(VacancyRequestEdit $request) {
187 $params_emp = $request->all(); 187 $params_emp = $request->all();
188 188
189 $params_job["job_title_id"] = $params_emp['job_title_id']; 189 $params_job["job_title_id"] = $params_emp['job_title_id'];
190 //$params_job["min_salary"] = $params_emp['min_salary']; 190 //$params_job["min_salary"] = $params_emp['min_salary'];
191 //$params_job["max_salary"] = $params_emp['max_salary']; 191 //$params_job["max_salary"] = $params_emp['max_salary'];
192 //$params_job["region"] = $params_emp['region']; 192 //$params_job["region"] = $params_emp['region'];
193 //$params_job["power"] = $params_emp['power']; 193 //$params_job["power"] = $params_emp['power'];
194 //$params_job["sytki"] = $params_emp['sytki']; 194 //$params_job["sytki"] = $params_emp['sytki'];
195 //$params_job["start"] = $params_emp['start']; 195 //$params_job["start"] = $params_emp['start'];
196 //$params_job["flot"] = $params_emp['flot']; 196 //$params_job["flot"] = $params_emp['flot'];
197 //$params_job["description"] = $params_emp['description']; 197 //$params_job["description"] = $params_emp['description'];
198 198
199 $ad_jobs = Ad_employer::create($params_emp); 199 $ad_jobs = Ad_employer::create($params_emp);
200 //$params_job['ad_employer_id'] = $ad_jobs->id; 200 //$params_job['ad_employer_id'] = $ad_jobs->id;
201 //Ad_jobs::create($params_job); 201 //Ad_jobs::create($params_job);
202 $ad_jobs->jobs()->sync($request->get('job_title_id')); 202 $ad_jobs->jobs()->sync($request->get('job_title_id'));
203 203
204 return redirect()->route('employer.vacancy_list'); 204 return redirect()->route('employer.vacancy_list');
205 } 205 }
206 206
207 // Список вакансий 207 // Список вакансий
208 public function vacancy_list(Request $request) { 208 public function vacancy_list(Request $request) {
209 $id = Auth()->user()->id; 209 $id = Auth()->user()->id;
210 210
211 //dd($request->all()); 211 //dd($request->all());
212 $Employer = Employer::query()->where('user_id', $id)->first(); 212 $Employer = Employer::query()->where('user_id', $id)->first();
213 $vacancy_list = Ad_employer::query() 213 $vacancy_list = Ad_employer::query()
214 ->with('jobs') 214 ->with('jobs')
215 ->with('jobs_code') 215 ->with('jobs_code')
216 ->where('employer_id', $Employer->id) 216 ->where('employer_id', $Employer->id)
217 ->where('is_remove', 0) 217 ->where('is_remove', 0)
218 ->orderbyDesc('updated_at') 218 ->orderbyDesc('updated_at')
219 ; 219 ;
220 220
221 if (($request->has('search')) && (!empty($request->get('search')))) { 221 if (($request->has('search')) && (!empty($request->get('search')))) {
222 $search = $request->get('search'); 222 $search = $request->get('search');
223 $vacancy_list = $vacancy_list->where('name', 'LIKE', "%$search%"); 223 $vacancy_list = $vacancy_list->where('name', 'LIKE', "%$search%");
224 } 224 }
225 225
226 if ($request->get('sort')) { 226 if ($request->get('sort')) {
227 $sort = $request->get('sort'); 227 $sort = $request->get('sort');
228 switch ($sort) { 228 switch ($sort) {
229 case 'nopublic': $vacancy_list->where('active_is', '=', 0);break; 229 case 'nopublic': $vacancy_list->where('active_is', '=', 0);break;
230 case 'public':$vacancy_list->where('active_is', '=', 1);break; 230 case 'public':$vacancy_list->where('active_is', '=', 1);break;
231 default: $vacancy_list = $vacancy_list->orderByDesc('id'); break; 231 default: $vacancy_list = $vacancy_list->orderByDesc('id'); break;
232 } 232 }
233 } else { 233 } else {
234 $vacancy_list = $vacancy_list->orderByDesc('updated_at')->orderBy('id'); 234 $vacancy_list = $vacancy_list->orderByDesc('updated_at')->orderBy('id');
235 } 235 }
236 236
237 $vacancy_list = $vacancy_list->paginate(10); 237 $vacancy_list = $vacancy_list->paginate(10);
238 238
239 //ajax 239 //ajax
240 if ($request->ajax()) { 240 if ($request->ajax()) {
241 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); 241 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer'));
242 } else { 242 } else {
243 return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); 243 return view('employers.list_vacancy', compact('vacancy_list', 'Employer'));
244 } 244 }
245 } 245 }
246 246
247 // Карточка вакансии 247 // Карточка вакансии
248 public function vacancy_edit(Ad_employer $ad_employer) { 248 public function vacancy_edit(Ad_employer $ad_employer) {
249 $id = Auth()->user()->id; 249 $id = Auth()->user()->id;
250 $Positions = Category::query()->where('is_remove', '=', '0')->get(); 250 $Positions = Category::query()->where('is_remove', '=', '0')->get();
251 251
252 $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> 252 $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')->
253 where('is_remove', '=', '0')-> 253 where('is_remove', '=', '0')->
254 where('is_bd', '=', '0')->get(); 254 where('is_bd', '=', '0')->get();
255 255
256 $Employer = Employer::query()->with('users')->with('ads')-> 256 $Employer = Employer::query()->with('users')->with('ads')->
257 with('flots')->where('user_id', $id)->first(); 257 with('flots')->where('user_id', $id)->first();
258 258
259 return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); 259 return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs'));
260 } 260 }
261 261
262 // Сохранение-редактирование записи 262 // Сохранение-редактирование записи
263 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { 263 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) {
264 $params = $request->all(); 264 $params = $request->all();
265 $params_job["job_title_id"] = $params['job_title_id']; 265 $params_job["job_title_id"] = $params['job_title_id'];
266 266
267 $ad_employer->update($params); 267 $ad_employer->update($params);
268 $ad_employer->jobs()->sync($request->get('job_title_id')); 268 $ad_employer->jobs()->sync($request->get('job_title_id'));
269 269
270 $id = Auth()->user()->id; 270 $id = Auth()->user()->id;
271 $Positions = Category::query()->where('is_remove', '=', '0')->get(); 271 $Positions = Category::query()->where('is_remove', '=', '0')->get();
272 $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name') 272 $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')
273 ->where('is_remove', '=', '0') 273 ->where('is_remove', '=', '0')
274 ->where('is_bd', '=', '0') 274 ->where('is_bd', '=', '0')
275 ->get(); 275 ->get();
276 276
277 $Employer = Employer::query() 277 $Employer = Employer::query()
278 ->with('users')->with('ads')->with('flots')->where('user_id', $id)->first(); 278 ->with('users')->with('ads')->with('flots')->where('user_id', $id)->first();
279 return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); 279 return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs'));
280 } 280 }
281 281
282 // Сохранение карточки вакансии 282 // Сохранение карточки вакансии
283 public function vacancy_save(Request $request, Ad_employer $ad_employer) { 283 public function vacancy_save(Request $request, Ad_employer $ad_employer) {
284 $all = $request->all(); 284 $all = $request->all();
285 $ad_employer->update($all); 285 $ad_employer->update($all);
286 return redirect()->route('employer.cabinet_vacancie'); 286 return redirect()->route('employer.cabinet_vacancie');
287 } 287 }
288 288
289 // Удаление карточки вакансии 289 // Удаление карточки вакансии
290 public function vacancy_delete(Ad_employer $ad_employer) { 290 public function vacancy_delete(Ad_employer $ad_employer) {
291 $ad_employer->delete(); 291 $ad_employer->delete();
292 292
293 return redirect()->route('employer.vacancy_list') 293 return redirect()->route('employer.vacancy_list')
294 ->with('success', 'Данные были успешно сохранены'); 294 ->with('success', 'Данные были успешно сохранены');
295 } 295 }
296 296
297 // Обновление даты 297 // Обновление даты
298 public function vacancy_up(Ad_employer $ad_employer) { 298 public function vacancy_up(Ad_employer $ad_employer) {
299 $up = date('m/d/Y h:i:s', time());; 299 $up = date('m/d/Y h:i:s', time());;
300 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 300 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
301 $vac_emp->updated_at = $up; 301 $vac_emp->updated_at = $up;
302 $vac_emp->save(); 302 $vac_emp->save();
303 303
304 return redirect()->back(); //route('employer.vacancy_list'); 304 return redirect()->back(); //route('employer.vacancy_list');
305 // начало конца 305 // начало конца
306 } 306 }
307 307
308 //Видимость вакансии 308 //Видимость вакансии
309 public function vacancy_eye(Ad_employer $ad_employer, $status) { 309 public function vacancy_eye(Ad_employer $ad_employer, $status) {
310 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 310 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
311 $vac_emp->active_is = $status; 311 $vac_emp->active_is = $status;
312 $vac_emp->save(); 312 $vac_emp->save();
313 313
314 return redirect()->route('employer.vacancy_list'); 314 return redirect()->route('employer.vacancy_list');
315 } 315 }
316 316
317 //Вакансия редактирования (шаблон) 317 //Вакансия редактирования (шаблон)
318 public function vacancy_update(Ad_employer $id) { 318 public function vacancy_update(Ad_employer $id) {
319 319
320 } 320 }
321 321
322 //Отклики на вакансию - лист 322 //Отклики на вакансию - лист
323 public function answers(Employer $employer, Request $request) { 323 public function answers(Employer $employer, Request $request) {
324 $user_id = Auth()->user()->id; 324 $user_id = Auth()->user()->id;
325 $answer = Ad_employer::query()->where('employer_id', $employer->id); 325 $answer = Ad_employer::query()->where('employer_id', $employer->id);
326 if ($request->has('search')) { 326 if ($request->has('search')) {
327 $search = trim($request->get('search')); 327 $search = trim($request->get('search'));
328 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); 328 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%");
329 } 329 }
330 330
331 $answer = $answer->with('response')->OrderByDESC('id')->get(); 331 $answer = $answer->with('response')->OrderByDESC('id')->get();
332 332
333 return view('employers.list_answer', compact('answer', 'user_id', 'employer')); 333 return view('employers.list_answer', compact('answer', 'user_id', 'employer'));
334 } 334 }
335 335
336 //Обновление статуса 336 //Обновление статуса
337 public function supple_status(employer $employer, ad_response $ad_response, $flag) { 337 public function supple_status(employer $employer, ad_response $ad_response, $flag) {
338 $ad_response->update(Array('flag' => $flag)); 338 $ad_response->update(Array('flag' => $flag));
339 return redirect()->route('employer.answers', ['employer' => $employer->id]); 339 return redirect()->route('employer.answers', ['employer' => $employer->id]);
340 } 340 }
341 341
342 //Страницы сообщений список 342 //Страницы сообщений список
343 public function messages($type_message) { 343 public function messages($type_message) {
344 $user_id = Auth()->user()->id; 344 $user_id = Auth()->user()->id;
345 345
346 $chats = Chat::get_user_chats($user_id); 346 $chats = Chat::get_user_chats($user_id);
347 $user_type = 'employer'; 347 $user_type = 'employer';
348 $admin_chat = false; 348 $admin_chat = false;
349 349
350 return view('employers.messages', compact('chats', 'admin_chat', 'user_id', 'user_type')); 350 return view('employers.messages', compact('chats', 'admin_chat', 'user_id', 'user_type'));
351 } 351 }
352 352
353 // Диалог между пользователями 353 // Диалог между пользователями
354 public function dialog(Chat $chat, Request $request) { 354 public function dialog(Chat $chat, Request $request) {
355 // Получение параметров. 355 // Получение параметров.
356 if ($request->has('ad_employer')){ 356 if ($request->has('ad_employer')){
357 $ad_employer = $request->get('ad_employer'); 357 $ad_employer = $request->get('ad_employer');
358 } else { 358 } else {
359 $ad_employer = 0; 359 $ad_employer = 0;
360 } 360 }
361 361
362 $sender = User_Model::query()->with('workers')->with('employers')->where('id', $chat->user_id)->first(); 362 $sender = User_Model::query()->with('workers')->with('employers')->where('id', $chat->user_id)->first();
363 $companion = User_Model::query()->with('workers')->with('employers')->where('id', $chat->to_user_id)->first(); 363 $companion = User_Model::query()->with('workers')->with('employers')->where('id', $chat->to_user_id)->first();
364 364
365 $Messages = Chat::get_chat_messages($chat); 365 $Messages = Chat::get_chat_messages($chat);
366 366
367 Message::where('user_id', '=', $chat->to_user_id)->where('to_user_id', '=', $chat->user_id)->update(['flag_new' => 0]); 367 Message::where('user_id', '=', $chat->to_user_id)->where('to_user_id', '=', $chat->user_id)->update(['flag_new' => 0]);
368 368
369 return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); 369 return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages'));
370 } 370 }
371 371
372 public function pin_chat(Request $request){ 372 public function pin_chat(Request $request){
373 $chat_id = $request->get('id'); 373 $chat_id = $request->get('id');
374 $is_fixed = $request->get('is_fixed'); 374 $is_fixed = $request->get('is_fixed');
375 375
376 Chat::pin_chat($chat_id, $is_fixed); 376 Chat::pin_chat($chat_id, $is_fixed);
377 } 377 }
378 378
379 public function remove_chat(Request $request){ 379 public function remove_chat(Request $request){
380 $chat_id = $request->get('id'); 380 $chat_id = $request->get('id');
381 Chat::remove_chat($chat_id); 381 Chat::remove_chat($chat_id);
382 } 382 }
383 383
384 // Регистрация работодателя 384 // Регистрация работодателя
385 public function register_employer(Request $request) { 385 public function register_employer(Request $request) {
386 $params = $request->all(); 386 $params = $request->all();
387 387
388 $rules = [ 388 $rules = [
389 //'surname' => ['required', 'string', 'max:255'], 389 //'surname' => ['required', 'string', 'max:255'],
390 //'name_man' => ['required', 'string', 'max:255'], 390 //'name_man' => ['required', 'string', 'max:255'],
391 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 391 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
392 'name_company' => ['required', 'string', 'max:255'], 392 'name_company' => ['required', 'string', 'max:255'],
393 'password' => ['required', 'string', 'min:6'], 393 'password' => ['required', 'string', 'min:6'],
394 ]; 394 ];
395 395
396 396
397 $messages = [ 397 $messages = [
398 'required' => 'Укажите обязательное поле', 398 'required' => 'Укажите обязательное поле',
399 'min' => [ 399 'min' => [
400 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 400 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
401 'integer' => 'Поле «:attribute» должно быть :min или больше', 401 'integer' => 'Поле «:attribute» должно быть :min или больше',
402 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 402 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
403 ], 403 ],
404 'max' => [ 404 'max' => [
405 'string' => 'Поле «:attribute» должно быть не больше :max символов', 405 'string' => 'Поле «:attribute» должно быть не больше :max символов',
406 'integer' => 'Поле «:attribute» должно быть :max или меньше', 406 'integer' => 'Поле «:attribute» должно быть :max или меньше',
407 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 407 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
408 ] 408 ]
409 ]; 409 ];
410 410
411 $email = $request->get('email'); 411 $email = $request->get('email');
412 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { 412 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) {
413 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); 413 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл"));
414 } 414 }
415 415
416 if ($request->get('password') !== $request->get('confirmed')){ 416 if ($request->get('password') !== $request->get('confirmed')){
417 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 417 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
418 } 418 }
419 419
420 if (strlen($request->get('password')) < 6) { 420 if (strlen($request->get('password')) < 6) {
421 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); 421 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!"));
422 } 422 }
423 423
424 if (empty($request->get('surname'))) { 424 if (empty($request->get('surname'))) {
425 $params['surname'] = 'Неизвестно'; 425 $params['surname'] = 'Неизвестно';
426 } 426 }
427 if (empty($request->get('name_man'))) { 427 if (empty($request->get('name_man'))) {
428 $params['name_man'] = 'Неизвестно'; 428 $params['name_man'] = 'Неизвестно';
429 } 429 }
430 $validator = Validator::make($params, $rules, $messages); 430 $validator = Validator::make($params, $rules, $messages);
431 431
432 if ($validator->fails()) { 432 if ($validator->fails()) {
433 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 433 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
434 } else { 434 } else {
435 $user = $this->create($params); 435 $user = $this->create($params);
436 event(new Registered($user)); 436 event(new Registered($user));
437 437
438 Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params)); 438 Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params));
439 439
440 Auth::guard()->login($user); 440 Auth::guard()->login($user);
441 } 441 }
442 442
443 if ($user) { 443 if ($user) {
444 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; 444 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));;
445 } else { 445 } else {
446 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 446 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
447 } 447 }
448 } 448 }
449 449
450 // Создание пользователя 450 // Создание пользователя
451 protected function create(array $data) 451 protected function create(array $data)
452 { 452 {
453 $Use = new User_Model(); 453 $Use = new User_Model();
454 $Code_user = $Use->create([ 454 $Code_user = $Use->create([
455 'name' => $data['surname']." ".$data['name_man'], 455 'name' => $data['surname']." ".$data['name_man'],
456 'name_man' => $data['name_man'], 456 'name_man' => $data['name_man'],
457 'surname' => $data['surname'], 457 'surname' => $data['surname'],
458 'surname2' => $data['surname2'], 458 'surname2' => $data['surname2'],
459 'subscribe_email' => $data['email'], 459 'subscribe_email' => $data['email'],
460 'email' => $data['email'], 460 'email' => $data['email'],
461 'telephone' => $data['telephone'], 461 'telephone' => $data['telephone'],
462 'is_worker' => 0, 462 'is_worker' => 0,
463 'password' => Hash::make($data['password']), 463 'password' => Hash::make($data['password']),
464 'pubpassword' => base64_encode($data['password']), 464 'pubpassword' => base64_encode($data['password']),
465 'email_verified_at' => Carbon::now() 465 'email_verified_at' => Carbon::now()
466 ]); 466 ]);
467 467
468 if ($Code_user->id > 0) { 468 if ($Code_user->id > 0) {
469 $Employer = new Employer(); 469 $Employer = new Employer();
470 $Employer->user_id = $Code_user->id; 470 $Employer->user_id = $Code_user->id;
471 $Employer->name_company = $data['name_company']; 471 $Employer->name_company = $data['name_company'];
472 $Employer->email = $data['email']; 472 $Employer->email = $data['email'];
473 $Employer->telephone = $data['telephone']; 473 $Employer->telephone = $data['telephone'];
474 $Employer->code = Tools::generator_id(10); 474 $Employer->code = Tools::generator_id(10);
475 $Employer->save(); 475 $Employer->save();
476 476
477 return $Code_user; 477 return $Code_user;
478 } 478 }
479 } 479 }
480 480
481 // Отправка сообщения от работодателя 481 // Отправка сообщения от работодателя
482 public function send_message(MessagesRequiest $request) { 482 public function send_message(MessagesRequiest $request) {
483 $params = $request->all(); 483 $params = $request->all();
484 dd($params); 484 dd($params);
485 $user1 = $params['user_id']; 485 $user1 = $params['user_id'];
486 $user2 = $params['to_user_id']; 486 $user2 = $params['to_user_id'];
487 487
488 if ($request->has('file')) { 488 if ($request->has('file')) {
489 $params['file'] = $request->file('file')->store("messages", 'public'); 489 $params['file'] = $request->file('file')->store("messages", 'public');
490 } 490 }
491 Message::create($params); 491 Message::create($params);
492 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 492 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
493 } 493 }
494 494
495 public function test123(Request $request) { 495 public function test123(Request $request) {
496 $params = $request->all(); 496 $params = $request->all();
497 $user1 = $params['user_id']; 497 $user1 = $params['user_id'];
498 $user2 = $params['to_user_id']; 498 $user2 = $params['to_user_id'];
499 499
500 $rules = [ 500 $rules = [
501 'text' => 'nullable|required_without:file|min:1|max:150000', 501 'text' => 'nullable|required_without:file|min:1|max:150000',
502 'file' => 'nullable|file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' 502 'file' => 'nullable|file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000'
503 ]; 503 ];
504 $messages = [ 504 $messages = [
505 'required_without' => 'Поле «:attribute» обязательно, если файл не прикреплен', 505 'required_without' => 'Поле «:attribute» обязательно, если файл не прикреплен',
506 'min' => [ 506 'min' => [
507 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 507 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
508 'integer' => 'Поле «:attribute» должно быть :min или больше', 508 'integer' => 'Поле «:attribute» должно быть :min или больше',
509 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 509 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
510 ], 510 ],
511 'max' => [ 511 'max' => [
512 'string' => 'Поле «:attribute» должно быть не больше :max символов', 512 'string' => 'Поле «:attribute» должно быть не больше :max символов',
513 'integer' => 'Поле «:attribute» должно быть :max или меньше', 513 'integer' => 'Поле «:attribute» должно быть :max или меньше',
514 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 514 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
515 ] 515 ]
516 ]; 516 ];
517 517
518 $validator = Validator::make($request->all(), $rules, $messages); 518 $validator = Validator::make($request->all(), $rules, $messages);
519 519
520 if ($validator->fails()) { 520 if ($validator->fails()) {
521 $chat = Chat::where('user_id', $user1) 521 $chat = Chat::where('user_id', $user1)
522 ->where('to_user_id', $user2) 522 ->where('to_user_id', $user2)
523 ->where('is_removed', 0) 523 ->where('is_removed', 0)
524 ->first() 524 ->first()
525 ; 525 ;
526 if ($chat->id){ 526 if ($chat->id){
527 return redirect()->route('employer.dialog', ['chat' => $chat->id])->withErrors($validator); 527 return redirect()->route('employer.dialog', ['chat' => $chat->id])->withErrors($validator);
528 } else { 528 } else {
529 return redirect()->route('cabinet.messages', ['type_message' => 'input'])->withErrors($validator); 529 return redirect()->route('cabinet.messages', ['type_message' => 'input'])->withErrors($validator);
530 } 530 }
531 531
532 } else { 532 } else {
533 $new_message = Message::add_message($request, $user1, $user2, $request->all(), file_store_path: 'messages'); 533 $new_message = Message::add_message($request, $user1, $user2, $request->all(), file_store_path: 'messages');
534 534
535 return redirect()->route('employer.dialog', ['chat' => $new_message->chat_id_from]); 535 return redirect()->route('employer.dialog', ['chat' => $new_message->chat_id_from]);
536 536
537 } 537 }
538 } 538 }
539 539
540 //Избранные люди 540 //Избранные люди
541 public function favorites(Request $request) { 541 public function favorites(Request $request) {
542 $IP_address = RusDate::ip_addr_client(); 542 $IP_address = RusDate::ip_addr_client();
543 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 543 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
544 544
545 if ($Arr->count()) { 545 if ($Arr->count()) {
546 $A = Array(); 546 $A = Array();
547 foreach ($Arr as $it) { 547 foreach ($Arr as $it) {
548 $A[] = $it->code_record; 548 $A[] = $it->code_record;
549 } 549 }
550 550
551 $Workers = Worker::query()->whereIn('id', $A); 551 $Workers = Worker::query()->whereIn('id', $A);
552 } else { 552 } else {
553 $Workers = Worker::query()->where('id', '=', '0'); 553 $Workers = Worker::query()->where('id', '=', '0');
554 } 554 }
555 555
556 if (($request->has('search')) && (!empty($request->get('search')))) { 556 if (($request->has('search')) && (!empty($request->get('search')))) {
557 $search = $request->get('search'); 557 $search = $request->get('search');
558 558
559 $Workers = $Workers->WhereHas('users', 559 $Workers = $Workers->WhereHas('users',
560 function (Builder $query) use ($search) { 560 function (Builder $query) use ($search) {
561 $query->Where('surname', 'LIKE', "%$search%") 561 $query->Where('surname', 'LIKE', "%$search%")
562 ->orWhere('name_man', 'LIKE', "%$search%") 562 ->orWhere('name_man', 'LIKE', "%$search%")
563 ->orWhere('surname2', 'LIKE', "%$search%"); 563 ->orWhere('surname2', 'LIKE', "%$search%");
564 }); 564 });
565 } else { 565 } else {
566 $Workers = $Workers->with('users'); 566 $Workers = $Workers->with('users');
567 } 567 }
568 568
569 $Workers = $Workers->get(); 569 $Workers = $Workers->get();
570 570
571 571
572 return view('employers.favorite', compact('Workers')); 572 return view('employers.favorite', compact('Workers'));
573 } 573 }
574 574
575 // База данных 575 // База данных
576 public function bd(Request $request) { 576 public function bd(Request $request) {
577 $users = User_Model::query()->with('workers')->with('jobtitles'); 577 $users = User_Model::query()->with('workers')->with('jobtitles');
578 578
579 if ($request->has('search')) { 579 if ($request->has('search')) {
580 $find_key = $request->get('search'); 580 $find_key = $request->get('search');
581 $users = $users->where('name', 'LIKE', "%$find_key%") 581 $users = $users->where('name', 'LIKE', "%$find_key%")
582 ->orWhere('surname', 'LIKE', "%$find_key%") 582 ->orWhere('surname', 'LIKE', "%$find_key%")
583 ->orWhere('name_man', 'LIKE', "%$find_key%") 583 ->orWhere('name_man', 'LIKE', "%$find_key%")
584 ->orWhere('email', 'LIKE', "%$find_key%") 584 ->orWhere('email', 'LIKE', "%$find_key%")
585 ->orWhere('telephone', 'LIKE', "%$find_key%"); 585 ->orWhere('telephone', 'LIKE', "%$find_key%");
586 } 586 }
587 587
588 // Данные 588 // Данные
589 $users = $users->Baseuser()-> 589 $users = $users->Baseuser()->
590 orderByDesc(Worker::select('created_at')->whereColumn('workers.user_id', 'users.id')); 590 orderByDesc(Worker::select('created_at')->whereColumn('workers.user_id', 'users.id'));
591 $count_users = $users; 591 $count_users = $users;
592 $users = $users->paginate(5); 592 $users = $users->paginate(5);
593 593
594 $export_options = DbExportColumns::toArray(); 594 $export_options = DbExportColumns::toArray();
595 595
596 $jobs_titles = Job_title::select('id', 'name') 596 $jobs_titles = Job_title::select('id', 'name')
597 ->where('is_remove', '=', 0) 597 ->where('is_remove', '=', 0)
598 ->where('is_bd', '=', 2) 598 ->where('is_bd', '=', 2)
599 ->orderByDesc('sort') 599 ->orderByDesc('sort')
600 ->orderBy('name', 'asc') 600 ->orderBy('name', 'asc')
601 ->get() 601 ->get()
602 ->toArray() 602 ->toArray()
603 ; 603 ;
604 604
605 return view('employers.bd', compact('users', 'count_users', 'export_options', 'jobs_titles')); 605 return view('employers.bd', compact('users', 'count_users', 'export_options', 'jobs_titles'));
606 } 606 }
607 607
608 //Настройка уведомлений 608 //Настройка уведомлений
609 public function subscribe() { 609 public function subscribe() {
610 return view('employers.subcribe'); 610 return view('employers.subcribe');
611 } 611 }
612 612
613 //Установка уведомлений сохранение 613 //Установка уведомлений сохранение
614 public function save_subscribe(Request $request) { 614 public function save_subscribe(Request $request) {
615 dd($request->all()); 615 dd($request->all());
616 $msg = $request->validate([ 616 $msg = $request->validate([
617 'subscribe_email' => 'required|email|min:5|max:255', 617 'subscribe_email' => 'required|email|min:5|max:255',
618 ]); 618 ]);
619 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); 619 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку');
620 } 620 }
621 621
622 //Сбросить форму с паролем 622 //Сбросить форму с паролем
623 public function password_reset() { 623 public function password_reset() {
624 $email = Auth()->user()->email; 624 $email = Auth()->user()->email;
625 return view('employers.password-reset', compact('email')); 625 return view('employers.password-reset', compact('email'));
626 } 626 }
627 627
628 //Обновление пароля 628 //Обновление пароля
629 public function new_password(Request $request) { 629 public function new_password(Request $request) {
630 $use = Auth()->user(); 630 $use = Auth()->user();
631 $request->validate([ 631 $request->validate([
632 'password' => 'required|string', 632 'password' => 'required|string',
633 'new_password' => 'required|string', 633 'new_password' => 'required|string',
634 'new_password2' => 'required|string' 634 'new_password2' => 'required|string'
635 ]); 635 ]);
636 636
637 if ($request->get('new_password') == $request->get('new_password2')) 637 if ($request->get('new_password') == $request->get('new_password2'))
638 if ($request->get('password') !== $request->get('new_password')) { 638 if ($request->get('password') !== $request->get('new_password')) {
639 $credentials = $request->only('email', 'password'); 639 $credentials = $request->only('email', 'password');
640 if (Auth::attempt($credentials)) { 640 if (Auth::attempt($credentials)) {
641 641
642 if (!is_null($use->email_verified_at)){ 642 if (!is_null($use->email_verified_at)){
643 643
644 $user_data = User_Model::find($use->id); 644 $user_data = User_Model::find($use->id);
645 $user_data->update([ 645 $user_data->update([
646 'password' => Hash::make($request->get('new_password')), 646 'password' => Hash::make($request->get('new_password')),
647 'pubpassword' => base64_encode($request->get('new_password')), 647 'pubpassword' => base64_encode($request->get('new_password')),
648 ]); 648 ]);
649 return redirect() 649 return redirect()
650 ->route('employer.password_reset') 650 ->route('employer.password_reset')
651 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 651 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
652 } 652 }
653 653
654 return redirect() 654 return redirect()
655 ->route('employer.password_reset') 655 ->route('employer.password_reset')
656 ->withError('Данная учетная запись не было верифицированна!'); 656 ->withError('Данная учетная запись не было верифицированна!');
657 } 657 }
658 } 658 }
659 659
660 return redirect() 660 return redirect()
661 ->route('employer.password_reset') 661 ->route('employer.password_reset')
662 ->withErrors('Не совпадение данных, обновите пароли!'); 662 ->withErrors('Не совпадение данных, обновите пароли!');
663 } 663 }
664 664
665 665
666 666
667 // Форма Удаление пипла 667 // Форма Удаление пипла
668 public function delete_people() { 668 public function delete_people() {
669 $login = Auth()->user()->email; 669 $login = Auth()->user()->email;
670 return view('employers.delete_people', compact('login')); 670 return view('employers.delete_people', compact('login'));
671 } 671 }
672 672
673 // Удаление аккаунта 673 // Удаление аккаунта
674 public function action_delete_user(Request $request) { 674 public function action_delete_user(Request $request) {
675 $Answer = $request->all(); 675 $Answer = $request->all();
676 $user_id = Auth()->user()->id; 676 $user_id = Auth()->user()->id;
677 $request->validate([ 677 $request->validate([
678 'password' => 'required|string', 678 'password' => 'required|string',
679 ]); 679 ]);
680 680
681 $credentials = $request->only('email', 'password'); 681 $credentials = $request->only('email', 'password');
682 if (Auth::attempt($credentials)) { 682 if (Auth::attempt($credentials)) {
683 Auth::logout(); 683 Auth::logout();
684 $it = User_Model::find($user_id); 684 $it = User_Model::find($user_id);
685 $it->delete(); 685 $it->delete();
686 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 686 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
687 } else { 687 } else {
688 return redirect()->route('employer.delete_people') 688 return redirect()->route('employer.delete_people')
689 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 689 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
690 } 690 }
691 } 691 }
692 692
693 public function ajax_delete_user(Request $request) { 693 public function ajax_delete_user(Request $request) {
694 $Answer = $request->all(); 694 $Answer = $request->all();
695 $user_id = Auth()->user()->id; 695 $user_id = Auth()->user()->id;
696 $request->validate([ 696 $request->validate([
697 'password' => 'required|string', 697 'password' => 'required|string',
698 ]); 698 ]);
699 $credentials = $request->only('email', 'password'); 699 $credentials = $request->only('email', 'password');
700 if (Auth::attempt($credentials)) { 700 if (Auth::attempt($credentials)) {
701 701
702 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', 702 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт',
703 'email' => $request->get('email'), 703 'email' => $request->get('email'),
704 'password' => $request->get('password'))); 704 'password' => $request->get('password')));
705 } else { 705 } else {
706 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); 706 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль'));
707 } 707 }
708 } 708 }
709 709
710 // Рассылка сообщений 710 // Рассылка сообщений
711 public function send_all_messages() { 711 public function send_all_messages() {
712 $id = Auth()->user()->id; 712 $id = Auth()->user()->id;
713 $sending = Employer::query()->where('user_id', '=', "$id")->first(); 713 $sending = Employer::query()->where('user_id', '=', "$id")->first();
714 714
715 $job_titles = Job_title::query() 715 $job_titles = Job_title::query()
716 ->where('is_remove', '=', 0) 716 ->where('is_remove', '=', 0)
717 //->where('is_bd', '=', 1) 717 //->where('is_bd', '=', 1)
718 ->orderByDesc('sort') 718 ->orderByDesc('sort')
719 ->get(); 719 ->get();
720 720
721 if ($sending->sending_is) 721 if ($sending->sending_is)
722 return view('employers.send_all', compact('job_titles')); 722 return view('employers.send_all', compact('job_titles'));
723 else 723 else
724 return view('employers.send_all_danger'); 724 return view('employers.send_all_danger');
725 } 725 }
726 726
727 // Отправка сообщений для информации 727 // Отправка сообщений для информации
728 public function send_all_post(Request $request) { 728 public function send_all_post(Request $request) {
729 $data = $request->all(); 729 $data = $request->all();
730 $data['user'] = Auth()->user(); 730 $data['user'] = Auth()->user();
731 731
732 $id = MessagesRequests::create([ 732 $id = MessagesRequests::create([
733 'user_id' => Auth()->user()->id, 733 'user_id' => $data['user']->id,
734 'job_titles' => json_encode($data['job_title_ids']), 734 'job_titles' => isset($data['job_title_ids']) ? json_encode($data['job_title_ids']) : null,
735 'text' => $data['message_text'], 735 'text' => $data['message_text'],
736 ]); 736 ]);
737 737
738 try { 738 try {
739 if (!empty($id)) { 739 if (!empty($id)) {
740 Mail::to(env('EMAIL_ADMIN'))->send(new MassSendingMessages($data)); 740 Mail::to(env('EMAIL_ADMIN'))->send(new MassSendingMessages($data));
741 } 741 }
742 } catch (Throwable $e) { 742 } catch (Throwable $e) {
743 Log::error($e); 743 Log::error($e);
744 return redirect()->route('employer.send_all_messages')->with('error', 'Ошибка почтового сервера, пожалуйста, повторите рассылку позднее'); 744 return redirect()->route('employer.send_all_messages')->with('error', 'Ошибка почтового сервера, пожалуйста, повторите рассылку позднее');
745 } 745 }
746 746
747 return redirect()->route('employer.send_all_messages')->with('success', 'Запрос на рассылку был успешно отправлен.'); 747 return redirect()->route('employer.send_all_messages')->with('success', 'Запрос на рассылку был успешно отправлен.');
748 } 748 }
749 749
750 // База резюме 750 // База резюме
751 public function bd_tupe(Request $request) { 751 public function bd_tupe(Request $request) {
752 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); 752 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get();
753 753
754 return view('employers.bd_tupe', compact('Resume')); 754 return view('employers.bd_tupe', compact('Resume'));
755 } 755 }
756 756
757 ////////////////////////////////////////////////////////////////// 757 //////////////////////////////////////////////////////////////////
758 // Отправил сообщение 758 // Отправил сообщение
759 ////////////////////////////////////////////////////////////////// 759 //////////////////////////////////////////////////////////////////
760 public function new_message(Request $request) { 760 public function new_message(Request $request) {
761 $params = $request->all(); 761 $params = $request->all();
762 762
763 $id = $params['_user_id']; 763 $id = $params['_user_id'];
764 $message_params = [ 764 $message_params = [
765 'title' => $params['title'], 765 'title' => $params['title'],
766 'text' => $params['text'], 766 'text' => $params['text'],
767 'ad_employer_id' => $params['_vacancy'], 767 'ad_employer_id' => $params['_vacancy'],
768 'flag_new' => 1 768 'flag_new' => 1
769 ]; 769 ];
770 770
771 Message::add_message( 771 Message::add_message(
772 $request, 772 $request,
773 $params['_user_id'], 773 $params['_user_id'],
774 $params['_to_user_id'], 774 $params['_to_user_id'],
775 $message_params, 775 $message_params,
776 file_store_path: "worker/$id" 776 file_store_path: "worker/$id"
777 ); 777 );
778 778
779 return redirect()->route('employer.messages', ['type_message' => 'output']); 779 return redirect()->route('employer.messages', ['type_message' => 'output']);
780 } 780 }
781 781
782 // Восстановление пароля 782 // Восстановление пароля
783 public function repair_password(Request $request) { 783 public function repair_password(Request $request) {
784 $params = $request->get('email'); 784 $params = $request->get('email');
785 } 785 }
786 786
787 // Избранные люди на корабль 787 // Избранные люди на корабль
788 public function selected_people(Request $request) { 788 public function selected_people(Request $request) {
789 $id = $request->get('id'); 789 $id = $request->get('id');
790 $favorite_people = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> 790 $favorite_people = Job_title::query()->orderByDesc('sort')->OrderBy('name')->
791 where('is_remove', '=', '0')-> 791 where('is_remove', '=', '0')->
792 where('is_bd', '=', '0')-> 792 where('is_bd', '=', '0')->
793 where('position_id', $id)-> 793 where('position_id', $id)->
794 get(); 794 get();
795 return view('favorite_people', compact('favorite_people')); 795 return view('favorite_people', compact('favorite_people'));
796 } 796 }
797 } 797 }
798 798
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\employers_main; 13 use App\Models\employers_main;
14 use App\Models\Job_title; 14 use App\Models\Job_title;
15 use App\Models\Like_vacancy; 15 use App\Models\Like_vacancy;
16 use App\Models\Like_worker; 16 use App\Models\Like_worker;
17 use App\Models\News; 17 use App\Models\News;
18 use App\Models\Positions; 18 use App\Models\Positions;
19 use App\Models\reclame; 19 use App\Models\reclame;
20 use App\Models\User; 20 use App\Models\User;
21 use Illuminate\Http\Request; 21 use Illuminate\Http\Request;
22 use Illuminate\Support\Facades\Auth; 22 use Illuminate\Support\Facades\Auth;
23 use Illuminate\Support\Facades\DB; 23 use Illuminate\Support\Facades\DB;
24 use Illuminate\Support\Facades\Hash; 24 use Illuminate\Support\Facades\Hash;
25 use Illuminate\Support\Facades\Mail; 25 use Illuminate\Support\Facades\Mail;
26 use Illuminate\Support\Facades\Validator; 26 use Illuminate\Support\Facades\Validator;
27 use App\Models\PageContent; 27 use App\Models\PageContent;
28 use App\Enums\MainPageCounters; 28 use App\Enums\MainPageCounters;
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()->orderByDesc('id')->limit(6)->get(); 34 $news = News::query()->orderByDesc('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 $Job_title = Job_title::query()->where('is_remove', '=', '0')-> 42 $Job_title = Job_title::query()->where('is_remove', '=', '0')->
43 where('is_bd', '=', '0')->orderByDesc('sort')->get(); 43 where('is_bd', '=', '0')->orderByDesc('sort')->get();
44 44
45 $Data = DB::table('job_titles')-> 45 $Data = DB::table('job_titles')->
46 selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> 46 selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')->
47 where('categories.is_remove', '=', '0')-> 47 where('categories.is_remove', '=', '0')->
48 where('job_titles.is_remove', '=', '0')-> 48 where('job_titles.is_remove', '=', '0')->
49 where('job_titles.is_bd', '=' , '0')-> 49 where('job_titles.is_bd', '=' , '0')->
50 leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> 50 leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')->
51 join('categories', 'categories.id', '=', 'job_titles.position_id')-> 51 join('categories', 'categories.id', '=', 'job_titles.position_id')->
52 groupBy('job_titles.id')->orderBy('categories.id')->orderByDesc('job_titles.position_id')-> 52 groupBy('job_titles.id')->orderBy('categories.id')->orderByDesc('job_titles.position_id')->
53 orderByDesc('job_titles.sort')->get()->toArray(); 53 orderByDesc('job_titles.sort')->get()->toArray();
54 54
55 $Main_Job = array(); 55 $Main_Job = array();
56 $name_cat = ''; 56 $name_cat = '';
57 foreach ($Data as $it) { 57 foreach ($Data as $it) {
58 $it_arr = (array)$it; 58 $it_arr = (array)$it;
59 if ($name_cat != $it_arr['catname']) $name_cat = $it_arr['catname']; 59 if ($name_cat != $it_arr['catname']) $name_cat = $it_arr['catname'];
60 $Main_Job[$name_cat][] = $it_arr; 60 $Main_Job[$name_cat][] = $it_arr;
61 } 61 }
62 62
63 $employers = employers_main::query()->with('employer')-> 63 $employers = employers_main::query()->with('employer')->
64 whereHas('employer', function ($query) { 64 whereHas('employer', function ($query) {
65 $query->where('status_hidden', '=', '0'); 65 $query->where('status_hidden', '=', '0');
66 })-> 66 })->
67 orderBy('sort')->get(); 67 orderBy('sort')->get();
68 $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get(); 68 $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get();
69 69
70 $block_names = MainPageCounters::values();; 70 $block_names = MainPageCounters::values();;
71 $blocks_counters = PageContent::select('name', 'title', 'description', 'extra') 71 $blocks_counters = PageContent::select('name', 'title', 'description', 'extra')
72 ->whereIn('name', $block_names) 72 ->whereIn('name', $block_names)
73 ->orderBy('name', 'asc') 73 ->orderBy('name', 'asc')
74 ->get() 74 ->get()
75 ->keyBy('name') 75 ->keyBy('name')
76 ->toArray(); 76 ->toArray();
77 77
78 return view('index', compact('news', 'Job_title', 'categories', 'employers', 'vacancy', 'Main_Job', 'blocks_counters')); 78 return view('index', compact('news', 'Job_title', 'categories', 'employers', 'vacancy', 'Main_Job', 'blocks_counters'));
79 } 79 }
80 80
81 public function search_vacancies(Request $request) { 81 public function search_vacancies(Request $request) {
82 if ($request->has('search')) { 82 if ($request->has('search')) {
83 $search = $request->get('search'); 83 $search = $request->get('search');
84 $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); 84 $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first();
85 if (isset($job_titles->id)) 85 if (isset($job_titles->id))
86 if ($job_titles->id > 0) 86 if ($job_titles->id > 0)
87 return redirect()->route('vacancies', ['job' => $job_titles->id]); 87 return redirect()->route('vacancies', ['job' => $job_titles->id]);
88 } 88 }
89 } 89 }
90 90
91 // Лайк вакансии 91 // Лайк вакансии
92 public function like_vacancy(Request $request) { 92 public function like_vacancy(Request $request) {
93 $IP_address = RusDate::ip_addr_client(); 93 $IP_address = RusDate::ip_addr_client();
94 94
95 if ($request->has('code_record')) { 95 if ($request->has('code_record')) {
96 if ($request->has('delete')) { 96 if ($request->has('delete')) {
97 $code = $request->get('code_record'); 97 $code = $request->get('code_record');
98 $atomic_era = Like_vacancy::select('id')-> 98 $atomic_era = Like_vacancy::select('id')->
99 where('code_record', '=', $code)->toSql(); 99 where('code_record', '=', $code)->toSql();
100 DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete(); 100 DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete();
101 101
102 } else { 102 } else {
103 $params = $request->all(); 103 $params = $request->all();
104 $params['ip_address'] = $IP_address; 104 $params['ip_address'] = $IP_address;
105 Like_vacancy::create($params); 105 Like_vacancy::create($params);
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 // Лайк соискателю. 110 // Лайк соискателю.
111 public function like_worker(Request $request) { 111 public function like_worker(Request $request) {
112 $IP_address = RusDate::ip_addr_client(); 112 $IP_address = RusDate::ip_addr_client();
113 113
114 if ($request->has('code_record')) { 114 if ($request->has('code_record')) {
115 if ($request->has('delete')) { 115 if ($request->has('delete')) {
116 $atomic_era = Like_worker::select('id')-> 116 $atomic_era = Like_worker::select('id')->
117 where('code_record', '=', $request-> 117 where('code_record', '=', $request->
118 get('code_record'))->first(); 118 get('code_record'))->first();
119 119
120 DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete(); 120 DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete();
121 121
122 return "Вот и результат удаления!"; 122 return "Вот и результат удаления!";
123 123
124 } else { 124 } else {
125 $params = $request->all(); 125 $params = $request->all();
126 $params['ip_address'] = $IP_address; 126 $params['ip_address'] = $IP_address;
127 Like_worker::create($params); 127 Like_worker::create($params);
128 } 128 }
129 } 129 }
130 } 130 }
131 131
132 public function vacancies(Request $request) { 132 public function vacancies(Request $request) {
133 //должности 133 //должности
134 $Job_title = Job_title::query()->where('is_remove', '=', '0')-> 134 $Job_title = Job_title::query()->where('is_remove', '=', '0')->
135 where('is_bd', '=', '0')->orderByDesc('sort')-> 135 where('is_bd', '=', '0')->orderByDesc('sort')->
136 orderBy('name')->get(); 136 orderBy('name')->get();
137 137
138 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') 138 $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*')
139 ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') 139 ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary')
140 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') 140 ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id')
141 ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); 141 ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id');
142 142
143 //категории и вакансии 143 //категории и вакансии
144 if (($request->has('job')) && ($request->get('job') > 0)) { 144 if (($request->has('job')) && ($request->get('job') > 0)) {
145 $categories = $categories->Where('job_title_id', '=', $request->get('job')); 145 $categories = $categories->Where('job_title_id', '=', $request->get('job'));
146 } 146 }
147 147
148 $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); 148 $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get();
149 149
150 $Data = DB::table('job_titles')-> 150 $Data = DB::table('job_titles')->
151 selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> 151 selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')->
152 where('categories.is_remove', '=', '0')-> 152 where('categories.is_remove', '=', '0')->
153 where('job_titles.is_bd', '=' , '0')-> 153 where('job_titles.is_bd', '=' , '0')->
154 where('job_titles.is_remove', '=', '0'); 154 where('job_titles.is_remove', '=', '0');
155
155 if (($request->has('job')) && ($request->get('job') > 0)) { 156 if (($request->has('job')) && ($request->get('job') > 0)) {
156 $Data = $Data->where('job_title_id', $request->get('job')); 157 $Data->where('job_title_id', $request->get('job'));
157 } 158 }
158 $Data = $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> 159
159 join('categories', 'categories.id', '=', 'job_titles.position_id')-> 160 $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')
160 groupBy('job_titles.id')->orderBy('categories.id')->orderByDesc('job_titles.position_id')-> 161 ->join('categories', 'categories.id', '=', 'job_titles.position_id')
161 orderByDesc('job_titles.sort')->get()->toArray(); 162 ->groupBy('job_titles.id')
163 ->orderBy('categories.id')
164 ->orderByDesc('job_titles.position_id')
165 ->orderByDesc('job_titles.sort')
166 ->get()
167 ->toArray();
162 168
163 $Main_Job = array(); 169 $Main_Job = array();
164 $name_cat = ''; 170 $name_cat = '';
165 foreach ($Data as $it) { 171 foreach ($Data as $it) {
166 $it_arr = (array)$it; 172 $it_arr = (array)$it;
167 if ($name_cat != $it_arr['catname']) 173 if ($name_cat != $it_arr['catname']) {
168 $name_cat = $it_arr['catname']; 174 $name_cat = $it_arr['catname'];
175 }
169 $Main_Job[$name_cat][] = $it_arr; 176 $Main_Job[$name_cat][] = $it_arr;
170 } 177 }
171 178
172 if ($request->ajax()) { 179 if ($request->ajax()) {
173 return view('ajax.new_sky', compact('categories', 'Main_Job')); 180 return view('ajax.new_sky', compact('categories', 'Main_Job'));
174 } else { 181 } else {
175 return view('new_sky', compact('Job_title', 'categories', 'Main_Job')); 182 return view('new_sky', compact('Job_title', 'categories', 'Main_Job'));
176 } 183 }
177 } 184 }
178 185
179 //Вакансии категория детальная 186 //Вакансии категория детальная
180 public function list_vacancies(Category $categories, Request $request) { 187 public function list_vacancies(Category $categories, Request $request) {
181 if (isset(Auth()->user()->id)) 188 if (isset(Auth()->user()->id))
182 $uid = Auth()->user()->id; 189 $uid = Auth()->user()->id;
183 else 190 else
184 $uid = 0; 191 $uid = 0;
185 192
186 if ($request->get('job') == 0) 193 if ($request->get('job') == 0)
187 $job_search = ''; 194 $job_search = '';
188 else 195 else
189 $job_search = $request->get('job'); 196 $job_search = $request->get('job');
190 197
191 $Query = Ad_employer::with('jobs') 198 $Query = Ad_employer::with('jobs')
192 ->with('cat') 199 ->with('cat')
193 ->with('employer') 200 ->with('employer')
194 ->where('is_remove', 0) 201 ->where('is_remove', 0)
195 ->whereHas('jobs_code', function ($query) use ($job_search) { 202 ->whereHas('jobs_code', function ($query) use ($job_search) {
196 if (!empty($job_search)) { 203 if (!empty($job_search)) {
197 $query->where('job_title_id', $job_search); 204 $query->where('job_title_id', $job_search);
198 } 205 }
199 }) 206 })
200 ->select('ad_employers.*'); 207 ->select('ad_employers.*');
201 208
202 if (isset($categories->id) && ($categories->id > 0)) { 209 if (isset($categories->id) && ($categories->id > 0)) {
203 $Query = $Query->where('category_id', '=', $categories->id); 210 $Query = $Query->where('category_id', '=', $categories->id);
204 $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); 211 $Name_categori = Category::query()->where('id', '=', $categories->id)->get();
205 } else { 212 } else {
206 $Name_categori = ''; 213 $Name_categori = '';
207 } 214 }
208 215
209 if ($request->get('sort')) { 216 if ($request->get('sort')) {
210 $sort = $request->get('sort'); 217 $sort = $request->get('sort');
211 switch ($sort) { 218 switch ($sort) {
212 case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; 219 case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break;
213 case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; 220 case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break;
214 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; 221 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break;
215 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; 222 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break;
216 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; 223 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break;
217 default: $Query = $Query->orderbyDesc('updated_at')->orderBy('id'); break; 224 default: $Query = $Query->orderbyDesc('updated_at')->orderBy('id'); break;
218 } 225 }
219 } 226 }
220 227
221 $Job_title = Job_title::query()->where('is_remove', '=', '0')-> 228 $Job_title = Job_title::query()->where('is_remove', '=', '0')->
222 where('is_bd', '=', '0')->orderByDesc('sort')-> 229 where('is_bd', '=', '0')->orderByDesc('sort')->
223 orderBy('name')->get(); 230 orderBy('name')->get();
224 231
225 $Query_count = $Query->count(); 232 $Query_count = $Query->count();
226 233
227 $Query = $Query->OrderByDesc('updated_at')->paginate(10); 234 $Query = $Query->OrderByDesc('updated_at')->paginate(10);
228 235
229 $Reclama = reclame::query()->get(); 236 $Reclama = reclame::query()->get();
230 237
231 if ($request->ajax()) { 238 if ($request->ajax()) {
232 if ($request->has('title')) { 239 if ($request->has('title')) {
233 return view('ajax.list_category', compact( 240 return view('ajax.list_category', compact(
234 'Name_categori' 241 'Name_categori'
235 )); 242 ));
236 } else { 243 } else {
237 return view('ajax.list_vacancies', compact('Query', 244 return view('ajax.list_vacancies', compact('Query',
238 'Query_count', 245 'Query_count',
239 'Name_categori', 246 'Name_categori',
240 'Reclama', 247 'Reclama',
241 'categories', 248 'categories',
242 'Job_title', 249 'Job_title',
243 'uid')); 250 'uid'));
244 } 251 }
245 } else { 252 } else {
246 //Вернуть все 253 //Вернуть все
247 return view('list_vacancies', compact('Query', 254 return view('list_vacancies', compact('Query',
248 'Query_count', 255 'Query_count',
249 'Reclama', 256 'Reclama',
250 'Name_categori', 257 'Name_categori',
251 'categories', 258 'categories',
252 'Job_title', 259 'Job_title',
253 'uid')); 260 'uid'));
254 } 261 }
255 } 262 }
256 263
257 // Контакты 264 // Контакты
258 public function contacts() { 265 public function contacts() {
259 return view('contacts'); 266 return view('contacts');
260 } 267 }
261 268
262 // Вход в личный кабинет 269 // Вход в личный кабинет
263 public function input_login(Request $request) 270 public function input_login(Request $request)
264 { 271 {
265 $params = $request->all(); 272 $params = $request->all();
266 273
267 274
268 $rules = [ 275 $rules = [
269 'email' => 'required|string|email', 276 'email' => 'required|string|email',
270 'password' => 'required|string|min:3|max:25', 277 'password' => 'required|string|min:3|max:25',
271 ]; 278 ];
272 279
273 $messages = [ 280 $messages = [
274 'required' => 'Укажите обязательное поле «:attribute»', 281 'required' => 'Укажите обязательное поле «:attribute»',
275 'email' => 'Введите корректный email', 282 'email' => 'Введите корректный email',
276 'min' => [ 283 'min' => [
277 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 284 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
278 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 285 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
279 ], 286 ],
280 'max' => [ 287 'max' => [
281 'string' => 'Поле «:attribute» должно быть не больше :max символов', 288 'string' => 'Поле «:attribute» должно быть не больше :max символов',
282 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 289 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
283 ], 290 ],
284 ]; 291 ];
285 $validator = Validator::make($request->all(), $rules, $messages); 292 $validator = Validator::make($request->all(), $rules, $messages);
286 if ($validator->fails()) { 293 if ($validator->fails()) {
287 if (Auth::check()) 294 if (Auth::check())
288 $user_id = $request->user()->id; 295 $user_id = $request->user()->id;
289 else 296 else
290 $user_id = 0; 297 $user_id = 0;
291 298
292 if ($user_id > 0) 299 if ($user_id > 0)
293 return json_encode(Array("ERROR" => "Email или пароль невалидный!")); 300 return json_encode(Array("ERROR" => "Email или пароль невалидный!"));
294 else 301 else
295 return redirect()->route('index')->with('Error', "Email или пароль невалидный"); 302 return redirect()->route('index')->with('Error', "Email или пароль невалидный");
296 } else { 303 } else {
297 $credentials = $request->only('email', 'password'); 304 $credentials = $request->only('email', 'password');
298 305
299 if (Auth::attempt($credentials, $request->has('remember'))) { 306 if (Auth::attempt($credentials, $request->has('remember'))) {
300 307
301 if (is_null(Auth::user()->email_verified_at)) { 308 if (is_null(Auth::user()->email_verified_at)) {
302 Auth::logout(); 309 Auth::logout();
303 return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); 310 return json_encode(Array("ERROR" => "Адрес почты не подтвержден"));
304 } 311 }
305 312
306 if (Auth::user()->is_worker) { 313 if (Auth::user()->is_worker) {
307 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); 314 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));
308 } else { 315 } else {
309 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); 316 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));
310 } 317 }
311 318
312 return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); 319 return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет"));
313 //->route('index') 320 //->route('index')
314 //->with('success', 'Вы вошли в личный кабинет.'); 321 //->with('success', 'Вы вошли в личный кабинет.');
315 } else { 322 } else {
316 return json_encode(Array("ERROR" => "Неверный логин или пароль!")); 323 return json_encode(Array("ERROR" => "Неверный логин или пароль!"));
317 } 324 }
318 } 325 }
319 } 326 }
320 327
321 // Восстановление пароля 328 // Восстановление пароля
322 public function repair_password(Request $request) { 329 public function repair_password(Request $request) {
323 $rules = [ 330 $rules = [
324 'email' => 'required|string|email', 331 'email' => 'required|string|email',
325 ]; 332 ];
326 333
327 $messages = [ 334 $messages = [
328 'required' => 'Укажите обязательное поле «:attribute»', 335 'required' => 'Укажите обязательное поле «:attribute»',
329 'email' => 'Введите корректный email', 336 'email' => 'Введите корректный email',
330 'min' => [ 337 'min' => [
331 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 338 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
332 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 339 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
333 ], 340 ],
334 'max' => [ 341 'max' => [
335 'string' => 'Поле «:attribute» должно быть не больше :max символов', 342 'string' => 'Поле «:attribute» должно быть не больше :max символов',
336 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 343 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
337 ], 344 ],
338 ]; 345 ];
339 346
340 $validator = Validator::make($request->all(), $rules, $messages); 347 $validator = Validator::make($request->all(), $rules, $messages);
341 348
342 if ($validator->fails()) { 349 if ($validator->fails()) {
343 return redirect()->back()->with('Error', "Email невалидный"); 350 return redirect()->back()->with('Error', "Email невалидный");
344 } else { 351 } else {
345 $new_password = Tools::generator_id(10); 352 $new_password = Tools::generator_id(10);
346 $hash_password = Hash::make($new_password); 353 $hash_password = Hash::make($new_password);
347 $user = User::query()->where('email', $request->get('email'))->first(); 354 $user = User::query()->where('email', $request->get('email'))->first();
348 $EditRec = User::find($user->id); 355 $EditRec = User::find($user->id);
349 $EditRec->password = $hash_password; 356 $EditRec->password = $hash_password;
350 $EditRec->save(); 357 $EditRec->save();
351 358
352 foreach ([$request->get('email')] as $recipient) { 359 foreach ([$request->get('email')] as $recipient) {
353 Mail::to($recipient)->send(new MailRepair($new_password)); 360 Mail::to($recipient)->send(new MailRepair($new_password));
354 } 361 }
355 return redirect()->route('index'); 362 return redirect()->route('index');
356 363
357 } 364 }
358 365
359 } 366 }
360 367
361 // Вывод новостей 368 // Вывод новостей
362 public function news(Request $request) { 369 public function news(Request $request) {
363 $Query = News::query(); 370 $Query = News::query();
364 if ($request->has('search')) { 371 if ($request->has('search')) {
365 $search = $request->get('search'); 372 $search = $request->get('search');
366 $Query = $Query->where('title', 'LIKE', "%$search%")-> 373 $Query = $Query->where('title', 'LIKE', "%$search%")->
367 orWhere('text', 'LIKE', "%$search%"); 374 orWhere('text', 'LIKE', "%$search%");
368 } 375 }
369 376
370 if ($request->ajax()) { 377 if ($request->ajax()) {
371 if ($request->get('sort')) { 378 if ($request->get('sort')) {
372 $sort = $request->get('sort'); 379 $sort = $request->get('sort');
373 switch ($sort) { 380 switch ($sort) {
374 case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; 381 case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break;
375 case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; 382 case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break;
376 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; 383 case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break;
377 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; 384 case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break;
378 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; 385 case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break;
379 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; 386 default: $Query = $Query->orderBy('id')->orderby('updated_at'); break;
380 } 387 }
381 } 388 }
382 } 389 }
383 $Query_count = $Query->count(); 390 $Query_count = $Query->count();
384 $Query = $Query->paginate(6); 391 $Query = $Query->paginate(6);
385 392
386 if ($request->ajax()) { 393 if ($request->ajax()) {
387 return view('ajax.news-list', compact('Query', 'Query_count')); 394 return view('ajax.news-list', compact('Query', 'Query_count'));
388 } else { 395 } else {
389 return view('news-list', compact('Query', 'Query_count')); 396 return view('news-list', compact('Query', 'Query_count'));
390 } 397 }
391 } 398 }
392 399
393 //Детальная новость 400 //Детальная новость
394 public function detail_new(News $new) { 401 public function detail_new(News $new) {
395 // Наборка 402 // Наборка
396 $Query = News::query()->where('id', $new->id)->get(); 403 $Query = News::query()->where('id', $new->id)->get();
397 $title = $Query[0]->title; 404 $title = $Query[0]->title;
398 $All_Query = News::query()->paginate(8); 405 $All_Query = News::query()->paginate(8);
399 return view('detail_new', compact('Query', 'All_Query', 'title')); 406 return view('detail_new', compact('Query', 'All_Query', 'title'));
400 } 407 }
401 } 408 }
402 409
public/js/chosen/chosen.css
1 /*! 1 /*!
2 Chosen, a Select Box Enhancer for jQuery and Prototype 2 Chosen, a Select Box Enhancer for jQuery and Prototype
3 by Patrick Filler for Harvest, http://getharvest.com 3 by Patrick Filler for Harvest, http://getharvest.com
4 4
5 Version 1.8.7 5 Version 1.8.7
6 Full source at https://github.com/harvesthq/chosen 6 Full source at https://github.com/harvesthq/chosen
7 Copyright (c) 2011-2018 Harvest http://getharvest.com 7 Copyright (c) 2011-2018 Harvest http://getharvest.com
8 8
9 MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md 9 MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10 This file is generated by `grunt build`, do not edit it by hand. 10 This file is generated by `grunt build`, do not edit it by hand.
11 */ 11 */
12 12
13 /* @group Base */ 13 /* @group Base */
14 .chosen-container { 14 .chosen-container {
15 position: relative; 15 position: relative;
16 display: inline-block; 16 display: inline-block;
17 vertical-align: middle; 17 vertical-align: middle;
18 font-size: 13px; 18 font-size: 13px;
19 -webkit-user-select: none; 19 -webkit-user-select: none;
20 -moz-user-select: none; 20 -moz-user-select: none;
21 -ms-user-select: none; 21 -ms-user-select: none;
22 user-select: none; 22 user-select: none;
23 } 23 }
24 24
25 .chosen-container * { 25 .chosen-container * {
26 -webkit-box-sizing: border-box; 26 -webkit-box-sizing: border-box;
27 box-sizing: border-box; 27 box-sizing: border-box;
28 } 28 }
29 29
30 .chosen-container .chosen-drop { 30 .chosen-container .chosen-drop {
31 position: absolute; 31 position: absolute;
32 top: 100%; 32 top: 100%;
33 z-index: 1010; 33 z-index: 1010;
34 width: 100%; 34 width: 100%;
35 border: 1px solid #aaa; 35 border: 1px solid #aaa;
36 border-top: 0; 36 border-top: 0;
37 background: #fff; 37 background: #fff;
38 -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); 38 -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
39 box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); 39 box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
40 clip: rect(0, 0, 0, 0); 40 clip: rect(0, 0, 0, 0);
41 -webkit-clip-path: inset(100% 100%); 41 -webkit-clip-path: inset(100% 100%);
42 clip-path: inset(100% 100%); 42 clip-path: inset(100% 100%);
43 } 43 }
44 44
45 .chosen-container.chosen-with-drop .chosen-drop { 45 .chosen-container.chosen-with-drop .chosen-drop {
46 clip: auto; 46 clip: auto;
47 -webkit-clip-path: none; 47 -webkit-clip-path: none;
48 clip-path: none; 48 clip-path: none;
49 } 49 }
50 50
51 .chosen-container a { 51 .chosen-container a {
52 cursor: pointer; 52 cursor: pointer;
53 } 53 }
54 54
55 .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name { 55 .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
56 margin-right: 4px; 56 margin-right: 4px;
57 overflow: hidden; 57 overflow: hidden;
58 white-space: nowrap; 58 white-space: nowrap;
59 text-overflow: ellipsis; 59 text-overflow: ellipsis;
60 font-weight: normal; 60 font-weight: normal;
61 color: #999999; 61 color: #999999;
62 } 62 }
63 63
64 .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after { 64 .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
65 content: ":"; 65 content: ":";
66 padding-left: 2px; 66 padding-left: 2px;
67 vertical-align: top; 67 vertical-align: top;
68 } 68 }
69 69
70 /* @end */ 70 /* @end */
71 /* @group Single Chosen */ 71 /* @group Single Chosen */
72 .chosen-container-single .chosen-single { 72 .chosen-container-single .chosen-single {
73 position: relative; 73 position: relative;
74 display: block; 74 display: block;
75 overflow: hidden; 75 overflow: hidden;
76 padding: 0 0 0 8px; 76 padding: 0 0 0 8px;
77 height: 25px; 77 height: 25px;
78 border: 1px solid #aaa; 78 border: 1px solid #aaa;
79 border-radius: 5px; 79 border-radius: 5px;
80 background-color: #fff; 80 background-color: #fff;
81 background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4)); 81 background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4));
82 background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%); 82 background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
83 background-clip: padding-box; 83 background-clip: padding-box;
84 -webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1); 84 -webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
85 box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1); 85 box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
86 color: #444; 86 color: #444;
87 text-decoration: none; 87 text-decoration: none;
88 white-space: nowrap; 88 white-space: nowrap;
89 line-height: 24px; 89 line-height: 24px;
90 } 90 }
91 91
92 .chosen-container-single .chosen-default { 92 .chosen-container-single .chosen-default {
93 color: #999; 93 color: #999;
94 } 94 }
95 95
96 .chosen-container-single .chosen-single span { 96 .chosen-container-single .chosen-single span {
97 display: block; 97 display: block;
98 overflow: hidden; 98 overflow: hidden;
99 margin-right: 26px; 99 margin-right: 26px;
100 text-overflow: ellipsis; 100 text-overflow: ellipsis;
101 white-space: nowrap; 101 white-space: nowrap;
102 } 102 }
103 103
104 .chosen-container-single .chosen-single-with-deselect span { 104 .chosen-container-single .chosen-single-with-deselect span {
105 margin-right: 38px; 105 margin-right: 38px;
106 } 106 }
107 107
108 .chosen-container-single .chosen-single abbr { 108 .chosen-container-single .chosen-single abbr {
109 position: absolute; 109 position: absolute;
110 top: 6px; 110 top: 6px;
111 right: 26px; 111 right: 26px;
112 display: block; 112 display: block;
113 width: 12px; 113 width: 12px;
114 height: 12px; 114 height: 12px;
115 background: url("chosen-sprite.png") -42px 1px no-repeat; 115 background: url("chosen-sprite.png") -42px 1px no-repeat;
116 font-size: 1px; 116 font-size: 1px;
117 } 117 }
118 118
119 .chosen-container-single .chosen-single abbr:hover { 119 .chosen-container-single .chosen-single abbr:hover {
120 background-position: -42px -10px; 120 background-position: -42px -10px;
121 } 121 }
122 122
123 .chosen-container-single.chosen-disabled .chosen-single abbr:hover { 123 .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
124 background-position: -42px -10px; 124 background-position: -42px -10px;
125 } 125 }
126 126
127 .chosen-container-single .chosen-single div { 127 .chosen-container-single .chosen-single div {
128 position: absolute; 128 position: absolute;
129 top: 0; 129 top: 0;
130 right: 0; 130 right: 0;
131 display: block; 131 display: block;
132 width: 18px; 132 width: 18px;
133 height: 100%; 133 height: 100%;
134 } 134 }
135 135
136 .chosen-container-single .chosen-single div b { 136 .chosen-container-single .chosen-single div b {
137 display: block; 137 display: block;
138 width: 100%; 138 width: 100%;
139 height: 100%; 139 height: 100%;
140 background: url("chosen-sprite.png") no-repeat 0px 2px; 140 background: url("chosen-sprite.png") no-repeat 0px 2px;
141 } 141 }
142 142
143 .chosen-container-single .chosen-search { 143 .chosen-container-single .chosen-search {
144 position: relative; 144 position: relative;
145 z-index: 1010; 145 z-index: 1010;
146 margin: 0; 146 margin: 0;
147 padding: 3px 4px; 147 padding: 3px 4px;
148 white-space: nowrap; 148 white-space: nowrap;
149 } 149 }
150 150
151 .chosen-container-single .chosen-search input[type="text"] { 151 .chosen-container-single .chosen-search input[type="text"] {
152 margin: 1px 0; 152 margin: 1px 0;
153 padding: 4px 20px 4px 5px; 153 padding: 4px 20px 4px 5px;
154 width: 100%; 154 width: 100%;
155 height: auto; 155 height: auto;
156 outline: 0; 156 outline: 0;
157 border: 1px solid #aaa; 157 border: 1px solid #aaa;
158 background: url("chosen-sprite.png") no-repeat 100% -20px; 158 background: url("chosen-sprite.png") no-repeat 100% -20px;
159 font-size: 1em; 159 font-size: 1em;
160 font-family: sans-serif; 160 font-family: sans-serif;
161 line-height: normal; 161 line-height: normal;
162 border-radius: 0; 162 border-radius: 0;
163 } 163 }
164 164
165 .chosen-container-single .chosen-drop { 165 .chosen-container-single .chosen-drop {
166 margin-top: -1px; 166 margin-top: -1px;
167 border-radius: 0 0 4px 4px; 167 border-radius: 0 0 4px 4px;
168 background-clip: padding-box; 168 background-clip: padding-box;
169 } 169 }
170 170
171 .chosen-container-single.chosen-container-single-nosearch .chosen-search { 171 .chosen-container-single.chosen-container-single-nosearch .chosen-search {
172 position: absolute; 172 position: absolute;
173 clip: rect(0, 0, 0, 0); 173 clip: rect(0, 0, 0, 0);
174 -webkit-clip-path: inset(100% 100%); 174 -webkit-clip-path: inset(100% 100%);
175 clip-path: inset(100% 100%); 175 clip-path: inset(100% 100%);
176 } 176 }
177 177
178 /* @end */ 178 /* @end */
179 /* @group Results */ 179 /* @group Results */
180 .chosen-container .chosen-results { 180 .chosen-container .chosen-results {
181 color: #444; 181 color: #444;
182 position: relative; 182 position: relative;
183 overflow-x: hidden; 183 overflow-x: hidden;
184 overflow-y: auto; 184 overflow-y: auto;
185 margin: 0 4px 4px 0; 185 margin: 0 4px 4px 0;
186 padding: 0 0 0 4px; 186 padding: 0 0 0 4px;
187 max-height: 240px; 187 max-height: 240px;
188 -webkit-overflow-scrolling: touch; 188 -webkit-overflow-scrolling: touch;
189 } 189 }
190 190
191 .chosen-container .chosen-results li { 191 .chosen-container .chosen-results li {
192 display: none; 192 display: none;
193 margin: 0; 193 margin: 0;
194 padding: 5px 6px; 194 padding: 5px 6px;
195 list-style: none; 195 list-style: none;
196 line-height: 15px; 196 line-height: 15px;
197 word-wrap: break-word; 197 word-wrap: break-word;
198 -webkit-touch-callout: none; 198 -webkit-touch-callout: none;
199 } 199 }
200 200
201 .chosen-container .chosen-results li.active-result { 201 .chosen-container .chosen-results li.active-result {
202 display: list-item; 202 display: list-item;
203 cursor: pointer; 203 cursor: pointer;
204 } 204 }
205 205
206 .chosen-container .chosen-results li.disabled-result { 206 .chosen-container .chosen-results li.disabled-result {
207 display: list-item; 207 display: list-item;
208 color: #ccc; 208 color: #ccc;
209 cursor: default; 209 cursor: default;
210 } 210 }
211 211
212 .chosen-container .chosen-results li.highlighted { 212 .chosen-container .chosen-results li.highlighted {
213 background-color: #3875d7; 213 background-color: #377d87;
214 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); 214 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #377d87), color-stop(90%, #377d87));
215 background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); 215 background-image: linear-gradient(#377d87 20%, #377d87 90%);
216 color: #fff; 216 color: #fff;
217 } 217 }
218 218
219 .chosen-container .chosen-results li.no-results { 219 .chosen-container .chosen-results li.no-results {
220 color: #777; 220 color: #777;
221 display: list-item; 221 display: list-item;
222 background: #f4f4f4; 222 background: #f4f4f4;
223 } 223 }
224 224
225 .chosen-container .chosen-results li.group-result { 225 .chosen-container .chosen-results li.group-result {
226 display: list-item; 226 display: list-item;
227 font-weight: bold; 227 font-weight: bold;
228 cursor: default; 228 cursor: default;
229 } 229 }
230 230
231 .chosen-container .chosen-results li.group-option { 231 .chosen-container .chosen-results li.group-option {
232 padding-left: 15px; 232 padding-left: 15px;
233 } 233 }
234 234
235 .chosen-container .chosen-results li em { 235 .chosen-container .chosen-results li em {
236 font-style: normal; 236 font-style: normal;
237 text-decoration: underline; 237 text-decoration: underline;
238 } 238 }
239 239
240 /* @end */ 240 /* @end */
241 /* @group Multi Chosen */ 241 /* @group Multi Chosen */
242 .chosen-container-multi .chosen-choices { 242 .chosen-container-multi .chosen-choices {
243 position: relative; 243 position: relative;
244 overflow: hidden; 244 overflow: hidden;
245 margin: 0; 245 margin: 0;
246 padding: 0 5px; 246 padding: 0 5px;
247 width: 100%; 247 width: 100%;
248 height: auto; 248 height: auto;
249 border: 1px solid #aaa; 249 border: 1px solid #aaa;
250 background-color: #fff; 250 background-color: #fff;
251 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #eee), color-stop(15%, #fff)); 251 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #eee), color-stop(15%, #fff));
252 background-image: linear-gradient(#eee 1%, #fff 15%); 252 background-image: linear-gradient(#eee 1%, #fff 15%);
253 cursor: text; 253 cursor: text;
254 } 254 }
255 255
256 .chosen-container-multi .chosen-choices li { 256 .chosen-container-multi .chosen-choices li {
257 float: left; 257 float: left;
258 list-style: none; 258 list-style: none;
259 } 259 }
260 260
261 .chosen-container-multi .chosen-choices li.search-field { 261 .chosen-container-multi .chosen-choices li.search-field {
262 margin: 0; 262 margin: 0;
263 padding: 0; 263 padding: 0;
264 white-space: nowrap; 264 white-space: nowrap;
265 } 265 }
266 266
267 .chosen-container-multi .chosen-choices li.search-field input[type="text"] { 267 .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
268 margin: 1px 0; 268 margin: 1px 0;
269 padding: 0; 269 padding: 0;
270 height: 25px; 270 height: 25px;
271 outline: 0; 271 outline: 0;
272 border: 0 !important; 272 border: 0 !important;
273 background: transparent !important; 273 background: transparent !important;
274 -webkit-box-shadow: none; 274 -webkit-box-shadow: none;
275 box-shadow: none; 275 box-shadow: none;
276 color: #999; 276 color: #999;
277 font-size: 100%; 277 font-size: 100%;
278 font-family: sans-serif; 278 font-family: sans-serif;
279 line-height: normal; 279 line-height: normal;
280 border-radius: 0; 280 border-radius: 0;
281 width: 25px; 281 width: 25px;
282 } 282 }
283 283
284 .chosen-container-multi .chosen-choices li.search-choice { 284 .chosen-container-multi .chosen-choices li.search-choice {
285 position: relative; 285 position: relative;
286 margin: 3px 5px 3px 0; 286 margin: 3px 5px 3px 0;
287 padding: 3px 20px 3px 5px; 287 padding: 3px 20px 3px 5px;
288 border: 1px solid #aaa; 288 border: 1px solid #aaa;
289 max-width: 100%; 289 max-width: 100%;
290 border-radius: 3px; 290 border-radius: 3px;
291 background-color: #eeeeee; 291 background-color: #eeeeee;
292 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee)); 292 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
293 background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); 293 background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
294 background-size: 100% 19px; 294 background-size: 100% 19px;
295 background-repeat: repeat-x; 295 background-repeat: repeat-x;
296 background-clip: padding-box; 296 background-clip: padding-box;
297 -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); 297 -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
298 box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); 298 box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
299 color: #333; 299 color: #333;
300 line-height: 13px; 300 line-height: 13px;
301 cursor: default; 301 cursor: default;
302 } 302 }
303 303
304 .chosen-container-multi .chosen-choices li.search-choice span { 304 .chosen-container-multi .chosen-choices li.search-choice span {
305 word-wrap: break-word; 305 word-wrap: break-word;
306 } 306 }
307 307
308 .chosen-container-multi .chosen-choices li.search-choice .search-choice-close { 308 .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
309 position: absolute; 309 position: absolute;
310 top: 4px; 310 top: 4px;
311 right: 3px; 311 right: 3px;
312 display: block; 312 display: block;
313 width: 12px; 313 width: 12px;
314 height: 12px; 314 height: 12px;
315 background: url("chosen-sprite.png") -42px 1px no-repeat; 315 background: url("chosen-sprite.png") -42px 1px no-repeat;
316 font-size: 1px; 316 font-size: 1px;
317 } 317 }
318 318
319 .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover { 319 .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
320 background-position: -42px -10px; 320 background-position: -42px -10px;
321 } 321 }
322 322
323 .chosen-container-multi .chosen-choices li.search-choice-disabled { 323 .chosen-container-multi .chosen-choices li.search-choice-disabled {
324 padding-right: 5px; 324 padding-right: 5px;
325 border: 1px solid #ccc; 325 border: 1px solid #ccc;
326 background-color: #e4e4e4; 326 background-color: #e4e4e4;
327 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee)); 327 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
328 background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); 328 background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
329 color: #666; 329 color: #666;
330 } 330 }
331 331
332 .chosen-container-multi .chosen-choices li.search-choice-focus { 332 .chosen-container-multi .chosen-choices li.search-choice-focus {
333 background: #d4d4d4; 333 background: #d4d4d4;
334 } 334 }
335 335
336 .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close { 336 .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
337 background-position: -42px -10px; 337 background-position: -42px -10px;
338 } 338 }
339 339
340 .chosen-container-multi .chosen-results { 340 .chosen-container-multi .chosen-results {
341 margin: 0; 341 margin: 0;
342 padding: 0; 342 padding: 0;
343 } 343 }
344 344
345 .chosen-container-multi .chosen-drop .result-selected { 345 .chosen-container-multi .chosen-drop .result-selected {
346 display: list-item; 346 display: list-item;
347 color: #ccc; 347 color: #ccc;
348 cursor: default; 348 cursor: default;
349 } 349 }
350 350
351 /* @end */ 351 /* @end */
352 /* @group Active */ 352 /* @group Active */
353 .chosen-container-active .chosen-single { 353 .chosen-container-active .chosen-single {
354 border: 1px solid #5897fb; 354 border: 1px solid #5897fb;
355 -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 355 -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
356 box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 356 box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
357 } 357 }
358 358
359 .chosen-container-active.chosen-with-drop .chosen-single { 359 .chosen-container-active.chosen-with-drop .chosen-single {
360 border: 1px solid #aaa; 360 border: 1px solid #aaa;
361 border-bottom-right-radius: 0; 361 border-bottom-right-radius: 0;
362 border-bottom-left-radius: 0; 362 border-bottom-left-radius: 0;
363 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #eee), color-stop(80%, #fff)); 363 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #eee), color-stop(80%, #fff));
364 background-image: linear-gradient(#eee 20%, #fff 80%); 364 background-image: linear-gradient(#eee 20%, #fff 80%);
365 -webkit-box-shadow: 0 1px 0 #fff inset; 365 -webkit-box-shadow: 0 1px 0 #fff inset;
366 box-shadow: 0 1px 0 #fff inset; 366 box-shadow: 0 1px 0 #fff inset;
367 } 367 }
368 368
369 .chosen-container-active.chosen-with-drop .chosen-single div { 369 .chosen-container-active.chosen-with-drop .chosen-single div {
370 border-left: none; 370 border-left: none;
371 background: transparent; 371 background: transparent;
372 } 372 }
373 373
374 .chosen-container-active.chosen-with-drop .chosen-single div b { 374 .chosen-container-active.chosen-with-drop .chosen-single div b {
375 background-position: -18px 2px; 375 background-position: -18px 2px;
376 } 376 }
377 377
378 .chosen-container-active .chosen-choices { 378 .chosen-container-active .chosen-choices {
379 border: 1px solid #5897fb; 379 border: 1px solid #5897fb;
380 -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 380 -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
381 box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 381 box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
382 } 382 }
383 383
384 .chosen-container-active .chosen-choices li.search-field input[type="text"] { 384 .chosen-container-active .chosen-choices li.search-field input[type="text"] {
385 color: #222 !important; 385 color: #222 !important;
386 } 386 }
387 387
388 /* @end */ 388 /* @end */
389 /* @group Disabled Support */ 389 /* @group Disabled Support */
390 .chosen-disabled { 390 .chosen-disabled {
391 opacity: 0.5 !important; 391 opacity: 0.5 !important;
392 cursor: default; 392 cursor: default;
393 } 393 }
394 394
395 .chosen-disabled .chosen-single { 395 .chosen-disabled .chosen-single {
396 cursor: default; 396 cursor: default;
397 } 397 }
398 398
399 .chosen-disabled .chosen-choices .search-choice .search-choice-close { 399 .chosen-disabled .chosen-choices .search-choice .search-choice-close {
400 cursor: default; 400 cursor: default;
401 } 401 }
402 402
403 /* @end */ 403 /* @end */
404 /* @group Right to Left */ 404 /* @group Right to Left */
405 .chosen-rtl { 405 .chosen-rtl {
406 text-align: right; 406 text-align: right;
407 } 407 }
408 408
409 .chosen-rtl .chosen-single { 409 .chosen-rtl .chosen-single {
410 overflow: visible; 410 overflow: visible;
411 padding: 0 8px 0 0; 411 padding: 0 8px 0 0;
412 } 412 }
413 413
414 .chosen-rtl .chosen-single span { 414 .chosen-rtl .chosen-single span {
415 margin-right: 0; 415 margin-right: 0;
416 margin-left: 26px; 416 margin-left: 26px;
417 direction: rtl; 417 direction: rtl;
418 } 418 }
419 419
420 .chosen-rtl .chosen-single-with-deselect span { 420 .chosen-rtl .chosen-single-with-deselect span {
421 margin-left: 38px; 421 margin-left: 38px;
422 } 422 }
423 423
424 .chosen-rtl .chosen-single div { 424 .chosen-rtl .chosen-single div {
425 right: auto; 425 right: auto;
426 left: 3px; 426 left: 3px;
427 } 427 }
428 428
429 .chosen-rtl .chosen-single abbr { 429 .chosen-rtl .chosen-single abbr {
430 right: auto; 430 right: auto;
431 left: 26px; 431 left: 26px;
432 } 432 }
433 433
434 .chosen-rtl .chosen-choices li { 434 .chosen-rtl .chosen-choices li {
435 float: right; 435 float: right;
436 } 436 }
437 437
438 .chosen-rtl .chosen-choices li.search-field input[type="text"] { 438 .chosen-rtl .chosen-choices li.search-field input[type="text"] {
439 direction: rtl; 439 direction: rtl;
440 } 440 }
441 441
442 .chosen-rtl .chosen-choices li.search-choice { 442 .chosen-rtl .chosen-choices li.search-choice {
443 margin: 3px 5px 3px 0; 443 margin: 3px 5px 3px 0;
444 padding: 3px 5px 3px 19px; 444 padding: 3px 5px 3px 19px;
445 } 445 }
446 446
447 .chosen-rtl .chosen-choices li.search-choice .search-choice-close { 447 .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
448 right: auto; 448 right: auto;
449 left: 4px; 449 left: 4px;
450 } 450 }
451 451
452 .chosen-rtl.chosen-container-single .chosen-results { 452 .chosen-rtl.chosen-container-single .chosen-results {
453 margin: 0 0 4px 4px; 453 margin: 0 0 4px 4px;
454 padding: 0 4px 0 0; 454 padding: 0 4px 0 0;
455 } 455 }
456 456
457 .chosen-rtl .chosen-results li.group-option { 457 .chosen-rtl .chosen-results li.group-option {
458 padding-right: 15px; 458 padding-right: 15px;
459 padding-left: 0; 459 padding-left: 0;
460 } 460 }
461 461
462 .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div { 462 .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
463 border-right: none; 463 border-right: none;
464 } 464 }
465 465
466 .chosen-rtl .chosen-search input[type="text"] { 466 .chosen-rtl .chosen-search input[type="text"] {
467 padding: 4px 5px 4px 20px; 467 padding: 4px 5px 4px 20px;
468 background: url("chosen-sprite.png") no-repeat -30px -20px; 468 background: url("chosen-sprite.png") no-repeat -30px -20px;
469 direction: rtl; 469 direction: rtl;
470 } 470 }
471 471
472 .chosen-rtl.chosen-container-single .chosen-single div b { 472 .chosen-rtl.chosen-container-single .chosen-single div b {
473 background-position: 6px 2px; 473 background-position: 6px 2px;
474 } 474 }
475 475
476 .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b { 476 .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
477 background-position: -12px 2px; 477 background-position: -12px 2px;
478 } 478 }
479 479
480 /* @end */ 480 /* @end */
481 /* @group Retina compatibility */ 481 /* @group Retina compatibility */
482 @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) { 482 @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
483 .chosen-rtl .chosen-search input[type="text"], 483 .chosen-rtl .chosen-search input[type="text"],
484 .chosen-container-single .chosen-single abbr, 484 .chosen-container-single .chosen-single abbr,
485 .chosen-container-single .chosen-single div b, 485 .chosen-container-single .chosen-single div b,
486 .chosen-container-single .chosen-search input[type="text"], 486 .chosen-container-single .chosen-search input[type="text"],
487 .chosen-container-multi .chosen-choices .search-choice .search-choice-close, 487 .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
488 .chosen-container .chosen-results-scroll-down span, 488 .chosen-container .chosen-results-scroll-down span,
489 .chosen-container .chosen-results-scroll-up span { 489 .chosen-container .chosen-results-scroll-up span {
490 background-image: url("chosen-sprite@2x.png") !important; 490 background-image: url("chosen-sprite@2x.png") !important;
491 background-size: 52px 37px !important; 491 background-size: 52px 37px !important;
492 background-repeat: no-repeat !important; 492 background-repeat: no-repeat !important;
493 } 493 }
494 } 494 }
495 495
496 /* @end */ 496 /* @end */
497 497
public/js/chosen/chosen.min.css
1 /*! 1 /*!
2 Chosen, a Select Box Enhancer for jQuery and Prototype 2 Chosen, a Select Box Enhancer for jQuery and Prototype
3 by Patrick Filler for Harvest, http://getharvest.com 3 by Patrick Filler for Harvest, http://getharvest.com
4 4
5 Version 1.8.7 5 Version 1.8.7
6 Full source at https://github.com/harvesthq/chosen 6 Full source at https://github.com/harvesthq/chosen
7 Copyright (c) 2011-2018 Harvest http://getharvest.com 7 Copyright (c) 2011-2018 Harvest http://getharvest.com
8 8
9 MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md 9 MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10 This file is generated by `grunt build`, do not edit it by hand. 10 This file is generated by `grunt build`, do not edit it by hand.
11 */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
11 */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#377d87;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#377d87),color-stop(90%,#377d87));background-image:linear-gradient(#377d87 20%,#377d87 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
resources/views/admin/users/form.blade.php
1 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> 1 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
2 @error('name') 2 @error('name')
3 {{ $message }} 3 {{ $message }}
4 @enderror 4 @enderror
5 5
6 <input name="name" id="name" type="hidden" 6 <input name="name" id="name" type="hidden"
7 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 7 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
8 placeholder="Имя/Псевдоним" value="{{ old('name') ?? $user->name ?? 'Пользователь базы данных' }}" 8 placeholder="Имя/Псевдоним" value="{{ old('name') ?? $user->name ?? 'Пользователь базы данных' }}"
9 /> 9 />
10 10
11 <label class="block text-sm"> 11 <label class="block text-sm">
12 <span class="text-gray-700 dark:text-gray-400">Должность</span> 12 <span class="text-gray-700 dark:text-gray-400">Должность</span>
13 <select name="positions_work[]" id="positions_work[]" data-placeholder="Выберите должность..." multiple="multiple"> 13 <select name="positions_work[]" id="positions_work[]" data-placeholder="Выберите должность..." multiple="multiple">
14 @isset($list_job_titles) 14 @isset($list_job_titles)
15 @foreach($list_job_titles as $job_title) 15 @foreach($list_job_titles as $job_title)
16 <option value="{{ $job_title->id }}" 16 <option value="{{ $job_title->id }}"
17 @if (isset($user) && in_array($job_title->id , $user->workers[0]->positions_work)) 17 @if ($user?->workers[0]?->positions_work && in_array($job_title->id , $user->workers[0]->positions_work))
18 selected 18 selected
19 @endif 19 @endif
20 > 20 >
21 {{ $job_title->name }} ({{ $job_title->id }}) 21 {{ $job_title->name }} ({{ $job_title->id }})
22 </option> 22 </option>
23 @endforeach 23 @endforeach
24 @endisset 24 @endisset
25 </select> 25 </select>
26 @error('name') 26 @error('name')
27 <span class="text-xs text-red-600 dark:text-red-400"> 27 <span class="text-xs text-red-600 dark:text-red-400">
28 {{ $message }} 28 {{ $message }}
29 </span> 29 </span>
30 @enderror 30 @enderror
31 </label><br> 31 </label><br>
32 32
33 <label class="block text-sm"> 33 <label class="block text-sm">
34 <span class="text-gray-700 dark:text-gray-400">Фамилия</span> 34 <span class="text-gray-700 dark:text-gray-400">Фамилия</span>
35 <input name="surname" id="surname" 35 <input name="surname" id="surname"
36 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 36 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
37 placeholder="Фамилия" value="{{ old('surname') ?? $user->surname ?? '' }}" 37 placeholder="Фамилия" value="{{ old('surname') ?? $user->surname ?? '' }}"
38 /> 38 />
39 @error('surname') 39 @error('surname')
40 <span class="text-xs text-red-600 dark:text-red-400"> 40 <span class="text-xs text-red-600 dark:text-red-400">
41 {{ $message }} 41 {{ $message }}
42 </span> 42 </span>
43 @enderror 43 @enderror
44 </label><br> 44 </label><br>
45 45
46 <label class="block text-sm"> 46 <label class="block text-sm">
47 <span class="text-gray-700 dark:text-gray-400">Имя</span> 47 <span class="text-gray-700 dark:text-gray-400">Имя</span>
48 <input name="name_man" id="name_man" 48 <input name="name_man" id="name_man"
49 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 49 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
50 placeholder="Имя" value="{{ old('name_man') ?? $user->name_man ?? '' }}" 50 placeholder="Имя" value="{{ old('name_man') ?? $user->name_man ?? '' }}"
51 /> 51 />
52 @error('name_man') 52 @error('name_man')
53 <span class="text-xs text-red-600 dark:text-red-400"> 53 <span class="text-xs text-red-600 dark:text-red-400">
54 {{ $message }} 54 {{ $message }}
55 </span> 55 </span>
56 @enderror 56 @enderror
57 </label><br> 57 </label><br>
58 58
59 <input type="hidden" name="is_worker" id="is_worker" value="1"/> 59 <input type="hidden" name="is_worker" id="is_worker" value="1"/>
60 <input type="hidden" name="is_bd" id="is_bd" value="1"/> 60 <input type="hidden" name="is_bd" id="is_bd" value="1"/>
61 <input type="hidden" name="admin" id="admin" value="0"/> 61 <input type="hidden" name="admin" id="admin" value="0"/>
62 <input type="hidden" name="password" id="password" value="1234567890"/> 62 <input type="hidden" name="password" id="password" value="1234567890"/>
63 63
64 <label class="block text-sm"> 64 <label class="block text-sm">
65 <span class="text-gray-700 dark:text-gray-400">Отчество</span> 65 <span class="text-gray-700 dark:text-gray-400">Отчество</span>
66 <input name="surname2" id="surname2" 66 <input name="surname2" id="surname2"
67 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 67 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
68 placeholder="Отчество" value="{{ old('surname2') ?? $user->surname2 ?? '' }}" 68 placeholder="Отчество" value="{{ old('surname2') ?? $user->surname2 ?? '' }}"
69 /> 69 />
70 @error('surname2') 70 @error('surname2')
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 </label><br> 75 </label><br>
76 76
77 <label class="block text-sm"> 77 <label class="block text-sm">
78 <span class="text-gray-700 dark:text-gray-400">Email</span> 78 <span class="text-gray-700 dark:text-gray-400">Email</span>
79 <input name="email" id="email" 79 <input name="email" id="email"
80 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 80 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
81 placeholder="Email" value="{{ old('email') ?? $user->email ?? '' }}" 81 placeholder="Email" value="{{ old('email') ?? $user->email ?? '' }}"
82 /> 82 />
83 @error('email') 83 @error('email')
84 <span class="text-xs text-red-600 dark:text-red-400"> 84 <span class="text-xs text-red-600 dark:text-red-400">
85 {{ $message }} 85 {{ $message }}
86 </span> 86 </span>
87 @enderror 87 @enderror
88 </label><br> 88 </label><br>
89 89
90 <label class="block text-sm"> 90 <label class="block text-sm">
91 <span class="text-gray-700 dark:text-gray-400">Телефон</span> 91 <span class="text-gray-700 dark:text-gray-400">Телефон</span>
92 <input name="telephone" id="telephone" 92 <input name="telephone" id="telephone"
93 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 93 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
94 placeholder="Телефон" value="{{ old('telephone') ?? $user->telephone ?? '' }}" 94 placeholder="Телефон" value="{{ old('telephone') ?? $user->telephone ?? '' }}"
95 /> 95 />
96 @error('telephone') 96 @error('telephone')
97 <span class="text-xs text-red-600 dark:text-red-400"> 97 <span class="text-xs text-red-600 dark:text-red-400">
98 {{ $message }} 98 {{ $message }}
99 </span> 99 </span>
100 @enderror 100 @enderror
101 </label><br> 101 </label><br>
102 102
103 <label class="block text-sm"> 103 <label class="block text-sm">
104 <span class="text-gray-700 dark:text-gray-400">Файл-анкета</span> 104 <span class="text-gray-700 dark:text-gray-400">Файл-анкета</span>
105 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 105 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
106 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple 106 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
107 dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 107 dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
108 id="file" name="file"> 108 id="file" name="file">
109 @error('file') 109 @error('file')
110 <span class="text-xs text-red-600 dark:text-red-400"> 110 <span class="text-xs text-red-600 dark:text-red-400">
111 {{ $message }} 111 {{ $message }}
112 </span> 112 </span>
113 @enderror 113 @enderror
114 @isset($user->file) 114 @isset($user->file)
115 <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">{{ $user->file }}</a> 115 <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">{{ $user->file }}</a>
116 @endisset 116 @endisset
117 </label><br> 117 </label><br>
118 118
119 <!--<label class="block text-sm"> 119 <!--<label class="block text-sm">
120 120
121 <input type="hidden" name="page_worker" value="0" /> 121 <input type="hidden" name="page_worker" value="0" />
122 <input name="page_worker" @php if (isset($user->workers->id)) echo "checked"; @endphp 122 <input name="page_worker" @php if (isset($user->workers->id)) echo "checked"; @endphp
123 class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " 123 class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray "
124 placeholder="" style="float:left; margin-right: 5px" type="checkbox" value="1" 124 placeholder="" style="float:left; margin-right: 5px" type="checkbox" value="1"
125 /><p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Анкета </p><br> 125 /><p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Анкета </p><br>
126 126
127 </label><br>--> 127 </label><br>-->
128 128
129 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> 129 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
130 <div> 130 <div>
131 <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> 131 <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
132 Сохранить 132 Сохранить
133 </button> 133 </button>
134 <a href="{{ route('admin.basedata') }}" 134 <a href="{{ route('admin.basedata') }}"
135 class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" 135 class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
136 style="display: -webkit-inline-box; height: 30px!important;" 136 style="display: -webkit-inline-box; height: 30px!important;"
137 >Назад</a> 137 >Назад</a>
138 </div> 138 </div>
139 </div> 139 </div>
140 </div> 140 </div>
141 141
142 <script> 142 <script>
143 $(function(){ 143 $(function(){
144 $('[name="positions_work[]"]').chosen({ 144 $('[name="positions_work[]"]').chosen({
145 no_results_text: 'Не добавлено ни одной должности.', 145 no_results_text: 'Не добавлено ни одной должности.',
146 width: '100%' 146 width: '100%'
147 }) 147 })
148 }); 148 });
149 </script> 149 </script>
150 150
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 $(document).ready(function(){ 5 $(document).ready(function(){
6 $('[name="job_title_list[]"]').chosen({ 6 $('[name="job_title_list[]"]').chosen({
7 width: '100%' 7 width: '100%'
8 }) 8 })
9 $('[name="job_titles__name"]').change(function(){ 9 $('[name="job_titles__name"]').change(function(){
10 if ($(this).is(':checked')){ 10 if ($(this).is(':checked')){
11 $(".job-title-list-wrap").css("display", "block"); 11 $(".job-title-list-wrap").css("display", "block");
12 } else { 12 } else {
13 $(".job-title-list-wrap").css("display", "none"); 13 $(".job-title-list-wrap").css("display", "none");
14 } 14 }
15 }); 15 });
16 $('.cabinet__export-button-wrap button').click(function(){ 16 $('.cabinet__export-button-wrap button').click(function(){
17 $('.cabinet__export-error').parent().remove(); 17 $('.cabinet__export-error').parent().remove();
18 }); 18 });
19 19
20 $('.search-reset-button').click(function(){ 20 $('.search-reset-button').click(function(){
21 var wrap = $(this).closest('.cabinet__filters'); 21 var wrap = $(this).closest('.cabinet__filters');
22 wrap.find('[name="search"]').val(''); 22 wrap.find('[name="search"]').val('');
23 wrap.find('button').click(); 23 wrap.find('button').click();
24 }); 24 });
25 }); 25 });
26 26
27 27
28 $(document).on('click', '.die_black', function() { 28 $(document).on('click', '.die_black', function() {
29 var this_ = $(this); 29 var this_ = $(this);
30 var ajax_ = $('#ajax_flot_div'); 30 var ajax_ = $('#ajax_flot_div');
31 var id_ = this_.attr('data-test'); 31 var id_ = this_.attr('data-test');
32 var url_ = this_.attr('data-link'); 32 var url_ = this_.attr('data-link');
33 33
34 console.log(url_); 34 console.log(url_);
35 $.ajax({ 35 $.ajax({
36 type: "GET", 36 type: "GET",
37 url: url_, 37 url: url_,
38 success: function (data) { 38 success: function (data) {
39 console.log('Ответка'); 39 console.log('Ответка');
40 ajax_.html(data); 40 ajax_.html(data);
41 }, 41 },
42 headers: { 42 headers: {
43 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 43 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
44 }, 44 },
45 error: function (data) { 45 error: function (data) {
46 console.log('Error: ' + data); 46 console.log('Error: ' + data);
47 } 47 }
48 }); 48 });
49 49
50 }); 50 });
51 </script> 51 </script>
52 @endsection 52 @endsection
53 53
54 @section('content') 54 @section('content')
55 <section class="cabinet"> 55 <section class="cabinet">
56 <div class="container"> 56 <div class="container">
57 <ul class="breadcrumbs cabinet__breadcrumbs"> 57 <ul class="breadcrumbs cabinet__breadcrumbs">
58 <li><a href="{{ route('index') }}">Главная</a></li> 58 <li><a href="{{ route('index') }}">Главная</a></li>
59 <li><b>Личный кабинет</b></li> 59 <li><b>Личный кабинет</b></li>
60 </ul> 60 </ul>
61 <div class="cabinet__wrapper"> 61 <div class="cabinet__wrapper">
62 <div class="cabinet__side"> 62 <div class="cabinet__side">
63 <div class="cabinet__side-toper"> 63 <div class="cabinet__side-toper">
64 @include('employers.emblema') 64 @include('employers.emblema')
65 </div> 65 </div>
66 @include('employers.menu', ['item' => 7]) 66 @include('employers.menu', ['item' => 7])
67 </div> 67 </div>
68 68
69 <div class="cabinet__body"> 69 <div class="cabinet__body">
70 <div class="cabinet__body-item"> 70 <div class="cabinet__body-item">
71 <h2 class="title cabinet__title">База данных</h2> 71 <h2 class="title cabinet__title">База данных</h2>
72 </div> 72 </div>
73 <div class="cabinet__body-item"> 73 <div class="cabinet__body-item">
74 <div class="cabinet__filters" style="display: flex;flex-direction: unset;justify-content: left;align-items: center;"> 74 <div class="cabinet__filters" style="display: flex;flex-direction: unset;justify-content: left;align-items: center;">
75 <div class="cabinet__filters-item"> 75 <div class="cabinet__filters-item">
76 <form class="search" action="{{ route('employer.bd') }}"> 76 <form class="search" action="{{ route('employer.bd') }}">
77 <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" value="@if (isset($_GET['search'])) {{ $_GET['search'] }} @endif"> 77 <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" value="@if (isset($_GET['search'])) {{ $_GET['search'] }} @endif">
78 <button type="submit" class="button">Найти</button> 78 <button type="submit" class="button">Найти</button>
79 <span> 79 <span>
80 <svg> 80 <svg>
81 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 81 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
82 </svg> 82 </svg>
83 </span> 83 </span>
84 </form> 84 </form>
85 </div> 85 </div>
86 <a href="javascript:void(0)" class="search-reset-button bold font18" style="color: #377d87;">Сбросить поиск</a> 86 <a href="javascript:void(0)" class="search-reset-button bold font18" style="color: #377d87;">Сбросить поиск</a>
87 </div> 87 </div>
88 <div class="cabinet__filters"> 88 <div class="cabinet__filters">
89 <div class="cabinet__export-wrap"> 89 <div class="cabinet__export-wrap">
90 <form action="{{ route('resume_download_all') }}" method="GET" target="_blank"> 90 <form action="{{ route('resume_download_all') }}" method="GET" target="_blank">
91 <div class="cabinet__export-button-wrap"> 91 <div class="cabinet__export-button-wrap">
92 <button type="submit" class="button"> 92 <button type="submit" class="button">
93 <svg> 93 <svg>
94 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 94 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
95 </svg> 95 </svg>
96 Экспорт 96 Экспорт
97 </button> 97 </button>
98 </div> 98 </div>
99 <div class="cabinet__export-options-wrap"> 99 <div class="cabinet__export-options-wrap">
100 @foreach ($export_options as $key => $value) 100 @foreach ($export_options as $key => $value)
101 <label class="checkbox"> 101 <label class="checkbox">
102 <input type="checkbox" value="1" name="{{$key}}" class="checkbox__input" checked=""> 102 <input type="checkbox" value="1" name="{{$key}}" class="checkbox__input" checked="">
103 <span class="checkbox__icon"> 103 <span class="checkbox__icon">
104 <svg> 104 <svg>
105 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 105 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
106 </svg> 106 </svg>
107 </span> 107 </span>
108 <span class="checkbox__text"> 108 <span class="checkbox__text">
109 <span>{{$value}}</span> 109 <span>{{$value}}</span>
110 </span> 110 </span>
111 </label> 111 </label>
112 @endforeach 112 @endforeach
113 </div> 113 </div>
114 <div class="job-title-list-wrap"> 114 <div class="job-title-list-wrap">
115 <select name="job_title_list[]" data-placeholder="Выберите должности" multiple > 115 <select name="job_title_list[]" data-placeholder="Выберите должности" multiple >
116 @foreach($jobs_titles as $job_title) 116 @foreach($jobs_titles as $job_title)
117 <option value="{{$job_title['id']}}">{{$job_title['name']}}</option> 117 <option hover="background-color: #377d87;" value="{{$job_title['id']}}">{{$job_title['name']}}</option>
118 @endforeach 118 @endforeach
119 </select> 119 </select>
120 </div> 120 </div>
121 </form> 121 </form>
122 </div> 122 </div>
123 </div> 123 </div>
124 @if(session('error')) 124 @if(session('error'))
125 <div class="cabinet__filters"> 125 <div class="cabinet__filters">
126 <p class="cabinet__export-error">{{ session('error') }}</p> 126 <p class="cabinet__export-error">{{ session('error') }}</p>
127 </div> 127 </div>
128 @endif 128 @endif
129 129
130 </div> 130 </div>
131 131
132 <div class="cabinet__body-item"> 132 <div class="cabinet__body-item">
133 <div class="cabinet__table-header"> 133 <div class="cabinet__table-header">
134 <div> 134 <div>
135 Позиции работников 135 Позиции работников
136 </div> 136 </div>
137 <span> 137 <span>
138 Пользователей найдено: 138 Пользователей найдено:
139 <b>{{ $count_users->count() }}</b> 139 <b>{{ $count_users->count() }}</b>
140 </span> 140 </span>
141 </div> 141 </div>
142 <div class="table table_spoiler"> 142 <div class="table table_spoiler">
143 143
144 <div class="table__scroll"> 144 <div class="table__scroll">
145 <div class="table__body table__body_min-width"> 145 <div class="table__body table__body_min-width">
146 <table> 146 <table>
147 <thead> 147 <thead>
148 <tr> 148 <tr>
149 <th>ФИО соискателя</th> 149 <th>ФИО соискателя</th>
150 <th>Должность</th> 150 <th>Должность</th>
151 <th>Наличие<br>анкеты</th> 151 <th>Наличие<br>анкеты</th>
152 </tr> 152 </tr>
153 </thead> 153 </thead>
154 <tbody> 154 <tbody>
155 @php 155 @php
156 $categories = 0; 156 $categories = 0;
157 157
158 @endphp 158 @endphp
159 159
160 @if ($users->count()) 160 @if ($users->count())
161 @foreach ($users as $key => $it) 161 @foreach ($users as $key => $it)
162 <tr> 162 <tr>
163 <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td> 163 <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td>
164 164
165 <td> 165 <td>
166 @if($it->workers[0]->positions_work) 166 @if($it->workers[0]->positions_work)
167 @foreach($it->workers[0]->jobs as $job) 167 @foreach($it->workers[0]->jobs as $job)
168 {{ $job->name }} 168 {{ $job->name }}
169 @if(!$loop->last) 169 @if(!$loop->last)
170 <br> 170 <br>
171 @endif 171 @endif
172 @endforeach 172 @endforeach
173 @endif 173 @endif
174 </td> 174 </td>
175 175
176 <td> 176 <td>
177 @if (isset($it->workers[0]->id)) 177 @if ($it->file !== null)
178 <a href="{{ route('resume_download', ['worker' => $it->workers[0]->id]) }}" class="table__link"> 178 <a href="{{ asset(Storage::url($it->file)) }}" class="table__link">
179 <svg> 179 <svg>
180 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 180 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
181 </svg> 181 </svg>
182 Скачать 182 Скачать
183 </a> 183 </a>
184 @endif 184 @endif
185 </td> 185 </td>
186 </tr> 186 </tr>
187 @endforeach 187 @endforeach
188 @endif 188 @endif
189 </tbody> 189 </tbody>
190 </table> 190 </table>
191 </div> 191 </div>
192 192
193 </div> 193 </div>
194 </div> 194 </div>
195 {{ $users->onEachSide(0)->appends($_GET)->links('paginate') }} 195 {{ $users->onEachSide(0)->appends($_GET)->links('paginate') }}
196 </div> 196 </div>
197 </div> 197 </div>
198 </div> 198 </div>
199 </div> 199 </div>
200 </section> 200 </section>
201 </div> 201 </div>
202 @endsection 202 @endsection
203 203
resources/views/employers/send_all.blade.php
1 @extends('layout.frontend', ['title' => 'Рассылка сообщений - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Рассылка сообщений - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('employers.emblema') 17 @include('employers.emblema')
18 </div> 18 </div>
19 19
20 @include('employers.menu', ['item' => 9]) 20 @include('employers.menu', ['item' => 9])
21 </div> 21 </div>
22 22
23 <form class="cabinet__body" action="{{ route('employer.send_all_post') }}" method="POST"> 23 <form class="cabinet__body" action="{{ route('employer.send_all_post') }}" method="POST">
24 @csrf 24 @csrf
25 <div class="cabinet__body-item"> 25 <div class="cabinet__body-item">
26 <div class="cabinet__descr"> 26 <div class="cabinet__descr">
27 <h2 class="title cabinet__title">Рассылка сообщений</h2> 27 <h2 class="title cabinet__title">Рассылка сообщений</h2>
28 @include('messages_error') 28 @include('messages_error')
29 </div> 29 </div>
30 </div> 30 </div>
31 31
32 <div class="cabinet__body-item"> 32 <div class="cabinet__body-item">
33 <div class="cabinet__inputs"> 33 <div class="cabinet__inputs">
34 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 34 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
35 <label class="form-group__label">Выберите должность</label> 35 <label class="form-group__label">Выберите должность</label>
36 <div class="form-group__item"> 36 <div class="form-group__item">
37 <div class="select"> 37 <div class="select">
38 <select class="js-select2" name="job_title_ids[]" id="job_title_ids[]" multiple="multiple"> 38 <select class="js-select2" name="job_title_ids[]" id="job_title_ids[]" multiple="multiple" required>
39 @if ($job_titles->count()) 39 @if ($job_titles->count())
40 @foreach($job_titles as $job_title) 40 @foreach($job_titles as $job_title)
41 <option value="{{ $job_title->id }}">{{ $job_title->name }}</option> 41 <option value="{{ $job_title->id }}">{{ $job_title->name }}</option>
42 @endforeach 42 @endforeach
43 @endif 43 @endif
44 </select> 44 </select>
45 </div> 45 </div>
46 </div> 46 </div>
47 </div> 47 </div>
48 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 48 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
49 <label class="form-group__label">Введите текст сообщения</label> 49 <label class="form-group__label">Введите текст сообщения</label>
50 <div class="form-group__item"> 50 <div class="form-group__item">
51 <textarea class="textarea" name="message_text" required>{{ old('message_text') ?? '' }}</textarea> 51 <textarea class="textarea" name="message_text" required>{{ old('message_text') ?? '' }}</textarea>
52 </div> 52 </div>
53 </div> 53 </div>
54 </div> 54 </div>
55 <button type="submit" class="button cabinet__submit">Отправить</button> 55 <button type="submit" class="button cabinet__submit">Отправить</button>
56 </div> 56 </div>
57 </form> 57 </form>
58 </div> 58 </div>
59 </div> 59 </div>
60 </section> 60 </section>
61 </div> 61 </div>
62 @endsection 62 @endsection
63 63
64 64
65 65
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 $(document).on('change', '#jobs', function() { 9 $(document).on('change', '#jobs', function() {
10 var val = $(this).val(); 10 var val = $(this).val();
11 var main_oskar = $('#main_ockar'); 11 var main_oskar = $('#main_ockar');
12 var ti_head = $('#title_head'); 12 var ti_head = $('#title_head');
13 13
14 console.log('Code='+val); 14 console.log('Code='+val);
15 console.log('Click change...'); 15 console.log('Click change...');
16 $.ajax({ 16 $.ajax({
17 type: "GET", 17 type: "GET",
18 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", 18 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}",
19 data: "job="+val, 19 data: "job="+val,
20 success: function (data) { 20 success: function (data) {
21 console.log('Выбор сделан!'); 21 console.log('Выбор сделан!');
22 22
23 main_oskar.html(data); 23 main_oskar.html(data);
24 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"); 24 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 }, 25 },
26 headers: { 26 headers: {
27 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 27 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
28 }, 28 },
29 error: function (data) { 29 error: function (data) {
30 data = JSON.stringify(data); 30 data = JSON.stringify(data);
31 console.log('Error: ' + data); 31 console.log('Error: ' + data);
32 } 32 }
33 }); 33 });
34 34
35 if ((val == '') || (val == '0')) { 35 if ((val == '') || (val == '0')) {
36 title_head.html('Все категории'); 36 title_head.html('Все категории');
37 } else { 37 } else {
38 $.ajax({ 38 $.ajax({
39 type: "GET", 39 type: "GET",
40 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif", 40 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif",
41 data: "job=" + val +"&title=1", 41 data: "job=" + val +"&title=1",
42 success: function (data) { 42 success: function (data) {
43 43
44 console.log(data); 44 console.log(data);
45 }, 45 },
46 46
47 headers: { 47 headers: {
48 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 48 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
49 }, 49 },
50 50
51 error: function (data) { 51 error: function (data) {
52 data = JSON.stringify(data); 52 data = JSON.stringify(data);
53 console.log('Error: ' + data); 53 console.log('Error: ' + data);
54 } 54 }
55 }); 55 });
56 56
57 } 57 }
58 }); 58 });
59 59
60 $(document).on('click', '.js_send_it_button', function() { 60 $(document).on('click', '.js_send_it_button', function() {
61 var this_ = $(this); 61 var this_ = $(this);
62 var code_user_id = this_.attr('data-uid'); 62 var code_user_id = this_.attr('data-uid');
63 var code_to_user_id = this_.attr('data-tuid'); 63 var code_to_user_id = this_.attr('data-tuid');
64 var code_vacancy = this_.attr('data-vacancy'); 64 var code_vacancy = this_.attr('data-vacancy');
65 var user_id = $('#_user_id'); 65 var user_id = $('#_user_id');
66 var to_user_id = $('#_to_user_id'); 66 var to_user_id = $('#_to_user_id');
67 var vacancy = $('#_vacancy'); 67 var vacancy = $('#_vacancy');
68 68
69 console.log('Клик на кнопки...'); 69 console.log('Клик на кнопки...');
70 70
71 user_id.val(code_user_id); 71 user_id.val(code_user_id);
72 to_user_id.val(code_to_user_id); 72 to_user_id.val(code_to_user_id);
73 vacancy.val(code_vacancy); 73 vacancy.val(code_vacancy);
74 }); 74 });
75 75
76 $(document).on('click', '.js_send_for_emp', function() { 76 $(document).on('click', '.js_send_for_emp', function() {
77 var this_ = $(this); 77 var this_ = $(this);
78 var code_user_id = this_.attr('data-uid'); 78 var code_user_id = this_.attr('data-uid');
79 var code_to_user_id = this_.attr('data-tuid'); 79 var code_to_user_id = this_.attr('data-tuid');
80 var code_vacancy = this_.attr('data-vacancy'); 80 var code_vacancy = this_.attr('data-vacancy');
81 var user_id = $('#send_user_id'); 81 var user_id = $('#send_user_id');
82 var to_user_id = $('#send_to_user_id'); 82 var to_user_id = $('#send_to_user_id');
83 var vacancy = $('#send_vacancy'); 83 var vacancy = $('#send_vacancy');
84 84
85 console.log('code_to_user_id='+code_to_user_id); 85 console.log('code_to_user_id='+code_to_user_id);
86 console.log('code_user_id='+code_user_id); 86 console.log('code_user_id='+code_user_id);
87 console.log('code_vacancy='+code_vacancy); 87 console.log('code_vacancy='+code_vacancy);
88 console.log('Клик на кнопке...'); 88 console.log('Клик на кнопке...');
89 89
90 user_id.val(code_user_id); 90 user_id.val(code_user_id);
91 to_user_id.val(code_to_user_id); 91 to_user_id.val(code_to_user_id);
92 vacancy.val(code_vacancy); 92 vacancy.val(code_vacancy);
93 }); 93 });
94 94
95 $(document).on('change', '#sort_ajax', function() { 95 $(document).on('change', '#sort_ajax', function() {
96 var this_ = $(this); 96 var this_ = $(this);
97 var val_ = this_.val(); 97 var val_ = this_.val();
98 console.log('sort items '+val_); 98 console.log('sort items '+val_);
99 99
100 $.ajax({ 100 $.ajax({
101 type: "GET", 101 type: "GET",
102 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", 102 url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}",
103 data: "sort="+val_+"&block=1", 103 data: "sort="+val_+"&block=1",
104 success: function (data) { 104 success: function (data) {
105 console.log('Выбор сортировки'); 105 console.log('Выбор сортировки');
106 console.log(data); 106 console.log(data);
107 $('#main_ockar').html(data); 107 $('#main_ockar').html(data);
108 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 108 history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
109 }, 109 },
110 headers: { 110 headers: {
111 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 111 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
112 }, 112 },
113 error: function (data) { 113 error: function (data) {
114 data = JSON.stringify(data); 114 data = JSON.stringify(data);
115 console.log('Error: ' + data); 115 console.log('Error: ' + data);
116 } 116 }
117 }); 117 });
118 }); 118 });
119 119
120 120
121 121
122 $(document).ready(function(){ 122 $(document).ready(function(){
123 var sel = $('#select2-sort_ajax-container'); 123 var sel = $('#select2-sort_ajax-container');
124 var key = getUrlParameter('sort'); 124 var key = getUrlParameter('sort');
125 console.log(sel); 125 console.log(sel);
126 console.log(key); 126 console.log(key);
127 127
128 if (key !=='') { 128 if (key !=='') {
129 console.log(key); 129 console.log(key);
130 switch (key) { 130 switch (key) {
131 case "default": sel.html('Сортировка (по умолчанию)'); break; 131 case "default": sel.html('Сортировка (по умолчанию)'); break;
132 case "name_up": sel.html('По имени (возрастание)'); break; 132 case "name_up": sel.html('По имени (возрастание)'); break;
133 case "name_down": sel.html('По дате (убывание)'); break; 133 case "name_down": sel.html('По дате (убывание)'); break;
134 case "created_at_up": sel.html('По дате (возрастание)'); break; 134 case "created_at_up": sel.html('По дате (возрастание)'); break;
135 case "created_at_down": sel.html('По дате (убывание)'); break; 135 case "created_at_down": sel.html('По дате (убывание)'); break;
136 } 136 }
137 137
138 } 138 }
139 }); 139 });
140 </script> 140 </script>
141 @include('js.favorite-vacancy-45') 141 @include('js.favorite-vacancy-45')
142 @endsection 142 @endsection
143 @section('content') 143 @section('content')
144 <section class="thing"> 144 <section class="thing">
145 <div class="container"> 145 <div class="container">
146 <form class="thing__body" action="{{ route('list-vacancies', ['categories' => (!empty($Name_categori)) ? $Name_categori[0]->id : '0']) }}" method="POST"> 146 <form class="thing__body" action="{{ route('list-vacancies', ['categories' => (!empty($Name_categori)) ? $Name_categori[0]->id : '0']) }}" method="POST">
147 <ul class="breadcrumbs thing__breadcrumbs"> 147 <ul class="breadcrumbs thing__breadcrumbs">
148 <li><a href="{{ route('index') }}">Главная</a></li> 148 <li><a href="{{ route('index') }}">Главная</a></li>
149 <li><a href="{{ route('vacancies') }}">Вакансии</a></li> 149 <li><a href="{{ route('vacancies') }}">Вакансии</a></li>
150 <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> 150 <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li>
151 </ul> 151 </ul>
152 <h1 class="thing__title">Вакансии</h1> 152 <h1 class="thing__title">Вакансии</h1>
153 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 153 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
154 существующих финансовых и административных условий.</p> 154 существующих финансовых и административных условий.</p>
155 <div class="select select_search thing__select"> 155 <div class="select select_search thing__select">
156 <div class="select__icon"> 156 <div class="select__icon">
157 <svg> 157 <svg>
158 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 158 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
159 </svg> 159 </svg>
160 </div> 160 </div>
161 <select class="js-select2" id="jobs" name="jobs"> 161 <select class="js-select2" id="jobs" name="jobs">
162 <option value="0" selected>Выберите должность</option> 162 <option value="0" selected>Выберите должность</option>
163 @if ($Job_title->count()) 163 @if ($Job_title->count())
164 @foreach($Job_title as $JT) 164 @foreach($Job_title as $JT)
165 <option value="{{ $JT->id }}" @if(isset($_GET['job']) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option> 165 <option value="{{ $JT->id }}" @if(isset($_GET['job']) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option>
166 @endforeach 166 @endforeach
167 @endif 167 @endif
168 </select> 168 </select>
169 </div> 169 </div>
170 </form> 170 </form>
171 </div> 171 </div>
172 </section> 172 </section>
173 <main class="main"> 173 <main class="main">
174 <div class="container"> 174 <div class="container">
175 <div class="main__vacancies" > 175 <div class="main__vacancies" >
176 @if (isset($Name_categori[0]->name)) 176 @if (isset($Name_categori[0]->name))
177 <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2> 177 <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2>
178 @else 178 @else
179 <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2> 179 <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2>
180 @endif 180 @endif
181 <div class="filters main__vacancies-filters"> 181 <div class="filters main__vacancies-filters">
182 <div class="filters__label" id="col-vo" name="col-vo">Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> 182 <div class="filters__label" id="col-vo" name="col-vo">Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div>
183 <div class="filters__body">
184 <div class="select filters__select">
185 <select class="js-select2" id="sort_ajax" name="sort_ajax">
186 <option value="default">Сортировка (по умолчанию)</option>
187 <option value="name_up">По имени (возрастание)</option>
188 <option value="name_down">По имени (убывание)</option>
189 <option value="created_at_up">По дате (возрастание)</option>
190 <option value="created_at_down">По дате (убывание)</option>
191 </select>
192 </div>
193 </div>
194 </div> 183 </div>
195 184
196 <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar"> 185 <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar">
197 @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp 186 @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp
198 187
199 @foreach ($Query as $Q) 188 @foreach ($Query as $Q)
200 @foreach ($Reclama as $Rec) 189 @foreach ($Reclama as $Rec)
201 @if ($Rec->position == $i) 190 @if ($Rec->position == $i)
202 <div class="main__vacancies-thing"> 191 <div class="main__vacancies-thing">
203 @if (!empty($Rec->image)) 192 @if (!empty($Rec->image))
204 <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> 193 <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic">
205 @else 194 @else
206 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> 195 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic">
207 @endif 196 @endif
208 <div class="main__vacancies-thing-body"> 197 <div class="main__vacancies-thing-body">
209 <h2>{{ $Rec->title }}</h2> 198 <h2>{{ $Rec->title }}</h2>
210 <div class="main__vacancies-thing-scroll"> 199 <div class="main__vacancies-thing-scroll">
211 {!! $Rec->text !!} 200 {!! $Rec->text !!}
212 </div> 201 </div>
213 <a href="{{ $Rec->link }}" class="button">Узнать больше</a> 202 <a href="{{ $Rec->link }}" class="button">Узнать больше</a>
214 </div> 203 </div>
215 </div> 204 </div>
216 @endif 205 @endif
217 @endforeach 206 @endforeach
218 <div class="main__vacancies-item main__employer-page-two-item" data-id="{{ $Q->id }}"> 207 <div class="main__vacancies-item main__employer-page-two-item" data-id="{{ $Q->id }}">
219 208
220 <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> 209 <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back">
221 <svg> 210 <svg>
222 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> 211 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use>
223 </svg> 212 </svg>
224 <span> 213 <span>
225 Вернуться к списку вакансий 214 Вернуться к списку вакансий
226 </span> 215 </span>
227 </a> 216 </a>
228 217
229 <div class="main__employer-page-two-item-toper"> 218 <div class="main__employer-page-two-item-toper">
230 @if (!empty($Q->employer->logo)) 219 @if (!empty($Q->employer->logo))
231 <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> 220 <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}">
232 @else 221 @else
233 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> 222 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic">
234 @endif 223 @endif
235 <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif</span> 224 <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif</span>
236 </div> 225 </div>
237 226
238 <div class="main__employer-page-two-item-text"> 227 <div class="main__employer-page-two-item-text">
239 <div class="main__employer-page-two-item-text-name"> 228 <div class="main__employer-page-two-item-text-name">
240 <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3> 229 <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3>
241 </div> 230 </div>
242 <!--Судоходная компания ведет набор 231 <!--Судоходная компания ведет набор
243 специалистов на следующие должности:</div> 232 специалистов на следующие должности:</div>
244 <div class="main__employer-page-two-item-text-links"> 233 <div class="main__employer-page-two-item-text-links">
245 if (isset($Q->jobs)) 234 if (isset($Q->jobs))
246 foreach ($Q->jobs as $key => $j) 235 foreach ($Q->jobs as $key => $j)
247 <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 рублей (на руки)--> 236 <a>“{ $j->name }}” <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)-->
248 <!-- </a> 237 <!-- </a>
249 endforeach 238 endforeach
250 endif 239 endif
251 </div>--> 240 </div>-->
252 </div> 241 </div>
253 242
254 <div class="main__employer-page-two-item-text"> 243 <div class="main__employer-page-two-item-text">
255 <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> 244 <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div>
256 <div class="main__employer-page-two-item-text-body"> 245 <div class="main__employer-page-two-item-text-body">
257 {!! $Q->text !!} 246 {!! $Q->text !!}
258 </div> 247 </div>
259 </div> 248 </div>
260 <!--<div class="main__employer-page-two-item-text"> 249 <!--<div class="main__employer-page-two-item-text">
261 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> 250 <div class="main__employer-page-two-item-text-name">Наши ожидания:</div>
262 <div class="main__employer-page-two-item-text-body"> 251 <div class="main__employer-page-two-item-text-body">
263 !! $Q->description !!} 252 !! $Q->description !!}
264 </div> 253 </div>
265 </div> 254 </div>
266 <div class="main__employer-page-two-item-text"> 255 <div class="main__employer-page-two-item-text">
267 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> 256 <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div>
268 <div class="main__employer-page-two-item-text-body"> 257 <div class="main__employer-page-two-item-text-body">
269 !! $Q->contacts_emails !!} 258 !! $Q->contacts_emails !!}
270 </div> 259 </div>
271 </div> 260 </div>
272 <div class="main__employer-page-two-item-text"> 261 <div class="main__employer-page-two-item-text">
273 <div class="main__employer-page-two-item-text-name">Или звоните:</div> 262 <div class="main__employer-page-two-item-text-name">Или звоните:</div>
274 <div class="main__employer-page-two-item-text-body"> 263 <div class="main__employer-page-two-item-text-body">
275 !! $Q->contacts_telephones !!} 264 !! $Q->contacts_telephones !!}
276 </div> 265 </div>
277 </div>--> 266 </div>-->
278 267
279 <div class="main__employer-page-two-item-tags"> 268 <div class="main__employer-page-two-item-tags">
280 @if (!empty($Q->jobs_code[0]->position_ship)) 269 @if (!empty($Q->jobs_code[0]->position_ship))
281 <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> 270 <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span>
282 @else 271 @else
283 @if (isset($Q->jobs)) 272 @if (isset($Q->jobs))
284 @foreach ($Q->jobs as $key => $j) 273 @foreach ($Q->jobs as $key => $j)
285 <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> 274 <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span>
286 @endforeach 275 @endforeach
287 @endif 276 @endif
288 @endif 277 @endif
289 </div> 278 </div>
290 <div class="main__employer-page-two-item-buttons"> 279 <div class="main__employer-page-two-item-buttons">
291 @guest 280 @guest
292 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' 281 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
293 class="button main__employer-page-two-item-button">Откликнуться</button> 282 class="button main__employer-page-two-item-button">Откликнуться</button>
294 @else 283 @else
295 @if (App\Classes\StatusUser::Status()==1) 284 @if (App\Classes\StatusUser::Status()==1)
296 <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}' 285 <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}'
297 class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> 286 class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button>
298 @else 287 @else
299 <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}' 288 <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}'
300 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> 289 class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button>
301 @endif 290 @endif
302 @endguest 291 @endguest
303 <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> 292 <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a>
304 </div> 293 </div>
305 <div class="main__employer-page-two-item-bottom"> 294 <div class="main__employer-page-two-item-bottom">
306 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y', strtotime($Q->updated_at)) }}</div> 295 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y', strtotime($Q->updated_at)) }}</div>
307 <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) }}"> 296 <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}">
308 <svg> 297 <svg>
309 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 298 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
310 </svg> 299 </svg>
311 </button> 300 </button>
312 </div> 301 </div>
313 </div> 302 </div>
314 @php $i++ @endphp 303 @php $i++ @endphp
315 @endforeach 304 @endforeach
316 <div style="margin-top: 20px"> 305 <div style="margin-top: 20px">
317 {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }} 306 {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }}
318 </div><!-- конец --> 307 </div><!-- конец -->
319 308
320 </div> 309 </div>
321 </div> 310 </div>
322 </div> 311 </div>
323 </main> 312 </main>
324 @endsection 313 @endsection
325 314
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\EducationController as EducationFrontController; 9 use App\Http\Controllers\EducationController as EducationFrontController;
10 use App\Http\Controllers\Admin\EmployersController; 10 use App\Http\Controllers\Admin\EmployersController;
11 use App\Http\Controllers\EmployerController as FrontEmployersController; 11 use App\Http\Controllers\EmployerController as FrontEmployersController;
12 use App\Http\Controllers\Admin\InfoBloksController; 12 use App\Http\Controllers\Admin\InfoBloksController;
13 use App\Http\Controllers\Admin\JobTitlesController; 13 use App\Http\Controllers\Admin\JobTitlesController;
14 use App\Http\Controllers\Admin\UsersController; 14 use App\Http\Controllers\Admin\UsersController;
15 use App\Http\Controllers\Admin\WorkersController; 15 use App\Http\Controllers\Admin\WorkersController;
16 use App\Http\Controllers\Auth\ForgotPasswordController; 16 use App\Http\Controllers\Auth\ForgotPasswordController;
17 use App\Http\Controllers\Auth\LoginController; 17 use App\Http\Controllers\Auth\LoginController;
18 use App\Http\Controllers\Auth\RegisterController; 18 use App\Http\Controllers\Auth\RegisterController;
19 use App\Http\Controllers\CKEditorController; 19 use App\Http\Controllers\CKEditorController;
20 use App\Http\Controllers\FaqController; 20 use App\Http\Controllers\FaqController;
21 use App\Http\Controllers\MediaController; 21 use App\Http\Controllers\MediaController;
22 use App\Http\Controllers\WorkerController; 22 use App\Http\Controllers\WorkerController;
23 use App\Models\Ad_jobs; 23 use App\Models\Ad_jobs;
24 use App\Models\User; 24 use App\Models\User;
25 use App\Http\Controllers\MainController; 25 use App\Http\Controllers\MainController;
26 use App\Http\Controllers\HomeController; 26 use App\Http\Controllers\HomeController;
27 use Illuminate\Support\Facades\Route; 27 use Illuminate\Support\Facades\Route;
28 use App\Http\Controllers\Admin\CompanyController; 28 use App\Http\Controllers\Admin\CompanyController;
29 use App\Http\Controllers\Admin\Ad_EmployersController; 29 use App\Http\Controllers\Admin\Ad_EmployersController;
30 use App\Http\Controllers\Admin\MsgAnswersController; 30 use App\Http\Controllers\Admin\MsgAnswersController;
31 use App\Http\Controllers\Admin\GroupsController; 31 use App\Http\Controllers\Admin\GroupsController;
32 use App\Http\Controllers\PagesController; 32 use App\Http\Controllers\PagesController;
33 use Illuminate\Support\Facades\Storage; 33 use Illuminate\Support\Facades\Storage;
34 use App\Http\Controllers\EmployerController; 34 use App\Http\Controllers\EmployerController;
35 use App\Http\Controllers\CompanyController as FrontCompanyController; 35 use App\Http\Controllers\CompanyController as FrontCompanyController;
36 36
37 37
38 /* 38 /*
39 |-------------------------------------------------------------------------- 39 |--------------------------------------------------------------------------
40 | Web Routes 40 | Web Routes
41 |-------------------------------------------------------------------------- 41 |--------------------------------------------------------------------------
42 | 42 |
43 | Here is where you can register web routes for your application. These 43 | Here is where you can register web routes for your application. These
44 | routes are loaded by the RouteServiceProvider within a group which 44 | routes are loaded by the RouteServiceProvider within a group which
45 | contains the "web" middleware group. Now create something great! 45 | contains the "web" middleware group. Now create something great!
46 | 46 |
47 */ 47 */
48 /* 48 /*
49 Route::get('/', function () { 49 Route::get('/', function () {
50 return view('welcome'); 50 return view('welcome');
51 })->name('index'); 51 })->name('index');
52 */ 52 */
53 53
54 Route::get('/', [MainController::class, 'index'])->name('index'); 54 Route::get('/', [MainController::class, 'index'])->name('index');
55 55
56 //Роуты авторизации, регистрации, восстановления, аутентификации 56 //Роуты авторизации, регистрации, восстановления, аутентификации
57 Auth::routes(['verify' => true]); 57 Auth::routes(['verify' => true]);
58 58
59 // роуты регистрации, авторизации, восстановления пароля, верификации почты 59 // роуты регистрации, авторизации, восстановления пароля, верификации почты
60 /*Route::group([ 60 /*Route::group([
61 'as' => 'auth.', //имя маршрута, например auth.index 61 'as' => 'auth.', //имя маршрута, например auth.index
62 'prefix' => 'auth', // префикс маршрута, например, auth/index 62 'prefix' => 'auth', // префикс маршрута, например, auth/index
63 ], function () { 63 ], function () {
64 //форма регистрации 64 //форма регистрации
65 Route::get('register', [RegisterController::class, 'register'])->name('register'); 65 Route::get('register', [RegisterController::class, 'register'])->name('register');
66 66
67 //создание пользователя 67 //создание пользователя
68 Route::post('register', [RegisterController::class, 'create'])->name('create'); 68 Route::post('register', [RegisterController::class, 'create'])->name('create');
69 69
70 //форма входа авторизации 70 //форма входа авторизации
71 Route::get('login', [LoginController::class, 'login'])->name('login'); 71 Route::get('login', [LoginController::class, 'login'])->name('login');
72 72
73 //аутентификация 73 //аутентификация
74 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 74 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
75 75
76 //выход 76 //выход
77 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 77 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
78 78
79 //форма ввода адреса почты 79 //форма ввода адреса почты
80 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 80 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
81 81
82 //письмо на почту 82 //письмо на почту
83 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 83 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
84 84
85 //форма восстановления пароля 85 //форма восстановления пароля
86 Route::get('reset-password/token/{token}/email/{email}', 86 Route::get('reset-password/token/{token}/email/{email}',
87 [ResetPasswordController::class, 'form'] 87 [ResetPasswordController::class, 'form']
88 )->name('reset-form'); 88 )->name('reset-form');
89 89
90 //восстановление пароля 90 //восстановление пароля
91 Route::post('reset-password', 91 Route::post('reset-password',
92 [ResetPasswordController::class, 'reset'] 92 [ResetPasswordController::class, 'reset']
93 )->name('reset-password'); 93 )->name('reset-password');
94 94
95 //сообщение о необходимости проверки адреса почты 95 //сообщение о необходимости проверки адреса почты
96 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 96 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
97 97
98 //подтверждение адреса почты нового пользователя 98 //подтверждение адреса почты нового пользователя
99 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 99 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
100 ->where('token', '[a-f0-9]{32}') 100 ->where('token', '[a-f0-9]{32}')
101 ->where('id', '[0-9]+') 101 ->where('id', '[0-9]+')
102 ->name('verify-email'); 102 ->name('verify-email');
103 });*/ 103 });*/
104 104
105 //Личный кабинет пользователя 105 //Личный кабинет пользователя
106 Route::get('/home', [HomeController::class, 'index'])->name('home'); 106 Route::get('/home', [HomeController::class, 'index'])->name('home');
107 107
108 /* 108 /*
109 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 109 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
110 $user = User::where('email',$request->input('email'))->first(); 110 $user = User::where('email',$request->input('email'))->first();
111 111
112 $user->sendEmailVerificationNotification(); 112 $user->sendEmailVerificationNotification();
113 113
114 return 'your response'; 114 return 'your response';
115 })->middleware('throttle:6,1')->name('verification.resend'); 115 })->middleware('throttle:6,1')->name('verification.resend');
116 */ 116 */
117 117
118 // Авторизация, регистрация в админку 118 // Авторизация, регистрация в админку
119 Route::group([ 119 Route::group([
120 'as' => 'admin.', // имя маршрута, например auth.index 120 'as' => 'admin.', // имя маршрута, например auth.index
121 'prefix' => 'admin', // префикс маршрута, например auth/index 121 'prefix' => 'admin', // префикс маршрута, например auth/index
122 'middleware' => ['guest'], 122 'middleware' => ['guest'],
123 ], function () { 123 ], function () {
124 // Форма регистрации 124 // Форма регистрации
125 Route::get('register', [AdminController::class, 'register'])->name('register'); 125 Route::get('register', [AdminController::class, 'register'])->name('register');
126 // Создание пользователя 126 // Создание пользователя
127 Route::post('register', [AdminController::class, 'create'])->name('create'); 127 Route::post('register', [AdminController::class, 'create'])->name('create');
128 128
129 //Форма входа 129 //Форма входа
130 Route::get('login', [AdminController::class, 'login'])->name('login'); 130 Route::get('login', [AdminController::class, 'login'])->name('login');
131 131
132 // аутентификация 132 // аутентификация
133 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 133 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
134 134
135 }); 135 });
136 136
137 // Личный кабинет админки 137 // Личный кабинет админки
138 Route::group([ 138 Route::group([
139 'as' => 'admin.', // имя маршрута, например auth.index 139 'as' => 'admin.', // имя маршрута, например auth.index
140 'prefix' => 'admin', // префикс маршрута, например auth/index 140 'prefix' => 'admin', // префикс маршрута, например auth/index
141 'middleware' => ['auth', 'admin'], 141 'middleware' => ['auth', 'admin'],
142 ], function() { 142 ], function() {
143 143
144 // выход 144 // выход
145 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 145 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
146 146
147 // кабинет главная страница 147 // кабинет главная страница
148 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 148 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
149 Route::get('/', function () {
150 return redirect()->route('admin.index');
151 });
149 152
150 // кабинет профиль админа - форма 153 // кабинет профиль админа - форма
151 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 154 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
152 // кабинет профиль админа - сохранение формы 155 // кабинет профиль админа - сохранение формы
153 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 156 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
154 157
155 //кабинет сообщения админа 158 //кабинет сообщения админа
156 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 159 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
157 160
158 161
159 // кабинет профиль - форма пароли 162 // кабинет профиль - форма пароли
160 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 163 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
161 // кабинет профиль - сохранение формы пароля 164 // кабинет профиль - сохранение формы пароля
162 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 165 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
163 166
164 167
165 // кабинет профиль пользователя - форма 168 // кабинет профиль пользователя - форма
166 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 169 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
167 // кабинет профиль пользователя - сохранение формы 170 // кабинет профиль пользователя - сохранение формы
168 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 171 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
169 172
170 // кабинет профиль работодатель - форма 173 // кабинет профиль работодатель - форма
171 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 174 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
172 // кабинет профиль работодатель - сохранение формы 175 // кабинет профиль работодатель - сохранение формы
173 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 176 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
174 // кабинет удаление профиль работодателя и юзера 177 // кабинет удаление профиль работодателя и юзера
175 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 178 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
176 179
177 // кабинет профиль работник - форма 180 // кабинет профиль работник - форма
178 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 181 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
179 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 182 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
180 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 183 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
181 // кабинет профиль работник - сохранение формы 184 // кабинет профиль работник - сохранение формы
182 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 185 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
183 186
184 // Медиа 187 // Медиа
185 Route::get('media', [MediaController::class, 'index'])->name('media'); 188 Route::get('media', [MediaController::class, 'index'])->name('media');
186 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 189 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
187 190
188 // кабинет настройки сайта - форма 191 // кабинет настройки сайта - форма
189 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 192 Route::get('config', [AdminController::class, 'config_form'])->name('config');
190 // кабинет настройки сайта сохранение формы 193 // кабинет настройки сайта сохранение формы
191 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 194 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
192 195
193 // кабинет - новости 196 // кабинет - новости
194 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); 197 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin');
195 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); 198 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add');
196 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); 199 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add');
197 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); 200 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit');
198 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); 201 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update');
199 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); 202 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete');
200 203
201 // кабинет - пользователи 204 // кабинет - пользователи
202 Route::get('users', [UsersController::class, 'index'])->name('users'); 205 Route::get('users', [UsersController::class, 'index'])->name('users');
203 Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete'); 206 Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete');
204 207
205 // кабинет - пользователи 208 // кабинет - пользователи
206 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 209 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
207 210
208 // кабинет - работодатели 211 // кабинет - работодатели
209 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 212 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
210 213
211 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 214 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
212 215
213 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 216 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
214 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 217 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
215 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 218 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
216 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 219 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
217 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 220 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
218 221
219 // кабинет - соискатели 222 // кабинет - соискатели
220 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 223 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
221 224
222 // кабинет - база данных 225 // кабинет - база данных
223 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 226 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
224 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 227 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
225 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 228 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
226 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 229 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
227 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 230 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
228 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 231 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
229 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 232 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
230 233
231 // кабинет - вакансии 234 // кабинет - вакансии
232 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 235 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
233 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 236 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
234 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 237 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
235 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 238 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
236 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 239 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
237 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 240 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
238 241
239 // Редактирование должности в вакансии 242 // Редактирование должности в вакансии
240 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 243 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
241 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 244 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
242 245
243 246
244 // кабинет - категории 247 // кабинет - категории
245 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 248 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
246 249
247 // СRUD-операции над Справочником Категории 250 // СRUD-операции над Справочником Категории
248 251
249 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 252 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
250 253
251 // CRUD-операции над справочником Категории для работодателей 254 // CRUD-операции над справочником Категории для работодателей
252 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 255 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
253 256
254 // CRUD-операции над справочником Образование 257 // CRUD-операции над справочником Образование
255 Route::resource('education', EducationController::class, ['except' => ['show']]); 258 Route::resource('education', EducationController::class, ['except' => ['show']]);
256 259
257 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 260 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
258 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 261 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
259 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 262 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
260 263
261 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 264 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
262 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 265 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
263 266
264 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 267 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
265 268
266 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 269 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
267 /* 270 /*
268 * кабинет - CRUD-операции по справочнику должности 271 * кабинет - CRUD-операции по справочнику должности
269 * 272 *
270 */ 273 */
271 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 274 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
272 275
273 // кабинет - сообщения (чтение чужих) 276 // кабинет - сообщения (чтение чужих)
274 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 277 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
275 // кабинет - просмотр сообщения чужого (чтение) 278 // кабинет - просмотр сообщения чужого (чтение)
276 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 279 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
277 280
278 // кабинет - сообщения (админские) 281 // кабинет - сообщения (админские)
279 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 282 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
280 // кабинет - сообщения (админские) 283 // кабинет - сообщения (админские)
281 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 284 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
282 // кабинет - sql - конструкция запросов 285 // кабинет - sql - конструкция запросов
283 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 286 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
284 287
285 Route::post('admin-reject-message', [MsgAnswersController::class, 'reject_message'])->name('reject_message'); 288 Route::post('admin-reject-message', [MsgAnswersController::class, 'reject_message'])->name('reject_message');
286 Route::post('admin-send-message', [MsgAnswersController::class, 'send_message'])->name('send_message'); 289 Route::post('admin-send-message', [MsgAnswersController::class, 'send_message'])->name('send_message');
287 290
288 /* 291 /*
289 * Расписанный подход в описании каждой директорий групп пользователей. 292 * Расписанный подход в описании каждой директорий групп пользователей.
290 */ 293 */
291 // кабинет - группы пользователей 294 // кабинет - группы пользователей
292 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 295 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
293 // кабинет - добавление форма группы пользователей 296 // кабинет - добавление форма группы пользователей
294 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 297 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
295 // кабинет - сохранение формы группы пользователей 298 // кабинет - сохранение формы группы пользователей
296 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 299 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
297 // кабинет - редактирование форма группы пользователей 300 // кабинет - редактирование форма группы пользователей
298 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 301 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
299 // кабинет - сохранение редактированной формы группы пользователей 302 // кабинет - сохранение редактированной формы группы пользователей
300 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 303 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
301 // кабинет - удаление группы пользователей 304 // кабинет - удаление группы пользователей
302 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 305 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
303 306
304 307
305 // кабинет - список админов 308 // кабинет - список админов
306 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 309 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
307 310
308 // справочник Позиции 311 // справочник Позиции
309 Route::get('positions', [AdminController::class, 'position'])->name('position'); 312 Route::get('positions', [AdminController::class, 'position'])->name('position');
310 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); 313 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position');
311 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); 314 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position');
312 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); 315 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position');
313 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); 316 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position');
314 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); 317 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position');
315 318
316 /////редактор////// кабинет - редактор сайта//////////////////////// 319 /////редактор////// кабинет - редактор сайта////////////////////////
317 Route::get('editor-site', function() { 320 Route::get('editor-site', function() {
318 return view('admin.editor.index'); 321 return view('admin.editor.index');
319 })->name('editor-site'); 322 })->name('editor-site');
320 323
321 324
322 // кабинет - редактор шапки-футера сайта 325 // кабинет - редактор шапки-футера сайта
323 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 326 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
324 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 327 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
325 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 328 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
326 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 329 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
327 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 330 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
328 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 331 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
329 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 332 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
330 333
331 334
332 // кабинет - редактор должности на главной 335 // кабинет - редактор должности на главной
333 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 336 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
334 337
335 // кабинет - счетчики на главной 338 // кабинет - счетчики на главной
336 Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main'); 339 Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main');
337 Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update'); 340 Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update');
338 341
339 // кабинет - редактор работодатели на главной 342 // кабинет - редактор работодатели на главной
340 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 343 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
341 Route::post('employers-main-add', [CompanyController::class, 'employers_main_add'])->name('employers-main-add'); 344 Route::post('employers-main-add', [CompanyController::class, 'employers_main_add'])->name('employers-main-add');
342 Route::post('employers-main-remove', [CompanyController::class, 'employers_main_remove'])->name('employers-main-remove'); 345 Route::post('employers-main-remove', [CompanyController::class, 'employers_main_remove'])->name('employers-main-remove');
343 346
344 347
345 // кабинет - редактор seo-сайта 348 // кабинет - редактор seo-сайта
346 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 349 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
347 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 350 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
348 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 351 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
349 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 352 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
350 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 353 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
351 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 354 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
352 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 355 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
353 356
354 357
355 // кабинет - редактор страниц 358 // кабинет - редактор страниц
356 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 359 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
357 // кабинет - добавление страницы 360 // кабинет - добавление страницы
358 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 361 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
359 // кабинет - сохранение формы страницы 362 // кабинет - сохранение формы страницы
360 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 363 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
361 // кабинет - редактирование форма страницы 364 // кабинет - редактирование форма страницы
362 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 365 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
363 // кабинет - сохранение редактированной формы страницы 366 // кабинет - сохранение редактированной формы страницы
364 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 367 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
365 // кабинет - удаление страницы 368 // кабинет - удаление страницы
366 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 369 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
367 370
368 371
369 // кабинет - реклама сайта 372 // кабинет - реклама сайта
370 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 373 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
371 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 374 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
372 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 375 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
373 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 376 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
374 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 377 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
375 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 378 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
376 //////////////////////////////////////////////////////////////////////// 379 ////////////////////////////////////////////////////////////////////////
377 380
378 381
379 // кабинет - отзывы о работодателе для модерации 382 // кабинет - отзывы о работодателе для модерации
380 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 383 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
381 384
382 // Общая страница статистики 385 // Общая страница статистики
383 Route::get('statics', function () { 386 Route::get('statics', function () {
384 return view('admin.static.index'); 387 return view('admin.static.index');
385 })->name('statics'); 388 })->name('statics');
386 389
387 // кабинет - статистика работников 390 // кабинет - статистика работников
388 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 391 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
389 392
390 // кабинет - статистика вакансий работодателя 393 // кабинет - статистика вакансий работодателя
391 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 394 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
392 395
393 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 396 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
394 /* 397 /*
395 * CRUD-операции над справочником дипломы и документы 398 * CRUD-операции над справочником дипломы и документы
396 */ 399 */
397 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 400 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
398 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 401 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
399 402
400 // кабинет - роли пользователя 403 // кабинет - роли пользователя
401 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 404 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
402 405
403 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 406 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
404 407
405 Route::get('logs', function() { 408 Route::get('logs', function() {
406 $files = Storage::files('logs/laravel.log'); 409 $files = Storage::files('logs/laravel.log');
407 })->name('logs'); 410 })->name('logs');
408 411
409 Route::prefix('faq')->as('faq.')->group(function () { 412 Route::prefix('faq')->as('faq.')->group(function () {
410 Route::middleware('admin')->group(function () { 413 Route::middleware('admin')->group(function () {
411 Route::get('/', [FaqController::class, 'showListForAdmin'])->name('list'); 414 Route::get('/', [FaqController::class, 'showListForAdmin'])->name('list');
412 Route::get('/create', [FaqController::class, 'create'])->name('create'); 415 Route::get('/create', [FaqController::class, 'create'])->name('create');
413 Route::post('/create', [FaqController::class, 'store'])->name('store'); 416 Route::post('/create', [FaqController::class, 'store'])->name('store');
414 Route::get('/edit/{id}', [FaqController::class, 'edit'])->name('edit'); 417 Route::get('/edit/{id}', [FaqController::class, 'edit'])->name('edit');
415 Route::put('/edit/{id}', [FaqController::class, 'update'])->name('update'); 418 Route::put('/edit/{id}', [FaqController::class, 'update'])->name('update');
416 Route::get('/destroy/{id}', [FaqController::class, 'destroy'])->name('destroy'); 419 Route::get('/destroy/{id}', [FaqController::class, 'destroy'])->name('destroy');
417 }); 420 });
418 }); 421 });
419 }); 422 });
420 423
421 // Инструментальные страницы 424 // Инструментальные страницы
422 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 425 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
423 426
424 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 427 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
425 428
426 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 429 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
427 430
428 // Страницы с произвольным контентом 431 // Страницы с произвольным контентом
429 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 432 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
430 433
431 // Форма обратной связи 434 // Форма обратной связи
432 Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback'); 435 Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback');
433 436
434 // Публичные страницы соискателя 437 // Публичные страницы соискателя
435 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 438 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
436 439
437 //Страница вакансии 440 //Страница вакансии
438 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 441 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
439 442
440 //Вакансии 443 //Вакансии
441 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 444 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
442 445
443 //Вакансии поиск на главной 446 //Вакансии поиск на главной
444 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 447 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
445 448
446 //Вакансии категория детальная 449 //Вакансии категория детальная
447 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 450 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
448 451
449 // Лайк вакансии 452 // Лайк вакансии
450 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); 453 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy');
451 454
452 //Детальная страница вакансии - работодателя 455 //Детальная страница вакансии - работодателя
453 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 456 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
454 457
455 //Судоходные компании 458 //Судоходные компании
456 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 459 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
457 460
458 //Детальная инфа о компании 461 //Детальная инфа о компании
459 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 462 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
460 463
461 //Образование 464 //Образование
462 Route::get('education', [EducationFrontController::class, 'index'])->name('education'); 465 Route::get('education', [EducationFrontController::class, 'index'])->name('education');
463 Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');; 466 Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');;
464 467
465 //Новости 468 //Новости
466 Route::get('news', [MainController::class, 'news'])->name('news'); 469 Route::get('news', [MainController::class, 'news'])->name('news');
467 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); 470 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new');
468 471
469 //Контакты 472 //Контакты
470 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 473 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
471 474
472 //База резюме 475 //База резюме
473 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 476 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
474 Route::get('bd_resume_danger', function(){ 477 Route::get('bd_resume_danger', function(){
475 return view('employers.bd_resume_danger'); 478 return view('employers.bd_resume_danger');
476 })->name('bd_resume_danger'); 479 })->name('bd_resume_danger');
477 480
478 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); 481 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
479 482
480 //Анкета соискателя 483 //Анкета соискателя
481 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 484 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
482 485
483 //Скачать резюме 486 //Скачать резюме
484 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 487 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
485 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); 488 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2');
486 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); 489 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all');
487 490
488 491
489 //Вход в кабинет 492 //Вход в кабинет
490 Route::get('login', [MainController::class, 'input_login'])->name('login'); 493 Route::get('login', [MainController::class, 'input_login'])->name('login');
491 494
492 // Выход из кабинета 495 // Выход из кабинета
493 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 496 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
494 497
495 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 498 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
496 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 499 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
497 500
498 //восстановление пароля 501 //восстановление пароля
499 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); 502 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
500 // Звезда сообщения 503 // Звезда сообщения
501 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); 504 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
502 505
503 // Борьба 506 // Борьба
504 Route::get('clear_cookie', function() { 507 Route::get('clear_cookie', function() {
505 \App\Classes\Cookies_vacancy::clear_vacancy(); 508 \App\Classes\Cookies_vacancy::clear_vacancy();
506 return redirect()->route('index'); 509 return redirect()->route('index');
507 })->name('clear_cookie'); 510 })->name('clear_cookie');
508 511
509 Route::get('cookies', function() { 512 Route::get('cookies', function() {
510 return view('cookies'); 513 return view('cookies');
511 })->name('cookies'); 514 })->name('cookies');
512 515
513 // Личный кабинет работник 516 // Личный кабинет работник
514 Route::group([ 517 Route::group([
515 'as' => 'worker.', // имя маршрута, например auth.index 518 'as' => 'worker.', // имя маршрута, например auth.index
516 'prefix' => 'worker', // префикс маршрута, например auth/index 519 'prefix' => 'worker', // префикс маршрута, например auth/index
517 'middleware' => ['auth', 'is_worker'], 520 'middleware' => ['auth', 'is_worker'],
518 ], function() { 521 ], function() {
519 // Формы редактирования 522 // Формы редактирования
520 Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information'); 523 Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information');
521 Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents'); 524 Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents');
522 525
523 // 1 страница - Моя анкета 526 // 1 страница - Моя анкета
524 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 527 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
525 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 528 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
526 Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto'); 529 Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto');
527 530
528 531
529 // 2 страница - Сообщения 532 // 2 страница - Сообщения
530 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 533 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
531 Route::get('cabinet/dialog/{chat}', [WorkerController::class, 'dialog'])->name('dialog'); 534 Route::get('cabinet/dialog/{chat}', [WorkerController::class, 'dialog'])->name('dialog');
532 // 3 страница - Избранные вакансии 535 // 3 страница - Избранные вакансии
533 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 536 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
534 // Продолжение борьбы против колорадов - избранные вакансии 537 // Продолжение борьбы против колорадов - избранные вакансии
535 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 538 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
536 539
537 // 4 страница - Сменить пароль 540 // 4 страница - Сменить пароль
538 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 541 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
539 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); 542 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
540 543
541 // 5 страница - Удалить профиль 544 // 5 страница - Удалить профиль
542 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 545 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
543 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); 546 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
544 547
545 // Резюме -pdf 548 // Резюме -pdf
546 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 549 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
547 550
548 // Поднятие анкеты 551 // Поднятие анкеты
549 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 552 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
550 553
551 Route::post('test123', [WorkerController::class, 'test123'])->name('test123'); 554 Route::post('test123', [WorkerController::class, 'test123'])->name('test123');
552 555
553 // Добавление сертификата 556 // Добавление сертификата
554 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); 557 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate');
555 Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 558 Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
556 Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); 559 Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate');
557 Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); 560 Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate');
558 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); 561 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
559 562
560 // Добавление предыдущих контактов компании 563 // Добавление предыдущих контактов компании
561 Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); 564 Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company');
562 Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); 565 Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company');
563 Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); 566 Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company');
564 Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); 567 Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company');
565 Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); 568 Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company');
566 569
567 // Добавление документа-диплома 570 // Добавление документа-диплома
568 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); 571 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
569 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); 572 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
570 Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms'); 573 Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms');
571 Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); 574 Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom');
572 575
573 // Добавление стандартного диплома 576 // Добавление стандартного диплома
574 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); 577 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
575 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); 578 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
576 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); 579 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
577 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); 580 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
578 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); 581 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
579 582
580 // Отправка сообщения работодателю от соискателя 583 // Отправка сообщения работодателю от соискателя
581 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); 584 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
582 }); 585 });
583 586
584 // Личный кабинет работодателя 587 // Личный кабинет работодателя
585 Route::group([ 588 Route::group([
586 'as' => 'employer.', // имя маршрута, например auth.index 589 'as' => 'employer.', // имя маршрута, например auth.index
587 'prefix' => 'employer', // префикс маршрута, например auth/index 590 'prefix' => 'employer', // префикс маршрута, например auth/index
588 'middleware' => ['auth', 'is_employer'], 591 'middleware' => ['auth', 'is_employer'],
589 ], function() { 592 ], function() {
590 // 0 страница - Личные данные работодателя 593 // 0 страница - Личные данные работодателя
591 Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); 594 Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info');
592 Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); 595 Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save');
593 596
594 // 1 страница - Профиль 597 // 1 страница - Профиль
595 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 598 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
596 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 599 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
597 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 600 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
598 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 601 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
599 Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); 602 Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot');
600 Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); 603 Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save');
601 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); 604 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
602 605
603 // 2 страница - Добавление вакансий 606 // 2 страница - Добавление вакансий
604 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 607 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
605 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 608 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
606 //Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 609 //Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
607 610
608 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger'); 611 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger');
609 612
610 613
611 614
612 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 615 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
613 616
614 // 3 страница - Мои вакансии 617 // 3 страница - Мои вакансии
615 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 618 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
616 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 619 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
617 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 620 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
618 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 621 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
619 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 622 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
620 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 623 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
621 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); 624 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
622 625
623 // 4.1Ю. 626 // 4.1Ю.
624 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); 627 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
625 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); 628 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
626 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); 629 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
627 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); 630 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
628 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); 631 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
629 632
630 // 4 страница - Отклики на вакансии 633 // 4 страница - Отклики на вакансии
631 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 634 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
632 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 635 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
633 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 636 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
634 637
635 // 5 страница - Сообщения 638 // 5 страница - Сообщения
636 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 639 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
637 Route::get('cabinet/dialog/{chat}', [EmployerController::class, 'dialog'])->name('dialog'); 640 Route::get('cabinet/dialog/{chat}', [EmployerController::class, 'dialog'])->name('dialog');
638 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 641 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
639 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 642 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
640 643
641 // 6 страница - Избранный 644 // 6 страница - Избранный
642 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 645 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
643 646
644 //7 страница - База данных 647 //7 страница - База данных
645 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 648 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
646 649
647 //8 страница - База резюме 650 //8 страница - База резюме
648 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 651 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
649 652
650 // 9 рассылка сообщений 653 // 9 рассылка сообщений
651 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 654 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
652 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 655 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
653 656
654 // 10 страница FAQ вопрос 657 // 10 страница FAQ вопрос
655 Route::get('cabinet/faq', [FaqController::class, 'showListForUser'])->name('faq'); 658 Route::get('cabinet/faq', [FaqController::class, 'showListForUser'])->name('faq');
656 659
657 // 11 страница - Настройка уведомлений 660 // 11 страница - Настройка уведомлений
658 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 661 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
659 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 662 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
660 663
661 // 12 страница - Сменить пароль 664 // 12 страница - Сменить пароль
662 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 665 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
663 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 666 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
664 667
665 // 13 страница - Удаление профиля 668 // 13 страница - Удаление профиля
666 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 669 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
667 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 670 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
668 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); 671 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
669 672
670 // Отправил сообщение 673 // Отправил сообщение
671 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); 674 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message');
672 675
673 Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat'); 676 Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat');
674 Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat'); 677 Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat');
675 }); 678 });
676 679
677 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); 680 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker');
678 681
679 Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message'); 682 Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message');
680 683
681 684