Commit b3d27fa36b958bc0610d1bddc5da7e4fba8d661e

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

Обновление проекта - критические замечания

Showing 18 changed files with 706 additions and 274 deletions Inline Diff

app/Http/Controllers/Admin/AdminController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers\Admin; 3 namespace App\Http\Controllers\Admin;
4 4
5 use App\Classes\Tools; 5 use App\Classes\Tools;
6 use App\Http\Controllers\Controller; 6 use App\Http\Controllers\Controller;
7 use App\Http\Requests\CompanyRequest; 7 use App\Http\Requests\CompanyRequest;
8 use App\Http\Requests\RequestAdminNews;
8 use App\Http\Requests\RequestPosition; 9 use App\Http\Requests\RequestPosition;
9 use App\Models\Company; 10 use App\Models\Company;
10 use App\Models\Employer; 11 use App\Models\Employer;
12 use App\Models\News;
11 use App\Models\Positions; 13 use App\Models\Positions;
12 use App\Models\User; 14 use App\Models\User;
13 use Carbon\Carbon; 15 use Carbon\Carbon;
14 use Illuminate\Http\Request; 16 use Illuminate\Http\Request;
15 use Illuminate\Support\Facades\Auth; 17 use Illuminate\Support\Facades\Auth;
16 use Illuminate\Support\Facades\Hash; 18 use Illuminate\Support\Facades\Hash;
17 use Illuminate\Support\Facades\Storage; 19 use Illuminate\Support\Facades\Storage;
18 use Illuminate\Support\Facades\Validator; 20 use Illuminate\Support\Facades\Validator;
19 21
20 class AdminController extends Controller 22 class AdminController extends Controller
21 { 23 {
22 /** 24 /**
23 * Handle the incoming request. 25 * Handle the incoming request.
24 * 26 *
25 * @param \Illuminate\Http\Request $request 27 * @param \Illuminate\Http\Request $request
26 * @return \Illuminate\Http\Response 28 * @return \Illuminate\Http\Response
27 */ 29 */
28 public function __invoke(Request $request) 30 public function __invoke(Request $request)
29 { 31 {
30 // 32 //
31 } 33 }
32 34
33 public function register() { 35 public function register() {
34 $code_emp = Tools::generator_id(10); 36 $code_emp = Tools::generator_id(10);
35 return view('admin.register', compact('code_emp')); 37 return view('admin.register', compact('code_emp'));
36 } 38 }
37 39
38 public function create(Request $request) { 40 public function create(Request $request) {
39 41
40 $params = $request->all(); 42 $params = $request->all();
41 unset($params['code_emp']); 43 unset($params['code_emp']);
42 $rules = [ 44 $rules = [
43 'name' => 'required|string|max:255', 45 'name' => 'required|string|max:255',
44 'email' => 'required|string|email|max:255|unique:users', 46 'email' => 'required|string|email|max:255|unique:users',
45 'password' => 'required|string|min:8|confirmed', 47 'password' => 'required|string|min:8|confirmed',
46 ]; 48 ];
47 49
48 $messages = [ 50 $messages = [
49 'required' => 'Укажите обязательное поле «:attribute»', 51 'required' => 'Укажите обязательное поле «:attribute»',
50 'confirmed' => 'Пароли не совпадают', 52 'confirmed' => 'Пароли не совпадают',
51 'email' => 'Введите корректный email', 53 'email' => 'Введите корректный email',
52 'unique' => 'Данный email занят уже', 54 'unique' => 'Данный email занят уже',
53 'min' => [ 55 'min' => [
54 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 56 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
55 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 57 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
56 ], 58 ],
57 'max' => [ 59 'max' => [
58 'string' => 'Поле «:attribute» должно быть не больше :max символов', 60 'string' => 'Поле «:attribute» должно быть не больше :max символов',
59 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 61 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
60 ], 62 ],
61 ]; 63 ];
62 64
63 $validator = Validator::make($params, $rules, $messages); 65 $validator = Validator::make($params, $rules, $messages);
64 66
65 if ($validator->fails()) { 67 if ($validator->fails()) {
66 return back()->withErrors($validator)->withInput(); 68 return back()->withErrors($validator)->withInput();
67 69
68 } else { 70 } else {
69 try { 71 try {
70 $user = User::create([ 72 $user = User::create([
71 'name' => $request->name, 73 'name' => $request->name,
72 'email' => $request->email, 74 'email' => $request->email,
73 'password' => Hash::make($request->password), 75 'password' => Hash::make($request->password),
74 'pubpassword' => base64_encode($request->password), 76 'pubpassword' => base64_encode($request->password),
75 'admin' => '1', 77 'admin' => '1',
76 'is_worker' => '0', 78 'is_worker' => '0',
77 'email_verified_at' => Carbon::now() 79 'email_verified_at' => Carbon::now()
78 ]); 80 ]);
79 } finally { 81 } finally {
80 $emp = Employer::create([ 82 $emp = Employer::create([
81 'name_company' => 'Администратор', 83 'name_company' => 'Администратор',
82 'user_id' => $user->id, 84 'user_id' => $user->id,
83 'code' => $request->code_emp 85 'code' => $request->code_emp
84 ]); 86 ]);
85 } 87 }
86 return redirect()->route('admin.login') 88 return redirect()->route('admin.login')
87 ->with('success', 'Вы успешно зарегистрировались'); 89 ->with('success', 'Вы успешно зарегистрировались');
88 } 90 }
89 } 91 }
90 92
91 public function login() { 93 public function login() {
92 return view('admin.login'); 94 return view('admin.login');
93 } 95 }
94 96
95 // Аутентификация 97 // Аутентификация
96 public function autenticate(Request $request) { 98 public function autenticate(Request $request) {
97 //$request->validate( 99 //$request->validate(
98 $rules = [ 100 $rules = [
99 'email' => 'required|string|email', 101 'email' => 'required|string|email',
100 'password' => 'required|string', 102 'password' => 'required|string',
101 ]; 103 ];
102 104
103 $messages = [ 105 $messages = [
104 'required' => 'Укажите обязательное поле «:attribute»', 106 'required' => 'Укажите обязательное поле «:attribute»',
105 'email' => 'Введите корректный email', 107 'email' => 'Введите корректный email',
106 'min' => [ 108 'min' => [
107 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 109 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
108 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 110 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
109 ], 111 ],
110 'max' => [ 112 'max' => [
111 'string' => 'Поле «:attribute» должно быть не больше :max символов', 113 'string' => 'Поле «:attribute» должно быть не больше :max символов',
112 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 114 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
113 ], 115 ],
114 ]; 116 ];
115 117
116 118
117 $validator = Validator::make($request->all(), $rules, $messages); 119 $validator = Validator::make($request->all(), $rules, $messages);
118 120
119 if ($validator->fails()) { 121 if ($validator->fails()) {
120 return back()->withErrors($validator)->withInput(); 122 return back()->withErrors($validator)->withInput();
121 123
122 } else { 124 } else {
123 125
124 $credentials = $request->only('email', 'password'); 126 $credentials = $request->only('email', 'password');
125 127
126 if (Auth::attempt($credentials, $request->has('remember'))) { 128 if (Auth::attempt($credentials, $request->has('remember'))) {
127 129
128 if (is_null(Auth::user()->email_verified_at)) { 130 if (is_null(Auth::user()->email_verified_at)) {
129 Auth::logout(); 131 Auth::logout();
130 return back()->withErrors('Адрес почты не подтвержден')->withInput(); 132 return back()->withErrors('Адрес почты не подтвержден')->withInput();
131 } 133 }
132 134
133 if (!Auth::user()->admin) { 135 if (!Auth::user()->admin) {
134 Auth::logout(); 136 Auth::logout();
135 return //redirect()->route('admin.login') 137 return //redirect()->route('admin.login')
136 back()->withErrors('Вы не являетесь админом!')->withInput();; 138 back()->withErrors('Вы не являетесь админом!')->withInput();;
137 139
138 } 140 }
139 141
140 return redirect() 142 return redirect()
141 ->route('admin.index') 143 ->route('admin.index')
142 ->with('success', 'Вы вошли в личный кабинет.'); 144 ->with('success', 'Вы вошли в личный кабинет.');
143 } 145 }
144 } 146 }
145 147
146 return redirect() 148 return redirect()
147 ->route('admin.login') 149 ->route('admin.login')
148 ->withErrors('Неверный логин или пароль!')->withInput(); 150 ->withErrors('Неверный логин или пароль!')->withInput();
149 151
150 } 152 }
151 153
152 public function logout() { 154 public function logout() {
153 Auth::logout(); 155 Auth::logout();
154 return redirect()->route('index') 156 return redirect()->route('index')
155 ->with('success', 'Вы вышли из личного кабинета'); 157 ->with('success', 'Вы вышли из личного кабинета');
156 } 158 }
157 159
158 public function index() { 160 public function index() {
159 $all_user = User::query()->count(); 161 $all_user = User::query()->count();
160 $all_employer = User::where('is_worker', '0')->count(); 162 $all_employer = User::where('is_worker', '0')->count();
161 $all_worker = User::where('is_worker', '1')->count(); 163 $all_worker = User::where('is_worker', '1')->count();
162 $all_admin = User::where('admin', '1')->count(); 164 $all_admin = User::where('admin', '1')->count();
163 return view('admin.index', compact('all_employer', 'all_user', 'all_worker', 'all_admin')); 165 return view('admin.index', compact('all_employer', 'all_user', 'all_worker', 'all_admin'));
164 } 166 }
165 167
166 public function index_admin(Request $request) { 168 public function index_admin(Request $request) {
167 $title = 'Админка - Администраторы системы'; 169 $title = 'Админка - Администраторы системы';
168 $id_admin = Auth::user()->id; 170 $id_admin = Auth::user()->id;
169 171
170 if ($request->ajax()) { 172 if ($request->ajax()) {
171 $user = User::find($request->id); 173 $user = User::find($request->id);
172 $request->offsetUnset('id'); 174 $request->offsetUnset('id');
173 $user->update($request->all()); 175 $user->update($request->all());
174 } 176 }
175 $find_key = ''; 177 $find_key = '';
176 $users = User::where('admin', '1'); 178 $users = User::where('admin', '1');
177 if (isset($request->find)) { 179 if (isset($request->find)) {
178 $find_key = $request->find; 180 $find_key = $request->find;
179 $users = $users->where(function($query) use($find_key) { 181 $users = $users->where(function($query) use($find_key) {
180 $query->Where('name', 'LIKE', "%$find_key%") 182 $query->Where('name', 'LIKE', "%$find_key%")
181 ->orWhere('email', 'LIKE', "%$find_key%"); 183 ->orWhere('email', 'LIKE', "%$find_key%");
182 }); 184 });
183 } 185 }
184 $users = $users->paginate(15); 186 $users = $users->paginate(15);
185 187
186 if ($request->ajax()) { 188 if ($request->ajax()) {
187 return view('admin.users.index_ajax', compact('users', 'id_admin')); 189 return view('admin.users.index_ajax', compact('users', 'id_admin'));
188 } else { 190 } else {
189 return view('admin.users.index', compact('users', 'title', 'id_admin', 'find_key')); 191 return view('admin.users.index', compact('users', 'title', 'id_admin', 'find_key'));
190 } 192 }
191 } 193 }
192 194
193 //Страница профиль пользователя - форма 195 //Страница профиль пользователя - форма
194 public function profile_user(User $user) { 196 public function profile_user(User $user) {
195 $visible = false; 197 $visible = false;
196 if($user->is_worker) { 198 if($user->is_worker) {
197 $caption = "Карточка работника"; 199 $caption = "Карточка работника";
198 if (isset($user->workers[0]->id)) { 200 if (isset($user->workers[0]->id)) {
199 $link = route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]); 201 $link = route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]);
200 $visible = true; 202 $visible = true;
201 } else { 203 } else {
202 $link = ""; 204 $link = "";
203 } 205 }
204 206
205 } else { 207 } else {
206 $caption = "Карточка работодателя"; 208 $caption = "Карточка работодателя";
207 if (isset($user->employers[0]->id)) { 209 if (isset($user->employers[0]->id)) {
208 210
209 $link = route('admin.employer-profile', ['employer' => $user->employers[0]->id]); 211 $link = route('admin.employer-profile', ['employer' => $user->employers[0]->id]);
210 $visible = true; 212 $visible = true;
211 } else { 213 } else {
212 $link = ""; 214 $link = "";
213 } 215 }
214 } 216 }
215 217
216 return view('admin.users.profile', compact('user', 'visible', 'link', 'caption')); 218 return view('admin.users.profile', compact('user', 'visible', 'link', 'caption'));
217 } 219 }
218 220
219 //Страница профиль пользователя - сохранение формы 221 //Страница профиль пользователя - сохранение формы
220 public function store_profile_user(User $user, Request $request) { 222 public function store_profile_user(User $user, Request $request) {
221 $rules = [ 223 $rules = [
222 'name' => 'required|min:3', 224 'name' => 'required|min:3',
223 ]; 225 ];
224 $messages = [ 226 $messages = [
225 'required' => 'Укажите обязательное поле', 227 'required' => 'Укажите обязательное поле',
226 'email' => 'Это поле должно быть определено, как Email' 228 'email' => 'Это поле должно быть определено, как Email'
227 ]; 229 ];
228 $validator = Validator::make($request->all(), $rules, $messages); 230 $validator = Validator::make($request->all(), $rules, $messages);
229 231
230 if ($validator->fails()) { 232 if ($validator->fails()) {
231 return redirect()->route('admin.user-profile', ['user' => $user->id]) 233 return redirect()->route('admin.user-profile', ['user' => $user->id])
232 ->withErrors($validator); 234 ->withErrors($validator);
233 } else { 235 } else {
234 $user->update($request->all()); 236 $user->update($request->all());
235 return redirect()->route('admin.user-profile', ['user' => $user->id]) 237 return redirect()->route('admin.user-profile', ['user' => $user->id])
236 ->with('success', 'Данные были успешно сохранены'); 238 ->with('success', 'Данные были успешно сохранены');
237 } 239 }
238 return redirect()->route('admin.user-profile', ['user' => $user->id]); 240 return redirect()->route('admin.user-profile', ['user' => $user->id]);
239 } 241 }
240 242
241 // Страница профиль админа - форма 243 // Страница профиль админа - форма
242 public function profile() { 244 public function profile() {
243 $id = Auth::user()->id; 245 $id = Auth::user()->id;
244 $user = User::find($id); 246 $user = User::find($id);
245 247
246 return view('admin.profile', compact('user')); 248 return view('admin.profile', compact('user'));
247 } 249 }
248 250
249 // Страница профиль админа - сохранение формы 251 // Страница профиль админа - сохранение формы
250 public function store_profile(Request $request) { 252 public function store_profile(Request $request) {
251 $id = Auth::user()->id; 253 $id = Auth::user()->id;
252 $user = User::find($id); 254 $user = User::find($id);
253 255
254 $rules = [ 256 $rules = [
255 'name' => 'required|min:3', 257 'name' => 'required|min:3',
256 'email' => 'required|email|min:3', 258 'email' => 'required|email|min:3',
257 ]; 259 ];
258 $messages = [ 260 $messages = [
259 'required' => 'Укажите обязательное поле', 261 'required' => 'Укажите обязательное поле',
260 'email' => 'Это поле должно быть определено, как Email' 262 'email' => 'Это поле должно быть определено, как Email'
261 ]; 263 ];
262 $validator = Validator::make($request->all(), $rules, $messages); 264 $validator = Validator::make($request->all(), $rules, $messages);
263 265
264 if ($validator->fails()) { 266 if ($validator->fails()) {
265 return redirect()->route('admin.profile') 267 return redirect()->route('admin.profile')
266 ->withErrors($validator); 268 ->withErrors($validator);
267 } else { 269 } else {
268 $user->update($request->all()); 270 $user->update($request->all());
269 return redirect()->route('admin.profile') 271 return redirect()->route('admin.profile')
270 ->with('success', 'Данные были успешно сохранены'); 272 ->with('success', 'Данные были успешно сохранены');
271 } 273 }
272 return redirect()->route('admin.profile'); 274 return redirect()->route('admin.profile');
273 } 275 }
274 276
275 // Форма смены пароля администоратора 277 // Форма смены пароля администоратора
276 public function profile_password() { 278 public function profile_password() {
277 $id = Auth::user()->id; 279 $id = Auth::user()->id;
278 $user = User::find($id); 280 $user = User::find($id);
279 $username = $user->name; 281 $username = $user->name;
280 282
281 return view('admin.password', compact('username')); 283 return view('admin.password', compact('username'));
282 } 284 }
283 285
284 // Сохранение формы смены пароля администоратора 286 // Сохранение формы смены пароля администоратора
285 public function profile_password_new(Request $request) { 287 public function profile_password_new(Request $request) {
286 288
287 $rules = [ 289 $rules = [
288 'old_password' => 'required|min:6', //|current_password:api', 290 'old_password' => 'required|min:6', //|current_password:api',
289 'password' => 'required|min:6|confirmed', 291 'password' => 'required|min:6|confirmed',
290 ]; 292 ];
291 $messages = [ 293 $messages = [
292 'required' => 'Укажите обязательное поле', 294 'required' => 'Укажите обязательное поле',
293 'confirmed' => 'Пароли не совпадают' 295 'confirmed' => 'Пароли не совпадают'
294 ]; 296 ];
295 297
296 $validator = Validator::make($request->all(), $rules, $messages); 298 $validator = Validator::make($request->all(), $rules, $messages);
297 299
298 if (! Hash::check($request->old_password, $request->user()->password)) { 300 if (! Hash::check($request->old_password, $request->user()->password)) {
299 return back()->withErrors([ 301 return back()->withErrors([
300 'old_password' => ['Неверный предыдущий пароль'] 302 'old_password' => ['Неверный предыдущий пароль']
301 ]); 303 ]);
302 } 304 }
303 305
304 if ($validator->fails()) { 306 if ($validator->fails()) {
305 return redirect()->route('admin.password') 307 return redirect()->route('admin.password')
306 ->withErrors($validator); 308 ->withErrors($validator);
307 } else { 309 } else {
308 $params = $request->all(); 310 $params = $request->all();
309 // устанавливаем новый пароль для пользователя 311 // устанавливаем новый пароль для пользователя
310 User::where('id', Auth::id()) 312 User::where('id', Auth::id())
311 ->update(['password' => Hash::make($request->password)]); 313 ->update(['password' => Hash::make($request->password)]);
312 session()->flash('success', 'Успешно изменен пароль!'); 314 session()->flash('success', 'Успешно изменен пароль!');
313 315
314 return redirect()->route('admin.password'); 316 return redirect()->route('admin.password');
315 } 317 }
316 } 318 }
317 319
318 // Страница конфигурация сайта - форма 320 // Страница конфигурация сайта - форма
319 public function config_form() { 321 public function config_form() {
320 $config = Company::find(1); 322 $config = Company::find(1);
321 return view('admin.config', compact('config')); 323 return view('admin.config', compact('config'));
322 } 324 }
323 325
324 // Страница конфигурация сайта - сохранение формы 326 // Страница конфигурация сайта - сохранение формы
325 public function store_config(CompanyRequest $request) { 327 public function store_config(CompanyRequest $request) {
326 $config = Company::find(1); 328 $config = Company::find(1);
327 329
328 $params = $request->all(); 330 $params = $request->all();
329 unset($params['logo']); 331 unset($params['logo']);
330 unset($params['image']); 332 unset($params['image']);
331 333
332 if ($request->has('logo')) { 334 if ($request->has('logo')) {
333 Storage::delete($config->logo); 335 Storage::delete($config->logo);
334 $params['logo'] = $request->file('logo')->store('config', 'public'); 336 $params['logo'] = $request->file('logo')->store('config', 'public');
335 } 337 }
336 338
337 if ($request->has('image')) { 339 if ($request->has('image')) {
338 Storage::delete($config->image); 340 Storage::delete($config->image);
339 $params['image'] = $request->file('image')->store('config', 'public'); 341 $params['image'] = $request->file('image')->store('config', 'public');
340 } 342 }
341 343
342 if (is_null($config)) { 344 if (is_null($config)) {
343 Company::create($params); 345 Company::create($params);
344 } else { 346 } else {
345 $config->update($params); 347 $config->update($params);
346 } 348 }
347 349
348 return redirect()->route('admin.config'); 350 return redirect()->route('admin.config');
349 } 351 }
350 352
351 public function position() { 353 public function position() {
352 $Positions = Positions::query()->get(); 354 $Positions = Positions::query()->get();
353 return view('admin.positions.position', compact('Positions')); 355 return view('admin.positions.position', compact('Positions'));
354 } 356 }
355 357
356 public function position_add() { 358 public function position_add() {
357 return view('admin.positions.add'); 359 return view('admin.positions.add');
358 } 360 }
359 361
360 public function position_add_save(RequestPosition $request) { 362 public function position_add_save(RequestPosition $request) {
361 $all = $request->all(); 363 $all = $request->all();
362 $position = Positions::create($all); 364 $position = Positions::create($all);
363 return redirect()->route('admin.position'); 365 return redirect()->route('admin.position');
364 } 366 }
365 367
366 public function position_edit(Positions $position) { 368 public function position_edit(Positions $position) {
367 return view('admin.positions.edit', compact('position')); 369 return view('admin.positions.edit', compact('position'));
368 } 370 }
369 371
370 public function position_update(Positions $position, RequestPosition $request) { 372 public function position_update(Positions $position, RequestPosition $request) {
371 $all = $request->all(); 373 $all = $request->all();
372 unset($all['_token']); 374 unset($all['_token']);
373 $status = $position->update($all); 375 $status = $position->update($all);
374 return redirect()->route('admin.position'); 376 return redirect()->route('admin.position');
375 } 377 }
376 378
377 public function position_delete(Positions $position) { 379 public function position_delete(Positions $position) {
378 $position->delete(); 380 $position->delete();
379 return redirect()->route('admin.position'); 381 return redirect()->route('admin.position');
380 } 382 }
383
384 public function news_admin() {
385 $news = News::query()->paginate(10);
386 return view('admin.news.list', compact('news'));
387 }
388
389 public function new_admin_add() {
390 return view('admin.news.add');
391 }
392
393 public function new_admin_add_save(RequestAdminNews $request) {
394 $params = $request->all();
395 if ($request->has('image')) {
396 $params['image'] = $request->file('image')->store('news', 'public');
397 }
398
399 News::create($params);
400 return redirect()->route('admin.news_admin');
401 }
402
403 public function new_admin_edit(News $new) {
404 // Вернуть все
405 return view('admin.news.edit', compact('new'));
406 }
407
408 public function new_admin_update_save(RequestAdminNews $request, News $new) {
409 $params = $request->all();
410 if ($request->has('image')) {
411 if (!empty($request->get('image'))) {
412 $params['image'] = $request->file('image')->store('news', 'public');
413 } else {
414 if (!empty($new->image))
415 $params['image'] = $new->image;
416 else
417 unset($params['image']);
418 }
419 }
420 $new->update($params);
421 return redirect()->route('admin.news_admin');
422 }
423
424 public function new_admin_delete(News $new)
425 {
426 $new->delete();
427 return redirect()->route('admin.news_admin');
428 }
381 } 429 }
382 430
app/Http/Controllers/EmployerController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Classes\RusDate; 5 use App\Classes\RusDate;
6 use App\Classes\Tools; 6 use App\Classes\Tools;
7 use App\Http\Requests\FlotRequest; 7 use App\Http\Requests\FlotRequest;
8 use App\Http\Requests\MessagesRequiest; 8 use App\Http\Requests\MessagesRequiest;
9 use App\Http\Requests\VacancyRequestEdit; 9 use App\Http\Requests\VacancyRequestEdit;
10 use App\Http\Requests\VacansiaRequiest; 10 use App\Http\Requests\VacansiaRequiest;
11 use App\Mail\MailSotrudnichestvo; 11 use App\Mail\MailSotrudnichestvo;
12 use App\Mail\SendAllMessages; 12 use App\Mail\SendAllMessages;
13 use App\Models\Ad_employer; 13 use App\Models\Ad_employer;
14 use App\Models\Ad_jobs; 14 use App\Models\Ad_jobs;
15 use App\Models\ad_response; 15 use App\Models\ad_response;
16 use App\Models\Category; 16 use App\Models\Category;
17 use App\Models\Education; 17 use App\Models\Education;
18 use App\Models\Employer; 18 use App\Models\Employer;
19 use App\Models\employers_main; 19 use App\Models\employers_main;
20 use App\Models\Flot; 20 use App\Models\Flot;
21 use App\Models\Job_title; 21 use App\Models\Job_title;
22 use App\Models\Like_vacancy; 22 use App\Models\Like_vacancy;
23 use App\Models\Like_worker; 23 use App\Models\Like_worker;
24 use App\Models\Message; 24 use App\Models\Message;
25 use App\Models\Positions; 25 use App\Models\Positions;
26 use App\Models\Worker; 26 use App\Models\Worker;
27 use Carbon\Carbon; 27 use Carbon\Carbon;
28 use Illuminate\Auth\Events\Registered; 28 use Illuminate\Auth\Events\Registered;
29 use Illuminate\Database\Eloquent\Builder; 29 use Illuminate\Database\Eloquent\Builder;
30 use Illuminate\Database\Eloquent\Model; 30 use Illuminate\Database\Eloquent\Model;
31 use Illuminate\Foundation\Auth\User; 31 use Illuminate\Foundation\Auth\User;
32 use Illuminate\Http\Request; 32 use Illuminate\Http\Request;
33 use Illuminate\Support\Facades\Auth; 33 use Illuminate\Support\Facades\Auth;
34 use Illuminate\Support\Facades\Hash; 34 use Illuminate\Support\Facades\Hash;
35 use Illuminate\Support\Facades\Mail; 35 use Illuminate\Support\Facades\Mail;
36 use Illuminate\Support\Facades\Storage; 36 use Illuminate\Support\Facades\Storage;
37 use App\Models\User as User_Model; 37 use App\Models\User as User_Model;
38 use Illuminate\Support\Facades\Validator; 38 use Illuminate\Support\Facades\Validator;
39 39
40 class EmployerController extends Controller 40 class EmployerController extends Controller
41 { 41 {
42 public function vacancie($vacancy, Request $request) { 42 public function vacancie($vacancy, Request $request) {
43 $title = 'Заголовок вакансии'; 43 $title = 'Заголовок вакансии';
44 $Query = Ad_employer::with('jobs')-> 44 $Query = Ad_employer::with('jobs')->
45 with('cat')-> 45 with('cat')->
46 with('employer')-> 46 with('employer')->
47 with('jobs_code')-> 47 with('jobs_code')->
48 select('ad_employers.*')-> 48 select('ad_employers.*')->
49 where('id', '=', $vacancy)->get(); 49 where('id', '=', $vacancy)->get();
50 50
51 if (isset(Auth()->user()->id)) 51 if (isset(Auth()->user()->id))
52 $uid = Auth()->user()->id; 52 $uid = Auth()->user()->id;
53 else 53 else
54 $uid = 0; 54 $uid = 0;
55 $title = $Query[0]->name; 55 $title = $Query[0]->name;
56 if ($request->ajax()) { 56 if ($request->ajax()) {
57 return view('ajax.vacance-item', compact('Query','uid')); 57 return view('ajax.vacance-item', compact('Query','uid'));
58 } else { 58 } else {
59 return view('vacance-item', compact('title', 'Query', 'uid')); 59 return view('vacance-item', compact('title', 'Query', 'uid'));
60 } 60 }
61 } 61 }
62 62
63 public function logout() { 63 public function logout() {
64 Auth::logout(); 64 Auth::logout();
65 return redirect()->route('index') 65 return redirect()->route('index')
66 ->with('success', 'Вы вышли из личного кабинета'); 66 ->with('success', 'Вы вышли из личного кабинета');
67 } 67 }
68 68
69 public function cabinet() { 69 public function cabinet() {
70 $id = Auth()->user()->id; 70 $id = Auth()->user()->id;
71 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 71 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
72 WhereHas('users', 72 WhereHas('users',
73 function (Builder $query) use ($id) {$query->Where('id', $id); 73 function (Builder $query) use ($id) {$query->Where('id', $id);
74 })->get(); 74 })->get();
75 return view('employers.cabinet45', compact('Employer')); 75 return view('employers.cabinet45', compact('Employer'));
76 } 76 }
77 77
78 public function slider_flot() {
79 $id = Auth()->user()->id;
80 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
81 WhereHas('users',
82 function (Builder $query) use ($id) {$query->Where('id', $id);
83 })->get();
84 return view('employers.fly-flot', compact('Employer'));
85 }
86
78 public function cabinet_save(Employer $Employer, Request $request) { 87 public function cabinet_save(Employer $Employer, Request $request) {
79 $params = $request->all(); 88 $params = $request->all();
80 $params['user_id'] = Auth()->user()->id; 89 $params['user_id'] = Auth()->user()->id;
81 $id = $Employer->id; 90 $id = $Employer->id;
82 91
83 if ($request->has('logo')) { 92 if ($request->has('logo')) {
84 if (!empty($Employer->logo)) { 93 if (!empty($Employer->logo)) {
85 Storage::delete($Employer->logo); 94 Storage::delete($Employer->logo);
86 } 95 }
87 $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); 96 $params['logo'] = $request->file('logo')->store("employer/$id", 'public');
88 } 97 }
89 98
90 $Employer->update($params); 99 $Employer->update($params);
91 100
92 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); 101 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены');
93 } 102 }
94 103
95 public function save_add_flot(FlotRequest $request) { 104 public function save_add_flot(FlotRequest $request) {
96 // отмена 105 // отмена
97 $params = $request->all(); 106 $params = $request->all();
98 107
99 if ($request->has('image')) { 108 if ($request->has('image')) {
100 $params['image'] = $request->file('image')->store("flot", 'public'); 109 $params['image'] = $request->file('image')->store("flot", 'public');
101 } 110 }
102 Flot::create($params); 111 Flot::create($params);
103 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); 112 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get();
104 return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен'); 113 return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен');
105 } 114 }
106 115
107 public function delete_flot(Flot $Flot) { 116 public function delete_flot(Flot $Flot) {
108 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); 117 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get();
109 118
110 if (isset($Flot->id)) $Flot->delete(); 119 if (isset($Flot->id)) $Flot->delete();
111 return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален'); 120 return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален');
112 } 121 }
113 122
114 // Форма добавления вакансий 123 // Форма добавления вакансий
115 public function cabinet_vacancie() { 124 public function cabinet_vacancie() {
116 $id = Auth()->user()->id; 125 $id = Auth()->user()->id;
117 126
118 $categories = Category::query()->active()->get(); 127 $categories = Category::query()->active()->get();
119 $Positions = Category::query()->active()->get(); 128 $Positions = Category::query()->active()->get();
120 if ($Positions->count()) { 129 if ($Positions->count()) {
121 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); 130 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get();
122 } else { 131 } else {
123 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); 132 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get();
124 } 133 }
125 134
126 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 135 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
127 WhereHas('users', 136 WhereHas('users',
128 function (Builder $query) use ($id) {$query->Where('id', $id); 137 function (Builder $query) use ($id) {$query->Where('id', $id);
129 })->get(); 138 })->get();
130 139
131 return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions')); 140 return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions'));
132 } 141 }
133 142
134 // Сохранение вакансии 143 // Сохранение вакансии
135 public function cabinet_vacancy_save1(VacancyRequestEdit $request) { 144 public function cabinet_vacancy_save1(VacancyRequestEdit $request) {
136 $params = $request->all(); 145 $params = $request->all();
137 146
138 $ad_jobs = Ad_employer::create($params); 147 $ad_jobs = Ad_employer::create($params);
139 return redirect()->route('employer.vacancy_list'); 148 return redirect()->route('employer.vacancy_list');
140 } 149 }
141 150
142 // Список вакансий 151 // Список вакансий
143 public function vacancy_list(Request $request) { 152 public function vacancy_list(Request $request) {
144 $id = Auth()->user()->id; 153 $id = Auth()->user()->id;
145 $Employer = Employer::query()->where('user_id', $id)->first(); 154 $Employer = Employer::query()->where('user_id', $id)->first();
146 $vacancy_list = Ad_employer::query()->with('jobs')->with('jobs_code')->where('employer_id', $Employer->id); 155 $vacancy_list = Ad_employer::query()->with('jobs')->with('jobs_code')->where('employer_id', $Employer->id);
147 156
148 157
149 if ($request->get('sort')) { 158 if ($request->get('sort')) {
150 $sort = $request->get('sort'); 159 $sort = $request->get('sort');
151 switch ($sort) { 160 switch ($sort) {
152 case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; 161 case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break;
153 case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; 162 case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break;
154 case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; 163 case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break;
155 case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; 164 case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break;
156 case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; 165 case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break;
157 default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; 166 default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break;
158 } 167 }
159 } 168 }
160 $vacancy_list = $vacancy_list->paginate(4); 169 $vacancy_list = $vacancy_list->paginate(4);
161 170
162 //ajax 171 //ajax
163 if ($request->ajax()) { 172 if ($request->ajax()) {
164 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); 173 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer'));
165 } else { 174 } else {
166 return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); 175 return view('employers.list_vacancy', compact('vacancy_list', 'Employer'));
167 } 176 }
168 } 177 }
169 178
170 // Карточка вакансии 179 // Карточка вакансии
171 public function vacancy_edit(Ad_employer $ad_employer) { 180 public function vacancy_edit(Ad_employer $ad_employer) {
172 $id = Auth()->user()->id; 181 $id = Auth()->user()->id;
173 182
174 $Positions = Category::query()->active()->get(); 183 $Positions = Category::query()->active()->get();
175 if ($Positions->count()) { 184 if ($Positions->count()) {
176 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); 185 $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get();
177 } else { 186 } else {
178 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); 187 $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get();
179 } 188 }
180 $categories = Category::query()->get(); 189 $categories = Category::query()->get();
181 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 190 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
182 where('user_id', $id)->first(); 191 where('user_id', $id)->first();
183 192
184 return view('employers.edit_vacancy', compact('ad_employer', 'Positions', 'categories','Employer', 'jobs')); 193 return view('employers.edit_vacancy', compact('ad_employer', 'Positions', 'categories','Employer', 'jobs'));
185 } 194 }
186 195
187 // Сохранение-редактирование записи 196 // Сохранение-редактирование записи
188 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { 197 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) {
189 $params = $request->all(); 198 $params = $request->all();
190 199
191 //$jobs['flot'] = $params['flot']; 200 //$jobs['flot'] = $params['flot'];
192 //$jobs['job_title_id'] = $params['job_title_id']; 201 //$jobs['job_title_id'] = $params['job_title_id'];
193 //$titles['position_id'] = $params['position_id']; 202 //$titles['position_id'] = $params['position_id'];
194 //unset($params['job_title_id']); 203 //unset($params['job_title_id']);
195 204
196 $ad_employer->update($params); 205 $ad_employer->update($params);
197 206
198 //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> 207 //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])->
199 // where('ad_employer_id', $ad_employer->id)->first(); 208 // where('ad_employer_id', $ad_employer->id)->first();
200 //$data = Ad_jobs::find($job_->id); 209 //$data = Ad_jobs::find($job_->id);
201 //$ad_jobs = $data->update($jobs); 210 //$ad_jobs = $data->update($jobs);
202 211
203 return redirect()->route('employer.vacancy_list'); 212 return redirect()->route('employer.vacancy_list');
204 } 213 }
205 214
206 // Сохранение карточки вакансии 215 // Сохранение карточки вакансии
207 public function vacancy_save(Request $request, Ad_employer $ad_employer) { 216 public function vacancy_save(Request $request, Ad_employer $ad_employer) {
208 $all = $request->all(); 217 $all = $request->all();
209 $ad_employer->update($all); 218 $ad_employer->update($all);
210 return redirect()->route('employer.cabinet_vacancie'); 219 return redirect()->route('employer.cabinet_vacancie');
211 } 220 }
212 221
213 // Удаление карточки вакансии 222 // Удаление карточки вакансии
214 public function vacancy_delete(Ad_employer $ad_employer) { 223 public function vacancy_delete(Ad_employer $ad_employer) {
215 $ad_employer->delete(); 224 $ad_employer->delete();
216 225
217 return redirect()->route('employer.vacancy_list') 226 return redirect()->route('employer.vacancy_list')
218 ->with('success', 'Данные были успешно сохранены'); 227 ->with('success', 'Данные были успешно сохранены');
219 } 228 }
220 229
221 // Обновление даты 230 // Обновление даты
222 public function vacancy_up(Ad_employer $ad_employer) { 231 public function vacancy_up(Ad_employer $ad_employer) {
223 $up = date('m/d/Y h:i:s', time());; 232 $up = date('m/d/Y h:i:s', time());;
224 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 233 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
225 $vac_emp->updated_at = $up; 234 $vac_emp->updated_at = $up;
226 $vac_emp->save(); 235 $vac_emp->save();
227 236
228 return redirect()->route('employer.vacancy_list'); 237 return redirect()->route('employer.vacancy_list');
229 // начало конца 238 // начало конца
230 } 239 }
231 240
232 //Видимость вакансии 241 //Видимость вакансии
233 public function vacancy_eye(Ad_employer $ad_employer, $status) { 242 public function vacancy_eye(Ad_employer $ad_employer, $status) {
234 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 243 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
235 $vac_emp->active_is = $status; 244 $vac_emp->active_is = $status;
236 $vac_emp->save(); 245 $vac_emp->save();
237 246
238 return redirect()->route('employer.vacancy_list'); 247 return redirect()->route('employer.vacancy_list');
239 } 248 }
240 249
241 //Вакансия редактирования (шаблон) 250 //Вакансия редактирования (шаблон)
242 public function vacancy_update(Ad_employer $id) { 251 public function vacancy_update(Ad_employer $id) {
243 252
244 } 253 }
245 254
246 //Отклики на вакансию - лист 255 //Отклики на вакансию - лист
247 public function answers(Employer $employer, Request $request) { 256 public function answers(Employer $employer, Request $request) {
248 $user_id = Auth()->user()->id; 257 $user_id = Auth()->user()->id;
249 $answer = Ad_employer::query()->where('employer_id', $employer->id); 258 $answer = Ad_employer::query()->where('employer_id', $employer->id);
250 if ($request->has('search')) { 259 if ($request->has('search')) {
251 $search = trim($request->get('search')); 260 $search = trim($request->get('search'));
252 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); 261 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%");
253 } 262 }
254 263
255 $answer = $answer->with('response')->get(); 264 $answer = $answer->with('response')->get();
256 265
257 return view('employers.list_answer', compact('answer', 'user_id', 'employer')); 266 return view('employers.list_answer', compact('answer', 'user_id', 'employer'));
258 } 267 }
259 268
260 //Обновление статуса 269 //Обновление статуса
261 public function supple_status(employer $employer, ad_response $ad_response, $flag) { 270 public function supple_status(employer $employer, ad_response $ad_response, $flag) {
262 $ad_response->update(Array('flag' => $flag)); 271 $ad_response->update(Array('flag' => $flag));
263 return redirect()->route('employer.answers', ['employer' => $employer->id]); 272 return redirect()->route('employer.answers', ['employer' => $employer->id]);
264 } 273 }
265 274
266 //Страницы сообщений список 275 //Страницы сообщений список
267 public function messages($type_message) { 276 public function messages($type_message) {
268 $user_id = Auth()->user()->id; 277 $user_id = Auth()->user()->id;
269 278
270 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 279 $messages_input = Message::query()->with('vacancies')->with('user_from')->
271 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 280 Where('to_user_id', $user_id)->OrderByDesc('created_at');
272 281
273 $messages_output = Message::query()->with('vacancies')-> 282 $messages_output = Message::query()->with('vacancies')->
274 with('user_to')->where('user_id', $user_id)-> 283 with('user_to')->where('user_id', $user_id)->
275 OrderByDesc('created_at'); 284 OrderByDesc('created_at');
276 285
277 286
278 $count_input = $messages_input->count(); 287 $count_input = $messages_input->count();
279 $count_output = $messages_output->count(); 288 $count_output = $messages_output->count();
280 289
281 if ($type_message == 'input') { 290 if ($type_message == 'input') {
282 $messages = $messages_input->paginate(15); 291 $messages = $messages_input->paginate(15);
283 } 292 }
284 293
285 if ($type_message == 'output') { 294 if ($type_message == 'output') {
286 $messages = $messages_output->paginate(15); 295 $messages = $messages_output->paginate(15);
287 } 296 }
288 297
289 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 298 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
290 } 299 }
291 300
292 // Диалог между пользователями 301 // Диалог между пользователями
293 public function dialog(User_Model $user1, User_Model $user2) { 302 public function dialog(User_Model $user1, User_Model $user2) {
294 if (isset($user2->id)) { 303 if (isset($user2->id)) {
295 $companion = User_Model::query()->with('workers')-> 304 $companion = User_Model::query()->with('workers')->
296 with('employers')-> 305 with('employers')->
297 where('id', $user2->id)->first(); 306 where('id', $user2->id)->first();
298 } 307 }
299 308
300 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 309 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
301 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 310 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
302 })->orWhere(function($query) use ($user1, $user2) { 311 })->orWhere(function($query) use ($user1, $user2) {
303 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 312 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
304 })->OrderBy('created_at')->get(); 313 })->OrderBy('created_at')->get();
305 314
306 $id_vac = null; 315 $id_vac = null;
307 foreach ($Messages as $it) { 316 foreach ($Messages as $it) {
308 if (isset($it->response)) { 317 if (isset($it->response)) {
309 foreach ($it->response as $r) { 318 foreach ($it->response as $r) {
310 if (isset($r->ad_employer_id)) { 319 if (isset($r->ad_employer_id)) {
311 $id_vac = $r->ad_employer_id; 320 $id_vac = $r->ad_employer_id;
312 break; 321 break;
313 } 322 }
314 } 323 }
315 } 324 }
316 if (!is_null($id_vac)) break; 325 if (!is_null($id_vac)) break;
317 } 326 }
318 327
319 $ad_employer = null; 328 $ad_employer = null;
320 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 329 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
321 $sender = $user1; 330 $sender = $user1;
322 331
323 return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 332 return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
324 } 333 }
325 334
326 // Регистрация работодателя 335 // Регистрация работодателя
327 public function register_employer(Request $request) { 336 public function register_employer(Request $request) {
328 $params = $request->all(); 337 $params = $request->all();
329 338
330 $rules = [ 339 $rules = [
331 'surname' => ['required', 'string', 'max:255'], 340 'surname' => ['required', 'string', 'max:255'],
332 'name_man' => ['required', 'string', 'max:255'], 341 'name_man' => ['required', 'string', 'max:255'],
333 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 342 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
334 'name_company' => ['required', 'string', 'max:255'], 343 'name_company' => ['required', 'string', 'max:255'],
335 'password' => ['required', 'string', 'min:8'], 344 'password' => ['required', 'string', 'min:8'],
336 ]; 345 ];
337 346
338 347
339 $messages = [ 348 $messages = [
340 'required' => 'Укажите обязательное поле', 349 'required' => 'Укажите обязательное поле',
341 'min' => [ 350 'min' => [
342 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 351 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
343 'integer' => 'Поле «:attribute» должно быть :min или больше', 352 'integer' => 'Поле «:attribute» должно быть :min или больше',
344 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 353 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
345 ], 354 ],
346 'max' => [ 355 'max' => [
347 'string' => 'Поле «:attribute» должно быть не больше :max символов', 356 'string' => 'Поле «:attribute» должно быть не больше :max символов',
348 'integer' => 'Поле «:attribute» должно быть :max или меньше', 357 'integer' => 'Поле «:attribute» должно быть :max или меньше',
349 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 358 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
350 ] 359 ]
351 ]; 360 ];
352 361
353 if ($request->get('password') !== $request->get('confirmed')){ 362 if ($request->get('password') !== $request->get('confirmed')){
354 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 363 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
355 } 364 }
356 365
357 $validator = Validator::make($request->all(), $rules, $messages); 366 $validator = Validator::make($request->all(), $rules, $messages);
358 367
359 if ($validator->fails()) { 368 if ($validator->fails()) {
360 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 369 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
361 } else { 370 } else {
362 $user = $this->create($params); 371 $user = $this->create($params);
363 event(new Registered($user)); 372 event(new Registered($user));
364 373
365 Auth::guard()->login($user); 374 Auth::guard()->login($user);
366 } 375 }
367 if ($user) { 376 if ($user) {
368 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; 377 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));;
369 } else { 378 } else {
370 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 379 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
371 } 380 }
372 } 381 }
373 382
374 // Создание пользователя 383 // Создание пользователя
375 protected function create(array $data) 384 protected function create(array $data)
376 { 385 {
377 $Use = new User_Model(); 386 $Use = new User_Model();
378 $Code_user = $Use->create([ 387 $Code_user = $Use->create([
379 'name' => $data['surname']." ".$data['name_man'], 388 'name' => $data['surname']." ".$data['name_man'],
380 'name_man' => $data['name_man'], 389 'name_man' => $data['name_man'],
381 'surname' => $data['surname'], 390 'surname' => $data['surname'],
382 'surname2' => $data['surname2'], 391 'surname2' => $data['surname2'],
383 'subscribe_email' => $data['email'], 392 'subscribe_email' => $data['email'],
384 'email' => $data['email'], 393 'email' => $data['email'],
385 'telephone' => $data['telephone'], 394 'telephone' => $data['telephone'],
386 'is_worker' => 0, 395 'is_worker' => 0,
387 'password' => Hash::make($data['password']), 396 'password' => Hash::make($data['password']),
388 'pubpassword' => base64_encode($data['password']), 397 'pubpassword' => base64_encode($data['password']),
389 'email_verified_at' => Carbon::now() 398 'email_verified_at' => Carbon::now()
390 ]); 399 ]);
391 400
392 if ($Code_user->id > 0) { 401 if ($Code_user->id > 0) {
393 $Employer = new Employer(); 402 $Employer = new Employer();
394 $Employer->user_id = $Code_user->id; 403 $Employer->user_id = $Code_user->id;
395 $Employer->name_company = $data['name_company']; 404 $Employer->name_company = $data['name_company'];
396 $Employer->email = $data['email']; 405 $Employer->email = $data['email'];
397 $Employer->telephone = $data['telephone']; 406 $Employer->telephone = $data['telephone'];
398 $Employer->code = Tools::generator_id(10); 407 $Employer->code = Tools::generator_id(10);
399 $Employer->save(); 408 $Employer->save();
400 409
401 return $Code_user; 410 return $Code_user;
402 } 411 }
403 } 412 }
404 413
405 // Отправка сообщения от работодателя 414 // Отправка сообщения от работодателя
406 public function send_message(MessagesRequiest $request) { 415 public function send_message(MessagesRequiest $request) {
407 $params = $request->all(); 416 $params = $request->all();
408 dd($params); 417 dd($params);
409 $user1 = $params['user_id']; 418 $user1 = $params['user_id'];
410 $user2 = $params['to_user_id']; 419 $user2 = $params['to_user_id'];
411 420
412 if ($request->has('file')) { 421 if ($request->has('file')) {
413 $params['file'] = $request->file('file')->store("messages", 'public'); 422 $params['file'] = $request->file('file')->store("messages", 'public');
414 } 423 }
415 Message::create($params); 424 Message::create($params);
416 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 425 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
417 } 426 }
418 427
419 public function test123(Request $request) { 428 public function test123(Request $request) {
420 $params = $request->all(); 429 $params = $request->all();
421 $user1 = $params['user_id']; 430 $user1 = $params['user_id'];
422 $user2 = $params['to_user_id']; 431 $user2 = $params['to_user_id'];
423 432
424 $rules = [ 433 $rules = [
425 'text' => 'required|min:1|max:150000', 434 'text' => 'required|min:1|max:150000',
426 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' 435 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000'
427 ]; 436 ];
428 $messages = [ 437 $messages = [
429 'required' => 'Укажите обязательное поле', 438 'required' => 'Укажите обязательное поле',
430 'min' => [ 439 'min' => [
431 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 440 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
432 'integer' => 'Поле «:attribute» должно быть :min или больше', 441 'integer' => 'Поле «:attribute» должно быть :min или больше',
433 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 442 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
434 ], 443 ],
435 'max' => [ 444 'max' => [
436 'string' => 'Поле «:attribute» должно быть не больше :max символов', 445 'string' => 'Поле «:attribute» должно быть не больше :max символов',
437 'integer' => 'Поле «:attribute» должно быть :max или меньше', 446 'integer' => 'Поле «:attribute» должно быть :max или меньше',
438 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 447 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
439 ] 448 ]
440 ]; 449 ];
441 450
442 $validator = Validator::make($request->all(), $rules, $messages); 451 $validator = Validator::make($request->all(), $rules, $messages);
443 452
444 if ($validator->fails()) { 453 if ($validator->fails()) {
445 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) 454 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2])
446 ->withErrors($validator); 455 ->withErrors($validator);
447 } else { 456 } else {
448 if ($request->has('file')) { 457 if ($request->has('file')) {
449 $params['file'] = $request->file('file')->store("messages", 'public'); 458 $params['file'] = $request->file('file')->store("messages", 'public');
450 } 459 }
451 Message::create($params); 460 Message::create($params);
452 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 461 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
453 462
454 } 463 }
455 } 464 }
456 465
457 //Избранные люди 466 //Избранные люди
458 public function favorites(Request $request) { 467 public function favorites(Request $request) {
459 $IP_address = RusDate::ip_addr_client(); 468 $IP_address = RusDate::ip_addr_client();
460 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 469 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
461 470
462 if ($Arr->count()) { 471 if ($Arr->count()) {
463 $A = Array(); 472 $A = Array();
464 foreach ($Arr as $it) { 473 foreach ($Arr as $it) {
465 $A[] = $it->code_record; 474 $A[] = $it->code_record;
466 } 475 }
467 476
468 $Workers = Worker::query()->whereIn('id', $A); 477 $Workers = Worker::query()->whereIn('id', $A);
469 } else { 478 } else {
470 $Workers = Worker::query()->where('id', '=', '0'); 479 $Workers = Worker::query()->where('id', '=', '0');
471 } 480 }
472 481
473 if (($request->has('search')) && (!empty($request->get('search')))) { 482 if (($request->has('search')) && (!empty($request->get('search')))) {
474 $search = $request->get('search'); 483 $search = $request->get('search');
475 484
476 $Workers = $Workers->WhereHas('users', 485 $Workers = $Workers->WhereHas('users',
477 function (Builder $query) use ($search) { 486 function (Builder $query) use ($search) {
478 $query->Where('surname', 'LIKE', "%$search%") 487 $query->Where('surname', 'LIKE', "%$search%")
479 ->orWhere('name_man', 'LIKE', "%$search%") 488 ->orWhere('name_man', 'LIKE', "%$search%")
480 ->orWhere('surname2', 'LIKE', "%$search%"); 489 ->orWhere('surname2', 'LIKE', "%$search%");
481 }); 490 });
482 } else { 491 } else {
483 $Workers = $Workers->with('users'); 492 $Workers = $Workers->with('users');
484 } 493 }
485 494
486 $Workers = $Workers->get(); 495 $Workers = $Workers->get();
487 return view('employers.favorite', compact('Workers')); 496 return view('employers.favorite', compact('Workers'));
488 } 497 }
489 498
490 // База данных 499 // База данных
491 public function bd(Request $request) { 500 public function bd(Request $request) {
492 // для типа BelongsTo 501 // для типа BelongsTo
493 //$documents = Document::query()->orderBy(Location::select('name') 502 //$documents = Document::query()->orderBy(Location::select('name')
494 // ->whereColumn('locations.id', 'documents.location_id') 503 // ->whereColumn('locations.id', 'documents.location_id')
495 //); 504 //);
496 505
497 // для типа HasOne/Many 506 // для типа HasOne/Many
498 // $documents = Document::::query()->orderBy(Location::select('name') 507 // $documents = Document::::query()->orderBy(Location::select('name')
499 // ->whereColumn('locations.document_id', 'documents.id') 508 // ->whereColumn('locations.document_id', 'documents.id')
500 //); 509 //);
501 510
502 $users = User_Model::query()->with('workers'); 511 $users = User_Model::query()->with('workers');
503 if (isset($request->find)) { 512 if (isset($request->find)) {
504 $find_key = $request->find; 513 $find_key = $request->find;
505 $users = $users->where('name', 'LIKE', "%$find_key%") 514 $users = $users->where('name', 'LIKE', "%$find_key%")
506 ->orWhere('email', 'LIKE', "%$find_key%") 515 ->orWhere('email', 'LIKE', "%$find_key%")
507 ->orWhere('telephone', 'LIKE', "%$find_key%"); 516 ->orWhere('telephone', 'LIKE', "%$find_key%");
508 } 517 }
509 518
510 // Данные 519 // Данные
511 $users = $users->Baseuser()-> 520 $users = $users->Baseuser()->
512 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> 521 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))->
513 paginate(5); 522 paginate(5);
514 523
515 return view('employers.bd', compact('users')); 524 return view('employers.bd', compact('users'));
516 } 525 }
517 526
518 //Настройка уведомлений 527 //Настройка уведомлений
519 public function subscribe() { 528 public function subscribe() {
520 return view('employers.subcribe'); 529 return view('employers.subcribe');
521 } 530 }
522 531
523 //Установка уведомлений сохранение 532 //Установка уведомлений сохранение
524 public function save_subscribe(Request $request) { 533 public function save_subscribe(Request $request) {
525 dd($request->all()); 534 dd($request->all());
526 $msg = $request->validate([ 535 $msg = $request->validate([
527 'subscribe_email' => 'required|email|min:5|max:255', 536 'subscribe_email' => 'required|email|min:5|max:255',
528 ]); 537 ]);
529 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); 538 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку');
530 } 539 }
531 540
532 //Сбросить форму с паролем 541 //Сбросить форму с паролем
533 public function password_reset() { 542 public function password_reset() {
534 $email = Auth()->user()->email; 543 $email = Auth()->user()->email;
535 return view('employers.password-reset', compact('email')); 544 return view('employers.password-reset', compact('email'));
536 } 545 }
537 546
538 //Обновление пароля 547 //Обновление пароля
539 public function new_password(Request $request) { 548 public function new_password(Request $request) {
540 $use = Auth()->user(); 549 $use = Auth()->user();
541 $request->validate([ 550 $request->validate([
542 'password' => 'required|string', 551 'password' => 'required|string',
543 'new_password' => 'required|string', 552 'new_password' => 'required|string',
544 'new_password2' => 'required|string' 553 'new_password2' => 'required|string'
545 ]); 554 ]);
546 555
547 if ($request->get('new_password') == $request->get('new_password2')) 556 if ($request->get('new_password') == $request->get('new_password2'))
548 if ($request->get('password') !== $request->get('new_password')) { 557 if ($request->get('password') !== $request->get('new_password')) {
549 $credentials = $request->only('email', 'password'); 558 $credentials = $request->only('email', 'password');
550 if (Auth::attempt($credentials)) { 559 if (Auth::attempt($credentials)) {
551 560
552 if (!is_null($use->email_verified_at)){ 561 if (!is_null($use->email_verified_at)){
553 562
554 $user_data = User_Model::find($use->id); 563 $user_data = User_Model::find($use->id);
555 $user_data->update([ 564 $user_data->update([
556 'password' => Hash::make($request->get('new_password')), 565 'password' => Hash::make($request->get('new_password')),
557 'pubpassword' => base64_encode($request->get('new_password')), 566 'pubpassword' => base64_encode($request->get('new_password')),
558 ]); 567 ]);
559 return redirect() 568 return redirect()
560 ->route('employer.password_reset') 569 ->route('employer.password_reset')
561 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 570 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
562 } 571 }
563 572
564 return redirect() 573 return redirect()
565 ->route('employer.password_reset') 574 ->route('employer.password_reset')
566 ->withError('Данная учетная запись не было верифицированна!'); 575 ->withError('Данная учетная запись не было верифицированна!');
567 } 576 }
568 } 577 }
569 578
570 return redirect() 579 return redirect()
571 ->route('employer.password_reset') 580 ->route('employer.password_reset')
572 ->withErrors('Не совпадение данных, обновите пароли!'); 581 ->withErrors('Не совпадение данных, обновите пароли!');
573 } 582 }
574 583
575 584
576 585
577 // Форма Удаление пипла 586 // Форма Удаление пипла
578 public function delete_people() { 587 public function delete_people() {
579 $login = Auth()->user()->email; 588 $login = Auth()->user()->email;
580 return view('employers.delete_people', compact('login')); 589 return view('employers.delete_people', compact('login'));
581 } 590 }
582 591
583 // Удаление аккаунта 592 // Удаление аккаунта
584 public function action_delete_user(Request $request) { 593 public function action_delete_user(Request $request) {
585 $Answer = $request->all(); 594 $Answer = $request->all();
586 $user_id = Auth()->user()->id; 595 $user_id = Auth()->user()->id;
587 $request->validate([ 596 $request->validate([
588 'password' => 'required|string', 597 'password' => 'required|string',
589 ]); 598 ]);
590 599
591 $credentials = $request->only('email', 'password'); 600 $credentials = $request->only('email', 'password');
592 if (Auth::attempt($credentials)) { 601 if (Auth::attempt($credentials)) {
593 Auth::logout(); 602 Auth::logout();
594 $it = User_Model::find($user_id); 603 $it = User_Model::find($user_id);
595 $it->delete(); 604 $it->delete();
596 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 605 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
597 } else { 606 } else {
598 return redirect()->route('employer.delete_people') 607 return redirect()->route('employer.delete_people')
599 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 608 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
600 } 609 }
601 } 610 }
602 611
603 public function ajax_delete_user(Request $request) { 612 public function ajax_delete_user(Request $request) {
604 $Answer = $request->all(); 613 $Answer = $request->all();
605 $user_id = Auth()->user()->id; 614 $user_id = Auth()->user()->id;
606 $request->validate([ 615 $request->validate([
607 'password' => 'required|string', 616 'password' => 'required|string',
608 ]); 617 ]);
609 $credentials = $request->only('email', 'password'); 618 $credentials = $request->only('email', 'password');
610 if (Auth::attempt($credentials)) { 619 if (Auth::attempt($credentials)) {
611 620
612 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', 621 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт',
613 'email' => $request->get('email'), 622 'email' => $request->get('email'),
614 'password' => $request->get('password'))); 623 'password' => $request->get('password')));
615 } else { 624 } else {
616 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); 625 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль'));
617 } 626 }
618 } 627 }
619 628
620 629
621 // FAQ - Вопросы/ответы для работодателей и соискателей 630 // FAQ - Вопросы/ответы для работодателей и соискателей
622 public function faq() { 631 public function faq() {
623 return view('employers.faq'); 632 return view('employers.faq');
624 } 633 }
625 634
626 // Рассылка сообщений 635 // Рассылка сообщений
627 public function send_all_messages() { 636 public function send_all_messages() {
628 return view('employers.send_all'); 637 return view('employers.send_all');
629 } 638 }
630 639
631 // Отправка сообщений для информации 640 // Отправка сообщений для информации
632 public function send_all_post(Request $request) { 641 public function send_all_post(Request $request) {
633 $data = $request->all(); 642 $data = $request->all();
634 643
635 $emails = User_Model::query()->where('is_worker', '1')->get(); 644 $emails = User_Model::query()->where('is_worker', '1')->get();
636 645
637 foreach ($emails as $e) { 646 foreach ($emails as $e) {
638 Mail::to($e->email)->send(new SendAllMessages($data)); 647 Mail::to($e->email)->send(new SendAllMessages($data));
639 } 648 }
640 649
641 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); 650 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены');
642 } 651 }
643 652
644 // База резюме 653 // База резюме
645 public function bd_tupe(Request $request) { 654 public function bd_tupe(Request $request) {
646 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); 655 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get();
647 656
648 return view('employers.bd_tupe', compact('Resume')); 657 return view('employers.bd_tupe', compact('Resume'));
649 } 658 }
650 659
651 ////////////////////////////////////////////////////////////////// 660 //////////////////////////////////////////////////////////////////
652 // 661 //
653 // 662 //
654 // Отправил сообщение 663 // Отправил сообщение
655 // 664 //
656 // 665 //
657 // 666 //
658 // 667 //
659 ////////////////////////////////////////////////////////////////// 668 //////////////////////////////////////////////////////////////////
660 public function new_message(Request $request) { 669 public function new_message(Request $request) {
661 $params = $request->all(); 670 $params = $request->all();
662 671
663 $id = $params['_user_id']; 672 $id = $params['_user_id'];
664 $message = new Message(); 673 $message = new Message();
665 $message->user_id = $params['_user_id']; 674 $message->user_id = $params['_user_id'];
666 $message->to_user_id = $params['_to_user_id']; 675 $message->to_user_id = $params['_to_user_id'];
667 $message->title = $params['title']; 676 $message->title = $params['title'];
668 $message->text = $params['text']; 677 $message->text = $params['text'];
669 if ($request->has('_file')) { 678 if ($request->has('_file')) {
670 $message->file = $request->file('_file')->store("worker/$id", 'public'); 679 $message->file = $request->file('_file')->store("worker/$id", 'public');
671 } 680 }
672 $message->flag_new = 1; 681 $message->flag_new = 1;
673 $id_message = $message->save(); 682 $id_message = $message->save();
674 683
675 $data['message_id'] = $id_message; 684 $data['message_id'] = $id_message;
676 $data['ad_employer_id'] = $params['_vacancy']; 685 $data['ad_employer_id'] = $params['_vacancy'];
677 $data['job_title_id'] = 0; 686 $data['job_title_id'] = 0;
678 687
679 $data['flag'] = 1; 688 $data['flag'] = 1;
680 $ad_responce = ad_response::create($data); 689 $ad_responce = ad_response::create($data);
681 return redirect()->route('employer.messages', ['type_message' => 'output']); 690 return redirect()->route('employer.messages', ['type_message' => 'output']);
682 } 691 }
683 692
684 // Восстановление пароля 693 // Восстановление пароля
685 public function repair_password(Request $request) { 694 public function repair_password(Request $request) {
686 $params = $request->get('email'); 695 $params = $request->get('email');
687 } 696 }
688 697
689 // Избранные люди на корабль 698 // Избранные люди на корабль
690 public function selected_people(Request $request) { 699 public function selected_people(Request $request) {
691 $id = $request->get('id'); 700 $id = $request->get('id');
692 $favorite_people = Job_title::query()->where('position_id', $id)->get(); 701 $favorite_people = Job_title::query()->where('position_id', $id)->get();
693 702
694 return view('favorite_people', compact('favorite_people')); 703 return view('favorite_people', compact('favorite_people'));
695 } 704 }
696 } 705 }
697 706
app/Http/Controllers/WorkerController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Classes\RusDate; 5 use App\Classes\RusDate;
6 use App\Http\Requests\DocumentsRequest; 6 use App\Http\Requests\DocumentsRequest;
7 use App\Models\Ad_employer; 7 use App\Models\Ad_employer;
8 use App\Models\ad_response; 8 use App\Models\ad_response;
9 use App\Models\Category; 9 use App\Models\Category;
10 use App\Models\Dop_info; 10 use App\Models\Dop_info;
11 use App\Models\Employer; 11 use App\Models\Employer;
12 use App\Models\infobloks; 12 use App\Models\infobloks;
13 use App\Models\Job_title; 13 use App\Models\Job_title;
14 use App\Models\Like_vacancy; 14 use App\Models\Like_vacancy;
15 use App\Models\Like_worker; 15 use App\Models\Like_worker;
16 use App\Models\Message; 16 use App\Models\Message;
17 use App\Models\place_works; 17 use App\Models\place_works;
18 use App\Models\reclame; 18 use App\Models\reclame;
19 use App\Models\ResponseWork; 19 use App\Models\ResponseWork;
20 use App\Models\sertification; 20 use App\Models\sertification;
21 use App\Models\Static_worker; 21 use App\Models\Static_worker;
22 use App\Models\User; 22 use App\Models\User;
23 use App\Models\User as User_Model; 23 use App\Models\User as User_Model;
24 use App\Models\Worker; 24 use App\Models\Worker;
25 use Barryvdh\DomPDF\Facade\Pdf; 25 use Barryvdh\DomPDF\Facade\Pdf;
26 use Carbon\Carbon; 26 use Carbon\Carbon;
27 use Illuminate\Auth\Events\Registered; 27 use Illuminate\Auth\Events\Registered;
28 use Illuminate\Database\Eloquent\Builder; 28 use Illuminate\Database\Eloquent\Builder;
29 use Illuminate\Database\Eloquent\Model; 29 use Illuminate\Database\Eloquent\Model;
30 use Illuminate\Http\JsonResponse; 30 use Illuminate\Http\JsonResponse;
31 use Illuminate\Http\Request; 31 use Illuminate\Http\Request;
32 use Illuminate\Support\Facades\Auth; 32 use Illuminate\Support\Facades\Auth;
33 use Illuminate\Support\Facades\Hash; 33 use Illuminate\Support\Facades\Hash;
34 use Illuminate\Support\Facades\Storage; 34 use Illuminate\Support\Facades\Storage;
35 use Illuminate\Support\Facades\Validator; 35 use Illuminate\Support\Facades\Validator;
36 36
37 class WorkerController extends Controller 37 class WorkerController extends Controller
38 { 38 {
39 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); 39 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу');
40 40
41 //профиль 41 //профиль
42 public function profile(Worker $worker) 42 public function profile(Worker $worker)
43 { 43 {
44 $get_date = date('Y.m'); 44 $get_date = date('Y.m');
45 45
46 $c = Static_worker::query()->where('year_month', '=', $get_date) 46 $c = Static_worker::query()->where('year_month', '=', $get_date)
47 ->where('user_id', '=', $worker->users->id) 47 ->where('user_id', '=', $worker->users->id)
48 ->get(); 48 ->get();
49 49
50 if ($c->count() > 0) { 50 if ($c->count() > 0) {
51 $upd = Static_worker::find($c[0]->id); 51 $upd = Static_worker::find($c[0]->id);
52 $upd->lookin = $upd->lookin + 1; 52 $upd->lookin = $upd->lookin + 1;
53 $upd->save(); 53 $upd->save();
54 } else { 54 } else {
55 $crt = new Static_worker(); 55 $crt = new Static_worker();
56 $crt->lookin = 1; 56 $crt->lookin = 1;
57 $crt->year_month = $get_date; 57 $crt->year_month = $get_date;
58 $crt->user_id = $worker->user_id; 58 $crt->user_id = $worker->user_id;
59 $crt->save(); 59 $crt->save();
60 } 60 }
61 61
62 $stat = Static_worker::query()->where('year_month', '=', $get_date) 62 $stat = Static_worker::query()->where('year_month', '=', $get_date)
63 ->where('user_id', '=', $worker->users->id) 63 ->where('user_id', '=', $worker->users->id)
64 ->get(); 64 ->get();
65 65
66 return view('public.workers.profile', compact('worker', 'stat')); 66 return view('public.workers.profile', compact('worker', 'stat'));
67 } 67 }
68 68
69 // лист база резюме 69 // лист база резюме
70 public function bd_resume(Request $request) 70 public function bd_resume(Request $request)
71 { 71 {
72 if (isset(Auth()->user()->id)) { 72 if (isset(Auth()->user()->id)) {
73 $idiot = Auth()->user()->id; 73 $idiot = Auth()->user()->id;
74 } else { 74 } else {
75 $idiot = 0; 75 $idiot = 0;
76 } 76 }
77 77
78 $status_work = $this->status_work; 78 $status_work = $this->status_work;
79 $resumes = Worker::query()->with('users')->with('job_titles'); 79 $resumes = Worker::query()->with('users')->with('job_titles');
80 $resumes = $resumes->whereHas('users', function (Builder $query) { 80 $resumes = $resumes->whereHas('users', function (Builder $query) {
81 $query->Where('is_worker', '=', '1') 81 $query->Where('is_worker', '=', '1')
82 ->Where('is_bd', '=', '0'); 82 ->Where('is_bd', '=', '0');
83 }); 83 });
84 84
85 if ($request->get('sort')) { 85 if ($request->get('sort')) {
86 $sort = $request->get('sort'); 86 $sort = $request->get('sort');
87 switch ($sort) { 87 switch ($sort) {
88 case 'name_up': 88 case 'name_up':
89 $resumes = $resumes->orderBy(User::select('surname') 89 $resumes = $resumes->orderBy(User::select('surname')
90 ->whereColumn('Workers.user_id', 'users.id') 90 ->whereColumn('Workers.user_id', 'users.id')
91 ); 91 );
92 break; 92 break;
93 case 'name_down': 93 case 'name_down':
94 $resumes = $resumes->orderByDesc(User::select('surname') 94 $resumes = $resumes->orderByDesc(User::select('surname')
95 ->whereColumn('Workers.user_id', 'users.id') 95 ->whereColumn('Workers.user_id', 'users.id')
96 ); 96 );
97 break; 97 break;
98 case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; 98 case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break;
99 case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; 99 case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break;
100 case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; 100 case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
101 default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; 101 default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
102 } 102 }
103 } 103 }
104 104
105 $res_count = $resumes->count(); 105 $res_count = $resumes->count();
106 $resumes = $resumes->paginate(4); 106 $resumes = $resumes->paginate(4);
107 if ($request->ajax()) { 107 if ($request->ajax()) {
108 // Условия обставлены 108 // Условия обставлены
109 if ($request->has('block') && ($request->get('block') == 1)) { 109 if ($request->has('block') && ($request->get('block') == 1)) {
110 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); 110 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot'));
111 } 111 }
112 112
113 if ($request->has('block') && ($request->get('block') == 2)) { 113 if ($request->has('block') && ($request->get('block') == 2)) {
114 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); 114 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot'));
115 } 115 }
116 } else { 116 } else {
117 return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); 117 return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot'));
118 } 118 }
119 } 119 }
120 120
121 //Лайк резюме 121 //Лайк резюме
122 public function like_controller() { 122 public function like_controller() {
123 123
124 } 124 }
125 125
126 // анкета соискателя 126 // анкета соискателя
127 public function resume_profile(Worker $worker) 127 public function resume_profile(Worker $worker)
128 { 128 {
129 if (isset(Auth()->user()->id)) { 129 if (isset(Auth()->user()->id)) {
130 $idiot = Auth()->user()->id; 130 $idiot = Auth()->user()->id;
131 } else { 131 } else {
132 $idiot = 0; 132 $idiot = 0;
133 } 133 }
134 134
135 $status_work = $this->status_work; 135 $status_work = $this->status_work;
136 $Query = Worker::query()->with('users')->with('job_titles') 136 $Query = Worker::query()->with('users')->with('job_titles')
137 ->with('place_worker')->with('sertificate')->with('prev_company') 137 ->with('place_worker')->with('sertificate')->with('prev_company')
138 ->with('infobloks'); 138 ->with('infobloks');
139 $Query = $Query->where('id', '=', $worker->id); 139 $Query = $Query->where('id', '=', $worker->id);
140 $Query = $Query->get(); 140 $Query = $Query->get();
141 141
142 $get_date = date('Y.m'); 142 $get_date = date('Y.m');
143 $c = Static_worker::query()->where('year_month', '=', $get_date) 143 $c = Static_worker::query()->where('year_month', '=', $get_date)
144 ->where('user_id', '=', $worker->id) 144 ->where('user_id', '=', $worker->id)
145 ->get(); 145 ->get();
146 146
147 if ($c->count() > 0) { 147 if ($c->count() > 0) {
148 $upd = Static_worker::find($c[0]->id); 148 $upd = Static_worker::find($c[0]->id);
149 $upd->lookin = $upd->lookin + 1; 149 $upd->lookin = $upd->lookin + 1;
150 $upd->save(); 150 $upd->save();
151 } else { 151 } else {
152 $crt = new Static_worker(); 152 $crt = new Static_worker();
153 $crt->lookin = 1; 153 $crt->lookin = 1;
154 $crt->year_month = $get_date; 154 $crt->year_month = $get_date;
155 $crt->user_id = $worker->user_id; 155 $crt->user_id = $worker->user_id;
156 $crt->save(); 156 $crt->save();
157 } 157 }
158 158
159 $stat = Static_worker::query()->where('year_month', '=', $get_date) 159 $stat = Static_worker::query()->where('year_month', '=', $get_date)
160 ->where('user_id', '=', $worker->id) 160 ->where('user_id', '=', $worker->id)
161 ->get(); 161 ->get();
162 162
163 return view('worker', compact('Query', 'status_work', 'idiot')); 163 return view('worker', compact('Query', 'status_work', 'idiot'));
164 } 164 }
165 165
166 // скачать анкету соискателя 166 // скачать анкету соискателя
167 public function resume_download(Worker $worker) 167 public function resume_download(Worker $worker)
168 { 168 {
169 $status_work = $this->status_work; 169 $status_work = $this->status_work;
170 $Query = Worker::query()->with('users')->with('job_titles') 170 $Query = Worker::query()->with('users')->with('job_titles')
171 ->with('place_worker')->with('sertificate')->with('prev_company') 171 ->with('place_worker')->with('sertificate')->with('prev_company')
172 ->with('infobloks'); 172 ->with('infobloks');
173 $Query = $Query->where('id', '=', $worker->id); 173 $Query = $Query->where('id', '=', $worker->id);
174 $Query = $Query->get()->toArray(); 174 $Query = $Query->get()->toArray();
175 175
176 view()->share('Query',$Query); 176 view()->share('Query',$Query);
177 177
178 $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); 178 $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape');
179 179
180 return $pdf->stream(); 180 return $pdf->stream();
181 } 181 }
182 182
183 // Кабинет работника 183 // Кабинет работника
184 public function cabinet(Request $request) 184 public function cabinet(Request $request)
185 { 185 {
186 $get_date = date('Y.m'); 186 $get_date = date('Y.m');
187 187
188 $id = Auth()->user()->id; 188 $id = Auth()->user()->id;
189 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> 189 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')->
190 with('infobloks')->with('place_worker')-> 190 with('infobloks')->with('place_worker')->
191 WhereHas('users', 191 WhereHas('users',
192 function (Builder $query) use ($id) {$query->Where('id', $id); 192 function (Builder $query) use ($id) {$query->Where('id', $id);
193 })->get(); 193 })->get();
194 194
195 $Job_titles = Job_title::query()->OrderBy('name')->get(); 195 $Job_titles = Job_title::query()->OrderBy('name')->get();
196 $Infoblocks = infobloks::query()->OrderBy('name')->get(); 196 $Infoblocks = infobloks::query()->OrderBy('name')->get();
197 197
198 $stat = Static_worker::query()->where('year_month', '=', $get_date) 198 $stat = Static_worker::query()->where('year_month', '=', $get_date)
199 ->where('user_id', '=', $Worker[0]->id) 199 ->where('user_id', '=', $Worker[0]->id)
200 ->get(); 200 ->get();
201 201
202 $persent = 10; 202 $persent = 10;
203 if ((!empty($Worker[0]->status_work)) && (!empty($Worker[0]->telephone)) && 203 if ((!empty($Worker[0]->status_work)) && (!empty($Worker[0]->telephone)) &&
204 (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && 204 (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) &&
205 (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { 205 (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) {
206 $persent = $persent + 40; 206 $persent = $persent + 40;
207 } 207 }
208 208
209 if ($Worker[0]->sertificate->count() > 0) { 209 if ($Worker[0]->sertificate->count() > 0) {
210 $persent = $persent + 15; 210 $persent = $persent + 15;
211 } 211 }
212 212
213 if ($Worker[0]->infobloks->count() > 0) { 213 if ($Worker[0]->infobloks->count() > 0) {
214 $persent = $persent + 20; 214 $persent = $persent + 20;
215 } 215 }
216 216
217 if ($Worker[0]->prev_company->count() > 0) { 217 if ($Worker[0]->prev_company->count() > 0) {
218 $persent = $persent + 10; 218 $persent = $persent + 10;
219 } 219 }
220 220
221 if (!empty($Worker[0]->photo)) { 221 if (!empty($Worker[0]->photo)) {
222 // 5% 222 // 5%
223 $persent = $persent + 5; 223 $persent = $persent + 5;
224 } 224 }
225 225
226 if ($request->has('print')) { 226 if ($request->has('print')) {
227 dd($Worker); 227 dd($Worker);
228 } else { 228 } else {
229 return view('workers.cabinet', compact('Worker', 'persent', 'Job_titles', 'Infoblocks', 'stat')); 229 return view('workers.cabinet', compact('Worker', 'persent', 'Job_titles', 'Infoblocks', 'stat'));
230 } 230 }
231 } 231 }
232 232
233 // Сохранение данных 233 // Сохранение данных
234 public function cabinet_save(Worker $worker, Request $request) 234 public function cabinet_save(Worker $worker, Request $request)
235 { 235 {
236 $id = $worker->id; 236 $id = $worker->id;
237 $params = $request->all(); 237 $params = $request->all();
238 238
239 $job_title_id = $request->get('job_title_id'); 239 $job_title_id = $request->get('job_title_id');
240 240
241 unset($params['new_diplom']); 241 unset($params['new_diplom']);
242 unset($params['new_data_begin']); 242 unset($params['new_data_begin']);
243 unset($params['new_data_end']); 243 unset($params['new_data_end']);
244 unset($params['new_job_title']); 244 unset($params['new_job_title']);
245 unset($params['new_teplohod']); 245 unset($params['new_teplohod']);
246 unset($params['new_GWT']); 246 unset($params['new_GWT']);
247 unset($params['new_KBT']); 247 unset($params['new_KBT']);
248 unset($params['new_Begin_work']); 248 unset($params['new_Begin_work']);
249 unset($params['new_End_work']); 249 unset($params['new_End_work']);
250 unset($params['new_name_company']); 250 unset($params['new_name_company']);
251 251
252 $rules = [ 252 $rules = [
253 'surname' => ['required', 'string', 'max:255'], 253 'surname' => ['required', 'string', 'max:255'],
254 'name_man' => ['required', 'string', 'max:255'], 254 'name_man' => ['required', 'string', 'max:255'],
255 'email' => ['required', 'string', 'email', 'max:255'], 255 'email' => ['required', 'string', 'email', 'max:255'],
256 256
257 ]; 257 ];
258 258
259 $messages = [ 259 $messages = [
260 'required' => 'Укажите обязательное поле', 260 'required' => 'Укажите обязательное поле',
261 'min' => [ 261 'min' => [
262 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 262 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
263 'integer' => 'Поле «:attribute» должно быть :min или больше', 263 'integer' => 'Поле «:attribute» должно быть :min или больше',
264 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 264 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
265 ], 265 ],
266 'max' => [ 266 'max' => [
267 'string' => 'Поле «:attribute» должно быть не больше :max символов', 267 'string' => 'Поле «:attribute» должно быть не больше :max символов',
268 'integer' => 'Поле «:attribute» должно быть :max или меньше', 268 'integer' => 'Поле «:attribute» должно быть :max или меньше',
269 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 269 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
270 ] 270 ]
271 ]; 271 ];
272 272
273 $validator = Validator::make($params, $rules, $messages); 273 $validator = Validator::make($params, $rules, $messages);
274 274
275 if ($validator->fails()) { 275 if ($validator->fails()) {
276 return redirect()->route('worker.cabinet')->withErrors($validator); 276 return redirect()->route('worker.cabinet')->withErrors($validator);
277 } else { 277 } else {
278 278
279 if ($request->has('photo')) { 279 if ($request->has('photo')) {
280 if (!empty($Worker->photo)) { 280 if (!empty($Worker->photo)) {
281 Storage::delete($Worker->photo); 281 Storage::delete($Worker->photo);
282 } 282 }
283 $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); 283 $params['photo'] = $request->file('photo')->store("worker/$id", 'public');
284 } 284 }
285 285
286 if ($request->has('file')) { 286 if ($request->has('file')) {
287 if (!empty($Worker->file)) { 287 if (!empty($Worker->file)) {
288 Storage::delete($Worker->file); 288 Storage::delete($Worker->file);
289 } 289 }
290 $params['file'] = $request->file('file')->store("worker/$id", 'public'); 290 $params['file'] = $request->file('file')->store("worker/$id", 'public');
291 } 291 }
292 292
293 $id_wor = $worker->update($params); 293 $id_wor = $worker->update($params);
294 294
295 $use = User_Model::find($id_wor); 295 $use = User_Model::find($id_wor);
296 $use->surname = $request->get('surname'); 296 $use->surname = $request->get('surname');
297 $use->name_man = $request->get('name_man'); 297 $use->name_man = $request->get('name_man');
298 $use->surname2 = $request->get('surname2'); 298 $use->surname2 = $request->get('surname2');
299 299
300 $use->save(); 300 $use->save();
301 $worker->job_titles()->sync($job_title_id); 301 $worker->job_titles()->sync($job_title_id);
302 302
303 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); 303 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены');
304 } 304 }
305 } 305 }
306 306
307 // Сообщения данные 307 // Сообщения данные
308 public function messages($type_message) 308 public function messages($type_message)
309 { 309 {
310 $user_id = Auth()->user()->id; 310 $user_id = Auth()->user()->id;
311 311
312 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 312 $messages_input = Message::query()->with('vacancies')->with('user_from')->
313 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 313 Where('to_user_id', $user_id)->OrderByDesc('created_at');
314 314
315 $messages_output = Message::query()->with('vacancies')-> 315 $messages_output = Message::query()->with('vacancies')->
316 with('user_to')->where('user_id', $user_id)-> 316 with('user_to')->where('user_id', $user_id)->
317 OrderByDesc('created_at'); 317 OrderByDesc('created_at');
318 318
319 319
320 $count_input = $messages_input->count(); 320 $count_input = $messages_input->count();
321 $count_output = $messages_output->count(); 321 $count_output = $messages_output->count();
322 322
323 if ($type_message == 'input') { 323 if ($type_message == 'input') {
324 $messages = $messages_input->paginate(15); 324 $messages = $messages_input->paginate(15);
325 } 325 }
326 326
327 if ($type_message == 'output') { 327 if ($type_message == 'output') {
328 $messages = $messages_output->paginate(15); 328 $messages = $messages_output->paginate(15);
329 } 329 }
330 // Вернуть все 100% 330 // Вернуть все 100%
331 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 331 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
332 } 332 }
333 333
334 // Избранный 334 // Избранный
335 public function favorite() 335 public function favorite()
336 { 336 {
337 return view('workers.favorite'); 337 return view('workers.favorite');
338 } 338 }
339 339
340 // Сменить пароль 340 // Сменить пароль
341 public function new_password() 341 public function new_password()
342 { 342 {
343 $email = Auth()->user()->email; 343 $email = Auth()->user()->email;
344 return view('workers.new_password', compact('email')); 344 return view('workers.new_password', compact('email'));
345 } 345 }
346 346
347 // Обновление пароля 347 // Обновление пароля
348 public function save_new_password(Request $request) { 348 public function save_new_password(Request $request) {
349 $use = Auth()->user(); 349 $use = Auth()->user();
350 $request->validate([ 350 $request->validate([
351 'password' => 'required|string', 351 'password' => 'required|string',
352 'new_password' => 'required|string', 352 'new_password' => 'required|string',
353 'new_password2' => 'required|string' 353 'new_password2' => 'required|string'
354 ]); 354 ]);
355 355
356 if ($request->get('new_password') == $request->get('new_password2')) 356 if ($request->get('new_password') == $request->get('new_password2'))
357 if ($request->get('password') !== $request->get('new_password')) { 357 if ($request->get('password') !== $request->get('new_password')) {
358 $credentials = $request->only('email', 'password'); 358 $credentials = $request->only('email', 'password');
359 if (Auth::attempt($credentials, $request->has('save_me'))) { 359 if (Auth::attempt($credentials, $request->has('save_me'))) {
360 360
361 if (!is_null($use->email_verified_at)){ 361 if (!is_null($use->email_verified_at)){
362 362
363 $user_data = User_Model::find($use->id); 363 $user_data = User_Model::find($use->id);
364 $user_data->update([ 364 $user_data->update([
365 'password' => Hash::make($request->get('new_password')), 365 'password' => Hash::make($request->get('new_password')),
366 'pubpassword' => base64_encode($request->get('new_password')), 366 'pubpassword' => base64_encode($request->get('new_password')),
367 ]); 367 ]);
368 return redirect() 368 return redirect()
369 ->route('worker.new_password') 369 ->route('worker.new_password')
370 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 370 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
371 } 371 }
372 372
373 return redirect() 373 return redirect()
374 ->route('worker.new_password') 374 ->route('worker.new_password')
375 ->withError('Данная учетная запись не было верифицированна!'); 375 ->withError('Данная учетная запись не было верифицированна!');
376 } 376 }
377 } 377 }
378 378
379 return redirect() 379 return redirect()
380 ->route('worker.new_password') 380 ->route('worker.new_password')
381 ->withErrors('Не совпадение данных, обновите пароли!'); 381 ->withErrors('Не совпадение данных, обновите пароли!');
382 } 382 }
383 383
384 // Удаление профиля форма 384 // Удаление профиля форма
385 public function delete_profile() 385 public function delete_profile()
386 { 386 {
387 $login = Auth()->user()->email; 387 $login = Auth()->user()->email;
388 return view('workers.delete_profile', compact('login')); 388 return view('workers.delete_profile', compact('login'));
389 } 389 }
390 390
391 // Удаление профиля код 391 // Удаление профиля код
392 public function delete_profile_result(Request $request) { 392 public function delete_profile_result(Request $request) {
393 $Answer = $request->all(); 393 $Answer = $request->all();
394 $user_id = Auth()->user()->id; 394 $user_id = Auth()->user()->id;
395 $request->validate([ 395 $request->validate([
396 'password' => 'required|string', 396 'password' => 'required|string',
397 ]); 397 ]);
398 398
399 $credentials = $request->only('email', 'password'); 399 $credentials = $request->only('email', 'password');
400 if (Auth::attempt($credentials)) { 400 if (Auth::attempt($credentials)) {
401 Auth::logout(); 401 Auth::logout();
402 $it = User_Model::find($user_id); 402 $it = User_Model::find($user_id);
403 $it->delete(); 403 $it->delete();
404 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 404 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
405 } else { 405 } else {
406 return redirect()->route('worker.delete_profile') 406 return redirect()->route('worker.delete_profile')
407 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 407 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
408 } 408 }
409 } 409 }
410 410
411 // Регистрация соискателя 411 // Регистрация соискателя
412 public function register_worker(Request $request) 412 public function register_worker(Request $request)
413 { 413 {
414 $params = $request->all(); 414 $params = $request->all();
415 $params['is_worker'] = 1; 415 $params['is_worker'] = 1;
416 416
417 $rules = [ 417 $rules = [
418 'surname' => ['required', 'string', 'max:255'], 418 'surname' => ['required', 'string', 'max:255'],
419 'name_man' => ['required', 'string', 'max:255'], 419 'name_man' => ['required', 'string', 'max:255'],
420 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 420 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
421 'password' => ['required', 'string', 'min:8'] 421 'password' => ['required', 'string', 'min:8']
422 ]; 422 ];
423 423
424 $messages = [ 424 $messages = [
425 'required' => 'Укажите обязательное поле', 425 'required' => 'Укажите обязательное поле',
426 'min' => [ 426 'min' => [
427 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 427 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
428 'integer' => 'Поле «:attribute» должно быть :min или больше', 428 'integer' => 'Поле «:attribute» должно быть :min или больше',
429 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 429 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
430 ], 430 ],
431 'max' => [ 431 'max' => [
432 'string' => 'Поле «:attribute» должно быть не больше :max символов', 432 'string' => 'Поле «:attribute» должно быть не больше :max символов',
433 'integer' => 'Поле «:attribute» должно быть :max или меньше', 433 'integer' => 'Поле «:attribute» должно быть :max или меньше',
434 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 434 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
435 ] 435 ]
436 ]; 436 ];
437 437
438 if ($request->get('password') !== $request->get('confirmed')){ 438 if ($request->get('password') !== $request->get('confirmed')){
439 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 439 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
440 } 440 }
441 441
442 $haystack = $request->get('password'); 442 $haystack = $request->get('password');
443 443
444 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); 444 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?');
445 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 445 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z',
446 'X', 'C', 'V', 'B', 'N', 'M'); 446 'X', 'C', 'V', 'B', 'N', 'M');
447 $spec_bool = false; 447 $spec_bool = false;
448 $alpha_bool = false; 448 $alpha_bool = false;
449 449
450 foreach ($specsumbol as $it) { 450 foreach ($specsumbol as $it) {
451 if (strpos($haystack, $it) !== false) { 451 if (strpos($haystack, $it) !== false) {
452 $spec_bool = true; 452 $spec_bool = true;
453 } 453 }
454 } 454 }
455 455
456 foreach ($alpha as $it) { 456 foreach ($alpha as $it) {
457 if (strpos($haystack, $it) !== false) { 457 if (strpos($haystack, $it) !== false) {
458 $alpha_bool = true; 458 $alpha_bool = true;
459 } 459 }
460 } 460 }
461 461
462 if ((!$spec_bool) || (!$alpha_bool)) { 462 if ((!$spec_bool) || (!$alpha_bool)) {
463 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); 463 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?"));
464 } 464 }
465 465
466 if (($request->has('politik')) && ($request->get('politik') == 1)) { 466 if (($request->has('politik')) && ($request->get('politik') == 1)) {
467 $validator = Validator::make($request->all(), $rules, $messages); 467 $validator = Validator::make($request->all(), $rules, $messages);
468 468
469 if ($validator->fails()) { 469 if ($validator->fails()) {
470 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 470 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
471 } else { 471 } else {
472 $user = $this->create($params); 472 $user = $this->create($params);
473 event(new Registered($user)); 473 event(new Registered($user));
474 Auth::guard()->login($user); 474 Auth::guard()->login($user);
475 } 475 }
476 if ($user) { 476 if ($user) {
477 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; 477 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));;
478 } else { 478 } else {
479 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 479 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
480 } 480 }
481 481
482 } else { 482 } else {
483 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); 483 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!"));
484 } 484 }
485 } 485 }
486 486
487 // Звездная оценка и ответ 487 // Звездная оценка и ответ
488 public function stars_answer(Request $request) { 488 public function stars_answer(Request $request) {
489 $params = $request->all(); 489 $params = $request->all();
490 $rules = [ 490 $rules = [
491 'message' => ['required', 'string', 'max:255'], 491 'message' => ['required', 'string', 'max:255'],
492 ]; 492 ];
493 493
494 $messages = [ 494 $messages = [
495 'required' => 'Укажите обязательное поле', 495 'required' => 'Укажите обязательное поле',
496 'min' => [ 496 'min' => [
497 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 497 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
498 'integer' => 'Поле «:attribute» должно быть :min или больше', 498 'integer' => 'Поле «:attribute» должно быть :min или больше',
499 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 499 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
500 ], 500 ],
501 'max' => [ 501 'max' => [
502 'string' => 'Поле «:attribute» должно быть не больше :max символов', 502 'string' => 'Поле «:attribute» должно быть не больше :max символов',
503 'integer' => 'Поле «:attribute» должно быть :max или меньше', 503 'integer' => 'Поле «:attribute» должно быть :max или меньше',
504 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 504 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
505 ] 505 ]
506 ]; 506 ];
507 $response_worker = ResponseWork::create($params); 507 $response_worker = ResponseWork::create($params);
508 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); 508 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!');
509 } 509 }
510 510
511 // Создание пользователя 511 // Создание пользователя
512 protected function create(array $data) 512 protected function create(array $data)
513 { 513 {
514 $Use = new User(); 514 $Use = new User();
515 $Code_user = $Use->create([ 515 $Code_user = $Use->create([
516 'name' => $data['surname']." ".$data['name_man'], 516 'name' => $data['surname']." ".$data['name_man'],
517 'name_man' => $data['name_man'], 517 'name_man' => $data['name_man'],
518 'surname' => $data['surname'], 518 'surname' => $data['surname'],
519 'surname2' => $data['surname2'], 519 'surname2' => $data['surname2'],
520 'subscribe_email' => $data['email'], 520 'subscribe_email' => $data['email'],
521 'email' => $data['email'], 521 'email' => $data['email'],
522 'telephone' => $data['telephone'], 522 'telephone' => $data['telephone'],
523 'password' => Hash::make($data['password']), 523 'password' => Hash::make($data['password']),
524 'pubpassword' => base64_encode($data['password']), 524 'pubpassword' => base64_encode($data['password']),
525 'email_verified_at' => Carbon::now() 525 'email_verified_at' => Carbon::now()
526 ]); 526 ]);
527 if ($Code_user->id > 0) { 527 if ($Code_user->id > 0) {
528 $Worker = new Worker(); 528 $Worker = new Worker();
529 $Worker->user_id = $Code_user->id; 529 $Worker->user_id = $Code_user->id;
530 $Worker->position_work = $data['job_titles']; 530 $Worker->position_work = $data['job_titles'];
531 $Worker->email = $data['email']; 531 $Worker->email = $data['email'];
532 $Worker->telephone = $data['telephone']; 532 $Worker->telephone = $data['telephone'];
533 $Worker->save(); 533 $Worker->save();
534 534
535 return $Code_user; 535 return $Code_user;
536 } 536 }
537 } 537 }
538 538
539 // Вакансии избранные 539 // Вакансии избранные
540 public function colorado(Request $request) { 540 public function colorado(Request $request) {
541 $IP_address = RusDate::ip_addr_client(); 541 $IP_address = RusDate::ip_addr_client();
542 $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 542 $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
543 543
544 if ($Arr->count()) { 544 if ($Arr->count()) {
545 $A = Array(); 545 $A = Array();
546 foreach ($Arr as $it) { 546 foreach ($Arr as $it) {
547 $A[] = $it->code_record; 547 $A[] = $it->code_record;
548 } 548 }
549 549
550 $Query = Ad_employer::query()->whereIn('id', $A); 550 $Query = Ad_employer::query()->whereIn('id', $A);
551 } else { 551 } else {
552 $Query = Ad_employer::query()->where('id', '=', '0'); 552 $Query = Ad_employer::query()->where('id', '=', '0');
553 } 553 }
554 554
555 $Query = $Query->with('jobs')-> 555 $Query = $Query->with('jobs')->
556 with('cat')-> 556 with('cat')->
557 with('employer')-> 557 with('employer')->
558 whereHas('jobs_code', function ($query) use ($request) { 558 whereHas('jobs_code', function ($query) use ($request) {
559 if ($request->ajax()) { 559 if ($request->ajax()) {
560 if (null !== ($request->get('job'))) { 560 if (null !== ($request->get('job'))) {
561 $query->where('job_title_id', $request->get('job')); 561 $query->where('job_title_id', $request->get('job'));
562 } 562 }
563 } 563 }
564 })->select('ad_employers.*'); 564 })->select('ad_employers.*');
565 565
566 $Job_title = Job_title::query()->OrderBy('name')->get(); 566 $Job_title = Job_title::query()->OrderBy('name')->get();
567 567
568 $Query_count = $Query->count(); 568 $Query_count = $Query->count();
569 569
570 $Query = $Query->OrderBy('updated_at')->paginate(3); 570 $Query = $Query->OrderBy('updated_at')->paginate(3);
571 571
572 return view('workers.favorite', compact('Query', 572 return view('workers.favorite', compact('Query',
573 'Query_count', 573 'Query_count',
574 'Job_title')); 574 'Job_title'));
575 575
576 } 576 }
577 577
578 //Переписка 578 //Переписка
579 public function dialog(User_Model $user1, User_Model $user2) { 579 public function dialog(User_Model $user1, User_Model $user2) {
580 if (isset($user2->id)) { 580 if (isset($user2->id)) {
581 $companion = User_Model::query()->with('workers')-> 581 $companion = User_Model::query()->with('workers')->
582 with('employers')-> 582 with('employers')->
583 where('id', $user2->id)->first(); 583 where('id', $user2->id)->first();
584 } 584 }
585 585
586 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 586 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
587 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 587 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
588 })->orWhere(function($query) use ($user1, $user2) { 588 })->orWhere(function($query) use ($user1, $user2) {
589 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 589 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
590 })->OrderBy('created_at')->get(); 590 })->OrderBy('created_at')->get();
591 591
592 $id_vac = null; 592 $id_vac = null;
593 foreach ($Messages as $it) { 593 foreach ($Messages as $it) {
594 if (isset($it->response)) { 594 if (isset($it->response)) {
595 foreach ($it->response as $r) { 595 foreach ($it->response as $r) {
596 if (isset($r->ad_employer_id)) { 596 if (isset($r->ad_employer_id)) {
597 $id_vac = $r->ad_employer_id; 597 $id_vac = $r->ad_employer_id;
598 break; 598 break;
599 } 599 }
600 } 600 }
601 } 601 }
602 if (!is_null($id_vac)) break; 602 if (!is_null($id_vac)) break;
603 } 603 }
604 604
605 $ad_employer = null; 605 $ad_employer = null;
606 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 606 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
607 $sender = $user1; 607 $sender = $user1;
608 608
609 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 609 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
610 } 610 }
611 611
612 // Даунылоады 612 // Даунылоады
613 public function download(Worker $worker) { 613 public function download(Worker $worker) {
614 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; 614 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...'];
615 view()->share('house',$arr_house); 615 view()->share('house',$arr_house);
616 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); 616 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape');
617 return $pdf->stream(); 617 return $pdf->stream();
618 } 618 }
619 619
620 // Поднятие анкеты 620 // Поднятие анкеты
621 public function up(Worker $worker) { 621 public function up(Worker $worker) {
622 $worker->updated_at = Carbon::now(); 622 $worker->updated_at = Carbon::now();
623 $worker->save(); 623 $worker->save();
624 // 0 624 // 0
625 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); 625 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных');
626 } 626 }
627 627
628 // Форма сертификате
629 public function new_sertificate(Worker $worker) {
630 return view('workers.sertificate_add', compact('worker'));
631 }
632
628 // Добавление сертификата 633 // Добавление сертификата
629 public function add_serificate(Request $request) { 634 public function add_serificate(Request $request) {
630 $params = $request->all(); 635 $params = $request->all();
631 $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); 636
632 $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin']));
633 $Sertificate = new sertification(); 637 $Sertificate = new sertification();
634 $Sertificate->create($params); 638 $Sertificate->create($params);
635 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); 639 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get();
636 return view('ajax.documents', compact('Docs')); 640 return redirect()->route('worker.cabinet');
641 //return view('ajax.documents', compact('Docs'));
637 } 642 }
638 643
644 public function delete_diplom(Request $request, Worker $worker) {
645 $infoblok_id = $request->get('infoblok_id');
646 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete();
647
648 //$Infoblocks = infobloks::query()->get();
649 return redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks'));
650 }
639 651
640 // Удалить сертификат 652 // Удалить сертификат
641 public function delete_sertificate(sertification $doc) { 653 public function delete_sertificate(sertification $doc) {
642 $doc->delete(); 654 $doc->delete();
643 655
644 return redirect()->route('worker.cabinet'); 656 return redirect()->route('worker.cabinet');
645 } 657 }
646 658
647 // Добавление диплома 659 // Добавление диплома
648 public function add_diplom_ajax(Request $request) { 660 public function add_diplom_ajax(Request $request) {
649 // конец 661 // конец
650 $params = $request->all(); 662 $params = $request->all();
651 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 663 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
652 664
653 if ($count == 0) $dop_info = Dop_info::create($params); 665 if ($count == 0) $dop_info = Dop_info::create($params);
654 $Infoblocks = infobloks::query()->get(); 666 $Infoblocks = infobloks::query()->get();
655 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); 667 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get();
656 $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); 668 $data = Dop_info::query()->where('worker_id', $request->has('worker_id'));
657 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); 669 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker'));
658 } 670 }
659 671
660 // Добавление диплома без ajax 672 // Добавление диплома без ajax
661 public function add_diplom(Worker $worker) { 673 public function add_diplom(Worker $worker) {
662 $worker_id = $worker->id; 674 $worker_id = $worker->id;
663 $Infoblocks = infobloks::query()->get(); 675 $Infoblocks = infobloks::query()->get();
664 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); 676 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks'));
665 } 677 }
666 // Сохранить 678 // Сохранить
667 // Сохраняю диплом 679 // Сохраняю диплом
668 public function add_diplom_save(Request $request) { 680 public function add_diplom_save(Request $request) {
669 $params = $request->all(); 681 $params = $request->all();
670 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 682 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
671 if ($count == 0) $dop_info = Dop_info::create($params); 683 if ($count == 0) $dop_info = Dop_info::create($params);
672 return redirect()->route('worker.cabinet'); 684 return redirect()->route('worker.cabinet');
673 } 685 }
674 686
675 // Добавление стандартного документа 687 // Добавление стандартного документа
676 public function add_document(Worker $worker) { 688 public function add_document(Worker $worker) {
677 return view('workers.docs', compact('worker')); 689 return view('workers.docs', compact('worker'));
678 } 690 }
679 691
680 //Сохранение стандартого документа 692 //Сохранение стандартого документа
681 public function add_document_save(DocumentsRequest $request) { 693 public function add_document_save(DocumentsRequest $request) {
682 $params = $request->all(); 694 $params = $request->all();
683 $place_work = place_works::create($params); 695 $place_work = place_works::create($params);
684 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); 696 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!');
685 } 697 }
686 698
687 // Редактирование документа 699 // Редактирование документа
688 public function edit_document(place_works $doc, Worker $worker) { 700 public function edit_document(place_works $doc, Worker $worker) {
689 return view('workers.docs-edit', compact('doc', 'worker')); 701 return view('workers.docs-edit', compact('doc', 'worker'));
690 } 702 }
691 703
692 //Сохранение отредактированного документа 704 //Сохранение отредактированного документа
693 public function edit_document_save(DocumentsRequest $request, place_works $doc) { 705 public function edit_document_save(DocumentsRequest $request, place_works $doc) {
694 $params = $request->all(); 706 $params = $request->all();
695 $doc->update($params); 707 $doc->update($params);
696 708
697 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); 709 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
698 } 710 }
699 711
700 // Удаление документа 712 // Удаление документа
701 public function delete_document(place_works $doc) { 713 public function delete_document(place_works $doc) {
702 $doc->delete(); 714 $doc->delete();
703 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); 715 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!');
704 } 716 }
705 717
706 //Отправка нового сообщения 718 //Отправка нового сообщения
707 public function new_message(Request $request) { 719 public function new_message(Request $request) {
708 $params = $request->all(); 720 $params = $request->all();
709 721
710 $id = $params['send_user_id']; 722 $id = $params['send_user_id'];
711 $message = new Message(); 723 $message = new Message();
712 $message->user_id = $params['send_user_id']; 724 $message->user_id = $params['send_user_id'];
713 $message->to_user_id = $params['send_to_user_id']; 725 $message->to_user_id = $params['send_to_user_id'];
714 $message->title = $params['send_title']; 726 $message->title = $params['send_title'];
715 $message->text = $params['send_text']; 727 $message->text = $params['send_text'];
716 if ($request->has('send_file')) { 728 if ($request->has('send_file')) {
717 $message->file = $request->file('send_file')->store("worker/$id", 'public'); 729 $message->file = $request->file('send_file')->store("worker/$id", 'public');
718 } 730 }
719 $message->flag_new = 1; 731 $message->flag_new = 1;
720 $id_message = $message->save(); 732 $id_message = $message->save();
721 733
722 $data['message_id'] = $id_message; 734 $data['message_id'] = $id_message;
723 $data['ad_employer_id'] = $params['send_vacancy']; 735 $data['ad_employer_id'] = $params['send_vacancy'];
724 $data['job_title_id'] = $params['send_job_title_id']; 736 $data['job_title_id'] = $params['send_job_title_id'];
725 $data['flag'] = 1; 737 $data['flag'] = 1;
726 $ad_responce = ad_response::create($data); 738 $ad_responce = ad_response::create($data);
727 return redirect()->route('worker.messages', ['type_message' => 'output']); 739 return redirect()->route('worker.messages', ['type_message' => 'output']);
728 } 740 }
729 741
730 } 742 }
731 743
app/Http/Requests/RequestAdminNews.php
File was created 1 <?php
2
3 namespace App\Http\Requests;
4
5 use Illuminate\Foundation\Http\FormRequest;
6
7 class RequestAdminNews extends FormRequest
8 {
9 /**
10 * Determine if the user is authorized to make this request.
11 *
12 * @return bool
13 */
14 public function authorize()
15 {
16 return true;
17 }
18
19 /**
20 * Get the validation rules that apply to the request.
21 *
22 * @return array<string, mixed>
23 */
24 public function rules()
25 {
26 return [
27 //
28 ];
29 }
30 }
31
resources/views/admin/news/add.blade.php
File was created 1 @extends('layout.admin', ['title' => 'Админка - Добавление новости'])
2
3 @section('content')
4 <form method="POST" action="{{ route('admin.new_admin_save_add') }}" enctype="multipart/form-data">
5 @csrf
6 @include('admin.news.form')
7 </form>
8 @endsection
9
resources/views/admin/news/edit.blade.php
File was created 1 @extends('layout.admin', ['title' => 'Админка - Редактирование новости'])
2
3 @section('content')
4 <form method="POST" action="{{ route('admin.new_admin_update', ['new' => $new->id]) }}" enctype="multipart/form-data">
5 @csrf
6 @include('admin.news.form')
7 </form>
8 @endsection
9
resources/views/admin/news/form.blade.php
File was created 1
2 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
3 <label class="block text-sm">
4 <span class="text-gray-700 dark:text-gray-400">Заголовой новости</span>
5 <input name="title" id="title"
6 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 placeholder="Заголовой новости" value="{{ old('title') ?? (isset($new->title)) ? $new->title : '' }}"
8 />
9 @error('title')
10 <span class="text-xs text-red-600 dark:text-red-400">
11 {{ $message }}
12 </span>
13 @enderror
14 </label><br>
15
16 <label class="block text-sm">
17 <span class="text-gray-700 dark:text-gray-400">Код в URL-строке</span>
18 <input name="slug" id="slug"
19 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"
20 placeholder="Код в URL-строке" value="{{ old('slug') ?? (isset($new->slug)) ? $new->slug : '' }}"
21 />
22 @error('slug')
23 <span class="text-xs text-red-600 dark:text-red-400">
24 {{ $message }}
25 </span>
26 @enderror
27 </label><br>
28
29 <label class="block text-sm">
30 <span class="text-gray-700 dark:text-gray-400">Текст</span>
31 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" id="text" placeholder="Текст (html)" required
32 rows="10">{{ old('text') ?? $new->text ?? '' }}</textarea>
33 @error('text')
34 <span class="text-xs text-red-600 dark:text-red-400">
35 {{ $message }}
36 </span>
37 @enderror
38 </label><br>
39
40 <label class="block text-sm">
41 <span class="text-gray-700 dark:text-gray-400">Картинка</span>
42 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600
43 dark:bg-gray-700 focus:border-purple-400
44 focus:outline-none focus:shadow-outline-purple
45 dark:text-gray-300 dark:focus:shadow-outline-gray
46 form-input"
47 id="image" name="image" accept="image/png, image/jpeg">
48 @error('image')
49 <span class="text-xs text-red-600 dark:text-red-400">
50 {{ $message }}
51 </span>
52 @enderror
53 @isset($new->image)
54 <img src="{{asset(Storage::url($new->image))}}" width="100px"/>
55 @endisset
56
57 </label><br>
58
59 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
60 <div>
61 <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">
62 Сохранить
63 </button>
64 <a href="{{ route('admin.news_admin') }}"
65 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"
66 style="display: -webkit-inline-box; height: 30px!important;"
67 >Назад</a>
68 </div>
69 </div>
70 </div>
71 <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
72 <script>
73 CKEDITOR.replace( 'text', {
74 filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}",
75 filebrowserUploadMethod: 'form'
76 });
77 </script>
78
resources/views/admin/news/list.blade.php
File was created 1 @extends('layout.admin', ['title' => 'Админка - Реклама сайта'])
2
3 @section('script')
4 <script>
5 $(document).ready(function() {
6 $(document).on('click', '.btn-eye', function () {
7 var this_ = $(this);
8 var status_ = this_.attr('data-status');
9 var id_ = this_.attr('data-id');
10 var ajax_block = $('#ajax_block');
11
12 $.ajax({
13 type: "GET",
14 url: "{{ url()->full()}}",
15 data: "id=" + id_ + "&status=" + status_,
16 success: function (data) {
17 console.log('Обновление таблицы ');
18 //data = JSON.parse(data);
19 //console.log(data);
20 ajax_block.html(data);
21 },
22 headers: {
23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
24 },
25 error: function (data) {
26 console.log('Error: ' + data);
27 }
28 });
29 });
30 });
31 </script>
32
33 @endsection
34
35 @section('modal')
36 @include('admin.reclames.modal')
37 @endsection
38
39 @section('search')
40
41 @endsection
42
43 @section('content')
44
45 <a href="{{ route('admin.new_admin_add') }}" style="width: 160px" 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">
46 Добавить новость
47 </a>
48 <br>
49
50 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
51
52
53 <div class="w-full overflow-x-auto">
54 <table class="w-full whitespace-no-wrap">
55 <thead>
56 <tr
57 class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
58 >
59 <th class="px-4 py-3">№</th>
60 <th class="px-4 py-3">Заголовок новости</th>
61 <th class="px-4 py-3">Дата публикации/редактирования</th>
62 <th class="px-4 py-3">Редактировать</th>
63 </tr>
64 </thead>
65 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
66 @foreach($news as $new)
67 <tr class="text-gray-700 dark:text-gray-400">
68 <td class="px-4 py-3">
69 {{$new->id}}
70 </td>
71 <td class="px-4 py-3">
72 {{$new->title}}
73 </td>
74
75 <td class="px-4 py-3">
76 {{ $new->created_at }} / {{ $new->updated_at }}
77 </td>
78 <td class="px-4 py-3 text-sm_">
79 <a href="{{ route('admin.new_admin_edit', ['new' => $new->id]) }}" style="float:left">Изменить</a> |
80 <a href="{{ route('admin.new_admin_delete', ['new' => $new->id]) }}" class="btn_del btn btn-danger">Удалить</a>
81 </td>
82 </tr>
83 @endforeach
84 </tbody>
85 </table>
86 </div>
87
88 <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800">
89 <?=$news->appends($_GET)->links('admin.pagginate'); ?>
90 </div>
91 </div>
92 @endsection
93
resources/views/employers/cabinet45.blade.php
1 @extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Кабинет работодателя - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> 4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 <script> 5 <script>
6 ClassicEditor 6 ClassicEditor
7 .create( document.querySelector( '#txtarea' ) ) 7 .create( document.querySelector( '#txtarea' ) )
8 .catch( error => { 8 .catch( error => {
9 console.error( error ); 9 console.error( error );
10 } ); 10 } );
11 </script> 11 </script>
12 @endsection 12 @endsection
13 @section('content') 13 @section('content')
14 <section class="cabinet"> 14 <section class="cabinet">
15 <div class="container"> 15 <div class="container">
16 <ul class="breadcrumbs cabinet__breadcrumbs"> 16 <ul class="breadcrumbs cabinet__breadcrumbs">
17 <li><a href="{{ route('index') }}">Главная</a></li> 17 <li><a href="{{ route('index') }}">Главная</a></li>
18 <li><b>Личный кабинет</b></li> 18 <li><b>Личный кабинет</b></li>
19 </ul> 19 </ul>
20 <div class="cabinet__wrapper"> 20 <div class="cabinet__wrapper">
21 <div class="cabinet__side"> 21 <div class="cabinet__side">
22 <div class="cabinet__side-toper"> 22 <div class="cabinet__side-toper">
23 @include('employers.emblema') 23 @include('employers.emblema')
24 </div> 24 </div>
25 25
26 @include('employers.menu', ['item' => 1]) 26 @include('employers.menu', ['item' => 1])
27 27
28 </div> 28 </div>
29 <div class="cabinet__body"> 29 <div class="cabinet__body">
30 @include('messages_error') 30 @include('messages_error')
31 31
32 <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data"> 32 <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data">
33 @csrf 33 @csrf
34 <div class="cabinet__body-item"> 34 <div class="cabinet__body-item">
35 <div class="cabinet__descr"> 35 <div class="cabinet__descr">
36 <h2 class="title cabinet__title">Мой профиль</h2> 36 <h2 class="title cabinet__title">Мой профиль</h2>
37 <p class="cabinet__text">Все поля обязательны для заполнения *</p> 37 <p class="cabinet__text">Все поля обязательны для заполнения *</p>
38 </div> 38 </div>
39 <div class="cabinet__avatar"> 39 <div class="cabinet__avatar">
40 <div class="cabinet__avatar-pic"> 40 <div class="cabinet__avatar-pic">
41 @if (!empty($Employer[0]->logo)) 41 @if (!empty($Employer[0]->logo))
42 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> 42 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}">
43 @else 43 @else
44 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> 44 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/>
45 @endif 45 @endif
46 </div> 46 </div>
47 <div class="cabinet__avatar-form"> 47 <div class="cabinet__avatar-form">
48 <label class="file"> 48 <label class="file">
49 <span class="file__input"> 49 <span class="file__input">
50 <input type="file" name="logo"> 50 <input type="file" name="logo">
51 <span class="button"> 51 <span class="button">
52 <svg> 52 <svg>
53 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 53 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
54 </svg> 54 </svg>
55 Загрузить 55 Загрузить
56 </span> 56 </span>
57 </span> 57 </span>
58 </label> 58 </label>
59 <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p> 59 <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p>
60 </div> 60 </div>
61 </div> 61 </div>
62 <div class="cabinet__inputs"> 62 <div class="cabinet__inputs">
63 <div class="cabinet__inputs-item form-group"> 63 <div class="cabinet__inputs-item form-group">
64 <label class="form-group__label">Название судоходной компании</label> 64 <label class="form-group__label">Название судоходной компании</label>
65 <div class="form-group__item"> 65 <div class="form-group__item">
66 <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required> 66 <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required>
67 @error('name_company') 67 @error('name_company')
68 <span class="text-xs text-red-600"> 68 <span class="text-xs text-red-600">
69 {{ $message }} 69 {{ $message }}
70 </span> 70 </span>
71 @enderror 71 @enderror
72 </div> 72 </div>
73 </div> 73 </div>
74 <div class="cabinet__inputs-item form-group"> 74 <div class="cabinet__inputs-item form-group">
75 <label class="form-group__label">Электронная почта</label> 75 <label class="form-group__label">Электронная почта</label>
76 <div class="form-group__item"> 76 <div class="form-group__item">
77 <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required> 77 <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required>
78 @error('email') 78 @error('email')
79 <span class="text-xs text-red-600"> 79 <span class="text-xs text-red-600">
80 {{ $message }} 80 {{ $message }}
81 </span> 81 </span>
82 @enderror 82 @enderror
83 </div> 83 </div>
84 </div> 84 </div>
85 85
86 <div class="cabinet__inputs-item form-group"> 86 <div class="cabinet__inputs-item form-group">
87 <label class="form-group__label">Электронная почта (alt)</label> 87 <label class="form-group__label">Электронная почта (alt)</label>
88 <div class="form-group__item"> 88 <div class="form-group__item">
89 <input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}"> 89 <input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}">
90 @error('email') 90 @error('email')
91 <span class="text-xs text-red-600"> 91 <span class="text-xs text-red-600">
92 {{ $message }} 92 {{ $message }}
93 </span> 93 </span>
94 @enderror 94 @enderror
95 </div> 95 </div>
96 </div> 96 </div>
97 97
98 <div class="cabinet__inputs-item form-group"> 98 <div class="cabinet__inputs-item form-group">
99 <label class="form-group__label">Номер телефона</label> 99 <label class="form-group__label">Номер телефона</label>
100 <div class="form-group__item"> 100 <div class="form-group__item">
101 <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required> 101 <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required>
102 @error('telephone') 102 @error('telephone')
103 <span class="text-xs text-red-600"> 103 <span class="text-xs text-red-600">
104 {{ $message }} 104 {{ $message }}
105 </span> 105 </span>
106 @enderror 106 @enderror
107 </div> 107 </div>
108 </div> 108 </div>
109 109
110 <div class="cabinet__inputs-item form-group"> 110 <div class="cabinet__inputs-item form-group">
111 <label class="form-group__label">Номер телефона (alt)</label> 111 <label class="form-group__label">Номер телефона (alt)</label>
112 <div class="form-group__item"> 112 <div class="form-group__item">
113 <input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}"> 113 <input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}">
114 @error('telephone') 114 @error('telephone')
115 <span class="text-xs text-red-600"> 115 <span class="text-xs text-red-600">
116 {{ $message }} 116 {{ $message }}
117 </span> 117 </span>
118 @enderror 118 @enderror
119 </div> 119 </div>
120 </div> 120 </div>
121 121
122 <div class="cabinet__inputs-item form-group"> 122 <div class="cabinet__inputs-item form-group">
123 <label class="form-group__label">Адрес компании</label> 123 <label class="form-group__label">Адрес компании</label>
124 <div class="form-group__item"> 124 <div class="form-group__item">
125 <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required> 125 <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required>
126 @error('address') 126 @error('address')
127 <span class="text-xs text-red-600"> 127 <span class="text-xs text-red-600">
128 {{ $message }} 128 {{ $message }}
129 </span> 129 </span>
130 @enderror 130 @enderror
131 </div> 131 </div>
132 </div> 132 </div>
133 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 133 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
134 <label class="form-group__label">Ссылка на сайт</label> 134 <label class="form-group__label">Ссылка на сайт</label>
135 <div class="form-group__item"> 135 <div class="form-group__item">
136 <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required> 136 <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required>
137 @error('site') 137 @error('site')
138 <span class="text-xs text-red-600"> 138 <span class="text-xs text-red-600">
139 {{ $message }} 139 {{ $message }}
140 </span> 140 </span>
141 @enderror 141 @enderror
142 </div> 142 </div>
143 </div> 143 </div>
144 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 144 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
145 <label class="form-group__label">О компании</label> 145 <label class="form-group__label">О компании</label>
146 <div class="form-group__item"> 146 <div class="form-group__item">
147 <textarea name="text" id="txtarea" class="textarea ckeditor" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> 147 <textarea name="text" id="txtarea" class="textarea ckeditor" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea>
148 @error('text') 148 @error('text')
149 <span class="text-xs text-red-600"> 149 <span class="text-xs text-red-600">
150 {{ $message }} 150 {{ $message }}
151 </span> 151 </span>
152 @enderror 152 @enderror
153 </div> 153 </div>
154 </div> 154 </div>
155 </div> 155 </div>
156 </div><br> 156 </div><br>
157 <button type="submit" class="button cabinet__submit">Сохранить изменения</button> 157 <button type="submit" class="button cabinet__submit">Сохранить изменения</button>
158 </form> 158 </form>
159 159
160 <div class="cabinet__body-item">
161 <div class="cabinet__descr">
162 <h2 class="title cabinet__title">Мой флот</h2>
163 </div>
164
165 <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data">
166 @csrf
167 <label class="cabinet__add-pic" style="vertical-align: top">
168 <input type="file" name="image" id="image">
169 @error('image')
170 <span class="text-xs text-red-600">
171 {{ $message }}
172 </span>
173 @enderror
174 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/>
175 <svg>
176 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
177 </svg>
178 <span>
179 <svg>
180 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
181 </svg>
182 Загрузить фото
183 </span>
184 </label>
185
186 <div class="cabinet__add-body">
187 <div class="form-group">
188 <label class="form-group__label">Название корабля</label>
189 <div class="form-group__item">
190 <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required>
191 @error('name')
192 <span class="text-xs text-red-600">
193 {{ $message }}
194 </span>
195 @enderror
196 </div>
197 </div>
198 <div class="form-group">
199 <label class="form-group__label">Описание</label>
200 <div class="form-group__item">
201 <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required>
202 @error('text')
203 <span class="text-xs text-red-600">
204 {{ $message }}
205 </span>
206 @enderror
207 </div>
208 </div>
209 <div class="form-group">
210 <label class="form-group__label">Регион</label>
211 <div class="form-group__item">
212 <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required>
213 @error('region')
214 <span class="text-xs text-red-600">
215 {{ $message }}
216 </span>
217 @enderror
218 </div>
219 </div>
220 <div class="form-group">
221 <label class="form-group__label">Мощность</label>
222 <div class="form-group__item">
223 <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required>
224 @error('power')
225 <span class="text-xs text-red-600">
226 {{ $message }}
227 </span>
228 @enderror
229 </div>
230 </div>
231 <div class="form-group">
232 <label class="form-group__label">DWT</label>
233 <div class="form-group__item">
234 <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т">
235 @error('DWT')
236 <span class="text-xs text-red-600">
237 {{ $message }}
238 </span>
239 @enderror
240 </div>
241 </div>
242 <div class="form-group">
243 <label class="form-group__label">Мощность ГД</label>
244 <div class="form-group__item">
245 <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт">
246 @error('POWER_GD')
247 <span class="text-xs text-red-600">
248 {{ $message }}
249 </span>
250 @enderror
251 </div>
252 </div>
253 <div class="form-group">
254 <label class="form-group__label">IMO</label>
255 <div class="form-group__item">
256 <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275">
257 @error('IMO')
258 <span class="text-xs text-red-600">
259 {{ $message }}
260 </span>
261 @enderror
262 </div>
263 </div>
264 <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button>
265 </div>
266
267 </form>
268
269 <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div">
270 @if (isset($Employer[0]->flots))
271 @if ($Employer[0]->flots->count())
272 @foreach ($Employer[0]->flots as $it)
273 <div class="cabinet__fleet-item main__employer-page-one-item">
274 <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}">
275 <svg>
276 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
277 </svg>
278 </a>
279 @if (!empty($it->image))
280 <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}">
281 @else
282 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/>
283 @endif
284 <b>{{ $it->name }}</b>
285 <span>{{ $it->region }}</span>
286 <span><i>DWT</i>{{ $it->DWT }}</span>
287 <span><i>Мощность ГД</i>{{ $it->POWER_GD }}</span>
288 <span><i>IMO</i>{{ $it->IMO }}</span>
289 <span>{{ $it->power }}</span>
290 </div>
291 @endforeach
292 @endif
293 @endif
294 </div>
295 </div>
296 </div> 160 </div>
297 </div> 161 </div>
298 </div> 162 </div>
299 163
300 </section> 164 </section>
301 </div> 165 </div>
302 <!-- END TOP WRAPPER --> 166 <!-- END TOP WRAPPER -->
303 @endsection 167 @endsection
304 168
resources/views/employers/delete_people.blade.php
1 @extends('layout.frontend', ['title' => 'Удаление пользователя - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Удаление пользователя - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Validation password'); 5 console.log('Validation password');
6 $(document).on('submit', '#form_del', function() { 6 $(document).on('submit', '#form_del', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var email = $('#email').val(); 8 var email = $('#email').val();
9 var password = $('#password').val(); 9 var password = $('#password').val();
10 10
11 $.ajax({ 11 $.ajax({
12 type: "GET", 12 type: "GET",
13 url: "{{ route('employer.ajax_delete_user') }}", 13 url: "{{ route('employer.ajax_delete_user') }}",
14 data: "email=" + email + "&password=" + password +"&preview=1", 14 data: "email=" + email + "&password=" + password +"&preview=1",
15 success: function (data) { 15 success: function (data) {
16 console.log('Предупреждение!'); 16 console.log('Предупреждение!');
17 let d = JSON.parse(data); 17 let d = JSON.parse(data);
18 18
19 if(typeof d['SUCCESS'] !== "undefined") { 19 if(typeof d['SUCCESS'] !== "undefined") {
20 $('#password_delete').val(d['password']); 20 $('#password_delete').val(d['password']);
21 $('#email_delete').val(d['email']); 21 $('#email_delete').val(d['email']);
22 $('#button_submit_hidden').click(); 22 $('#button_submit_hidden').click();
23 console.log(d['SUCCESS']); 23 console.log(d['SUCCESS']);
24 } 24 }
25 25
26 if (typeof d['ERROR'] !== "undefined") { 26 if (typeof d['ERROR'] !== "undefined") {
27 console.log(d['ERROR']); 27 console.log(d['ERROR']);
28 $('#block_light').css('display', 'block'); 28 $('#block_light').css('display', 'block');
29 $('#mess_arr').html(d['ERROR']); 29 $('#mess_arr').html(d['ERROR']);
30 } 30 }
31 }, 31 },
32 headers: { 32 headers: {
33 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 33 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
34 }, 34 },
35 error: function (data) { 35 error: function (data) {
36 data = JSON.stringify(data); 36 data = JSON.stringify(data);
37 console.log('Error: ' + data); 37 console.log('Error: ' + data);
38 $('#mess_arr').html(data); 38 $('#mess_arr').html(data);
39 } 39 }
40 }); 40 });
41 return false; 41 return false;
42 }); 42 });
43 </script> 43 </script>
44 @endsection 44 @endsection
45 45
46 @section('content') 46 @section('content')
47 <section class="cabinet"> 47 <section class="cabinet">
48 <div class="container"> 48 <div class="container">
49 <ul class="breadcrumbs cabinet__breadcrumbs"> 49 <ul class="breadcrumbs cabinet__breadcrumbs">
50 <li><a href="{{ route('index') }}">Главная</a></li> 50 <li><a href="{{ route('index') }}">Главная</a></li>
51 <li><b>Личный кабинет</b></li> 51 <li><b>Личный кабинет</b></li>
52 </ul> 52 </ul>
53 <div class="cabinet__wrapper"> 53 <div class="cabinet__wrapper">
54 54
55 <div class="cabinet__side"> 55 <div class="cabinet__side">
56 <div class="cabinet__side-toper"> 56 <div class="cabinet__side-toper">
57 @include('employers.emblema') 57 @include('employers.emblema')
58 </div> 58 </div>
59 @include('employers.menu', ['item' => 13]) 59 @include('employers.menu', ['item' => 14])
60 </div> 60 </div>
61 61
62 <div class="cabinet__body"> 62 <div class="cabinet__body">
63 <div class="cabinet__body-item"> 63 <div class="cabinet__body-item">
64 <h2 class="title cabinet__title">Удалить профиль</h2> 64 <h2 class="title cabinet__title">Удалить профиль</h2>
65 <p class="cabinet__text"><b>Вы уверены, что хотите удалить свой профиль?</b></p> 65 <p class="cabinet__text"><b>Вы уверены, что хотите удалить свой профиль?</b></p>
66 <div class="notify notify_red"> 66 <div class="notify notify_red">
67 <svg> 67 <svg>
68 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> 68 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
69 </svg> 69 </svg>
70 <span>Это действие не может быть отменено!</span> 70 <span>Это действие не может быть отменено!</span>
71 </div> 71 </div>
72 72
73 <div class="notify" id="block_light" name="block_light" style="display:none"> 73 <div class="notify" id="block_light" name="block_light" style="display:none">
74 <svg> 74 <svg>
75 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> 75 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
76 </svg> 76 </svg>
77 <span id="mess_arr" name="mess_arr"> 77 <span id="mess_arr" name="mess_arr">
78 </span> 78 </span>
79 </div> 79 </div>
80 80
81 <form class="cabinet__inputs" id="form_del" name="form_del" method="GET"> 81 <form class="cabinet__inputs" id="form_del" name="form_del" method="GET">
82 @csrf 82 @csrf
83 <input type="hidden" name="email" id="email" value="{{ $login }}"/> 83 <input type="hidden" name="email" id="email" value="{{ $login }}"/>
84 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 84 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
85 <label class="form-group__label">Пожалуйста, введите пароль от учётной записи для подтверждения:</label> 85 <label class="form-group__label">Пожалуйста, введите пароль от учётной записи для подтверждения:</label>
86 <div class="form-group__item"> 86 <div class="form-group__item">
87 <input type="password" name="password" id="password" class="input" placeholder="**********" required> 87 <input type="password" name="password" id="password" class="input" placeholder="**********" required>
88 <button type="button" class="eye"> 88 <button type="button" class="eye">
89 <svg class="js-password-show"> 89 <svg class="js-password-show">
90 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 90 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
91 </svg> 91 </svg>
92 <svg class="js-password-hide"> 92 <svg class="js-password-hide">
93 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 93 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
94 </svg> 94 </svg>
95 </button> 95 </button>
96 </div> 96 </div>
97 </div> 97 </div>
98 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 98 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
99 <div class="buttons"> 99 <div class="buttons">
100 <a href="{{ route('employer.cabinet') }}" class="button">Отменить</a> 100 <a href="{{ route('employer.cabinet') }}" class="button">Отменить</a>
101 <button type="submit" id="button_submit" class="button button_light">Удалить профиль</button> 101 <button type="submit" id="button_submit" class="button button_light">Удалить профиль</button>
102 <button style="display:none;" type="submit" id="button_submit_hidden" data-fancybox data-src="#delete" data-options='{"touch":false,"autoFocus":false}' class="button button_light">Удалить профиль</button> 102 <button style="display:none;" type="submit" id="button_submit_hidden" data-fancybox data-src="#delete" data-options='{"touch":false,"autoFocus":false}' class="button button_light">Удалить профиль</button>
103 </div> 103 </div>
104 </div> 104 </div>
105 </form> 105 </form>
106 </div> 106 </div>
107 </div> 107 </div>
108 </div> 108 </div>
109 </div> 109 </div>
110 </section> 110 </section>
111 </div> 111 </div>
112 @endsection 112 @endsection
113 113
resources/views/employers/fly-flot.blade.php
File was created 1 @extends('layout.frontend', ['title' => 'Мой флот - РекаМоре'])
2
3 @section('scripts')
4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 <script>
6 ClassicEditor
7 .create( document.querySelector( '#txtarea' ) )
8 .catch( error => {
9 console.error( error );
10 } );
11 </script>
12 @endsection
13 @section('content')
14 <section class="cabinet">
15 <div class="container">
16 <ul class="breadcrumbs cabinet__breadcrumbs">
17 <li><a href="{{ route('index') }}">Главная</a></li>
18 <li><b>Личный кабинет</b></li>
19 </ul>
20 <div class="cabinet__wrapper">
21 <div class="cabinet__side">
22 <div class="cabinet__side-toper">
23 @include('employers.emblema')
24 </div>
25
26 @include('employers.menu', ['item' => 12])
27
28 </div>
29 <div class="cabinet__body">
30 @include('messages_error')
31
32 <div class="cabinet__body-item">
33 <div class="cabinet__descr">
34 <h2 class="title cabinet__title">Мой флот</h2>
35 </div>
36
37 <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data">
38 @csrf
39 <label class="cabinet__add-pic" style="vertical-align: top">
40 <input type="file" name="image" id="image">
41 @error('image')
42 <span class="text-xs text-red-600">
43 {{ $message }}
44 </span>
45 @enderror
46 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/>
47 <svg>
48 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
49 </svg>
50 <span>
51 <svg>
52 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
53 </svg>
54 Загрузить фото
55 </span>
56 </label>
57
58 <div class="cabinet__add-body">
59 <div class="form-group">
60 <label class="form-group__label">Название корабля</label>
61 <div class="form-group__item">
62 <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required>
63 @error('name')
64 <span class="text-xs text-red-600">
65 {{ $message }}
66 </span>
67 @enderror
68 </div>
69 </div>
70 <div class="form-group">
71 <label class="form-group__label">Описание</label>
72 <div class="form-group__item">
73 <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required>
74 @error('text')
75 <span class="text-xs text-red-600">
76 {{ $message }}
77 </span>
78 @enderror
79 </div>
80 </div>
81 <div class="form-group">
82 <label class="form-group__label">Регион</label>
83 <div class="form-group__item">
84 <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required>
85 @error('region')
86 <span class="text-xs text-red-600">
87 {{ $message }}
88 </span>
89 @enderror
90 </div>
91 </div>
92 <div class="form-group">
93 <label class="form-group__label">Мощность</label>
94 <div class="form-group__item">
95 <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required>
96 @error('power')
97 <span class="text-xs text-red-600">
98 {{ $message }}
99 </span>
100 @enderror
101 </div>
102 </div>
103 <div class="form-group">
104 <label class="form-group__label">DWT</label>
105 <div class="form-group__item">
106 <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т">
107 @error('DWT')
108 <span class="text-xs text-red-600">
109 {{ $message }}
110 </span>
111 @enderror
112 </div>
113 </div>
114 <div class="form-group">
115 <label class="form-group__label">Мощность ГД</label>
116 <div class="form-group__item">
117 <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт">
118 @error('POWER_GD')
119 <span class="text-xs text-red-600">
120 {{ $message }}
121 </span>
122 @enderror
123 </div>
124 </div>
125 <div class="form-group">
126 <label class="form-group__label">IMO</label>
127 <div class="form-group__item">
128 <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275">
129 @error('IMO')
130 <span class="text-xs text-red-600">
131 {{ $message }}
132 </span>
133 @enderror
134 </div>
135 </div>
136 <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button>
137 </div>
138
139 </form>
140
141 <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div">
142 @if (isset($Employer[0]->flots))
143 @if ($Employer[0]->flots->count())
144 @foreach ($Employer[0]->flots as $it)
145 <div class="cabinet__fleet-item main__employer-page-one-item">
146 <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}">
147 <svg>
148 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
149 </svg>
150 </a>
151 @if (!empty($it->image))
152 <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}">
153 @else
154 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/>
155 @endif
156 <b>{{ $it->name }}</b>
157 <span>{{ $it->region }}</span>
158 <span><i>DWT</i>{{ $it->DWT }}</span>
159 <span><i>Мощность ГД</i>{{ $it->POWER_GD }}</span>
160 <span><i>IMO</i>{{ $it->IMO }}</span>
161 <span>{{ $it->power }}</span>
162 </div>
163 @endforeach
164 @endif
165 @endif
166 </div>
167 </div>
168 </div>
169 </div>
170 </div>
171
172 </section>
173 </div>
174 <!-- END TOP WRAPPER -->
175 @endsection
176
resources/views/employers/menu.blade.php
1 <div class="cabinet__side-item"> 1 <div class="cabinet__side-item">
2 <div class="cabinet__menu"> 2 <div class="cabinet__menu">
3 <button type="button" class="cabinet__menu-toper js-toggle"> 3 <button type="button" class="cabinet__menu-toper js-toggle">
4 <span class="cabinet__menu-toper-text"> 4 <span class="cabinet__menu-toper-text">
5 <i> 5 <i>
6 <svg> 6 <svg>
7 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 7 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
8 </svg> 8 </svg>
9 </i> 9 </i>
10 <span>Профиль</span> 10 <span>Профиль</span>
11 </span> 11 </span>
12 <i class="cabinet__menu-toper-arrow"> 12 <i class="cabinet__menu-toper-arrow">
13 <svg> 13 <svg>
14 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 14 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
15 </svg> 15 </svg>
16 </i> 16 </i>
17 </button> 17 </button>
18 <div class="cabinet__menu-body"> 18 <div class="cabinet__menu-body">
19 <div class="cabinet__menu-items"> 19 <div class="cabinet__menu-items">
20 <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif"> 20 <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif">
21 <i> 21 <i>
22 <svg> 22 <svg>
23 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 23 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
24 </svg> 24 </svg>
25 </i> 25 </i>
26 <span>Профиль</span> 26 <span>Профиль</span>
27 </a> 27 </a>
28 <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif"> 28 <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif">
29 <i> 29 <i>
30 <svg> 30 <svg>
31 <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use> 31 <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use>
32 </svg> 32 </svg>
33 </i> 33 </i>
34 <span>Разместить вакансию</span> 34 <span>Разместить вакансию</span>
35 </a> 35 </a>
36 <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif"> 36 <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif">
37 <i> 37 <i>
38 <svg> 38 <svg>
39 <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use> 39 <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use>
40 </svg> 40 </svg>
41 </i> 41 </i>
42 <span>Мои вакансии</span> 42 <span>Мои вакансии</span>
43 </a> 43 </a>
44 <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif"> 44 <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif">
45 <i> 45 <i>
46 <svg> 46 <svg>
47 <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use> 47 <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use>
48 </svg> 48 </svg>
49 </i> 49 </i>
50 <span>Отклики на вакансию</span> 50 <span>Отклики на вакансию</span>
51 </a> 51 </a>
52 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif"> 52 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif">
53 <i> 53 <i>
54 <svg> 54 <svg>
55 <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use> 55 <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use>
56 </svg> 56 </svg>
57 </i> 57 </i>
58 <span>Сообщения</span> 58 <span>Сообщения</span>
59 </a> 59 </a>
60 <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif"> 60 <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif">
61 <i> 61 <i>
62 <svg> 62 <svg>
63 <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use> 63 <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use>
64 </svg> 64 </svg>
65 </i> 65 </i>
66 <span>Избранные кандидаты</span> 66 <span>Избранные кандидаты</span>
67 </a> 67 </a>
68 <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif"> 68 <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif">
69 <i> 69 <i>
70 <svg> 70 <svg>
71 <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use> 71 <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use>
72 </svg> 72 </svg>
73 </i> 73 </i>
74 <span>База данных</span> 74 <span>База данных</span>
75 </a> 75 </a>
76 <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif"> 76 <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif">
77 <i> 77 <i>
78 <svg> 78 <svg>
79 <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use> 79 <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use>
80 </svg> 80 </svg>
81 </i> 81 </i>
82 <span>База резюме</span> 82 <span>База резюме</span>
83 </a> 83 </a>
84 <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif"> 84 <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif">
85 <i> 85 <i>
86 <svg> 86 <svg>
87 <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use> 87 <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use>
88 </svg> 88 </svg>
89 </i> 89 </i>
90 <span>Рассылка сообщений</span> 90 <span>Рассылка сообщений</span>
91 </a> 91 </a>
92 <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif"> 92 <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif">
93 <i> 93 <i>
94 <svg> 94 <svg>
95 <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use> 95 <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use>
96 </svg> 96 </svg>
97 </i> 97 </i>
98 <span>FAQ</span> 98 <span>FAQ</span>
99 </a> 99 </a>
100 <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif"> 100 <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif">
101 <i> 101 <i>
102 <svg> 102 <svg>
103 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use> 103 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use>
104 </svg> 104 </svg>
105 </i> 105 </i>
106 <span>Настройки уведомлений</span> 106 <span>Настройки уведомлений</span>
107 </a> 107 </a>
108 <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==12) active @endif"> 108 <a href="{{ route('employer.slider_flot') }}" class="cabinet__menu-item @if ($item==12) active @endif">
109 <i>
110 <svg>
111 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use>
112 </svg>
113 </i>
114 <span>Мой флот</span>
115 </a>
116 <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==13) active @endif">
109 <i></i> 117 <i></i>
110 <span>Сменить пароль</span> 118 <span>Сменить пароль</span>
111 </a> 119 </a>
112 <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==13) active @endif"> 120 <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==14) active @endif">
113 <i></i> 121 <i></i>
114 <span>Удалить профиль</span> 122 <span>Удалить профиль</span>
115 </a> 123 </a>
116 </div> 124 </div>
117 <div class="cabinet__menu-bottom"> 125 <div class="cabinet__menu-bottom">
118 <a href="{{ route('logout') }}" class="button cabinet__menu-leave"> 126 <a href="{{ route('logout') }}" class="button cabinet__menu-leave">
119 <svg> 127 <svg>
120 <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use> 128 <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use>
121 </svg> 129 </svg>
122 Выход 130 Выход
123 </a> 131 </a>
124 <span class="cabinet__menu-copy"> 132 <span class="cabinet__menu-copy">
125 &copy; 2020 &ndash; Rekamore.su 133 &copy; 2020 &ndash; Rekamore.su
126 </span> 134 </span>
127 </div> 135 </div>
128 </div> 136 </div>
129 </div> 137 </div>
130 </div> 138 </div>
131 139
resources/views/employers/password-reset.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 16
17 @include('employers.emblema') 17 @include('employers.emblema')
18 18
19 19
20 20
21 @include('employers.menu', ['item' => 12]) 21 @include('employers.menu', ['item' => 13])
22 </div> 22 </div>
23 23
24 <div class="cabinet__body"> 24 <div class="cabinet__body">
25 <div class="cabinet__body-item"> 25 <div class="cabinet__body-item">
26 <h2 class="title cabinet__title">Сменить пароль</h2> 26 <h2 class="title cabinet__title">Сменить пароль</h2>
27 27
28 @include('messages_error') 28 @include('messages_error')
29 <form class="cabinet__inputs" action="{{ route('employer.new_password') }}" method="GET"> 29 <form class="cabinet__inputs" action="{{ route('employer.new_password') }}" method="GET">
30 @csrf 30 @csrf
31 <input type="hidden" name="email" id="email" value="{{ $email }}"/> 31 <input type="hidden" name="email" id="email" value="{{ $email }}"/>
32 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 32 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
33 <label class="form-group__label">Старый пароль</label> 33 <label class="form-group__label">Старый пароль</label>
34 <div class="form-group__item"> 34 <div class="form-group__item">
35 <input type="password" name="password" id="password" class="input" placeholder="**********" required> 35 <input type="password" name="password" id="password" class="input" placeholder="**********" required>
36 36
37 <button type="button" class="eye"> 37 <button type="button" class="eye">
38 <svg class="js-password-show"> 38 <svg class="js-password-show">
39 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 39 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
40 </svg> 40 </svg>
41 <svg class="js-password-hide"> 41 <svg class="js-password-hide">
42 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 42 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
43 </svg> 43 </svg>
44 </button> 44 </button>
45 </div> 45 </div>
46 </div> 46 </div>
47 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 47 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
48 <label class="form-group__label">Новый пароль</label> 48 <label class="form-group__label">Новый пароль</label>
49 <div class="form-group__item"> 49 <div class="form-group__item">
50 <input type="password" name="new_password" id="new_password" class="input" placeholder="**********" required> 50 <input type="password" name="new_password" id="new_password" class="input" placeholder="**********" required>
51 <button type="button" class="eye"> 51 <button type="button" class="eye">
52 <svg class="js-password-show"> 52 <svg class="js-password-show">
53 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 53 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
54 </svg> 54 </svg>
55 <svg class="js-password-hide"> 55 <svg class="js-password-hide">
56 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 56 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
57 </svg> 57 </svg>
58 </button> 58 </button>
59 </div> 59 </div>
60 </div> 60 </div>
61 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 61 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
62 <label class="form-group__label">Повторите новый пароль</label> 62 <label class="form-group__label">Повторите новый пароль</label>
63 <div class="form-group__item"> 63 <div class="form-group__item">
64 <input type="password" name="new_password2" id="new_password2" class="input" placeholder="**********" required> 64 <input type="password" name="new_password2" id="new_password2" class="input" placeholder="**********" required>
65 <button type="button" class="eye"> 65 <button type="button" class="eye">
66 <svg class="js-password-show"> 66 <svg class="js-password-show">
67 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 67 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
68 </svg> 68 </svg>
69 <svg class="js-password-hide"> 69 <svg class="js-password-hide">
70 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 70 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
71 </svg> 71 </svg>
72 </button> 72 </button>
73 </div> 73 </div>
74 </div> 74 </div>
75 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 75 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
76 <button type="submit" class="button">Сохранить</button> 76 <button type="submit" class="button">Сохранить</button>
77 </div> 77 </div>
78 </form> 78 </form>
79 </div> 79 </div>
80 </div> 80 </div>
81 </div> 81 </div>
82 </div> 82 </div>
83 </section> 83 </section>
84 </div> 84 </div>
85 @endsection 85 @endsection
86 86
resources/views/layout/admin.blade.php
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html :class="{ 'theme-dark': dark }" x-data="data()" lang="{{ str_replace('_', '-', app()->getLocale()) }}"> 2 <html :class="{ 'theme-dark': dark }" x-data="data()" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
3 <head> 3 <head>
4 <meta charset="UTF-8" /> 4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>{{$title}}</title> 6 <title>{{$title}}</title>
7 <link 7 <link
8 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" 8 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
9 rel="stylesheet" 9 rel="stylesheet"
10 /> 10 />
11 <link rel="stylesheet" href="{{ asset('./assets/css/tailwind.output_new.css')}}" /> 11 <link rel="stylesheet" href="{{ asset('./assets/css/tailwind.output_new.css')}}" />
12 <link rel="stylesheet" href="{{ asset('./assets/css/tabs.css')}}" /> 12 <link rel="stylesheet" href="{{ asset('./assets/css/tabs.css')}}" />
13 <script 13 <script
14 src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" 14 src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
15 defer 15 defer
16 ></script> 16 ></script>
17 <script src="{{ asset('./assets/js/init-alpine.js') }}"></script> 17 <script src="{{ asset('./assets/js/init-alpine.js') }}"></script>
18 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css"/> 18 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css"/>
19 <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" defer></script> 19 <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" defer></script>
20 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> 20 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
21 <script src="{{ asset('./assets/js/charts-lines.js') }}" defer></script> 21 <script src="{{ asset('./assets/js/charts-lines.js') }}" defer></script>
22 <script src="{{ asset('./assets/js/charts-pie.js') }}" defer></script> 22 <script src="{{ asset('./assets/js/charts-pie.js') }}" defer></script>
23 </head> 23 </head>
24 <body> 24 <body>
25 <div class="flex h-screen bg-gray-50 dark:bg-gray-900" :class="{ 'overflow-hidden': isSideMenuOpen }"> 25 <div class="flex h-screen bg-gray-50 dark:bg-gray-900" :class="{ 'overflow-hidden': isSideMenuOpen }">
26 <!-- Desktop sidebar --> 26 <!-- Desktop sidebar -->
27 <aside 27 <aside
28 class="z-20 hidden w-64 overflow-y-auto bg-white dark:bg-gray-800 md:block flex-shrink-0" 28 class="z-20 hidden w-64 overflow-y-auto bg-white dark:bg-gray-800 md:block flex-shrink-0"
29 > 29 >
30 <div class="py-4 text-gray-500 dark:text-gray-400"> 30 <div class="py-4 text-gray-500 dark:text-gray-400">
31 <a class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200" 31 <a class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200"
32 href="{{ route('admin.index') }}"> 32 href="{{ route('admin.index') }}">
33 Админка 33 Админка
34 </a> 34 </a>
35 <ul class="mt-6"> 35 <ul class="mt-6">
36 <li class="relative px-6 py-3"> 36 <li class="relative px-6 py-3">
37 <span 37 <span
38 class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg" 38 class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg"
39 aria-hidden="true" 39 aria-hidden="true"
40 ></span> 40 ></span>
41 <a 41 <a
42 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.index') ? 'dark:text-gray-100' : null }}" 42 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.index') ? 'dark:text-gray-100' : null }}"
43 href="{{ route('admin.index') }}" 43 href="{{ route('admin.index') }}"
44 > 44 >
45 <svg 45 <svg
46 class="w-5 h-5" 46 class="w-5 h-5"
47 aria-hidden="true" 47 aria-hidden="true"
48 fill="none" 48 fill="none"
49 stroke-linecap="round" 49 stroke-linecap="round"
50 stroke-linejoin="round" 50 stroke-linejoin="round"
51 stroke-width="2" 51 stroke-width="2"
52 viewBox="0 0 24 24" 52 viewBox="0 0 24 24"
53 stroke="currentColor" 53 stroke="currentColor"
54 > 54 >
55 <path 55 <path
56 d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" 56 d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
57 ></path> 57 ></path>
58 </svg> 58 </svg>
59 <span class="ml-4">Главная страница</span> 59 <span class="ml-4">Главная страница</span>
60 </a> 60 </a>
61 </li> 61 </li>
62 </ul> 62 </ul>
63 63
64 <ul> 64 <ul>
65 @foreach ($contents as $cont) 65 @foreach ($contents as $cont)
66 @if ($cont->url_page == "admin/users") 66 @if ($cont->url_page == "admin/users")
67 @if ((($cont->is_admin == 1) && ($admin == 1)) || 67 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
68 (($cont->is_manager == 1) && ($is_manager == 1))) 68 (($cont->is_manager == 1) && ($is_manager == 1)))
69 <li class="relative px-6 py-3"> 69 <li class="relative px-6 py-3">
70 <a 70 <a
71 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}" 71 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}"
72 href="{{ route('admin.users') }}" 72 href="{{ route('admin.users') }}"
73 > 73 >
74 <svg 74 <svg
75 class="w-5 h-5" 75 class="w-5 h-5"
76 aria-hidden="true" 76 aria-hidden="true"
77 fill="none" 77 fill="none"
78 stroke-linecap="round" 78 stroke-linecap="round"
79 stroke-linejoin="round" 79 stroke-linejoin="round"
80 stroke-width="2" 80 stroke-width="2"
81 viewBox="0 0 24 24" 81 viewBox="0 0 24 24"
82 stroke="currentColor" 82 stroke="currentColor"
83 > 83 >
84 <path 84 <path
85 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 85 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
86 ></path> 86 ></path>
87 </svg> 87 </svg>
88 <span class="ml-4">Пользователи</span> 88 <span class="ml-4">Пользователи</span>
89 </a> 89 </a>
90 </li> 90 </li>
91 @endif 91 @endif
92 @endif 92 @endif
93 93
94 @if ($cont->url_page == "admin/admin_roles") 94 @if ($cont->url_page == "admin/admin_roles")
95 @if ((($cont->is_admin == 1) && ($admin == 1)) || 95 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
96 (($cont->is_manager == 1) && ($is_manager == 1))) 96 (($cont->is_manager == 1) && ($is_manager == 1)))
97 <li class="relative px-6 py-3"> 97 <li class="relative px-6 py-3">
98 <a 98 <a
99 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}" 99 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}"
100 href="{{ route('admin.admin_roles') }}" 100 href="{{ route('admin.admin_roles') }}"
101 > 101 >
102 <svg 102 <svg
103 class="w-5 h-5" 103 class="w-5 h-5"
104 aria-hidden="true" 104 aria-hidden="true"
105 fill="none" 105 fill="none"
106 stroke-linecap="round" 106 stroke-linecap="round"
107 stroke-linejoin="round" 107 stroke-linejoin="round"
108 stroke-width="2" 108 stroke-width="2"
109 viewBox="0 0 24 24" 109 viewBox="0 0 24 24"
110 stroke="currentColor" 110 stroke="currentColor"
111 > 111 >
112 <path 112 <path
113 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 113 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
114 ></path> 114 ></path>
115 </svg> 115 </svg>
116 <span class="ml-4">Роли администраторов</span> 116 <span class="ml-4">Роли администраторов</span>
117 </a> 117 </a>
118 </li> 118 </li>
119 @endif 119 @endif
120 @endif 120 @endif
121 121
122 @if ($cont->url_page == "admin/admin-users") 122 @if ($cont->url_page == "admin/admin-users")
123 @if ((($cont->is_admin == 1) && ($admin == 1)) || 123 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
124 (($cont->is_manager == 1) && ($is_manager == 1))) 124 (($cont->is_manager == 1) && ($is_manager == 1)))
125 <li class="relative px-6 py-3"> 125 <li class="relative px-6 py-3">
126 <a 126 <a
127 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-users') }}" 127 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-users') }}"
128 > 128 >
129 <svg 129 <svg
130 class="w-5 h-5" 130 class="w-5 h-5"
131 aria-hidden="true" 131 aria-hidden="true"
132 fill="none" 132 fill="none"
133 stroke-linecap="round" 133 stroke-linecap="round"
134 stroke-linejoin="round" 134 stroke-linejoin="round"
135 stroke-width="2" 135 stroke-width="2"
136 viewBox="0 0 24 24" 136 viewBox="0 0 24 24"
137 stroke="currentColor" 137 stroke="currentColor"
138 > 138 >
139 <path 139 <path
140 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" 140 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
141 ></path> 141 ></path>
142 </svg> 142 </svg>
143 <span class="ml-4">Администраторы</span> 143 <span class="ml-4">Администраторы</span>
144 </a> 144 </a>
145 </li> 145 </li>
146 @endif 146 @endif
147 @endif 147 @endif
148 148
149 @if ($cont->url_page == "admin/employers") 149 @if ($cont->url_page == "admin/employers")
150 @if ((($cont->is_admin == 1) && ($admin == 1)) || 150 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
151 (($cont->is_manager == 1) && ($is_manager == 1))) 151 (($cont->is_manager == 1) && ($is_manager == 1)))
152 <li class="relative px-6 py-3"> 152 <li class="relative px-6 py-3">
153 <a 153 <a
154 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.employers') }}" 154 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.employers') }}"
155 > 155 >
156 <svg 156 <svg
157 class="w-5 h-5" 157 class="w-5 h-5"
158 aria-hidden="true" 158 aria-hidden="true"
159 fill="none" 159 fill="none"
160 stroke-linecap="round" 160 stroke-linecap="round"
161 stroke-linejoin="round" 161 stroke-linejoin="round"
162 stroke-width="2" 162 stroke-width="2"
163 viewBox="0 0 24 24" 163 viewBox="0 0 24 24"
164 stroke="currentColor" 164 stroke="currentColor"
165 > 165 >
166 <path 166 <path
167 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" 167 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
168 ></path> 168 ></path>
169 </svg> 169 </svg>
170 <span class="ml-4">Работодатели</span> 170 <span class="ml-4">Работодатели</span>
171 </a> 171 </a>
172 </li> 172 </li>
173 @endif 173 @endif
174 @endif 174 @endif
175 175
176 @if ($cont->url_page == "admin/workers") 176 @if ($cont->url_page == "admin/workers")
177 @if ((($cont->is_admin == 1) && ($admin == 1)) || 177 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
178 (($cont->is_manager == 1) && ($is_manager == 1))) 178 (($cont->is_manager == 1) && ($is_manager == 1)))
179 <li class="relative px-6 py-3"> 179 <li class="relative px-6 py-3">
180 <a 180 <a
181 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.workers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.workers') }}" 181 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.workers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.workers') }}"
182 > 182 >
183 <svg 183 <svg
184 class="w-5 h-5" 184 class="w-5 h-5"
185 aria-hidden="true" 185 aria-hidden="true"
186 fill="none" 186 fill="none"
187 stroke-linecap="round" 187 stroke-linecap="round"
188 stroke-linejoin="round" 188 stroke-linejoin="round"
189 stroke-width="2" 189 stroke-width="2"
190 viewBox="0 0 24 24" 190 viewBox="0 0 24 24"
191 stroke="currentColor" 191 stroke="currentColor"
192 > 192 >
193 <path 193 <path
194 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" 194 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"
195 ></path> 195 ></path>
196 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> 196 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path>
197 </svg> 197 </svg>
198 <span class="ml-4">Соискатели</span> 198 <span class="ml-4">Соискатели</span>
199 </a> 199 </a>
200 </li> 200 </li>
201 @endif 201 @endif
202 @endif 202 @endif
203 203
204 @if ($cont->url_page == "admin/ad-employers") 204 @if ($cont->url_page == "admin/ad-employers")
205 @if ((($cont->is_admin == 1) && ($admin == 1)) || 205 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
206 (($cont->is_manager == 1) && ($is_manager == 1))) 206 (($cont->is_manager == 1) && ($is_manager == 1)))
207 <li class="relative px-6 py-3"> 207 <li class="relative px-6 py-3">
208 <a 208 <a
209 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.ad-employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.ad-employers') }}" 209 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.ad-employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.ad-employers') }}"
210 > 210 >
211 <svg 211 <svg
212 class="w-5 h-5" 212 class="w-5 h-5"
213 aria-hidden="true" 213 aria-hidden="true"
214 fill="none" 214 fill="none"
215 stroke-linecap="round" 215 stroke-linecap="round"
216 stroke-linejoin="round" 216 stroke-linejoin="round"
217 stroke-width="2" 217 stroke-width="2"
218 viewBox="0 0 24 24" 218 viewBox="0 0 24 24"
219 stroke="currentColor" 219 stroke="currentColor"
220 > 220 >
221 <path 221 <path
222 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" 222 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
223 ></path> 223 ></path>
224 </svg> 224 </svg>
225 <span class="ml-4">Вакансии</span> 225 <span class="ml-4">Вакансии</span>
226 </a> 226 </a>
227 </li> 227 </li>
228 @endif 228 @endif
229 @endif 229 @endif
230 230
231 @if ($cont->url_page == "admin/messages") 231 @if ($cont->url_page == "admin/messages")
232 @if ((($cont->is_admin == 1) && ($admin == 1)) || 232 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
233 (($cont->is_manager == 1) && ($is_manager == 1))) 233 (($cont->is_manager == 1) && ($is_manager == 1)))
234 <li class="relative px-6 py-3"> 234 <li class="relative px-6 py-3">
235 <a 235 <a
236 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}" 236 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}"
237 > 237 >
238 <svg 238 <svg
239 class="w-5 h-5" 239 class="w-5 h-5"
240 aria-hidden="true" 240 aria-hidden="true"
241 fill="none" 241 fill="none"
242 stroke-linecap="round" 242 stroke-linecap="round"
243 stroke-linejoin="round" 243 stroke-linejoin="round"
244 stroke-width="2" 244 stroke-width="2"
245 viewBox="0 0 24 24" 245 viewBox="0 0 24 24"
246 stroke="currentColor" 246 stroke="currentColor"
247 > 247 >
248 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 248 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
249 </svg> 249 </svg>
250 <span class="ml-4">Сообщения все</span> 250 <span class="ml-4">Сообщения все</span>
251 </a> 251 </a>
252 </li> 252 </li>
253 @endif 253 @endif
254 @endif 254 @endif
255 255
256 @if ($cont->url_page == "admin/admin-messages") 256 @if ($cont->url_page == "admin/admin-messages")
257 @if ((($cont->is_admin == 1) && ($admin == 1)) || 257 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
258 (($cont->is_manager == 1) && ($is_manager == 1))) 258 (($cont->is_manager == 1) && ($is_manager == 1)))
259 <li class="relative px-6 py-3"> 259 <li class="relative px-6 py-3">
260 <a 260 <a
261 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-messages') }}" 261 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-messages') }}"
262 > 262 >
263 <svg 263 <svg
264 class="w-5 h-5" 264 class="w-5 h-5"
265 aria-hidden="true" 265 aria-hidden="true"
266 fill="none" 266 fill="none"
267 stroke-linecap="round" 267 stroke-linecap="round"
268 stroke-linejoin="round" 268 stroke-linejoin="round"
269 stroke-width="2" 269 stroke-width="2"
270 viewBox="0 0 24 24" 270 viewBox="0 0 24 24"
271 stroke="currentColor" 271 stroke="currentColor"
272 > 272 >
273 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 273 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
274 </svg> 274 </svg>
275 <span class="ml-4">Заявки на рассылку</span> 275 <span class="ml-4">Заявки на рассылку</span>
276 </a> 276 </a>
277 </li> 277 </li>
278 @endif 278 @endif
279 @endif 279 @endif
280 280
281 @if ($cont->url_page == "admin/groups") 281 @if ($cont->url_page == "admin/groups")
282 @if ((($cont->is_admin == 1) && ($admin == 1)) || 282 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
283 (($cont->is_manager == 1) && ($is_manager == 1))) 283 (($cont->is_manager == 1) && ($is_manager == 1)))
284 <li class="relative px-6 py-3"> 284 <li class="relative px-6 py-3">
285 <a 285 <a
286 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.groups') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.groups') }}" 286 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.groups') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.groups') }}"
287 > 287 >
288 <svg 288 <svg
289 class="w-5 h-5" 289 class="w-5 h-5"
290 aria-hidden="true" 290 aria-hidden="true"
291 fill="none" 291 fill="none"
292 stroke-linecap="round" 292 stroke-linecap="round"
293 stroke-linejoin="round" 293 stroke-linejoin="round"
294 stroke-width="2" 294 stroke-width="2"
295 viewBox="0 0 24 24" 295 viewBox="0 0 24 24"
296 stroke="currentColor" 296 stroke="currentColor"
297 > 297 >
298 <path 298 <path
299 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 299 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
300 ></path> 300 ></path>
301 </svg> 301 </svg>
302 <span class="ml-4">Группы пользователей</span> 302 <span class="ml-4">Группы пользователей</span>
303 </a> 303 </a>
304 </li> 304 </li>
305 @endif 305 @endif
306 @endif 306 @endif
307 307
308 @if ($cont->url_page == "admin/media") 308 @if ($cont->url_page == "admin/media")
309 @if ((($cont->is_admin == 1) && ($admin == 1)) || 309 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
310 (($cont->is_manager == 1) && ($is_manager == 1))) 310 (($cont->is_manager == 1) && ($is_manager == 1)))
311 <li class="relative px-6 py-3"> 311 <li class="relative px-6 py-3">
312 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.media') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.media') }}"> 312 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.media') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.media') }}">
313 <svg 313 <svg
314 class="w-5 h-5" 314 class="w-5 h-5"
315 aria-hidden="true" 315 aria-hidden="true"
316 fill="none" 316 fill="none"
317 stroke-linecap="round" 317 stroke-linecap="round"
318 stroke-linejoin="round" 318 stroke-linejoin="round"
319 stroke-width="2" 319 stroke-width="2"
320 viewBox="0 0 24 24" 320 viewBox="0 0 24 24"
321 stroke="currentColor" 321 stroke="currentColor"
322 > 322 >
323 <path 323 <path
324 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 324 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
325 ></path> 325 ></path>
326 </svg> 326 </svg>
327 <span class="ml-4">Медиа</span> 327 <span class="ml-4">Медиа</span>
328 </a> 328 </a>
329 </li> 329 </li>
330 @endif 330 @endif
331 @endif 331 @endif
332 332
333 @if ($cont->url_page == "admin/roles") 333 @if ($cont->url_page == "admin/roles")
334 @if ((($cont->is_admin == 1) && ($admin == 1)) || 334 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
335 (($cont->is_manager == 1) && ($is_manager == 1))) 335 (($cont->is_manager == 1) && ($is_manager == 1)))
336 <li class="relative px-6 py-3"> 336 <li class="relative px-6 py-3">
337 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.roles') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.roles') }}"> 337 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.roles') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.roles') }}">
338 <svg 338 <svg
339 class="w-5 h-5" 339 class="w-5 h-5"
340 aria-hidden="true" 340 aria-hidden="true"
341 fill="none" 341 fill="none"
342 stroke-linecap="round" 342 stroke-linecap="round"
343 stroke-linejoin="round" 343 stroke-linejoin="round"
344 stroke-width="2" 344 stroke-width="2"
345 viewBox="0 0 24 24" 345 viewBox="0 0 24 24"
346 stroke="currentColor" 346 stroke="currentColor"
347 > 347 >
348 <path 348 <path
349 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 349 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
350 ></path> 350 ></path>
351 </svg> 351 </svg>
352 <span class="ml-4">Роли пользователей</span> 352 <span class="ml-4">Роли пользователей</span>
353 </a> 353 </a>
354 </li> 354 </li>
355 @endif 355 @endif
356 @endif 356 @endif
357 357
358 @if ($cont->url_page == "admin/basedata") 358 @if ($cont->url_page == "admin/basedata")
359 @if ((($cont->is_admin == 1) && ($admin == 1)) || 359 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
360 (($cont->is_manager == 1) && ($is_manager == 1))) 360 (($cont->is_manager == 1) && ($is_manager == 1)))
361 <li class="relative px-6 py-3"> 361 <li class="relative px-6 py-3">
362 <a 362 <a
363 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.basedata') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.basedata') }}" 363 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.basedata') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.basedata') }}"
364 > 364 >
365 <svg 365 <svg
366 class="w-5 h-5" 366 class="w-5 h-5"
367 aria-hidden="true" 367 aria-hidden="true"
368 fill="none" 368 fill="none"
369 stroke-linecap="round" 369 stroke-linecap="round"
370 stroke-linejoin="round" 370 stroke-linejoin="round"
371 stroke-width="2" 371 stroke-width="2"
372 viewBox="0 0 24 24" 372 viewBox="0 0 24 24"
373 stroke="currentColor" 373 stroke="currentColor"
374 > 374 >
375 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 375 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
376 </svg> 376 </svg>
377 <span class="ml-4">Базы данных</span> 377 <span class="ml-4">Базы данных</span>
378 </a> 378 </a>
379 </li> 379 </li>
380 @endif 380 @endif
381 @endif 381 @endif
382 382
383 @if ($cont->url_page == "admin/education") 383 @if ($cont->url_page == "admin/education")
384 @if ((($cont->is_admin == 1) && ($admin == 1)) || 384 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
385 (($cont->is_manager == 1) && ($is_manager == 1))) 385 (($cont->is_manager == 1) && ($is_manager == 1)))
386 <li class="relative px-6 py-3"> 386 <li class="relative px-6 py-3">
387 <a 387 <a
388 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.education.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.education.index') }}" 388 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.education.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.education.index') }}"
389 > 389 >
390 <svg 390 <svg
391 class="w-5 h-5" 391 class="w-5 h-5"
392 aria-hidden="true" 392 aria-hidden="true"
393 fill="none" 393 fill="none"
394 stroke-linecap="round" 394 stroke-linecap="round"
395 stroke-linejoin="round" 395 stroke-linejoin="round"
396 stroke-width="2" 396 stroke-width="2"
397 viewBox="0 0 24 24" 397 viewBox="0 0 24 24"
398 stroke="currentColor" 398 stroke="currentColor"
399 > 399 >
400 <path 400 <path
401 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" 401 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
402 ></path> 402 ></path>
403 </svg> 403 </svg>
404 <span class="ml-4">Учебн.заведения</span> 404 <span class="ml-4">Учебн.заведения</span>
405 </a> 405 </a>
406 </li> 406 </li>
407 @endif 407 @endif
408 @endif 408 @endif
409 409
410 @if ($cont->url_page == "admin/statics") 410 @if ($cont->url_page == "admin/statics")
411 @if ((($cont->is_admin == 1) && ($admin == 1)) || 411 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
412 (($cont->is_manager == 1) && ($is_manager == 1))) 412 (($cont->is_manager == 1) && ($is_manager == 1)))
413 <li class="relative px-6 py-3"> 413 <li class="relative px-6 py-3">
414 <a 414 <a
415 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.statics') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.statics') }}" 415 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.statics') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.statics') }}"
416 > 416 >
417 <svg 417 <svg
418 class="w-5 h-5" 418 class="w-5 h-5"
419 aria-hidden="true" 419 aria-hidden="true"
420 fill="none" 420 fill="none"
421 stroke-linecap="round" 421 stroke-linecap="round"
422 stroke-linejoin="round" 422 stroke-linejoin="round"
423 stroke-width="2" 423 stroke-width="2"
424 viewBox="0 0 24 24" 424 viewBox="0 0 24 24"
425 stroke="currentColor" 425 stroke="currentColor"
426 > 426 >
427 <path 427 <path
428 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" 428 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"
429 ></path> 429 ></path>
430 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> 430 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path>
431 </svg> 431 </svg>
432 <span class="ml-4">Статистика</span> 432 <span class="ml-4">Статистика</span>
433 </a> 433 </a>
434 </li> 434 </li>
435 @endif 435 @endif
436 @endif 436 @endif
437 437
438 @if ($cont->url_page == "admin/answers") 438 @if ($cont->url_page == "admin/answers")
439 @if ((($cont->is_admin == 1) && ($admin == 1)) || 439 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
440 (($cont->is_manager == 1) && ($is_manager == 1))) 440 (($cont->is_manager == 1) && ($is_manager == 1)))
441 <li class="relative px-6 py-3"> 441 <li class="relative px-6 py-3">
442 <a 442 <a
443 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.answers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.answers') }}" 443 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.answers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.answers') }}"
444 > 444 >
445 <svg 445 <svg
446 class="w-5 h-5" 446 class="w-5 h-5"
447 aria-hidden="true" 447 aria-hidden="true"
448 fill="none" 448 fill="none"
449 stroke-linecap="round" 449 stroke-linecap="round"
450 stroke-linejoin="round" 450 stroke-linejoin="round"
451 stroke-width="2" 451 stroke-width="2"
452 viewBox="0 0 24 24" 452 viewBox="0 0 24 24"
453 stroke="currentColor" 453 stroke="currentColor"
454 > 454 >
455 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 455 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
456 </svg> 456 </svg>
457 <span class="ml-4">Модерация</span> 457 <span class="ml-4">Модерация</span>
458 </a> 458 </a>
459 </li> 459 </li>
460 @endif 460 @endif
461 @endif 461 @endif
462 462
463 @if ($cont->url_page == "admin/reclames") 463 @if ($cont->url_page == "admin/reclames")
464 @if ((($cont->is_admin == 1) && ($admin == 1)) || 464 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
465 (($cont->is_manager == 1) && ($is_manager == 1))) 465 (($cont->is_manager == 1) && ($is_manager == 1)))
466 <li class="relative px-6 py-3"> 466 <li class="relative px-6 py-3">
467 <a 467 <a
468 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.reclames') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.reclames') }}" 468 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.reclames') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.reclames') }}"
469 > 469 >
470 <svg 470 <svg
471 class="w-5 h-5" 471 class="w-5 h-5"
472 aria-hidden="true" 472 aria-hidden="true"
473 fill="none" 473 fill="none"
474 stroke-linecap="round" 474 stroke-linecap="round"
475 stroke-linejoin="round" 475 stroke-linejoin="round"
476 stroke-width="2" 476 stroke-width="2"
477 viewBox="0 0 24 24" 477 viewBox="0 0 24 24"
478 stroke="currentColor" 478 stroke="currentColor"
479 > 479 >
480 <path 480 <path
481 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" 481 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
482 ></path> 482 ></path>
483 </svg> 483 </svg>
484 <span class="ml-4">Реклама</span> 484 <span class="ml-4">Реклама</span>
485 </a> 485 </a>
486 </li> 486 </li>
487 @endif 487 @endif
488 @endif 488 @endif
489 @endforeach 489 @endforeach
490
491
492 <li class="relative px-6 py-3">
493 <a
494 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.news_admin') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.news_admin') }}"
495 >
496 <svg
497 class="w-5 h-5"
498 aria-hidden="true"
499 fill="none"
500 stroke-linecap="round"
501 stroke-linejoin="round"
502 stroke-width="2"
503 viewBox="0 0 24 24"
504 stroke="currentColor"
505 >
506 <path
507 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
508 ></path>
509 </svg>
510 <span class="ml-4">Новости</span>
511 </a>
512 </li>
490 <!-- Справочники --> 513 <!-- Справочники -->
491 514
492 <li class="relative px-6 py-3" x-data="{ open1: false }"> 515 <li class="relative px-6 py-3" x-data="{ open1: false }">
493 <button 516 <button
494 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" 517 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
495 @click="open1=!open1" 518 @click="open1=!open1"
496 aria-haspopup="true"> 519 aria-haspopup="true">
497 <span class="inline-flex items-center"> 520 <span class="inline-flex items-center">
498 <svg 521 <svg
499 class="w-5 h-5" 522 class="w-5 h-5"
500 aria-hidden="true" 523 aria-hidden="true"
501 fill="none" 524 fill="none"
502 stroke-linecap="round" 525 stroke-linecap="round"
503 stroke-linejoin="round" 526 stroke-linejoin="round"
504 stroke-width="2" 527 stroke-width="2"
505 viewBox="0 0 24 24" 528 viewBox="0 0 24 24"
506 stroke="currentColor"> 529 stroke="currentColor">
507 <path 530 <path
508 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" 531 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"
509 ></path> 532 ></path>
510 </svg> 533 </svg>
511 <span class="ml-4">Справочники</span> 534 <span class="ml-4">Справочники</span>
512 </span> 535 </span>
513 <svg 536 <svg
514 class="w-4 h-4" 537 class="w-4 h-4"
515 aria-hidden="true" 538 aria-hidden="true"
516 fill="currentColor" 539 fill="currentColor"
517 viewBox="0 0 20 20" 540 viewBox="0 0 20 20"
518 > 541 >
519 <path 542 <path
520 fill-rule="evenodd" 543 fill-rule="evenodd"
521 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" 544 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
522 clip-rule="evenodd" 545 clip-rule="evenodd"
523 ></path> 546 ></path>
524 </svg> 547 </svg>
525 </button> 548 </button>
526 <template x-if="open1"> 549 <template x-if="open1">
527 <ul 550 <ul
528 x-transition:enter="transition-all ease-in-out duration-300" 551 x-transition:enter="transition-all ease-in-out duration-300"
529 x-transition:enter-start="opacity-25 max-h-0" 552 x-transition:enter-start="opacity-25 max-h-0"
530 x-transition:enter-end="opacity-100 max-h-xl" 553 x-transition:enter-end="opacity-100 max-h-xl"
531 x-transition:leave="transition-all ease-in-out duration-300" 554 x-transition:leave="transition-all ease-in-out duration-300"
532 x-transition:leave-start="opacity-100 max-h-xl" 555 x-transition:leave-start="opacity-100 max-h-xl"
533 x-transition:leave-end="opacity-0 max-h-0" 556 x-transition:leave-end="opacity-0 max-h-0"
534 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900" 557 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
535 aria-label="submenu" 558 aria-label="submenu"
536 > 559 >
537 @foreach ($contents as $cont) 560 @foreach ($contents as $cont)
538 @if ($cont->url_page == "admin/job-titles") 561 @if ($cont->url_page == "admin/job-titles")
539 @if ((($cont->is_admin == 1) && ($admin == 1)) || 562 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
540 (($cont->is_manager == 1) && ($is_manager == 1))) 563 (($cont->is_manager == 1) && ($is_manager == 1)))
541 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles.index') ? 'dark:text-gray-100' : null }}"> 564 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles.index') ? 'dark:text-gray-100' : null }}">
542 <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a> 565 <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a>
543 </li> 566 </li>
544 @endif 567 @endif
545 @endif 568 @endif
546 569
547 @if ($cont->url_page == "admin/categories") 570 @if ($cont->url_page == "admin/categories")
548 @if ((($cont->is_admin == 1) && ($admin == 1)) || 571 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
549 (($cont->is_manager == 1) && ($is_manager == 1))) 572 (($cont->is_manager == 1) && ($is_manager == 1)))
550 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.categories.index') ? 'dark:text-gray-100' : null }}"> 573 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.categories.index') ? 'dark:text-gray-100' : null }}">
551 <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a> 574 <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a>
552 </li> 575 </li>
553 @endif 576 @endif
554 @endif 577 @endif
555 578
556 @if ($cont->url_page == "admin/category-emp") 579 @if ($cont->url_page == "admin/category-emp")
557 @if ((($cont->is_admin == 1) && ($admin == 1)) || 580 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
558 (($cont->is_manager == 1) && ($is_manager == 1))) 581 (($cont->is_manager == 1) && ($is_manager == 1)))
559 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.category-emp.index') ? 'dark:text-gray-100' : null }}"> 582 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.category-emp.index') ? 'dark:text-gray-100' : null }}">
560 <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a> 583 <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a>
561 </li> 584 </li>
562 @endif 585 @endif
563 @endif 586 @endif
564 587
565 @if ($cont->url_page == "admin/infobloks") 588 @if ($cont->url_page == "admin/infobloks")
566 @if ((($cont->is_admin == 1) && ($admin == 1)) || 589 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
567 (($cont->is_manager == 1) && ($is_manager == 1))) 590 (($cont->is_manager == 1) && ($is_manager == 1)))
568 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.infobloks.index') ? 'dark:text-gray-100' : null }}"> 591 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.infobloks.index') ? 'dark:text-gray-100' : null }}">
569 <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a> 592 <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a>
570 </li> 593 </li>
571 @endif 594 @endif
572 @endif 595 @endif
573 @endforeach 596 @endforeach
574 <!--<li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.position') ? 'dark:text-gray-100' : null }}"> 597 <!--<li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.position') ? 'dark:text-gray-100' : null }}">
575 <a class="w-full" href=" route('admin.position') }}">Позиция</a> 598 <a class="w-full" href=" route('admin.position') }}">Позиция</a>
576 </li>--> 599 </li>-->
577 </ul> 600 </ul>
578 </template> 601 </template>
579 </li> 602 </li>
580 603
581 <!-- Редактор --> 604 <!-- Редактор -->
582 <li class="relative px-6 py-3"> 605 <li class="relative px-6 py-3">
583 <button 606 <button
584 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" 607 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
585 @click="togglePagesMenu" 608 @click="togglePagesMenu"
586 aria-haspopup="true"> 609 aria-haspopup="true">
587 <span class="inline-flex items-center"> 610 <span class="inline-flex items-center">
588 <svg 611 <svg
589 class="w-5 h-5" 612 class="w-5 h-5"
590 aria-hidden="true" 613 aria-hidden="true"
591 fill="none" 614 fill="none"
592 stroke-linecap="round" 615 stroke-linecap="round"
593 stroke-linejoin="round" 616 stroke-linejoin="round"
594 stroke-width="2" 617 stroke-width="2"
595 viewBox="0 0 24 24" 618 viewBox="0 0 24 24"
596 stroke="currentColor"> 619 stroke="currentColor">
597 <path 620 <path
598 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" 621 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"
599 ></path> 622 ></path>
600 </svg> 623 </svg>
601 <span class="ml-4">Редактор</span> 624 <span class="ml-4">Редактор</span>
602 </span> 625 </span>
603 <svg 626 <svg
604 class="w-4 h-4" 627 class="w-4 h-4"
605 aria-hidden="true" 628 aria-hidden="true"
606 fill="currentColor" 629 fill="currentColor"
607 viewBox="0 0 20 20" 630 viewBox="0 0 20 20"
608 > 631 >
609 <path 632 <path
610 fill-rule="evenodd" 633 fill-rule="evenodd"
611 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" 634 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
612 clip-rule="evenodd" 635 clip-rule="evenodd"
613 ></path> 636 ></path>
614 </svg> 637 </svg>
615 </button> 638 </button>
616 <template x-if="isPagesMenuOpen"> 639 <template x-if="isPagesMenuOpen">
617 <ul 640 <ul
618 x-transition:enter="transition-all ease-in-out duration-300" 641 x-transition:enter="transition-all ease-in-out duration-300"
619 x-transition:enter-start="opacity-25 max-h-0" 642 x-transition:enter-start="opacity-25 max-h-0"
620 x-transition:enter-end="opacity-100 max-h-xl" 643 x-transition:enter-end="opacity-100 max-h-xl"
621 x-transition:leave="transition-all ease-in-out duration-300" 644 x-transition:leave="transition-all ease-in-out duration-300"
622 x-transition:leave-start="opacity-100 max-h-xl" 645 x-transition:leave-start="opacity-100 max-h-xl"
623 x-transition:leave-end="opacity-0 max-h-0" 646 x-transition:leave-end="opacity-0 max-h-0"
624 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900" 647 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
625 aria-label="submenu" 648 aria-label="submenu"
626 > 649 >
627 @foreach ($contents as $cont) 650 @foreach ($contents as $cont)
628 @if ($cont->url_page == "admin/editor-site") 651 @if ($cont->url_page == "admin/editor-site")
629 @if ((($cont->is_admin == 1) && ($admin == 1)) || 652 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
630 (($cont->is_manager == 1) && ($is_manager == 1))) 653 (($cont->is_manager == 1) && ($is_manager == 1)))
631 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-site') ? 'dark:text-gray-100' : null }}"> 654 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-site') ? 'dark:text-gray-100' : null }}">
632 <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> 655 <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a>
633 </li> 656 </li>
634 @endif 657 @endif
635 @endif 658 @endif
636 659
637 @if ($cont->url_page == "admin/edit-blocks") 660 @if ($cont->url_page == "admin/edit-blocks")
638 @if ((($cont->is_admin == 1) && ($admin == 1)) || 661 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
639 (($cont->is_manager == 1) && ($is_manager == 1))) 662 (($cont->is_manager == 1) && ($is_manager == 1)))
640 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.edit-blocks') ? 'dark:text-gray-100' : null }}"> 663 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.edit-blocks') ? 'dark:text-gray-100' : null }}">
641 <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> 664 <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a>
642 </li> 665 </li>
643 @endif 666 @endif
644 @endif 667 @endif
645 668
646 @if ($cont->url_page == "admin/editor-seo") 669 @if ($cont->url_page == "admin/editor-seo")
647 @if ((($cont->is_admin == 1) && ($admin == 1)) || 670 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
648 (($cont->is_manager == 1) && ($is_manager == 1))) 671 (($cont->is_manager == 1) && ($is_manager == 1)))
649 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-seo') ? 'dark:text-gray-100' : null }}"> 672 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-seo') ? 'dark:text-gray-100' : null }}">
650 <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> 673 <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a>
651 </li> 674 </li>
652 @endif 675 @endif
653 @endif 676 @endif
654 677
655 @if ($cont->url_page == "admin/editor-pages") 678 @if ($cont->url_page == "admin/editor-pages")
656 @if ((($cont->is_admin == 1) && ($admin == 1)) || 679 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
657 (($cont->is_manager == 1) && ($is_manager == 1))) 680 (($cont->is_manager == 1) && ($is_manager == 1)))
658 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-pages') ? 'dark:text-gray-100' : null }}"> 681 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-pages') ? 'dark:text-gray-100' : null }}">
659 <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> 682 <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a>
660 </li> 683 </li>
661 @endif 684 @endif
662 @endif 685 @endif
663 686
664 @if ($cont->url_page == "admin/job-titles-main") 687 @if ($cont->url_page == "admin/job-titles-main")
665 @if ((($cont->is_admin == 1) && ($admin == 1)) || 688 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
666 (($cont->is_manager == 1) && ($is_manager == 1))) 689 (($cont->is_manager == 1) && ($is_manager == 1)))
667 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles-main') ? 'dark:text-gray-100' : null }}"> 690 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles-main') ? 'dark:text-gray-100' : null }}">
668 <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> 691 <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a>
669 </li> 692 </li>
670 @endif 693 @endif
671 @endif 694 @endif
672 695
673 @if ($cont->url_page == "admin/employers-main") 696 @if ($cont->url_page == "admin/employers-main")
674 @if ((($cont->is_admin == 1) && ($admin == 1)) || 697 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
675 (($cont->is_manager == 1) && ($is_manager == 1))) 698 (($cont->is_manager == 1) && ($is_manager == 1)))
676 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers-main') ? 'dark:text-gray-100' : null }}"> 699 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers-main') ? 'dark:text-gray-100' : null }}">
677 <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> 700 <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a>
678 </li> 701 </li>
679 @endif 702 @endif
680 @endif 703 @endif
681 704
682 @endforeach 705 @endforeach
683 </ul> 706 </ul>
684 </template> 707 </template>
685 </li> 708 </li>
686 </ul> 709 </ul>
687 710
688 <!--<div class="px-6 my-6"> 711 <!--<div class="px-6 my-6">
689 <button 712 <button
690 class="flex items-center justify-between w-full px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" 713 class="flex items-center justify-between w-full px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
691 > 714 >
692 Create account 715 Create account
693 <span class="ml-2" aria-hidden="true">+</span> 716 <span class="ml-2" aria-hidden="true">+</span>
694 </button> 717 </button>
695 </div>--> 718 </div>-->
696 </div> 719 </div>
697 </aside> 720 </aside>
698 <!-- Mobile sidebar --> 721 <!-- Mobile sidebar -->
699 <!-- Backdrop --> 722 <!-- Backdrop -->
700 <div 723 <div
701 x-show="isSideMenuOpen" 724 x-show="isSideMenuOpen"
702 x-transition:enter="transition ease-in-out duration-150" 725 x-transition:enter="transition ease-in-out duration-150"
703 x-transition:enter-start="opacity-0" 726 x-transition:enter-start="opacity-0"
704 x-transition:enter-end="opacity-100" 727 x-transition:enter-end="opacity-100"
705 x-transition:leave="transition ease-in-out duration-150" 728 x-transition:leave="transition ease-in-out duration-150"
706 x-transition:leave-start="opacity-100" 729 x-transition:leave-start="opacity-100"
707 x-transition:leave-end="opacity-0" 730 x-transition:leave-end="opacity-0"
708 class="fixed inset-0 z-10 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center" 731 class="fixed inset-0 z-10 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center"
709 ></div> 732 ></div>
710 <aside 733 <aside
711 class="fixed inset-y-0 z-20 flex-shrink-0 w-64 mt-16 overflow-y-auto bg-white dark:bg-gray-800 md:hidden" 734 class="fixed inset-y-0 z-20 flex-shrink-0 w-64 mt-16 overflow-y-auto bg-white dark:bg-gray-800 md:hidden"
712 x-show="isSideMenuOpen" 735 x-show="isSideMenuOpen"
713 x-transition:enter="transition ease-in-out duration-150" 736 x-transition:enter="transition ease-in-out duration-150"
714 x-transition:enter-start="opacity-0 transform -translate-x-20" 737 x-transition:enter-start="opacity-0 transform -translate-x-20"
715 x-transition:enter-end="opacity-100" 738 x-transition:enter-end="opacity-100"
716 x-transition:leave="transition ease-in-out duration-150" 739 x-transition:leave="transition ease-in-out duration-150"
717 x-transition:leave-start="opacity-100" 740 x-transition:leave-start="opacity-100"
718 x-transition:leave-end="opacity-0 transform -translate-x-20" 741 x-transition:leave-end="opacity-0 transform -translate-x-20"
719 @click.away="closeSideMenu" 742 @click.away="closeSideMenu"
720 @keydown.escape="closeSideMenu" 743 @keydown.escape="closeSideMenu"
721 > 744 >
722 <div class="py-4 text-gray-500 dark:text-gray-400"> 745 <div class="py-4 text-gray-500 dark:text-gray-400">
723 <a 746 <a
724 class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200" 747 class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200"
725 href="{{ route('admin.index') }}" 748 href="{{ route('admin.index') }}"
726 > 749 >
727 Админка 750 Админка
728 </a> 751 </a>
729 <ul class="mt-6"> 752 <ul class="mt-6">
730 <li class="relative px-6 py-3"> 753 <li class="relative px-6 py-3">
731 <span 754 <span
732 class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg" 755 class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg"
733 aria-hidden="true" 756 aria-hidden="true"
734 ></span> 757 ></span>
735 <a 758 <a
736 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.index') }}" 759 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.index') }}"
737 > 760 >
738 <svg 761 <svg
739 class="w-5 h-5" 762 class="w-5 h-5"
740 aria-hidden="true" 763 aria-hidden="true"
741 fill="none" 764 fill="none"
742 stroke-linecap="round" 765 stroke-linecap="round"
743 stroke-linejoin="round" 766 stroke-linejoin="round"
744 stroke-width="2" 767 stroke-width="2"
745 viewBox="0 0 24 24" 768 viewBox="0 0 24 24"
746 stroke="currentColor" 769 stroke="currentColor"
747 > 770 >
748 <path 771 <path
749 d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" 772 d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
750 ></path> 773 ></path>
751 </svg> 774 </svg>
752 <span class="ml-4">Главная страница</span> 775 <span class="ml-4">Главная страница</span>
753 </a> 776 </a>
754 </li> 777 </li>
755 </ul> 778 </ul>
756 <ul> 779 <ul>
757 @foreach ($contents as $cont) 780 @foreach ($contents as $cont)
758 @if ($cont->url_page == "admin/users") 781 @if ($cont->url_page == "admin/users")
759 @if ((($cont->is_admin == 1) && ($admin == 1)) || 782 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
760 (($cont->is_manager == 1) && ($is_manager == 1))) 783 (($cont->is_manager == 1) && ($is_manager == 1)))
761 <li class="relative px-6 py-3"> 784 <li class="relative px-6 py-3">
762 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.users') }}"> 785 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.users') }}">
763 <svg 786 <svg
764 class="w-5 h-5" 787 class="w-5 h-5"
765 aria-hidden="true" 788 aria-hidden="true"
766 fill="none" 789 fill="none"
767 stroke-linecap="round" 790 stroke-linecap="round"
768 stroke-linejoin="round" 791 stroke-linejoin="round"
769 stroke-width="2" 792 stroke-width="2"
770 viewBox="0 0 24 24" 793 viewBox="0 0 24 24"
771 stroke="currentColor" 794 stroke="currentColor"
772 > 795 >
773 <path 796 <path
774 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 797 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
775 ></path> 798 ></path>
776 </svg> 799 </svg>
777 <span class="ml-4">Пользователи</span> 800 <span class="ml-4">Пользователи</span>
778 </a> 801 </a>
779 </li> 802 </li>
780 @endif 803 @endif
781 @endif 804 @endif
782 805
783 @if ($cont->url_page == "admin/admin-users") 806 @if ($cont->url_page == "admin/admin-users")
784 @if ((($cont->is_admin == 1) && ($admin == 1)) || 807 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
785 (($cont->is_manager == 1) && ($is_manager == 1))) 808 (($cont->is_manager == 1) && ($is_manager == 1)))
786 <li class="relative px-6 py-3"> 809 <li class="relative px-6 py-3">
787 <a 810 <a
788 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-users') }}" 811 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-users') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-users') }}"
789 > 812 >
790 <svg 813 <svg
791 class="w-5 h-5" 814 class="w-5 h-5"
792 aria-hidden="true" 815 aria-hidden="true"
793 fill="none" 816 fill="none"
794 stroke-linecap="round" 817 stroke-linecap="round"
795 stroke-linejoin="round" 818 stroke-linejoin="round"
796 stroke-width="2" 819 stroke-width="2"
797 viewBox="0 0 24 24" 820 viewBox="0 0 24 24"
798 stroke="currentColor" 821 stroke="currentColor"
799 > 822 >
800 <path 823 <path
801 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" 824 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
802 ></path> 825 ></path>
803 </svg> 826 </svg>
804 <span class="ml-4">Администраторы</span> 827 <span class="ml-4">Администраторы</span>
805 </a> 828 </a>
806 </li> 829 </li>
807 @endif 830 @endif
808 @endif 831 @endif
809 832
810 @if ($cont->url_page == "admin/employers") 833 @if ($cont->url_page == "admin/employers")
811 @if ((($cont->is_admin == 1) && ($admin == 1)) || 834 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
812 (($cont->is_manager == 1) && ($is_manager == 1))) 835 (($cont->is_manager == 1) && ($is_manager == 1)))
813 <li class="relative px-6 py-3"> 836 <li class="relative px-6 py-3">
814 <a 837 <a
815 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.employers') }}" 838 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.employers') }}"
816 > 839 >
817 <svg 840 <svg
818 class="w-5 h-5" 841 class="w-5 h-5"
819 aria-hidden="true" 842 aria-hidden="true"
820 fill="none" 843 fill="none"
821 stroke-linecap="round" 844 stroke-linecap="round"
822 stroke-linejoin="round" 845 stroke-linejoin="round"
823 stroke-width="2" 846 stroke-width="2"
824 viewBox="0 0 24 24" 847 viewBox="0 0 24 24"
825 stroke="currentColor" 848 stroke="currentColor"
826 > 849 >
827 <path 850 <path
828 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" 851 d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
829 ></path> 852 ></path>
830 </svg> 853 </svg>
831 <span class="ml-4">Работодатели</span> 854 <span class="ml-4">Работодатели</span>
832 </a> 855 </a>
833 </li> 856 </li>
834 @endif 857 @endif
835 @endif 858 @endif
836 859
837 @if ($cont->url_page == "admin/workers") 860 @if ($cont->url_page == "admin/workers")
838 @if ((($cont->is_admin == 1) && ($admin == 1)) || 861 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
839 (($cont->is_manager == 1) && ($is_manager == 1))) 862 (($cont->is_manager == 1) && ($is_manager == 1)))
840 <li class="relative px-6 py-3"> 863 <li class="relative px-6 py-3">
841 <a 864 <a
842 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.workers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.workers') }}" 865 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.workers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.workers') }}"
843 > 866 >
844 <svg 867 <svg
845 class="w-5 h-5" 868 class="w-5 h-5"
846 aria-hidden="true" 869 aria-hidden="true"
847 fill="none" 870 fill="none"
848 stroke-linecap="round" 871 stroke-linecap="round"
849 stroke-linejoin="round" 872 stroke-linejoin="round"
850 stroke-width="2" 873 stroke-width="2"
851 viewBox="0 0 24 24" 874 viewBox="0 0 24 24"
852 stroke="currentColor" 875 stroke="currentColor"
853 > 876 >
854 <path 877 <path
855 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" 878 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"
856 ></path> 879 ></path>
857 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> 880 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path>
858 </svg> 881 </svg>
859 <span class="ml-4">Соискатели</span> 882 <span class="ml-4">Соискатели</span>
860 </a> 883 </a>
861 </li> 884 </li>
862 @endif 885 @endif
863 @endif 886 @endif
864 887
865 @if ($cont->url_page == "admin/ad-employers") 888 @if ($cont->url_page == "admin/ad-employers")
866 @if ((($cont->is_admin == 1) && ($admin == 1)) || 889 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
867 (($cont->is_manager == 1) && ($is_manager == 1))) 890 (($cont->is_manager == 1) && ($is_manager == 1)))
868 <li class="relative px-6 py-3"> 891 <li class="relative px-6 py-3">
869 <a 892 <a
870 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.ad-employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.ad-employers') }}" 893 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.ad-employers') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.ad-employers') }}"
871 > 894 >
872 <svg 895 <svg
873 class="w-5 h-5" 896 class="w-5 h-5"
874 aria-hidden="true" 897 aria-hidden="true"
875 fill="none" 898 fill="none"
876 stroke-linecap="round" 899 stroke-linecap="round"
877 stroke-linejoin="round" 900 stroke-linejoin="round"
878 stroke-width="2" 901 stroke-width="2"
879 viewBox="0 0 24 24" 902 viewBox="0 0 24 24"
880 stroke="currentColor" 903 stroke="currentColor"
881 > 904 >
882 <path 905 <path
883 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" 906 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
884 ></path> 907 ></path>
885 </svg> 908 </svg>
886 <span class="ml-4">Вакансии</span> 909 <span class="ml-4">Вакансии</span>
887 </a> 910 </a>
888 </li> 911 </li>
889 @endif 912 @endif
890 @endif 913 @endif
891 914
892 @if ($cont->url_page == "admin/messages") 915 @if ($cont->url_page == "admin/messages")
893 @if ((($cont->is_admin == 1) && ($admin == 1)) || 916 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
894 (($cont->is_manager == 1) && ($is_manager == 1))) 917 (($cont->is_manager == 1) && ($is_manager == 1)))
895 <li class="relative px-6 py-3"> 918 <li class="relative px-6 py-3">
896 <a 919 <a
897 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}" 920 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}"
898 > 921 >
899 <svg 922 <svg
900 class="w-5 h-5" 923 class="w-5 h-5"
901 aria-hidden="true" 924 aria-hidden="true"
902 fill="none" 925 fill="none"
903 stroke-linecap="round" 926 stroke-linecap="round"
904 stroke-linejoin="round" 927 stroke-linejoin="round"
905 stroke-width="2" 928 stroke-width="2"
906 viewBox="0 0 24 24" 929 viewBox="0 0 24 24"
907 stroke="currentColor" 930 stroke="currentColor"
908 > 931 >
909 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 932 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
910 </svg> 933 </svg>
911 <span class="ml-4">Сообщения все</span> 934 <span class="ml-4">Сообщения все</span>
912 </a> 935 </a>
913 </li> 936 </li>
914 @endif 937 @endif
915 @endif 938 @endif
916 939
917 @if ($cont->url_page == "admin/admin-messages") 940 @if ($cont->url_page == "admin/admin-messages")
918 @if ((($cont->is_admin == 1) && ($admin == 1)) || 941 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
919 (($cont->is_manager == 1) && ($is_manager == 1))) 942 (($cont->is_manager == 1) && ($is_manager == 1)))
920 <li class="relative px-6 py-3"> 943 <li class="relative px-6 py-3">
921 <a 944 <a
922 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-messages') }}" 945 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.admin-messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.admin-messages') }}"
923 > 946 >
924 <svg 947 <svg
925 class="w-5 h-5" 948 class="w-5 h-5"
926 aria-hidden="true" 949 aria-hidden="true"
927 fill="none" 950 fill="none"
928 stroke-linecap="round" 951 stroke-linecap="round"
929 stroke-linejoin="round" 952 stroke-linejoin="round"
930 stroke-width="2" 953 stroke-width="2"
931 viewBox="0 0 24 24" 954 viewBox="0 0 24 24"
932 stroke="currentColor" 955 stroke="currentColor"
933 > 956 >
934 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 957 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
935 </svg> 958 </svg>
936 <span class="ml-4">Заявки на рассылку</span> 959 <span class="ml-4">Заявки на рассылку</span>
937 </a> 960 </a>
938 </li> 961 </li>
939 @endif 962 @endif
940 @endif 963 @endif
941 964
942 @if ($cont->url_page == "admin/groups") 965 @if ($cont->url_page == "admin/groups")
943 @if ((($cont->is_admin == 1) && ($admin == 1)) || 966 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
944 (($cont->is_manager == 1) && ($is_manager == 1))) 967 (($cont->is_manager == 1) && ($is_manager == 1)))
945 <li class="relative px-6 py-3"> 968 <li class="relative px-6 py-3">
946 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.groups') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.groups') }}"> 969 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.groups') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.groups') }}">
947 <svg 970 <svg
948 class="w-5 h-5" 971 class="w-5 h-5"
949 aria-hidden="true" 972 aria-hidden="true"
950 fill="none" 973 fill="none"
951 stroke-linecap="round" 974 stroke-linecap="round"
952 stroke-linejoin="round" 975 stroke-linejoin="round"
953 stroke-width="2" 976 stroke-width="2"
954 viewBox="0 0 24 24" 977 viewBox="0 0 24 24"
955 stroke="currentColor" 978 stroke="currentColor"
956 > 979 >
957 <path 980 <path
958 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 981 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
959 ></path> 982 ></path>
960 </svg> 983 </svg>
961 <span class="ml-4">Группы пользователей</span> 984 <span class="ml-4">Группы пользователей</span>
962 </a> 985 </a>
963 </li> 986 </li>
964 @endif 987 @endif
965 @endif 988 @endif
966 989
967 @if ($cont->url_page == "admin/media") 990 @if ($cont->url_page == "admin/media")
968 @if ((($cont->is_admin == 1) && ($admin == 1)) || 991 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
969 (($cont->is_manager == 1) && ($is_manager == 1))) 992 (($cont->is_manager == 1) && ($is_manager == 1)))
970 <li class="relative px-6 py-3"> 993 <li class="relative px-6 py-3">
971 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.media') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.media') }}"> 994 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.media') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.media') }}">
972 <svg 995 <svg
973 class="w-5 h-5" 996 class="w-5 h-5"
974 aria-hidden="true" 997 aria-hidden="true"
975 fill="none" 998 fill="none"
976 stroke-linecap="round" 999 stroke-linecap="round"
977 stroke-linejoin="round" 1000 stroke-linejoin="round"
978 stroke-width="2" 1001 stroke-width="2"
979 viewBox="0 0 24 24" 1002 viewBox="0 0 24 24"
980 stroke="currentColor" 1003 stroke="currentColor"
981 > 1004 >
982 <path 1005 <path
983 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 1006 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
984 ></path> 1007 ></path>
985 </svg> 1008 </svg>
986 <span class="ml-4">Медиа</span> 1009 <span class="ml-4">Медиа</span>
987 </a> 1010 </a>
988 </li> 1011 </li>
989 @endif 1012 @endif
990 @endif 1013 @endif
991 1014
992 @if ($cont->url_page == "admin/roles") 1015 @if ($cont->url_page == "admin/roles")
993 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1016 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
994 (($cont->is_manager == 1) && ($is_manager == 1))) 1017 (($cont->is_manager == 1) && ($is_manager == 1)))
995 1018
996 <li class="relative px-6 py-3"> 1019 <li class="relative px-6 py-3">
997 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.roles') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.roles') }}"> 1020 <a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.roles') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.roles') }}">
998 <svg 1021 <svg
999 class="w-5 h-5" 1022 class="w-5 h-5"
1000 aria-hidden="true" 1023 aria-hidden="true"
1001 fill="none" 1024 fill="none"
1002 stroke-linecap="round" 1025 stroke-linecap="round"
1003 stroke-linejoin="round" 1026 stroke-linejoin="round"
1004 stroke-width="2" 1027 stroke-width="2"
1005 viewBox="0 0 24 24" 1028 viewBox="0 0 24 24"
1006 stroke="currentColor" 1029 stroke="currentColor"
1007 > 1030 >
1008 <path 1031 <path
1009 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" 1032 d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
1010 ></path> 1033 ></path>
1011 </svg> 1034 </svg>
1012 <span class="ml-4">Роли пользователей</span> 1035 <span class="ml-4">Роли пользователей</span>
1013 </a> 1036 </a>
1014 </li> 1037 </li>
1015 @endif 1038 @endif
1016 @endif 1039 @endif
1017 1040
1018 @if ($cont->url_page == "admin/basedata") 1041 @if ($cont->url_page == "admin/basedata")
1019 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1042 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1020 (($cont->is_manager == 1) && ($is_manager == 1))) 1043 (($cont->is_manager == 1) && ($is_manager == 1)))
1021 <li class="relative px-6 py-3"> 1044 <li class="relative px-6 py-3">
1022 <a 1045 <a
1023 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.basedata') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.basedata') }}" 1046 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.basedata') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.basedata') }}"
1024 > 1047 >
1025 <svg 1048 <svg
1026 class="w-5 h-5" 1049 class="w-5 h-5"
1027 aria-hidden="true" 1050 aria-hidden="true"
1028 fill="none" 1051 fill="none"
1029 stroke-linecap="round" 1052 stroke-linecap="round"
1030 stroke-linejoin="round" 1053 stroke-linejoin="round"
1031 stroke-width="2" 1054 stroke-width="2"
1032 viewBox="0 0 24 24" 1055 viewBox="0 0 24 24"
1033 stroke="currentColor" 1056 stroke="currentColor"
1034 > 1057 >
1035 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 1058 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
1036 </svg> 1059 </svg>
1037 <span class="ml-4">Базы данных</span> 1060 <span class="ml-4">Базы данных</span>
1038 </a> 1061 </a>
1039 </li> 1062 </li>
1040 @endif 1063 @endif
1041 @endif 1064 @endif
1042 1065
1043 @if ($cont->url_page == "admin/education") 1066 @if ($cont->url_page == "admin/education")
1044 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1067 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1045 (($cont->is_manager == 1) && ($is_manager == 1))) 1068 (($cont->is_manager == 1) && ($is_manager == 1)))
1046 <li class="relative px-6 py-3"> 1069 <li class="relative px-6 py-3">
1047 <a 1070 <a
1048 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.education.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.education.index') }}" 1071 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.education.index') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.education.index') }}"
1049 > 1072 >
1050 <svg 1073 <svg
1051 class="w-5 h-5" 1074 class="w-5 h-5"
1052 aria-hidden="true" 1075 aria-hidden="true"
1053 fill="none" 1076 fill="none"
1054 stroke-linecap="round" 1077 stroke-linecap="round"
1055 stroke-linejoin="round" 1078 stroke-linejoin="round"
1056 stroke-width="2" 1079 stroke-width="2"
1057 viewBox="0 0 24 24" 1080 viewBox="0 0 24 24"
1058 stroke="currentColor" 1081 stroke="currentColor"
1059 > 1082 >
1060 <path 1083 <path
1061 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" 1084 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
1062 ></path> 1085 ></path>
1063 </svg> 1086 </svg>
1064 <span class="ml-4">Учебн.заведения</span> 1087 <span class="ml-4">Учебн.заведения</span>
1065 </a> 1088 </a>
1066 </li> 1089 </li>
1067 @endif 1090 @endif
1068 @endif 1091 @endif
1069 1092
1070 @if ($cont->url_page == "admin/statics") 1093 @if ($cont->url_page == "admin/statics")
1071 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1094 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1072 (($cont->is_manager == 1) && ($is_manager == 1))) 1095 (($cont->is_manager == 1) && ($is_manager == 1)))
1073 <li class="relative px-6 py-3"> 1096 <li class="relative px-6 py-3">
1074 <a 1097 <a
1075 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.statics') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.statics') }}" 1098 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.statics') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.statics') }}"
1076 > 1099 >
1077 <svg 1100 <svg
1078 class="w-5 h-5" 1101 class="w-5 h-5"
1079 aria-hidden="true" 1102 aria-hidden="true"
1080 fill="none" 1103 fill="none"
1081 stroke-linecap="round" 1104 stroke-linecap="round"
1082 stroke-linejoin="round" 1105 stroke-linejoin="round"
1083 stroke-width="2" 1106 stroke-width="2"
1084 viewBox="0 0 24 24" 1107 viewBox="0 0 24 24"
1085 stroke="currentColor" 1108 stroke="currentColor"
1086 > 1109 >
1087 <path 1110 <path
1088 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" 1111 d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"
1089 ></path> 1112 ></path>
1090 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> 1113 <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path>
1091 </svg> 1114 </svg>
1092 <span class="ml-4">Статистика</span> 1115 <span class="ml-4">Статистика</span>
1093 </a> 1116 </a>
1094 </li> 1117 </li>
1095 @endif 1118 @endif
1096 @endif 1119 @endif
1097 1120
1098 @if ($cont->url_page == "admin/messages") 1121 @if ($cont->url_page == "admin/messages")
1099 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1122 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1100 (($cont->is_manager == 1) && ($is_manager == 1))) 1123 (($cont->is_manager == 1) && ($is_manager == 1)))
1101 <li class="relative px-6 py-3"> 1124 <li class="relative px-6 py-3">
1102 <a 1125 <a
1103 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}" 1126 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.messages') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.messages') }}"
1104 > 1127 >
1105 <svg 1128 <svg
1106 class="w-5 h-5" 1129 class="w-5 h-5"
1107 aria-hidden="true" 1130 aria-hidden="true"
1108 fill="none" 1131 fill="none"
1109 stroke-linecap="round" 1132 stroke-linecap="round"
1110 stroke-linejoin="round" 1133 stroke-linejoin="round"
1111 stroke-width="2" 1134 stroke-width="2"
1112 viewBox="0 0 24 24" 1135 viewBox="0 0 24 24"
1113 stroke="currentColor" 1136 stroke="currentColor"
1114 > 1137 >
1115 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> 1138 <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
1116 </svg> 1139 </svg>
1117 <span class="ml-4">Сообщения все</span> 1140 <span class="ml-4">Сообщения все</span>
1118 </a> 1141 </a>
1119 </li> 1142 </li>
1120 @endif 1143 @endif
1121 @endif 1144 @endif
1122 1145
1123 @if ($cont->url_page == "admin/reclames") 1146 @if ($cont->url_page == "admin/reclames")
1124 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1147 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1125 (($cont->is_manager == 1) && ($is_manager == 1))) 1148 (($cont->is_manager == 1) && ($is_manager == 1)))
1126 <li class="relative px-6 py-3"> 1149 <li class="relative px-6 py-3">
1127 <a 1150 <a
1128 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.reclames') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.reclames') }}" 1151 class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.reclames') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.reclames') }}"
1129 > 1152 >
1130 <svg 1153 <svg
1131 class="w-5 h-5" 1154 class="w-5 h-5"
1132 aria-hidden="true" 1155 aria-hidden="true"
1133 fill="none" 1156 fill="none"
1134 stroke-linecap="round" 1157 stroke-linecap="round"
1135 stroke-linejoin="round" 1158 stroke-linejoin="round"
1136 stroke-width="2" 1159 stroke-width="2"
1137 viewBox="0 0 24 24" 1160 viewBox="0 0 24 24"
1138 stroke="currentColor" 1161 stroke="currentColor"
1139 > 1162 >
1140 <path 1163 <path
1141 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122" 1164 d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
1142 ></path> 1165 ></path>
1143 </svg> 1166 </svg>
1144 <span class="ml-4">Реклама</span> 1167 <span class="ml-4">Реклама</span>
1145 </a> 1168 </a>
1146 </li> 1169 </li>
1147 @endif 1170 @endif
1148 @endif 1171 @endif
1149 @endforeach 1172 @endforeach
1150 1173
1151 <!-- Справочники --> 1174 <!-- Справочники -->
1152 <li class="relative px-6 py-3" x-data="{ open2: false }"> 1175 <li class="relative px-6 py-3" x-data="{ open2: false }">
1153 <button 1176 <button
1154 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" 1177 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
1155 @click="open2=!open2" 1178 @click="open2=!open2"
1156 aria-haspopup="true"> 1179 aria-haspopup="true">
1157 <span class="inline-flex items-center"> 1180 <span class="inline-flex items-center">
1158 <svg 1181 <svg
1159 class="w-5 h-5" 1182 class="w-5 h-5"
1160 aria-hidden="true" 1183 aria-hidden="true"
1161 fill="none" 1184 fill="none"
1162 stroke-linecap="round" 1185 stroke-linecap="round"
1163 stroke-linejoin="round" 1186 stroke-linejoin="round"
1164 stroke-width="2" 1187 stroke-width="2"
1165 viewBox="0 0 24 24" 1188 viewBox="0 0 24 24"
1166 stroke="currentColor"> 1189 stroke="currentColor">
1167 <path 1190 <path
1168 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" 1191 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"
1169 ></path> 1192 ></path>
1170 </svg> 1193 </svg>
1171 <span class="ml-4">Справочники</span> 1194 <span class="ml-4">Справочники</span>
1172 </span> 1195 </span>
1173 <svg 1196 <svg
1174 class="w-4 h-4" 1197 class="w-4 h-4"
1175 aria-hidden="true" 1198 aria-hidden="true"
1176 fill="currentColor" 1199 fill="currentColor"
1177 viewBox="0 0 20 20" 1200 viewBox="0 0 20 20"
1178 > 1201 >
1179 <path 1202 <path
1180 fill-rule="evenodd" 1203 fill-rule="evenodd"
1181 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" 1204 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
1182 clip-rule="evenodd" 1205 clip-rule="evenodd"
1183 ></path> 1206 ></path>
1184 </svg> 1207 </svg>
1185 </button> 1208 </button>
1186 <template x-if="open2"> 1209 <template x-if="open2">
1187 <ul 1210 <ul
1188 x-transition:enter="transition-all ease-in-out duration-300" 1211 x-transition:enter="transition-all ease-in-out duration-300"
1189 x-transition:enter-start="opacity-25 max-h-0" 1212 x-transition:enter-start="opacity-25 max-h-0"
1190 x-transition:enter-end="opacity-100 max-h-xl" 1213 x-transition:enter-end="opacity-100 max-h-xl"
1191 x-transition:leave="transition-all ease-in-out duration-300" 1214 x-transition:leave="transition-all ease-in-out duration-300"
1192 x-transition:leave-start="opacity-100 max-h-xl" 1215 x-transition:leave-start="opacity-100 max-h-xl"
1193 x-transition:leave-end="opacity-0 max-h-0" 1216 x-transition:leave-end="opacity-0 max-h-0"
1194 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900" 1217 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
1195 aria-label="submenu" 1218 aria-label="submenu"
1196 > 1219 >
1197 @foreach ($contents as $cont) 1220 @foreach ($contents as $cont)
1198 @if ($cont->url_page == "admin/job-titles") 1221 @if ($cont->url_page == "admin/job-titles")
1199 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1222 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1200 (($cont->is_manager == 1) && ($is_manager == 1))) 1223 (($cont->is_manager == 1) && ($is_manager == 1)))
1201 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles.index') ? 'dark:text-gray-100' : null }}"> 1224 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles.index') ? 'dark:text-gray-100' : null }}">
1202 <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a> 1225 <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a>
1203 </li> 1226 </li>
1204 @endif 1227 @endif
1205 @endif 1228 @endif
1206 1229
1207 @if ($cont->url_page == "admin/categories") 1230 @if ($cont->url_page == "admin/categories")
1208 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1231 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1209 (($cont->is_manager == 1) && ($is_manager == 1))) 1232 (($cont->is_manager == 1) && ($is_manager == 1)))
1210 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.categories.index') ? 'dark:text-gray-100' : null }}"> 1233 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.categories.index') ? 'dark:text-gray-100' : null }}">
1211 <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a> 1234 <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a>
1212 </li> 1235 </li>
1213 @endif 1236 @endif
1214 @endif 1237 @endif
1215 1238
1216 @if ($cont->url_page == "admin/category-emp") 1239 @if ($cont->url_page == "admin/category-emp")
1217 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1240 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1218 (($cont->is_manager == 1) && ($is_manager == 1))) 1241 (($cont->is_manager == 1) && ($is_manager == 1)))
1219 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.category-emp.index') ? 'dark:text-gray-100' : null }}"> 1242 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.category-emp.index') ? 'dark:text-gray-100' : null }}">
1220 <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a> 1243 <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a>
1221 </li> 1244 </li>
1222 @endif 1245 @endif
1223 @endif 1246 @endif
1224 1247
1225 @if ($cont->url_page == "admin/infobloks") 1248 @if ($cont->url_page == "admin/infobloks")
1226 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1249 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1227 (($cont->is_manager == 1) && ($is_manager == 1))) 1250 (($cont->is_manager == 1) && ($is_manager == 1)))
1228 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.infobloks.index') ? 'dark:text-gray-100' : null }}"> 1251 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.infobloks.index') ? 'dark:text-gray-100' : null }}">
1229 <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a> 1252 <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a>
1230 </li> 1253 </li>
1231 @endif 1254 @endif
1232 @endif 1255 @endif
1233 1256
1234 @if ($cont->url_page == "admin/position") 1257 @if ($cont->url_page == "admin/position")
1235 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1258 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1236 (($cont->is_manager == 1) && ($is_manager == 1))) 1259 (($cont->is_manager == 1) && ($is_manager == 1)))
1237 <!--<li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.position') ? 'dark:text-gray-100' : null }}"> 1260 <!--<li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.position') ? 'dark:text-gray-100' : null }}">
1238 <a class="w-full" href=" route('admin.position') }}">Позиция</a> 1261 <a class="w-full" href=" route('admin.position') }}">Позиция</a>
1239 </li>--> 1262 </li>-->
1240 @endif 1263 @endif
1241 @endif 1264 @endif
1242 1265
1243 @endforeach 1266 @endforeach
1244 </ul> 1267 </ul>
1245 </template> 1268 </template>
1246 </li> 1269 </li>
1247 1270
1248 <!-- Редактор --> 1271 <!-- Редактор -->
1249 <li class="relative px-6 py-3"> 1272 <li class="relative px-6 py-3">
1250 <button 1273 <button
1251 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" 1274 class="inline-flex items-center justify-between w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
1252 @click="togglePagesMenu" 1275 @click="togglePagesMenu"
1253 aria-haspopup="true" 1276 aria-haspopup="true"
1254 > 1277 >
1255 <span class="inline-flex items-center"> 1278 <span class="inline-flex items-center">
1256 <svg 1279 <svg
1257 class="w-5 h-5" 1280 class="w-5 h-5"
1258 aria-hidden="true" 1281 aria-hidden="true"
1259 fill="none" 1282 fill="none"
1260 stroke-linecap="round" 1283 stroke-linecap="round"
1261 stroke-linejoin="round" 1284 stroke-linejoin="round"
1262 stroke-width="2" 1285 stroke-width="2"
1263 viewBox="0 0 24 24" 1286 viewBox="0 0 24 24"
1264 stroke="currentColor" 1287 stroke="currentColor"
1265 > 1288 >
1266 <path 1289 <path
1267 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" 1290 d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"
1268 ></path> 1291 ></path>
1269 </svg> 1292 </svg>
1270 <span class="ml-4">Редактор</span> 1293 <span class="ml-4">Редактор</span>
1271 </span> 1294 </span>
1272 <svg 1295 <svg
1273 class="w-4 h-4" 1296 class="w-4 h-4"
1274 aria-hidden="true" 1297 aria-hidden="true"
1275 fill="currentColor" 1298 fill="currentColor"
1276 viewBox="0 0 20 20" 1299 viewBox="0 0 20 20"
1277 > 1300 >
1278 <path 1301 <path
1279 fill-rule="evenodd" 1302 fill-rule="evenodd"
1280 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" 1303 d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
1281 clip-rule="evenodd" 1304 clip-rule="evenodd"
1282 ></path> 1305 ></path>
1283 </svg> 1306 </svg>
1284 </button> 1307 </button>
1285 <template x-if="isPagesMenuOpen"> 1308 <template x-if="isPagesMenuOpen">
1286 <ul 1309 <ul
1287 x-transition:enter="transition-all ease-in-out duration-300" 1310 x-transition:enter="transition-all ease-in-out duration-300"
1288 x-transition:enter-start="opacity-25 max-h-0" 1311 x-transition:enter-start="opacity-25 max-h-0"
1289 x-transition:enter-end="opacity-100 max-h-xl" 1312 x-transition:enter-end="opacity-100 max-h-xl"
1290 x-transition:leave="transition-all ease-in-out duration-300" 1313 x-transition:leave="transition-all ease-in-out duration-300"
1291 x-transition:leave-start="opacity-100 max-h-xl" 1314 x-transition:leave-start="opacity-100 max-h-xl"
1292 x-transition:leave-end="opacity-0 max-h-0" 1315 x-transition:leave-end="opacity-0 max-h-0"
1293 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900" 1316 class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900"
1294 aria-label="submenu" 1317 aria-label="submenu"
1295 > 1318 >
1296 @foreach ($contents as $cont) 1319 @foreach ($contents as $cont)
1297 @if ($cont->url_page == "admin/editor-site") 1320 @if ($cont->url_page == "admin/editor-site")
1298 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1321 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1299 (($cont->is_manager == 1) && ($is_manager == 1))) 1322 (($cont->is_manager == 1) && ($is_manager == 1)))
1300 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-site') ? 'dark:text-gray-100' : null }}"> 1323 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-site') ? 'dark:text-gray-100' : null }}">
1301 <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> 1324 <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a>
1302 </li> 1325 </li>
1303 @endif 1326 @endif
1304 @endif 1327 @endif
1305 1328
1306 @if ($cont->url_page == "admin/edit-blocks") 1329 @if ($cont->url_page == "admin/edit-blocks")
1307 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1330 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1308 (($cont->is_manager == 1) && ($is_manager == 1))) 1331 (($cont->is_manager == 1) && ($is_manager == 1)))
1309 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.edit-blocks') ? 'dark:text-gray-100' : null }}"> 1332 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.edit-blocks') ? 'dark:text-gray-100' : null }}">
1310 <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> 1333 <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a>
1311 </li> 1334 </li>
1312 @endif 1335 @endif
1313 @endif 1336 @endif
1314 1337
1315 @if ($cont->url_page == "admin/editor-seo") 1338 @if ($cont->url_page == "admin/editor-seo")
1316 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1339 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1317 (($cont->is_manager == 1) && ($is_manager == 1))) 1340 (($cont->is_manager == 1) && ($is_manager == 1)))
1318 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-seo') ? 'dark:text-gray-100' : null }}"> 1341 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-seo') ? 'dark:text-gray-100' : null }}">
1319 <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> 1342 <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a>
1320 </li> 1343 </li>
1321 @endif 1344 @endif
1322 @endif 1345 @endif
1323 1346
1324 @if ($cont->url_page == "admin/editor-pages") 1347 @if ($cont->url_page == "admin/editor-pages")
1325 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1348 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1326 (($cont->is_manager == 1) && ($is_manager == 1))) 1349 (($cont->is_manager == 1) && ($is_manager == 1)))
1327 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-pages') ? 'dark:text-gray-100' : null }}"> 1350 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.editor-pages') ? 'dark:text-gray-100' : null }}">
1328 <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> 1351 <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a>
1329 </li> 1352 </li>
1330 @endif 1353 @endif
1331 @endif 1354 @endif
1332 1355
1333 @if ($cont->url_page == "admin/job-titles-main") 1356 @if ($cont->url_page == "admin/job-titles-main")
1334 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1357 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1335 (($cont->is_manager == 1) && ($is_manager == 1))) 1358 (($cont->is_manager == 1) && ($is_manager == 1)))
1336 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles-main') ? 'dark:text-gray-100' : null }}"> 1359 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.job-titles-main') ? 'dark:text-gray-100' : null }}">
1337 <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> 1360 <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a>
1338 </li> 1361 </li>
1339 @endif 1362 @endif
1340 @endif 1363 @endif
1341 1364
1342 @if ($cont->url_page == "admin/employers-main") 1365 @if ($cont->url_page == "admin/employers-main")
1343 @if ((($cont->is_admin == 1) && ($admin == 1)) || 1366 @if ((($cont->is_admin == 1) && ($admin == 1)) ||
1344 (($cont->is_manager == 1) && ($is_manager == 1))) 1367 (($cont->is_manager == 1) && ($is_manager == 1)))
1345 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers-main') ? 'dark:text-gray-100' : null }}"> 1368 <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 {{ Request::routeIs('admin.employers-main') ? 'dark:text-gray-100' : null }}">
1346 <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> 1369 <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a>
1347 </li> 1370 </li>
1348 @endif 1371 @endif
1349 @endif 1372 @endif
1350 1373
1351 @endforeach 1374 @endforeach
1352 </ul> 1375 </ul>
1353 </template> 1376 </template>
1354 </li> 1377 </li>
1355 </ul> 1378 </ul>
1356 <!--<div class="px-6 my-6"> 1379 <!--<div class="px-6 my-6">
1357 <button class="flex items-center justify-between px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> 1380 <button class="flex items-center justify-between px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
1358 Create account 1381 Create account
1359 <span class="ml-2" aria-hidden="true">+</span> 1382 <span class="ml-2" aria-hidden="true">+</span>
1360 </button> 1383 </button>
1361 </div>--> 1384 </div>-->
1362 </div> 1385 </div>
1363 </aside> 1386 </aside>
1364 <div class="flex flex-col flex-1 w-full"> 1387 <div class="flex flex-col flex-1 w-full">
1365 <header class="z-10 py-4 bg-white shadow-md dark:bg-gray-800"> 1388 <header class="z-10 py-4 bg-white shadow-md dark:bg-gray-800">
1366 <div 1389 <div
1367 class="container flex items-center justify-between h-full px-6 mx-auto text-purple-600 dark:text-purple-300" 1390 class="container flex items-center justify-between h-full px-6 mx-auto text-purple-600 dark:text-purple-300"
1368 > 1391 >
1369 <!-- Mobile hamburger --> 1392 <!-- Mobile hamburger -->
1370 <button 1393 <button
1371 class="p-1 mr-5 -ml-1 rounded-md md:hidden focus:outline-none focus:shadow-outline-purple" 1394 class="p-1 mr-5 -ml-1 rounded-md md:hidden focus:outline-none focus:shadow-outline-purple"
1372 @click="toggleSideMenu" 1395 @click="toggleSideMenu"
1373 aria-label="Menu" 1396 aria-label="Menu"
1374 > 1397 >
1375 <svg 1398 <svg
1376 class="w-6 h-6" 1399 class="w-6 h-6"
1377 aria-hidden="true" 1400 aria-hidden="true"
1378 fill="currentColor" 1401 fill="currentColor"
1379 viewBox="0 0 20 20" 1402 viewBox="0 0 20 20"
1380 > 1403 >
1381 <path 1404 <path
1382 fill-rule="evenodd" 1405 fill-rule="evenodd"
1383 d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" 1406 d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
1384 clip-rule="evenodd" 1407 clip-rule="evenodd"
1385 ></path> 1408 ></path>
1386 </svg> 1409 </svg>
1387 </button> 1410 </button>
1388 <!-- Search input --> 1411 <!-- Search input -->
1389 <div class="flex justify-center flex-1 lg:mr-32"> 1412 <div class="flex justify-center flex-1 lg:mr-32">
1390 <div 1413 <div
1391 class="relative w-full max-w-xl mr-6 focus-within:text-purple-500" 1414 class="relative w-full max-w-xl mr-6 focus-within:text-purple-500"
1392 > 1415 >
1393 1416
1394 @yield('search') 1417 @yield('search')
1395 </div> 1418 </div>
1396 </div> 1419 </div>
1397 <ul class="flex items-center flex-shrink-0 space-x-6"> 1420 <ul class="flex items-center flex-shrink-0 space-x-6">
1398 <!-- Theme toggler --> 1421 <!-- Theme toggler -->
1399 <li class="flex"> 1422 <li class="flex">
1400 <button 1423 <button
1401 class="rounded-md focus:outline-none focus:shadow-outline-purple" 1424 class="rounded-md focus:outline-none focus:shadow-outline-purple"
1402 @click="toggleTheme" 1425 @click="toggleTheme"
1403 aria-label="Toggle color mode" 1426 aria-label="Toggle color mode"
1404 > 1427 >
1405 <template x-if="!dark"> 1428 <template x-if="!dark">
1406 <svg 1429 <svg
1407 class="w-5 h-5" 1430 class="w-5 h-5"
1408 aria-hidden="true" 1431 aria-hidden="true"
1409 fill="currentColor" 1432 fill="currentColor"
1410 viewBox="0 0 20 20" 1433 viewBox="0 0 20 20"
1411 > 1434 >
1412 <path 1435 <path
1413 d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" 1436 d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"
1414 ></path> 1437 ></path>
1415 </svg> 1438 </svg>
1416 </template> 1439 </template>
1417 <template x-if="dark"> 1440 <template x-if="dark">
1418 <svg 1441 <svg
1419 class="w-5 h-5" 1442 class="w-5 h-5"
1420 aria-hidden="true" 1443 aria-hidden="true"
1421 fill="currentColor" 1444 fill="currentColor"
1422 viewBox="0 0 20 20" 1445 viewBox="0 0 20 20"
1423 > 1446 >
1424 <path 1447 <path
1425 fill-rule="evenodd" 1448 fill-rule="evenodd"
1426 d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z" 1449 d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
1427 clip-rule="evenodd" 1450 clip-rule="evenodd"
1428 ></path> 1451 ></path>
1429 </svg> 1452 </svg>
1430 </template> 1453 </template>
1431 </button> 1454 </button>
1432 </li> 1455 </li>
1433 <!-- Notifications menu --> 1456 <!-- Notifications menu -->
1434 <li class="relative"> 1457 <li class="relative">
1435 <button 1458 <button
1436 class="relative align-middle rounded-md focus:outline-none focus:shadow-outline-purple" 1459 class="relative align-middle rounded-md focus:outline-none focus:shadow-outline-purple"
1437 @click="toggleNotificationsMenu" 1460 @click="toggleNotificationsMenu"
1438 @keydown.escape="closeNotificationsMenu" 1461 @keydown.escape="closeNotificationsMenu"
1439 aria-label="Notifications" 1462 aria-label="Notifications"
1440 aria-haspopup="true" 1463 aria-haspopup="true"
1441 > 1464 >
1442 <svg 1465 <svg
1443 class="w-5 h-5" 1466 class="w-5 h-5"
1444 aria-hidden="true" 1467 aria-hidden="true"
1445 fill="currentColor" 1468 fill="currentColor"
1446 viewBox="0 0 20 20" 1469 viewBox="0 0 20 20"
1447 > 1470 >
1448 <path 1471 <path
1449 d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z" 1472 d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"
1450 ></path> 1473 ></path>
1451 </svg> 1474 </svg>
1452 <!-- Notification badge --> 1475 <!-- Notification badge -->
1453 <span 1476 <span
1454 aria-hidden="true" 1477 aria-hidden="true"
1455 class="absolute top-0 right-0 inline-block w-3 h-3 transform translate-x-1 -translate-y-1 bg-red-600 border-2 border-white rounded-full dark:border-gray-800" 1478 class="absolute top-0 right-0 inline-block w-3 h-3 transform translate-x-1 -translate-y-1 bg-red-600 border-2 border-white rounded-full dark:border-gray-800"
1456 ></span> 1479 ></span>
1457 </button> 1480 </button>
1458 <template x-if="isNotificationsMenuOpen"> 1481 <template x-if="isNotificationsMenuOpen">
1459 <ul 1482 <ul
1460 x-transition:leave="transition ease-in duration-150" 1483 x-transition:leave="transition ease-in duration-150"
1461 x-transition:leave-start="opacity-100" 1484 x-transition:leave-start="opacity-100"
1462 x-transition:leave-end="opacity-0" 1485 x-transition:leave-end="opacity-0"
1463 @click.away="closeNotificationsMenu" 1486 @click.away="closeNotificationsMenu"
1464 @keydown.escape="closeNotificationsMenu" 1487 @keydown.escape="closeNotificationsMenu"
1465 class="absolute right-0 w-56 p-2 mt-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:text-gray-300 dark:border-gray-700 dark:bg-gray-700" 1488 class="absolute right-0 w-56 p-2 mt-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:text-gray-300 dark:border-gray-700 dark:bg-gray-700"
1466 > 1489 >
1467 <li class="flex"> 1490 <li class="flex">
1468 <a 1491 <a
1469 class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200" 1492 class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
1470 href="{{ route('admin.admin-messages') }}" 1493 href="{{ route('admin.admin-messages') }}"
1471 > 1494 >
1472 <span>Сообщения</span> 1495 <span>Сообщения</span>
1473 @if($MsgCount > 0) 1496 @if($MsgCount > 0)
1474 <span 1497 <span
1475 class="inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-600 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-600" 1498 class="inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-600 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-600"
1476 > 1499 >
1477 1500
1478 {{ $MsgCount }} 1501 {{ $MsgCount }}
1479 </span> 1502 </span>
1480 @endif 1503 @endif
1481 </a> 1504 </a>
1482 </li> 1505 </li>
1483 <!--<li class="flex"> 1506 <!--<li class="flex">
1484 <a 1507 <a
1485 class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200" 1508 class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
1486 href="#" 1509 href="#"
1487 > 1510 >
1488 <span>Логи</span> 1511 <span>Логи</span>
1489 </a> 1512 </a>
1490 </li>--> 1513 </li>-->
1491 </ul> 1514 </ul>
1492 </template> 1515 </template>
1493 </li> 1516 </li>
1494 <!-- Profile menu --> 1517 <!-- Profile menu -->
1495 <li class="relative"> 1518 <li class="relative">
1496 <button 1519 <button
1497 class="align-middle rounded-full focus:shadow-outline-purple focus:outline-none" 1520 class="align-middle rounded-full focus:shadow-outline-purple focus:outline-none"
1498 @click="toggleProfileMenu" 1521 @click="toggleProfileMenu"
1499 @keydown.escape="closeProfileMenu" 1522 @keydown.escape="closeProfileMenu"
1500 aria-label="Account" 1523 aria-label="Account"
1501 aria-haspopup="true" 1524 aria-haspopup="true"
1502 > 1525 >
1503 <img 1526 <img
1504 class="object-cover w-8 h-8 rounded-full" 1527 class="object-cover w-8 h-8 rounded-full"
1505 src="{{ asset('assets/img/profile.jpg') }}" 1528 src="{{ asset('assets/img/profile.jpg') }}"
1506 alt="" 1529 alt=""
1507 aria-hidden="true" 1530 aria-hidden="true"
1508 /> 1531 />
1509 </button> 1532 </button>
1510 <template x-if="isProfileMenuOpen"> 1533 <template x-if="isProfileMenuOpen">
1511 <ul 1534 <ul
1512 x-transition:leave="transition ease-in duration-150" 1535 x-transition:leave="transition ease-in duration-150"
1513 x-transition:leave-start="opacity-100" 1536 x-transition:leave-start="opacity-100"
1514 x-transition:leave-end="opacity-0" 1537 x-transition:leave-end="opacity-0"
1515 @click.away="closeProfileMenu" 1538 @click.away="closeProfileMenu"
1516 @keydown.escape="closeProfileMenu" 1539 @keydown.escape="closeProfileMenu"
1517 class="absolute right-0 w-56 p-2 mt-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:border-gray-700 dark:text-gray-300 dark:bg-gray-700" 1540 class="absolute right-0 w-56 p-2 mt-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:border-gray-700 dark:text-gray-300 dark:bg-gray-700"
1518 aria-label="submenu" 1541 aria-label="submenu"
1519 > 1542 >
1520 <li class="flex"> 1543 <li class="flex">
1521 <a 1544 <a
1522 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200" 1545 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
1523 href="{{ route('admin.profile') }}" 1546 href="{{ route('admin.profile') }}"
1524 > 1547 >
1525 <svg 1548 <svg
1526 class="w-4 h-4 mr-3" 1549 class="w-4 h-4 mr-3"
1527 aria-hidden="true" 1550 aria-hidden="true"
1528 fill="none" 1551 fill="none"
1529 stroke-linecap="round" 1552 stroke-linecap="round"
1530 stroke-linejoin="round" 1553 stroke-linejoin="round"
1531 stroke-width="2" 1554 stroke-width="2"
1532 viewBox="0 0 24 24" 1555 viewBox="0 0 24 24"
1533 stroke="currentColor" 1556 stroke="currentColor"
1534 > 1557 >
1535 <path 1558 <path
1536 d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" 1559 d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
1537 ></path> 1560 ></path>
1538 </svg> 1561 </svg>
1539 <span>Профиль</span> 1562 <span>Профиль</span>
1540 </a> 1563 </a>
1541 </li> 1564 </li>
1542 <li class="flex"> 1565 <li class="flex">
1543 <a 1566 <a
1544 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200" 1567 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
1545 href="{{ route('admin.config') }}" 1568 href="{{ route('admin.config') }}"
1546 > 1569 >
1547 <svg 1570 <svg
1548 class="w-4 h-4 mr-3" 1571 class="w-4 h-4 mr-3"
1549 aria-hidden="true" 1572 aria-hidden="true"
1550 fill="none" 1573 fill="none"
1551 stroke-linecap="round" 1574 stroke-linecap="round"
1552 stroke-linejoin="round" 1575 stroke-linejoin="round"
1553 stroke-width="2" 1576 stroke-width="2"
1554 viewBox="0 0 24 24" 1577 viewBox="0 0 24 24"
1555 stroke="currentColor" 1578 stroke="currentColor"
1556 > 1579 >
1557 <path 1580 <path
1558 d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" 1581 d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
1559 ></path> 1582 ></path>
1560 <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path> 1583 <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
1561 </svg> 1584 </svg>
1562 <span>Настройки</span> 1585 <span>Настройки</span>
1563 </a> 1586 </a>
1564 </li> 1587 </li>
1565 <li class="flex"> 1588 <li class="flex">
1566 <a 1589 <a
1567 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200" 1590 class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
1568 href="{{ route('admin.logout') }}" 1591 href="{{ route('admin.logout') }}"
1569 > 1592 >
1570 <svg 1593 <svg
1571 class="w-4 h-4 mr-3" 1594 class="w-4 h-4 mr-3"
1572 aria-hidden="true" 1595 aria-hidden="true"
1573 fill="none" 1596 fill="none"
1574 stroke-linecap="round" 1597 stroke-linecap="round"
1575 stroke-linejoin="round" 1598 stroke-linejoin="round"
1576 stroke-width="2" 1599 stroke-width="2"
1577 viewBox="0 0 24 24" 1600 viewBox="0 0 24 24"
1578 stroke="currentColor" 1601 stroke="currentColor"
1579 > 1602 >
1580 <path 1603 <path
1581 d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1" 1604 d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
1582 ></path> 1605 ></path>
1583 </svg> 1606 </svg>
1584 <span>Выход</span> 1607 <span>Выход</span>
1585 </a> 1608 </a>
1586 </li> 1609 </li>
1587 </ul> 1610 </ul>
1588 </template> 1611 </template>
1589 </li> 1612 </li>
1590 </ul> 1613 </ul>
1591 </div> 1614 </div>
1592 </header> 1615 </header>
1593 <main class="h-full overflow-y-auto"> 1616 <main class="h-full overflow-y-auto">
1594 <div class="container px-6 mx-auto grid"> 1617 <div class="container px-6 mx-auto grid">
1595 <h2 1618 <h2
1596 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200" 1619 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
1597 > 1620 >
1598 {{$title}} 1621 {{$title}}
1599 </h2> 1622 </h2>
1600 <!-- CTA --> 1623 <!-- CTA -->
1601 <a 1624 <a
1602 class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple" 1625 class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple"
1603 href="{{ route('admin.admin-users') }}" 1626 href="{{ route('admin.admin-users') }}"
1604 > 1627 >
1605 <div class="flex items-center"> 1628 <div class="flex items-center">
1606 <svg 1629 <svg
1607 class="w-5 h-5 mr-2" 1630 class="w-5 h-5 mr-2"
1608 fill="currentColor" 1631 fill="currentColor"
1609 viewBox="0 0 20 20" 1632 viewBox="0 0 20 20"
1610 > 1633 >
1611 <path 1634 <path
1612 d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" 1635 d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
1613 ></path> 1636 ></path>
1614 </svg> 1637 </svg>
1615 <span>Контент для админов</span> 1638 <span>Контент для админов</span>
1616 </div> 1639 </div>
1617 <span>Список админов &RightArrow;</span> 1640 <span>Список админов &RightArrow;</span>
1618 </a> 1641 </a>
1619 1642
1620 @if ($message = Session::get('success')) 1643 @if ($message = Session::get('success'))
1621 <section> 1644 <section>
1622 <div class="alert alert-success alert-dismissible mt-0" role="alert"> 1645 <div class="alert alert-success alert-dismissible mt-0" role="alert">
1623 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> 1646 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
1624 <span aria-hidden="true">&times;</span> 1647 <span aria-hidden="true">&times;</span>
1625 </button> 1648 </button>
1626 {{ $message }} 1649 {{ $message }}
1627 </div> 1650 </div>
1628 </section> 1651 </section>
1629 @endif 1652 @endif
1630 1653
1631 @if ($errors->any()) 1654 @if ($errors->any())
1632 <section> 1655 <section>
1633 <div class="alert alert-danger alert-dismissible mt-4" role="alert"> 1656 <div class="alert alert-danger alert-dismissible mt-4" role="alert">
1634 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> 1657 <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть">
1635 <span aria-hidden="true">&times;</span> 1658 <span aria-hidden="true">&times;</span>
1636 </button> 1659 </button>
1637 <ul class="mb-0"> 1660 <ul class="mb-0">
1638 @foreach ($errors->all() as $error) 1661 @foreach ($errors->all() as $error)
1639 <li>{{ $error }}</li> 1662 <li>{{ $error }}</li>
1640 @endforeach 1663 @endforeach
1641 </ul> 1664 </ul>
1642 </div> 1665 </div>
1643 </section> 1666 </section>
1644 @endif 1667 @endif
1645 1668
1646 @yield('content') 1669 @yield('content')
1647 1670
1648 <!-- Cards 1671 <!-- Cards
1649 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> 1672 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
1650 1673
1651 <div 1674 <div
1652 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" 1675 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
1653 > 1676 >
1654 <div 1677 <div
1655 class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500" 1678 class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
1656 > 1679 >
1657 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> 1680 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
1658 <path 1681 <path
1659 d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z" 1682 d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"
1660 ></path> 1683 ></path>
1661 </svg> 1684 </svg>
1662 </div> 1685 </div>
1663 <div> 1686 <div>
1664 <p 1687 <p
1665 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" 1688 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
1666 > 1689 >
1667 Total clients 1690 Total clients
1668 </p> 1691 </p>
1669 <p 1692 <p
1670 class="text-lg font-semibold text-gray-700 dark:text-gray-200" 1693 class="text-lg font-semibold text-gray-700 dark:text-gray-200"
1671 > 1694 >
1672 6389 1695 6389
1673 </p> 1696 </p>
1674 </div> 1697 </div>
1675 </div> 1698 </div>
1676 1699
1677 <div 1700 <div
1678 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" 1701 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
1679 > 1702 >
1680 <div 1703 <div
1681 class="p-3 mr-4 text-green-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-green-500" 1704 class="p-3 mr-4 text-green-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-green-500"
1682 > 1705 >
1683 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> 1706 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
1684 <path 1707 <path
1685 fill-rule="evenodd" 1708 fill-rule="evenodd"
1686 d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z" 1709 d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
1687 clip-rule="evenodd" 1710 clip-rule="evenodd"
1688 ></path> 1711 ></path>
1689 </svg> 1712 </svg>
1690 </div> 1713 </div>
1691 <div> 1714 <div>
1692 <p 1715 <p
1693 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" 1716 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
1694 > 1717 >
1695 Account balance 1718 Account balance
1696 </p> 1719 </p>
1697 <p 1720 <p
1698 class="text-lg font-semibold text-gray-700 dark:text-gray-200" 1721 class="text-lg font-semibold text-gray-700 dark:text-gray-200"
1699 > 1722 >
1700 $ 46,760.89 1723 $ 46,760.89
1701 </p> 1724 </p>
1702 </div> 1725 </div>
1703 </div> 1726 </div>
1704 1727
1705 <div 1728 <div
1706 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" 1729 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
1707 > 1730 >
1708 <div 1731 <div
1709 class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:text-blue-100 dark:bg-blue-500" 1732 class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:text-blue-100 dark:bg-blue-500"
1710 > 1733 >
1711 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> 1734 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
1712 <path 1735 <path
1713 d="M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z" 1736 d="M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"
1714 ></path> 1737 ></path>
1715 </svg> 1738 </svg>
1716 </div> 1739 </div>
1717 <div> 1740 <div>
1718 <p 1741 <p
1719 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" 1742 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
1720 > 1743 >
1721 New sales 1744 New sales
1722 </p> 1745 </p>
1723 <p 1746 <p
1724 class="text-lg font-semibold text-gray-700 dark:text-gray-200" 1747 class="text-lg font-semibold text-gray-700 dark:text-gray-200"
1725 > 1748 >
1726 376 1749 376
1727 </p> 1750 </p>
1728 </div> 1751 </div>
1729 </div> 1752 </div>
1730 1753
1731 <div 1754 <div
1732 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" 1755 class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
1733 > 1756 >
1734 <div 1757 <div
1735 class="p-3 mr-4 text-teal-500 bg-teal-100 rounded-full dark:text-teal-100 dark:bg-teal-500" 1758 class="p-3 mr-4 text-teal-500 bg-teal-100 rounded-full dark:text-teal-100 dark:bg-teal-500"
1736 > 1759 >
1737 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> 1760 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
1738 <path 1761 <path
1739 fill-rule="evenodd" 1762 fill-rule="evenodd"
1740 d="M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z" 1763 d="M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z"
1741 clip-rule="evenodd" 1764 clip-rule="evenodd"
1742 ></path> 1765 ></path>
1743 </svg> 1766 </svg>
1744 </div> 1767 </div>
1745 <div> 1768 <div>
1746 <p 1769 <p
1747 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" 1770 class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
1748 > 1771 >
1749 Pending contacts 1772 Pending contacts
1750 </p> 1773 </p>
1751 <p 1774 <p
1752 class="text-lg font-semibold text-gray-700 dark:text-gray-200" 1775 class="text-lg font-semibold text-gray-700 dark:text-gray-200"
1753 > 1776 >
1754 35 1777 35
1755 </p> 1778 </p>
1756 </div> 1779 </div>
1757 </div> 1780 </div>
1758 </div> 1781 </div>
1759 --> 1782 -->
1760 <!-- New Table 1783 <!-- New Table
1761 <div class="w-full overflow-hidden rounded-lg shadow-xs"> 1784 <div class="w-full overflow-hidden rounded-lg shadow-xs">
1762 <div class="w-full overflow-x-auto"> 1785 <div class="w-full overflow-x-auto">
1763 <table class="w-full whitespace-no-wrap"> 1786 <table class="w-full whitespace-no-wrap">
1764 <thead> 1787 <thead>
1765 <tr 1788 <tr
1766 class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" 1789 class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
1767 > 1790 >
1768 <th class="px-4 py-3">Client</th> 1791 <th class="px-4 py-3">Client</th>
1769 <th class="px-4 py-3">Amount</th> 1792 <th class="px-4 py-3">Amount</th>
1770 <th class="px-4 py-3">Status</th> 1793 <th class="px-4 py-3">Status</th>
1771 <th class="px-4 py-3">Date</th> 1794 <th class="px-4 py-3">Date</th>
1772 </tr> 1795 </tr>
1773 </thead> 1796 </thead>
1774 <tbody 1797 <tbody
1775 class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800" 1798 class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"
1776 > 1799 >
1777 <tr class="text-gray-700 dark:text-gray-400"> 1800 <tr class="text-gray-700 dark:text-gray-400">
1778 <td class="px-4 py-3"> 1801 <td class="px-4 py-3">
1779 <div class="flex items-center text-sm"> 1802 <div class="flex items-center text-sm">
1780 1803
1781 <div 1804 <div
1782 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 1805 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
1783 > 1806 >
1784 <img 1807 <img
1785 class="object-cover w-full h-full rounded-full" 1808 class="object-cover w-full h-full rounded-full"
1786 src="https://images.unsplash.com/flagged/photo-1570612861542-284f4c12e75f?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 1809 src="https://images.unsplash.com/flagged/photo-1570612861542-284f4c12e75f?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
1787 alt="" 1810 alt=""
1788 loading="lazy" 1811 loading="lazy"
1789 /> 1812 />
1790 <div 1813 <div
1791 class="absolute inset-0 rounded-full shadow-inner" 1814 class="absolute inset-0 rounded-full shadow-inner"
1792 aria-hidden="true" 1815 aria-hidden="true"
1793 ></div> 1816 ></div>
1794 </div> 1817 </div>
1795 <div> 1818 <div>
1796 <p class="font-semibold">Hans Burger</p> 1819 <p class="font-semibold">Hans Burger</p>
1797 <p class="text-xs text-gray-600 dark:text-gray-400"> 1820 <p class="text-xs text-gray-600 dark:text-gray-400">
1798 10x Developer 1821 10x Developer
1799 </p> 1822 </p>
1800 </div> 1823 </div>
1801 </div> 1824 </div>
1802 </td> 1825 </td>
1803 <td class="px-4 py-3 text-sm"> 1826 <td class="px-4 py-3 text-sm">
1804 $ 863.45 1827 $ 863.45
1805 </td> 1828 </td>
1806 <td class="px-4 py-3 text-xs"> 1829 <td class="px-4 py-3 text-xs">
1807 <span 1830 <span
1808 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100" 1831 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
1809 > 1832 >
1810 Approved 1833 Approved
1811 </span> 1834 </span>
1812 </td> 1835 </td>
1813 <td class="px-4 py-3 text-sm"> 1836 <td class="px-4 py-3 text-sm">
1814 6/10/2020 1837 6/10/2020
1815 </td> 1838 </td>
1816 </tr> 1839 </tr>
1817 1840
1818 <tr class="text-gray-700 dark:text-gray-400"> 1841 <tr class="text-gray-700 dark:text-gray-400">
1819 <td class="px-4 py-3"> 1842 <td class="px-4 py-3">
1820 <div class="flex items-center text-sm"> 1843 <div class="flex items-center text-sm">
1821 1844
1822 <div 1845 <div
1823 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 1846 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
1824 > 1847 >
1825 <img 1848 <img
1826 class="object-cover w-full h-full rounded-full" 1849 class="object-cover w-full h-full rounded-full"
1827 src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&facepad=3&fit=facearea&s=707b9c33066bf8808c934c8ab394dff6" 1850 src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&facepad=3&fit=facearea&s=707b9c33066bf8808c934c8ab394dff6"
1828 alt="" 1851 alt=""
1829 loading="lazy" 1852 loading="lazy"
1830 /> 1853 />
1831 <div 1854 <div
1832 class="absolute inset-0 rounded-full shadow-inner" 1855 class="absolute inset-0 rounded-full shadow-inner"
1833 aria-hidden="true" 1856 aria-hidden="true"
1834 ></div> 1857 ></div>
1835 </div> 1858 </div>
1836 <div> 1859 <div>
1837 <p class="font-semibold">Jolina Angelie</p> 1860 <p class="font-semibold">Jolina Angelie</p>
1838 <p class="text-xs text-gray-600 dark:text-gray-400"> 1861 <p class="text-xs text-gray-600 dark:text-gray-400">
1839 Unemployed 1862 Unemployed
1840 </p> 1863 </p>
1841 </div> 1864 </div>
1842 </div> 1865 </div>
1843 </td> 1866 </td>
1844 <td class="px-4 py-3 text-sm"> 1867 <td class="px-4 py-3 text-sm">
1845 $ 369.95 1868 $ 369.95
1846 </td> 1869 </td>
1847 <td class="px-4 py-3 text-xs"> 1870 <td class="px-4 py-3 text-xs">
1848 <span 1871 <span
1849 class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600" 1872 class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"
1850 > 1873 >
1851 Pending 1874 Pending
1852 </span> 1875 </span>
1853 </td> 1876 </td>
1854 <td class="px-4 py-3 text-sm"> 1877 <td class="px-4 py-3 text-sm">
1855 6/10/2020 1878 6/10/2020
1856 </td> 1879 </td>
1857 </tr> 1880 </tr>
1858 1881
1859 <tr class="text-gray-700 dark:text-gray-400"> 1882 <tr class="text-gray-700 dark:text-gray-400">
1860 <td class="px-4 py-3"> 1883 <td class="px-4 py-3">
1861 <div class="flex items-center text-sm"> 1884 <div class="flex items-center text-sm">
1862 1885
1863 <div 1886 <div
1864 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 1887 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
1865 > 1888 >
1866 <img 1889 <img
1867 class="object-cover w-full h-full rounded-full" 1890 class="object-cover w-full h-full rounded-full"
1868 src="https://images.unsplash.com/photo-1551069613-1904dbdcda11?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 1891 src="https://images.unsplash.com/photo-1551069613-1904dbdcda11?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
1869 alt="" 1892 alt=""
1870 loading="lazy" 1893 loading="lazy"
1871 /> 1894 />
1872 <div 1895 <div
1873 class="absolute inset-0 rounded-full shadow-inner" 1896 class="absolute inset-0 rounded-full shadow-inner"
1874 aria-hidden="true" 1897 aria-hidden="true"
1875 ></div> 1898 ></div>
1876 </div> 1899 </div>
1877 <div> 1900 <div>
1878 <p class="font-semibold">Sarah Curry</p> 1901 <p class="font-semibold">Sarah Curry</p>
1879 <p class="text-xs text-gray-600 dark:text-gray-400"> 1902 <p class="text-xs text-gray-600 dark:text-gray-400">
1880 Designer 1903 Designer
1881 </p> 1904 </p>
1882 </div> 1905 </div>
1883 </div> 1906 </div>
1884 </td> 1907 </td>
1885 <td class="px-4 py-3 text-sm"> 1908 <td class="px-4 py-3 text-sm">
1886 $ 86.00 1909 $ 86.00
1887 </td> 1910 </td>
1888 <td class="px-4 py-3 text-xs"> 1911 <td class="px-4 py-3 text-xs">
1889 <span 1912 <span
1890 class="px-2 py-1 font-semibold leading-tight text-red-700 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-700" 1913 class="px-2 py-1 font-semibold leading-tight text-red-700 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-700"
1891 > 1914 >
1892 Denied 1915 Denied
1893 </span> 1916 </span>
1894 </td> 1917 </td>
1895 <td class="px-4 py-3 text-sm"> 1918 <td class="px-4 py-3 text-sm">
1896 6/10/2020 1919 6/10/2020
1897 </td> 1920 </td>
1898 </tr> 1921 </tr>
1899 1922
1900 <tr class="text-gray-700 dark:text-gray-400"> 1923 <tr class="text-gray-700 dark:text-gray-400">
1901 <td class="px-4 py-3"> 1924 <td class="px-4 py-3">
1902 <div class="flex items-center text-sm"> 1925 <div class="flex items-center text-sm">
1903 1926
1904 <div 1927 <div
1905 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 1928 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
1906 > 1929 >
1907 <img 1930 <img
1908 class="object-cover w-full h-full rounded-full" 1931 class="object-cover w-full h-full rounded-full"
1909 src="https://images.unsplash.com/photo-1551006917-3b4c078c47c9?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 1932 src="https://images.unsplash.com/photo-1551006917-3b4c078c47c9?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
1910 alt="" 1933 alt=""
1911 loading="lazy" 1934 loading="lazy"
1912 /> 1935 />
1913 <div 1936 <div
1914 class="absolute inset-0 rounded-full shadow-inner" 1937 class="absolute inset-0 rounded-full shadow-inner"
1915 aria-hidden="true" 1938 aria-hidden="true"
1916 ></div> 1939 ></div>
1917 </div> 1940 </div>
1918 <div> 1941 <div>
1919 <p class="font-semibold">Rulia Joberts</p> 1942 <p class="font-semibold">Rulia Joberts</p>
1920 <p class="text-xs text-gray-600 dark:text-gray-400"> 1943 <p class="text-xs text-gray-600 dark:text-gray-400">
1921 Actress 1944 Actress
1922 </p> 1945 </p>
1923 </div> 1946 </div>
1924 </div> 1947 </div>
1925 </td> 1948 </td>
1926 <td class="px-4 py-3 text-sm"> 1949 <td class="px-4 py-3 text-sm">
1927 $ 1276.45 1950 $ 1276.45
1928 </td> 1951 </td>
1929 <td class="px-4 py-3 text-xs"> 1952 <td class="px-4 py-3 text-xs">
1930 <span 1953 <span
1931 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100" 1954 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
1932 > 1955 >
1933 Approved 1956 Approved
1934 </span> 1957 </span>
1935 </td> 1958 </td>
1936 <td class="px-4 py-3 text-sm"> 1959 <td class="px-4 py-3 text-sm">
1937 6/10/2020 1960 6/10/2020
1938 </td> 1961 </td>
1939 </tr> 1962 </tr>
1940 1963
1941 <tr class="text-gray-700 dark:text-gray-400"> 1964 <tr class="text-gray-700 dark:text-gray-400">
1942 <td class="px-4 py-3"> 1965 <td class="px-4 py-3">
1943 <div class="flex items-center text-sm"> 1966 <div class="flex items-center text-sm">
1944 1967
1945 <div 1968 <div
1946 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 1969 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
1947 > 1970 >
1948 <img 1971 <img
1949 class="object-cover w-full h-full rounded-full" 1972 class="object-cover w-full h-full rounded-full"
1950 src="https://images.unsplash.com/photo-1546456073-6712f79251bb?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 1973 src="https://images.unsplash.com/photo-1546456073-6712f79251bb?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
1951 alt="" 1974 alt=""
1952 loading="lazy" 1975 loading="lazy"
1953 /> 1976 />
1954 <div 1977 <div
1955 class="absolute inset-0 rounded-full shadow-inner" 1978 class="absolute inset-0 rounded-full shadow-inner"
1956 aria-hidden="true" 1979 aria-hidden="true"
1957 ></div> 1980 ></div>
1958 </div> 1981 </div>
1959 <div> 1982 <div>
1960 <p class="font-semibold">Wenzel Dashington</p> 1983 <p class="font-semibold">Wenzel Dashington</p>
1961 <p class="text-xs text-gray-600 dark:text-gray-400"> 1984 <p class="text-xs text-gray-600 dark:text-gray-400">
1962 Actor 1985 Actor
1963 </p> 1986 </p>
1964 </div> 1987 </div>
1965 </div> 1988 </div>
1966 </td> 1989 </td>
1967 <td class="px-4 py-3 text-sm"> 1990 <td class="px-4 py-3 text-sm">
1968 $ 863.45 1991 $ 863.45
1969 </td> 1992 </td>
1970 <td class="px-4 py-3 text-xs"> 1993 <td class="px-4 py-3 text-xs">
1971 <span 1994 <span
1972 class="px-2 py-1 font-semibold leading-tight text-gray-700 bg-gray-100 rounded-full dark:text-gray-100 dark:bg-gray-700" 1995 class="px-2 py-1 font-semibold leading-tight text-gray-700 bg-gray-100 rounded-full dark:text-gray-100 dark:bg-gray-700"
1973 > 1996 >
1974 Expired 1997 Expired
1975 </span> 1998 </span>
1976 </td> 1999 </td>
1977 <td class="px-4 py-3 text-sm"> 2000 <td class="px-4 py-3 text-sm">
1978 6/10/2020 2001 6/10/2020
1979 </td> 2002 </td>
1980 </tr> 2003 </tr>
1981 2004
1982 <tr class="text-gray-700 dark:text-gray-400"> 2005 <tr class="text-gray-700 dark:text-gray-400">
1983 <td class="px-4 py-3"> 2006 <td class="px-4 py-3">
1984 <div class="flex items-center text-sm"> 2007 <div class="flex items-center text-sm">
1985 2008
1986 <div 2009 <div
1987 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 2010 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
1988 > 2011 >
1989 <img 2012 <img
1990 class="object-cover w-full h-full rounded-full" 2013 class="object-cover w-full h-full rounded-full"
1991 src="https://images.unsplash.com/photo-1502720705749-871143f0e671?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&s=b8377ca9f985d80264279f277f3a67f5" 2014 src="https://images.unsplash.com/photo-1502720705749-871143f0e671?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&s=b8377ca9f985d80264279f277f3a67f5"
1992 alt="" 2015 alt=""
1993 loading="lazy" 2016 loading="lazy"
1994 /> 2017 />
1995 <div 2018 <div
1996 class="absolute inset-0 rounded-full shadow-inner" 2019 class="absolute inset-0 rounded-full shadow-inner"
1997 aria-hidden="true" 2020 aria-hidden="true"
1998 ></div> 2021 ></div>
1999 </div> 2022 </div>
2000 <div> 2023 <div>
2001 <p class="font-semibold">Dave Li</p> 2024 <p class="font-semibold">Dave Li</p>
2002 <p class="text-xs text-gray-600 dark:text-gray-400"> 2025 <p class="text-xs text-gray-600 dark:text-gray-400">
2003 Influencer 2026 Influencer
2004 </p> 2027 </p>
2005 </div> 2028 </div>
2006 </div> 2029 </div>
2007 </td> 2030 </td>
2008 <td class="px-4 py-3 text-sm"> 2031 <td class="px-4 py-3 text-sm">
2009 $ 863.45 2032 $ 863.45
2010 </td> 2033 </td>
2011 <td class="px-4 py-3 text-xs"> 2034 <td class="px-4 py-3 text-xs">
2012 <span 2035 <span
2013 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100" 2036 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
2014 > 2037 >
2015 Approved 2038 Approved
2016 </span> 2039 </span>
2017 </td> 2040 </td>
2018 <td class="px-4 py-3 text-sm"> 2041 <td class="px-4 py-3 text-sm">
2019 6/10/2020 2042 6/10/2020
2020 </td> 2043 </td>
2021 </tr> 2044 </tr>
2022 2045
2023 <tr class="text-gray-700 dark:text-gray-400"> 2046 <tr class="text-gray-700 dark:text-gray-400">
2024 <td class="px-4 py-3"> 2047 <td class="px-4 py-3">
2025 <div class="flex items-center text-sm"> 2048 <div class="flex items-center text-sm">
2026 2049
2027 <div 2050 <div
2028 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 2051 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
2029 > 2052 >
2030 <img 2053 <img
2031 class="object-cover w-full h-full rounded-full" 2054 class="object-cover w-full h-full rounded-full"
2032 src="https://images.unsplash.com/photo-1531746020798-e6953c6e8e04?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 2055 src="https://images.unsplash.com/photo-1531746020798-e6953c6e8e04?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
2033 alt="" 2056 alt=""
2034 loading="lazy" 2057 loading="lazy"
2035 /> 2058 />
2036 <div 2059 <div
2037 class="absolute inset-0 rounded-full shadow-inner" 2060 class="absolute inset-0 rounded-full shadow-inner"
2038 aria-hidden="true" 2061 aria-hidden="true"
2039 ></div> 2062 ></div>
2040 </div> 2063 </div>
2041 <div> 2064 <div>
2042 <p class="font-semibold">Maria Ramovic</p> 2065 <p class="font-semibold">Maria Ramovic</p>
2043 <p class="text-xs text-gray-600 dark:text-gray-400"> 2066 <p class="text-xs text-gray-600 dark:text-gray-400">
2044 Runner 2067 Runner
2045 </p> 2068 </p>
2046 </div> 2069 </div>
2047 </div> 2070 </div>
2048 </td> 2071 </td>
2049 <td class="px-4 py-3 text-sm"> 2072 <td class="px-4 py-3 text-sm">
2050 $ 863.45 2073 $ 863.45
2051 </td> 2074 </td>
2052 <td class="px-4 py-3 text-xs"> 2075 <td class="px-4 py-3 text-xs">
2053 <span 2076 <span
2054 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100" 2077 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
2055 > 2078 >
2056 Approved 2079 Approved
2057 </span> 2080 </span>
2058 </td> 2081 </td>
2059 <td class="px-4 py-3 text-sm"> 2082 <td class="px-4 py-3 text-sm">
2060 6/10/2020 2083 6/10/2020
2061 </td> 2084 </td>
2062 </tr> 2085 </tr>
2063 2086
2064 <tr class="text-gray-700 dark:text-gray-400"> 2087 <tr class="text-gray-700 dark:text-gray-400">
2065 <td class="px-4 py-3"> 2088 <td class="px-4 py-3">
2066 <div class="flex items-center text-sm"> 2089 <div class="flex items-center text-sm">
2067 2090
2068 <div 2091 <div
2069 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 2092 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
2070 > 2093 >
2071 <img 2094 <img
2072 class="object-cover w-full h-full rounded-full" 2095 class="object-cover w-full h-full rounded-full"
2073 src="https://images.unsplash.com/photo-1566411520896-01e7ca4726af?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 2096 src="https://images.unsplash.com/photo-1566411520896-01e7ca4726af?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
2074 alt="" 2097 alt=""
2075 loading="lazy" 2098 loading="lazy"
2076 /> 2099 />
2077 <div 2100 <div
2078 class="absolute inset-0 rounded-full shadow-inner" 2101 class="absolute inset-0 rounded-full shadow-inner"
2079 aria-hidden="true" 2102 aria-hidden="true"
2080 ></div> 2103 ></div>
2081 </div> 2104 </div>
2082 <div> 2105 <div>
2083 <p class="font-semibold">Hitney Wouston</p> 2106 <p class="font-semibold">Hitney Wouston</p>
2084 <p class="text-xs text-gray-600 dark:text-gray-400"> 2107 <p class="text-xs text-gray-600 dark:text-gray-400">
2085 Singer 2108 Singer
2086 </p> 2109 </p>
2087 </div> 2110 </div>
2088 </div> 2111 </div>
2089 </td> 2112 </td>
2090 <td class="px-4 py-3 text-sm"> 2113 <td class="px-4 py-3 text-sm">
2091 $ 863.45 2114 $ 863.45
2092 </td> 2115 </td>
2093 <td class="px-4 py-3 text-xs"> 2116 <td class="px-4 py-3 text-xs">
2094 <span 2117 <span
2095 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100" 2118 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
2096 > 2119 >
2097 Approved 2120 Approved
2098 </span> 2121 </span>
2099 </td> 2122 </td>
2100 <td class="px-4 py-3 text-sm"> 2123 <td class="px-4 py-3 text-sm">
2101 6/10/2020 2124 6/10/2020
2102 </td> 2125 </td>
2103 </tr> 2126 </tr>
2104 2127
2105 <tr class="text-gray-700 dark:text-gray-400"> 2128 <tr class="text-gray-700 dark:text-gray-400">
2106 <td class="px-4 py-3"> 2129 <td class="px-4 py-3">
2107 <div class="flex items-center text-sm"> 2130 <div class="flex items-center text-sm">
2108 2131
2109 <div 2132 <div
2110 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 2133 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
2111 > 2134 >
2112 <img 2135 <img
2113 class="object-cover w-full h-full rounded-full" 2136 class="object-cover w-full h-full rounded-full"
2114 src="https://images.unsplash.com/flagged/photo-1570612861542-284f4c12e75f?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ" 2137 src="https://images.unsplash.com/flagged/photo-1570612861542-284f4c12e75f?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&ixid=eyJhcHBfaWQiOjE3Nzg0fQ"
2115 alt="" 2138 alt=""
2116 loading="lazy" 2139 loading="lazy"
2117 /> 2140 />
2118 <div 2141 <div
2119 class="absolute inset-0 rounded-full shadow-inner" 2142 class="absolute inset-0 rounded-full shadow-inner"
2120 aria-hidden="true" 2143 aria-hidden="true"
2121 ></div> 2144 ></div>
2122 </div> 2145 </div>
2123 <div> 2146 <div>
2124 <p class="font-semibold">Hans Burger</p> 2147 <p class="font-semibold">Hans Burger</p>
2125 <p class="text-xs text-gray-600 dark:text-gray-400"> 2148 <p class="text-xs text-gray-600 dark:text-gray-400">
2126 10x Developer 2149 10x Developer
2127 </p> 2150 </p>
2128 </div> 2151 </div>
2129 </div> 2152 </div>
2130 </td> 2153 </td>
2131 <td class="px-4 py-3 text-sm"> 2154 <td class="px-4 py-3 text-sm">
2132 $ 863.45 2155 $ 863.45
2133 </td> 2156 </td>
2134 <td class="px-4 py-3 text-xs"> 2157 <td class="px-4 py-3 text-xs">
2135 <span 2158 <span
2136 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100" 2159 class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
2137 > 2160 >
2138 Approved 2161 Approved
2139 </span> 2162 </span>
2140 </td> 2163 </td>
2141 <td class="px-4 py-3 text-sm"> 2164 <td class="px-4 py-3 text-sm">
2142 6/10/2020 2165 6/10/2020
2143 </td> 2166 </td>
2144 </tr> 2167 </tr>
2145 </tbody> 2168 </tbody>
2146 </table> 2169 </table>
2147 </div> 2170 </div>
2148 <div 2171 <div
2149 class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" 2172 class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"
2150 > 2173 >
2151 <span class="flex items-center col-span-3"> 2174 <span class="flex items-center col-span-3">
2152 Showing 21-30 of 100 2175 Showing 21-30 of 100
2153 </span> 2176 </span>
2154 <span class="col-span-2"></span> 2177 <span class="col-span-2"></span>
2155 2178
2156 <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> 2179 <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end">
2157 <nav aria-label="Table navigation"> 2180 <nav aria-label="Table navigation">
2158 <ul class="inline-flex items-center"> 2181 <ul class="inline-flex items-center">
2159 <li> 2182 <li>
2160 <button 2183 <button
2161 class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" 2184 class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple"
2162 aria-label="Previous" 2185 aria-label="Previous"
2163 > 2186 >
2164 <svg 2187 <svg
2165 aria-hidden="true" 2188 aria-hidden="true"
2166 class="w-4 h-4 fill-current" 2189 class="w-4 h-4 fill-current"
2167 viewBox="0 0 20 20" 2190 viewBox="0 0 20 20"
2168 > 2191 >
2169 <path 2192 <path
2170 d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" 2193 d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
2171 clip-rule="evenodd" 2194 clip-rule="evenodd"
2172 fill-rule="evenodd" 2195 fill-rule="evenodd"
2173 ></path> 2196 ></path>
2174 </svg> 2197 </svg>
2175 </button> 2198 </button>
2176 </li> 2199 </li>
2177 <li> 2200 <li>
2178 <button 2201 <button
2179 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" 2202 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
2180 > 2203 >
2181 1 2204 1
2182 </button> 2205 </button>
2183 </li> 2206 </li>
2184 <li> 2207 <li>
2185 <button 2208 <button
2186 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" 2209 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
2187 > 2210 >
2188 2 2211 2
2189 </button> 2212 </button>
2190 </li> 2213 </li>
2191 <li> 2214 <li>
2192 <button 2215 <button
2193 class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" 2216 class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple"
2194 > 2217 >
2195 3 2218 3
2196 </button> 2219 </button>
2197 </li> 2220 </li>
2198 <li> 2221 <li>
2199 <button 2222 <button
2200 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" 2223 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
2201 > 2224 >
2202 4 2225 4
2203 </button> 2226 </button>
2204 </li> 2227 </li>
2205 <li> 2228 <li>
2206 <span class="px-3 py-1">...</span> 2229 <span class="px-3 py-1">...</span>
2207 </li> 2230 </li>
2208 <li> 2231 <li>
2209 <button 2232 <button
2210 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" 2233 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
2211 > 2234 >
2212 8 2235 8
2213 </button> 2236 </button>
2214 </li> 2237 </li>
2215 <li> 2238 <li>
2216 <button 2239 <button
2217 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" 2240 class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
2218 > 2241 >
2219 9 2242 9
2220 </button> 2243 </button>
2221 </li> 2244 </li>
2222 <li> 2245 <li>
2223 <button 2246 <button
2224 class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" 2247 class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple"
2225 aria-label="Next" 2248 aria-label="Next"
2226 > 2249 >
2227 <svg 2250 <svg
2228 class="w-4 h-4 fill-current" 2251 class="w-4 h-4 fill-current"
2229 aria-hidden="true" 2252 aria-hidden="true"
2230 viewBox="0 0 20 20" 2253 viewBox="0 0 20 20"
2231 > 2254 >
2232 <path 2255 <path
2233 d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" 2256 d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
2234 clip-rule="evenodd" 2257 clip-rule="evenodd"
2235 fill-rule="evenodd" 2258 fill-rule="evenodd"
2236 ></path> 2259 ></path>
2237 </svg> 2260 </svg>
2238 </button> 2261 </button>
2239 </li> 2262 </li>
2240 </ul> 2263 </ul>
2241 </nav> 2264 </nav>
2242 </span> 2265 </span>
2243 </div> 2266 </div>
2244 </div> 2267 </div>
2245 --> 2268 -->
2246 <!-- Charts --> 2269 <!-- Charts -->
2247 <!-- 2270 <!--
2248 <h2 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"> 2271 <h2 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200">
2249 Графики 2272 Графики
2250 </h2> 2273 </h2>
2251 <div class="grid gap-6 mb-8 md:grid-cols-2"> 2274 <div class="grid gap-6 mb-8 md:grid-cols-2">
2252 <div 2275 <div
2253 class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" 2276 class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
2254 > 2277 >
2255 <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300"> 2278 <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300">
2256 Revenue 2279 Revenue
2257 </h4> 2280 </h4>
2258 <canvas id="pie"></canvas> 2281 <canvas id="pie"></canvas>
2259 <div 2282 <div
2260 class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400" 2283 class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400"
2261 > 2284 >
2262 2285
2263 <div class="flex items-center"> 2286 <div class="flex items-center">
2264 <span 2287 <span
2265 class="inline-block w-3 h-3 mr-1 bg-blue-500 rounded-full" 2288 class="inline-block w-3 h-3 mr-1 bg-blue-500 rounded-full"
2266 ></span> 2289 ></span>
2267 <span>Shirts</span> 2290 <span>Shirts</span>
2268 </div> 2291 </div>
2269 <div class="flex items-center"> 2292 <div class="flex items-center">
2270 <span 2293 <span
2271 class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full" 2294 class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full"
2272 ></span> 2295 ></span>
2273 <span>Shoes</span> 2296 <span>Shoes</span>
2274 </div> 2297 </div>
2275 <div class="flex items-center"> 2298 <div class="flex items-center">
2276 <span 2299 <span
2277 class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full" 2300 class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full"
2278 ></span> 2301 ></span>
2279 <span>Bags</span> 2302 <span>Bags</span>
2280 </div> 2303 </div>
2281 </div> 2304 </div>
2282 </div> 2305 </div>
2283 <div 2306 <div
2284 class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" 2307 class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
2285 > 2308 >
2286 <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300"> 2309 <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300">
2287 Traffic 2310 Traffic
2288 </h4> 2311 </h4>
2289 <canvas id="line"></canvas> 2312 <canvas id="line"></canvas>
2290 <div 2313 <div
2291 class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400" 2314 class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400"
2292 > 2315 >
2293 2316
2294 <div class="flex items-center"> 2317 <div class="flex items-center">
2295 <span 2318 <span
2296 class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full" 2319 class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full"
2297 ></span> 2320 ></span>
2298 <span>Organic</span> 2321 <span>Organic</span>
2299 </div> 2322 </div>
2300 <div class="flex items-center"> 2323 <div class="flex items-center">
2301 <span 2324 <span
2302 class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full" 2325 class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full"
2303 ></span> 2326 ></span>
2304 <span>Paid</span> 2327 <span>Paid</span>
2305 </div> 2328 </div>
2306 </div> 2329 </div>
2307 </div> 2330 </div>
2308 </div> 2331 </div>
2309 --> 2332 -->
2310 </div> 2333 </div>
2311 </main> 2334 </main>
2312 </div> 2335 </div>
2313 </div> 2336 </div>
2314 @yield('modal') 2337 @yield('modal')
2315 </body> 2338 </body>
2316 @yield('script') 2339 @yield('script')
2317 </html> 2340 </html>
2318 2341
resources/views/workers/ajax/diploms_dop.blade.php
File was created 1 @if (isset($worker->infobloks))
2 @if ($worker->infobloks->count())
3 @php $i = 1; @endphp
4 @foreach ($worker->infobloks as $info)
5 <div class="cabinet__inputs-item form-group">
6 <label class="form-group__label">{{ $info->name }}</label>
7 <div class="form-group__item">
8 <div class="select">
9 <select data-info="{{ $info->id }}" class="js-select2 sertificates_js">
10 <option value="0">Нет</option>
11 <option value="1" selected>Да</option>
12 </select>
13 </div>
14 </div>
15 </div>
16 @php $i++; @endphp
17 @endforeach
18 @endif
19 @endif
20
21 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
22 <label class="form-group__label">Образцы дипломов и документов</label>
23 <div class="form-group__item">
24 <div class="select">
25 <select class="js-select2" id="documents" name="documents">
26 @if ($Infoblocks->count())
27 @foreach ($Infoblocks as $it)
28 <option value="{{ $it->id }}">{{ $it->name }}</option>
29 @endforeach
30 @endif
31 </select>
32 </div>
33 </div>
34 </div>
35
resources/views/workers/cabinet.blade.php
1 @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('click', '#button_new_doc', function() { 6 $(document).on('click', '#button_new_doc123', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.attr('data-val'); 8 var val_ = this_.attr('data-val');
9 var new_diplom = $('#new_diplom'); 9 var new_diplom = $('#new_diplom');
10 var new_diplom_val = new_diplom.val(); 10 var new_diplom_val = new_diplom.val();
11 var new_data_begin = $('#new_data_begin'); 11 var new_data_begin = $('#new_data_begin');
12 var new_data_begin_val = new_data_begin.val(); 12 var new_data_begin_val = new_data_begin.val();
13 var new_data_end = $('#new_data_end'); 13 var new_data_end = $('#new_data_end');
14 var new_data_end_val = new_data_end.val(); 14 var new_data_end_val = new_data_end.val();
15 var education = $('#education'); 15 var education = $('#education');
16 var education_val = education.val(); 16 var education_val = education.val();
17 var worker_id = $('#new_id'); 17 var worker_id = $('#new_id');
18 var worker_val = worker_id.val(); 18 var worker_val = worker_id.val();
19 19
20 console.log('sort items ' + val_); 20 console.log('sort items ' + val_);
21 21
22 if (new_diplom_val == '') { 22 if (new_diplom_val == '') {
23 new_diplom.addClass('err_red'); 23 new_diplom.addClass('err_red');
24 console.log('Border Up'); 24 console.log('Border Up');
25 } else { 25 } else {
26 $.ajax({ 26 $.ajax({
27 type: "GET", 27 type: "GET",
28 url: "{{ route('worker.add_serificate') }}", 28 url: "{{ route('worker.add_serificate') }}",
29 data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val, 29 data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val,
30 success: function (data) { 30 success: function (data) {
31 console.log('Блокировка...'); 31 console.log('Блокировка...');
32 console.log(data); 32 console.log(data);
33 $('#sertificate').html(data); 33 $('#sertificate').html(data);
34 if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); 34 if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red');
35 }, 35 },
36 headers: { 36 headers: {
37 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 37 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
38 }, 38 },
39 error: function (data) { 39 error: function (data) {
40 data = JSON.stringify(data); 40 data = JSON.stringify(data);
41 console.log('Error: ' + data); 41 console.log('Error: ' + data);
42 } 42 }
43 }); 43 });
44 } 44 }
45 }); 45 });
46 46
47 $(document).on('click', '#btn_new_diplom123', function() { 47 $(document).on('click', '#btn_new_diplom123', function() {
48 var this_ = $(this); 48 var this_ = $(this);
49 var val_ = this_.attr('data-val'); 49 var val_ = this_.attr('data-val');
50 var documents = $('#documents'); 50 var documents = $('#documents');
51 var doc_val = documents.val(); 51 var doc_val = documents.val();
52 var block = $('#ajax_dop_diplomi'); 52 var block = $('#ajax_dop_diplomi');
53 53
54 console.log('worker_id='+val_+'it_infoblock='+ doc_val); 54 console.log('worker_id='+val_+'it_infoblock='+ doc_val);
55 55
56 $.ajax({ 56 $.ajax({
57 type: "GET", 57 type: "GET",
58 url: "", 58 url: "",
59 data: "worker_id="+val_+"&infoblok_id="+doc_val, 59 data: "worker_id="+val_+"&infoblok_id="+doc_val,
60 success: function (data) { 60 success: function (data) {
61 location.url = data; 61 location.url = data;
62 console.log('Добавление документа-диплома'); 62 console.log('Добавление документа-диплома');
63 console.log(data); 63 console.log(data);
64 block.html(data); 64 block.html(data);
65 }, 65 },
66 headers: { 66 headers: {
67 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 67 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
68 }, 68 },
69 error: function (data) { 69 error: function (data) {
70 data = JSON.stringify(data); 70 data = JSON.stringify(data);
71 console.log('Error: ' + data); 71 console.log('Error: ' + data);
72 } 72 }
73 }); 73 });
74 }); 74 });
75 75
76 $(document).on('click', '#new_work', function() { 76 $(document).on('click', '#new_work', function() {
77 var this_ = $(this); 77 var this_ = $(this);
78 var val_ = this_.attr('data-val'); 78 var val_ = this_.attr('data-val');
79 var new_diplom = $('#new_diplom').val(); 79 var new_diplom = $('#new_diplom').val();
80 var new_data_begin = $('#new_data_begin').val(); 80 var new_data_begin = $('#new_data_begin').val();
81 var new_data_end = $('#new_data_end').val(); 81 var new_data_end = $('#new_data_end').val();
82 var new_job_title = $('#new_job_title').val(); 82 var new_job_title = $('#new_job_title').val();
83 var new_teplohod = $('#new_teplohod').val(); 83 var new_teplohod = $('#new_teplohod').val();
84 var new_GWT = $('#new_GWT').val(); 84 var new_GWT = $('#new_GWT').val();
85 var new_KBT = $('#new_KBT').val(); 85 var new_KBT = $('#new_KBT').val();
86 var new_Begin_work = $('#new_Begin_work').val(); 86 var new_Begin_work = $('#new_Begin_work').val();
87 var new_End_work = $('#new_End_work').val(); 87 var new_End_work = $('#new_End_work').val();
88 var new_name_company = $('#new_name_company').val(); 88 var new_name_company = $('#new_name_company').val();
89 89
90 console.log('worker_id='+val_+'it_infoblock='+ doc_val); 90 console.log('worker_id='+val_+'it_infoblock='+ doc_val);
91 91
92 $.ajax({ 92 $.ajax({
93 type: "GET", 93 type: "GET",
94 url: "", 94 url: "",
95 data: "worker_id="+val_+"&infoblok_id="+doc_val, 95 data: "worker_id="+val_+"&infoblok_id="+doc_val,
96 success: function (data) { 96 success: function (data) {
97 location.url = data; 97 location.url = data;
98 console.log('Добавление документа-диплома'); 98 console.log('Добавление документа-диплома');
99 console.log(data); 99 console.log(data);
100 block.html(data); 100 block.html(data);
101 }, 101 },
102 headers: { 102 headers: {
103 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 103 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
104 }, 104 },
105 error: function (data) { 105 error: function (data) {
106 data = JSON.stringify(data); 106 data = JSON.stringify(data);
107 console.log('Error: ' + data); 107 console.log('Error: ' + data);
108 } 108 }
109 }); 109 });
110 }); 110 });
111 111
112 $(document).on('click', '#old_year', function() { 112 $(document).on('click', '#old_year', function() {
113 var this_ = $(this); 113 var this_ = $(this);
114 var val = this_.val(); 114 var val = this_.val();
115 115
116 if (val < 0) 116 if (val < 0)
117 $('#old_year').val(0); 117 $('#old_year').val(0);
118 118
119 console.log('Возраст не может выполнить такую операцию'); 119 console.log('Возраст не может выполнить такую операцию');
120 }); 120 });
121 121
122 $(document).on('change', '.sertificates_js', function() {
123 var this_ = $(this);
124 var infoblock_id = this_.attr('data-info');
125 var val = this_.val();
126 var block = $('#block_sertificate');
127
128 console.log('infoblok='+infoblock_id);
129 console.log('val='+val);
130 if (val==0) {
131 $.ajax({
132 type: "GET",
133 url: "{{ route('worker.delete_diplom', ['worker' => $Worker[0]->id]) }}",
134 data: "&infoblok_id=" + infoblock_id,
135 success: function (data) {
136 location.url = data;
137 console.log('Удаление левых документов');
138 console.log(data);
139 window.location.href = data;
140 //block.html(data);
141 },
142 headers: {
143 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
144 },
145 error: function (data) {
146 data = JSON.stringify(data);
147 console.log('Error: ' + data);
148 }
149 });
150 }
151 });
152
122 </script> 153 </script>
123 @endsection 154 @endsection
124 155
125 @section('content') 156 @section('content')
126 <section class="cabinet"> 157 <section class="cabinet">
127 <div class="container"> 158 <div class="container">
128 <ul class="breadcrumbs cabinet__breadcrumbs"> 159 <ul class="breadcrumbs cabinet__breadcrumbs">
129 <li><a href="{{ route('index') }}">Главная</a></li> 160 <li><a href="{{ route('index') }}">Главная</a></li>
130 <li><b>Личный кабинет</b></li> 161 <li><b>Личный кабинет</b></li>
131 </ul> 162 </ul>
132 <div class="cabinet__wrapper"> 163 <div class="cabinet__wrapper">
133 <div class="cabinet__side"> 164 <div class="cabinet__side">
134 <div class="cabinet__side-toper"> 165 <div class="cabinet__side-toper">
135 @include('workers.emblema') 166 @include('workers.emblema')
136 167
137 </div> 168 </div>
138 169
139 @include('workers.menu', ['item' => 1]) 170 @include('workers.menu', ['item' => 1])
140 </div> 171 </div>
141 <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> 172 <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST">
142 @csrf 173 @csrf
143 @include('messages_error') 174 @include('messages_error')
144 <div class="cabinet__body-item"> 175 <div class="cabinet__body-item">
145 <div class="cabinet__anketa"> 176 <div class="cabinet__anketa">
146 <h2 class="title cabinet__title">Моя анкета</h2> 177 <h2 class="title cabinet__title">Моя анкета</h2>
147 <div class="cabinet__anketa-buttons"> 178 <div class="cabinet__anketa-buttons">
148 <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> 179 <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a>
149 <a href="{{ route('resume_download', ['worker' => $Worker[0]->id]) }}" target="_blank" class="button"> 180 <a href="{{ route('resume_download', ['worker' => $Worker[0]->id]) }}" target="_blank" class="button">
150 <svg> 181 <svg>
151 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 182 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
152 </svg> 183 </svg>
153 Скачать резюме 184 Скачать резюме
154 </a> 185 </a>
155 </div> 186 </div>
156 </div> 187 </div>
157 </div> 188 </div>
158 <div class="cabinet__body-item"> 189 <div class="cabinet__body-item">
159 <div class="cabinet__stats"> 190 <div class="cabinet__stats">
160 <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> 191 <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3>
161 <div class="cabinet__stats-body"> 192 <div class="cabinet__stats-body">
162 <div class="cabinet__stats-item"> 193 <div class="cabinet__stats-item">
163 <svg> 194 <svg>
164 <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> 195 <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use>
165 </svg> 196 </svg>
166 <span>Просмотров:</span> 197 <span>Просмотров:</span>
167 <b>@if (isset($stat[0]->lookin)) {{ $stat[0]->lookin }} @else 0 @endif</b> 198 <b>@if (isset($stat[0]->lookin)) {{ $stat[0]->lookin }} @else 0 @endif</b>
168 </div> 199 </div>
169 <div class="cabinet__stats-item"> 200 <div class="cabinet__stats-item">
170 <svg> 201 <svg>
171 <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> 202 <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use>
172 </svg> 203 </svg>
173 <span>Отзывов:</span> 204 <span>Отзывов:</span>
174 <b>@if (isset($stat[0]->message)) {{ $stat[0]->message }} @else 0 @endif</b> 205 <b>@if (isset($stat[0]->message)) {{ $stat[0]->message }} @else 0 @endif</b>
175 </div> 206 </div>
176 </div> 207 </div>
177 <div class="cabinet__stats-subtitle">Анкета заполнена на {{ $persent }}%</div> 208 <div class="cabinet__stats-subtitle">Анкета заполнена на {{ $persent }}%</div>
178 <div class="cabinet__stats-line"> 209 <div class="cabinet__stats-line">
179 <span style="width:{{ $persent }}%"></span> 210 <span style="width:{{ $persent }}%"></span>
180 </div> 211 </div>
181 <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> 212 <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div>
182 </div> 213 </div>
183 </div> 214 </div>
184 <div class="cabinet__body-item"> 215 <div class="cabinet__body-item">
185 <h3 class="cabinet__subtitle">Профиль</h3> 216 <h3 class="cabinet__subtitle">Профиль</h3>
186 <div class="cabinet__avatar"> 217 <div class="cabinet__avatar">
187 <div class="cabinet__avatar-pic"> 218 <div class="cabinet__avatar-pic">
188 219
189 @if (!empty($Worker[0]->photo)) 220 @if (!empty($Worker[0]->photo))
190 <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> 221 <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/>
191 @else 222 @else
192 <svg> 223 <svg>
193 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 224 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
194 </svg> 225 </svg>
195 @endif 226 @endif
196 </div> 227 </div>
197 <div class="cabinet__avatar-form"> 228 <div class="cabinet__avatar-form">
198 <label class="file"> 229 <label class="file">
199 <span class="file__input"> 230 <span class="file__input">
200 <input type="file" name="photo" id="photo"> 231 <input type="file" name="photo" id="photo">
201 232
202 <span class="button"> 233 <span class="button">
203 <svg> 234 <svg>
204 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 235 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
205 </svg> 236 </svg>
206 Загрузить 237 Загрузить
207 </span> 238 </span>
208 </span> 239 </span>
209 </label> 240 </label>
210 <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> 241 <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p>
211 </div> 242 </div>
212 </div> 243 </div>
213 </div> 244 </div>
214 <div class="cabinet__body-item"> 245 <div class="cabinet__body-item">
215 <div class="cabinet__inputs"> 246 <div class="cabinet__inputs">
216 <div class="cabinet__inputs-item form-group"> 247 <div class="cabinet__inputs-item form-group">
217 <label class="form-group__label">Электронная почта *</label> 248 <label class="form-group__label">Электронная почта *</label>
218 <div class="form-group__item"> 249 <div class="form-group__item">
219 <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required> 250 <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required>
220 </div> 251 </div>
221 </div> 252 </div>
222 <div class="cabinet__inputs-item form-group"> 253 <div class="cabinet__inputs-item form-group">
223 <label class="form-group__label">Статус</label> 254 <label class="form-group__label">Статус</label>
224 <div class="form-group__item"> 255 <div class="form-group__item">
225 <div class="select"> 256 <div class="select">
226 <select class="js-select2" name="status_work" id="status_work"> 257 <select class="js-select2" name="status_work" id="status_work">
227 <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option> 258 <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option>
228 <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option> 259 <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option>
229 <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option> 260 <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option>
230 </select> 261 </select>
231 </div> 262 </div>
232 </div> 263 </div>
233 </div> 264 </div>
234 <!--<div class="cabinet__inputs-item form-group"> 265 <!--<div class="cabinet__inputs-item form-group">
235 <label class="form-group__label">Статус *</label> 266 <label class="form-group__label">Статус *</label>
236 <div class="form-group__item"> 267 <div class="form-group__item">
237 <input type="text" class="input" required> 268 <input type="text" class="input" required>
238 </div> 269 </div>
239 </div>--> 270 </div>-->
240 @if (isset($Worker[0]->users)) 271 @if (isset($Worker[0]->users))
241 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 272 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
242 <label class="form-group__label">Фамилия *</label> 273 <label class="form-group__label">Фамилия *</label>
243 <div class="form-group__item"> 274 <div class="form-group__item">
244 <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> 275 <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required>
245 </div> 276 </div>
246 </div> 277 </div>
247 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 278 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
248 <label class="form-group__label">Имя *</label> 279 <label class="form-group__label">Имя *</label>
249 <div class="form-group__item"> 280 <div class="form-group__item">
250 <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> 281 <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required>
251 </div> 282 </div>
252 </div> 283 </div>
253 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 284 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
254 <label class="form-group__label">Отчество *</label> 285 <label class="form-group__label">Отчество *</label>
255 <div class="form-group__item"> 286 <div class="form-group__item">
256 <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> 287 <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич">
257 </div> 288 </div>
258 </div> 289 </div>
259 @endif 290 @endif
260 </div> 291 </div>
261 </div> 292 </div>
262 <div class="cabinet__body-item"> 293 <div class="cabinet__body-item">
263 <h3 class="cabinet__subtitle">Основная информация</h3> 294 <h3 class="cabinet__subtitle">Основная информация</h3>
264 <div class="cabinet__inputs"> 295 <div class="cabinet__inputs">
265 <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> 296 <div class="cabinet__inputs-item cabinet__inputs-item_min form-group">
266 <label class="form-group__label">Возраст</label> 297 <label class="form-group__label">Возраст</label>
267 <div class="form-group__item"> 298 <div class="form-group__item">
268 <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required> 299 <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required>
269 </div> 300 </div>
270 </div> 301 </div>
271 <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> 302 <div class="cabinet__inputs-item cabinet__inputs-item_max form-group">
272 <label class="form-group__label">Желаемые вакансии</label> 303 <label class="form-group__label">Желаемые вакансии</label>
273 <div class="form-group__item"> 304 <div class="form-group__item">
274 <div class="select"> 305 <div class="select">
275 <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> 306 <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple">
276 @if ($Job_titles->count()) 307 @if ($Job_titles->count())
277 @foreach($Job_titles as $it) 308 @foreach($Job_titles as $it)
278 @if (isset($Worker[0]->job_titles)) 309 @if (isset($Worker[0]->job_titles))
279 @if ($Worker[0]->job_titles->count()) 310 @if ($Worker[0]->job_titles->count())
280 @foreach($Worker[0]->job_titles as $select) 311 @foreach($Worker[0]->job_titles as $select)
281 <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option> 312 <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option>
282 @endforeach 313 @endforeach
283 @else 314 @else
284 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> 315 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option>
285 @endif 316 @endif
286 @else 317 @else
287 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> 318 <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option>
288 @endif 319 @endif
289 @endforeach 320 @endforeach
290 @endif 321 @endif
291 </select> 322 </select>
292 </div> 323 </div>
293 </div> 324 </div>
294 </div> 325 </div>
295 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 326 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
296 <label class="form-group__label">Город</label> 327 <label class="form-group__label">Город</label>
297 <div class="form-group__item"> 328 <div class="form-group__item">
298 <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> 329 <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required>
299 </div> 330 </div>
300 </div> 331 </div>
301 <div class="cabinet__inputs-item form-group"> 332 <div class="cabinet__inputs-item form-group">
302 <label class="form-group__label">Опыт работы</label> 333 <label class="form-group__label">Опыт работы</label>
303 <div class="form-group__item"> 334 <div class="form-group__item">
304 <div class="select"> 335 <div class="select">
305 <select class="js-select2" id="experience" name="experience"> 336 <select class="js-select2" id="experience" name="experience">
306 <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> 337 <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option>
307 <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> 338 <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option>
308 <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> 339 <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option>
309 <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> 340 <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option>
310 <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> 341 <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option>
311 <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> 342 <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option>
312 </select> 343 </select>
313 </div> 344 </div>
314 </div> 345 </div>
315 </div> 346 </div>
316 347
317 <div class="cabinet__inputs-item form-group"> 348 <div class="cabinet__inputs-item form-group">
318 <label class="form-group__label">Номер телефона 1</label> 349 <label class="form-group__label">Номер телефона 1</label>
319 <div class="form-group__item"> 350 <div class="form-group__item">
320 <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> 351 <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required>
321 </div> 352 </div>
322 </div> 353 </div>
323 <div class="cabinet__inputs-item form-group"> 354 <div class="cabinet__inputs-item form-group">
324 <label class="form-group__label">Номер телефона 2</label> 355 <label class="form-group__label">Номер телефона 2</label>
325 <div class="form-group__item"> 356 <div class="form-group__item">
326 <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> 357 <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__">
327 </div> 358 </div>
328 </div> 359 </div>
329 </div> 360 </div>
330 </div> 361 </div>
331 362
363 <div class="cabinet__body-item">
364 <h4 class="cabinet__h4">О себе</h4>
365 <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea>
366 <div class="cabinet__buttons">
367 <button type="submit" class="button">Сохранить</button>
368 <label class="file">
369 <span class="file__input">
370 <input type="file" name="file" id="file">
371 <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else Обновить резюме @endif</span>
372 </span>
373 </label>
374 </div>
375 </div>
376
377
332 <div id="sertificate" name="sertificate"> 378 <div id="sertificate" name="sertificate">
333 @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) 379 @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0))
334 @php $i = 0; @endphp 380 @php $i = 0; @endphp
335 @foreach($Worker[0]->sertificate as $it) 381 @foreach($Worker[0]->sertificate as $it)
336 <div style="margin-bottom: 20px" class="cabinet__body-item"> 382 <div style="margin-bottom: 20px" class="cabinet__body-item">
337 @if ($i == 0) 383 @if ($i == 0)
338 <h3 class="cabinet__subtitle">Сертификаты / документы</h3> 384 <h3 class="cabinet__subtitle">Сертификаты / документы</h3>
339 @endif 385 @endif
340 <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> 386 <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4>
341 <div class="cabinet__inputs"> 387 <div class="cabinet__inputs">
342 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 388 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
343 <label class="form-group__label">Название сертификата</label> 389 <label class="form-group__label">Название сертификата</label>
344 <div class="form-group__item"> 390 <div class="form-group__item">
345 <input type="text" class="input" value="{{ $it->name }}" disabled> 391 <input type="text" class="input" value="{{ $it->name }}" disabled>
346 </div> 392 </div>
347 </div> 393 </div>
348 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 394 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
349 <label class="form-group__label">Название сертификата</label> 395 <label class="form-group__label">Учебное заведение</label>
396 <div class="form-group__item">
397 <input type="text" class="input" value="{{ $it->education }}" disabled>
398 </div>
399 </div>
400 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
401 <label class="form-group__label">Период обучения</label>
350 <div class="form-group__item"> 402 <div class="form-group__item">
351 <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> 403 <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled>
352 </div> 404 </div>
353 </div> 405 </div>
354 <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> 406 <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light">
355 <svg> 407 <svg>
356 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> 408 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
357 </svg> 409 </svg>
358 Удалить 410 Удалить
359 </a> 411 </a>
360 </div> 412 </div>
361 </div> 413 </div>
362 @php $i++ @endphp 414 @php $i++ @endphp
363 @endforeach 415 @endforeach
364 @else 416 @else
365 <div style="margin-bottom: 20px" class="cabinet__body-item"> 417 <div style="margin-bottom: 20px" class="cabinet__body-item">
366 <h3 class="cabinet__subtitle">Сертификаты / документы</h3> 418 <h3 class="cabinet__subtitle">Сертификаты / документы</h3>
367 Нет сертификатов 419 Нет сертификатов
368 </div> 420 </div>
369 @endif 421 @endif
370 </div> 422 </div>
371 423
372 <div class="cabinet__body-item"> 424 <div class="cabinet__body-item">
373 <h4 class="cabinet__h4">Добавить сертификат</h4> 425
374 <div class="cabinet__inputs"> 426 <a class="button button_light" href="{{ route('worker.new_sertificate',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc">
375 <input type="hidden" name="new_id" id="new_id" class="input" value="{{ $Worker[0]->id }}">
376 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
377 <label class="form-group__label">Название сертификата</label>
378 <div class="form-group__item">
379 <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании">
380 </div>
381 </div>
382 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
383 <label class="form-group__label">Дата поступления</label>
384 <div class="form-group__item">
385 <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23">
386 </div>
387 </div>
388 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
389 <label class="form-group__label">Дата окончания</label>
390 <div class="form-group__item">
391 <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26">
392 </div>
393 </div>
394 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
395 <label class="form-group__label">Дата окончания</label>
396 <div class="form-group__item">
397 <input type="text" name="education" id="education" class="input" value="Учебное заведение">
398 </div>
399 </div>
400 <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc">
401 Добавить сертификат 427 Добавить сертификат
402 </div> 428 </a>
403 </div> 429
404 </div> 430 </div>
405 431
406 <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> 432 <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi">
407 <h4 class="cabinet__h4">Дополнительная информация</h4> 433 <h4 class="cabinet__h4">Дополнительная информация</h4>
408 <div class="cabinet__inputs" > 434 <div class="cabinet__inputs" id="block_sertificate">
409 @if (isset($Worker[0]->infobloks)) 435 @if (isset($Worker[0]->infobloks))
410 @if ($Worker[0]->infobloks->count()) 436 @if ($Worker[0]->infobloks->count())
411 @php $i = 1; @endphp 437 @php $i = 1; @endphp
412 @foreach ($Worker[0]->infobloks as $info) 438 @foreach ($Worker[0]->infobloks as $info)
413 <div class="cabinet__inputs-item form-group"> 439 <div class="cabinet__inputs-item form-group">
414 <label class="form-group__label">{{ $info->name }}</label> 440 <label class="form-group__label">{{ $info->name }}</label>
415 <div class="form-group__item"> 441 <div class="form-group__item">
416 <div class="select"> 442 <div class="select">
417 <select class="js-select2 sertificates_js"> 443 <select data-info="{{ $info->id }}" class="js-select2 sertificates_js">
418 <option value="0">Нет</option> 444 <option value="0">Нет</option>
419 <option value="1" selected>Да</option> 445 <option value="1" selected>Да</option>
420 </select> 446 </select>
421 </div> 447 </div>
422 </div> 448 </div>
423 </div> 449 </div>
424 @php $i++; @endphp 450 @php $i++; @endphp
425 @endforeach 451 @endforeach
426 @endif 452 @endif
427 @endif 453 @endif
428 454
429 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 455 <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
430 <label class="form-group__label">Образцы дипломов и документов</label> 456 <label class="form-group__label">Образцы дипломов и документов</label>
431 <div class="form-group__item"> 457 <div class="form-group__item">
432 <div class="select"> 458 <div class="select">
433 <select class="js-select2" id="documents" name="documents"> 459 <select class="js-select2" id="documents" name="documents">
434 @if ($Infoblocks->count()) 460 _if ($Infoblocks->count())
435 @foreach ($Infoblocks as $it) 461 _foreach ($Infoblocks as $it)
436 <option value="{{ $it->id }}">{{ $it->name }}</option> 462 <option value="_$it->id }}">_$it->name }}</option>
437 @endforeach 463 _endforeach
438 @endif 464 _endif
439 </select> 465 </select>
440 </div> 466 </div>
441 </div> 467 </div>
442 </div> 468 </div>-->
443 <a href="{{ route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light">
444 Добавить документ
445 </a>
446 </div> 469 </div>
470 <a href="{{ route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light">
471 Добавить документ
472 </a>
447 </div> 473 </div>
448 <div class="cabinet__body-item"> 474 <div class="cabinet__body-item">
449 <div class="cabinet__works"> 475 <div class="cabinet__works">
450 @if (isset($Worker[0]->place_worker)) 476 @if (isset($Worker[0]->place_worker))
451 @php $i = 1; @endphp 477 @php $i = 1; @endphp
452 @foreach($Worker[0]->place_worker as $company) 478 @foreach($Worker[0]->place_worker as $company)
453 <div class="cabinet__works-item"> 479 <div class="cabinet__works-item">
454 <div class="cabinet__works-spoiler active"> 480 <div class="cabinet__works-spoiler active">
455 <div class="cabinet__works-spoiler-left"> 481 <div class="cabinet__works-spoiler-left">
456 <div class="cabinet__works-spoiler-buttons"> 482 <div class="cabinet__works-spoiler-buttons">
457 <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove"> 483 <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove">
458 <svg> 484 <svg>
459 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> 485 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
460 </svg> 486 </svg>
461 </a> 487 </a>
462 <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit"> 488 <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit">
463 <svg> 489 <svg>
464 <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> 490 <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use>
465 </svg> 491 </svg>
466 </a> 492 </a>
467 </div> 493 </div>
468 <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> 494 <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div>
469 </div> 495 </div>
470 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> 496 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
471 <svg> 497 <svg>
472 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> 498 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
473 </svg> 499 </svg>
474 </button> 500 </button>
475 </div> 501 </div>
476 <div class="cabinet__works-body"> 502 <div class="cabinet__works-body">
477 <div class="cabinet__inputs"> 503 <div class="cabinet__inputs">
478 <div class="cabinet__inputs-item form-group"> 504 <div class="cabinet__inputs-item form-group">
479 <label class="form-group__label">Должность</label> 505 <label class="form-group__label">Должность</label>
480 <div class="form-group__item"> 506 <div class="form-group__item">
481 <input type="text" class="input" value="{{ $company->job_title }}"> 507 <input type="text" class="input" value="{{ $company->job_title }}">
482 </div> 508 </div>
483 </div> 509 </div>
484 <div class="cabinet__inputs-item form-group"> 510 <div class="cabinet__inputs-item form-group">
485 <label class="form-group__label">Опыт работы в танкерном флоте</label> 511 <label class="form-group__label">Опыт работы в танкерном флоте</label>
486 <div class="form-group__item"> 512 <div class="form-group__item">
487 <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif"> 513 <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif">
488 </div> 514 </div>
489 </div> 515 </div>
490 <div class="cabinet__inputs-item form-group"> 516 <div class="cabinet__inputs-item form-group">
491 <label class="form-group__label">Название теплохода</label> 517 <label class="form-group__label">Название теплохода</label>
492 <div class="form-group__item"> 518 <div class="form-group__item">
493 <input type="text" class="input" value="{{ $company->teplohod }}"> 519 <input type="text" class="input" value="{{ $company->teplohod }}">
494 </div> 520 </div>
495 </div> 521 </div>
496 <div class="cabinet__inputs-item form-group"> 522 <div class="cabinet__inputs-item form-group">
497 <label class="form-group__label">Тип (GWT)</label> 523 <label class="form-group__label">Тип (GWT)</label>
498 <div class="form-group__item"> 524 <div class="form-group__item">
499 <input type="text" class="input" value="{{ $company->GWT }}"> 525 <input type="text" class="input" value="{{ $company->GWT }}">
500 </div> 526 </div>
501 </div> 527 </div>
502 <div class="cabinet__inputs-item form-group"> 528 <div class="cabinet__inputs-item form-group">
503 <label class="form-group__label">ГД (кВТ)</label> 529 <label class="form-group__label">ГД (кВТ)</label>
504 <div class="form-group__item"> 530 <div class="form-group__item">
505 <input type="text" class="input" value="{{ $company->KBT }}"> 531 <input type="text" class="input" value="{{ $company->KBT }}">
506 </div> 532 </div>
507 </div> 533 </div>
508 <div class="cabinet__inputs-item form-group"> 534 <div class="cabinet__inputs-item form-group">
509 <label class="form-group__label">Начало контракта</label> 535 <label class="form-group__label">Начало контракта</label>
510 <div class="form-group__item"> 536 <div class="form-group__item">
511 <input type="text" class="input" value="{{ $company->begin_work }}"> 537 <input type="text" class="input" value="{{ $company->begin_work }}">
512 </div> 538 </div>
513 </div> 539 </div>
514 <div class="cabinet__inputs-item form-group"> 540 <div class="cabinet__inputs-item form-group">
515 <label class="form-group__label">Окончание контракта</label> 541 <label class="form-group__label">Окончание контракта</label>
516 <div class="form-group__item"> 542 <div class="form-group__item">
517 <input type="text" class="input" value="{{ $company->end_work }}"> 543 <input type="text" class="input" value="{{ $company->end_work }}">
518 </div> 544 </div>
519 </div> 545 </div>
520 <div class="cabinet__inputs-item form-group"> 546 <div class="cabinet__inputs-item form-group">
521 <label class="form-group__label">Название компании</label> 547 <label class="form-group__label">Название компании</label>
522 <div class="form-group__item"> 548 <div class="form-group__item">
523 <input type="text" class="input" value="{{ $company->name_company }}"> 549 <input type="text" class="input" value="{{ $company->name_company }}">
524 </div> 550 </div>
525 </div> 551 </div>
526 </div> 552 </div>
527 </div> 553 </div>
528 </div> 554 </div>
529 @php $i++ @endphp 555 @php $i++ @endphp
530 @endforeach 556 @endforeach
531 @endif 557 @endif
532
533 <!--<div class="cabinet__works-item">
534 <div class="cabinet__works-spoiler">
535 <div class="cabinet__works-spoiler-left">
536 <div class="cabinet__works-spoiler-text">Новая работа</div>
537 </div>
538 <button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
539 <svg>
540 <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
541 </svg>
542 </button>
543 </div>
544 <div class="cabinet__works-body">
545 <div class="cabinet__inputs">
546 <div class="cabinet__inputs-item form-group">
547 <label class="form-group__label">Должность</label>
548 <div class="form-group__item">
549 <input type="text" name="new_job_title" id="new_job_title" class="input" value="Не указано">
550 </div>
551 </div>
552 <div class="cabinet__inputs-item form-group">
553 <label class="form-group__label">Опыт работы в танкерном флоте</label>
554 <div class="form-group__item">
555 <select class="js-select2" name="new_job_title" id="new_job_title">
556 <option value="0">Нет</option>
557 <option value="1">Да</option>
558 </select>
559 </div>
560 </div>
561 <div class="cabinet__inputs-item form-group">
562 <label class="form-group__label">Название теплохода</label>
563 <div class="form-group__item">
564 <input type="text" name="new_teplohod" id="new_teplohod" class="input" value="Не указано">
565 </div>
566 </div>
567 <div class="cabinet__inputs-item form-group">
568 <label class="form-group__label">Тип (GWT)</label>
569 <div class="form-group__item">
resources/views/workers/sertificate_add.blade.php
File was created 1 @extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре'])
2
3 @section('scripts')
4 <script>
5 console.log('Test system');
6 $(document).on('submit', '#submit_form', function() {
7 var this_ = $(this);
8 var new_diplom = $('#name');
9 var new_diplom_val = new_diplom.val();
10 var new_data_begin = $('#new_data_begin');
11 var new_data_begin_val = new_data_begin.val();
12 var new_data_end = $('#new_data_end');
13 var new_data_end_val = new_data_end.val();
14 var education = $('#education');
15 var education_val = education.val();
16 var worker_id = $('#new_id');
17 var worker_val = worker_id.val();
18
19 console.log('Валидация формы.');
20
21 if (new_diplom_val == '') {
22 new_diplom.addClass('err_red');
23 console.log('Border Up');
24 return false;
25 } else {
26 return true;
27 }
28 });
29 </script>
30 @endsection
31
32 @section('content')
33 <section class="cabinet">
34 <div class="container">
35 <ul class="breadcrumbs cabinet__breadcrumbs">
36 <li><a href="{{ route('index') }}">Главная</a></li>
37 <li><b>Личный кабинет</b></li>
38 </ul>
39 <div class="cabinet__wrapper">
40 <div class="cabinet__side">
41 <div class="cabinet__side-toper">
42 @include('workers.emblema')
43
44 </div>
45
46 @include('workers.menu', ['item' => 1])
47 </div>
48
49 <div class="cabinet__body">
50 <div class="cabinet__body-item">
51 <h4 class="cabinet__h4">Добавить сертификат</h4>
52 <form id="submit_form" name="submit_form" action="{{ route('worker.add_serificate') }}" class="cabinet__inputs" method="GET">
53 @csrf
54 <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}">
55 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
56 <label class="form-group__label">Название сертификата</label>
57 <div class="form-group__item">
58 <input type="text" name="name" id="name" class="input" value="Диплом о дополнительном образовании">
59 </div>
60 </div>
61 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
62 <label class="form-group__label">Дата поступления</label>
63 <div class="form-group__item">
64 <input type="text" name="date_begin" id="date_begin" class="input" value="01.09.23">
65 </div>
66 </div>
67 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
68 <label class="form-group__label">Дата окончания</label>
69 <div class="form-group__item">
70 <input type="text" name="end_begin" id="end_begin" class="input" value="04.11.26">
71 </div>
72 </div>
73 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
74 <label class="form-group__label">Название учебного заведения</label>
75 <div class="form-group__item">
76 <input type="text" name="education" id="education" class="input" value="Учебное заведение">
77 </div>
78 </div>
79 <button type="submit" class="button">Сохранить</button>
80 <a href="{{ route('worker.cabinet') }}" class="button">Назад</a>
81 </form>
82 </div>
83 </div>
84 </div>
85 </div>
86 </section>
87
88 @endsection
89
1 <?php 1 <?php
2 2
3 use App\Http\Controllers\Ad_jobsController; 3 use App\Http\Controllers\Ad_jobsController;
4 use App\Http\Controllers\AdEmployerController; 4 use App\Http\Controllers\AdEmployerController;
5 use App\Http\Controllers\Admin\AdminController; 5 use App\Http\Controllers\Admin\AdminController;
6 use App\Http\Controllers\Admin\CategoryController; 6 use App\Http\Controllers\Admin\CategoryController;
7 use App\Http\Controllers\Admin\CategoryEmpController; 7 use App\Http\Controllers\Admin\CategoryEmpController;
8 use App\Http\Controllers\Admin\EducationController; 8 use App\Http\Controllers\Admin\EducationController;
9 use App\Http\Controllers\Admin\EmployersController; 9 use App\Http\Controllers\Admin\EmployersController;
10 use App\Http\Controllers\EmployerController as FrontEmployersController; 10 use App\Http\Controllers\EmployerController as FrontEmployersController;
11 use App\Http\Controllers\Admin\InfoBloksController; 11 use App\Http\Controllers\Admin\InfoBloksController;
12 use App\Http\Controllers\Admin\JobTitlesController; 12 use App\Http\Controllers\Admin\JobTitlesController;
13 use App\Http\Controllers\Admin\UsersController; 13 use App\Http\Controllers\Admin\UsersController;
14 use App\Http\Controllers\Admin\WorkersController; 14 use App\Http\Controllers\Admin\WorkersController;
15 use App\Http\Controllers\Auth\ForgotPasswordController; 15 use App\Http\Controllers\Auth\ForgotPasswordController;
16 use App\Http\Controllers\Auth\LoginController; 16 use App\Http\Controllers\Auth\LoginController;
17 use App\Http\Controllers\Auth\RegisterController; 17 use App\Http\Controllers\Auth\RegisterController;
18 use App\Http\Controllers\CKEditorController; 18 use App\Http\Controllers\CKEditorController;
19 use App\Http\Controllers\MediaController; 19 use App\Http\Controllers\MediaController;
20 use App\Http\Controllers\WorkerController; 20 use App\Http\Controllers\WorkerController;
21 use App\Models\Ad_jobs; 21 use App\Models\Ad_jobs;
22 use App\Models\User; 22 use App\Models\User;
23 use App\Http\Controllers\MainController; 23 use App\Http\Controllers\MainController;
24 use App\Http\Controllers\HomeController; 24 use App\Http\Controllers\HomeController;
25 use Illuminate\Support\Facades\Route; 25 use Illuminate\Support\Facades\Route;
26 use App\Http\Controllers\Admin\CompanyController; 26 use App\Http\Controllers\Admin\CompanyController;
27 use App\Http\Controllers\Admin\Ad_EmployersController; 27 use App\Http\Controllers\Admin\Ad_EmployersController;
28 use App\Http\Controllers\Admin\MsgAnswersController; 28 use App\Http\Controllers\Admin\MsgAnswersController;
29 use App\Http\Controllers\Admin\GroupsController; 29 use App\Http\Controllers\Admin\GroupsController;
30 use App\Http\Controllers\PagesController; 30 use App\Http\Controllers\PagesController;
31 use Illuminate\Support\Facades\Storage; 31 use Illuminate\Support\Facades\Storage;
32 use App\Http\Controllers\EmployerController; 32 use App\Http\Controllers\EmployerController;
33 use App\Http\Controllers\CompanyController as FrontCompanyController; 33 use App\Http\Controllers\CompanyController as FrontCompanyController;
34 34
35 35
36 /* 36 /*
37 |-------------------------------------------------------------------------- 37 |--------------------------------------------------------------------------
38 | Web Routes 38 | Web Routes
39 |-------------------------------------------------------------------------- 39 |--------------------------------------------------------------------------
40 | 40 |
41 | Here is where you can register web routes for your application. These 41 | Here is where you can register web routes for your application. These
42 | routes are loaded by the RouteServiceProvider within a group which 42 | routes are loaded by the RouteServiceProvider within a group which
43 | contains the "web" middleware group. Now create something great! 43 | contains the "web" middleware group. Now create something great!
44 | 44 |
45 */ 45 */
46 /* 46 /*
47 Route::get('/', function () { 47 Route::get('/', function () {
48 return view('welcome'); 48 return view('welcome');
49 })->name('index'); 49 })->name('index');
50 */ 50 */
51 51
52 Route::get('/', [MainController::class, 'index'])->name('index'); 52 Route::get('/', [MainController::class, 'index'])->name('index');
53 53
54 //Роуты авторизации, регистрации, восстановления, аутентификации 54 //Роуты авторизации, регистрации, восстановления, аутентификации
55 Auth::routes(['verify' => true]); 55 Auth::routes(['verify' => true]);
56 56
57 // роуты регистрации, авторизации, восстановления пароля, верификации почты 57 // роуты регистрации, авторизации, восстановления пароля, верификации почты
58 /*Route::group([ 58 /*Route::group([
59 'as' => 'auth.', //имя маршрута, например auth.index 59 'as' => 'auth.', //имя маршрута, например auth.index
60 'prefix' => 'auth', // префикс маршрута, например, auth/index 60 'prefix' => 'auth', // префикс маршрута, например, auth/index
61 ], function () { 61 ], function () {
62 //форма регистрации 62 //форма регистрации
63 Route::get('register', [RegisterController::class, 'register'])->name('register'); 63 Route::get('register', [RegisterController::class, 'register'])->name('register');
64 64
65 //создание пользователя 65 //создание пользователя
66 Route::post('register', [RegisterController::class, 'create'])->name('create'); 66 Route::post('register', [RegisterController::class, 'create'])->name('create');
67 67
68 //форма входа авторизации 68 //форма входа авторизации
69 Route::get('login', [LoginController::class, 'login'])->name('login'); 69 Route::get('login', [LoginController::class, 'login'])->name('login');
70 70
71 //аутентификация 71 //аутентификация
72 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 72 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
73 73
74 //выход 74 //выход
75 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 75 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
76 76
77 //форма ввода адреса почты 77 //форма ввода адреса почты
78 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 78 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
79 79
80 //письмо на почту 80 //письмо на почту
81 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 81 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
82 82
83 //форма восстановления пароля 83 //форма восстановления пароля
84 Route::get('reset-password/token/{token}/email/{email}', 84 Route::get('reset-password/token/{token}/email/{email}',
85 [ResetPasswordController::class, 'form'] 85 [ResetPasswordController::class, 'form']
86 )->name('reset-form'); 86 )->name('reset-form');
87 87
88 //восстановление пароля 88 //восстановление пароля
89 Route::post('reset-password', 89 Route::post('reset-password',
90 [ResetPasswordController::class, 'reset'] 90 [ResetPasswordController::class, 'reset']
91 )->name('reset-password'); 91 )->name('reset-password');
92 92
93 //сообщение о необходимости проверки адреса почты 93 //сообщение о необходимости проверки адреса почты
94 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 94 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
95 95
96 //подтверждение адреса почты нового пользователя 96 //подтверждение адреса почты нового пользователя
97 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 97 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
98 ->where('token', '[a-f0-9]{32}') 98 ->where('token', '[a-f0-9]{32}')
99 ->where('id', '[0-9]+') 99 ->where('id', '[0-9]+')
100 ->name('verify-email'); 100 ->name('verify-email');
101 });*/ 101 });*/
102 102
103 //Личный кабинет пользователя 103 //Личный кабинет пользователя
104 Route::get('/home', [HomeController::class, 'index'])->name('home'); 104 Route::get('/home', [HomeController::class, 'index'])->name('home');
105 105
106 /* 106 /*
107 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 107 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
108 $user = User::where('email',$request->input('email'))->first(); 108 $user = User::where('email',$request->input('email'))->first();
109 109
110 $user->sendEmailVerificationNotification(); 110 $user->sendEmailVerificationNotification();
111 111
112 return 'your response'; 112 return 'your response';
113 })->middleware('throttle:6,1')->name('verification.resend'); 113 })->middleware('throttle:6,1')->name('verification.resend');
114 */ 114 */
115 115
116 // Авторизация, регистрация в админку 116 // Авторизация, регистрация в админку
117 Route::group([ 117 Route::group([
118 'as' => 'admin.', // имя маршрута, например auth.index 118 'as' => 'admin.', // имя маршрута, например auth.index
119 'prefix' => 'admin', // префикс маршрута, например auth/index 119 'prefix' => 'admin', // префикс маршрута, например auth/index
120 'middleware' => ['guest'], 120 'middleware' => ['guest'],
121 ], function () { 121 ], function () {
122 // Форма регистрации 122 // Форма регистрации
123 Route::get('register', [AdminController::class, 'register'])->name('register'); 123 Route::get('register', [AdminController::class, 'register'])->name('register');
124 // Создание пользователя 124 // Создание пользователя
125 Route::post('register', [AdminController::class, 'create'])->name('create'); 125 Route::post('register', [AdminController::class, 'create'])->name('create');
126 126
127 //Форма входа 127 //Форма входа
128 Route::get('login', [AdminController::class, 'login'])->name('login'); 128 Route::get('login', [AdminController::class, 'login'])->name('login');
129 129
130 // аутентификация 130 // аутентификация
131 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 131 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
132 132
133 }); 133 });
134 134
135 // Личный кабинет админки 135 // Личный кабинет админки
136 Route::group([ 136 Route::group([
137 'as' => 'admin.', // имя маршрута, например auth.index 137 'as' => 'admin.', // имя маршрута, например auth.index
138 'prefix' => 'admin', // префикс маршрута, например auth/index 138 'prefix' => 'admin', // префикс маршрута, например auth/index
139 'middleware' => ['auth'], ['admin'], 139 'middleware' => ['auth'], ['admin'],
140 ], function() { 140 ], function() {
141 141
142 // выход 142 // выход
143 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 143 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
144 144
145 // кабинет главная страница 145 // кабинет главная страница
146 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 146 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
147 147
148 // кабинет профиль админа - форма 148 // кабинет профиль админа - форма
149 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 149 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
150 // кабинет профиль админа - сохранение формы 150 // кабинет профиль админа - сохранение формы
151 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 151 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
152 152
153 //кабинет сообщения админа 153 //кабинет сообщения админа
154 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 154 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
155 155
156 156
157 // кабинет профиль - форма пароли 157 // кабинет профиль - форма пароли
158 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 158 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
159 // кабинет профиль - сохранение формы пароля 159 // кабинет профиль - сохранение формы пароля
160 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 160 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
161 161
162 162
163 // кабинет профиль пользователя - форма 163 // кабинет профиль пользователя - форма
164 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 164 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
165 // кабинет профиль пользователя - сохранение формы 165 // кабинет профиль пользователя - сохранение формы
166 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 166 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
167 167
168 // кабинет профиль работодатель - форма 168 // кабинет профиль работодатель - форма
169 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 169 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
170 // кабинет профиль работодатель - сохранение формы 170 // кабинет профиль работодатель - сохранение формы
171 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 171 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
172 // кабинет удаление профиль работодателя и юзера 172 // кабинет удаление профиль работодателя и юзера
173 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 173 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
174 174
175 // кабинет профиль работник - форма 175 // кабинет профиль работник - форма
176 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 176 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
177 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 177 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
178 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 178 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
179 // кабинет профиль работник - сохранение формы 179 // кабинет профиль работник - сохранение формы
180 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 180 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
181 181
182 // Медиа 182 // Медиа
183 Route::get('media', [MediaController::class, 'index'])->name('media'); 183 Route::get('media', [MediaController::class, 'index'])->name('media');
184 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 184 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
185 185
186 // кабинет настройки сайта - форма 186 // кабинет настройки сайта - форма
187 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 187 Route::get('config', [AdminController::class, 'config_form'])->name('config');
188 // кабинет настройки сайта сохранение формы 188 // кабинет настройки сайта сохранение формы
189 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 189 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
190 190
191 // кабинет - новости
192 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin');
193 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add');
194 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add');
195 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit');
196 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update');
197 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete');
198
191 // кабинет - пользователи 199 // кабинет - пользователи
192 Route::get('users', [UsersController::class, 'index'])->name('users'); 200 Route::get('users', [UsersController::class, 'index'])->name('users');
193 201
194 // кабинет - пользователи 202 // кабинет - пользователи
195 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 203 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
196 204
197 // кабинет - работодатели 205 // кабинет - работодатели
198 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 206 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
199 207
200 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 208 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
201 209
202 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 210 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
203 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 211 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
204 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 212 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
205 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 213 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
206 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 214 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
207 215
208 // кабинет - соискатели 216 // кабинет - соискатели
209 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 217 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
210 218
211 // кабинет - база данных 219 // кабинет - база данных
212 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 220 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
213 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 221 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
214 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 222 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
215 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 223 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
216 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 224 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
217 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 225 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
218 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 226 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
219 227
220 // кабинет - вакансии 228 // кабинет - вакансии
221 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 229 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
222 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 230 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
223 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 231 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
224 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 232 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
225 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 233 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
226 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 234 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
227 235
228 // Редактирование должности в вакансии 236 // Редактирование должности в вакансии
229 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 237 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
230 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 238 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
231 239
232 240
233 // кабинет - категории 241 // кабинет - категории
234 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 242 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
235 243
236 // СRUD-операции над Справочником Категории 244 // СRUD-операции над Справочником Категории
237 245
238 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 246 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
239 247
240 // CRUD-операции над справочником Категории для работодателей 248 // CRUD-операции над справочником Категории для работодателей
241 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 249 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
242 250
243 // CRUD-операции над справочником Образование 251 // CRUD-операции над справочником Образование
244 Route::resource('education', EducationController::class, ['except' => ['show']]); 252 Route::resource('education', EducationController::class, ['except' => ['show']]);
245 253
246 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 254 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
247 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 255 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
248 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 256 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
249 257
250 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 258 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
251 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 259 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
252 260
253 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 261 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
254 262
255 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 263 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
256 /* 264 /*
257 * кабинет - CRUD-операции по справочнику должности 265 * кабинет - CRUD-операции по справочнику должности
258 * 266 *
259 */ 267 */
260 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 268 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
261 269
262 // кабинет - сообщения (чтение чужих) 270 // кабинет - сообщения (чтение чужих)
263 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 271 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
264 // кабинет - просмотр сообщения чужого (чтение) 272 // кабинет - просмотр сообщения чужого (чтение)
265 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 273 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
266 274
267 // кабинет - сообщения (админские) 275 // кабинет - сообщения (админские)
268 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 276 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
269 // кабинет - сообщения (админские) 277 // кабинет - сообщения (админские)
270 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 278 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
271 // кабинет - sql - конструкция запросов 279 // кабинет - sql - конструкция запросов
272 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 280 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
273 281
274 /* 282 /*
275 * Расписанный подход в описании каждой директорий групп пользователей. 283 * Расписанный подход в описании каждой директорий групп пользователей.
276 */ 284 */
277 // кабинет - группы пользователей 285 // кабинет - группы пользователей
278 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 286 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
279 // кабинет - добавление форма группы пользователей 287 // кабинет - добавление форма группы пользователей
280 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 288 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
281 // кабинет - сохранение формы группы пользователей 289 // кабинет - сохранение формы группы пользователей
282 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 290 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
283 // кабинет - редактирование форма группы пользователей 291 // кабинет - редактирование форма группы пользователей
284 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 292 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
285 // кабинет - сохранение редактированной формы группы пользователей 293 // кабинет - сохранение редактированной формы группы пользователей
286 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 294 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
287 // кабинет - удаление группы пользователей 295 // кабинет - удаление группы пользователей
288 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 296 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
289 297
290 298
291 // кабинет - список админов 299 // кабинет - список админов
292 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 300 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
293 301
294 // справочник Позиции 302 // справочник Позиции
295 Route::get('positions', [AdminController::class, 'position'])->name('position'); 303 Route::get('positions', [AdminController::class, 'position'])->name('position');
296 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); 304 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position');
297 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); 305 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position');
298 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); 306 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position');
299 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); 307 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position');
300 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); 308 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position');
301 309
302 /////редактор////// кабинет - редактор сайта//////////////////////// 310 /////редактор////// кабинет - редактор сайта////////////////////////
303 Route::get('editor-site', function() { 311 Route::get('editor-site', function() {
304 return view('admin.editor.index'); 312 return view('admin.editor.index');
305 })->name('editor-site'); 313 })->name('editor-site');
306 314
307 315
308 // кабинет - редактор шапки-футера сайта 316 // кабинет - редактор шапки-футера сайта
309 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 317 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
310 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 318 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
311 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 319 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
312 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 320 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
313 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 321 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
314 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 322 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
315 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 323 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
316 324
317 325
318 // кабинет - редактор должности на главной 326 // кабинет - редактор должности на главной
319 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 327 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
320 328
321 // кабинет - редактор работодатели на главной 329 // кабинет - редактор работодатели на главной
322 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 330 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
323 331
324 332
325 // кабинет - редактор seo-сайта 333 // кабинет - редактор seo-сайта
326 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 334 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
327 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 335 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
328 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 336 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
329 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 337 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
330 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 338 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
331 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 339 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
332 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 340 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
333 341
334 342
335 // кабинет - редактор страниц 343 // кабинет - редактор страниц
336 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 344 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
337 // кабинет - добавление страницы 345 // кабинет - добавление страницы
338 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 346 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
339 // кабинет - сохранение формы страницы 347 // кабинет - сохранение формы страницы
340 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 348 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
341 // кабинет - редактирование форма страницы 349 // кабинет - редактирование форма страницы
342 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 350 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
343 // кабинет - сохранение редактированной формы страницы 351 // кабинет - сохранение редактированной формы страницы
344 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 352 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
345 // кабинет - удаление страницы 353 // кабинет - удаление страницы
346 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 354 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
347 355
348 356
349 // кабинет - реклама сайта 357 // кабинет - реклама сайта
350 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 358 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
351 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 359 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
352 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 360 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
353 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 361 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
354 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 362 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
355 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 363 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
356 //////////////////////////////////////////////////////////////////////// 364 ////////////////////////////////////////////////////////////////////////
357 365
358 366
359 // кабинет - отзывы о работодателе для модерации 367 // кабинет - отзывы о работодателе для модерации
360 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 368 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
361 369
362 // Общая страница статистики 370 // Общая страница статистики
363 Route::get('statics', function () { 371 Route::get('statics', function () {
364 return view('admin.static.index'); 372 return view('admin.static.index');
365 })->name('statics'); 373 })->name('statics');
366 374
367 // кабинет - статистика работников 375 // кабинет - статистика работников
368 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 376 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
369 377
370 // кабинет - статистика вакансий работодателя 378 // кабинет - статистика вакансий работодателя
371 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 379 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
372 380
373 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 381 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
374 /* 382 /*
375 * CRUD-операции над справочником дипломы и документы 383 * CRUD-операции над справочником дипломы и документы
376 */ 384 */
377 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 385 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
378 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 386 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
379 387
380 // кабинет - роли пользователя 388 // кабинет - роли пользователя
381 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 389 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
382 390
383 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 391 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
384 392
385 Route::get('logs', function() { 393 Route::get('logs', function() {
386 $files = Storage::files('logs/laravel.log'); 394 $files = Storage::files('logs/laravel.log');
387 })->name('logs'); 395 })->name('logs');
388 }); 396 });
389 397
390 // Инструментальные страницы 398 // Инструментальные страницы
391 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 399 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
392 400
393 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 401 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
394 402
395 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 403 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
396 404
397 // Страницы с произвольным контентом 405 // Страницы с произвольным контентом
398 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 406 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
399 407
400 // Публичные страницы соискателя 408 // Публичные страницы соискателя
401 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 409 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
402 410
403 //Страница вакансии 411 //Страница вакансии
404 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 412 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
405 413
406 //Вакансии 414 //Вакансии
407 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 415 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
408 416
409 //Вакансии поиск на главной 417 //Вакансии поиск на главной
410 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 418 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
411 419
412 //Вакансии категория детальная 420 //Вакансии категория детальная
413 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 421 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
414 422
415 // Лайк вакансии 423 // Лайк вакансии
416 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); 424 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy');
417 425
418 //Детальная страница вакансии - работодателя 426 //Детальная страница вакансии - работодателя
419 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 427 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
420 428
421 //Судоходные компании 429 //Судоходные компании
422 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 430 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
423 431
424 //Детальная инфа о компании 432 //Детальная инфа о компании
425 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 433 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
426 434
427 //Образование 435 //Образование
428 Route::get('education', [MainController::class, 'education'])->name('education'); 436 Route::get('education', [MainController::class, 'education'])->name('education');
429 437
430 //Новости 438 //Новости
431 Route::get('news', [MainController::class, 'news'])->name('news'); 439 Route::get('news', [MainController::class, 'news'])->name('news');
432 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); 440 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new');
433 441
434 //Контакты 442 //Контакты
435 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 443 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
436 444
437 //База резюме 445 //База резюме
438 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 446 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
439 447
440 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); 448 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
441 449
442 //Анкета соискателя 450 //Анкета соискателя
443 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 451 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
444 452
445 //Скачать резюме 453 //Скачать резюме
446 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 454 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
447 455
448 //Вход в кабинет 456 //Вход в кабинет
449 Route::get('login', [MainController::class, 'input_login'])->name('login'); 457 Route::get('login', [MainController::class, 'input_login'])->name('login');
450 458
451 // Выход из кабинета 459 // Выход из кабинета
452 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 460 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
453 461
454 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 462 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
455 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 463 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
456 464
457 //восстановление пароля 465 //восстановление пароля
458 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); 466 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
459 // Звезда сообщения 467 // Звезда сообщения
460 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); 468 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
461 469
462 // Борьба 470 // Борьба
463 Route::get('clear_cookie', function() { 471 Route::get('clear_cookie', function() {
464 \App\Classes\Cookies_vacancy::clear_vacancy(); 472 \App\Classes\Cookies_vacancy::clear_vacancy();
465 return redirect()->route('index'); 473 return redirect()->route('index');
466 })->name('clear_cookie'); 474 })->name('clear_cookie');
467 475
468 Route::get('cookies', function() { 476 Route::get('cookies', function() {
469 return view('cookies'); 477 return view('cookies');
470 })->name('cookies'); 478 })->name('cookies');
471 479
472 480
473 481
474 482
475 // Личный кабинет работник 483 // Личный кабинет работник
476 Route::group([ 484 Route::group([
477 'as' => 'worker.', // имя маршрута, например auth.index 485 'as' => 'worker.', // имя маршрута, например auth.index
478 'prefix' => 'worker', // префикс маршрута, например auth/index 486 'prefix' => 'worker', // префикс маршрута, например auth/index
479 'middleware' => ['auth'], ['is_worker'], 487 'middleware' => ['auth'], ['is_worker'],
480 ], function() { 488 ], function() {
481 // 1 страница - Моя анкета 489 // 1 страница - Моя анкета
482 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 490 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
483 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 491 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
484 492
485 // 2 страница - Сообщения 493 // 2 страница - Сообщения
486 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 494 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
487 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); 495 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog');
488 // 3 страница - Избранные вакансии 496 // 3 страница - Избранные вакансии
489 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 497 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
490 // Продолжение борьбы против колорадов - избранные вакансии 498 // Продолжение борьбы против колорадов - избранные вакансии
491 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 499 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
492 500
493 // 4 страница - Сменить пароль 501 // 4 страница - Сменить пароль
494 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 502 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
495 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); 503 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
496 504
497 // 5 страница - Удалить профиль 505 // 5 страница - Удалить профиль
498 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 506 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
499 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); 507 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
500 508
501 // Резюме -pdf 509 // Резюме -pdf
502 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 510 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
503 511
504 // Поднятие анкеты 512 // Поднятие анкеты
505 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 513 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
506 514
507 // Добавление сертификата 515 // Добавление сертификата
516 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate');
508 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 517 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
509 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); 518 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
510 519
511 // Добавление документа-диплома 520 // Добавление документа-диплома
512 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); 521 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
513 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); 522 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
523 Route::get('кабинет/delete_diplom/{worker}', [WorkerController::class, 'delete_diplom'])->name('delete_diplom');
514 524
515 // Добавление стандартного диплома 525 // Добавление стандартного диплома
516 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); 526 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
517 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); 527 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
518 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); 528 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
519 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); 529 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
520 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); 530 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
521 531
522 // Отправка сообщения работодателю от соискателя 532 // Отправка сообщения работодателю от соискателя
523 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); 533 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
524 }); 534 });
525 535
526 // Личный кабинет работодателя 536 // Личный кабинет работодателя
527 Route::group([ 537 Route::group([
528 'as' => 'employer.', // имя маршрута, например auth.index 538 'as' => 'employer.', // имя маршрута, например auth.index
529 'prefix' => 'employer', // префикс маршрута, например auth/index 539 'prefix' => 'employer', // префикс маршрута, например auth/index
530 'middleware' => ['auth'], !['is_worker'], 540 'middleware' => ['auth'], !['is_worker'],
531 ], function() { 541 ], function() {
532 // 1 страница - Профиль 542 // 1 страница - Профиль
533 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 543 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
534 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 544 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
535 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 545 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
536 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 546 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
547 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
537 548
538 // 2 страница - Добавление вакансий 549 // 2 страница - Добавление вакансий
539 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 550 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
540 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 551 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
541 552
542 553
543 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 554 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
544 555
545 556
546 // 3 страница - Мои вакансии 557 // 3 страница - Мои вакансии
547 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 558 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
548 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 559 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
549 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 560 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
550 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 561 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
551 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 562 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
552 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 563 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
553 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); 564 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
554 565
555 // 4.1Ю. 566 // 4.1Ю.
556 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); 567 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
557 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); 568 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
558 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); 569 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
559 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); 570 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
560 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); 571 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
561 572
562 // 4 страница - Отклики на вакансии 573 // 4 страница - Отклики на вакансии
563 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 574 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
564 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 575 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
565 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 576 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
566 577
567 // 5 страница - Сообщения 578 // 5 страница - Сообщения
568 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 579 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
569 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); 580 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog');
570 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 581 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
571 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 582 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
572 583
573 // 6 страница - Избранный 584 // 6 страница - Избранный
574 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 585 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
575 586
576 //7 страница - База данных 587 //7 страница - База данных
577 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 588 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
578 589
579 //8 страница - База резюме 590 //8 страница - База резюме
580 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 591 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
581 592
582 // 9 рассылка сообщений 593 // 9 рассылка сообщений
583 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 594 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
584 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 595 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
585 596
586 // 10 страница FAQ вопросы 597 // 10 страница FAQ вопросы
587 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); 598 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
588 599
589 // 11 страница - Настройка уведомлений 600 // 11 страница - Настройка уведомлений
590 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 601 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
591 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 602 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
592 603
593 // 12 страница - Сменить пароль 604 // 12 страница - Сменить пароль
594 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 605 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
595 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 606 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
596 607
597 // 13 страница - Удаление профиля 608 // 13 страница - Удаление профиля
598 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 609 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
599 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 610 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
600 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); 611 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
601 612
602 // Отправил сообщение 613 // Отправил сообщение
603 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); 614 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message');
604 }); 615 });
605 616
606 617
607 618