Commit bb2fb443df87d6bf5b48028cd49c1f0e78c45768
1 parent
f64f4890ff
Exists in
master
and in
1 other branch
Архитектурное дополнение БД, моделей, контроллеров и вьюшек
Showing 20 changed files with 798 additions and 330 deletions Side-by-side Diff
- app/Http/Controllers/Admin/Ad_EmployersController.php
- app/Http/Controllers/Admin/AdminController.php
- app/Http/Controllers/Admin/CompanyController.php
- app/Http/Controllers/Admin/EmployersController.php
- app/Http/Controllers/Admin/UsersController.php
- app/Http/Controllers/Admin/WorkersController.php
- app/Models/Ad_employer.php
- public/assets/js/init-alpine.js
- resources/views/admin/ad_employers/index.blade.php
- resources/views/admin/category/index.blade.php
- resources/views/admin/employer/index.blade.php
- resources/views/admin/employer/index_ajax.blade.php
- resources/views/admin/index.blade.php
- resources/views/admin/static/index.blade.php
- resources/views/admin/users/index.blade.php
- resources/views/admin/users/index_ajax.blade.php
- resources/views/admin/worker/index.blade.php
- resources/views/admin/worker/index_ajax.blade.php
- resources/views/layout/admin.blade.php
- routes/web.php
app/Http/Controllers/Admin/Ad_EmployersController.php
... | ... | @@ -0,0 +1,92 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace App\Http\Controllers\Admin; | |
4 | + | |
5 | +use App\Http\Controllers\Controller; | |
6 | +use App\Models\Ad_employer; | |
7 | +use App\Models\User; | |
8 | +use Illuminate\Http\Request; | |
9 | +use Illuminate\Support\Facades\Auth; | |
10 | + | |
11 | +class Ad_EmployersController extends Controller | |
12 | +{ | |
13 | + /** | |
14 | + * Display a listing of the resource. | |
15 | + * | |
16 | + * @return \Illuminate\Http\Response | |
17 | + */ | |
18 | + public function index(Request $request) | |
19 | + { | |
20 | + $title = 'Админка - Вакансии работодателей'; | |
21 | + $ad_employers = Ad_employer::where('is_remove', '0')->paginate(15); | |
22 | + | |
23 | + return view('admin.ad_employers.index', compact('ad_employers', 'title')); | |
24 | + | |
25 | + } | |
26 | + | |
27 | + /** | |
28 | + * Show the form for creating a new resource. | |
29 | + * | |
30 | + * @return \Illuminate\Http\Response | |
31 | + */ | |
32 | + public function create() | |
33 | + { | |
34 | + // | |
35 | + } | |
36 | + | |
37 | + /** | |
38 | + * Store a newly created resource in storage. | |
39 | + * | |
40 | + * @param \Illuminate\Http\Request $request | |
41 | + * @return \Illuminate\Http\Response | |
42 | + */ | |
43 | + public function store(Request $request) | |
44 | + { | |
45 | + // | |
46 | + } | |
47 | + | |
48 | + /** | |
49 | + * Display the specified resource. | |
50 | + * | |
51 | + * @param \App\Models\Ad_employer $ad_employer | |
52 | + * @return \Illuminate\Http\Response | |
53 | + */ | |
54 | + public function show(Ad_employer $ad_employer) | |
55 | + { | |
56 | + // | |
57 | + } | |
58 | + | |
59 | + /** | |
60 | + * Show the form for editing the specified resource. | |
61 | + * | |
62 | + * @param \App\Models\Ad_employer $ad_employer | |
63 | + * @return \Illuminate\Http\Response | |
64 | + */ | |
65 | + public function edit(Ad_employer $ad_employer) | |
66 | + { | |
67 | + // | |
68 | + } | |
69 | + | |
70 | + /** | |
71 | + * Update the specified resource in storage. | |
72 | + * | |
73 | + * @param \Illuminate\Http\Request $request | |
74 | + * @param \App\Models\Ad_employer $ad_employer | |
75 | + * @return \Illuminate\Http\Response | |
76 | + */ | |
77 | + public function update(Request $request, Ad_employer $ad_employer) | |
78 | + { | |
79 | + // | |
80 | + } | |
81 | + | |
82 | + /** | |
83 | + * Remove the specified resource from storage. | |
84 | + * | |
85 | + * @param \App\Models\Ad_employer $ad_employer | |
86 | + * @return \Illuminate\Http\Response | |
87 | + */ | |
88 | + public function destroy(Ad_employer $ad_employer) | |
89 | + { | |
90 | + // | |
91 | + } | |
92 | +} |
app/Http/Controllers/Admin/AdminController.php
... | ... | @@ -148,6 +148,7 @@ class AdminController extends Controller |
148 | 148 | |
149 | 149 | public function index_admin(Request $request) { |
150 | 150 | $title = 'Админка - Администраторы системы'; |
151 | + $id_admin = Auth::user()->id; | |
151 | 152 | |
152 | 153 | if ($request->ajax()) { |
153 | 154 | $user = User::find($request->id); |
... | ... | @@ -158,9 +159,9 @@ class AdminController extends Controller |
158 | 159 | $users = User::where('admin', '1')->paginate(15); |
159 | 160 | |
160 | 161 | if ($request->ajax()) { |
161 | - return view('admin.users.index_ajax', compact('users')); | |
162 | + return view('admin.users.index_ajax', compact('users', 'id_admin')); | |
162 | 163 | } else { |
163 | - return view('admin.users.index', compact('users', 'title')); | |
164 | + return view('admin.users.index', compact('users', 'title', 'id_admin')); | |
164 | 165 | } |
165 | 166 | } |
166 | 167 | |
... | ... | @@ -171,7 +172,7 @@ class AdminController extends Controller |
171 | 172 | $caption = "Карточка работника"; |
172 | 173 | if (isset($user->workers[0]->id)) { |
173 | 174 | $link = route('admin.worker-profile', ['worker' => $user->workers[0]->id]); |
174 | - $visible = true; | |
175 | + //$visible = true; | |
175 | 176 | } else { |
176 | 177 | $link = ""; |
177 | 178 | } |
... | ... | @@ -181,7 +182,7 @@ class AdminController extends Controller |
181 | 182 | if (isset($user->employers[0]->id)) { |
182 | 183 | |
183 | 184 | $link = route('admin.employer-profile', ['employer' => $user->employers[0]->id]); |
184 | - $visible = true; | |
185 | + //$visible = true; | |
185 | 186 | } else { |
186 | 187 | $link = ""; |
187 | 188 | } |
... | ... | @@ -322,38 +323,5 @@ class AdminController extends Controller |
322 | 323 | return redirect()->route('admin.config'); |
323 | 324 | } |
324 | 325 | |
325 | - // кабинет - редактор сайта | |
326 | - public function editor() { | |
327 | - return; | |
328 | - } | |
329 | - | |
330 | - // кабинет - редактор шапки-футера сайта | |
331 | - public function editblocks() { | |
332 | - return; | |
333 | - } | |
334 | - | |
335 | - // кабинет - редактор должности на главной | |
336 | - public function job_titles_main() { | |
337 | - return; | |
338 | - } | |
339 | - | |
340 | - // кабинет - редактор работодатели на главной | |
341 | - public function employers_main() { | |
342 | - return; | |
343 | - } | |
344 | - | |
345 | - // кабинет - редактор seo-сайта | |
346 | - public function editor_seo() { | |
347 | - return; | |
348 | - } | |
349 | 326 | |
350 | - // кабинет - редактор страниц | |
351 | - public function editor_pages() { | |
352 | - return; | |
353 | - } | |
354 | - | |
355 | - // кабинет - реклама сайта | |
356 | - public function reclames() { | |
357 | - return; | |
358 | - } | |
359 | 327 | } |
app/Http/Controllers/Admin/CompanyController.php
... | ... | @@ -7,5 +7,38 @@ use Illuminate\Http\Request; |
7 | 7 | |
8 | 8 | class CompanyController extends Controller |
9 | 9 | { |
10 | - // | |
10 | + // кабинет - редактор сайта | |
11 | + public function editor() { | |
12 | + return; | |
13 | + } | |
14 | + | |
15 | + // кабинет - редактор шапки-футера сайта | |
16 | + public function editblocks() { | |
17 | + return; | |
18 | + } | |
19 | + | |
20 | + // кабинет - редактор должности на главной | |
21 | + public function job_titles_main() { | |
22 | + return; | |
23 | + } | |
24 | + | |
25 | + // кабинет - редактор работодатели на главной | |
26 | + public function employers_main() { | |
27 | + return; | |
28 | + } | |
29 | + | |
30 | + // кабинет - редактор seo-сайта | |
31 | + public function editor_seo() { | |
32 | + return; | |
33 | + } | |
34 | + | |
35 | + // кабинет - редактор страниц | |
36 | + public function editor_pages() { | |
37 | + return; | |
38 | + } | |
39 | + | |
40 | + // кабинет - реклама сайта | |
41 | + public function reclames() { | |
42 | + return; | |
43 | + } | |
11 | 44 | } |
app/Http/Controllers/Admin/EmployersController.php
... | ... | @@ -87,4 +87,16 @@ class EmployersController extends Controller |
87 | 87 | ->with('success', 'Данные были успешно сохранены'); |
88 | 88 | } |
89 | 89 | } |
90 | + | |
91 | + // кабинет - отзывы о работодателе для модерации | |
92 | + public function answers() { | |
93 | + return; | |
94 | + } | |
95 | + | |
96 | + // кабинет - статистика вакансий работодателя | |
97 | + public function static_ads() { | |
98 | + return; | |
99 | + } | |
100 | + | |
101 | + | |
90 | 102 | } |
app/Http/Controllers/Admin/UsersController.php
... | ... | @@ -5,12 +5,13 @@ namespace App\Http\Controllers\Admin; |
5 | 5 | use App\Http\Controllers\Controller; |
6 | 6 | use App\Models\User; |
7 | 7 | use Illuminate\Http\Request; |
8 | +use Illuminate\Support\Facades\Auth; | |
8 | 9 | |
9 | 10 | class UsersController extends Controller |
10 | 11 | { |
11 | 12 | public function index(Request $request) { |
12 | 13 | $title = 'Админка - Пользователи системы'; |
13 | - | |
14 | + $id_admin = Auth::user()->id; | |
14 | 15 | if ($request->ajax()) { |
15 | 16 | $user = User::find($request->id); |
16 | 17 | $request->offsetUnset('id'); |
... | ... | @@ -20,10 +21,13 @@ class UsersController extends Controller |
20 | 21 | $users = User::query()->paginate(15); |
21 | 22 | |
22 | 23 | if ($request->ajax()) { |
23 | - return view('admin.users.index_ajax', compact('users')); | |
24 | + return view('admin.users.index_ajax', compact('users', 'id_admin')); | |
24 | 25 | } else { |
25 | - return view('admin.users.index', compact('users', 'title')); | |
26 | + return view('admin.users.index', compact('users', 'title', 'id_admin')); | |
26 | 27 | } |
27 | 28 | } |
28 | 29 | |
30 | + public function roles() { | |
31 | + return; | |
32 | + } | |
29 | 33 | } |
app/Http/Controllers/Admin/WorkersController.php
... | ... | @@ -28,4 +28,14 @@ class WorkersController extends Controller |
28 | 28 | public function form_update_worker(Worker $worker) { |
29 | 29 | return view('admin.worker.edit'); |
30 | 30 | } |
31 | + | |
32 | + // кабинет - статистика работников | |
33 | + public function static_workers() { | |
34 | + return; | |
35 | + } | |
36 | + | |
37 | + // кабинет - справочник - блоки информации для резюме работника | |
38 | + public function infobloks() { | |
39 | + return; | |
40 | + } | |
31 | 41 | } |
app/Models/Ad_employer.php
... | ... | @@ -8,4 +8,11 @@ use Illuminate\Database\Eloquent\Model; |
8 | 8 | class Ad_employer extends Model |
9 | 9 | { |
10 | 10 | use HasFactory; |
11 | + | |
12 | + /* | |
13 | + * Связь таблицы employers с таблицей ad_employers | |
14 | + */ | |
15 | + public function employer() { | |
16 | + return $this->belongsTo(Employer::class, 'employer_id'); | |
17 | + } | |
11 | 18 | } |
public/assets/js/init-alpine.js
resources/views/admin/ad_employers/index.blade.php
... | ... | @@ -0,0 +1,87 @@ |
1 | +@extends('layout.admin', ['title' => 'Админка - Работодатели']) | |
2 | + | |
3 | +@section('script') | |
4 | +@endsection | |
5 | + | |
6 | +@section('search') | |
7 | + <div class="absolute inset-y-0 flex items-center pl-2"> | |
8 | + <svg | |
9 | + class="w-4 h-4" | |
10 | + aria-hidden="true" | |
11 | + fill="currentColor" | |
12 | + viewBox="0 0 20 20" | |
13 | + > | |
14 | + <path | |
15 | + fill-rule="evenodd" | |
16 | + d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | |
17 | + clip-rule="evenodd" | |
18 | + ></path> | |
19 | + </svg> | |
20 | + </div> | |
21 | + <form action="" method="POST"> | |
22 | + <div style="float:left;"><input | |
23 | + class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | |
24 | + style="width: 400px" | |
25 | + type="text" | |
26 | + placeholder="Искать..." | |
27 | + aria-label="Search" | |
28 | + /></div> | |
29 | + <div style="float: left"> | |
30 | + <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | |
31 | + </div> | |
32 | + </form> | |
33 | +@endsection | |
34 | + | |
35 | +@section('content') | |
36 | + <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | |
37 | + <div class="w-full overflow-x-auto"> | |
38 | + <table class="w-full whitespace-no-wrap"> | |
39 | + <thead> | |
40 | + <tr | |
41 | + 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" | |
42 | + > | |
43 | + <th class="px-4 py-3">№</th> | |
44 | + <th class="px-4 py-3">Название компании</th> | |
45 | + <th class="px-4 py-3">Вакансии</th> | |
46 | + <th class="px-4 py-3">Город</th> | |
47 | + <th class="px-4 py-3">Дата</th> | |
48 | + </tr> | |
49 | + </thead> | |
50 | + <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | |
51 | + @foreach($ad_employers as $ad) | |
52 | + <tr class="text-gray-700 dark:text-gray-400"> | |
53 | + <td class="px-4 py-3"> | |
54 | + {{$ad->id}} | |
55 | + </td> | |
56 | + <td class="px-4 py-3"> | |
57 | + {{$ad->employers->name_company}} | |
58 | + </td> | |
59 | + <td class="px-4 py-3"> | |
60 | + <div class="flex items-center text-sm"> | |
61 | + <div> | |
62 | + | |
63 | + <p class="font-semibold"></p> | |
64 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
65 | + </p> | |
66 | + | |
67 | + </div> | |
68 | + </div> | |
69 | + | |
70 | + </td> | |
71 | + <td class="px-4 py-3 text-sm"> | |
72 | + {{ $ad->city }} | |
73 | + </td> | |
74 | + <td class="px-4 py-3 text-sm"> | |
75 | + {{ $ad->created_at }} | |
76 | + </td> | |
77 | + </tr> | |
78 | + @endforeach | |
79 | + </tbody> | |
80 | + </table> | |
81 | + </div> | |
82 | + | |
83 | + <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"> | |
84 | + <?=$ad->appends($_GET)->links('admin.pagginate'); ?> | |
85 | + </div> | |
86 | + </div> | |
87 | +@endsection |
resources/views/admin/category/index.blade.php
... | ... | @@ -38,6 +38,35 @@ |
38 | 38 | </script> |
39 | 39 | @endsection |
40 | 40 | |
41 | +@section('search') | |
42 | + <div class="absolute inset-y-0 flex items-center pl-2"> | |
43 | + <svg | |
44 | + class="w-4 h-4" | |
45 | + aria-hidden="true" | |
46 | + fill="currentColor" | |
47 | + viewBox="0 0 20 20" | |
48 | + > | |
49 | + <path | |
50 | + fill-rule="evenodd" | |
51 | + d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | |
52 | + clip-rule="evenodd" | |
53 | + ></path> | |
54 | + </svg> | |
55 | + </div> | |
56 | + <form action="" method="POST"> | |
57 | + <div style="float:left;"><input | |
58 | + class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | |
59 | + style="width: 400px" | |
60 | + type="text" | |
61 | + placeholder="Искать..." | |
62 | + aria-label="Search" | |
63 | + /></div> | |
64 | + <div style="float: left"> | |
65 | + <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | |
66 | + </div> | |
67 | + </form> | |
68 | +@endsection | |
69 | + | |
41 | 70 | @section('content') |
42 | 71 | |
43 | 72 | <a href="{{ route('admin.categories.create') }}" style="width: 210px" class="px-5 py-3 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"> |
resources/views/admin/employer/index.blade.php
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | success: function (data) { |
23 | 23 | console.log('Обновление таблицы пользователей '); |
24 | 24 | //data = JSON.parse(data); |
25 | - console.log(data); | |
25 | + //console.log(data); | |
26 | 26 | ajax_block.html(data); |
27 | 27 | }, |
28 | 28 | headers: { |
... | ... | @@ -38,6 +38,35 @@ |
38 | 38 | </script> |
39 | 39 | @endsection |
40 | 40 | |
41 | +@section('search') | |
42 | + <div class="absolute inset-y-0 flex items-center pl-2"> | |
43 | + <svg | |
44 | + class="w-4 h-4" | |
45 | + aria-hidden="true" | |
46 | + fill="currentColor" | |
47 | + viewBox="0 0 20 20" | |
48 | + > | |
49 | + <path | |
50 | + fill-rule="evenodd" | |
51 | + d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | |
52 | + clip-rule="evenodd" | |
53 | + ></path> | |
54 | + </svg> | |
55 | + </div> | |
56 | + <form action="" method="POST"> | |
57 | + <div style="float:left;"><input | |
58 | + class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | |
59 | + style="width: 400px" | |
60 | + type="text" | |
61 | + placeholder="Искать..." | |
62 | + aria-label="Search" | |
63 | + /></div> | |
64 | + <div style="float: left"> | |
65 | + <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | |
66 | + </div> | |
67 | + </form> | |
68 | +@endsection | |
69 | + | |
41 | 70 | @section('content') |
42 | 71 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
43 | 72 | <div class="w-full overflow-x-auto"> |
resources/views/admin/employer/index_ajax.blade.php
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | <th class="px-4 py-3">Имя</th> |
11 | 11 | <th class="px-4 py-3">Дата регистрации</th> |
12 | 12 | <th class="px-4 py-3">Изменить</th> |
13 | - <th class="px-4 py-3">Блокировать</th> | |
13 | + <th class="px-4 py-3">Бан</th> | |
14 | 14 | </tr> |
15 | 15 | </thead> |
16 | 16 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
... | ... | @@ -46,10 +46,14 @@ |
46 | 46 | {{ $user->created_at }} |
47 | 47 | </td> |
48 | 48 | <td class="px-4 py-3 text-sm"> |
49 | - <a href="">Изменить</a> | |
49 | + @if ($user->id > 1) | |
50 | + <a href="{{ route('admin.user-profile', ['user' => $user->id]) }}">Изменить</a> | |
51 | + @endif | |
50 | 52 | </td> |
51 | 53 | <td class="px-4 py-3 text-sm"> |
52 | - <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
54 | + @if ($user->id > 1) | |
55 | + <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
56 | + @endif | |
53 | 57 | </td> |
54 | 58 | </tr> |
55 | 59 | @endforeach |
resources/views/admin/index.blade.php
... | ... | @@ -243,7 +243,7 @@ |
243 | 243 | <div> |
244 | 244 | <p class="font-semibold"><a href="{{ route('admin.job-titles') }}">Должности</a></p> |
245 | 245 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
246 | - Все должности | |
246 | + Справочник должности (все должности проекта) | |
247 | 247 | </p> |
248 | 248 | </div> |
249 | 249 | </div> |
... | ... | @@ -268,6 +268,33 @@ |
268 | 268 | <div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true"></div> |
269 | 269 | </div> |
270 | 270 | <div> |
271 | + <p class="font-semibold"><a href="{{ route('admin.infobloks') }}">Документы-Дипломы</a></p> | |
272 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
273 | + Справочник документы-дипломы (все блоки-документы необходимые соискателю) | |
274 | + </p> | |
275 | + </div> | |
276 | + </div> | |
277 | + </td> | |
278 | + <td class="px-4 py-3 text-sm"> | |
279 | + infobloks | |
280 | + </td> | |
281 | + <td class="px-4 py-3 text-xs"> | |
282 | + <span 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"> | |
283 | + Доступно | |
284 | + </span> | |
285 | + </td> | |
286 | + <td class="px-4 py-3 text-sm"> | |
287 | + сентябрь 2023 | |
288 | + </td> | |
289 | + </tr> | |
290 | + | |
291 | + <tr class="text-gray-700 dark:text-gray-400"> | |
292 | + <td class="px-4 py-3"> | |
293 | + <div class="flex items-center text-sm"> | |
294 | + <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | |
295 | + <div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true"></div> | |
296 | + </div> | |
297 | + <div> | |
271 | 298 | <p class="font-semibold"><a href="{{ route('admin.messages') }}">Сообщения</a></p> |
272 | 299 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
273 | 300 | Все сообщения сайта |
... | ... | @@ -315,7 +342,86 @@ |
315 | 342 | </td> |
316 | 343 | </tr> |
317 | 344 | |
345 | + <tr class="text-gray-700 dark:text-gray-400"> | |
346 | + <td class="px-4 py-3"> | |
347 | + <div class="flex items-center text-sm"> | |
348 | + <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | |
349 | + <div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true"></div> | |
350 | + </div> | |
351 | + <div> | |
352 | + <p class="font-semibold"><a href="{{ route('admin.roles') }}">Роли пользователей</a></p> | |
353 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
354 | + Роли людей (запреты и доступы) в системе | |
355 | + </p> | |
356 | + </div> | |
357 | + </div> | |
358 | + </td> | |
359 | + <td class="px-4 py-3 text-sm"> | |
360 | + users | |
361 | + </td> | |
362 | + <td class="px-4 py-3 text-xs"> | |
363 | + <span 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"> | |
364 | + Доступно | |
365 | + </span> | |
366 | + </td> | |
367 | + <td class="px-4 py-3 text-sm"> | |
368 | + сентябрь 2023 | |
369 | + </td> | |
370 | + </tr> | |
318 | 371 | |
372 | + <tr class="text-gray-700 dark:text-gray-400"> | |
373 | + <td class="px-4 py-3"> | |
374 | + <div class="flex items-center text-sm"> | |
375 | + <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | |
376 | + <div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true"></div> | |
377 | + </div> | |
378 | + <div> | |
379 | + <p class="font-semibold"><a href="{{ route('admin.statics') }}">Статистика</a></p> | |
380 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
381 | + Статистика соискателей и работодателей | |
382 | + </p> | |
383 | + </div> | |
384 | + </div> | |
385 | + </td> | |
386 | + <td class="px-4 py-3 text-sm"> | |
387 | + static_workers, static_ads | |
388 | + </td> | |
389 | + <td class="px-4 py-3 text-xs"> | |
390 | + <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | |
391 | + Недоступно | |
392 | + </span> | |
393 | + </td> | |
394 | + <td class="px-4 py-3 text-sm"> | |
395 | + сентябрь 2023 | |
396 | + </td> | |
397 | + </tr> | |
398 | + | |
399 | + <tr class="text-gray-700 dark:text-gray-400"> | |
400 | + <td class="px-4 py-3"> | |
401 | + <div class="flex items-center text-sm"> | |
402 | + <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | |
403 | + <div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true"></div> | |
404 | + </div> | |
405 | + <div> | |
406 | + <p class="font-semibold"><a href="{{ route('admin.editor-site') }}">Редактор сайта</a></p> | |
407 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
408 | + Все редакторы системы | |
409 | + </p> | |
410 | + </div> | |
411 | + </div> | |
412 | + </td> | |
413 | + <td class="px-4 py-3 text-sm"> | |
414 | + header_footer, job_titles_mains, employers_mains,<br> pages, seo, reclames, companies | |
415 | + </td> | |
416 | + <td class="px-4 py-3 text-xs"> | |
417 | + <span 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"> | |
418 | + Доступно | |
419 | + </span> | |
420 | + </td> | |
421 | + <td class="px-4 py-3 text-sm"> | |
422 | + сентябрь 2023 | |
423 | + </td> | |
424 | + </tr> | |
319 | 425 | |
320 | 426 | <!--<tr class="text-gray-700 dark:text-gray-400"> |
321 | 427 | <td class="px-4 py-3"> |
resources/views/admin/static/index.blade.php
resources/views/admin/users/index.blade.php
... | ... | @@ -3,57 +3,31 @@ |
3 | 3 | @section('script') |
4 | 4 | <script> |
5 | 5 | $(document).ready(function() { |
6 | - $(document).on('click', '.checkban', function () { | |
6 | + $(document).on('click', '.check_click', function () { | |
7 | 7 | var this_ = $(this); |
8 | 8 | var value = this_.val(); |
9 | + var field = this_.attr('data-field'); | |
9 | 10 | var ajax_block = $('#ajax_block'); |
10 | 11 | var bool = 0; |
12 | + var str_get = ''; | |
11 | 13 | |
12 | 14 | if(this.checked){ |
13 | 15 | bool = 1; |
14 | 16 | } else { |
15 | 17 | bool = 0; |
16 | 18 | } |
19 | + console.log(field); | |
20 | + str_get = "id=" + value + "&" + field + "=" + bool; | |
21 | + console.log(str_get); | |
17 | 22 | |
18 | 23 | $.ajax({ |
19 | 24 | type: "GET", |
20 | 25 | url: "{{ url()->full()}}", |
21 | - data: "id=" + value + "&is_ban=" + bool, | |
26 | + data: str_get, | |
22 | 27 | success: function (data) { |
23 | 28 | console.log('Обновление таблицы пользователей '); |
24 | 29 | //data = JSON.parse(data); |
25 | - console.log(data); | |
26 | - ajax_block.html(data); | |
27 | - }, | |
28 | - headers: { | |
29 | - 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | |
30 | - }, | |
31 | - error: function (data) { | |
32 | - console.log('Error: ' + data); | |
33 | - } | |
34 | - }); | |
35 | - }); | |
36 | - | |
37 | - $(document).on('click', '.checknew', function () { | |
38 | - var this_ = $(this); | |
39 | - var value = this_.val(); | |
40 | - var ajax_block = $('#ajax_block'); | |
41 | - var bool = 0; | |
42 | - | |
43 | - if(this.checked){ | |
44 | - bool = 1; | |
45 | - } else { | |
46 | - bool = 0; | |
47 | - } | |
48 | - | |
49 | - $.ajax({ | |
50 | - type: "GET", | |
51 | - url: "{{ url()->full()}}", | |
52 | - data: "id=" + value + "&is_new=" + bool, | |
53 | - success: function (data) { | |
54 | - console.log('Обновление таблицы пользователей '); | |
55 | - //data = JSON.parse(data); | |
56 | - console.log(data); | |
30 | + //console.log(data); | |
57 | 31 | ajax_block.html(data); |
58 | 32 | }, |
59 | 33 | headers: { |
... | ... | @@ -68,6 +42,35 @@ |
68 | 42 | </script> |
69 | 43 | @endsection |
70 | 44 | |
45 | +@section('search') | |
46 | + <div class="absolute inset-y-0 flex items-center pl-2"> | |
47 | + <svg | |
48 | + class="w-4 h-4" | |
49 | + aria-hidden="true" | |
50 | + fill="currentColor" | |
51 | + viewBox="0 0 20 20" | |
52 | + > | |
53 | + <path | |
54 | + fill-rule="evenodd" | |
55 | + d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | |
56 | + clip-rule="evenodd" | |
57 | + ></path> | |
58 | + </svg> | |
59 | + </div> | |
60 | + <form action="" method="POST"> | |
61 | + <div style="float:left;"><input | |
62 | + class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | |
63 | + style="width: 400px" | |
64 | + type="text" | |
65 | + placeholder="Искать..." | |
66 | + aria-label="Search" | |
67 | + /></div> | |
68 | + <div style="float: left"> | |
69 | + <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | |
70 | + </div> | |
71 | + </form> | |
72 | +@endsection | |
73 | + | |
71 | 74 | @section('content') |
72 | 75 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
73 | 76 | <div class="w-full overflow-x-auto"> |
... | ... | @@ -82,6 +85,9 @@ |
82 | 85 | <th class="px-4 py-3">Работодатель/работник/администратор</th> |
83 | 86 | <th class="px-4 py-3">Бан</th> |
84 | 87 | <th class="px-4 py-3">Новый</th> |
88 | + @if ($id_admin == 1) | |
89 | + <th class="px-4 py-3">Админ</th> | |
90 | + @endif | |
85 | 91 | <th class="px-4 py-3">Дата регистрации</th> |
86 | 92 | </tr> |
87 | 93 | </thead> |
... | ... | @@ -128,12 +134,22 @@ |
128 | 134 | </td> |
129 | 135 | <td class="px-4 py-3 text-sm"> |
130 | 136 | @if ($user->id > 1) |
131 | - <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
137 | + <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_ban" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
132 | 138 | @endif |
133 | 139 | </td> |
140 | + | |
134 | 141 | <td class="px-4 py-3 text-sm"> |
135 | - <input type="checkbox" class="checknew" value="{{$user->id}}" name="new_{{$user->id}}" {{ ($user->is_new) ? "checked" : "" }}/> | |
142 | + <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_new" name="new_{{$user->id}}" {{ ($user->is_new) ? "checked" : "" }}/> | |
136 | 143 | </td> |
144 | + | |
145 | + @if ($id_admin == 1) | |
146 | + <td class="px-4 py-3 text-sm"> | |
147 | + @if ($user->id > 1) | |
148 | + <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="admin" name="admin_{{$user->id}}" {{ ($user->admin) ? "checked" : "" }}/> | |
149 | + @endif | |
150 | + </td> | |
151 | + @endif | |
152 | + | |
137 | 153 | <td class="px-4 py-3 text-sm"> |
138 | 154 | {{ $user->created_at }} |
139 | 155 | </td> |
resources/views/admin/users/index_ajax.blade.php
... | ... | @@ -8,8 +8,11 @@ |
8 | 8 | <th class="px-4 py-3">Имя</th> |
9 | 9 | <th class="px-4 py-3">Email/логин</th> |
10 | 10 | <th class="px-4 py-3">Работодатель/работник/администратор</th> |
11 | - <th class="px-4 py-3">Заблокированный</th> | |
11 | + <th class="px-4 py-3">Бан</th> | |
12 | 12 | <th class="px-4 py-3">Новый</th> |
13 | + @if ($id_admin == 1) | |
14 | + <th class="px-4 py-3">Админ</th> | |
15 | + @endif | |
13 | 16 | <th class="px-4 py-3">Дата регистрации</th> |
14 | 17 | </tr> |
15 | 18 | </thead> |
... | ... | @@ -41,12 +44,21 @@ |
41 | 44 | </td> |
42 | 45 | <td class="px-4 py-3 text-sm"> |
43 | 46 | @if ($user->id > 1) |
44 | - <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
47 | + <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_ban" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
45 | 48 | @endif |
46 | 49 | </td> |
47 | 50 | <td class="px-4 py-3 text-sm"> |
48 | - <input type="checkbox" class="checknew" value="{{$user->id}}" name="new_{{$user->id}}" {{ ($user->is_new) ? "checked" : "" }}/> | |
51 | + <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_new" name="new_{{$user->id}}" {{ ($user->is_new) ? "checked" : "" }}/> | |
49 | 52 | </td> |
53 | + | |
54 | + @if ($id_admin == 1) | |
55 | + <td class="px-4 py-3 text-sm"> | |
56 | + @if ($user->id > 1) | |
57 | + <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="admin" name="admin_{{$user->id}}" {{ ($user->admin) ? "checked" : "" }}/> | |
58 | + @endif | |
59 | + </td> | |
60 | + @endif | |
61 | + | |
50 | 62 | <td class="px-4 py-3 text-sm"> |
51 | 63 | {{ $user->created_at }} |
52 | 64 | </td> |
resources/views/admin/worker/index.blade.php
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | url: "{{ url()->full()}}", |
21 | 21 | data: "id=" + value + "&is_ban=" + bool, |
22 | 22 | success: function (data) { |
23 | - console.log('Обновление таблицы пользователей '); | |
23 | + console.log('Обновление таблицы работников '); | |
24 | 24 | //data = JSON.parse(data); |
25 | 25 | console.log(data); |
26 | 26 | ajax_block.html(data); |
... | ... | @@ -38,8 +38,37 @@ |
38 | 38 | </script> |
39 | 39 | @endsection |
40 | 40 | |
41 | +@section('search') | |
42 | + <div class="absolute inset-y-0 flex items-center pl-2"> | |
43 | + <svg | |
44 | + class="w-4 h-4" | |
45 | + aria-hidden="true" | |
46 | + fill="currentColor" | |
47 | + viewBox="0 0 20 20" | |
48 | + > | |
49 | + <path | |
50 | + fill-rule="evenodd" | |
51 | + d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | |
52 | + clip-rule="evenodd" | |
53 | + ></path> | |
54 | + </svg> | |
55 | + </div> | |
56 | + <form action="" method="POST"> | |
57 | + <div style="float:left;"><input | |
58 | + class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | |
59 | + style="width: 400px" | |
60 | + type="text" | |
61 | + placeholder="Искать..." | |
62 | + aria-label="Search" | |
63 | + /></div> | |
64 | + <div style="float: left"> | |
65 | + <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | |
66 | + </div> | |
67 | + </form> | |
68 | +@endsection | |
69 | + | |
41 | 70 | @section('content') |
42 | - <div class="w-full overflow-hidden rounded-lg shadow-xs"> | |
71 | + <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | |
43 | 72 | <div class="w-full overflow-x-auto"> |
44 | 73 | <table class="w-full whitespace-no-wrap"> |
45 | 74 | <thead> |
resources/views/admin/worker/index_ajax.blade.php
1 | -@extends('layout.admin', ['title' => 'Админка - Работники']) | |
2 | - | |
3 | -@section('content') | |
4 | - <div class="w-full overflow-hidden rounded-lg shadow-xs"> | |
5 | - <div class="w-full overflow-x-auto"> | |
6 | - <table class="w-full whitespace-no-wrap"> | |
7 | - <thead> | |
8 | - <tr | |
9 | - 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" | |
10 | - > | |
11 | - <th class="px-4 py-3">№</th> | |
12 | - <th class="px-4 py-3">Имя</th> | |
13 | - <th class="px-4 py-3">Email/логин</th> | |
14 | - <th class="px-4 py-3">Работодатель/работник</th> | |
15 | - <th class="px-4 py-3">Дата регистрации</th> | |
16 | - </tr> | |
17 | - </thead> | |
18 | - <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | |
19 | - @foreach($users as $user) | |
20 | - <tr class="text-gray-700 dark:text-gray-400"> | |
21 | - <td class="px-4 py-3"> | |
22 | - {{$user->id}} | |
23 | - </td> | |
24 | - <td class="px-4 py-3"> | |
25 | - <!--<div class="flex items-center text-sm"> | |
26 | - <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | |
27 | - <div | |
28 | - class="absolute inset-0 rounded-full shadow-inner" | |
29 | - aria-hidden="true" | |
30 | - ></div> | |
31 | - </div> | |
32 | - <div> | |
33 | - <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> | |
34 | - <p class="text-xs text-gray-600 dark:text-gray-400"> | |
35 | - Все пользователи сайта | |
36 | - </p> | |
37 | - </div> | |
38 | - </div> | |
39 | - --> | |
40 | - {{ $user->name }} | |
41 | - </td> | |
42 | - <td class="px-4 py-3 text-sm"> | |
43 | - {{ $user->email }} | |
44 | - </td> | |
45 | - <td class="px-4 py-3 text-xs"> | |
46 | - <span 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"> | |
47 | - @if ($user->is_worker) | |
48 | - Работник | |
49 | - @else | |
50 | - Работодатель | |
51 | - @endif | |
52 | - </span> | |
53 | - @if ($user->admin) | |
54 | - <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | |
55 | - Администратор | |
56 | - </span> | |
57 | - @endif | |
58 | - </td> | |
59 | - <td class="px-4 py-3 text-sm"> | |
60 | - {{ $user->created_at }} | |
61 | - </td> | |
62 | - </tr> | |
63 | - @endforeach | |
64 | - </tbody> | |
65 | - </table> | |
66 | - </div> | |
67 | - | |
68 | - <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"> | |
69 | - <?=$users->appends($_GET)->links('admin.pagginate'); ?> | |
70 | - </div> | |
71 | - | |
72 | - | |
73 | - <!--<div | |
74 | - 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" | |
1 | +<div class="w-full overflow-x-auto"> | |
2 | + <table class="w-full whitespace-no-wrap"> | |
3 | + <thead> | |
4 | + <tr | |
5 | + 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" | |
75 | 6 | > |
76 | - <span class="flex items-center col-span-3"> | |
77 | - Showing 21-30 of 100 | |
78 | - </span> | |
79 | - <span class="col-span-2"></span> | |
80 | - | |
81 | - <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | |
82 | - <nav aria-label="Table navigation"> | |
83 | - <ul class="inline-flex items-center"> | |
84 | - <li> | |
85 | - <button | |
86 | - class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | |
87 | - aria-label="Previous" | |
88 | - > | |
89 | - <svg | |
90 | - aria-hidden="true" | |
91 | - class="w-4 h-4 fill-current" | |
92 | - viewBox="0 0 20 20" | |
93 | - > | |
94 | - <path | |
95 | - 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" | |
96 | - clip-rule="evenodd" | |
97 | - fill-rule="evenodd" | |
98 | - ></path> | |
99 | - </svg> | |
100 | - </button> | |
101 | - </li> | |
102 | - <li> | |
103 | - <button | |
104 | - class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | |
105 | - > | |
106 | - 1 | |
107 | - </button> | |
108 | - </li> | |
109 | - <li> | |
110 | - <button | |
111 | - class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | |
112 | - > | |
113 | - 2 | |
114 | - </button> | |
115 | - </li> | |
116 | - <li> | |
117 | - <button | |
118 | - 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" | |
119 | - > | |
120 | - 3 | |
121 | - </button> | |
122 | - </li> | |
123 | - <li> | |
124 | - <button | |
125 | - class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | |
126 | - > | |
127 | - 4 | |
128 | - </button> | |
129 | - </li> | |
130 | - <li> | |
131 | - <span class="px-3 py-1">...</span> | |
132 | - </li> | |
133 | - <li> | |
134 | - <button | |
135 | - class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | |
136 | - > | |
137 | - 8 | |
138 | - </button> | |
139 | - </li> | |
140 | - <li> | |
141 | - <button | |
142 | - class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | |
143 | - > | |
144 | - 9 | |
145 | - </button> | |
146 | - </li> | |
147 | - <li> | |
148 | - <button | |
149 | - class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | |
150 | - aria-label="Next" | |
151 | - > | |
152 | - <svg | |
153 | - class="w-4 h-4 fill-current" | |
154 | - aria-hidden="true" | |
155 | - viewBox="0 0 20 20" | |
156 | - > | |
157 | - <path | |
158 | - 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" | |
159 | - clip-rule="evenodd" | |
160 | - fill-rule="evenodd" | |
161 | - ></path> | |
162 | - </svg> | |
163 | - </button> | |
164 | - </li> | |
165 | - </ul> | |
166 | - </nav> | |
167 | - </span> | |
168 | - </div>--> | |
169 | - </div> | |
170 | - | |
171 | - <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | |
172 | - | |
7 | + <th class="px-4 py-3">№</th> | |
8 | + <th class="px-4 py-3">Имя</th> | |
9 | + <th class="px-4 py-3">Email/Телефон</th> | |
10 | + <th class="px-4 py-3">% заполнения анкеты</th> | |
11 | + <th class="px-4 py-3">Дата регистрации</th> | |
12 | + <th class="px-4 py-3">Изменить</th> | |
13 | + <th class="px-4 py-3">Бан</th> | |
14 | + </tr> | |
15 | + </thead> | |
16 | + <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | |
17 | + @foreach($users as $user) | |
18 | + <tr class="text-gray-700 dark:text-gray-400"> | |
19 | + <td class="px-4 py-3"> | |
20 | + {{$user->id}} | |
21 | + </td> | |
22 | + <td class="px-4 py-3"> | |
23 | + {{ !empty($user->name_man) ? $user->name_man : $user->name }} | |
24 | + </td> | |
25 | + <td class="px-4 py-3 text-sm"> | |
26 | + <div class="flex items-center text-sm"> | |
27 | + <div> | |
28 | + <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p> | |
29 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
30 | + {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }} | |
31 | + </p> | |
32 | + </div> | |
33 | + </div> | |
34 | + </td> | |
35 | + <td class="px-4 py-3 text-xs"> | |
36 | + @if (!empty($user->workers->persent_anketa)) | |
37 | + @if ($user->workers->persent_anketa > 40) | |
38 | + <span 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"> | |
39 | + {{$user->workers->persent_anketa}}% | |
40 | + </span> | |
41 | + @else | |
42 | + <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | |
43 | + {{$user->workers->persent_anketa}}% | |
44 | + </span> | |
45 | + @endif | |
46 | + @else | |
47 | + <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | |
48 | + 10% | |
49 | + </span> | |
50 | + @endif | |
51 | + </td> | |
52 | + <td class="px-4 py-3 text-sm"> | |
53 | + {{ $user->created_at }} | |
54 | + </td> | |
55 | + <td class="px-4 py-3 text-sm"> | |
56 | + @if ($user->id > 1) | |
57 | + <a href="{{ route('admin.user-profile', ['user' => $user->id]) }}">Изменить</a> | |
58 | + @endif | |
59 | + </td> | |
60 | + <td class="px-4 py-3 text-sm"> | |
61 | + @if ($user->id > 1) | |
62 | + <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | |
63 | + @endif | |
64 | + </td> | |
65 | + </tr> | |
66 | + @endforeach | |
67 | + </tbody> | |
68 | + </table> | |
69 | +</div> | |
173 | 70 | |
174 | -@endsection | |
71 | +<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"> | |
72 | + <?=$users->appends($_GET)->links('admin.pagginate'); ?> | |
73 | +</div> |
resources/views/layout/admin.blade.php
... | ... | @@ -149,10 +149,11 @@ |
149 | 149 | <span class="ml-4">Вакансии</span> |
150 | 150 | </a> |
151 | 151 | </li> |
152 | + | |
152 | 153 | <li class="relative px-6 py-3"> |
153 | 154 | <a |
154 | 155 | class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" |
155 | - href="{{ route('admin.categories.index') }}" | |
156 | + href="{{ route('admin.messages') }}" | |
156 | 157 | > |
157 | 158 | <svg |
158 | 159 | class="w-5 h-5" |
... | ... | @@ -164,17 +165,15 @@ |
164 | 165 | viewBox="0 0 24 24" |
165 | 166 | stroke="currentColor" |
166 | 167 | > |
167 | - <path | |
168 | - d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" | |
169 | - ></path> | |
168 | + <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | |
170 | 169 | </svg> |
171 | - <span class="ml-4">Категории</span> | |
170 | + <span class="ml-4">Сообщения</span> | |
172 | 171 | </a> |
173 | 172 | </li> |
174 | 173 | <li class="relative px-6 py-3"> |
175 | 174 | <a |
176 | 175 | class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" |
177 | - href="{{ route('admin.job-titles') }}" | |
176 | + href="{{ route('admin.groups') }}" | |
178 | 177 | > |
179 | 178 | <svg |
180 | 179 | class="w-5 h-5" |
... | ... | @@ -186,16 +185,16 @@ |
186 | 185 | viewBox="0 0 24 24" |
187 | 186 | stroke="currentColor" |
188 | 187 | > |
189 | - <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | |
188 | + <path | |
189 | + 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" | |
190 | + ></path> | |
190 | 191 | </svg> |
191 | - <span class="ml-4">Должности</span> | |
192 | + <span class="ml-4">Группы пользователей</span> | |
192 | 193 | </a> |
193 | 194 | </li> |
194 | 195 | <li class="relative px-6 py-3"> |
195 | - <a | |
196 | - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
197 | - href="{{ route('admin.messages') }}" | |
198 | - > | |
196 | + <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" | |
197 | + href="{{ route('admin.roles') }}"> | |
199 | 198 | <svg |
200 | 199 | class="w-5 h-5" |
201 | 200 | aria-hidden="true" |
... | ... | @@ -206,15 +205,17 @@ |
206 | 205 | viewBox="0 0 24 24" |
207 | 206 | stroke="currentColor" |
208 | 207 | > |
209 | - <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | |
208 | + <path | |
209 | + 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" | |
210 | + ></path> | |
210 | 211 | </svg> |
211 | - <span class="ml-4">Сообщения</span> | |
212 | + <span class="ml-4">Роли пользователей</span> | |
212 | 213 | </a> |
213 | 214 | </li> |
214 | 215 | <li class="relative px-6 py-3"> |
215 | 216 | <a |
216 | 217 | class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" |
217 | - href="{{ route('admin.groups') }}" | |
218 | + href="{{ route('admin.statics') }}" | |
218 | 219 | > |
219 | 220 | <svg |
220 | 221 | class="w-5 h-5" |
... | ... | @@ -227,18 +228,80 @@ |
227 | 228 | stroke="currentColor" |
228 | 229 | > |
229 | 230 | <path |
230 | - 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" | |
231 | + d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" | |
231 | 232 | ></path> |
233 | + <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> | |
232 | 234 | </svg> |
233 | - <span class="ml-4">Группы пользователей</span> | |
235 | + <span class="ml-4">Статистика</span> | |
234 | 236 | </a> |
235 | 237 | </li> |
238 | + <!-- Справочники --> | |
239 | + <li class="relative px-6 py-3" x-data="{ open1: false }"> | |
240 | + <button | |
241 | + 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" | |
242 | + @click="open1=!open1" | |
243 | + aria-haspopup="true"> | |
244 | + <span class="inline-flex items-center"> | |
245 | + <svg | |
246 | + class="w-5 h-5" | |
247 | + aria-hidden="true" | |
248 | + fill="none" | |
249 | + stroke-linecap="round" | |
250 | + stroke-linejoin="round" | |
251 | + stroke-width="2" | |
252 | + viewBox="0 0 24 24" | |
253 | + stroke="currentColor"> | |
254 | + <path | |
255 | + 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" | |
256 | + ></path> | |
257 | + </svg> | |
258 | + <span class="ml-4">Справочники</span> | |
259 | + </span> | |
260 | + <svg | |
261 | + class="w-4 h-4" | |
262 | + aria-hidden="true" | |
263 | + fill="currentColor" | |
264 | + viewBox="0 0 20 20" | |
265 | + > | |
266 | + <path | |
267 | + fill-rule="evenodd" | |
268 | + 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" | |
269 | + clip-rule="evenodd" | |
270 | + ></path> | |
271 | + </svg> | |
272 | + </button> | |
273 | + <template x-if="open1"> | |
274 | + <ul | |
275 | + x-transition:enter="transition-all ease-in-out duration-300" | |
276 | + x-transition:enter-start="opacity-25 max-h-0" | |
277 | + x-transition:enter-end="opacity-100 max-h-xl" | |
278 | + x-transition:leave="transition-all ease-in-out duration-300" | |
279 | + x-transition:leave-start="opacity-100 max-h-xl" | |
280 | + x-transition:leave-end="opacity-0 max-h-0" | |
281 | + 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" | |
282 | + aria-label="submenu" | |
283 | + > | |
284 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
285 | + <a class="w-full" href="{{ route('admin.job-titles') }}">Должности</a> | |
286 | + </li> | |
287 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
288 | + <a class="w-full" href="{{ route('admin.categories.index') }}">Категории</a> | |
289 | + </li> | |
290 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
291 | + <a class="w-full" href="{{ route('admin.infobloks') }}">Блоки-Дипломы</a> | |
292 | + </li> | |
293 | + | |
294 | + </ul> | |
295 | + </template> | |
296 | + </li> | |
297 | + | |
298 | + | |
299 | + <!-- Редактор --> | |
236 | 300 | <li class="relative px-6 py-3"> |
237 | 301 | <button |
238 | 302 | 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" |
239 | 303 | @click="togglePagesMenu" |
240 | - aria-haspopup="true" | |
241 | - > | |
304 | + aria-haspopup="true"> | |
242 | 305 | <span class="inline-flex items-center"> |
243 | 306 | <svg |
244 | 307 | class="w-5 h-5" |
... | ... | @@ -248,8 +311,7 @@ |
248 | 311 | stroke-linejoin="round" |
249 | 312 | stroke-width="2" |
250 | 313 | viewBox="0 0 24 24" |
251 | - stroke="currentColor" | |
252 | - > | |
314 | + stroke="currentColor"> | |
253 | 315 | <path |
254 | 316 | 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" |
255 | 317 | ></path> |
... | ... | @@ -304,6 +366,7 @@ |
304 | 366 | </ul> |
305 | 367 | </template> |
306 | 368 | </li> |
369 | + | |
307 | 370 | </ul> |
308 | 371 | <!--<div class="px-6 my-6"> |
309 | 372 | <button |
... | ... | @@ -465,7 +528,7 @@ |
465 | 528 | <li class="relative px-6 py-3"> |
466 | 529 | <a |
467 | 530 | class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" |
468 | - href="{{ route('admin.categories.index') }}" | |
531 | + href="{{ route('admin.messages') }}" | |
469 | 532 | > |
470 | 533 | <svg |
471 | 534 | class="w-5 h-5" |
... | ... | @@ -477,18 +540,14 @@ |
477 | 540 | viewBox="0 0 24 24" |
478 | 541 | stroke="currentColor" |
479 | 542 | > |
480 | - <path | |
481 | - d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" | |
482 | - ></path> | |
543 | + <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | |
483 | 544 | </svg> |
484 | - <span class="ml-4">Категории</span> | |
545 | + <span class="ml-4">Сообщения</span> | |
485 | 546 | </a> |
486 | 547 | </li> |
487 | 548 | <li class="relative px-6 py-3"> |
488 | - <a | |
489 | - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
490 | - href="{{ route('admin.job-titles') }}" | |
491 | - > | |
549 | + <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" | |
550 | + href="{{ route('admin.groups') }}"> | |
492 | 551 | <svg |
493 | 552 | class="w-5 h-5" |
494 | 553 | aria-hidden="true" |
... | ... | @@ -499,16 +558,16 @@ |
499 | 558 | viewBox="0 0 24 24" |
500 | 559 | stroke="currentColor" |
501 | 560 | > |
502 | - <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | |
561 | + <path | |
562 | + 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" | |
563 | + ></path> | |
503 | 564 | </svg> |
504 | - <span class="ml-4">Должности</span> | |
565 | + <span class="ml-4">Группы пользователей</span> | |
505 | 566 | </a> |
506 | 567 | </li> |
507 | 568 | <li class="relative px-6 py-3"> |
508 | - <a | |
509 | - class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
510 | - href="{{ route('admin.messages') }}" | |
511 | - > | |
569 | + <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" | |
570 | + href="{{ route('admin.roles') }}"> | |
512 | 571 | <svg |
513 | 572 | class="w-5 h-5" |
514 | 573 | aria-hidden="true" |
... | ... | @@ -519,14 +578,18 @@ |
519 | 578 | viewBox="0 0 24 24" |
520 | 579 | stroke="currentColor" |
521 | 580 | > |
522 | - <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | |
581 | + <path | |
582 | + 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" | |
583 | + ></path> | |
523 | 584 | </svg> |
524 | - <span class="ml-4">Сообщения</span> | |
585 | + <span class="ml-4">Роли пользователей</span> | |
525 | 586 | </a> |
526 | 587 | </li> |
527 | 588 | <li class="relative px-6 py-3"> |
528 | - <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" | |
529 | - href="{{ route('admin.groups') }}"> | |
589 | + <a | |
590 | + class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
591 | + href="{{ route('admin.statics') }}" | |
592 | + > | |
530 | 593 | <svg |
531 | 594 | class="w-5 h-5" |
532 | 595 | aria-hidden="true" |
... | ... | @@ -538,12 +601,75 @@ |
538 | 601 | stroke="currentColor" |
539 | 602 | > |
540 | 603 | <path |
541 | - 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" | |
604 | + d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" | |
542 | 605 | ></path> |
606 | + <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> | |
543 | 607 | </svg> |
544 | - <span class="ml-4">Группы пользователей</span> | |
608 | + <span class="ml-4">Статистика</span> | |
545 | 609 | </a> |
546 | 610 | </li> |
611 | + <!-- Справочники --> | |
612 | + <li class="relative px-6 py-3" x-data="{ open2: false }"> | |
613 | + <button | |
614 | + 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" | |
615 | + @click="open2=!open2" | |
616 | + aria-haspopup="true"> | |
617 | + <span class="inline-flex items-center"> | |
618 | + <svg | |
619 | + class="w-5 h-5" | |
620 | + aria-hidden="true" | |
621 | + fill="none" | |
622 | + stroke-linecap="round" | |
623 | + stroke-linejoin="round" | |
624 | + stroke-width="2" | |
625 | + viewBox="0 0 24 24" | |
626 | + stroke="currentColor"> | |
627 | + <path | |
628 | + 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" | |
629 | + ></path> | |
630 | + </svg> | |
631 | + <span class="ml-4">Справочники</span> | |
632 | + </span> | |
633 | + <svg | |
634 | + class="w-4 h-4" | |
635 | + aria-hidden="true" | |
636 | + fill="currentColor" | |
637 | + viewBox="0 0 20 20" | |
638 | + > | |
639 | + <path | |
640 | + fill-rule="evenodd" | |
641 | + 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" | |
642 | + clip-rule="evenodd" | |
643 | + ></path> | |
644 | + </svg> | |
645 | + </button> | |
646 | + <template x-if="open2"> | |
647 | + <ul | |
648 | + x-transition:enter="transition-all ease-in-out duration-300" | |
649 | + x-transition:enter-start="opacity-25 max-h-0" | |
650 | + x-transition:enter-end="opacity-100 max-h-xl" | |
651 | + x-transition:leave="transition-all ease-in-out duration-300" | |
652 | + x-transition:leave-start="opacity-100 max-h-xl" | |
653 | + x-transition:leave-end="opacity-0 max-h-0" | |
654 | + 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" | |
655 | + aria-label="submenu" | |
656 | + > | |
657 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
658 | + <a class="w-full" href="{{ route('admin.job-titles') }}">Должности</a> | |
659 | + </li> | |
660 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
661 | + <a class="w-full" href="{{ route('admin.categories.index') }}">Категории</a> | |
662 | + </li> | |
663 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
664 | + <a class="w-full" href="{{ route('admin.infobloks') }}">Блоки-Дипломы</a> | |
665 | + </li> | |
666 | + | |
667 | + </ul> | |
668 | + </template> | |
669 | + </li> | |
670 | + | |
671 | + | |
672 | + <!-- Редактор --> | |
547 | 673 | <li class="relative px-6 py-3"> |
548 | 674 | <button |
549 | 675 | 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" |
... | ... | @@ -654,26 +780,8 @@ |
654 | 780 | <div |
655 | 781 | class="relative w-full max-w-xl mr-6 focus-within:text-purple-500" |
656 | 782 | > |
657 | - <div class="absolute inset-y-0 flex items-center pl-2"> | |
658 | - <svg | |
659 | - class="w-4 h-4" | |
660 | - aria-hidden="true" | |
661 | - fill="currentColor" | |
662 | - viewBox="0 0 20 20" | |
663 | - > | |
664 | - <path | |
665 | - fill-rule="evenodd" | |
666 | - d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | |
667 | - clip-rule="evenodd" | |
668 | - ></path> | |
669 | - </svg> | |
670 | - </div> | |
671 | - <input | |
672 | - class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | |
673 | - type="text" | |
674 | - placeholder="Искать..." | |
675 | - aria-label="Search" | |
676 | - /> | |
783 | + | |
784 | + @yield('search') | |
677 | 785 | </div> |
678 | 786 | </div> |
679 | 787 | <ul class="flex items-center flex-shrink-0 space-x-6"> |
routes/web.php
... | ... | @@ -11,6 +11,9 @@ use App\Models\User; |
11 | 11 | use App\Http\Controllers\MainController; |
12 | 12 | use App\Http\Controllers\HomeController; |
13 | 13 | use Illuminate\Support\Facades\Route; |
14 | +use App\Http\Controllers\Admin\CompanyController; | |
15 | +use App\Http\Controllers\Admin\Ad_EmployersController; | |
16 | + | |
14 | 17 | |
15 | 18 | /* |
16 | 19 | |-------------------------------------------------------------------------- |
... | ... | @@ -118,7 +121,7 @@ Route::group([ |
118 | 121 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
119 | 122 | |
120 | 123 | // кабинет - вакансии |
121 | - Route::get('ad-employers', [AdminController::class, 'index'])->name('ad-employers'); | |
124 | + Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | |
122 | 125 | |
123 | 126 | // кабинет - категории |
124 | 127 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
... | ... | @@ -140,30 +143,46 @@ Route::group([ |
140 | 143 | // кабинет - список админов |
141 | 144 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
142 | 145 | |
143 | - /////редактор////// кабинет - редактор сайта | |
144 | - Route::get('editor-site', [AdminController::class, 'editor'])->name('editor-site'); | |
146 | + /////редактор////// кабинет - редактор сайта//////////////////////// | |
147 | + Route::get('editor-site', [CompanyController::class, 'editor'])->name('editor-site'); | |
145 | 148 | |
146 | 149 | // кабинет - редактор шапки-футера сайта |
147 | - Route::get('edit-blocks', [AdminController::class, 'editblocks'])->name('edit-blocks'); | |
150 | + Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | |
148 | 151 | |
149 | 152 | // кабинет - редактор должности на главной |
150 | - Route::get('job-titles-main', [AdminController::class, 'job_titles_main'])->name('job-titles-main'); | |
153 | + Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | |
151 | 154 | |
152 | 155 | // кабинет - редактор работодатели на главной |
153 | - Route::get('employers-main', [AdminController::class, 'employers_main'])->name('employers-main'); | |
156 | + Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | |
154 | 157 | |
155 | 158 | // кабинет - редактор seo-сайта |
156 | - Route::get('editor-seo', [AdminController::class, 'editor_seo'])->name('editor-seo'); | |
159 | + Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | |
157 | 160 | |
158 | 161 | // кабинет - редактор страниц |
159 | - Route::get('editor-pages', [AdminController::class, 'editor_pages'])->name('editor-pages'); | |
162 | + Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | |
160 | 163 | |
161 | 164 | // кабинет - реклама сайта |
162 | - Route::get('reclames', [AdminController::class, 'reclames'])->name('reclames'); | |
165 | + Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | |
166 | + //////////////////////////////////////////////////////////////////////// | |
167 | + | |
168 | + // кабинет - отзывы о работодателе для модерации | |
169 | + Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | |
163 | 170 | |
171 | + // Общая страница статистики | |
172 | + Route::get('statics', function () { | |
173 | + return view('admin.static.index'); | |
174 | + })->name('statics'); | |
164 | 175 | |
176 | + // кабинет - статистика работников | |
177 | + Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | |
165 | 178 | |
179 | + // кабинет - статистика вакансий работодателя | |
180 | + Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | |
166 | 181 | |
182 | + // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | |
183 | + Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | |
167 | 184 | |
185 | + // кабинет - роли пользователя | |
186 | + Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | |
168 | 187 | |
169 | 188 | }); |