Commit d338f8db85cbf3789621f2dfc761e2ce40654241
Exists in
master
Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su
Showing 33 changed files Inline Diff
- app/Classes/Tools.php
- app/Http/Controllers/Admin/Ad_EmployersController.php
- app/Http/Controllers/Admin/AdminController.php
- app/Http/Controllers/Admin/EducationController.php
- app/Http/Controllers/Admin/EmployersController.php
- app/Http/Controllers/Admin/UsersController.php
- app/Http/Controllers/Admin/WorkersController.php
- app/Http/Controllers/MediaController.php
- app/Http/Requests/BaseUserRequest.php
- app/Models/Employer.php
- app/Models/Media.php
- app/Models/User.php
- database/migrations/2023_10_28_112853_create_media_table.php
- database/migrations/2023_10_31_060833_alter_table_employers.php
- resources/views/admin/ad_employers/add.blade.php
- resources/views/admin/ad_employers/edit.blade.php
- resources/views/admin/ad_employers/index.blade.php
- resources/views/admin/education/add.blade.php
- resources/views/admin/education/edit.blade.php
- resources/views/admin/education/form-add.blade.php
- resources/views/admin/education/form.blade.php
- resources/views/admin/education/index.blade.php
- resources/views/admin/employer/index.blade.php
- resources/views/admin/find_ad_employer.blade.php
- resources/views/admin/media/index.blade.php
- resources/views/admin/register.blade.php
- resources/views/admin/users/form.blade.php
- resources/views/admin/users/index.blade.php
- resources/views/admin/users/index_bd.blade.php
- resources/views/admin/users/index_bd_ajax.blade.php
- resources/views/admin/worker/index.blade.php
- resources/views/layout/admin.blade.php
- routes/web.php
app/Classes/Tools.php
File was created | 1 | <?php | |
2 | |||
3 | |||
4 | namespace App\Classes; | ||
5 | |||
6 | |||
7 | class Tools | ||
8 | { | ||
9 | static function generator_id($length = 6) | ||
10 | { | ||
11 | $word = ''; | ||
12 | $arr = array( | ||
13 | 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', | ||
14 | 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', | ||
15 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', | ||
16 | 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', | ||
17 | '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' | ||
18 | ); | ||
19 | |||
20 | for ($i = 0; $i < $length; $i++) { | ||
21 | $word .= $arr[random_int(0, count($arr) - 1)]; | ||
22 | } | ||
23 | return $word; | ||
24 | } | ||
25 | } | ||
26 |
app/Http/Controllers/Admin/Ad_EmployersController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Models\Ad_employer; | 6 | use App\Models\Ad_employer; |
7 | use App\Models\Employer; | 7 | use App\Models\Employer; |
8 | use App\Models\Job_title; | 8 | use App\Models\Job_title; |
9 | use App\Models\User; | 9 | use App\Models\User; |
10 | use Carbon\Carbon; | 10 | use Carbon\Carbon; |
11 | use Illuminate\Http\Request; | 11 | use Illuminate\Http\Request; |
12 | use Illuminate\Support\Facades\Auth; | 12 | use Illuminate\Support\Facades\Auth; |
13 | use Illuminate\Support\Facades\Validator; | 13 | use Illuminate\Support\Facades\Validator; |
14 | 14 | ||
15 | class Ad_EmployersController extends Controller | 15 | class Ad_EmployersController extends Controller |
16 | { | 16 | { |
17 | /** | 17 | /** |
18 | * Display a listing of the resource. | 18 | * Display a listing of the resource. |
19 | * | 19 | * |
20 | * @return \Illuminate\Http\Response | 20 | * @return \Illuminate\Http\Response |
21 | */ | 21 | */ |
22 | public function index(Request $request) | 22 | public function index(Request $request) |
23 | { | 23 | { |
24 | $title = 'Админка - Вакансии работодателей'; | 24 | $title = 'Админка - Вакансии работодателей'; |
25 | if ($request->ajax()) { | 25 | if ($request->ajax()) { |
26 | $params = $request->all(); | 26 | $params = $request->all(); |
27 | foreach ($params['data'] as $item) { | 27 | foreach ($params['data'] as $item) { |
28 | $emp = Ad_employer::find($item); | 28 | $emp = Ad_employer::find($item); |
29 | $emp->updated_at = Carbon::now(); | 29 | $emp->updated_at = Carbon::now(); |
30 | $emp->save(); | 30 | $emp->save(); |
31 | } | 31 | } |
32 | } | 32 | } |
33 | 33 | ||
34 | $ad_employers = Ad_employer::with('employer')->with('jobs') | 34 | $select_job = Job_title::query()->active()->get(); |
35 | ->where('is_remove', '0')->OrderBy('updated_at', 'desc')->paginate(15); | 35 | $all_ad = Ad_employer::with('employer')->with('jobs') |
36 | ->where('is_remove', '0')->get()->count(); | ||
37 | |||
38 | $ad_employers = Ad_employer::where('is_remove', '0'); | ||
39 | |||
40 | $find_job = ""; | ||
41 | if (isset($request->category_job)) { | ||
42 | if ($request->category_job != 'Все вакансии') { | ||
43 | $find_job = $request->category_job; | ||
44 | $ad_employers = $ad_employers->WhereHas('jobs', function($query) use ($find_job){ | ||
45 | return $query->where('name', 'LIKE', '%'.$find_job.'%'); | ||
46 | }); | ||
47 | } | ||
48 | } else { | ||
49 | $ad_employers = $ad_employers->with('jobs'); | ||
50 | } | ||
51 | |||
52 | $find_key = ""; | ||
53 | if (isset($request->find)) { | ||
54 | $find_key = $request->find; | ||
55 | $ad_employers = $ad_employers->whereHas('employer', function($query) use($find_key) { | ||
56 | $query->Where('name_company', 'LIKE', "%$find_key%"); | ||
57 | $query->orWhere('name', 'LIKE', "%$find_key%"); | ||
58 | }); | ||
59 | |||
60 | } else { | ||
61 | $ad_employers = $ad_employers->with('employer'); | ||
62 | } | ||
63 | |||
64 | $ad_employers = $ad_employers->OrderBy('updated_at', 'desc')->paginate(15); | ||
36 | 65 | ||
37 | if ($request->ajax()) { | 66 | if ($request->ajax()) { |
38 | return view('admin.ad_employers.index_ajax', compact('ad_employers', 'params')); | 67 | return view('admin.ad_employers.index_ajax', compact('ad_employers', 'params')); |
39 | } else { | 68 | } else { |
40 | return view('admin.ad_employers.index', compact('ad_employers', 'title')); | 69 | return view('admin.ad_employers.index', compact('ad_employers', |
70 | 'title', | ||
71 | 'all_ad', | ||
72 | 'find_job', | ||
73 | 'find_key', | ||
74 | 'select_job')); | ||
41 | } | 75 | } |
42 | } | 76 | } |
43 | 77 | ||
44 | /** | 78 | /** |
45 | * Show the form for creating a new resource. | 79 | * Show the form for creating a new resource |
46 | * | ||
47 | * @return \Illuminate\Http\Response | 80 | * @return \Illuminate\Http\Response |
48 | */ | 81 | */ |
49 | public function create() | 82 | public function create() |
50 | { | 83 | { |
51 | // | 84 | $job_titles = Job_title::query()->active()->get(); |
85 | return view('admin.ad_employers.add', compact('job_titles')); | ||
52 | } | 86 | } |
53 | 87 | ||
54 | /** | 88 | /** |
55 | * Store a newly created resource in storage. | 89 | * Store a newly created resource in storage. |
56 | * | 90 | * |
57 | * @param \Illuminate\Http\Request $request | 91 | * @param \Illuminate\Http\Request $request |
58 | * @return \Illuminate\Http\Response | 92 | * @return \Illuminate\Http\Response |
59 | */ | 93 | */ |
60 | public function store(Request $request) | 94 | public function store(Request $request) |
61 | { | 95 | { |
62 | // | 96 | $params = $request->all(); |
97 | unset($params->position_work); | ||
98 | $rules = [ | ||
99 | 'name' => 'required|min:3', | ||
100 | ]; | ||
101 | $messages = [ | ||
102 | 'required' => 'Укажите обязательное поле', | ||
103 | ]; | ||
104 | $validator = Validator::make($params, $rules, $messages); | ||
105 | |||
106 | if ($validator->fails()) { | ||
107 | return redirect()->route('admin.add-ad-employers') | ||
108 | ->withErrors($validator); | ||
109 | } else { | ||
110 | $ad_employer = new Ad_employer(); | ||
111 | $params['employer_id'] = 1; | ||
112 | $data_ad = $ad_employer->create($params); | ||
113 | $data_ad->jobs()->sync($request->position_work); | ||
114 | //$ad_employer->jobs()->sync($request->position_work); | ||
115 | |||
116 | |||
117 | return redirect()->route('admin.ad-employers') | ||
118 | ->with('success', 'Данные были успешно сохранены'); | ||
119 | } | ||
120 | return redirect()->route('admin.ad-employers'); | ||
63 | } | 121 | } |
64 | 122 | ||
65 | /** | 123 | /** |
66 | * Display the specified resource. | 124 | * Display the specified resource. |
67 | * | 125 | * |
68 | * @param \App\Models\Ad_employer $ad_employer | 126 | * @param \App\Models\Ad_employer $ad_employer |
69 | * @return \Illuminate\Http\Response | 127 | * @return \Illuminate\Http\Response |
70 | */ | 128 | */ |
71 | public function show(Ad_employer $ad_employer) | 129 | public function show(Ad_employer $ad_employer) |
72 | { | 130 | { |
73 | // | 131 | // |
74 | } | 132 | } |
75 | 133 | ||
76 | /** | 134 | /** |
77 | * Show the form for editing the specified resource. | 135 | * Show the form for editing the specified resource. |
78 | * | 136 | * |
79 | * @param \App\Models\Ad_employer $ad_employer | 137 | * @param \App\Models\Ad_employer $ad_employer |
80 | * @return \Illuminate\Http\Response | 138 | * @return \Illuminate\Http\Response |
81 | */ | 139 | */ |
82 | public function edit(Ad_employer $ad_employer) | 140 | public function edit(Ad_employer $ad_employer) |
83 | { | 141 | { |
84 | $sel = Array(); | 142 | $sel = Array(); |
85 | $job_titles = Job_title::active()->get(); | 143 | $job_titles = Job_title::active()->get(); |
86 | 144 | ||
87 | foreach ($ad_employer->jobs as $j) { | 145 | foreach ($ad_employer->jobs as $j) { |
88 | $sel[] = $j->id; | 146 | $sel[] = $j->id; |
89 | } | 147 | } |
90 | 148 | ||
91 | return view('admin.ad_employers.edit', compact('ad_employer', 'job_titles', 'sel')); | 149 | return view('admin.ad_employers.edit', compact('ad_employer', 'job_titles', 'sel')); |
92 | } | 150 | } |
93 | 151 | ||
94 | /** | 152 | /** |
95 | * Update the specified resource in storage. | 153 | * Update the specified resource in storage. |
96 | * | 154 | * |
97 | * @param \Illuminate\Http\Request $request | 155 | * @param \Illuminate\Http\Request $request |
98 | * @param \App\Models\Ad_employer $ad_employer | 156 | * @param \App\Models\Ad_employer $ad_employer |
99 | * @return \Illuminate\Http\Response | 157 | * @return \Illuminate\Http\Response |
100 | */ | 158 | */ |
101 | public function update(Request $request, Ad_employer $ad_employer) | 159 | public function update(Request $request, Ad_employer $ad_employer) |
102 | { | 160 | { |
103 | $params = $request->all(); | 161 | $params = $request->all(); |
104 | unset($params->position_work); | 162 | unset($params->position_work); |
105 | $rules = [ | 163 | $rules = [ |
106 | 'name' => 'required|min:3', | 164 | 'name' => 'required|min:3', |
107 | ]; | 165 | ]; |
108 | $messages = [ | 166 | $messages = [ |
109 | 'required' => 'Укажите обязательное поле', | 167 | 'required' => 'Укажите обязательное поле', |
110 | ]; | 168 | ]; |
111 | $validator = Validator::make($params, $rules, $messages); | 169 | $validator = Validator::make($params, $rules, $messages); |
112 | 170 | ||
113 | if ($validator->fails()) { | 171 | if ($validator->fails()) { |
114 | return redirect()->route('admin.edit-ad-employers', ['ad_employer' => $ad_employer->id]) | 172 | return redirect()->route('admin.edit-ad-employers', ['ad_employer' => $ad_employer->id]) |
115 | ->withErrors($validator); | 173 | ->withErrors($validator); |
116 | } else { | 174 | } else { |
117 | $ad_employer->update($params); | 175 | $ad_employer->update($params); |
118 | $ad_employer->jobs()->sync($request->position_work); | 176 | $ad_employer->jobs()->sync($request->position_work); |
119 | 177 | ||
120 | return redirect()->route('admin.ad-employers') | 178 | return redirect()->route('admin.ad-employers') |
121 | ->with('success', 'Данные были успешно сохранены'); | 179 | ->with('success', 'Данные были успешно сохранены'); |
122 | } | 180 | } |
123 | return redirect()->route('admin.ad-employers'); | 181 | return redirect()->route('admin.ad-employers'); |
124 | } | 182 | } |
125 | 183 | ||
126 | /** | 184 | /** |
127 | * Remove the specified resource from storage. | 185 | * Remove the specified resource from storage. |
128 | * | 186 | * |
129 | * @param \App\Models\Ad_employer $ad_employer | 187 | * @param \App\Models\Ad_employer $ad_employer |
130 | * @return \Illuminate\Http\Response | 188 | * @return \Illuminate\Http\Response |
131 | */ | 189 | */ |
132 | public function destroy(Ad_employer $ad_employer) | 190 | public function destroy(Ad_employer $ad_employer) |
133 | { | 191 | { |
134 | // | 192 | $ad_employer->is_remove = 1; |
193 | $ad_employer->save(); | ||
194 | |||
195 | return redirect()->route('admin.ad-employers'); | ||
135 | } | 196 | } |
136 | } | 197 | } |
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\Http\Controllers\Controller; | 6 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\CompanyRequest; | 7 | use App\Http\Requests\CompanyRequest; |
7 | use App\Models\Company; | 8 | use App\Models\Company; |
8 | use App\Models\Employer; | 9 | use App\Models\Employer; |
9 | use App\Models\User; | 10 | use App\Models\User; |
10 | use Carbon\Carbon; | 11 | use Carbon\Carbon; |
11 | use Illuminate\Http\Request; | 12 | use Illuminate\Http\Request; |
12 | use Illuminate\Support\Facades\Auth; | 13 | use Illuminate\Support\Facades\Auth; |
13 | use Illuminate\Support\Facades\Hash; | 14 | use Illuminate\Support\Facades\Hash; |
14 | use Illuminate\Support\Facades\Storage; | 15 | use Illuminate\Support\Facades\Storage; |
15 | use Illuminate\Support\Facades\Validator; | 16 | use Illuminate\Support\Facades\Validator; |
16 | 17 | ||
17 | class AdminController extends Controller | 18 | class AdminController extends Controller |
18 | { | 19 | { |
19 | /** | 20 | /** |
20 | * Handle the incoming request. | 21 | * Handle the incoming request. |
21 | * | 22 | * |
22 | * @param \Illuminate\Http\Request $request | 23 | * @param \Illuminate\Http\Request $request |
23 | * @return \Illuminate\Http\Response | 24 | * @return \Illuminate\Http\Response |
24 | */ | 25 | */ |
25 | public function __invoke(Request $request) | 26 | public function __invoke(Request $request) |
26 | { | 27 | { |
27 | // | 28 | // |
28 | } | 29 | } |
29 | 30 | ||
30 | public function register() { | 31 | public function register() { |
31 | return view('admin.register'); | 32 | $code_emp = Tools::generator_id(10); |
33 | return view('admin.register', compact('code_emp')); | ||
32 | } | 34 | } |
33 | 35 | ||
34 | public function create(Request $request) { | 36 | public function create(Request $request) { |
35 | 37 | ||
36 | $rules = [ | 38 | $params = $request->all(); |
39 | unset($params['code_emp']); | ||
40 | $rules = [ | ||
37 | 'name' => 'required|string|max:255', | 41 | 'name' => 'required|string|max:255', |
38 | 'email' => 'required|string|email|max:255|unique:users', | 42 | 'email' => 'required|string|email|max:255|unique:users', |
39 | 'password' => 'required|string|min:8|confirmed', | 43 | 'password' => 'required|string|min:8|confirmed', |
40 | ]; | 44 | ]; |
41 | 45 | ||
42 | $messages = [ | 46 | $messages = [ |
43 | 'required' => 'Укажите обязательное поле «:attribute»', | 47 | 'required' => 'Укажите обязательное поле «:attribute»', |
44 | 'confirmed' => 'Пароли не совпадают', | 48 | 'confirmed' => 'Пароли не совпадают', |
45 | 'email' => 'Введите корректный email', | 49 | 'email' => 'Введите корректный email', |
46 | 'unique' => 'Данный email занят уже', | 50 | 'unique' => 'Данный email занят уже', |
47 | 'min' => [ | 51 | 'min' => [ |
48 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 52 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
49 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 53 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
50 | ], | 54 | ], |
51 | 'max' => [ | 55 | 'max' => [ |
52 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 56 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
53 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 57 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
54 | ], | 58 | ], |
55 | ]; | 59 | ]; |
56 | 60 | ||
57 | $validator = Validator::make($request->all(), $rules, $messages); | 61 | $validator = Validator::make($params, $rules, $messages); |
58 | 62 | ||
59 | if ($validator->fails()) { | 63 | if ($validator->fails()) { |
60 | return back()->withErrors($validator)->withInput(); //->route('admin.register') | 64 | return back()->withErrors($validator)->withInput(); |
61 | 65 | ||
62 | } else { | 66 | } else { |
63 | $params = $request->all(); | 67 | try { |
64 | 68 | $user = User::create([ | |
65 | User::create([ | 69 | 'name' => $request->name, |
66 | 'name' => $request->name, | 70 | 'email' => $request->email, |
67 | 'email' => $request->email, | 71 | 'password' => Hash::make($request->password), |
68 | 'password' => Hash::make($request->password), | 72 | 'pubpassword' => base64_encode($request->password), |
69 | 'pubpassword' => base64_encode($request->password), | 73 | 'admin' => '1', |
70 | 'admin' => '1', | 74 | 'is_worker' => '0', |
71 | 'email_verified_at' => Carbon::now() | 75 | 'email_verified_at' => Carbon::now() |
76 | ]); | ||
77 | } finally { | ||
78 | $emp = Employer::create([ | ||
79 | 'name_company' => 'Администратор', | ||
80 | 'user_id' => $user->id, | ||
81 | 'code' => $request->code_emp | ||
82 | ]); | ||
83 | } | ||
72 | 84 | ||
73 | ]); | ||
74 | return redirect() | 85 | return redirect() |
75 | ->route('admin.login') | 86 | ->route('admin.login') |
76 | ->with('success', 'Вы успешно зарегистрировались'); | 87 | ->with('success', 'Вы успешно зарегистрировались'); |
77 | } | 88 | } |
78 | } | 89 | } |
79 | 90 | ||
80 | public function login() { | 91 | public function login() { |
81 | return view('admin.login'); | 92 | return view('admin.login'); |
82 | } | 93 | } |
83 | 94 | ||
84 | // Аутентификация | 95 | // Аутентификация |
85 | public function autenticate(Request $request) { | 96 | public function autenticate(Request $request) { |
86 | //$request->validate( | 97 | //$request->validate( |
87 | $rules = [ | 98 | $rules = [ |
88 | 'email' => 'required|string|email', | 99 | 'email' => 'required|string|email', |
89 | 'password' => 'required|string', | 100 | 'password' => 'required|string', |
90 | ]; | 101 | ]; |
91 | 102 | ||
92 | $messages = [ | 103 | $messages = [ |
93 | 'required' => 'Укажите обязательное поле «:attribute»', | 104 | 'required' => 'Укажите обязательное поле «:attribute»', |
94 | 'email' => 'Введите корректный email', | 105 | 'email' => 'Введите корректный email', |
95 | 'min' => [ | 106 | 'min' => [ |
96 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 107 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
97 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 108 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
98 | ], | 109 | ], |
99 | 'max' => [ | 110 | 'max' => [ |
100 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 111 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
101 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 112 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
102 | ], | 113 | ], |
103 | ]; | 114 | ]; |
104 | 115 | ||
105 | 116 | ||
106 | $validator = Validator::make($request->all(), $rules, $messages); | 117 | $validator = Validator::make($request->all(), $rules, $messages); |
107 | 118 | ||
108 | if ($validator->fails()) { | 119 | if ($validator->fails()) { |
109 | return back()->withErrors($validator)->withInput(); | 120 | return back()->withErrors($validator)->withInput(); |
110 | 121 | ||
111 | } else { | 122 | } else { |
112 | 123 | ||
113 | $credentials = $request->only('email', 'password'); | 124 | $credentials = $request->only('email', 'password'); |
114 | 125 | ||
115 | if (Auth::attempt($credentials, $request->has('remember'))) { | 126 | if (Auth::attempt($credentials, $request->has('remember'))) { |
116 | 127 | ||
117 | if (is_null(Auth::user()->email_verified_at)) { | 128 | if (is_null(Auth::user()->email_verified_at)) { |
118 | Auth::logout(); | 129 | Auth::logout(); |
119 | return back()->withErrors('Адрес почты не подтвержден')->withInput(); | 130 | return back()->withErrors('Адрес почты не подтвержден')->withInput(); |
120 | } | 131 | } |
121 | 132 | ||
122 | if (!Auth::user()->admin) { | 133 | if (!Auth::user()->admin) { |
123 | Auth::logout(); | 134 | Auth::logout(); |
124 | return //redirect()->route('admin.login') | 135 | return //redirect()->route('admin.login') |
125 | back()->withErrors('Вы не являетесь админом!')->withInput();; | 136 | back()->withErrors('Вы не являетесь админом!')->withInput();; |
126 | 137 | ||
127 | } | 138 | } |
128 | 139 | ||
129 | return redirect() | 140 | return redirect() |
130 | ->route('admin.index') | 141 | ->route('admin.index') |
131 | ->with('success', 'Вы вошли в личный кабинет.'); | 142 | ->with('success', 'Вы вошли в личный кабинет.'); |
132 | } | 143 | } |
133 | } | 144 | } |
134 | 145 | ||
135 | return redirect() | 146 | return redirect() |
136 | ->route('admin.login') | 147 | ->route('admin.login') |
137 | ->withErrors('Неверный логин или пароль!')->withInput(); | 148 | ->withErrors('Неверный логин или пароль!')->withInput(); |
138 | 149 | ||
139 | } | 150 | } |
140 | 151 | ||
141 | public function logout() { | 152 | public function logout() { |
142 | Auth::logout(); | 153 | Auth::logout(); |
143 | return redirect()->route('index') | 154 | return redirect()->route('index') |
144 | ->with('success', 'Вы вышли из личного кабинета'); | 155 | ->with('success', 'Вы вышли из личного кабинета'); |
145 | } | 156 | } |
146 | 157 | ||
147 | public function index() { | 158 | public function index() { |
148 | $all_user = User::query()->count(); | 159 | $all_user = User::query()->count(); |
149 | $all_employer = User::where('is_worker', '0')->count(); | 160 | $all_employer = User::where('is_worker', '0')->count(); |
150 | $all_worker = User::where('is_worker', '1')->count(); | 161 | $all_worker = User::where('is_worker', '1')->count(); |
151 | $all_admin = User::where('admin', '1')->count(); | 162 | $all_admin = User::where('admin', '1')->count(); |
152 | return view('admin.index', compact('all_employer', 'all_user', 'all_worker', 'all_admin')); | 163 | return view('admin.index', compact('all_employer', 'all_user', 'all_worker', 'all_admin')); |
153 | } | 164 | } |
154 | 165 | ||
155 | public function index_admin(Request $request) { | 166 | public function index_admin(Request $request) { |
156 | $title = 'Админка - Администраторы системы'; | 167 | $title = 'Админка - Администраторы системы'; |
157 | $id_admin = Auth::user()->id; | 168 | $id_admin = Auth::user()->id; |
158 | 169 | ||
159 | if ($request->ajax()) { | 170 | if ($request->ajax()) { |
160 | $user = User::find($request->id); | 171 | $user = User::find($request->id); |
161 | $request->offsetUnset('id'); | 172 | $request->offsetUnset('id'); |
162 | $user->update($request->all()); | 173 | $user->update($request->all()); |
163 | } | 174 | } |
164 | $find_key = ''; | 175 | $find_key = ''; |
165 | $users = User::where('admin', '1'); | 176 | $users = User::where('admin', '1'); |
166 | if (isset($request->find)) { | 177 | if (isset($request->find)) { |
167 | $find_key = $request->find; | 178 | $find_key = $request->find; |
168 | $users = $users->where(function($query) use($find_key) { | 179 | $users = $users->where(function($query) use($find_key) { |
169 | $query->Where('name', 'LIKE', "%$find_key%") | 180 | $query->Where('name', 'LIKE', "%$find_key%") |
170 | ->orWhere('email', 'LIKE', "%$find_key%"); | 181 | ->orWhere('email', 'LIKE', "%$find_key%"); |
171 | }); | 182 | }); |
172 | } | 183 | } |
173 | $users = $users->paginate(15); | 184 | $users = $users->paginate(15); |
174 | 185 | ||
175 | if ($request->ajax()) { | 186 | if ($request->ajax()) { |
176 | return view('admin.users.index_ajax', compact('users', 'id_admin')); | 187 | return view('admin.users.index_ajax', compact('users', 'id_admin')); |
177 | } else { | 188 | } else { |
178 | return view('admin.users.index', compact('users', 'title', 'id_admin', 'find_key')); | 189 | return view('admin.users.index', compact('users', 'title', 'id_admin', 'find_key')); |
179 | } | 190 | } |
180 | } | 191 | } |
181 | 192 | ||
182 | //Страница профиль пользователя - форма | 193 | //Страница профиль пользователя - форма |
183 | public function profile_user(User $user) { | 194 | public function profile_user(User $user) { |
184 | $visible = false; | 195 | $visible = false; |
185 | if($user->is_worker) { | 196 | if($user->is_worker) { |
186 | $caption = "Карточка работника"; | 197 | $caption = "Карточка работника"; |
187 | if (isset($user->workers[0]->id)) { | 198 | if (isset($user->workers[0]->id)) { |
188 | $link = route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]); | 199 | $link = route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]); |
189 | $visible = true; | 200 | $visible = true; |
190 | } else { | 201 | } else { |
191 | $link = ""; | 202 | $link = ""; |
192 | } | 203 | } |
193 | 204 | ||
194 | } else { | 205 | } else { |
195 | $caption = "Карточка работодателя"; | 206 | $caption = "Карточка работодателя"; |
196 | if (isset($user->employers[0]->id)) { | 207 | if (isset($user->employers[0]->id)) { |
197 | 208 | ||
198 | $link = route('admin.employer-profile', ['employer' => $user->employers[0]->id]); | 209 | $link = route('admin.employer-profile', ['employer' => $user->employers[0]->id]); |
199 | $visible = true; | 210 | $visible = true; |
200 | } else { | 211 | } else { |
201 | $link = ""; | 212 | $link = ""; |
202 | } | 213 | } |
203 | } | 214 | } |
204 | 215 | ||
205 | return view('admin.users.profile', compact('user', 'visible', 'link', 'caption')); | 216 | return view('admin.users.profile', compact('user', 'visible', 'link', 'caption')); |
206 | } | 217 | } |
207 | 218 | ||
208 | //Страница профиль пользователя - сохранение формы | 219 | //Страница профиль пользователя - сохранение формы |
209 | public function store_profile_user(User $user, Request $request) { | 220 | public function store_profile_user(User $user, Request $request) { |
210 | $rules = [ | 221 | $rules = [ |
211 | 'name' => 'required|min:3', | 222 | 'name' => 'required|min:3', |
212 | ]; | 223 | ]; |
213 | $messages = [ | 224 | $messages = [ |
214 | 'required' => 'Укажите обязательное поле', | 225 | 'required' => 'Укажите обязательное поле', |
215 | 'email' => 'Это поле должно быть определено, как Email' | 226 | 'email' => 'Это поле должно быть определено, как Email' |
216 | ]; | 227 | ]; |
217 | $validator = Validator::make($request->all(), $rules, $messages); | 228 | $validator = Validator::make($request->all(), $rules, $messages); |
218 | 229 | ||
219 | if ($validator->fails()) { | 230 | if ($validator->fails()) { |
220 | return redirect()->route('admin.user-profile', ['user' => $user->id]) | 231 | return redirect()->route('admin.user-profile', ['user' => $user->id]) |
221 | ->withErrors($validator); | 232 | ->withErrors($validator); |
222 | } else { | 233 | } else { |
223 | $user->update($request->all()); | 234 | $user->update($request->all()); |
224 | return redirect()->route('admin.user-profile', ['user' => $user->id]) | 235 | return redirect()->route('admin.user-profile', ['user' => $user->id]) |
225 | ->with('success', 'Данные были успешно сохранены'); | 236 | ->with('success', 'Данные были успешно сохранены'); |
226 | } | 237 | } |
227 | return redirect()->route('admin.user-profile', ['user' => $user->id]); | 238 | return redirect()->route('admin.user-profile', ['user' => $user->id]); |
228 | } | 239 | } |
229 | 240 | ||
230 | // Страница профиль админа - форма | 241 | // Страница профиль админа - форма |
231 | public function profile() { | 242 | public function profile() { |
232 | $id = Auth::user()->id; | 243 | $id = Auth::user()->id; |
233 | $user = User::find($id); | 244 | $user = User::find($id); |
234 | 245 | ||
235 | return view('admin.profile', compact('user')); | 246 | return view('admin.profile', compact('user')); |
236 | } | 247 | } |
237 | 248 | ||
238 | // Страница профиль админа - сохранение формы | 249 | // Страница профиль админа - сохранение формы |
239 | public function store_profile(Request $request) { | 250 | public function store_profile(Request $request) { |
240 | $id = Auth::user()->id; | 251 | $id = Auth::user()->id; |
241 | $user = User::find($id); | 252 | $user = User::find($id); |
242 | 253 | ||
243 | $rules = [ | 254 | $rules = [ |
244 | 'name' => 'required|min:3', | 255 | 'name' => 'required|min:3', |
245 | 'email' => 'required|email|min:3', | 256 | 'email' => 'required|email|min:3', |
246 | ]; | 257 | ]; |
247 | $messages = [ | 258 | $messages = [ |
248 | 'required' => 'Укажите обязательное поле', | 259 | 'required' => 'Укажите обязательное поле', |
249 | 'email' => 'Это поле должно быть определено, как Email' | 260 | 'email' => 'Это поле должно быть определено, как Email' |
250 | ]; | 261 | ]; |
251 | $validator = Validator::make($request->all(), $rules, $messages); | 262 | $validator = Validator::make($request->all(), $rules, $messages); |
252 | 263 | ||
253 | if ($validator->fails()) { | 264 | if ($validator->fails()) { |
254 | return redirect()->route('admin.profile') | 265 | return redirect()->route('admin.profile') |
255 | ->withErrors($validator); | 266 | ->withErrors($validator); |
256 | } else { | 267 | } else { |
257 | $user->update($request->all()); | 268 | $user->update($request->all()); |
258 | return redirect()->route('admin.profile') | 269 | return redirect()->route('admin.profile') |
259 | ->with('success', 'Данные были успешно сохранены'); | 270 | ->with('success', 'Данные были успешно сохранены'); |
260 | } | 271 | } |
261 | return redirect()->route('admin.profile'); | 272 | return redirect()->route('admin.profile'); |
262 | } | 273 | } |
263 | 274 | ||
264 | // Форма смены пароля администоратора | 275 | // Форма смены пароля администоратора |
265 | public function profile_password() { | 276 | public function profile_password() { |
266 | $id = Auth::user()->id; | 277 | $id = Auth::user()->id; |
267 | $user = User::find($id); | 278 | $user = User::find($id); |
268 | $username = $user->name; | 279 | $username = $user->name; |
269 | 280 | ||
270 | return view('admin.password', compact('username')); | 281 | return view('admin.password', compact('username')); |
271 | } | 282 | } |
272 | 283 | ||
273 | // Сохранение формы смены пароля администоратора | 284 | // Сохранение формы смены пароля администоратора |
274 | public function profile_password_new(Request $request) { | 285 | public function profile_password_new(Request $request) { |
275 | 286 | ||
276 | $rules = [ | 287 | $rules = [ |
277 | 'old_password' => 'required|min:6', //|current_password:api', | 288 | 'old_password' => 'required|min:6', //|current_password:api', |
278 | 'password' => 'required|min:6|confirmed', | 289 | 'password' => 'required|min:6|confirmed', |
279 | ]; | 290 | ]; |
280 | $messages = [ | 291 | $messages = [ |
281 | 'required' => 'Укажите обязательное поле', | 292 | 'required' => 'Укажите обязательное поле', |
282 | 'confirmed' => 'Пароли не совпадают' | 293 | 'confirmed' => 'Пароли не совпадают' |
283 | ]; | 294 | ]; |
284 | 295 | ||
285 | $validator = Validator::make($request->all(), $rules, $messages); | 296 | $validator = Validator::make($request->all(), $rules, $messages); |
286 | 297 | ||
287 | if (! Hash::check($request->old_password, $request->user()->password)) { | 298 | if (! Hash::check($request->old_password, $request->user()->password)) { |
288 | return back()->withErrors([ | 299 | return back()->withErrors([ |
289 | 'old_password' => ['Неверный предыдущий пароль'] | 300 | 'old_password' => ['Неверный предыдущий пароль'] |
290 | ]); | 301 | ]); |
291 | } | 302 | } |
292 | 303 | ||
293 | if ($validator->fails()) { | 304 | if ($validator->fails()) { |
294 | return redirect()->route('admin.password') | 305 | return redirect()->route('admin.password') |
295 | ->withErrors($validator); | 306 | ->withErrors($validator); |
296 | } else { | 307 | } else { |
297 | $params = $request->all(); | 308 | $params = $request->all(); |
298 | // устанавливаем новый пароль для пользователя | 309 | // устанавливаем новый пароль для пользователя |
299 | User::where('id', Auth::id()) | 310 | User::where('id', Auth::id()) |
300 | ->update(['password' => Hash::make($request->password)]); | 311 | ->update(['password' => Hash::make($request->password)]); |
301 | session()->flash('success', 'Успешно изменен пароль!'); | 312 | session()->flash('success', 'Успешно изменен пароль!'); |
302 | 313 | ||
303 | return redirect()->route('admin.password'); | 314 | return redirect()->route('admin.password'); |
304 | } | 315 | } |
305 | } | 316 | } |
306 | 317 | ||
307 | // Страница конфигурация сайта - форма | 318 | // Страница конфигурация сайта - форма |
308 | public function config_form() { | 319 | public function config_form() { |
309 | $config = Company::find(1); | 320 | $config = Company::find(1); |
310 | return view('admin.config', compact('config')); | 321 | return view('admin.config', compact('config')); |
311 | } | 322 | } |
312 | 323 | ||
313 | // Страница конфигурация сайта - сохранение формы | 324 | // Страница конфигурация сайта - сохранение формы |
314 | public function store_config(CompanyRequest $request) { | 325 | public function store_config(CompanyRequest $request) { |
315 | $config = Company::find(1); | 326 | $config = Company::find(1); |
316 | 327 | ||
317 | $params = $request->all(); | 328 | $params = $request->all(); |
318 | unset($params['logo']); | 329 | unset($params['logo']); |
319 | unset($params['image']); | 330 | unset($params['image']); |
320 | 331 | ||
321 | if ($request->has('logo')) { | 332 | if ($request->has('logo')) { |
322 | Storage::delete($config->logo); | 333 | Storage::delete($config->logo); |
323 | $params['logo'] = $request->file('logo')->store('config', 'public'); | 334 | $params['logo'] = $request->file('logo')->store('config', 'public'); |
324 | } | 335 | } |
325 | 336 | ||
326 | if ($request->has('image')) { | 337 | if ($request->has('image')) { |
327 | Storage::delete($config->image); | 338 | Storage::delete($config->image); |
328 | $params['image'] = $request->file('image')->store('config', 'public'); | 339 | $params['image'] = $request->file('image')->store('config', 'public'); |
329 | } | 340 | } |
330 | 341 | ||
331 | if (is_null($config)) { | 342 | if (is_null($config)) { |
332 | Company::create($params); | 343 | Company::create($params); |
333 | } else { | 344 | } else { |
334 | $config->update($params); | 345 | $config->update($params); |
335 | } | 346 | } |
336 | 347 | ||
337 | return redirect()->route('admin.config'); | 348 | return redirect()->route('admin.config'); |
338 | } | 349 | } |
339 | 350 | ||
340 | 351 | ||
341 | } | 352 | } |
app/Http/Controllers/Admin/EducationController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\EducationRequest; | 6 | use App\Http\Requests\EducationRequest; |
7 | use App\Http\Requests\ProgramEducationRequest; | 7 | use App\Http\Requests\ProgramEducationRequest; |
8 | use App\Models\Education; | 8 | use App\Models\Education; |
9 | use App\Models\ProgramEducation; | 9 | use App\Models\ProgramEducation; |
10 | use Illuminate\Http\Request; | 10 | use Illuminate\Http\Request; |
11 | use Illuminate\Support\Facades\Storage; | 11 | use Illuminate\Support\Facades\Storage; |
12 | 12 | ||
13 | class EducationController extends Controller | 13 | class EducationController extends Controller |
14 | { | 14 | { |
15 | /** | 15 | /** |
16 | * Display a listing of the resource. | 16 | * Display a listing of the resource. |
17 | * | 17 | * |
18 | * @return \Illuminate\Http\Response | 18 | * @return \Illuminate\Http\Response |
19 | */ | 19 | */ |
20 | public function index() | 20 | public function index() |
21 | { | 21 | { |
22 | $education = Education::query()->active()->paginate(15); | 22 | $education = Education::query()->active()->paginate(15); |
23 | return view('admin.education.index', compact('education')); | 23 | return view('admin.education.index', compact('education')); |
24 | } | 24 | } |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * Show the form for creating a new resource. | 27 | * Show the form for creating a new resource. |
28 | * | 28 | * |
29 | * @return \Illuminate\Http\Response | 29 | * @return \Illuminate\Http\Response |
30 | */ | 30 | */ |
31 | public function create() | 31 | public function create() |
32 | { | 32 | { |
33 | return view('admin.education.add'); | 33 | return view('admin.education.add'); |
34 | } | 34 | } |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Store a newly created resource in storage. | 37 | * Store a newly created resource in storage. |
38 | * | 38 | * |
39 | * @param \Illuminate\Http\Request $request | 39 | * @param \Illuminate\Http\Request $request |
40 | * @return \Illuminate\Http\Response | 40 | * @return \Illuminate\Http\Response |
41 | */ | 41 | */ |
42 | public function store(EducationRequest $request) | 42 | public function store(EducationRequest $request) |
43 | { | 43 | { |
44 | $params = $request->all(); | 44 | $params = $request->all(); |
45 | if ($request->has('image')) { | 45 | if ($request->has('image')) { |
46 | $params['image'] = $request->file('image')->store("education", 'public'); | 46 | $params['image'] = $request->file('image')->store("education", 'public'); |
47 | } | 47 | } |
48 | Education::create($params); | 48 | Education::create($params); |
49 | 49 | ||
50 | 50 | ||
51 | return redirect()->route('admin.education.index'); | 51 | return redirect()->route('admin.education.index'); |
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Display the specified resource. | 55 | * Display the specified resource. |
56 | * | 56 | * |
57 | * @param \App\Models\Education $education | 57 | * @param \App\Models\Education $education |
58 | * @return \Illuminate\Http\Response | 58 | * @return \Illuminate\Http\Response |
59 | */ | 59 | */ |
60 | public function show(Education $education) | 60 | public function show(Education $education) |
61 | { | 61 | { |
62 | // | 62 | // |
63 | } | 63 | } |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Show the form for editing the specified resource. | 66 | * Show the form for editing the specified resource. |
67 | * | 67 | * |
68 | * @param \App\Models\Education $education | 68 | * @param \App\Models\Education $education |
69 | * @return \Illuminate\Http\Response | 69 | * @return \Illuminate\Http\Response |
70 | */ | 70 | */ |
71 | public function edit(Education $education) | 71 | public function edit(Education $education) |
72 | { | 72 | { |
73 | $program1 = ProgramEducation::query()->where('education_id', '=', $education->id) | 73 | $program = ProgramEducation::query()->where('education_id', '=', $education->id) |
74 | ->where('level', '=', '1')->get(); | 74 | ->orderBy('level')->get(); |
75 | $program2 = ProgramEducation::query()->where('education_id', '=', $education->id) | 75 | return view('admin.education.edit', compact('education', 'program')); |
76 | ->where('level', '=', '2')->get(); | ||
77 | $program3 = ProgramEducation::query()->where('education_id', '=', $education->id) | ||
78 | ->where('level', '=', '3')->get(); | ||
79 | |||
80 | return view('admin.education.edit', compact('education', 'program1', 'program2', 'program3')); | ||
81 | } | 76 | } |
82 | 77 | ||
83 | /** | 78 | /** |
84 | * Update the specified resource in storage. | 79 | * Update the specified resource in storage. |
85 | * | 80 | * |
86 | * @param \Illuminate\Http\Request $request | 81 | * @param \Illuminate\Http\Request $request |
87 | * @param \App\Models\Education $education | 82 | * @param \App\Models\Education $education |
88 | * @return \Illuminate\Http\Response | 83 | * @return \Illuminate\Http\Response |
89 | */ | 84 | */ |
90 | public function update(EducationRequest $request, Education $education) | 85 | public function update(EducationRequest $request, Education $education) |
91 | { | 86 | { |
92 | $params = $request->all(); | 87 | $params = $request->all(); |
93 | if ($request->has('image')) { | 88 | if ($request->has('image')) { |
94 | if (!empty($education->image)) { | 89 | if (!empty($education->image)) { |
95 | Storage::delete($education->image); | 90 | Storage::delete($education->image); |
96 | } | 91 | } |
97 | $params['image'] = $request->file('image')->store("education", 'public'); | 92 | $params['image'] = $request->file('image')->store("education", 'public'); |
98 | } | 93 | } |
99 | 94 | ||
100 | $education->update($params); | 95 | $education->update($params); |
101 | return redirect()->route('admin.education.index'); | 96 | return redirect()->route('admin.education.index'); |
102 | } | 97 | } |
103 | 98 | ||
104 | /** | 99 | /** |
105 | * Remove the specified resource from storage. | 100 | * Remove the specified resource from storage. |
106 | * | 101 | * |
107 | * @param \App\Models\Education $education | 102 | * @param \App\Models\Education $education |
108 | * @return \Illuminate\Http\Response | 103 | * @return \Illuminate\Http\Response |
109 | */ | 104 | */ |
110 | public function destroy(Education $education) | 105 | public function destroy(Education $education) |
111 | { | 106 | { |
112 | $education->update(['is_remove' => 1]); | 107 | $education->update(['is_remove' => 1]); |
113 | return redirect()->route('admin.education.index'); | 108 | return redirect()->route('admin.education.index'); |
114 | } | 109 | } |
115 | 110 | ||
116 | public function add_program(Education $education, int $level) { | 111 | public function add_program(Request $request) { |
117 | $id_education = $education->id; | 112 | $id_education = $request->id; |
113 | $level = $request->level; | ||
118 | return view('admin.education.program', compact('id_education', 'level')); | 114 | return view('admin.education.program', compact('id_education', 'level')); |
119 | } | 115 | } |
120 | 116 | ||
121 | public function store_program(ProgramEducationRequest $request) { | 117 | public function store_program(ProgramEducationRequest $request) { |
122 | $education = $request->education_id; | 118 | $education = $request->education_id; |
123 | ProgramEducation::create($request->all()); | 119 | ProgramEducation::create($request->all()); |
124 | 120 | ||
125 | return redirect()->route('admin.education.edit', ['education' => $education]); | 121 | return redirect()->route('admin.education.edit', ['education' => $education]); |
126 | } | 122 | } |
127 | 123 | ||
124 | public function delete_program(ProgramEducation $program, Education $education) { | ||
125 | $education = $education->id; | ||
126 | $program->delete(); | ||
127 |
app/Http/Controllers/Admin/EmployersController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Models\Ad_employer; | 6 | use App\Models\Ad_employer; |
7 | use App\Models\Answer; | 7 | use App\Models\Answer; |
8 | use App\Models\CategoryEmp; | 8 | use App\Models\CategoryEmp; |
9 | use App\Models\Employer; | 9 | use App\Models\Employer; |
10 | use App\Models\Static_ad; | 10 | use App\Models\Static_ad; |
11 | use App\Models\User; | 11 | use App\Models\User; |
12 | use Illuminate\Http\Request; | 12 | use Illuminate\Http\Request; |
13 | use Illuminate\Support\Facades\DB; | 13 | use Illuminate\Support\Facades\DB; |
14 | use Illuminate\Support\Facades\Storage; | 14 | use Illuminate\Support\Facades\Storage; |
15 | use Illuminate\Support\Facades\Validator; | 15 | use Illuminate\Support\Facades\Validator; |
16 | 16 | ||
17 | class EmployersController extends Controller | 17 | class EmployersController extends Controller |
18 | { | 18 | { |
19 | public function index(Request $request) { | 19 | public function index(Request $request) { |
20 | //$all_employer = User::where('is_worker', '0')->count(); | 20 | //$all_employer = User::where('is_worker', '0')->count(); |
21 | 21 | ||
22 | if ($request->ajax()) { | 22 | if ($request->ajax()) { |
23 | $user = User::find($request->id); | 23 | $user = User::find($request->id); |
24 | $request->offsetUnset('id'); | 24 | $request->offsetUnset('id'); |
25 | $user->update($request->all()); | 25 | $user->update($request->all()); |
26 | } | 26 | } |
27 | 27 | ||
28 | $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.logo as emp_logo', 'emp.*']) | 28 | $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.logo as emp_logo', 'emp.*']) |
29 | ->join('employers as emp','emp.user_id','users.id') | 29 | ->join('employers as emp','emp.user_id','users.id') |
30 | ->where('users.is_worker', '0')->Realuser(); | 30 | ->where('users.is_worker', '0')->Realuser()->Notadmin(); |
31 | $all_employer = $users->count(); | 31 | $all_employer = $users->count(); |
32 | 32 | ||
33 | $find_cat = ""; | 33 | $find_cat = ""; |
34 | if (isset($request->category)) { | 34 | if (isset($request->category)) { |
35 | if ($request->category != 'Все категории') { | 35 | if ($request->category != 'Все категории') { |
36 | $users = $users->where('category', '=', $request->category); | 36 | $users = $users->where('category', '=', $request->category); |
37 | $find_cat = $request->category; | 37 | $find_cat = $request->category; |
38 | } | 38 | } |
39 | } | 39 | } |
40 | $find_key = ""; | 40 | $find_key = ""; |
41 | 41 | ||
42 | if (isset($request->find)) { | 42 | if (isset($request->find)) { |
43 | $find_key = $request->find; | 43 | $find_key = $request->find; |
44 | $users = $users->where(function($query) use($find_key) { | 44 | $users = $users->where(function($query) use($find_key) { |
45 | $query->Where('users.name', 'LIKE', "%$find_key%") | 45 | $query->Where('users.name', 'LIKE', "%$find_key%") |
46 | ->orWhere('emp.email', 'LIKE', "%$find_key%") | 46 | ->orWhere('emp.email', 'LIKE', "%$find_key%") |
47 | ->orWhere('emp.telephone', 'LIKE', "%$find_key%"); | 47 | ->orWhere('emp.telephone', 'LIKE', "%$find_key%"); |
48 | }); | 48 | }); |
49 | } | 49 | } |
50 | 50 | ||
51 | //DB::enableQueryLog(); | 51 | //DB::enableQueryLog(); |
52 | $users = $users->paginate(15); | 52 | $users = $users->paginate(15); |
53 | //dd(DB::getQueryLog()); | 53 | //dd(DB::getQueryLog()); |
54 | 54 | ||
55 | $select_category = CategoryEmp::query()->active()->get(); | 55 | $select_category = CategoryEmp::query()->active()->get(); |
56 | 56 | ||
57 | if ($request->ajax()) { | 57 | if ($request->ajax()) { |
58 | return view('admin.employer.index_ajax', compact('users')); | 58 | return view('admin.employer.index_ajax', compact('users')); |
59 | } else { | 59 | } else { |
60 | return view('admin.employer.index', compact('users', 'find_key', 'find_cat', 'all_employer', 'select_category')); | 60 | return view('admin.employer.index', compact('users', |
61 | 'find_key', | ||
62 | 'find_cat', | ||
63 | 'all_employer', | ||
64 | 'select_category')); | ||
61 | } | 65 | } |
62 | } | 66 | } |
63 | 67 | ||
64 | public function comment_read(Employer $employer) { | 68 | public function comment_read(Employer $employer) { |
65 | return view('admin.employer.comment', compact('employer')); | 69 | return view('admin.employer.comment', compact('employer')); |
66 | } | 70 | } |
67 | 71 | ||
68 | public function form_update_employer(Employer $employer) { | 72 | public function form_update_employer(Employer $employer) { |
69 | $select_category = CategoryEmp::query()->active()->get(); | 73 | $select_category = CategoryEmp::query()->active()->get(); |
70 | return view('admin.employer.edit', compact('employer', 'select_category')); | 74 | return view('admin.employer.edit', compact('employer', 'select_category')); |
71 | } | 75 | } |
72 | 76 | ||
73 | public function update_employer(Employer $employer, Request $request) | 77 | public function update_employer(Employer $employer, Request $request) |
74 | { | 78 | { |
75 | $params = $request->all(); | 79 | $params = $request->all(); |
76 | unset($params['logo']); | 80 | unset($params['logo']); |
77 | unset($params['telephone']); | 81 | unset($params['telephone']); |
78 | unset($params['email']); | 82 | unset($params['email']); |
79 | unset($params['address']); | 83 | unset($params['address']); |
80 | unset($params['site']); | 84 | unset($params['site']); |
81 | unset($params['status_hidden']); | 85 | unset($params['status_hidden']); |
82 | unset($params['oficial_status']); | 86 | unset($params['oficial_status']); |
83 | unset($params['social_is']); | 87 | unset($params['social_is']); |
84 | unset($params['sending_is']); | 88 | unset($params['sending_is']); |
85 | unset($params['category']); | 89 | unset($params['category']); |
86 | unset($params['comment_admin']); | 90 | unset($params['comment_admin']); |
87 | 91 | ||
88 | $rules = [ | 92 | $rules = [ |
89 | 'name' => 'required|string|max:255', | 93 | 'name' => 'required|string|max:255', |
90 | ]; | 94 | ]; |
91 | 95 | ||
92 | $messages = [ | 96 | $messages = [ |
93 | 'required' => 'Укажите обязательное поле «:attribute»', | 97 | 'required' => 'Укажите обязательное поле «:attribute»', |
94 | 'confirmed' => 'Пароли не совпадают', | 98 | 'confirmed' => 'Пароли не совпадают', |
95 | 'email' => 'Введите корректный email', | 99 | 'email' => 'Введите корректный email', |
96 | 'min' => [ | 100 | 'min' => [ |
97 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 101 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
98 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 102 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
99 | ], | 103 | ], |
100 | 'max' => [ | 104 | 'max' => [ |
101 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 105 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
102 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 106 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
103 | ], | 107 | ], |
104 | ]; | 108 | ]; |
105 | 109 | ||
106 | $validator = Validator::make($params, $rules, $messages); | 110 | $validator = Validator::make($params, $rules, $messages); |
107 | 111 | ||
108 | if ($validator->fails()) { | 112 | if ($validator->fails()) { |
109 | return back()->withErrors($validator)->withInput(); //->route('admin.register') | 113 | return back()->withErrors($validator)->withInput(); //->route('admin.register') |
110 | 114 | ||
111 | } else { | 115 | } else { |
112 | 116 | ||
113 | //$user = User::find($employer->user_id); | 117 | //$user = User::find($employer->user_id); |
114 | $user_id = $employer->user_id; | 118 | $user_id = $employer->user_id; |
115 | $employer->telephone = $request->telephone; | 119 | $employer->telephone = $request->telephone; |
116 | $employer->email = $request->email; | 120 | $employer->email = $request->email; |
117 | $employer->address = $request->address; | 121 | $employer->address = $request->address; |
118 | $employer->site = $request->site; | 122 | $employer->site = $request->site; |
119 | $employer->text = $request->text; | 123 | $employer->text = $request->text; |
120 | $employer->status_hidden = $request->status_hidden; | 124 | $employer->status_hidden = $request->status_hidden; |
121 | $employer->oficial_status = $request->oficial_status; | 125 | $employer->oficial_status = $request->oficial_status; |
122 | $employer->social_is = $request->social_is; | 126 | $employer->social_is = $request->social_is; |
123 | $employer->sending_is = $request->sending_is; | 127 | $employer->sending_is = $request->sending_is; |
124 | $employer->category = $request->category; | 128 | $employer->category = $request->category; |
125 | $employer->comment_admin = $request->comment_admin; | 129 | $employer->comment_admin = $request->comment_admin; |
126 | 130 | ||
127 | if ($request->has('logo')) { | 131 | if ($request->has('logo')) { |
128 | if (!empty($employer->logo)) { | 132 | if (!empty($employer->logo)) { |
129 | Storage::delete($employer->logo); | 133 | Storage::delete($employer->logo); |
130 | } | 134 | } |
131 | $employer->logo = $request->file('logo')->store("employer/$user_id", 'public'); | 135 | $employer->logo = $request->file('logo')->store("employer/$user_id", 'public'); |
132 | } | 136 | } |
133 | $employer->save(); | 137 | $employer->save(); |
134 | 138 | ||
135 | $user = User::find($user_id); | 139 | $user = User::find($user_id); |
136 | $user->update($params); | 140 | $user->update($params); |
137 | 141 | ||
138 | return redirect()->route('admin.employer-profile', ['employer' => $employer->id]) | 142 | return redirect()->route('admin.employer-profile', ['employer' => $employer->id]) |
139 | ->with('success', 'Данные были успешно сохранены'); | 143 | ->with('success', 'Данные были успешно сохранены'); |
140 | } | 144 | } |
141 | } | 145 | } |
142 | 146 | ||
143 | // Удаление работодателя, вакансий и профиля юзера | 147 | // Удаление работодателя, вакансий и профиля юзера |
144 | public function delete_employer(Employer $employer, User $user) { | 148 | public function delete_employer(Employer $employer, User $user) { |
145 | try { | 149 | try { |
146 | if (!empty($employer)) { | 150 | if (!empty($employer)) { |
147 | $employer->ads()->delete(); | ||
148 | if (!empty($employer->logo)) { | 151 | if (!empty($employer->logo)) { |
149 | Storage::delete($employer->logo); | 152 | Storage::delete($employer->logo); |
150 | } | 153 | } |
154 | |||
155 | foreach($employer->ads as $ad) { | ||
156 | $ads = Ad_employer::find($ad->id); | ||
157 | $ads->employer_id = 2; | ||
158 | $ads->is_remove = 1; | ||
159 | $ads->save(); | ||
160 | } | ||
161 | |||
151 | $employer->delete(); | 162 | $employer->delete(); |
152 | } | 163 | } |
153 | } finally { | 164 | } finally { |
154 | $user->delete(); | 165 | $user->delete(); |
155 | } | 166 | } |
156 | 167 | ||
157 | return redirect()->route('admin.employers')->with('success', 'Данные были удалены о работодателе'); | 168 | return redirect()->route('admin.employers')->with('success', 'Данные были удалены о работодателе'); |
158 | } | 169 | } |
159 | 170 | ||
160 | // кабинет - отзывы о работодателе для модерации | 171 | // кабинет - отзывы о работодателе для модерации |
161 | public function answers(Request $request) { | 172 | public function answers(Request $request) { |
162 | if ($request->ajax()) { | 173 | if ($request->ajax()) { |
163 | $user = Answer::find($request->id); | 174 | $user = Answer::find($request->id); |
164 | $request->offsetUnset('id'); | 175 | $request->offsetUnset('id'); |
165 | $user->update($request->all()); | 176 | $user->update($request->all()); |
166 | } | 177 | } |
167 | 178 | ||
168 | $answers = Answer::query()->orderByDesc('id')->paginate(15); | 179 | $answers = Answer::query()->orderByDesc('id')->paginate(15); |
169 | 180 | ||
170 | if ($request->ajax()) { | 181 | if ($request->ajax()) { |
171 | return view('admin.answers.index_ajax', compact('answers')); | 182 | return view('admin.answers.index_ajax', compact('answers')); |
172 | } else { | 183 | } else { |
173 | return view('admin.answers.index', compact('answers')); | 184 | return view('admin.answers.index', compact('answers')); |
174 | } | 185 | } |
175 | } | 186 | } |
176 | 187 | ||
177 | // кабинет - статистика вакансий работодателя | 188 | // кабинет - статистика вакансий работодателя |
178 | public function static_ads(Request $request) { | 189 | public function static_ads(Request $request) { |
179 | $stat = Static_ad::with('ads'); | 190 | $stat = Static_ad::with('ads'); |
180 | $ads = Ad_employer::query()->active()->OrderBy('id')->get(); | 191 | $ads = Ad_employer::query()->active()->OrderBy('id')->get(); |
181 | $periods = Static_ad::query()->distinct('year_month')->select('year_month')->get(); | 192 | $periods = Static_ad::query()->distinct('year_month')->select('year_month')->get(); |
182 | if ($request->ajax()) { | 193 | if ($request->ajax()) { |
183 | if (isset($request->ad_employer_id)) | 194 | if (isset($request->ad_employer_id)) |
184 | if (!$request->ad_employer_id == "0") | 195 | if (!$request->ad_employer_id == "0") |
185 | $stat = $stat->Where('ad_employer_id', '=', $request->ad_employer_id); | 196 | $stat = $stat->Where('ad_employer_id', '=', $request->ad_employer_id); |
186 | if (isset($request->year_month)) { | 197 | if (isset($request->year_month)) { |
187 | if (!$request->year_month == "0") | 198 | if (!$request->year_month == "0") |
188 | $stat = $stat->Where('year_month', '=', $request->year_month); | 199 | $stat = $stat->Where('year_month', '=', $request->year_month); |
189 | } | 200 | } |
190 | } | 201 | } |
191 | 202 | ||
192 | $stat = $stat->OrderByDesc('year_month'); | 203 | $stat = $stat->OrderByDesc('year_month'); |
193 | $stat = $stat->paginate(15); | 204 | $stat = $stat->paginate(15); |
194 | 205 | ||
195 | if ($request->ajax()) | 206 | if ($request->ajax()) |
196 | return view('admin.static.index_ads_ajax', compact('stat')); | 207 | return view('admin.static.index_ads_ajax', compact('stat')); |
197 | else | 208 | else |
198 | return view('admin.static.index_ads', compact('stat', 'ads', 'periods')); | 209 | return view('admin.static.index_ads', compact('stat', 'ads', 'periods')); |
199 | 210 | ||
200 | } | 211 | } |
201 | 212 | ||
202 | 213 | ||
203 | } | 214 | } |
app/Http/Controllers/Admin/UsersController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\BaseUserRequest; | 6 | use App\Http\Requests\BaseUserRequest; |
7 | use App\Models\Job_title; | ||
7 | use App\Models\User; | 8 | use App\Models\User; |
9 | use App\Models\Worker; | ||
8 | use Illuminate\Http\Request; | 10 | use Illuminate\Http\Request; |
9 | use Illuminate\Support\Facades\Auth; | 11 | use Illuminate\Support\Facades\Auth; |
10 | use Illuminate\Support\Facades\Storage; | 12 | use Illuminate\Support\Facades\Storage; |
11 | use PhpOffice\PhpSpreadsheet\Spreadsheet; | 13 | use PhpOffice\PhpSpreadsheet\Spreadsheet; |
12 | use PhpOffice\PhpSpreadsheet\Style\Alignment; | 14 | use PhpOffice\PhpSpreadsheet\Style\Alignment; |
13 | use PhpOffice\PhpSpreadsheet\Style\Border; | 15 | use PhpOffice\PhpSpreadsheet\Style\Border; |
14 | use PhpOffice\PhpSpreadsheet\Style\Font; | 16 | use PhpOffice\PhpSpreadsheet\Style\Font; |
15 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; | 17 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
16 | 18 | ||
17 | class UsersController extends Controller | 19 | class UsersController extends Controller |
18 | { | 20 | { |
19 | public function index(Request $request) { | 21 | public function index(Request $request) { |
20 | $title = 'Админка - Пользователи системы'; | 22 | $title = 'Админка - Пользователи системы'; |
21 | $id_admin = Auth::user()->id; | 23 | $id_admin = Auth::user()->id; |
22 | if ($request->ajax()) { | 24 | if ($request->ajax()) { |
23 | $user = User::find($request->id); | 25 | $user = User::find($request->id); |
24 | $request->offsetUnset('id'); | 26 | $request->offsetUnset('id'); |
25 | $user->update($request->all()); | 27 | $user->update($request->all()); |
26 | } | 28 | } |
27 | $find_key = ""; | 29 | $find_key = ""; |
28 | $users = User::query(); | 30 | $users = User::query(); |
29 | if (isset($request->find)) { | 31 | if (isset($request->find)) { |
30 | $find_key = $request->find; | 32 | $find_key = $request->find; |
31 | $users = $users->where('name', 'LIKE', "%$find_key%") | 33 | $users = $users->where('name', 'LIKE', "%$find_key%") |
32 | ->orWhere('email', 'LIKE', "%$find_key%"); | 34 | ->orWhere('email', 'LIKE', "%$find_key%"); |
33 | } | 35 | } |
34 | $users = $users->paginate(15); | 36 | $users = $users->paginate(15); |
35 | 37 | ||
36 | if ($request->ajax()) { | 38 | if ($request->ajax()) { |
37 | return view('admin.users.index_ajax', compact('users', 'id_admin')); | 39 | return view('admin.users.index_ajax', compact('users', 'id_admin')); |
38 | } else { | 40 | } else { |
39 | return view('admin.users.index', compact('users', 'title', 'id_admin', 'find_key')); | 41 | return view('admin.users.index', compact('users', 'title', 'id_admin', 'find_key')); |
40 | } | 42 | } |
41 | } | 43 | } |
42 | 44 | ||
43 | public function index_bd(Request $request) { | 45 | public function index_bd(Request $request) { |
44 | $title = 'Админка - Пользователи базы данных'; | 46 | $title = 'Админка - Пользователи базы данных'; |
45 | 47 | ||
46 | $find_key = ""; | 48 | $find_key = ""; |
47 | $users = User::query(); | 49 | $users = User::query(); |
48 | if (isset($request->find)) { | 50 | if (isset($request->find)) { |
49 | $find_key = $request->find; | 51 | $find_key = $request->find; |
50 | $users = $users->where('name', 'LIKE', "%$find_key%") | 52 | $users = $users->where('name', 'LIKE', "%$find_key%") |
51 | ->orWhere('email', 'LIKE', "%$find_key%") | 53 | ->orWhere('email', 'LIKE', "%$find_key%") |
52 | ->orWhere('telephone', 'LIKE', "%$find_key%"); | 54 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
53 | } | 55 | } |
54 | 56 | ||
55 | $users = $users->Baseuser()->paginate(15); | 57 | $users = $users->Baseuser()->paginate(15); |
56 | 58 | ||
57 | if ($request->ajax()) { | 59 | if ($request->ajax()) { |
58 | return view('admin.users.index_bd_ajax', compact('users')); | 60 | return view('admin.users.index_bd_ajax', compact('users')); |
59 | } else { | 61 | } else { |
60 | return view('admin.users.index_bd', compact('users', 'title', 'find_key')); | 62 | return view('admin.users.index_bd', compact('users', 'title', 'find_key')); |
61 | } | 63 | } |
62 | } | 64 | } |
63 | 65 | ||
64 | public function add_bd() { | 66 | public function add_bd() { |
65 | return view('admin.users.add'); | 67 | $list_job_titles = Job_title::query()->active()->orderBy('name', 'asc')->get(); |
68 | return view('admin.users.add', compact('list_job_titles')); | ||
66 | } | 69 | } |
67 | 70 | ||
68 | public function add_store_bd(BaseUserRequest $request) { | 71 | public function add_store_bd(BaseUserRequest $request) { |
69 | $params = $request->all(); | 72 | $params = $request->all(); |
73 | $position_work = $request->position_work; | ||
70 | 74 | ||
71 | if ($request->has('file')) { | 75 | if ($request->has('file')) { |
72 | $params['file'] = $request->file('file')->store('basedata', 'public'); | 76 | $params['file'] = $request->file('file')->store('basedata', 'public'); |
73 | } | 77 | } |
74 | 78 | ||
79 | if (isset($request->name)) { | ||
80 | $params['name'] = $request->surname." ".$request->name_man." ".$request->surname2; | ||
81 | } | ||
82 | |||
75 | $user = User::create($params); | 83 | $user = User::create($params); |
84 | $user_id = $user->id; | ||
85 | $worker = new Worker(); | ||
86 | $worker->position_work = $position_work; | ||
87 | $worker->user_id = $user_id; | ||
88 | $worker->save(); | ||
89 | |||
76 | return redirect()->route('admin.basedata'); | 90 | return redirect()->route('admin.basedata'); |
77 | } | 91 | } |
78 | 92 | ||
79 | public function edit_bd(User $user) { | 93 | public function edit_bd(User $user) { |
80 | return view('admin.users.edit', compact('user')); | 94 | $list_job_titles = Job_title::query()->active()->orderBy('name', 'asc')->get(); |
95 | return view('admin.users.edit', compact('user', 'list_job_titles')); | ||
81 | } | 96 | } |
82 | 97 | ||
83 | public function update_bd(BaseUserRequest $request, User $user) { | 98 | public function update_bd(BaseUserRequest $request, User $user) { |
84 | $params = $request->all(); | 99 | $params = $request->all(); |
100 | $position_work = $request->position_work; | ||
85 | 101 | ||
86 | if ($request->has('file')) { | 102 | if ($request->has('file')) { |
87 | if (!empty($user->file)) Storage::delete($user->file); | 103 | if (!empty($user->file)) Storage::delete($user->file); |
88 | $params['file'] = $request->file('file')->store('basedata', 'public'); | 104 | $params['file'] = $request->file('file')->store('basedata', 'public'); |
89 | } else { | 105 | } else { |
90 | if (!empty($user->image)) $params['file'] = $user->file; | 106 | if (!empty($user->image)) $params['file'] = $user->file; |
91 | } | 107 | } |
92 | 108 | ||
109 | if (isset($request->name)) { | ||
110 | $params['name'] = $request->surname." ".$request->name_man." ".$request->surname2; | ||
111 | } | ||
112 | |||
93 | $user->update($params); | 113 | $user->update($params); |
114 | if (isset($user->workers[0]->id)) { | ||
115 | $worker = Worker::find($user->workers[0]->id); | ||
116 | $worker->position_work = $position_work; | ||
117 | $worker->save(); | ||
118 | } else { | ||
119 | $worker = new Worker(); | ||
120 | $worker->user_id = $user->id; | ||
121 | $worker->position_work = $position_work; | ||
122 | $worker->save(); | ||
123 | } | ||
124 | |||
94 | return redirect()->route('admin.basedata'); | 125 | return redirect()->route('admin.basedata'); |
95 | } | 126 | } |
96 | 127 | ||
97 | public function destroy_bd(User $user) { | 128 | public function destroy_bd(User $user) { |
98 | $user->delete(); | 129 | $user->delete(); |
99 | return redirect()->route('admin.basedata'); | 130 | return redirect()->route('admin.basedata'); |
100 | } | 131 | } |
101 | 132 | ||
102 | public function roles(Request $request) { | 133 | public function roles(Request $request) { |
103 | if ($request->ajax()) { | 134 | if ($request->ajax()) { |
104 | $user = User::find($request->id); | 135 | $user = User::find($request->id); |
105 | $request->offsetUnset('id'); | 136 | $request->offsetUnset('id'); |
106 | $user->update($request->all()); | 137 | $user->update($request->all()); |
107 | } | 138 | } |
108 | 139 | ||
109 | $users = User::query()->Realuser()->paginate(15); | 140 | $users = User::query()->Realuser()->paginate(15); |
110 | 141 | ||
111 | if ($request->ajax()) { | 142 | if ($request->ajax()) { |
112 | return view('admin.users.roles.index_ajax', compact('users')); | 143 | return view('admin.users.roles.index_ajax', compact('users')); |
113 | } else { | 144 | } else { |
114 | return view('admin.users.roles.index', compact('users')); | 145 | return view('admin.users.roles.index', compact('users')); |
115 | } | 146 | } |
116 | } | 147 | } |
117 | 148 | ||
118 | public function doc_bd(User $user) { | 149 | public function doc_bd(User $user) { |
119 | $id = $user->id; | 150 | $id = $user->id; |
120 | $spreadsheet = new Spreadsheet(); | 151 | $spreadsheet = new Spreadsheet(); |
121 | $activeWorksheet = $spreadsheet->getActiveSheet(); | 152 | $activeWorksheet = $spreadsheet->getActiveSheet(); |
122 | $activeWorksheet->setCellValue('A1', 'Отчет по соискателю'); | 153 | $activeWorksheet->setCellValue('A1', 'Отчет по соискателю'); |
123 | $activeWorksheet->getStyle('A1')->applyFromArray([ | 154 | $activeWorksheet->getStyle('A1')->applyFromArray([ |
124 | 'font' => [ | 155 | 'font' => [ |
125 | 'name' => 'Arial', | 156 | 'name' => 'Arial', |
126 | 'bold' => true, | 157 | 'bold' => true, |
127 | 'italic' => false, | 158 | 'italic' => false, |
128 | 'underline' => Font::UNDERLINE_DOUBLE, | 159 | 'underline' => Font::UNDERLINE_DOUBLE, |
129 | 'strikethrough' => false, | 160 | 'strikethrough' => false, |
130 | 'color' => [ | 161 | 'color' => [ |
131 | 'rgb' => '808080' | 162 | 'rgb' => '808080' |
132 | ] | 163 | ] |
133 | ], | 164 | ], |
134 | 'borders' => [ | 165 | 'borders' => [ |
135 | 'allBorders' => [ | 166 | 'allBorders' => [ |
136 | 'borderStyle' => Border::BORDER_THIN, | 167 | 'borderStyle' => Border::BORDER_THIN, |
137 | 'color' => [ | 168 | 'color' => [ |
138 | 'rgb' => '808080' | 169 | 'rgb' => '808080' |
139 | ] | 170 | ] |
140 | ], | 171 | ], |
141 | 'outline' => array( | 172 | 'outline' => array( |
142 | 'style' => Border::BORDER_THIN, | 173 | 'style' => Border::BORDER_THIN, |
143 | 'color' => array('rgb' => '000000') | 174 | 'color' => array('rgb' => '000000') |
144 | ), | 175 | ), |
145 | ], | 176 | ], |
146 | 177 | ||
147 | 'alignment' => [ | 178 | 'alignment' => [ |
148 | 'horizontal' => Alignment::HORIZONTAL_CENTER, | 179 | 'horizontal' => Alignment::HORIZONTAL_CENTER, |
149 | 'vertical' => Alignment::VERTICAL_CENTER, | 180 | 'vertical' => Alignment::VERTICAL_CENTER, |
150 | 'wrapText' => true, | 181 | 'wrapText' => true, |
151 | ] | 182 | ] |
152 | ]); | 183 | ]); |
153 | 184 | ||
154 | $activeWorksheet->setCellValue('A2', "Псевдоним/имя: ".$user->name); | 185 | $activeWorksheet->setCellValue('A2', "Псевдоним/имя: ".$user->name); |
155 | $activeWorksheet->setCellValue('A3', "Фамилия: ".$user->surname); | 186 | $activeWorksheet->setCellValue('A3', "Фамилия: ".$user->surname); |
156 | $activeWorksheet->setCellValue('A4', "Имя: ".$user->name_man); | 187 | $activeWorksheet->setCellValue('A4', "Имя: ".$user->name_man); |
157 | $activeWorksheet->setCellValue('A5', "Отчество: ".$user->surname2); | 188 | $activeWorksheet->setCellValue('A5', "Отчество: ".$user->surname2); |
158 | $activeWorksheet->setCellValue('A6', "Телефон: ".$user->telephone); | 189 | $activeWorksheet->setCellValue('A6', "Телефон: ".$user->telephone); |
159 | $activeWorksheet->setCellValue('A7', "Емайл: ".$user->email); | 190 | $activeWorksheet->setCellValue('A7', "Емайл: ".$user->email); |
160 | 191 | ||
161 | if (isset($user->workers[0]->id)) { | 192 | if (isset($user->workers[0]->id)) { |
162 | $activeWorksheet->setCellValue('A9', "Анкета: "); | 193 | $activeWorksheet->setCellValue('A9', "Анкета: "); |
163 | $activeWorksheet->setCellValue('A10', "Телефон: " . $user->workers[0]->telephone); | 194 | $activeWorksheet->setCellValue('A10', "Телефон: " . $user->workers[0]->telephone); |
164 | $activeWorksheet->setCellValue('A11', "Емайл: " . $user->workers[0]->email); | 195 | $activeWorksheet->setCellValue('A11', "Емайл: " . $user->workers[0]->email); |
165 | } | 196 | } |
166 | 197 | ||
167 | if (isset($user->jobtitles[0]->id)) { | 198 | if (isset($user->jobtitles[0]->id)) { |
168 | $activeWorksheet->setCellValue('A12', "Должность: " . $user->jobtitles[0]->name); | 199 | $activeWorksheet->setCellValue('A12', "Должность: " . $user->jobtitles[0]->name); |
169 | } | 200 | } |
170 | $activeWorksheet->getColumnDimension("A")->setWidth(100); | 201 | $activeWorksheet->getColumnDimension("A")->setWidth(100); |
171 | $writer = new Xlsx($spreadsheet); | 202 | $writer = new Xlsx($spreadsheet); |
172 | 203 | ||
173 | header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); | 204 | header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); |
174 | header('Content-Disposition: attachment; filename="user'.$id.'.xlsx"'); | 205 | header('Content-Disposition: attachment; filename="user'.$id.'.xlsx"'); |
175 | header('Cache-Control: no-cache'); | 206 | header('Cache-Control: no-cache'); |
176 | 207 | ||
177 | $writer->save('php://output'); | 208 | $writer->save('php://output'); |
178 | $writer->save(storage_path("app/public/export/user$id.xlsx")); | 209 | $writer->save(storage_path("app/public/export/user$id.xlsx")); |
179 | 210 | ||
180 | //$spreadsheet->disconnectWorksheets(); | 211 | //$spreadsheet->disconnectWorksheets(); |
181 | return redirect()->route('admin.basedata'); | 212 | return redirect()->route('admin.basedata'); |
182 | 213 | ||
183 | } | 214 | } |
184 | } | 215 | } |
185 | 216 |
app/Http/Controllers/Admin/WorkersController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\WorkerRequest; | 6 | use App\Http\Requests\WorkerRequest; |
7 | use App\Models\Company; | 7 | use App\Models\Company; |
8 | use App\Models\Job_title; | 8 | use App\Models\Job_title; |
9 | use App\Models\Static_worker; | 9 | use App\Models\Static_worker; |
10 | use App\Models\User; | 10 | use App\Models\User; |
11 | use App\Models\Worker; | 11 | use App\Models\Worker; |
12 | use Carbon\Carbon; | 12 | use Carbon\Carbon; |
13 | use Illuminate\Database\Eloquent\Builder; | 13 | use Illuminate\Database\Eloquent\Builder; |
14 | use Illuminate\Http\Request; | 14 | use Illuminate\Http\Request; |
15 | use Illuminate\Support\Facades\DB; | 15 | use Illuminate\Support\Facades\DB; |
16 | use Illuminate\Support\Facades\Storage; | 16 | use Illuminate\Support\Facades\Storage; |
17 | use Illuminate\Support\Facades\Validator; | 17 | use Illuminate\Support\Facades\Validator; |
18 | 18 | ||
19 | class WorkersController extends Controller | 19 | class WorkersController extends Controller |
20 | { | 20 | { |
21 | 21 | ||
22 | public $Status_work = [ | 22 | public $Status_work = [ |
23 | '0' => 'Не ищу работу', | 23 | '0' => 'Не ищу работу', |
24 | '1' => 'Ищу работу', | 24 | '1' => 'Ищу работу', |
25 | '2' => 'Не указано' | 25 | '2' => 'Не указано' |
26 | ]; | 26 | ]; |
27 | 27 | ||
28 | public function index(Request $request) { | 28 | public function index(Request $request) { |
29 | if ($request->ajax()) { | 29 | if ($request->ajax()) { |
30 | $user = User::find($request->id); | 30 | $user = User::find($request->id); |
31 | $request->offsetUnset('id'); | 31 | $request->offsetUnset('id'); |
32 | $user->update($request->all()); | 32 | $user->update($request->all()); |
33 | } | 33 | } |
34 | 34 | ||
35 | $status_work = Job_title::query()->active()->orderBy('name')->get(); | 35 | $status_work = Job_title::query()->active()->orderBy('name')->get(); |
36 | $users = User::with('jobtitles')->where('is_worker', '1'); | 36 | $users = User::with('jobtitles')->worker()->realuser(); |
37 | $all_worker = $users->count(); | ||
37 | 38 | ||
38 | $find_status_work = ""; | 39 | $find_status_work = ""; |
39 | if (isset($request->status_work)) { | 40 | if (isset($request->status_work)) { |
40 | $find_status_work = $request->status_work; | 41 | $find_status_work = $request->status_work; |
41 | //$users = $users->where('position_work', '=', $find_status_work); | 42 | //$users = $users->where('position_work', '=', $find_status_work); |
42 | 43 | ||
43 | /*if ($request->status_work > 0) | 44 | /*if ($request->status_work > 0) |
44 | $users = $users->with(['workers' => function($query) use ($find_status_work){ | 45 | $users = $users->with(['workers' => function($query) use ($find_status_work){ |
45 | $query->where('position_work', $find_status_work); | 46 | $query->where('position_work', $find_status_work); |
46 | }]); | 47 | }]); |
47 | else | 48 | else |
48 | $users = $users->with('workers');*/ | 49 | $users = $users->with('workers');*/ |
49 | 50 | ||
50 | /*$users = $users->where(function($query) use($find_status_work) { | 51 | /*$users = $users->where(function($query) use($find_status_work) { |
51 | $query->with(['workers' => function($query1) use ($find_status_work){ | 52 | $query->with(['workers' => function($query1) use ($find_status_work){ |
52 | $query1->where('position_work', $find_status_work); | 53 | $query1->where('position_work', $find_status_work); |
53 | }]); | 54 | }]); |
54 | });*/ | 55 | });*/ |
55 | if ($request->status_work > 0) { | 56 | if ($request->status_work > 0) { |
56 | $users = $users->with('workers')-> | 57 | $users = $users->with('workers')-> |
57 | whereHas('workers', | 58 | whereHas('workers', |
58 | function (Builder $query) use ($find_status_work) { | 59 | function (Builder $query) use ($find_status_work) { |
59 | $query->where('position_work', $find_status_work); | 60 | $query->where('position_work', $find_status_work); |
60 | } | 61 | } |
61 | ); | 62 | ); |
62 | } else { | 63 | } else { |
63 | $users = $users->with('workers'); | 64 | $users = $users->with('workers'); |
64 | } | 65 | } |
65 | 66 | ||
66 | } else { | 67 | } else { |
67 | $users = $users->with('workers'); | 68 | $users = $users->with('workers'); |
68 | } | 69 | } |
69 | 70 | ||
70 | $find_key = ""; | 71 | $find_key = ""; |
71 | if (isset($request->find)) { | 72 | if (isset($request->find)) { |
72 | $find_key = $request->find; | 73 | $find_key = $request->find; |
73 | $users = $users->where(function($query) use($find_key) { | 74 | $users = $users->where(function($query) use($find_key) { |
74 | $query->Where('name_man', 'LIKE', "%$find_key%") | 75 | $query->Where('name_man', 'LIKE', "%$find_key%") |
75 | ->orWhere('email', 'LIKE', "%$find_key%") | 76 | ->orWhere('email', 'LIKE', "%$find_key%") |
76 | ->orWhere('telephone', 'LIKE', "%$find_key%") | 77 | ->orWhere('telephone', 'LIKE', "%$find_key%") |
77 | ->orWhere('surname', 'LIKE', "%$find_key%") | 78 | ->orWhere('surname', 'LIKE', "%$find_key%") |
78 | ->orWhere('surname2', 'LIKE', "%$find_key%"); | 79 | ->orWhere('surname2', 'LIKE', "%$find_key%"); |
79 | }); | 80 | }); |
80 | } | 81 | } |
81 | 82 | ||
82 | $users = $users->Realuser()->paginate(15); | 83 | $users = $users->Realuser()->paginate(15); |
83 | 84 | ||
84 | /* | 85 | /* |
85 | $Arr = array(); | 86 | $Arr = array(); |
86 | $where = ''; | 87 | $where = ''; |
87 | $find_status_work = ""; | 88 | $find_status_work = ""; |
88 | if (isset($request->status_work)) { | 89 | if (isset($request->status_work)) { |
89 | $find_status_work = $request->status_work; | 90 | $find_status_work = $request->status_work; |
90 | //$users = $users->where('position_work', '=', $find_status_work); | 91 | //$users = $users->where('position_work', '=', $find_status_work); |
91 | $where.= ' and (w.position_work = :uid1)'; | 92 | $where.= ' and (w.position_work = :uid1)'; |
92 | $Arr['uid1'] = $find_status_work; | 93 | $Arr['uid1'] = $find_status_work; |
93 | } | 94 | } |
94 | 95 | ||
95 | $find_key = ""; | 96 | $find_key = ""; |
96 | if (isset($request->find)) { | 97 | if (isset($request->find)) { |
97 | $find_key = $request->find; | 98 | $find_key = $request->find; |
98 | /*$users = $users->where(function($query) use($find_key) { | 99 | /*$users = $users->where(function($query) use($find_key) { |
99 | $query->Where('name_man', 'LIKE', "%$find_key%") | 100 | $query->Where('name_man', 'LIKE', "%$find_key%") |
100 | ->orWhere('email', 'LIKE', "%$find_key%") | 101 | ->orWhere('email', 'LIKE', "%$find_key%") |
101 | ->orWhere('telephone', 'LIKE', "%$find_key%"); | 102 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
102 | });*/ | 103 | });*/ |
103 | /*$where.= " and ((u.name_man LIKE %:uid2%) or (w.email LIKE %:uid2%) or (w.telephone LIKE %:uid2%))"; | 104 | /*$where.= " and ((u.name_man LIKE %:uid2%) or (w.email LIKE %:uid2%) or (w.telephone LIKE %:uid2%))"; |
104 | $Arr['uid2'] = $find_key; | 105 | $Arr['uid2'] = $find_key; |
105 | } | 106 | } |
106 | 107 | ||
107 | //$users = $users->paginate(15); | 108 | //$users = $users->paginate(15); |
108 | 109 | ||
109 | //DB::enableQueryLog(); | 110 | //DB::enableQueryLog(); |
110 | $users = DB::select('SELECT u.*, w.*, j.* | 111 | $users = DB::select('SELECT u.*, w.*, j.* |
111 | FROM workers w | 112 | FROM workers w |
112 | JOIN users u ON u.id = w.user_id | 113 | JOIN users u ON u.id = w.user_id |
113 | JOIN job_titles j ON j.id = w.position_work | 114 | JOIN job_titles j ON j.id = w.position_work |
114 | Where (u.is_worker = 1) | 115 | Where (u.is_worker = 1) |
115 | '.$where, $Arr); | 116 | '.$where, $Arr); |
116 | //dump(DB::getQueryLog()); | 117 | //dump(DB::getQueryLog()); |
117 | dd($users); | 118 | dd($users); |
118 | */ | 119 | */ |
119 | 120 | ||
120 | $status_wor = $this->Status_work; | 121 | $status_wor = $this->Status_work; |
121 | 122 | ||
122 | if ($request->ajax()) { | 123 | if ($request->ajax()) { |
123 | return view('admin.worker.index_ajax', compact('users', 'status_wor')); | 124 | return view('admin.worker.index_ajax', compact('users', 'status_wor')); |
124 | } else { | 125 | } else { |
125 | return view('admin.worker.index', compact('users', | 126 | return view('admin.worker.index', compact('users', |
126 | 'find_key', | 127 | 'find_key', |
127 | 'find_status_work', | 128 | 'find_status_work', |
128 | 'status_work', | 129 | 'status_work', |
129 | 'status_wor')); | 130 | 'status_wor', |
131 | 'all_worker')); | ||
130 | } | 132 | } |
131 | } | 133 | } |
132 | 134 | ||
133 | public function form_add_worker(User $user) { | 135 | public function form_add_worker(User $user) { |
134 | $job_titles = Job_title::query()->active()->orderBy('name')->get(); | 136 | $job_titles = Job_title::query()->active()->orderBy('name')->get(); |
135 | 137 | ||
136 | $time_end_anketa = 'Создана только'; | 138 | $time_end_anketa = 'Создана только'; |
137 | $long_days = Company::find(1)->time_resume; | 139 | $long_days = Company::find(1)->time_resume; |
138 | $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days")); | 140 | $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days")); |
139 | 141 | ||
140 | return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa')); | 142 | return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa')); |
141 | } | 143 | } |
142 | 144 | ||
143 | public function form_store_worker(WorkerRequest $request, User $user) { | 145 | public function form_store_worker(WorkerRequest $request, User $user) { |
144 | $params = $request->all(); | 146 | $params = $request->all(); |
145 | $worker = Worker::create($params); | 147 | $worker = Worker::create($params); |
146 | return redirect()->route('admin.basedata'); | 148 | return redirect()->route('admin.basedata'); |
147 | } | 149 | } |
148 | 150 | ||
149 | public function form_edit_worker(Worker $worker) { | 151 | public function form_edit_worker(Worker $worker) { |
150 | $job_titles = Job_title::query()->active()->orderBy('name')->get(); | 152 | $job_titles = Job_title::query()->active()->orderBy('name')->get(); |
151 | 153 | ||
152 | $time_end_anketa = 'Бессрочно'; | 154 | $time_end_anketa = 'Бессрочно'; |
153 | if (!empty($worker->updated_at)) { | 155 | if (!empty($worker->updated_at)) { |
154 | $long_days = Company::find(1)->time_resume; | 156 | $long_days = Company::find(1)->time_resume; |
155 | $time_end_anketa = date("d.m.Y H:i:s", strtotime($worker->updated_at . "+$long_days days")); | 157 | $time_end_anketa = date("d.m.Y H:i:s", strtotime($worker->updated_at . "+$long_days days")); |
156 | } | 158 | } |
157 | return view('admin.worker.edit', compact('worker', 'job_titles', 'time_end_anketa')); | 159 | return view('admin.worker.edit', compact('worker', 'job_titles', 'time_end_anketa')); |
158 | } | 160 | } |
159 | 161 | ||
160 | public function form_update_worker(Request $request, Worker $worker) | 162 | public function form_update_worker(Request $request, Worker $worker) |
161 | { | 163 | { |
162 | $params = $request->all(); | 164 | $params = $request->all(); |
163 | 165 | ||
164 | $rules = [ | 166 | $rules = [ |
165 | 'email' => 'email|string|max:255', | 167 | 'email' => 'email|string|max:255', |
166 | //'photo' => 'mimes:jpeg,jpg,png|max:15000', | 168 | //'photo' => 'mimes:jpeg,jpg,png|max:15000', |
167 | ]; | 169 | ]; |
168 | 170 | ||
169 | $messages = [ | 171 | $messages = [ |
170 | 'required' => 'Укажите обязательное поле «:attribute»', | 172 | 'required' => 'Укажите обязательное поле «:attribute»', |
171 | 'confirmed' => 'Пароли не совпадают', | 173 | 'confirmed' => 'Пароли не совпадают', |
172 | 'email' => 'Введите корректный email', | 174 | 'email' => 'Введите корректный email', |
173 | 'min' => [ | 175 | 'min' => [ |
174 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 176 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
175 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 177 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
176 | ], | 178 | ], |
177 | 'max' => [ | 179 | 'max' => [ |
178 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 180 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
179 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 181 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
180 | ], | 182 | ], |
181 | ]; | 183 | ]; |
182 | 184 | ||
183 | $validator = Validator::make($params, $rules, $messages); | 185 | $validator = Validator::make($params, $rules, $messages); |
184 | 186 | ||
185 | if ($validator->fails()) { | 187 | if ($validator->fails()) { |
186 | return back()->withErrors($validator)->withInput(); | 188 | return back()->withErrors($validator)->withInput(); |
187 | } else { | 189 | } else { |
188 | $user_id = $worker->user_id; | 190 | $user_id = $worker->user_id; |
189 | if ($request->has('photo')) { | 191 | if ($request->has('photo')) { |
190 | if (!empty($worker->photo)) { | 192 | if (!empty($worker->photo)) { |
191 | Storage::delete($worker->photo); | 193 | Storage::delete($worker->photo); |
192 | } | 194 | } |
193 | if (!empty($request->photo)) | 195 | if (!empty($request->photo)) |
194 | $params['photo'] = $request->file('photo')->store("workers/$user_id", 'public'); | 196 | $params['photo'] = $request->file('photo')->store("workers/$user_id", 'public'); |
195 | } | 197 | } |
196 | $worker->update($params); | 198 | $worker->update($params); |
197 | 199 | ||
198 | return redirect()->route('admin.workers'); | 200 | return redirect()->route('admin.workers'); |
199 | } | 201 | } |
200 | } | 202 | } |
201 | 203 | ||
202 | // кабинет - статистика работников | 204 | // кабинет - статистика работников |
203 | public function static_workers(Request $request) { | 205 | public function static_workers(Request $request) { |
204 | $stat = Static_worker::with('users'); | 206 | $stat = Static_worker::with('users'); |
205 | //->join('users', 'users.id', '=', 'static_workers.user_id'); | 207 | //->join('users', 'users.id', '=', 'static_workers.user_id'); |
206 | $users = User::query()->active()->OrderBy('id')->get(); | 208 | $users = User::query()->active()->OrderBy('id')->get(); |
207 | $periods = Static_worker::query()->distinct('year_month')->select('year_month')->get(); | 209 | $periods = Static_worker::query()->distinct('year_month')->select('year_month')->get(); |
208 | if ($request->ajax()) { | 210 | if ($request->ajax()) { |
209 | if (isset($request->user_id)) | 211 | if (isset($request->user_id)) |
210 | if (!$request->user_id == "0") | 212 | if (!$request->user_id == "0") |
211 | $stat = $stat->Where('user_id', '=', $request->user_id); | 213 | $stat = $stat->Where('user_id', '=', $request->user_id); |
212 | if (isset($request->year_month)) { | 214 | if (isset($request->year_month)) { |
213 | if (!$request->year_month == "0") | 215 | if (!$request->year_month == "0") |
214 | $stat = $stat->Where('year_month', '=', $request->year_month); | 216 | $stat = $stat->Where('year_month', '=', $request->year_month); |
215 | } | 217 | } |
216 | } | 218 | } |
217 | 219 | ||
218 | $stat = $stat->OrderByDesc('year_month'); | 220 | $stat = $stat->OrderByDesc('year_month'); |
219 | //->OrderBy('users.name'); | 221 | //->OrderBy('users.name'); |
220 | //OrderBy('users.name')-> | 222 | //OrderBy('users.name')-> |
221 | /*$stat->implode() loadMissing(['users' => function (Builder $query) { | 223 | /*$stat->implode() loadMissing(['users' => function (Builder $query) { |
222 | $query->orderBy('name', 'asc'); | 224 | $query->orderBy('name', 'asc'); |
223 | }]);*/ | 225 | }]);*/ |
224 | 226 | ||
225 | $stat = $stat->paginate(15); | 227 | $stat = $stat->paginate(15); |
226 | 228 | ||
227 | if ($request->ajax()) | 229 | if ($request->ajax()) |
228 | return view('admin.static.index_workers_ajax', compact('stat')); | 230 | return view('admin.static.index_workers_ajax', compact('stat')); |
229 | else | 231 | else |
230 | return view('admin.static.index_workers', compact('stat', 'users', 'periods')); | 232 | return view('admin.static.index_workers', compact('stat', 'users', 'periods')); |
231 | 233 | ||
232 | } | 234 | } |
233 | 235 | ||
234 | } | 236 | } |
235 | 237 |
app/Http/Controllers/MediaController.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Controllers; | ||
4 | |||
5 | use App\Models\Media; | ||
6 | use Illuminate\Http\Request; | ||
7 | use Illuminate\Support\Facades\Storage; | ||
8 | |||
9 | class MediaController extends Controller | ||
10 | { | ||
11 | public function index() { | ||
12 | $Media = Media::query()->OrderBy('id', 'desc')->paginate(); | ||
13 | return view('admin.media.index', compact('Media')); | ||
14 | } | ||
15 | |||
16 | public function delete(Media $media) { | ||
17 | if (!empty($media->file)){ | ||
18 | Storage::delete($media->file); | ||
19 | } | ||
20 | |||
21 | $media->delete(); | ||
22 | return redirect()->route('admin.media'); | ||
23 | } | ||
24 | } | ||
25 |
app/Http/Requests/BaseUserRequest.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Requests; | 3 | namespace App\Http\Requests; |
4 | 4 | ||
5 | use Illuminate\Foundation\Http\FormRequest; | 5 | use Illuminate\Foundation\Http\FormRequest; |
6 | 6 | ||
7 | class BaseUserRequest extends FormRequest | 7 | class BaseUserRequest extends FormRequest |
8 | { | 8 | { |
9 | /** | 9 | /** |
10 | * Determine if the user is authorized to make this request. | 10 | * Determine if the user is authorized to make this request. |
11 | * | 11 | * |
12 | * @return bool | 12 | * @return bool |
13 | */ | 13 | */ |
14 | public function authorize() | 14 | public function authorize() |
15 | { | 15 | { |
16 | return true; | 16 | return true; |
17 | } | 17 | } |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * Get the validation rules that apply to the request. | 20 | * Get the validation rules that apply to the request. |
21 | * | 21 | * |
22 | * @return array<string, mixed> | 22 | * @return array<string, mixed> |
23 | */ | 23 | */ |
24 | public function rules() | 24 | public function rules() |
25 | { | 25 | { |
26 | |||
27 | $unique ='|unique:users'; | ||
28 | if (in_array($this->route()->getName(), ['admin.update-basedata'])) { | ||
29 | $unique = '|unique:users,email,'.$this->user->id; | ||
30 | } | ||
31 | |||
26 | return [ | 32 | return [ |
27 | 'name' => 'required|min:3|max:255', | 33 | //'name' => 'required|min:3|max:255', |
28 | 'surname' => 'required|min:3|max:255', | 34 | 'surname' => 'required|min:3|max:255', |
29 | 'name_man' => 'required|min:3|max:255', | 35 | 'name_man' => 'required|min:3|max:255', |
30 | 'email' => 'required|email|min:5', | 36 | 'email' => 'required|email|min:5'.$unique, |
31 | ]; | 37 | ]; |
32 | } | 38 | } |
33 | 39 | ||
34 | public function messages() { | 40 | public function messages() { |
35 | return [ | 41 | return [ |
36 | 'required' => 'Поле :attribute обязательно для ввода', | 42 | 'required' => 'Поле :attribute обязательно для ввода', |
37 | 'min' => [ | 43 | 'min' => [ |
38 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 44 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
39 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 45 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
40 | ], | 46 | ], |
41 | 'max' => [ | 47 | 'max' => [ |
42 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 48 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
43 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 49 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
44 | ], | 50 | ], |
45 | 'email' => 'Введите корректный емайл' | 51 | 'email' => 'Введите корректный емайл', |
52 | 'unique' => 'Емайл должен быть уникальным', | ||
46 | 53 | ||
47 | ]; | 54 | ]; |
48 | } | 55 | } |
49 | } | 56 | } |
50 | 57 |
app/Models/Employer.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class Employer extends Model | 8 | class Employer extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | 11 | ||
12 | protected $fillable = [ | 12 | protected $fillable = [ |
13 | 'name_company', | 13 | 'name_company', |
14 | 'email', | 14 | 'email', |
15 | 'telephone', | 15 | 'telephone', |
16 | 'logo', | 16 | 'logo', |
17 | 'rate', | 17 | 'rate', |
18 | 'user_id', | 18 | 'user_id', |
19 | 'sort', | 19 | 'sort', |
20 | 'text', | 20 | 'text', |
21 | 'address', | 21 | 'address', |
22 | 'map', | 22 | 'map', |
23 | 'site', | 23 | 'site', |
24 | 'coord', | 24 | 'coord', |
25 | 'plus', | 25 | 'plus', |
26 | 'is_remove', | 26 | 'is_remove', |
27 | 'oficial_status', | 27 | 'oficial_status', |
28 | 'social_is', | 28 | 'social_is', |
29 | 'sending_is', | 29 | 'sending_is', |
30 | 'category', | ||
31 | 'comment_admin', | ||
32 | 'code', | ||
33 | 'status_hidden' | ||
30 | ]; | 34 | ]; |
31 | 35 | ||
32 | /* | 36 | /* |
33 | * Связь таблицы users с таблицей employers | 37 | * Связь таблицы users с таблицей employers |
34 | */ | 38 | */ |
35 | public function users() { | 39 | public function users() { |
36 | return $this->belongsTo(User::class, 'user_id'); | 40 | return $this->belongsTo(User::class, 'user_id'); |
37 | } | 41 | } |
38 | 42 | ||
39 | /* | 43 | /* |
40 | * Связь Работодателя с вакансиями | 44 | * Связь Работодателя с вакансиями |
41 | */ | 45 | */ |
42 | public function ads() { | 46 | public function ads() { |
43 | return $this->hasMany(Ad_employer::class); | 47 | return $this->hasMany(Ad_employer::class); |
44 | } | 48 | } |
45 | 49 | ||
46 | public function scopeActive($query) { | 50 | public function scopeActive($query) { |
47 | return $query->where('is_remove', '=', '0'); | 51 | return $query->where('is_remove', '=', '0'); |
48 | } | 52 | } |
49 | 53 | ||
50 | } | 54 | } |
51 | 55 |
app/Models/Media.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Models; | ||
4 | |||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
6 | use Illuminate\Database\Eloquent\Model; | ||
7 | |||
8 | class Media extends Model | ||
9 | { | ||
10 | use HasFactory; | ||
11 | |||
12 | protected $fillable = [ | ||
13 | 'user_id', | ||
14 | 'file', | ||
15 | ]; | ||
16 | |||
17 | /* | ||
18 | * Связь таблицы media с таблицей users | ||
19 | многие-к-одному | ||
20 | */ | ||
21 | public function user() { | ||
22 | return $this->belongsTo(User::class, 'user_id'); | ||
23 | } | ||
24 | } | ||
25 |
app/Models/User.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | // use Illuminate\Contracts\Auth\MustVerifyEmail; | 5 | // use Illuminate\Contracts\Auth\MustVerifyEmail; |
6 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 6 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
7 | use Illuminate\Foundation\Auth\User as Authenticatable; | 7 | use Illuminate\Foundation\Auth\User as Authenticatable; |
8 | use Illuminate\Notifications\Notifiable; | 8 | use Illuminate\Notifications\Notifiable; |
9 | use Laravel\Sanctum\HasApiTokens; | 9 | use Laravel\Sanctum\HasApiTokens; |
10 | 10 | ||
11 | class User extends Authenticatable | 11 | class User extends Authenticatable |
12 | { | 12 | { |
13 | use HasApiTokens, HasFactory, Notifiable; | 13 | use HasApiTokens, HasFactory, Notifiable; |
14 | 14 | ||
15 | /** | 15 | /** |
16 | * The attributes that are mass assignable. | 16 | * The attributes that are mass assignable. |
17 | * | 17 | * |
18 | * @var array<int, string> | 18 | * @var array<int, string> |
19 | */ | 19 | */ |
20 | protected $fillable = [ | 20 | protected $fillable = [ |
21 | 'name', | 21 | 'name', |
22 | 'email', | 22 | 'email', |
23 | 'password', | 23 | 'password', |
24 | 'admin', | 24 | 'admin', |
25 | 'telephone', | 25 | 'telephone', |
26 | 'surname', | 26 | 'surname', |
27 | 'name_man', | 27 | 'name_man', |
28 | 'surname2', | 28 | 'surname2', |
29 | 'is_worker', | 29 | 'is_worker', |
30 | 'is_lookin', | 30 | 'is_lookin', |
31 | 'is_message', | 31 | 'is_message', |
32 | 'is_public', | 32 | 'is_public', |
33 | 'is_remove', | 33 | 'is_remove', |
34 | 'is_ban', | 34 | 'is_ban', |
35 | 'is_new', | 35 | 'is_new', |
36 | 'is_bd', | 36 | 'is_bd', |
37 | 'email_verified_at', | 37 | 'email_verified_at', |
38 | 'created_at', | 38 | 'created_at', |
39 | 'updated_at', | 39 | 'updated_at', |
40 | 'birthday', | 40 | 'birthday', |
41 | 'file', | 41 | 'file', |
42 | 'pubpassword', | 42 | 'pubpassword', |
43 | ]; | 43 | ]; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * The attributes that should be hidden for serialization. | 46 | * The attributes that should be hidden for serialization. |
47 | * | 47 | * |
48 | * @var array<int, string> | 48 | * @var array<int, string> |
49 | */ | 49 | */ |
50 | protected $hidden = [ | 50 | protected $hidden = [ |
51 | 'password', | 51 | 'password', |
52 | 'remember_token', | 52 | 'remember_token', |
53 | ]; | 53 | ]; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * The attributes that should be cast. | 56 | * The attributes that should be cast. |
57 | * | 57 | * |
58 | * @var array<string, string> | 58 | * @var array<string, string> |
59 | */ | 59 | */ |
60 | protected $casts = [ | 60 | protected $casts = [ |
61 | 'email_verified_at' => 'datetime', | 61 | 'email_verified_at' => 'datetime', |
62 | ]; | 62 | ]; |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Связь Пользователей системы с работодателями | 65 | * Связь Пользователей системы с работодателями |
66 | * users - employers | 66 | * users - employers |
67 | */ | 67 | */ |
68 | public function employers() { | 68 | public function employers() { |
69 | return $this->hasMany(Employer::class, 'user_id'); | 69 | return $this->hasMany(Employer::class, 'user_id'); |
70 | } | 70 | } |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Связь Пользователей системы с работниками | 73 | * Связь Пользователей системы с работниками |
74 | * users - workers | 74 | * users - workers |
75 | */ | 75 | */ |
76 | public function workers() { | 76 | public function workers() { |
77 | return $this->hasMany(Worker::class, 'user_id'); | 77 | return $this->hasMany(Worker::class, 'user_id'); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * Связь Пользователей системы с работниками | 81 | * Связь Пользователей системы с работниками |
82 | * users - workers | 82 | * users - workers |
83 | */ | 83 | */ |
84 | public function work() { | 84 | public function work() { |
85 | return $this->hasMany(Worker::class, 'user_id')->select('telephone', 'email', 'position_work', 'persent_anketa'); | 85 | return $this->hasMany(Worker::class, 'user_id')->select('telephone', 'email', 'position_work', 'persent_anketa'); |
86 | } | 86 | } |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * Связь Модели Пользователей(Users) с Группами (Group_users) | 89 | * Связь Модели Пользователей(Users) с Группами (Group_users) |
90 | * users - group_users | 90 | * users - group_users |
91 | многие-ко-многим | 91 | многие-ко-многим |
92 | */ | 92 | */ |
93 | public function ingroup() { | 93 | public function ingroup() { |
94 | return $this->belongsToMany(Group_user::class, 'group_works'); | 94 | return $this->belongsToMany(Group_user::class, 'group_works'); |
95 | } | 95 | } |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * Связь Пользователей системы с ссобщениями | 98 | * Связь Пользователей системы с ссобщениями |
99 | * users - messages | 99 | * users - messages |
100 | */ | 100 | */ |
101 | public function messages() { | 101 | public function messages() { |
102 | return $this->hasMany(Message::class); | 102 | return $this->hasMany(Message::class); |
103 | } | 103 | } |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * Связь Пользователей системы с статистика | 106 | * Связь Пользователей системы с статистика |
107 | * users - static_workers | 107 | * users - static_workers |
108 | */ | 108 | */ |
109 | public function static_user() { | 109 | public function static_user() { |
110 | return $this->hasMany(Static_worker::class); | 110 | return $this->hasMany(Static_worker::class); |
111 | } | 111 | } |
112 | 112 | ||
113 | /* | 113 | /* |
114 | * Связь модели Юзеры (users) с моделью Группы пользователей (Group_works) | 114 | * Связь модели Юзеры (users) с моделью Группы пользователей (Group_works) |
115 | один-ко-многим | 115 | один-ко-многим |
116 | */ | 116 | */ |
117 | public function peoples() { | 117 | public function peoples() { |
118 | return $this->hasMany(Group_works::class); | 118 | return $this->hasMany(Group_works::class); |
119 | } | 119 | } |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * Связь Модели Пользователей(Users) с Группами (Group_users) | 122 | * Связь Модели Пользователей(Users) с Группами (Group_users) |
123 | * users - group_users | 123 | * users - group_users |
124 | многие-ко-многим | 124 | многие-ко-многим |
125 | */ | 125 | */ |
126 | public function jobtitles() { | 126 | public function jobtitles() { |
127 | return $this->belongsToMany(Job_title::class, 'Workers', 'user_id', 'position_work'); | 127 | return $this->belongsToMany(Job_title::class, 'Workers', 'user_id', 'position_work'); |
128 | } | 128 | } |
129 | 129 | ||
130 | public function scopeActive($query) { | 130 | public function scopeActive($query) { |
131 | return $query->where('is_remove', '=', '0'); | 131 | return $query->where('is_remove', '=', '0'); |
132 | } | 132 | } |
133 | 133 | ||
134 | public function scopeWorker($query) { | ||
135 | return $query->where('is_worker', '=', '1'); | ||
136 | } | ||
137 | |||
134 | public function scopeBaseuser($query) { | 138 | public function scopeBaseuser($query) { |
135 | return $query->where('is_bd', '=', '1'); | 139 | return $query->where('is_bd', '=', '1'); |
136 | } | 140 | } |
137 | 141 | ||
138 | public function scopeRealuser($query) { | 142 | public function scopeRealuser($query) { |
139 | return $query->where('is_bd', '=', '0'); | 143 | return $query->where('is_bd', '=', '0'); |
140 | } | 144 | } |
141 | 145 | ||
146 | public function scopeAdmin($query) { | ||
147 | return $query->where('admin', '=', '1'); | ||
148 | } | ||
149 | |||
150 | public function scopeNotadmin($query) { | ||
151 | return $query->where('admin', '=', '0'); | ||
152 | } | ||
153 | |||
142 | } | 154 | } |
143 | 155 |
database/migrations/2023_10_28_112853_create_media_table.php
File was created | 1 | <?php | |
2 | |||
3 | use Illuminate\Database\Migrations\Migration; | ||
4 | use Illuminate\Database\Schema\Blueprint; | ||
5 | use Illuminate\Support\Facades\Schema; | ||
6 | |||
7 | return new class extends Migration | ||
8 | { | ||
9 | /** | ||
10 | * Run the migrations. | ||
11 | * | ||
12 | * @return void | ||
13 | */ | ||
14 | public function up() | ||
15 | { | ||
16 | Schema::create('media', function (Blueprint $table) { | ||
17 | $table->id(); | ||
18 | $table->string('file', 255)->nullable(false); | ||
19 | $table->bigInteger('user_id')->nullable(false); | ||
20 | $table->timestamps(); | ||
21 | }); | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * Reverse the migrations. | ||
26 | * | ||
27 | * @return void | ||
28 | */ | ||
29 | public function down() | ||
30 | { | ||
31 | Schema::dropIfExists('media'); | ||
32 | } | ||
33 | }; | ||
34 |
database/migrations/2023_10_31_060833_alter_table_employers.php
File was created | 1 | <?php | |
2 | |||
3 | use Illuminate\Database\Migrations\Migration; | ||
4 | use Illuminate\Database\Schema\Blueprint; | ||
5 | use Illuminate\Support\Facades\Schema; | ||
6 | |||
7 | return new class extends Migration | ||
8 | { | ||
9 | /** | ||
10 | * Run the migrations. | ||
11 | * | ||
12 | * @return void | ||
13 | */ | ||
14 | public function up() | ||
15 | { | ||
16 | Schema::table('employers', function (Blueprint $table) { | ||
17 | $table->string('code', 100)->nullable(false); | ||
18 | }); | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * Reverse the migrations. | ||
23 | * | ||
24 | * @return void | ||
25 | */ | ||
26 | public function down() | ||
27 | { | ||
28 | Schema::table('employers', function (Blueprint $table) { | ||
29 | $table->dropColumn('code'); | ||
30 | }); | ||
31 | } | ||
32 | }; | ||
33 |
resources/views/admin/ad_employers/add.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Добавление вакансии']) | |
2 | |||
3 | @section('script') | ||
4 | |||
5 | @endsection | ||
6 | |||
7 | @section('content') | ||
8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | ||
9 | Добавление вакансии | ||
10 | </h4> | ||
11 | <form method="POST" action="{{ route('admin.store-ad-employers')}}"> | ||
12 | @csrf | ||
13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | ||
14 | <label class="block text-sm"> | ||
15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> | ||
16 | <input name="name" id="name" | ||
17 | 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" | ||
18 | placeholder="Название вакансии" value="{{ old('name') ?? '' }}" | ||
19 | /> | ||
20 | @error('name') | ||
21 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
22 | {{ $message }} | ||
23 | </span> | ||
24 | @enderror | ||
25 | </label> | ||
26 | |||
27 | <label class="block mt-4 text-sm"> | ||
28 | <span class="text-gray-700 dark:text-gray-400"> | ||
29 | Категории должности | ||
30 | </span> | ||
31 | <select | ||
32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | ||
33 | multiple | ||
34 | name="position_work[]" id="position_work" | ||
35 | > | ||
36 | @foreach($job_titles as $job) | ||
37 | <option value="{{$job->id}}" @if (old('position_work') == $job->id) selected @endif > | ||
38 | {{ $job->name }} ({{$job->id}}) | ||
39 | </option> | ||
40 | @endforeach | ||
41 | </select> | ||
42 | </label><br> | ||
43 | |||
44 | <label class="block text-sm"> | ||
45 | <span class="text-gray-700 dark:text-gray-400">Текст-описание вакансии</span> | ||
46 | <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" placeholder="Описание вакансии (text/html)" | ||
47 | rows="10">{{ old('text') ?? '' }}</textarea> | ||
48 | @error('text') | ||
49 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
50 | {{ $message }} | ||
51 | </span> | ||
52 | @enderror | ||
53 | </label> | ||
54 | |||
55 | <label class="block mt-4 text-sm"> | ||
56 | <span class="text-gray-700 dark:text-gray-400"> | ||
57 | Статус вакансии | ||
58 | </span> | ||
59 | <select | ||
60 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | ||
61 | name="status" id="status" | ||
62 | > | ||
63 | <option value="Не задан" @if (old('status') == "Не задан") selected @endif > | ||
64 | Не задан | ||
65 | </option> | ||
66 | <option value="Открыта" @if (old('status') == "Открыта") selected @endif > | ||
67 | Открыта | ||
68 | </option> | ||
69 | <option value="Закрыта" @if (old('status') == "Закрыта") selected @endif > | ||
70 | Закрыта | ||
71 | </option> | ||
72 | </select> | ||
73 | </label><br> | ||
74 | |||
75 | <label class="block text-sm"> | ||
76 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> | ||
77 | <input type="hidden" name="sroch_vacancy" value="0" /> | ||
78 | <input name="sroch_vacancy" | ||
79 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | ||
80 | placeholder="" type="checkbox" value="1" | ||
81 | /><br> | ||
82 | |||
83 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> | ||
84 | <input type="hidden" name="favorite_vacancy" value="0" /> | ||
85 | <input name="favorite_vacancy" id="favorite_vacancy" | ||
86 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | ||
87 | placeholder="" type="checkbox" value="1" | ||
88 | /><br> | ||
89 | </label> | ||
90 | |||
91 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | ||
92 | <div> | ||
93 | <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"> | ||
94 | Сохранить | ||
95 | </button> | ||
96 | <a href="{{ route('admin.ad-employers') }}" | ||
97 | 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" | ||
98 | style="display: -webkit-inline-box; height: 30px!important;" | ||
99 | >Назад</a> | ||
100 | </div> | ||
101 | </div> | ||
102 | </div> | ||
103 | </form> | ||
104 | @endsection | ||
105 |
resources/views/admin/ad_employers/edit.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Редактирование вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование вакансии']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | 8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> |
9 | Редактирование вакансии | 9 | Редактирование вакансии |
10 | </h4> | 10 | </h4> |
11 | <form method="POST" action="{{ route('admin.update-ad-employers', ['ad_employer' => $ad_employer->id]) }}"> | 11 | <form method="POST" action="{{ route('admin.update-ad-employers', ['ad_employer' => $ad_employer->id]) }}"> |
12 | @csrf | 12 | @csrf |
13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
14 | <label class="block text-sm"> | 14 | <label class="block text-sm"> |
15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> | 15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> |
16 | <input name="name" id="name" | 16 | <input name="name" id="name" |
17 | 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" | 17 | 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" |
18 | placeholder="Название вакансии" value="{{ old('name') ?? $ad_employer->name ?? '' }}" | 18 | placeholder="Название вакансии" value="{{ old('name') ?? $ad_employer->name ?? '' }}" |
19 | /> | 19 | /> |
20 | @error('name') | 20 | @error('name') |
21 | <span class="text-xs text-red-600 dark:text-red-400"> | 21 | <span class="text-xs text-red-600 dark:text-red-400"> |
22 | {{ $message }} | 22 | {{ $message }} |
23 | </span> | 23 | </span> |
24 | @enderror | 24 | @enderror |
25 | </label> | 25 | </label> |
26 | 26 | ||
27 | <label class="block mt-4 text-sm"> | 27 | <label class="block mt-4 text-sm"> |
28 | <span class="text-gray-700 dark:text-gray-400"> | 28 | <span class="text-gray-700 dark:text-gray-400"> |
29 | Категории должности | 29 | Категории должности |
30 | </span> | 30 | </span> |
31 | <select | 31 | <select |
32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
33 | multiple | 33 | multiple |
34 | name="position_work[]" id="position_work" | 34 | name="position_work[]" id="position_work" |
35 | > | 35 | > |
36 | @foreach($job_titles as $job) | 36 | @foreach($job_titles as $job) |
37 | <option value="{{$job->id}}" @if (in_array($job->id, $sel)) selected @endif > | 37 | <option value="{{$job->id}}" @if (in_array($job->id, $sel)) selected @endif > |
38 | {{ $job->name }} ({{$job->id}}) | 38 | {{ $job->name }} ({{$job->id}}) |
39 | </option> | 39 | </option> |
40 | @endforeach | 40 | @endforeach |
41 | </select> | 41 | </select> |
42 | </label><br> | ||
43 | |||
44 | <label class="block text-sm"> | ||
45 | <span class="text-gray-700 dark:text-gray-400">Текст-описание вакансии</span> | ||
46 | <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" placeholder="Описание вакансии (text/html)" | ||
47 | rows="10">{{ old('text') ?? $ad_employer->text ?? '' }}</textarea> | ||
48 | @error('text') | ||
49 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
50 | {{ $message }} | ||
51 | </span> | ||
52 | @enderror | ||
42 | </label> | 53 | </label> |
43 | 54 | ||
44 | <label class="block mt-4 text-sm"> | 55 | <label class="block mt-4 text-sm"> |
45 | <span class="text-gray-700 dark:text-gray-400"> | 56 | <span class="text-gray-700 dark:text-gray-400"> |
46 | Статус вакансии | 57 | Статус вакансии |
47 | </span> | 58 | </span> |
48 | <select | 59 | <select |
49 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 60 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
50 | name="status" id="status" | 61 | name="status" id="status" |
51 | > | 62 | > |
52 | <option value="Не задан" @if ($ad_employer->status == "Не задан") selected @endif > | 63 | <option value="Не задан" @if ($ad_employer->status == "Не задан") selected @endif > |
53 | Не задан | 64 | Не задан |
54 | </option> | 65 | </option> |
55 | <option value="Открыта" @if ($ad_employer->status == "Открыта") selected @endif > | 66 | <option value="Открыта" @if ($ad_employer->status == "Открыта") selected @endif > |
56 | Открыта | 67 | Открыта |
57 | </option> | 68 | </option> |
58 | <option value="Закрыта" @if ($ad_employer->status == "Закрыта") selected @endif > | 69 | <option value="Закрыта" @if ($ad_employer->status == "Закрыта") selected @endif > |
59 | Закрыта | 70 | Закрыта |
60 | </option> | 71 | </option> |
61 | </select> | 72 | </select> |
62 | </label><br> | 73 | </label><br> |
63 | 74 | ||
64 | <label class="block text-sm"> | 75 | <label class="block text-sm"> |
65 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> | 76 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> |
66 | <input type="hidden" name="sroch_vacancy" value="0" /> | 77 | <input type="hidden" name="sroch_vacancy" value="0" /> |
67 | <input name="sroch_vacancy" @if ($ad_employer->sroch_vacancy) checked @endif | 78 | <input name="sroch_vacancy" @if ($ad_employer->sroch_vacancy) checked @endif |
68 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 79 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
69 | placeholder="" type="checkbox" value="1" | 80 | placeholder="" type="checkbox" value="1" |
70 | /><br> | 81 | /><br> |
71 | 82 | ||
72 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> | 83 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> |
73 | <input type="hidden" name="favorite_vacancy" value="0" /> | 84 | <input type="hidden" name="favorite_vacancy" value="0" /> |
74 | <input name="favorite_vacancy" id="favorite_vacancy" @if ($ad_employer->favorite_vacancy)checked @endif | 85 | <input name="favorite_vacancy" id="favorite_vacancy" @if ($ad_employer->favorite_vacancy)checked @endif |
75 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 86 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
76 | placeholder="" type="checkbox" value="1" | 87 | placeholder="" type="checkbox" value="1" |
77 | /><br> | 88 | /><br> |
78 | </label> | 89 | </label> |
79 | 90 | ||
80 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 91 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
81 | <div> | 92 | <div> |
82 | <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"> | 93 | <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"> |
83 | Сохранить | 94 | Сохранить |
84 | </button> | 95 | </button> |
85 | <a href="{{ route('admin.ad-employers') }}" | 96 | <a href="{{ route('admin.ad-employers') }}" |
86 | 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" | 97 | 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" |
87 | style="display: -webkit-inline-box; height: 30px!important;" | 98 | style="display: -webkit-inline-box; height: 30px!important;" |
88 | >Назад</a> | 99 | >Назад</a> |
89 | </div> | 100 | </div> |
90 | </div> | 101 | </div> |
91 | </div> | 102 | </div> |
92 | </form> | 103 | </form> |
93 | @endsection | 104 | @endsection |
94 | 105 |
resources/views/admin/ad_employers/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '#refresh_btn', function () { | 6 | $(document).on('click', '#refresh_btn', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var ajax_block = $('#ajax_block'); | 8 | var ajax_block = $('#ajax_block'); |
9 | var mas = []; | 9 | var mas = []; |
10 | var str_get = ''; | 10 | var str_get = ''; |
11 | 11 | ||
12 | $('input:checkbox:checked').each(function(){ | 12 | $('input:checkbox:checked').each(function(){ |
13 | mas.push($(this).val()); | 13 | mas.push($(this).val()); |
14 | console.log($(this).val()); | 14 | console.log($(this).val()); |
15 | }); | 15 | }); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
18 | type: "GET", | 18 | type: "GET", |
19 | dataType: 'html', | 19 | dataType: 'html', |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: ({data:mas}), | 21 | data: ({data:mas}), |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы пользователей '); | 23 | console.log('Обновление таблицы пользователей '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | //console.log(data); | 25 | //console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | }); | 36 | }); |
37 | </script> | 37 | </script> |
38 | @endsection | 38 | @endsection |
39 | 39 | ||
40 | @section('search') | 40 | @section('search') |
41 | 41 | @include('admin.find_ad_employer', ['select_job' => $select_job]) | |
42 | @endsection | 42 | @endsection |
43 | 43 | ||
44 | @section('content') | 44 | @section('content') |
45 | <button style="margin-bottom: 10px; width:165px" id="refresh_btn" name="refresh_btn" 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"> | 45 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
46 | Обновить вакансии | 46 | |
47 | </button> | 47 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
48 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | ||
49 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | ||
50 | <path | ||
51 | 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"></path> | ||
52 | </svg> | ||
53 | </div> | ||
54 | <div> | ||
55 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | ||
56 | Всего вакансий | ||
57 | </p> | ||
58 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | ||
59 | {{ $all_ad }} | ||
60 | </p> | ||
61 | </div> | ||
62 | </div> | ||
63 | </div> | ||
64 | |||
65 | <div> | ||
66 | <button style="margin-bottom: 10px; width:165px; display: inline-block;" id="refresh_btn" name="refresh_btn" 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"> | ||
67 | Обновить вакансии | ||
68 | </button> | ||
69 | <a href="{{ route('admin.add-ad-employers') }}" style="margin-bottom: 10px; width:310px; display: inline-block;" 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"> | ||
70 | Добавить вакансии от администратора | ||
71 | </a> | ||
72 | </div> | ||
48 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 73 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
49 | <div class="w-full overflow-x-auto"> | 74 | <div class="w-full overflow-x-auto"> |
50 | <table class="w-full whitespace-no-wrap"> | 75 | <table class="w-full whitespace-no-wrap"> |
51 | <thead> | 76 | <thead> |
52 | <tr | 77 | <tr |
53 | 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" | 78 | 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" |
54 | > | 79 | > |
55 | <th class="px-4 py-3"></th> | 80 | <th class="px-4 py-3"></th> |
56 | <th class="px-4 py-3 class1">№</th> | 81 | <th class="px-4 py-3 class1">№</th> |
57 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> | 82 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> |
58 | <th class="px-4 py-3 class4">Должности</th> | 83 | <th class="px-4 py-3 class4">Должности</th> |
59 | <th class="px-4 py-3 class5">Избр.</th> | 84 | <th class="px-4 py-3 class5">Избр.</th> |
60 | <th class="px-4 py-3 class6">Сроч.</th> | 85 | <th class="px-4 py-3 class6">Сроч.</th> |
61 | <th class="px-4 py-3 class7">Статус</th> | 86 | <th class="px-4 py-3 class7">Статус</th> |
62 | <th class="px-4 py-3 class8">Дата создан/изменен.</th> | 87 | <th class="px-4 py-3 class8">Дата создан/изменен.</th> |
63 | <th class="px-4 py-3 class10">Изменить</th> | 88 | <th class="px-4 py-3 class10">Изменить</th> |
64 | </tr> | 89 | </tr> |
65 | </thead> | 90 | </thead> |
66 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 91 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
67 | @foreach($ad_employers as $ad) | 92 | @foreach($ad_employers as $ad) |
68 | <tr class="text-gray-700 dark:text-gray-400"> | 93 | <tr class="text-gray-700 dark:text-gray-400"> |
69 | <td class="px-4 py-3 class1"> | 94 | <td class="px-4 py-3 class1"> |
70 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> | 95 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> |
71 | </td> | 96 | </td> |
72 | <td class="px-4 py-3 class1"> | 97 | <td class="px-4 py-3 class1"> |
73 | {{$ad->id}} | 98 | {{$ad->id}} |
74 | </td> | 99 | </td> |
75 | <td class="px-4 py-3 class2"> | 100 | <td class="px-4 py-3 class2"> |
76 | <div class="flex items-center text-sm"> | 101 | <div class="flex items-center text-sm"> |
77 | <div | 102 | <div |
78 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 103 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
79 | > | 104 | > |
80 | @if (isset($ad->employer->logo)) | 105 | @if (isset($ad->employer->logo)) |
81 | <img | 106 | <img |
82 | class="object-cover w-full h-full rounded-full" | 107 | class="object-cover w-full h-full rounded-full" |
83 | src="{{ asset(Storage::url($ad->employer->logo)) }}" | 108 | src="{{ asset(Storage::url($ad->employer->logo)) }}" |
84 | alt="" | 109 | alt="" |
85 | loading="lazy" | 110 | loading="lazy" |
86 | /> | 111 | /> |
87 | @endif | 112 | @endif |
88 | <div | 113 | <div |
89 | class="absolute inset-0 rounded-full shadow-inner" | 114 | class="absolute inset-0 rounded-full shadow-inner" |
90 | aria-hidden="true" | 115 | aria-hidden="true" |
91 | ></div> | 116 | ></div> |
92 | </div> | 117 | </div> |
93 | <div> | 118 | <div> |
94 | <p class="font-semibold">{{$ad->name}}</p> | 119 | <p class="font-semibold">{{$ad->name}}</p> |
95 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 120 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
96 | {{$ad->employer->name_company}} | 121 | {{$ad->employer->name_company}} |
97 | </p> | 122 | </p> |
98 | </div> | 123 | </div> |
99 | </div> | 124 | </div> |
100 | </td> | 125 | </td> |
101 | 126 | ||
102 | <td class="px-4 py-3 class4"> | 127 | <td class="px-4 py-3 class4"> |
103 | <div class="flex items-center text-sm"> | 128 | <div class="flex items-center text-sm"> |
104 | @if ($ad->jobs->count()) | 129 | @if ($ad->jobs->count()) |
105 | <div> | 130 | <div> |
106 | <?php $i = 0;?> | 131 | <?php $i = 0;?> |
107 | @foreach ($ad->jobs as $title) | 132 | @foreach ($ad->jobs as $title) |
108 | <?php if ($i==0) {?> | 133 | <?php if ($i==0) {?> |
109 | <p class="font-semibold">{{$title->name}}</p> | 134 | <p class="font-semibold">{{$title->name}}</p> |
110 | <?php } else {?> | 135 | <?php } else {?> |
111 | <p class="font-semibold">/ {{$title->name}}</p> | 136 | <p class="font-semibold">/ {{$title->name}}</p> |
112 | <?php } | 137 | <?php } |
113 | $i++; | 138 | $i++; |
114 | ?> | 139 | ?> |
115 | @endforeach | 140 | @endforeach |
116 | </div> | 141 | </div> |
117 | @endif | 142 | @endif |
118 | </div> | 143 | </div> |
119 | 144 | ||
120 | </td> | 145 | </td> |
121 | 146 | ||
122 | <td class="px-4 py-3 text-sm class5"> | 147 | <td class="px-4 py-3 text-sm class5"> |
123 | @if ($ad->favorite_vacancy==1) | 148 | @if ($ad->favorite_vacancy==1) |
124 | <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"> | 149 | <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"> |
125 | Да | 150 | Да |
126 | </span> | 151 | </span> |
127 | @else | 152 | @else |
128 | <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"> | 153 | <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"> |
129 | Нет | 154 | Нет |
130 | </span> | 155 | </span> |
131 | @endif | 156 | @endif |
132 | </td> | 157 | </td> |
133 | 158 | ||
134 | <td class="px-4 py-3 text-sm class6"> | 159 | <td class="px-4 py-3 text-sm class6"> |
135 | @if ($ad->sroch_vacancy==1) | 160 | @if ($ad->sroch_vacancy==1) |
136 | <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"> | 161 | <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"> |
137 | Да | 162 | Да |
138 | </span> | 163 | </span> |
139 | @else | 164 | @else |
140 | <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"> | 165 | <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"> |
141 | Нет | 166 | Нет |
142 | </span> | 167 | </span> |
143 | @endif | 168 | @endif |
144 | </td> | 169 | </td> |
145 | 170 | ||
146 | <td class="px-4 py-3 text-sm class7"> | 171 | <td class="px-4 py-3 text-sm class7"> |
147 | {{ $ad->status }} | 172 | {{ $ad->status }} |
148 | </td> | 173 | </td> |
149 | 174 | ||
150 | <td class="px-4 py-3 text-sm class8"> | 175 | <td class="px-4 py-3 text-sm class8"> |
151 | <div class="flex items-center text-sm"> | 176 | <div class="flex items-center text-sm"> |
152 | <div> | 177 | <div> |
153 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> | 178 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> |
154 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 179 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
155 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} | 180 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} |
156 | </p> | 181 | </p> |
157 | </div> | 182 | </div> |
158 | </div> | 183 | </div> |
159 | 184 | ||
160 | </td> | 185 | </td> |
161 | 186 | ||
162 | <td class="px-4 py-3 text-sm class10"> | 187 | <td class="px-4 py-3 text-sm class10"> |
163 | <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}"> | 188 | <form action="{{ route('admin.delete-ad-employer', ['ad_employer' => $ad->id]) }}" method="POST"> |
164 | Изменить | 189 | <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">Изменить</a> | |
165 | </a> | 190 | @csrf |
191 | @method('DELETE') | ||
192 | <input class="btn btn-danger" type="submit" value="Удалить"/> | ||
193 | </form> | ||
166 | </td> | 194 | </td> |
167 | </tr> | 195 | </tr> |
168 | @endforeach | 196 | @endforeach |
169 | </tbody> | 197 | </tbody> |
170 | </table> | 198 | </table> |
171 | </div> | 199 | </div> |
172 | 200 | ||
173 | <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"> | 201 | <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"> |
174 | {{ $ad_employers->appends($_GET)->links('admin.pagginate') }} | 202 | {{ $ad_employers->appends($_GET)->links('admin.pagginate') }} |
175 | </div> | 203 | </div> |
176 | </div> | 204 | </div> |
177 | @endsection | 205 | @endsection |
178 | 206 |
resources/views/admin/education/add.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Добавление образования']) | 1 | @extends('layout.admin', ['title' => 'Админка - Добавление образования']) |
2 | 2 | ||
3 | @section('content') | 3 | @section('content') |
4 | <form method="POST" action="{{ route('admin.education.store') }}" enctype="multipart/form-data"> | 4 | <form method="POST" action="{{ route('admin.education.store') }}" enctype="multipart/form-data"> |
5 | @include('admin.education.form') | 5 | @include('admin.education.form-add') |
6 | </form> | 6 | </form> |
7 | @endsection | 7 | @endsection |
8 | 8 |
resources/views/admin/education/edit.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Редактирование образования']) | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование образования']) |
2 | 2 | ||
3 | @section('content') | 3 | @section('content') |
4 | <form method="POST" action="{{ route('admin.education.update', ['education' => $education->id]) }}" enctype="multipart/form-data"> | 4 | @include('admin.education.form') |
5 | @include('admin.education.form') | ||
6 | </form> | ||
7 | @endsection | 5 | @endsection |
8 | 6 |
resources/views/admin/education/form-add.blade.php
File was created | 1 | @csrf | |
2 | |||
3 | @isset($education) | ||
4 | @method('PUT') | ||
5 | @endisset | ||
6 | |||
7 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | ||
8 | <label class="block text-sm"> | ||
9 | <span class="text-gray-700 dark:text-gray-400">Название учебного заведения</span> | ||
10 | <input name="name" id="name" | ||
11 | 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" | ||
12 | placeholder="Название учебного заведения" value="{{ old('name') ?? $education->name ?? '' }}" | ||
13 | /> | ||
14 | @error('name') | ||
15 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
16 | {{ $message }} | ||
17 | </span> | ||
18 | @enderror | ||
19 | </label><br> | ||
20 | |||
21 | <label class="block text-sm"> | ||
22 | <span class="text-gray-700 dark:text-gray-400">Адрес</span> | ||
23 | <input name="address" id="address" | ||
24 | 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" | ||
25 | placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}" | ||
26 | /> | ||
27 | @error('address') | ||
28 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
29 | {{ $message }} | ||
30 | </span> | ||
31 | @enderror | ||
32 | </label><br> | ||
33 | |||
34 | <label class="block text-sm"> | ||
35 | <span class="text-gray-700 dark:text-gray-400">Email</span> | ||
36 | <input name="email" id="email" | ||
37 | 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" | ||
38 | placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}" | ||
39 | /> | ||
40 | @error('email') | ||
41 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
42 | {{ $message }} | ||
43 | </span> | ||
44 | @enderror | ||
45 | </label><br> | ||
46 | |||
47 | <label class="block text-sm"> | ||
48 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> | ||
49 | <input name="telephone" id="telephone" | ||
50 | 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" | ||
51 | placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}" | ||
52 | /> | ||
53 | @error('telephone') | ||
54 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
55 | {{ $message }} | ||
56 | </span> | ||
57 | @enderror | ||
58 | </label><br> | ||
59 | |||
60 | <label class="block text-sm"> | ||
61 | <span class="text-gray-700 dark:text-gray-400">Текст</span> | ||
62 | <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" placeholder="Текст (html)" required | ||
63 | rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea> | ||
64 | @error('text') | ||
65 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
66 | {{ $message }} | ||
67 | </span> | ||
68 | @enderror | ||
69 | </label><br> | ||
70 | |||
71 | <label class="block text-sm"> | ||
72 | <span class="text-gray-700 dark:text-gray-400">Картинка</span> | ||
73 | <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 | ||
74 | focus:border-purple-400 focus:outline-none focus:shadow-outline-purple | ||
75 | dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | ||
76 | id="image" name="image" accept="image/png, image/jpeg"> | ||
77 | @error('image') | ||
78 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
79 | {{ $message }} | ||
80 | </span> | ||
81 | @enderror | ||
82 | @isset($education->image) | ||
83 | <img src="{{asset(Storage::url($education->image))}}" width="100px"/> | ||
84 | @endisset | ||
85 | </label><br> | ||
86 | |||
87 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | ||
88 | <div> | ||
89 | <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"> | ||
90 | Сохранить | ||
91 | </button> | ||
92 | <a href="{{ route('admin.education.index') }}" | ||
93 | 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" | ||
94 | style="display: -webkit-inline-box; height: 30px!important;" | ||
95 | >Назад</a> | ||
96 | </div> | ||
97 | </div> | ||
98 | </div> | ||
99 | <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> | ||
100 | |||
101 | <!--<script src="{{ asset('./ckeditor/ckeditor.js') }}"></script>--> | ||
102 | <script> | ||
103 | CKEDITOR.replace( 'text', { | ||
104 | filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", | ||
105 | filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", | ||
106 | filebrowserUploadMethod: 'form' | ||
107 | }); | ||
108 | </script> | ||
109 |
resources/views/admin/education/form.blade.php
1 | @csrf | 1 | @csrf |
2 | 2 | ||
3 | @isset($education) | 3 | @isset($education) |
4 | @method('PUT') | 4 | @method('PUT') |
5 | @endisset | 5 | @endisset |
6 | 6 | ||
7 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 7 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
8 | <form method="POST" action="{{ route('admin.education.update', ['education' => $education->id]) }}" enctype="multipart/form-data"> | ||
8 | <label class="block text-sm"> | 9 | <label class="block text-sm"> |
9 | <span class="text-gray-700 dark:text-gray-400">Название учебного заведения</span> | 10 | <span class="text-gray-700 dark:text-gray-400">Название учебного заведения</span> |
10 | <input name="name" id="name" | 11 | <input name="name" id="name" |
11 | 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" | 12 | 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" |
12 | placeholder="Название учебного заведения" value="{{ old('name') ?? $education->name ?? '' }}" | 13 | placeholder="Название учебного заведения" value="{{ old('name') ?? $education->name ?? '' }}" |
13 | /> | 14 | /> |
14 | @error('name') | 15 | @error('name') |
15 | <span class="text-xs text-red-600 dark:text-red-400"> | 16 | <span class="text-xs text-red-600 dark:text-red-400"> |
16 | {{ $message }} | 17 | {{ $message }} |
17 | </span> | 18 | </span> |
18 | @enderror | 19 | @enderror |
19 | </label><br> | 20 | </label><br> |
20 | 21 | ||
21 | <label class="block text-sm"> | 22 | <label class="block text-sm"> |
22 | <span class="text-gray-700 dark:text-gray-400">Адрес</span> | 23 | <span class="text-gray-700 dark:text-gray-400">Адрес</span> |
23 | <input name="address" id="address" | 24 | <input name="address" id="address" |
24 | 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" | 25 | 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" |
25 | placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}" | 26 | placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}" |
26 | /> | 27 | /> |
27 | @error('address') | 28 | @error('address') |
28 | <span class="text-xs text-red-600 dark:text-red-400"> | 29 | <span class="text-xs text-red-600 dark:text-red-400"> |
29 | {{ $message }} | 30 | {{ $message }} |
30 | </span> | 31 | </span> |
31 | @enderror | 32 | @enderror |
32 | </label><br> | 33 | </label><br> |
33 | 34 | ||
34 | <label class="block text-sm"> | 35 | <label class="block text-sm"> |
35 | <span class="text-gray-700 dark:text-gray-400">Email</span> | 36 | <span class="text-gray-700 dark:text-gray-400">Email</span> |
36 | <input name="email" id="email" | 37 | <input name="email" id="email" |
37 | 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" | 38 | 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" |
38 | placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}" | 39 | placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}" |
39 | /> | 40 | /> |
40 | @error('email') | 41 | @error('email') |
41 | <span class="text-xs text-red-600 dark:text-red-400"> | 42 | <span class="text-xs text-red-600 dark:text-red-400"> |
42 | {{ $message }} | 43 | {{ $message }} |
43 | </span> | 44 | </span> |
44 | @enderror | 45 | @enderror |
45 | </label><br> | 46 | </label><br> |
46 | 47 | ||
47 | <label class="block text-sm"> | 48 | <label class="block text-sm"> |
48 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> | 49 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> |
49 | <input name="telephone" id="telephone" | 50 | <input name="telephone" id="telephone" |
50 | 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" | 51 | 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" |
51 | placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}" | 52 | placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}" |
52 | /> | 53 | /> |
53 | @error('telephone') | 54 | @error('telephone') |
54 | <span class="text-xs text-red-600 dark:text-red-400"> | 55 | <span class="text-xs text-red-600 dark:text-red-400"> |
55 | {{ $message }} | 56 | {{ $message }} |
56 | </span> | 57 | </span> |
57 | @enderror | 58 | @enderror |
58 | </label><br> | 59 | </label><br> |
59 | 60 | ||
60 | <label class="block text-sm"> | 61 | <label class="block text-sm"> |
61 | <span class="text-gray-700 dark:text-gray-400">Текст</span> | 62 | <span class="text-gray-700 dark:text-gray-400">Текст</span> |
62 | <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" placeholder="Текст (html)" required | 63 | <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" placeholder="Текст (html)" required |
63 | rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea> | 64 | rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea> |
64 | @error('text') | 65 | @error('text') |
65 | <span class="text-xs text-red-600 dark:text-red-400"> | 66 | <span class="text-xs text-red-600 dark:text-red-400"> |
66 | {{ $message }} | 67 | {{ $message }} |
67 | </span> | 68 | </span> |
68 | @enderror | 69 | @enderror |
69 | </label><br> | 70 | </label><br> |
70 | 71 | ||
71 | <label class="block text-sm"> | 72 | <label class="block text-sm"> |
72 | <span class="text-gray-700 dark:text-gray-400">Картинка</span> | 73 | <span class="text-gray-700 dark:text-gray-400">Картинка</span> |
73 | <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 | 74 | <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 |
74 | focus:border-purple-400 focus:outline-none focus:shadow-outline-purple | 75 | focus:border-purple-400 focus:outline-none focus:shadow-outline-purple |
75 | dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | 76 | dark:text-gray-300 dark:focus:shadow-outline-gray form-input" |
76 | id="image" name="image" accept="image/png, image/jpeg"> | 77 | id="image" name="image" accept="image/png, image/jpeg"> |
77 | @error('image') | 78 | @error('image') |
78 | <span class="text-xs text-red-600 dark:text-red-400"> | 79 | <span class="text-xs text-red-600 dark:text-red-400"> |
79 | {{ $message }} | 80 | {{ $message }} |
80 | </span> | 81 | </span> |
81 | @enderror | 82 | @enderror |
82 | @isset($education->image) | 83 | @isset($education->image) |
83 | <img src="{{asset(Storage::url($education->image))}}" width="100px"/> | 84 | <img src="{{asset(Storage::url($education->image))}}" width="100px"/> |
84 | @endisset | 85 | @endisset |
85 | </label><br> | 86 | </label><br> |
86 | 87 | ||
87 | |||
88 | @isset($education) | ||
89 | <div class="tabs"> | ||
90 | <input type="radio" name="tab-btn" id="tab-btn-1" value="" checked> | ||
91 | <label for="tab-btn-1">Высшее образование</label> | ||
92 | <input type="radio" name="tab-btn" id="tab-btn-2" value=""> | ||
93 | <label for="tab-btn-2">Средне-профессиональное образование</label> | ||
94 | <input type="radio" name="tab-btn" id="tab-btn-3" value=""> | ||
95 | <label for="tab-btn-3">Дополнительное образование</label> | ||
96 | <div id="content-1"> | ||
97 | <a id="add1" 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" | ||
98 | href="{{ route('admin.add-program-education', ['education' => $education->id, 'level' => 1]) }}" | ||
99 | >Добавить специализацию</a><br> | ||
100 | @if ((isset($program1)) && ($program1->count())) | ||
101 | @foreach ($program1 as $prog1) | ||
102 | <hr> | ||
103 | <label class="block text-sm"> | ||
104 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">Специальность: {{$prog1->name}}</h4> | ||
105 | <span class="text-gray-700 dark:text-gray-400">Описание: {{$prog1->text}}</span> | ||
106 | </label><br> | ||
107 | @endforeach | ||
108 | @else | ||
109 | <span class="text-gray-700 dark:text-gray-400">Нет записей</span> | ||
110 | @endif | ||
111 | </div> | ||
112 | <div id="content-2"> | ||
113 | <a id="add2" 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" | ||
114 | href="{{ route('admin.add-program-education', ['education' => $education->id, 'level' => 2]) }}" | ||
115 | >Добавить специализацию</a><br> | ||
116 | @if ((isset($program2)) && ($program2->count())) | ||
117 | @foreach ($program2 as $prog2) | ||
118 | <hr> | ||
119 | <label class="block text-sm"> | ||
120 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">Специальность: {{$prog2->name}}</h4> | ||
121 | <span class="text-gray-700 dark:text-gray-400">Описание: {{$prog2->text}}</span> | ||
122 | </label><br> | ||
123 | @endforeach | ||
124 | @else | ||
125 | <span class="text-gray-700 dark:text-gray-400">Нет записей</span> | ||
126 | @endif | ||
127 | </div> | ||
128 | <div id="content-3"> | ||
129 | <a id="add3" 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" | ||
130 | href="{{ route('admin.add-program-education', ['education' => $education->id, 'level' => 3]) }}" | ||
131 | >Добавить специализацию</a><br> | ||
132 | @if ((isset($program3)) && ($program3->count())) | ||
133 | @foreach ($program3 as $prog3) | ||
134 | <hr> | ||
135 | <label class="block text-sm"> | ||
136 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">Специальность: {{$prog3->name}}</h4> | ||
137 | <span class="text-gray-700 dark:text-gray-400">Описание: {{$prog3->text}}</span> | ||
138 | </label><br> | ||
139 | @endforeach | ||
140 | @else | ||
141 | <span class="text-gray-700 dark:text-gray-400">Нет записей</span> | ||
142 | @endif | ||
143 | </div> | ||
144 | </div><br> | ||
145 | @endisset | ||
146 | |||
147 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 88 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
148 | <div> | 89 | <div> |
149 | <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"> | 90 | <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"> |
150 | Сохранить | 91 | Сохранить |
151 | </button> | 92 | </button> |
152 | <a href="{{ route('admin.education.index') }}" | 93 | <a href="{{ route('admin.education.index') }}" |
153 | 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" | 94 | 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" |
154 | style="display: -webkit-inline-box; height: 30px!important;" | 95 | style="display: -webkit-inline-box; height: 30px!important;" |
155 | >Назад</a> | 96 | >Назад</a> |
156 | </div> | 97 | </div> |
157 | </div> | 98 | </div> |
99 | </form> | ||
100 | |||
101 | @isset($education) | ||
102 | <hr> | ||
103 | <form method="GET" action="{{ route('admin.add-program-education') }}"> | ||
104 | <label class="block text-sm"> | ||
105 | <span class="text-gray-700 dark:text-gray-400">Категория образования</span> | ||
106 | <input type="hidden" name="id" value="{{ $education->id }}"/> | ||
107 | <input name="level" id="level" | ||
108 | 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" | ||
109 | placeholder="Новое образование" value="" |
resources/views/admin/education/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Справочник образование']) | 1 | @extends('layout.admin', ['title' => 'Админка - Справочник образование']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('search') | 7 | @section('search') |
8 | 8 | ||
9 | @endsection | 9 | @endsection |
10 | 10 | ||
11 | @section('content') | 11 | @section('content') |
12 | 12 | ||
13 | <a href="{{ route('admin.education.create') }}" style="width: 195px" 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"> | 13 | <a href="{{ route('admin.education.create') }}" style="width: 195px" 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"> |
14 | Добавить образование | 14 | Добавить образование |
15 | </a> | 15 | </a> |
16 | <br> | 16 | <br> |
17 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 17 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
18 | 18 | ||
19 | <div class="w-full overflow-x-auto"> | 19 | <div class="w-full overflow-x-auto"> |
20 | <table class="w-full whitespace-no-wrap"> | 20 | <table class="w-full whitespace-no-wrap"> |
21 | <thead> | 21 | <thead> |
22 | <tr | 22 | <tr |
23 | 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" | 23 | 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" |
24 | > | 24 | > |
25 | <th class="px-4 py-3">№</th> | 25 | <th class="px-4 py-3">№</th> |
26 | <th class="px-4 py-3">Название образования</th> | 26 | <th class="px-4 py-3">Название образования</th> |
27 | <th class="px-4 py-3">Редактировать</th> | 27 | <th class="px-4 py-3">Редактировать</th> |
28 | <th class="px-4 py-3">Дата создания</th> | 28 | <th class="px-4 py-3">Дата создания</th> |
29 | </tr> | 29 | </tr> |
30 | </thead> | 30 | </thead> |
31 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 31 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
32 | @foreach($education as $cat) | 32 | @foreach($education as $cat) |
33 | <tr class="text-gray-700 dark:text-gray-400"> | 33 | <tr class="text-gray-700 dark:text-gray-400"> |
34 | <td class="px-4 py-3"> | 34 | <td class="px-4 py-3"> |
35 | {{$cat->id}} | 35 | {{$cat->id}} |
36 | </td> | 36 | </td> |
37 | <td class="px-4 py-3"> | 37 | <td class="px-4 py-3"> |
38 | {{ $cat->name }} | 38 | {{ mb_strimwidth($cat->name, 0, 50, "...") }} |
39 | </td> | 39 | </td> |
40 | 40 | ||
41 | <td class="px-4 py-3 text-sm_"> | 41 | <td class="px-4 py-3 text-sm_"> |
42 | <form action="{{ route('admin.education.destroy', ['education' => $cat->id]) }}" method="POST"> | 42 | <form action="{{ route('admin.education.destroy', ['education' => $cat->id]) }}" method="POST"> |
43 | <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a> | | 43 | <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a> | |
44 | @csrf | 44 | @csrf |
45 | @method('DELETE') | 45 | @method('DELETE') |
46 | <input class="btn btn-danger" type="submit" value="Удалить"/> | 46 | <input class="btn btn-danger" type="submit" value="Удалить"/> |
47 | </form> | 47 | </form> |
48 | </td> | 48 | </td> |
49 | <td class="px-4 py-3"> | 49 | <td class="px-4 py-3"> |
50 | {{ date('d.m.Y', strtotime($cat->created_at))}} | 50 | {{ date('d.m.Y', strtotime($cat->created_at))}} |
51 | </td> | 51 | </td> |
52 | </tr> | 52 | </tr> |
53 | @endforeach | 53 | @endforeach |
54 | </tbody> | 54 | </tbody> |
55 | </table> | 55 | </table> |
56 | </div> | 56 | </div> |
57 | 57 | ||
58 | <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"> | 58 | <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"> |
59 | <?=$education->appends($_GET)->links('admin.pagginate'); ?> | 59 | <?=$education->appends($_GET)->links('admin.pagginate'); ?> |
60 | </div> | 60 | </div> |
61 | </div> | 61 | </div> |
62 | @endsection | 62 | @endsection |
63 | 63 |
resources/views/admin/employer/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Работодатели']) | 1 | @extends('layout.admin', ['title' => 'Админка - Работодатели']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.checkban', function () { | 6 | $(document).on('click', '.checkban', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var ajax_block = $('#ajax_block'); | 9 | var ajax_block = $('#ajax_block'); |
10 | var bool = 0; | 10 | var bool = 0; |
11 | 11 | ||
12 | if(this.checked){ | 12 | if(this.checked){ |
13 | bool = 1; | 13 | bool = 1; |
14 | } else { | 14 | } else { |
15 | bool = 0; | 15 | bool = 0; |
16 | } | 16 | } |
17 | 17 | ||
18 | $.ajax({ | 18 | $.ajax({ |
19 | type: "GET", | 19 | type: "GET", |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: "id=" + value + "&is_ban=" + bool, | 21 | data: "id=" + value + "&is_ban=" + bool, |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы пользователей '); | 23 | console.log('Обновление таблицы пользователей '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | //console.log(data); | 25 | //console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | 36 | ||
37 | }); | 37 | }); |
38 | </script> | 38 | </script> |
39 | <script> | 39 | <script> |
40 | const btns = document.querySelectorAll('.btn_del'); | 40 | const btns = document.querySelectorAll('.btn_del'); |
41 | btns.forEach(btn => { | 41 | btns.forEach(btn => { |
42 | btn.addEventListener('click', (e) => { | 42 | btn.addEventListener('click', (e) => { |
43 | console.log('click button'); | 43 | console.log('click button'); |
44 | let id = e.target.id; | 44 | let id = e.target.id; |
45 | let form = document.getElementById("form_modal_del"); | 45 | let form = document.getElementById("form_modal_del"); |
46 | form.action = "<?=$_SERVER['APP_URL']?>admin/employers/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); | 46 | form.action = "<?=$_SERVER['APP_URL']?>public/admin/employers/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); |
47 | //document.getElementById("title_modal").innerHTML = id; | 47 | //document.getElementById("title_modal").innerHTML = id; |
48 | console.log(e.target.getAttribute('data-employer')); | 48 | console.log(e.target.getAttribute('data-employer')); |
49 | console.log(e.target.getAttribute('data-user')); | 49 | console.log(e.target.getAttribute('data-user')); |
50 | 50 | ||
51 | }); | 51 | }); |
52 | }); | 52 | }); |
53 | </script> | 53 | </script> |
54 | @endsection | 54 | @endsection |
55 | 55 | ||
56 | @section('search') | 56 | @section('search') |
57 | @include('admin.find_employer', ['select_category' => $select_category]) | 57 | @include('admin.find_employer', ['select_category' => $select_category]) |
58 | @endsection | 58 | @endsection |
59 | 59 | ||
60 | @section('modal') | 60 | @section('modal') |
61 | @include('admin.employer.modal') | 61 | @include('admin.employer.modal') |
62 | @endsection | 62 | @endsection |
63 | 63 | ||
64 | @section('content') | 64 | @section('content') |
65 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | 65 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
66 | 66 | ||
67 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 67 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
68 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 68 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
69 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 69 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
70 | <path | 70 | <path |
71 | 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"></path> | 71 | 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"></path> |
72 | </svg> | 72 | </svg> |
73 | </div> | 73 | </div> |
74 | <div> | 74 | <div> |
75 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 75 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
76 | Всего работодателей | 76 | Всего работодателей |
77 | </p> | 77 | </p> |
78 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 78 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
79 | {{ $all_employer }} | 79 | {{ $all_employer }} |
80 | </p> | 80 | </p> |
81 | </div> | 81 | </div> |
82 | </div> | 82 | </div> |
83 | </div> | 83 | </div> |
84 | 84 | ||
85 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 85 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
86 | <div class="w-full overflow-x-auto"> | 86 | <div class="w-full overflow-x-auto"> |
87 | <table class="w-full whitespace-no-wrap"> | 87 | <table class="w-full whitespace-no-wrap"> |
88 | <thead> | 88 | <thead> |
89 | <tr | 89 | <tr |
90 | 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" | 90 | 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" |
91 | > | 91 | > |
92 | <th class="px-4 py-3">№</th> | 92 | <th class="px-4 py-3">№</th> |
93 | <th class="px-4 py-3">Лого</th> | 93 | <th class="px-4 py-3">Лого</th> |
94 | <th class="px-4 py-3">Название компании/Email/Тел/Пароль</th> | 94 | <th class="px-4 py-3">Название компании/Email/Тел/Пароль</th> |
95 | <th class="px-4 py-3">Категория</th> | 95 | <th class="px-4 py-3">Категория</th> |
96 | <th class="px-4 py-3">Комментарий</th> | 96 | <th class="px-4 py-3">Комментарий</th> |
97 | <th class="px-4 py-3">Дата регистрации</th> | 97 | <th class="px-4 py-3">Дата регистрации</th> |
98 | <th class="px-4 py-3">Редакт.</th> | 98 | <th class="px-4 py-3">Редакт.</th> |
99 | </tr> | 99 | </tr> |
100 | </thead> | 100 | </thead> |
101 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 101 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
102 | @foreach($users as $user) | 102 | @foreach($users as $user) |
103 | <tr class="text-gray-700 dark:text-gray-400"> | 103 | <tr class="text-gray-700 dark:text-gray-400"> |
104 | <td class="px-4 py-3"> | 104 | <td class="px-4 py-3"> |
105 | {{$user->id}} | 105 | {{$user->id}} |
106 | </td> | 106 | </td> |
107 | <td class="px-4 py-3"> | 107 | <td class="px-4 py-3"> |
108 | @if (isset($user->emp_logo) && ($user->emp_logo)) | 108 | @if (isset($user->emp_logo) && ($user->emp_logo)) |
109 | <div class="flex items-center text-sm"> | 109 | <div class="flex items-center text-sm"> |
110 | <div | 110 | <div |
111 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 111 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
112 | > | 112 | > |
113 | <img | 113 | <img |
114 | class="object-cover w-full h-full rounded-full" | 114 | class="object-cover w-full h-full rounded-full" |
115 | src="{{ asset(Storage::url($user->emp_logo)) }}" | 115 | src="{{ asset(Storage::url($user->emp_logo)) }}" |
116 | alt="" | 116 | alt="" |
117 | loading="lazy" | 117 | loading="lazy" |
118 | /> | 118 | /> |
119 | <div | 119 | <div |
120 | class="absolute inset-0 rounded-full shadow-inner" | 120 | class="absolute inset-0 rounded-full shadow-inner" |
121 | aria-hidden="true" | 121 | aria-hidden="true" |
122 | ></div> | 122 | ></div> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | @else | 125 | @else |
126 | - | 126 | - |
127 | @endif | 127 | @endif |
128 | </td> | 128 | </td> |
129 | 129 | ||
130 | <td class="px-4 py-3"> | 130 | <td class="px-4 py-3"> |
131 | <div class="flex items-center text-sm"> | 131 | <div class="flex items-center text-sm"> |
132 | <div> | 132 | <div> |
133 | <p class="font-semibold">{{$user->name}}</p> | 133 | <p class="font-semibold">{{$user->name}}</p> |
134 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> | 134 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> |
135 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 135 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
136 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} | 136 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} |
137 | </p> | 137 | </p> |
138 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 138 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
139 | @if (!empty($user->pubpassword)) | 139 | @if (!empty($user->pubpassword)) |
140 | {{ base64_decode($user->pubpassword) }} | 140 | {{ base64_decode($user->pubpassword) }} |
141 | @endif | 141 | @endif |
142 | </p> | 142 | </p> |
143 | </div> | 143 | </div> |
144 | </div> | 144 | </div> |
145 | 145 | ||
146 | </td> | 146 | </td> |
147 | <td class="px-4 py-3 text-sm"> | 147 | <td class="px-4 py-3 text-sm"> |
148 | {{ $user->category }} | 148 | {{ $user->category }} |
149 | </td> | 149 | </td> |
150 | <td class="px-4 py-3 text-sm"> | 150 | <td class="px-4 py-3 text-sm"> |
151 | @if (!empty($user->comment_admin)) | 151 | @if (!empty($user->comment_admin)) |
152 | 152 | ||
153 | <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->emp_id]) }}">Есть</a> | 153 | <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->emp_id]) }}">Есть</a> |
154 | @else | 154 | @else |
155 | Нет | 155 | Нет |
156 | @endif | 156 | @endif |
157 | </td> | 157 | </td> |
158 | <td class="px-4 py-3 text-sm"> | 158 | <td class="px-4 py-3 text-sm"> |
159 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 159 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
160 | </td> | 160 | </td> |
161 | <td class="px-4 py-3 text-sm"> | 161 | <td class="px-4 py-3 text-sm"> |
162 | @if (!empty($user->emp_id)) | 162 | @if (!empty($user->emp_id)) |
163 | <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> | | 163 | <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> |
164 | <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> | 164 | @if ($user->emp_id > 2) | <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> |
165 | @endif | ||
165 | @endif | 166 | @endif |
166 | </td> | 167 | </td> |
167 | <!--<td class="px-4 py-3 text-sm"> | 168 | <!--<td class="px-4 py-3 text-sm"> |
168 | @if ($user->usr_id > 1) | 169 | @if ($user->usr_id > 1) |
169 | <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | 170 | <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> |
170 | @endif | 171 | @endif |
171 | </td>--> | 172 | </td>--> |
172 | </tr> | 173 | </tr> |
173 | @endforeach | 174 | @endforeach |
174 | </tbody> | 175 | </tbody> |
175 | </table> | 176 | </table> |
176 | </div> | 177 | </div> |
177 | 178 | ||
178 | <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"> | 179 | <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"> |
179 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> | 180 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> |
180 | </div> | 181 | </div> |
181 | </div> | 182 | </div> |
182 | @endsection | 183 | @endsection |
183 | 184 |
resources/views/admin/find_ad_employer.blade.php
File was created | 1 | <div class="absolute inset-y-0 flex items-center pl-2"> | |
2 | <svg | ||
3 | class="w-4 h-4" | ||
4 | aria-hidden="true" | ||
5 | fill="currentColor" | ||
6 | viewBox="0 0 20 20" | ||
7 | > | ||
8 | <path | ||
9 | fill-rule="evenodd" | ||
10 | 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" | ||
11 | clip-rule="evenodd" | ||
12 | ></path> | ||
13 | </svg> | ||
14 | </div> | ||
15 | <form action="" method="GET"> | ||
16 | <div style="float:left; margin-right:10px;" ><input | ||
17 | name="find" id="find" | ||
18 | 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" | ||
19 | style="width: 200px" | ||
20 | type="text" | ||
21 | placeholder="Искать..." | ||
22 | aria-label="Search" | ||
23 | value="{{$find_key}}" | ||
24 | /> | ||
25 | </div> | ||
26 | <div style="float:left; margin-top: -5px;"> | ||
27 | <select | ||
28 | name="category_job" id="category_job" | ||
29 | placeholder="Вакансии" | ||
30 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | ||
31 | > | ||
32 | <option value="Все вакансии">Все вакансии</option> | ||
33 | @foreach ($select_job as $job) | ||
34 | <option value="{{$job->name}}" @if ($find_job ==$job->name) selected @endif>{{$job->name}}</option> | ||
35 | @endforeach | ||
36 | </select> | ||
37 | </div> | ||
38 | <div style="float: left"> | ||
39 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | ||
40 | </div> | ||
41 | </form> | ||
42 |
resources/views/admin/media/index.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 | @endsection | ||
33 | |||
34 | @section('modal') | ||
35 | |||
36 | @endsection | ||
37 | |||
38 | @section('search') | ||
39 | |||
40 | @endsection | ||
41 | |||
42 | @section('content') | ||
43 | |||
44 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | ||
45 | <div class="w-full overflow-x-auto"> | ||
46 | <table class="w-full whitespace-no-wrap"> | ||
47 | <thead> | ||
48 | <tr | ||
49 | 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" | ||
50 | > | ||
51 | <th class="px-4 py-3">№</th> | ||
52 | <th class="px-4 py-3">Картинка</th> | ||
53 | <th class="px-4 py-3">Юзер</th> | ||
54 | <th class="px-4 py-3">Дата загрузки</th> | ||
55 | <th class="px-4 py-3">Редактировать</th> | ||
56 | </tr> | ||
57 | </thead> | ||
58 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | ||
59 | @foreach($Media as $img) | ||
60 | <tr class="text-gray-700 dark:text-gray-400"> | ||
61 | <td class="px-4 py-3"> | ||
62 | {{$img->id}} | ||
63 | </td> | ||
64 | <td class="px-4 py-3"> | ||
65 | <img style="width: 50px" src="{{ asset(Storage::url($img->file)) }}" /> | ||
66 | </td> | ||
67 | |||
68 | <td class="px-4 py-3"> | ||
69 | <div class="flex items-center text-sm"> | ||
70 | <div> | ||
71 | @if (isset($img->user->id)) | ||
72 | <p class="font-semibold"> | ||
73 | {{$img->user->name_man}} {{$img->user->surname}} {{$img->user->surname2}} | ||
74 | </p> | ||
75 | <p class="text-xs text-gray-600 dark:text-gray-400"> | ||
76 | ID: {{$img->id}} | ||
77 | </p> | ||
78 | @endif | ||
79 | </div> | ||
80 | </div> | ||
81 | </td> | ||
82 | <td class="px-4 py-3"> | ||
83 | {{$img->created_at}} | ||
84 | </td> | ||
85 | |||
86 | <td class="px-4 py-3 text-sm_"> | ||
87 | <form action="{{ route('admin.delete-media', ['media' => $img->id]) }}" method="POST"> | ||
88 | @csrf | ||
89 | @method('DELETE') | ||
90 | <input class="btn btn-danger" type="submit" value="Удалить"/> | ||
91 | </form> | ||
92 | </td> | ||
93 | </tr> | ||
94 | @endforeach | ||
95 | </tbody> | ||
96 | </table> | ||
97 | </div> | ||
98 | |||
99 | <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"> | ||
100 | <?=$Media->appends($_GET)->links('admin.pagginate'); ?> | ||
101 | </div> | ||
102 | </div> | ||
103 | @endsection | ||
104 |
resources/views/admin/register.blade.php
1 | @extends('layout.authorize', ['title' => 'Регистрация в административной панели']) | 1 | @extends('layout.authorize', ['title' => 'Регистрация в административной панели']) |
2 | 2 | ||
3 | @section('image') | 3 | @section('image') |
4 | <img | 4 | <img |
5 | aria-hidden="true" | 5 | aria-hidden="true" |
6 | class="object-cover w-full h-full dark:hidden" | 6 | class="object-cover w-full h-full dark:hidden" |
7 | src="{{ asset('assets/img/create-account-office.jpeg') }}" | 7 | src="{{ asset('assets/img/create-account-office.jpeg') }}" |
8 | alt="Office" | 8 | alt="Office" |
9 | /> | 9 | /> |
10 | <img | 10 | <img |
11 | aria-hidden="true" | 11 | aria-hidden="true" |
12 | class="hidden object-cover w-full h-full dark:block" | 12 | class="hidden object-cover w-full h-full dark:block" |
13 | src="{{ asset('assets/img/create-account-office-dark.jpeg') }}" | 13 | src="{{ asset('assets/img/create-account-office-dark.jpeg') }}" |
14 | alt="Office" | 14 | alt="Office" |
15 | /> | 15 | /> |
16 | @endsection | 16 | @endsection |
17 | 17 | ||
18 | @section('content') | 18 | @section('content') |
19 | <h1 | 19 | <h1 |
20 | class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-200" | 20 | class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-200" |
21 | > | 21 | > |
22 | Создание аккаунта администратора | 22 | Создание аккаунта администратора |
23 | </h1> | 23 | </h1> |
24 | <form method="POST" action="{{ route('admin.create') }}"> | 24 | <form method="POST" action="{{ route('admin.create') }}"> |
25 | @csrf | 25 | @csrf |
26 | |||
27 | <input type="hidden" id="code_emp" name="code_emp" | ||
28 | 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" | ||
29 | placeholder="" value="{{ $code_emp }}" | ||
30 | /> | ||
31 | |||
26 | <label class="block text-sm"> | 32 | <label class="block text-sm"> |
27 | <span class="text-gray-700 dark:text-gray-400">Имя</span> | 33 | <span class="text-gray-700 dark:text-gray-400">Имя</span> |
28 | <input id="name" name="name" | 34 | <input id="name" name="name" |
29 | 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" | 35 | 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" |
30 | placeholder="Введите имя" value="{{ old('name') }}" | 36 | placeholder="Введите имя" value="{{ old('name') }}" |
31 | /> | 37 | /> |
32 | @error('name') | 38 | @error('name') |
33 | <span class="invalid-feedback" role="alert"> | 39 | <span class="invalid-feedback" role="alert"> |
34 | <strong>{{ $message }}</strong> | 40 | <strong>{{ $message }}</strong> |
35 | </span> | 41 | </span> |
36 | @enderror | 42 | @enderror |
37 | </label> | 43 | </label> |
38 | 44 | ||
39 | <label class="block text-sm"> | 45 | <label class="block text-sm"> |
40 | <span class="text-gray-700 dark:text-gray-400">Email</span> | 46 | <span class="text-gray-700 dark:text-gray-400">Email</span> |
41 | <input id="email" name="email" type="email" | 47 | <input id="email" name="email" type="email" |
42 | 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" | 48 | 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" |
43 | placeholder="Введите email" value="{{ old('email') }}" autocomplete="email" | 49 | placeholder="Введите email" value="{{ old('email') }}" autocomplete="email" |
44 | /> | 50 | /> |
45 | @error('email') | 51 | @error('email') |
46 | <span class="invalid-feedback" role="alert"> | 52 | <span class="invalid-feedback" role="alert"> |
47 | <strong>{{ $message }}</strong> | 53 | <strong>{{ $message }}</strong> |
48 | </span> | 54 | </span> |
49 | @enderror | 55 | @enderror |
50 | </label> | 56 | </label> |
51 | 57 | ||
52 | <label class="block mt-4 text-sm"> | 58 | <label class="block mt-4 text-sm"> |
53 | <span class="text-gray-700 dark:text-gray-400">Пароль</span> | 59 | <span class="text-gray-700 dark:text-gray-400">Пароль</span> |
54 | <input id="password" name="password" | 60 | <input id="password" name="password" |
55 | 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" | 61 | 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" |
56 | placeholder="Пароль" | 62 | placeholder="Пароль" |
57 | type="password" | 63 | type="password" |
58 | /> | 64 | /> |
59 | @error('password') | 65 | @error('password') |
60 | <span class="invalid-feedback" role="alert"> | 66 | <span class="invalid-feedback" role="alert"> |
61 | <strong>{{ $message }}</strong> | 67 | <strong>{{ $message }}</strong> |
62 | </span> | 68 | </span> |
63 | @enderror | 69 | @enderror |
64 | </label> | 70 | </label> |
65 | 71 | ||
66 | <label class="block mt-4 text-sm"> | 72 | <label class="block mt-4 text-sm"> |
67 | <span class="text-gray-700 dark:text-gray-400"> | 73 | <span class="text-gray-700 dark:text-gray-400"> |
68 | Подтверждение пароля | 74 | Подтверждение пароля |
69 | </span> | 75 | </span> |
70 | <input id="password-confirm" name="password_confirmation" | 76 | <input id="password-confirm" name="password_confirmation" |
71 | 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" | 77 | 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" |
72 | placeholder="Подтверждение пароля" | 78 | placeholder="Подтверждение пароля" |
73 | type="password" | 79 | type="password" |
74 | /> | 80 | /> |
75 | </label> | 81 | </label> |
76 | 82 | ||
77 | <div class="flex mt-6 text-sm"> | 83 | <div class="flex mt-6 text-sm"> |
78 | <label class="flex items-center dark:text-gray-400"> | 84 | <label class="flex items-center dark:text-gray-400"> |
79 | <input | 85 | <input |
80 | type="checkbox" | 86 | type="checkbox" |
81 | class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 87 | class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
82 | /> | 88 | /> |
83 | <span class="ml-2"> | 89 | <span class="ml-2"> |
84 | Я принимаю условия | 90 | Я принимаю условия |
85 | <span class="underline">политики безопасности</span> | 91 | <span class="underline">политики безопасности</span> |
86 | </span> | 92 | </span> |
87 | </label> | 93 | </label> |
88 | </div> | 94 | </div> |
89 | 95 | ||
90 | <!-- You should use a button here, as the anchor is only used for the example --> | 96 | <!-- You should use a button here, as the anchor is only used for the example --> |
91 | <button | 97 | <button |
92 | class="block w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-center 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" | 98 | class="block w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-center 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" |
93 | type="submit" | 99 | type="submit" |
94 | > | 100 | > |
95 | Создать пользователя | 101 | Создать пользователя |
96 | </button> | 102 | </button> |
97 | </form> | 103 | </form> |
98 | <hr class="my-8" /> | 104 | <hr class="my-8" /> |
99 | 105 | ||
100 | <!--<button | 106 | <!--<button |
101 | class="flex items-center justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray" | 107 | class="flex items-center justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray" |
102 | > | 108 | > |
103 | <svg | 109 | <svg |
104 | class="w-4 h-4 mr-2" | 110 | class="w-4 h-4 mr-2" |
105 | aria-hidden="true" | 111 | aria-hidden="true" |
106 | viewBox="0 0 24 24" | 112 | viewBox="0 0 24 24" |
107 | fill="currentColor" | 113 | fill="currentColor" |
108 | > | 114 | > |
109 | <path | 115 | <path |
110 | d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" | 116 | d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" |
111 | /> | 117 | /> |
112 | </svg> | 118 | </svg> |
113 | Github | 119 | Github |
114 | </button> | 120 | </button> |
115 | <button | 121 | <button |
116 | class="flex items-center justify-center w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray" | 122 | class="flex items-center justify-center w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray" |
117 | > | 123 | > |
118 | <svg | 124 | <svg |
119 | class="w-4 h-4 mr-2" | 125 | class="w-4 h-4 mr-2" |
120 | aria-hidden="true" | 126 | aria-hidden="true" |
121 | viewBox="0 0 24 24" | 127 | viewBox="0 0 24 24" |
122 | fill="currentColor" | 128 | fill="currentColor" |
123 | > | 129 | > |
124 | <path | 130 | <path |
125 | d="M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z" | 131 | d="M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z" |
126 | /> | 132 | /> |
127 | </svg> | 133 | </svg> |
128 | 134 | ||
129 | </button>--> | 135 | </button>--> |
130 | 136 | ||
131 | <p class="mt-4"> | 137 | <p class="mt-4"> |
132 | <a | 138 | <a |
133 | class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline" | 139 | class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline" |
134 | href="{{ route('admin.login') }}" | 140 | href="{{ route('admin.login') }}" |
135 | > | 141 | > |
136 | Авторизация в системе | 142 | Авторизация в системе |
137 | </a> | 143 | </a> |
138 | </p> | 144 | </p> |
139 | <p class="mt-1"> | 145 | <p class="mt-1"> |
140 | <a | 146 | <a |
141 | class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline" | 147 | class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline" |
142 | href="{{ route('index') }}" | 148 | href="{{ route('index') }}" |
143 | > | 149 | > |
144 | Главная страница | 150 | Главная страница |
145 | </a> | 151 | </a> |
146 | </p> | 152 | </p> |
147 | @endsection | 153 | @endsection |
148 | 154 |
resources/views/admin/users/form.blade.php
1 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 1 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
2 | <label class="block text-sm"> | 2 | <!--<label class="block text-sm"> |
3 | <span class="text-gray-700 dark:text-gray-400">Имя/Псевдоним</span> | 3 | <span class="text-gray-700 dark:text-gray-400">Имя/Псевдоним</span> |
4 | <input name="name" id="name" | 4 | <input name="name" id="name" |
5 | 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" | 5 | 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" |
6 | placeholder="Имя/Псевдоним" value="{{ old('name') ?? $user->name ?? '' }}" | 6 | placeholder="Имя/Псевдоним" value="{{ old('name') ?? $user->name ?? '' }}" |
7 | /> | 7 | /> |
8 | @error('name') | 8 | @error('name') |
9 | <span class="text-xs text-red-600 dark:text-red-400"> | 9 | <span class="text-xs text-red-600 dark:text-red-400"> |
10 | {{ $message }} | 10 | {{ $message }} |
11 | </span> | 11 | </span> |
12 | @enderror | 12 | @enderror |
13 | </label><br>--> | ||
14 | |||
15 | <input name="name" id="name" type="hidden" | ||
16 | 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" | ||
17 | placeholder="Имя/Псевдоним" value="{{ old('name') ?? $user->name ?? 'Пользователь базы данных' }}" | ||
18 | /> | ||
19 | |||
20 | <label class="block text-sm"> | ||
21 | <span class="text-gray-700 dark:text-gray-400">Должность</span> | ||
22 | <select name="position_work" id="position_work" class="form-control block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | ||
23 | "> | ||
24 | @isset($list_job_titles) | ||
25 | @foreach($list_job_titles as $job_title) | ||
26 | <option value="{{ $job_title->id }}" | ||
27 | @if (isset($user->workers[0]->position_work)) | ||
28 | @if($job_title->id == $user->workers[0]->position_work) | ||
29 | selected | ||
30 | @endif | ||
31 | @endif | ||
32 | >{{ $job_title->name }} ({{ $job_title->id }})</option> | ||
33 | @endforeach | ||
34 | @endisset | ||
35 | </select> | ||
36 | @error('name') | ||
37 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
38 | {{ $message }} | ||
39 | </span> | ||
40 | @enderror | ||
13 | </label><br> | 41 | </label><br> |
14 | 42 | ||
15 | <label class="block text-sm"> | 43 | <label class="block text-sm"> |
16 | <span class="text-gray-700 dark:text-gray-400">Фамилия</span> | 44 | <span class="text-gray-700 dark:text-gray-400">Фамилия</span> |
17 | <input name="surname" id="surname" | 45 | <input name="surname" id="surname" |
18 | 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" | 46 | 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" |
19 | placeholder="Фамилия" value="{{ old('surname') ?? $user->surname ?? '' }}" | 47 | placeholder="Фамилия" value="{{ old('surname') ?? $user->surname ?? '' }}" |
20 | /> | 48 | /> |
21 | @error('surname') | 49 | @error('surname') |
22 | <span class="text-xs text-red-600 dark:text-red-400"> | 50 | <span class="text-xs text-red-600 dark:text-red-400"> |
23 | {{ $message }} | 51 | {{ $message }} |
24 | </span> | 52 | </span> |
25 | @enderror | 53 | @enderror |
26 | </label><br> | 54 | </label><br> |
27 | 55 | ||
28 | <label class="block text-sm"> | 56 | <label class="block text-sm"> |
29 | <span class="text-gray-700 dark:text-gray-400">Имя</span> | 57 | <span class="text-gray-700 dark:text-gray-400">Имя</span> |
30 | <input name="name_man" id="name_man" | 58 | <input name="name_man" id="name_man" |
31 | 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" | 59 | 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" |
32 | placeholder="Имя" value="{{ old('name_man') ?? $user->name_man ?? '' }}" | 60 | placeholder="Имя" value="{{ old('name_man') ?? $user->name_man ?? '' }}" |
33 | /> | 61 | /> |
34 | @error('name_man') | 62 | @error('name_man') |
35 | <span class="text-xs text-red-600 dark:text-red-400"> | 63 | <span class="text-xs text-red-600 dark:text-red-400"> |
36 | {{ $message }} | 64 | {{ $message }} |
37 | </span> | 65 | </span> |
38 | @enderror | 66 | @enderror |
39 | </label><br> | 67 | </label><br> |
40 | 68 | ||
41 | <input type="hidden" name="is_worker" id="is_worker" value="1"/> | 69 | <input type="hidden" name="is_worker" id="is_worker" value="1"/> |
42 | <input type="hidden" name="is_bd" id="is_bd" value="1"/> | 70 | <input type="hidden" name="is_bd" id="is_bd" value="1"/> |
43 | <input type="hidden" name="admin" id="admin" value="0"/> | 71 | <input type="hidden" name="admin" id="admin" value="0"/> |
44 | <input type="hidden" name="password" id="password" value="1234567890"/> | 72 | <input type="hidden" name="password" id="password" value="1234567890"/> |
45 | 73 | ||
46 | <label class="block text-sm"> | 74 | <label class="block text-sm"> |
47 | <span class="text-gray-700 dark:text-gray-400">Отчество</span> | 75 | <span class="text-gray-700 dark:text-gray-400">Отчество</span> |
48 | <input name="surname2" id="surname2" | 76 | <input name="surname2" id="surname2" |
49 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | 77 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" |
50 | placeholder="Отчество" value="{{ old('surname2') ?? $user->surname2 ?? '' }}" | 78 | placeholder="Отчество" value="{{ old('surname2') ?? $user->surname2 ?? '' }}" |
51 | /> | 79 | /> |
52 | @error('surname2') | 80 | @error('surname2') |
53 | <span class="text-xs text-red-600 dark:text-red-400"> | 81 | <span class="text-xs text-red-600 dark:text-red-400"> |
54 | {{ $message }} | 82 | {{ $message }} |
55 | </span> | 83 | </span> |
56 | @enderror | 84 | @enderror |
57 | </label><br> | 85 | </label><br> |
58 | 86 | ||
59 | <label class="block text-sm"> | 87 | <label class="block text-sm"> |
60 | <span class="text-gray-700 dark:text-gray-400">Email</span> | 88 | <span class="text-gray-700 dark:text-gray-400">Email</span> |
61 | <input name="email" id="email" | 89 | <input name="email" id="email" |
62 | 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" | 90 | 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" |
63 | placeholder="Email" value="{{ old('email') ?? $user->email ?? '' }}" | 91 | placeholder="Email" value="{{ old('email') ?? $user->email ?? '' }}" |
64 | /> | 92 | /> |
65 | @error('email') | 93 | @error('email') |
66 | <span class="text-xs text-red-600 dark:text-red-400"> | 94 | <span class="text-xs text-red-600 dark:text-red-400"> |
67 | {{ $message }} | 95 | {{ $message }} |
68 | </span> | 96 | </span> |
69 | @enderror | 97 | @enderror |
70 | </label><br> | 98 | </label><br> |
71 | 99 | ||
72 | <label class="block text-sm"> | 100 | <label class="block text-sm"> |
73 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> | 101 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> |
74 | <input name="telephone" id="telephone" | 102 | <input name="telephone" id="telephone" |
75 | 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" | 103 | 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" |
76 | placeholder="Телефон" value="{{ old('telephone') ?? $user->telephone ?? '' }}" | 104 | placeholder="Телефон" value="{{ old('telephone') ?? $user->telephone ?? '' }}" |
77 | /> | 105 | /> |
78 | @error('telephone') | 106 | @error('telephone') |
79 | <span class="text-xs text-red-600 dark:text-red-400"> | 107 | <span class="text-xs text-red-600 dark:text-red-400"> |
80 | {{ $message }} | 108 | {{ $message }} |
81 | </span> | 109 | </span> |
82 | @enderror | 110 | @enderror |
83 | </label><br> | 111 | </label><br> |
84 | 112 | ||
85 | <label class="block text-sm"> | 113 | <label class="block text-sm"> |
86 | <span class="text-gray-700 dark:text-gray-400">Файл-анкета</span> | 114 | <span class="text-gray-700 dark:text-gray-400">Файл-анкета</span> |
87 | <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 | 115 | <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 |
88 | focus:border-purple-400 focus:outline-none focus:shadow-outline-purple | 116 | focus:border-purple-400 focus:outline-none focus:shadow-outline-purple |
89 | dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | 117 | dark:text-gray-300 dark:focus:shadow-outline-gray form-input" |
90 | id="file" name="file"> | 118 | id="file" name="file"> |
91 | @error('file') | 119 | @error('file') |
92 | <span class="text-xs text-red-600 dark:text-red-400"> | 120 | <span class="text-xs text-red-600 dark:text-red-400"> |
93 | {{ $message }} | 121 | {{ $message }} |
94 | </span> | 122 | </span> |
95 | @enderror | 123 | @enderror |
96 | @isset($user->file) | 124 | @isset($user->file) |
97 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">{{ $user->file }}</a> | 125 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">{{ $user->file }}</a> |
98 | @endisset | 126 | @endisset |
99 | </label><br> | 127 | </label><br> |
100 | 128 | ||
101 | <!--<label class="block text-sm"> | 129 | <!--<label class="block text-sm"> |
102 | 130 | ||
103 | <input type="hidden" name="page_worker" value="0" /> | 131 | <input type="hidden" name="page_worker" value="0" /> |
104 | <input name="page_worker" @php if (isset($user->workers->id)) echo "checked"; @endphp | 132 | <input name="page_worker" @php if (isset($user->workers->id)) echo "checked"; @endphp |
105 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 133 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
106 | placeholder="" style="float:left; margin-right: 5px" type="checkbox" value="1" | 134 | placeholder="" style="float:left; margin-right: 5px" type="checkbox" value="1" |
107 | /><p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Анкета </p><br> | 135 | /><p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Анкета </p><br> |
108 | 136 | ||
109 | </label><br>--> | 137 | </label><br>--> |
110 | 138 | ||
111 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 139 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
112 | <div> | 140 | <div> |
113 | <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"> | 141 | <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"> |
114 | Сохранить | 142 | Сохранить |
115 | </button> | 143 | </button> |
116 | <a href="{{ route('admin.basedata') }}" | 144 | <a href="{{ route('admin.basedata') }}" |
117 | 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" | 145 | 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" |
118 | style="display: -webkit-inline-box; height: 30px!important;" | 146 | style="display: -webkit-inline-box; height: 30px!important;" |
119 | >Назад</a> | 147 | >Назад</a> |
120 | </div> | 148 | </div> |
121 | </div> | 149 | </div> |
122 | </div> | 150 | </div> |
123 | 151 |
resources/views/admin/users/index.blade.php
1 | @extends('layout.admin', ['title' => $title]) | 1 | @extends('layout.admin', ['title' => $title]) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.check_click', function () { | 6 | $(document).on('click', '.check_click', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var field = this_.attr('data-field'); | 9 | var field = this_.attr('data-field'); |
10 | var ajax_block = $('#ajax_block'); | 10 | var ajax_block = $('#ajax_block'); |
11 | var bool = 0; | 11 | var bool = 0; |
12 | var str_get = ''; | 12 | var str_get = ''; |
13 | 13 | ||
14 | if(this.checked){ | 14 | if(this.checked){ |
15 | bool = 1; | 15 | bool = 1; |
16 | } else { | 16 | } else { |
17 | bool = 0; | 17 | bool = 0; |
18 | } | 18 | } |
19 | console.log(field); | 19 | console.log(field); |
20 | str_get = "id=" + value + "&" + field + "=" + bool; | 20 | str_get = "id=" + value + "&" + field + "=" + bool; |
21 | console.log(str_get); | 21 | console.log(str_get); |
22 | 22 | ||
23 | $.ajax({ | 23 | $.ajax({ |
24 | type: "GET", | 24 | type: "GET", |
25 | url: "{{ url()->full()}}", | 25 | url: "{{ url()->full()}}", |
26 | data: str_get, | 26 | data: str_get, |
27 | success: function (data) { | 27 | success: function (data) { |
28 | console.log('Обновление таблицы пользователей '); | 28 | console.log('Обновление таблицы пользователей '); |
29 | //data = JSON.parse(data); | 29 | //data = JSON.parse(data); |
30 | //console.log(data); | 30 | //console.log(data); |
31 | ajax_block.html(data); | 31 | ajax_block.html(data); |
32 | }, | 32 | }, |
33 | headers: { | 33 | headers: { |
34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
35 | }, | 35 | }, |
36 | error: function (data) { | 36 | error: function (data) { |
37 | console.log('Error: ' + data); | 37 | console.log('Error: ' + data); |
38 | } | 38 | } |
39 | }); | 39 | }); |
40 | }); | 40 | }); |
41 | }); | 41 | }); |
42 | </script> | 42 | </script> |
43 | @endsection | 43 | @endsection |
44 | 44 | ||
45 | @section('search') | 45 | @section('search') |
46 | @include('admin.find') | 46 | @include('admin.find') |
47 | @endsection | 47 | @endsection |
48 | 48 | ||
49 | @section('content') | 49 | @section('content') |
50 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 50 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
51 | <div class="w-full overflow-x-auto"> | 51 | <div class="w-full overflow-x-auto"> |
52 | <table class="w-full whitespace-no-wrap"> | 52 | <table class="w-full whitespace-no-wrap"> |
53 | <thead> | 53 | <thead> |
54 | <tr | 54 | <tr |
55 | 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" | 55 | 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" |
56 | > | 56 | > |
57 | <th class="px-4 py-3">№</th> | 57 | <th class="px-4 py-3">№</th> |
58 | <th class="px-4 py-3">Имя</th> | 58 | <th class="px-4 py-3">Имя</th> |
59 | <th class="px-4 py-3">Email/логин</th> | 59 | <th class="px-4 py-3">Email/логин</th> |
60 | <th class="px-4 py-3">Работодатель/работник/администратор</th> | 60 | <th class="px-4 py-3">Работодатель/работник/администратор</th> |
61 | <th class="px-4 py-3">Бан</th> | 61 | <th class="px-4 py-3">Бан</th> |
62 | <th class="px-4 py-3">Новый</th> | 62 | <th class="px-4 py-3">Новый</th> |
63 | @if ($id_admin == 1) | 63 | @if ($id_admin == 1) |
64 | <th class="px-4 py-3">Админ</th> | 64 | <th class="px-4 py-3">Админ</th> |
65 | @endif | 65 | @endif |
66 | <th class="px-4 py-3">Дата регистрации</th> | 66 | <th class="px-4 py-3">Дата регист.</th> |
67 | </tr> | 67 | </tr> |
68 | </thead> | 68 | </thead> |
69 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 69 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
70 | @foreach($users as $user) | 70 | @foreach($users as $user) |
71 | <tr class="text-gray-700 dark:text-gray-400"> | 71 | <tr class="text-gray-700 dark:text-gray-400"> |
72 | <td class="px-4 py-3"> | 72 | <td class="px-4 py-3"> |
73 | {{$user->id}} | 73 | {{$user->id}} |
74 | </td> | 74 | </td> |
75 | <td class="px-4 py-3"> | 75 | <td class="px-4 py-3"> |
76 | <!--<div class="flex items-center text-sm"> | 76 | <!--<div class="flex items-center text-sm"> |
77 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 77 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
78 | <div | 78 | <div |
79 | class="absolute inset-0 rounded-full shadow-inner" | 79 | class="absolute inset-0 rounded-full shadow-inner" |
80 | aria-hidden="true" | 80 | aria-hidden="true" |
81 | ></div> | 81 | ></div> |
82 | </div> | 82 | </div> |
83 | <div> | 83 | <div> |
84 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> | 84 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> |
85 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 85 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
86 | Все пользователи сайта | 86 | Все пользователи сайта |
87 | </p> | 87 | </p> |
88 | </div> | 88 | </div> |
89 | </div> | 89 | </div> |
90 | --> | 90 | --> |
91 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}">{{ $user->name }}</a> | 91 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}">{{ $user->name }}</a> |
92 | </td> | 92 | </td> |
93 | <td class="px-4 py-3 text-sm"> | 93 | <td class="px-4 py-3 text-sm"> |
94 | {{ $user->email }} | 94 | {{ $user->email }} |
95 | </td> | 95 | </td> |
96 | <td class="px-4 py-3 text-xs"> | 96 | <td class="px-4 py-3 text-xs"> |
97 | <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"> | 97 | <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"> |
98 | @if ($user->is_worker) | 98 | @if ($user->is_worker) |
99 | Работник | 99 | Работник |
100 | @else | 100 | @else |
101 | Работодатель | 101 | Работодатель |
102 | @endif | 102 | @endif |
103 | </span> | 103 | </span> |
104 | @if ($user->admin) | 104 | @if ($user->admin) |
105 | <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"> | 105 | <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"> |
106 | Администратор | 106 | Администратор |
107 | </span> | 107 | </span> |
108 | @endif | 108 | @endif |
109 | @if ($user->is_bd) | 109 | @if ($user->is_bd) |
110 | <span 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"> | 110 | <span 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"> |
111 | База данных | 111 | База данных |
112 | </span> | 112 | </span> |
113 | @endif | 113 | @endif |
114 | </td> | 114 | </td> |
115 | <td class="px-4 py-3 text-sm"> | 115 | <td class="px-4 py-3 text-sm"> |
116 | @if ($user->id > 1) | 116 | @if ($user->id > 1) |
117 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_ban" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | 117 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_ban" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> |
118 | @endif | 118 | @endif |
119 | </td> | 119 | </td> |
120 | 120 | ||
121 | <td class="px-4 py-3 text-sm"> | 121 | <td class="px-4 py-3 text-sm"> |
122 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_new" name="new_{{$user->id}}" {{ ($user->is_new) ? "checked" : "" }}/> | 122 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="is_new" name="new_{{$user->id}}" {{ ($user->is_new) ? "checked" : "" }}/> |
123 | </td> | 123 | </td> |
124 | 124 | ||
125 | @if ($id_admin == 1) | 125 | @if ($id_admin == 1) |
126 | <td class="px-4 py-3 text-sm"> | 126 | <td class="px-4 py-3 text-sm"> |
127 | @if ($user->id > 1) | 127 | @if ($user->id > 1) |
128 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="admin" name="admin_{{$user->id}}" {{ ($user->admin) ? "checked" : "" }}/> | 128 | <input type="checkbox" class="check_click" value="{{$user->id}}" data-field="admin" name="admin_{{$user->id}}" {{ ($user->admin) ? "checked" : "" }}/> |
129 | @endif | 129 | @endif |
130 | </td> | 130 | </td> |
131 | @endif | 131 | @endif |
132 | 132 | ||
133 | <td class="px-4 py-3 text-sm"> | 133 | <td class="px-4 py-3 text-sm"> |
134 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 134 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
135 | </td> | 135 | </td> |
136 | </tr> | 136 | </tr> |
137 | @endforeach | 137 | @endforeach |
138 | </tbody> | 138 | </tbody> |
139 | </table> | 139 | </table> |
140 | </div> | 140 | </div> |
141 | 141 | ||
142 | <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"> | 142 | <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"> |
143 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> | 143 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> |
144 | <?=$users->links('admin.pagginate'); ?> | 144 | <?=$users->links('admin.pagginate'); ?> |
145 | </div> | 145 | </div> |
146 | 146 | ||
147 | 147 | ||
148 | <!--<div | 148 | <!--<div |
149 | 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" | 149 | 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" |
150 | > | 150 | > |
151 | <span class="flex items-center col-span-3"> | 151 | <span class="flex items-center col-span-3"> |
152 | Showing 21-30 of 100 | 152 | Showing 21-30 of 100 |
153 | </span> | 153 | </span> |
154 | <span class="col-span-2"></span> | 154 | <span class="col-span-2"></span> |
155 | 155 | ||
156 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 156 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
157 | <nav aria-label="Table navigation"> | 157 | <nav aria-label="Table navigation"> |
158 | <ul class="inline-flex items-center"> | 158 | <ul class="inline-flex items-center"> |
159 | <li> | 159 | <li> |
160 | <button | 160 | <button |
161 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 161 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
162 | aria-label="Previous" | 162 | aria-label="Previous" |
163 | > | 163 | > |
164 | <svg | 164 | <svg |
165 | aria-hidden="true" | 165 | aria-hidden="true" |
166 | class="w-4 h-4 fill-current" | 166 | class="w-4 h-4 fill-current" |
167 | viewBox="0 0 20 20" | 167 | viewBox="0 0 20 20" |
168 | > | 168 | > |
169 | <path | 169 | <path |
170 | 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" | 170 | 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" |
171 | clip-rule="evenodd" | 171 | clip-rule="evenodd" |
172 | fill-rule="evenodd" | 172 | fill-rule="evenodd" |
173 | ></path> | 173 | ></path> |
174 | </svg> | 174 | </svg> |
175 | </button> | 175 | </button> |
176 | </li> | 176 | </li> |
177 | <li> | 177 | <li> |
178 | <button | 178 | <button |
179 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 179 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
180 | > | 180 | > |
181 | 1 | 181 | 1 |
182 | </button> | 182 | </button> |
183 | </li> | 183 | </li> |
184 | <li> | 184 | <li> |
185 | <button | 185 | <button |
186 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 186 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
187 | > | 187 | > |
188 | 2 | 188 | 2 |
189 | </button> | 189 | </button> |
190 | </li> | 190 | </li> |
191 | <li> | 191 | <li> |
192 | <button | 192 | <button |
193 | 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" | 193 | 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" |
194 | > | 194 | > |
195 | 3 | 195 | 3 |
196 | </button> | 196 | </button> |
197 | </li> | 197 | </li> |
198 | <li> | 198 | <li> |
199 | <button | 199 | <button |
200 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 200 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
201 | > | 201 | > |
202 | 4 | 202 | 4 |
203 | </button> | 203 | </button> |
204 | </li> | 204 | </li> |
205 | <li> | 205 | <li> |
206 | <span class="px-3 py-1">...</span> | 206 | <span class="px-3 py-1">...</span> |
207 | </li> | 207 | </li> |
208 | <li> | 208 | <li> |
209 | <button | 209 | <button |
210 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 210 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
211 | > | 211 | > |
212 | 8 | 212 | 8 |
213 | </button> | 213 | </button> |
214 | </li> | 214 | </li> |
215 | <li> | 215 | <li> |
216 | <button | 216 | <button |
217 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 217 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
218 | > | 218 | > |
219 | 9 | 219 | 9 |
220 | </button> | 220 | </button> |
221 | </li> | 221 | </li> |
222 | <li> | 222 | <li> |
223 | <button | 223 | <button |
224 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 224 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
225 | aria-label="Next" | 225 | aria-label="Next" |
226 | > | 226 | > |
227 | <svg | 227 | <svg |
228 | class="w-4 h-4 fill-current" | 228 | class="w-4 h-4 fill-current" |
229 | aria-hidden="true" | 229 | aria-hidden="true" |
230 | viewBox="0 0 20 20" | 230 | viewBox="0 0 20 20" |
231 | > | 231 | > |
232 | <path | 232 | <path |
233 | 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" | 233 | 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" |
234 | clip-rule="evenodd" | 234 | clip-rule="evenodd" |
235 | fill-rule="evenodd" | 235 | fill-rule="evenodd" |
236 | ></path> | 236 | ></path> |
237 | </svg> | 237 | </svg> |
238 | </button> | 238 | </button> |
239 | </li> | 239 | </li> |
240 | </ul> | 240 | </ul> |
241 | </nav> | 241 | </nav> |
242 | </span> | 242 | </span> |
243 | </div>--> | 243 | </div>--> |
244 | </div> | 244 | </div> |
245 | 245 | ||
246 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | 246 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> |
247 | 247 | ||
248 | 248 | ||
249 | @endsection | 249 | @endsection |
250 | 250 |
resources/views/admin/users/index_bd.blade.php
1 | @extends('layout.admin', ['title' => $title]) | 1 | @extends('layout.admin', ['title' => $title]) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.check_click', function () { | 6 | $(document).on('click', '.check_click', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var field = this_.attr('data-field'); | 9 | var field = this_.attr('data-field'); |
10 | var ajax_block = $('#ajax_block'); | 10 | var ajax_block = $('#ajax_block'); |
11 | var bool = 0; | 11 | var bool = 0; |
12 | var str_get = ''; | 12 | var str_get = ''; |
13 | 13 | ||
14 | if(this.checked){ | 14 | if(this.checked){ |
15 | bool = 1; | 15 | bool = 1; |
16 | } else { | 16 | } else { |
17 | bool = 0; | 17 | bool = 0; |
18 | } | 18 | } |
19 | console.log(field); | 19 | console.log(field); |
20 | str_get = "id=" + value + "&" + field + "=" + bool; | 20 | str_get = "id=" + value + "&" + field + "=" + bool; |
21 | console.log(str_get); | 21 | console.log(str_get); |
22 | 22 | ||
23 | $.ajax({ | 23 | $.ajax({ |
24 | type: "GET", | 24 | type: "GET", |
25 | url: "{{ url()->full()}}", | 25 | url: "{{ url()->full()}}", |
26 | data: str_get, | 26 | data: str_get, |
27 | success: function (data) { | 27 | success: function (data) { |
28 | console.log('Обновление таблицы пользователей '); | 28 | console.log('Обновление таблицы пользователей '); |
29 | //data = JSON.parse(data); | 29 | //data = JSON.parse(data); |
30 | //console.log(data); | 30 | //console.log(data); |
31 | ajax_block.html(data); | 31 | ajax_block.html(data); |
32 | }, | 32 | }, |
33 | headers: { | 33 | headers: { |
34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
35 | }, | 35 | }, |
36 | error: function (data) { | 36 | error: function (data) { |
37 | console.log('Error: ' + data); | 37 | console.log('Error: ' + data); |
38 | } | 38 | } |
39 | }); | 39 | }); |
40 | }); | 40 | }); |
41 | }); | 41 | }); |
42 | </script> | 42 | </script> |
43 | @endsection | 43 | @endsection |
44 | 44 | ||
45 | @section('search') | 45 | @section('search') |
46 | @include('admin.find') | 46 | @include('admin.find') |
47 | @endsection | 47 | @endsection |
48 | 48 | ||
49 | @section('content') | 49 | @section('content') |
50 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 50 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
51 | <div class="w-full overflow-x-auto"> | 51 | <div class="w-full overflow-x-auto"> |
52 | <a 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" href="{{ route('admin.add-basedata') }}">Добавить пользователя</a><br><br> | 52 | <a 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" href="{{ route('admin.add-basedata') }}">Добавить пользователя</a><br><br> |
53 | <table class="w-full whitespace-no-wrap"> | 53 | <table class="w-full whitespace-no-wrap"> |
54 | <thead> | 54 | <thead> |
55 | <tr | 55 | <tr |
56 | 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" | 56 | 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" |
57 | > | 57 | > |
58 | <th class="px-4 py-3">№</th> | 58 | <th class="px-4 py-3">№</th> |
59 | <th class="px-4 py-3">Имя</th> | 59 | <th class="px-4 py-3">Имя</th> |
60 | <th class="px-4 py-3">Email/телефон</th> | 60 | <th class="px-4 py-3">Email/телефон</th> |
61 | <th class="px-4 py-3">Статус</th> | 61 | <th class="px-4 py-3">Должность</th> |
62 | <th class="px-4 py-3">Анкета</th> | 62 | <th class="px-4 py-3">Анкета</th> |
63 | <th class="px-4 py-3">Дата регистрации</th> | 63 | <th class="px-4 py-3">Дата регистрации</th> |
64 | <th class="px-4 py-3">Изменить</th> | 64 | <th class="px-4 py-3">Изменить</th> |
65 | </tr> | 65 | </tr> |
66 | </thead> | 66 | </thead> |
67 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 67 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
68 | @foreach($users as $user) | 68 | @foreach($users as $user) |
69 | <tr class="text-gray-700 dark:text-gray-400"> | 69 | <tr class="text-gray-700 dark:text-gray-400"> |
70 | <td class="px-4 py-3"> | 70 | <td class="px-4 py-3"> |
71 | {{$user->id}} | 71 | {{$user->id}} |
72 | </td> | 72 | </td> |
73 | <td class="px-4 py-3"> | 73 | <td class="px-4 py-3"> |
74 | <!--<div class="flex items-center text-sm"> | 74 | <!--<div class="flex items-center text-sm"> |
75 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 75 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
76 | <div | 76 | <div |
77 | class="absolute inset-0 rounded-full shadow-inner" | 77 | class="absolute inset-0 rounded-full shadow-inner" |
78 | aria-hidden="true" | 78 | aria-hidden="true" |
79 | ></div> | 79 | ></div> |
80 | </div> | 80 | </div> |
81 | <div> | 81 | <div> |
82 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> | 82 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> |
83 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 83 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
84 | Все пользователи сайта | 84 | Все пользователи сайта |
85 | </p> | 85 | </p> |
86 | </div> | 86 | </div> |
87 | </div> | 87 | </div> |
88 | --> | 88 | --> |
89 | <!--<a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}"></a>--> | 89 | <!--<a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}"></a>--> |
90 | 90 | ||
91 | {{ $user->name }} | 91 | {{ $user->name }} |
92 | </td> | 92 | </td> |
93 | 93 | ||
94 | <td class="px-4 py-3"> | 94 | <td class="px-4 py-3"> |
95 | <div class="flex items-center text-sm"> | 95 | <div class="flex items-center text-sm"> |
96 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 96 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
97 | <div | 97 | <div |
98 | class="absolute inset-0 rounded-full shadow-inner" | 98 | class="absolute inset-0 rounded-full shadow-inner" |
99 | aria-hidden="true" | 99 | aria-hidden="true" |
100 | ></div> | 100 | ></div> |
101 | </div>--> | 101 | </div>--> |
102 | <div> | 102 | <div> |
103 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> | 103 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> |
104 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 104 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
105 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} | 105 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} |
106 | </p> | 106 | </p> |
107 | </div> | 107 | </div> |
108 | </div> | 108 | </div> |
109 | </td> | 109 | </td> |
110 | 110 | ||
111 | <td class="px-4 py-3 text-xs"> | 111 | <!--<td class="px-4 py-3 text-xs"> |
112 | <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"> | 112 | <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"> |
113 | @if ($user->is_worker) | 113 | @if ($user->is_worker) |
114 | Работник | 114 | Работник |
115 | @else | 115 | @else |
116 | Работодатель | 116 | Работодатель |
117 | @endif | 117 | @endif |
118 | </span> | 118 | </span> |
119 | @if ($user->admin) | 119 | @if ($user->admin) |
120 | <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"> | 120 | <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"> |
121 | Администратор | 121 | Администратор |
122 | </span> | 122 | </span> |
123 | @endif | 123 | @endif |
124 | @if ($user->is_bd) | 124 | @if ($user->is_bd) |
125 | <span 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"> | 125 | <span 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"> |
126 | База данных | 126 | База данных |
127 | </span> | 127 | </span> |
128 | @endif | 128 | @endif |
129 | </td>--> | ||
130 | |||
131 | <td class="px-4 py-3 text-xs"> | ||
132 | @if (isset($user->jobtitles[0]->name)) | ||
133 | {{ $user->jobtitles[0]->name }} | ||
134 | @else | ||
135 | - | ||
136 | @endif | ||
129 | </td> | 137 | </td> |
130 | 138 | ||
131 | <td class="px-4 py-3 text-sm"> | 139 | <td class="px-4 py-3 text-sm"> |
132 | @if (isset($user->workers[0]->id)) | 140 | @if (isset($user->workers[0]->id)) |
133 | <!--<a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Править</a> |--> | 141 | <!--<a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Править</a> |--> |
134 | <!--<a href="{{ route('admin.doc-basedata', ['user' => $user->id]) }}">Скачать</a>--> | 142 | <!--<a href="{{ route('admin.doc-basedata', ['user' => $user->id]) }}">Скачать</a>--> |
135 | @endif | 143 | @endif |
136 | @isset($user->file) | 144 | @isset($user->file) |
137 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">Скачать</a> | 145 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">Скачать</a> |
138 | @else | 146 | @else |
139 | <p class="text-gray-700 dark:text-gray-400">-</p> | 147 | <p class="text-gray-700 dark:text-gray-400">-</p> |
140 | @endisset | 148 | @endisset |
141 | </td> | 149 | </td> |
142 | 150 | ||
143 | <td class="px-4 py-3 text-sm"> | 151 | <td class="px-4 py-3 text-sm"> |
144 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 152 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
145 | </td> | 153 | </td> |
146 | 154 | ||
147 | <td class="px-4 py-3 text-sm_"> | 155 | <td class="px-4 py-3 text-sm_"> |
148 | <form action="{{ route('admin.delete-basedata', ['user' => $user->id]) }}" method="POST"> | 156 | <form action="{{ route('admin.delete-basedata', ['user' => $user->id]) }}" method="POST"> |
149 | <a href="{{ route('admin.edit-basedata', ['user' => $user->id]) }}">Изменить</a> | | 157 | <a href="{{ route('admin.edit-basedata', ['user' => $user->id]) }}">Изменить</a> | |
150 | @csrf | 158 | @csrf |
151 | @method('DELETE') | 159 | @method('DELETE') |
152 | <input class="btn btn-danger" type="submit" value="Удалить"/> | 160 | <input class="btn btn-danger" type="submit" value="Удалить"/> |
153 | </form> | 161 | </form> |
154 | </td> | 162 | </td> |
155 | </tr> | 163 | </tr> |
156 | @endforeach | 164 | @endforeach |
157 | </tbody> | 165 | </tbody> |
158 | </table> | 166 | </table> |
159 | </div> | 167 | </div> |
160 | 168 | ||
161 | <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"> | 169 | <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"> |
162 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> | 170 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> |
163 | <?=$users->links('admin.pagginate'); ?> | 171 | <?=$users->links('admin.pagginate'); ?> |
164 | </div> | 172 | </div> |
165 | 173 | ||
166 | 174 | ||
167 | <!--<div | 175 | <!--<div |
168 | 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" | 176 | 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" |
169 | > | 177 | > |
170 | <span class="flex items-center col-span-3"> | 178 | <span class="flex items-center col-span-3"> |
171 | Showing 21-30 of 100 | 179 | Showing 21-30 of 100 |
172 | </span> | 180 | </span> |
173 | <span class="col-span-2"></span> | 181 | <span class="col-span-2"></span> |
174 | 182 | ||
175 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 183 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
176 | <nav aria-label="Table navigation"> | 184 | <nav aria-label="Table navigation"> |
177 | <ul class="inline-flex items-center"> | 185 | <ul class="inline-flex items-center"> |
178 | <li> | 186 | <li> |
179 | <button | 187 | <button |
180 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 188 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
181 | aria-label="Previous" | 189 | aria-label="Previous" |
182 | > | 190 | > |
183 | <svg | 191 | <svg |
184 | aria-hidden="true" | 192 | aria-hidden="true" |
185 | class="w-4 h-4 fill-current" | 193 | class="w-4 h-4 fill-current" |
186 | viewBox="0 0 20 20" | 194 | viewBox="0 0 20 20" |
187 | > | 195 | > |
188 | <path | 196 | <path |
189 | 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" | 197 | 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" |
190 | clip-rule="evenodd" | 198 | clip-rule="evenodd" |
191 | fill-rule="evenodd" | 199 | fill-rule="evenodd" |
192 | ></path> | 200 | ></path> |
193 | </svg> | 201 | </svg> |
194 | </button> | 202 | </button> |
195 | </li> | 203 | </li> |
196 | <li> | 204 | <li> |
197 | <button | 205 | <button |
198 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 206 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
199 | > | 207 | > |
200 | 1 | 208 | 1 |
201 | </button> | 209 | </button> |
202 | </li> | 210 | </li> |
203 | <li> | 211 | <li> |
204 | <button | 212 | <button |
205 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 213 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
206 | > | 214 | > |
207 | 2 | 215 | 2 |
208 | </button> | 216 | </button> |
209 | </li> | 217 | </li> |
210 | <li> | 218 | <li> |
211 | <button | 219 | <button |
212 | 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" | 220 | 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" |
213 | > | 221 | > |
214 | 3 | 222 | 3 |
215 | </button> | 223 | </button> |
216 | </li> | 224 | </li> |
217 | <li> | 225 | <li> |
218 | <button | 226 | <button |
219 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 227 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
220 | > | 228 | > |
221 | 4 | 229 | 4 |
222 | </button> | 230 | </button> |
223 | </li> | 231 | </li> |
224 | <li> | 232 | <li> |
225 | <span class="px-3 py-1">...</span> | 233 | <span class="px-3 py-1">...</span> |
226 | </li> | 234 | </li> |
227 | <li> | 235 | <li> |
228 | <button | 236 | <button |
229 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 237 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
230 | > | 238 | > |
231 | 8 | 239 | 8 |
232 | </button> | 240 | </button> |
233 | </li> | 241 | </li> |
234 | <li> | 242 | <li> |
235 | <button | 243 | <button |
236 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 244 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
237 | > | 245 | > |
238 | 9 | 246 | 9 |
239 | </button> | 247 | </button> |
240 | </li> | 248 | </li> |
241 | <li> | 249 | <li> |
242 | <button | 250 | <button |
243 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 251 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
244 | aria-label="Next" | 252 | aria-label="Next" |
245 | > | 253 | > |
246 | <svg | 254 | <svg |
247 | class="w-4 h-4 fill-current" | 255 | class="w-4 h-4 fill-current" |
248 | aria-hidden="true" | 256 | aria-hidden="true" |
249 | viewBox="0 0 20 20" | 257 | viewBox="0 0 20 20" |
250 | > | 258 | > |
251 | <path | 259 | <path |
252 | 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" | 260 | 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" |
253 | clip-rule="evenodd" | 261 | clip-rule="evenodd" |
254 | fill-rule="evenodd" | 262 | fill-rule="evenodd" |
255 | ></path> | 263 | ></path> |
256 | </svg> | 264 | </svg> |
257 | </button> | 265 | </button> |
258 | </li> | 266 | </li> |
259 | </ul> | 267 | </ul> |
260 | </nav> | 268 | </nav> |
261 | </span> | 269 | </span> |
262 | </div>--> | 270 | </div>--> |
263 | </div> | 271 | </div> |
264 | 272 | ||
265 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | 273 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> |
266 | 274 | ||
267 | 275 | ||
268 | @endsection | 276 | @endsection |
269 | 277 |
resources/views/admin/users/index_bd_ajax.blade.php
1 | <div class="w-full overflow-x-auto"> | 1 | <div class="w-full overflow-x-auto"> |
2 | <table class="w-full whitespace-no-wrap"> | 2 | <table class="w-full whitespace-no-wrap"> |
3 | <thead> | 3 | <thead> |
4 | <tr | 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" | 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" |
6 | > | 6 | > |
7 | <th class="px-4 py-3">№</th> | 7 | <th class="px-4 py-3">№</th> |
8 | <th class="px-4 py-3">Имя</th> | 8 | <th class="px-4 py-3">Имя</th> |
9 | <th class="px-4 py-3">Email/логин</th> | 9 | <th class="px-4 py-3">Email/телефон</th> |
10 | <th class="px-4 py-3">Статус</th> | 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 | <th class="px-4 py-3">Дата регистрации</th> |
13 | <th class="px-4 py-3">Изменить</th> | ||
12 | </tr> | 14 | </tr> |
13 | </thead> | 15 | </thead> |
14 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 16 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
15 | @foreach($users as $user) | 17 | @foreach($users as $user) |
16 | <tr class="text-gray-700 dark:text-gray-400"> | 18 | <tr class="text-gray-700 dark:text-gray-400"> |
17 | <td class="px-4 py-3"> | 19 | <td class="px-4 py-3"> |
18 | {{$user->id}} | 20 | {{$user->id}} |
19 | </td> | 21 | </td> |
20 | <td class="px-4 py-3"> | 22 | <td class="px-4 py-3"> |
21 | <!--<div class="flex items-center text-sm"> | 23 | <!--<div class="flex items-center text-sm"> |
22 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 24 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
23 | <div | 25 | <div |
24 | class="absolute inset-0 rounded-full shadow-inner" | 26 | class="absolute inset-0 rounded-full shadow-inner" |
25 | aria-hidden="true" | 27 | aria-hidden="true" |
26 | ></div> | 28 | ></div> |
27 | </div> | 29 | </div> |
28 | <div> | 30 | <div> |
29 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> | 31 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> |
30 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 32 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
31 | Все пользователи сайта | 33 | Все пользователи сайта |
32 | </p> | 34 | </p> |
33 | </div> | 35 | </div> |
34 | </div> | 36 | </div> |
35 | --> | 37 | --> |
36 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}">{{ $user->name }}</a> | 38 | <!--<a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}"></a>--> |
39 | |||
40 | {{ $user->name }} | ||
37 | </td> | 41 | </td> |
42 | |||
38 | <td class="px-4 py-3"> | 43 | <td class="px-4 py-3"> |
39 | <div class="flex items-center text-sm"> | 44 | <div class="flex items-center text-sm"> |
40 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 45 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
41 | <div | 46 | <div |
42 | class="absolute inset-0 rounded-full shadow-inner" | 47 | class="absolute inset-0 rounded-full shadow-inner" |
43 | aria-hidden="true" | 48 | aria-hidden="true" |
44 | ></div> | 49 | ></div> |
45 | </div>--> | 50 | </div>--> |
46 | <div> | 51 | <div> |
47 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> | 52 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> |
48 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 53 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
49 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} | 54 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} |
50 | </p> | 55 | </p> |
51 | </div> | 56 | </div> |
52 | </div> | 57 | </div> |
53 | </td> | 58 | </td> |
54 | <td class="px-4 py-3 text-xs"> | 59 | |
60 | <!--<td class="px-4 py-3 text-xs"> | ||
55 | <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"> | 61 | <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"> |
56 | @if ($user->is_worker) | 62 | @if ($user->is_worker) |
57 | Работник | 63 | Работник |
58 | @else | 64 | @else |
59 | Работодатель | 65 | Работодатель |
60 | @endif | 66 | @endif |
61 | </span> | 67 | </span> |
62 | @if ($user->admin) | 68 | @if ($user->admin) |
63 | <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"> | 69 | <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"> |
64 | Администратор | 70 | Администратор |
65 | </span> | 71 | </span> |
72 | @endif | ||
73 | @if ($user->is_bd) | ||
74 | <span 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"> | ||
75 | База данных | ||
76 | </span> | ||
77 | @endif | ||
78 | </td>--> | ||
79 | |||
80 | <td class="px-4 py-3 text-xs"> | ||
81 | @if (isset($user->jobtitles[0]->name)) | ||
82 | {{ $user->jobtitles[0]->name }} | ||
83 | @else | ||
84 | - | ||
66 | @endif | 85 | @endif |
67 | @if ($user->is_bd) | 86 | </td> |
68 | <span 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"> | 87 | |
69 | База данных | 88 | <td class="px-4 py-3 text-sm"> |
70 | </span> | 89 | @if (isset($user->workers[0]->id)) |
90 | <!--<a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Править</a> |--> | ||
91 | <!--<a href="{{ route('admin.doc-basedata', ['user' => $user->id]) }}">Скачать</a>--> | ||
71 | @endif | 92 | @endif |
93 | @isset($user->file) | ||
94 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">Скачать</a> | ||
95 | @else | ||
96 | <p class="text-gray-700 dark:text-gray-400">-</p> | ||
97 | @endisset | ||
72 | </td> | 98 | </td> |
73 | 99 | ||
74 | <td class="px-4 py-3 text-sm"> | 100 | <td class="px-4 py-3 text-sm"> |
75 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 101 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
76 | </td> | 102 | </td> |
103 | |||
104 | <td class="px-4 py-3 text-sm_"> | ||
105 | <form action="{{ route('admin.delete-basedata', ['user' => $user->id]) }}" method="POST"> | ||
106 | <a href="{{ route('admin.edit-basedata', ['user' => $user->id]) }}">Изменить</a> | | ||
107 | @csrf | ||
108 | @method('DELETE') | ||
109 | <input class="btn btn-danger" type="submit" value="Удалить"/> | ||
110 | </form> | ||
111 | </td> | ||
77 | </tr> | 112 | </tr> |
78 | @endforeach | 113 | @endforeach |
79 | </tbody> | 114 | </tbody> |
80 | </table> | 115 | </table> |
81 | </div> | 116 | </div> |
82 | 117 | ||
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"> | 118 | <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 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> | 119 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> |
85 | <?=$users->links('admin.pagginate'); ?> | 120 | <?=$users->links('admin.pagginate'); ?> |
86 | </div> | 121 | </div> |
87 | 122 |
resources/views/admin/worker/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Работники']) | 1 | @extends('layout.admin', ['title' => 'Админка - Работники']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.checkban', function () { | 6 | $(document).on('click', '.checkban', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var ajax_block = $('#ajax_block'); | 9 | var ajax_block = $('#ajax_block'); |
10 | var bool = 0; | 10 | var bool = 0; |
11 | 11 | ||
12 | if(this.checked){ | 12 | if(this.checked){ |
13 | bool = 1; | 13 | bool = 1; |
14 | } else { | 14 | } else { |
15 | bool = 0; | 15 | bool = 0; |
16 | } | 16 | } |
17 | 17 | ||
18 | $.ajax({ | 18 | $.ajax({ |
19 | type: "GET", | 19 | type: "GET", |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: "id=" + value + "&is_ban=" + bool, | 21 | data: "id=" + value + "&is_ban=" + bool, |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы работников '); | 23 | console.log('Обновление таблицы работников '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | console.log(data); | 25 | console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | 36 | ||
37 | }); | 37 | }); |
38 | </script> | 38 | </script> |
39 | @endsection | 39 | @endsection |
40 | 40 | ||
41 | @section('search') | 41 | @section('search') |
42 | @include('admin.find_worker', ['find_status_work' => $find_status_work]) | 42 | @include('admin.find_worker', ['find_status_work' => $find_status_work]) |
43 | @endsection | 43 | @endsection |
44 | 44 | ||
45 | @section('content') | 45 | @section('content') |
46 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | ||
47 | |||
48 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | ||
49 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | ||
50 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | ||
51 | <path | ||
52 | 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"></path> | ||
53 | </svg> | ||
54 | </div> | ||
55 | <div> | ||
56 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | ||
57 | Всего соискателей | ||
58 | </p> | ||
59 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | ||
60 | {{ $all_worker }} | ||
61 | </p> | ||
62 | </div> | ||
63 | </div> | ||
64 | </div> | ||
65 | |||
46 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 66 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
47 | <div class="w-full overflow-x-auto"> | 67 | <div class="w-full overflow-x-auto"> |
48 | <table class="w-full whitespace-no-wrap"> | 68 | <table class="w-full whitespace-no-wrap"> |
49 | <thead> | 69 | <thead> |
50 | <tr | 70 | <tr |
51 | 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" | 71 | 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" |
52 | > | 72 | > |
53 | <th class="px-4 py-3">№</th> | 73 | <th class="px-4 py-3">№</th> |
54 | <th class="px-4 py-3">Лого</th> | 74 | <th class="px-4 py-3">Лого</th> |
55 | <th class="px-4 py-3">ФИО/Email/Телефон</th> | 75 | <th class="px-4 py-3">ФИО/Email/Телефон</th> |
56 | <th class="px-4 py-3">Статус</th> | 76 | <th class="px-4 py-3">Статус</th> |
57 | <th class="px-4 py-3">% анкеты</th> | 77 | <th class="px-4 py-3">% анкеты</th> |
58 | <th class="px-4 py-3">Должность</th> | 78 | <th class="px-4 py-3">Должность</th> |
59 | <th class="px-4 py-3">Дата регистрации</th> | 79 | <th class="px-4 py-3">Дата регистрации</th> |
60 | <th class="px-4 py-3">Изменить</th> | 80 | <th class="px-4 py-3">Изменить</th> |
61 | </tr> | 81 | </tr> |
62 | </thead> | 82 | </thead> |
63 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 83 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
64 | @foreach($users as $user) | 84 | @foreach($users as $user) |
65 | <tr class="text-gray-700 dark:text-gray-400"> | 85 | <tr class="text-gray-700 dark:text-gray-400"> |
66 | <td class="px-4 py-3"> | 86 | <td class="px-4 py-3"> |
67 | {{$user->id}} | 87 | {{$user->id}} |
68 | </td> | 88 | </td> |
69 | <td class="px-4 py-3"> | 89 | <td class="px-4 py-3"> |
70 | @if (isset($user->workers[0]->photo)) | 90 | @if (isset($user->workers[0]->photo)) |
71 | <div class="flex items-center text-sm"> | 91 | <div class="flex items-center text-sm"> |
72 | <div | 92 | <div |
73 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 93 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
74 | > | 94 | > |
75 | <img | 95 | <img |
76 | class="object-cover w-full h-full rounded-full" | 96 | class="object-cover w-full h-full rounded-full" |
77 | src="{{ asset(Storage::url($user->workers[0]->photo)) }}" | 97 | src="{{ asset(Storage::url($user->workers[0]->photo)) }}" |
78 | alt="" | 98 | alt="" |
79 | loading="lazy" | 99 | loading="lazy" |
80 | /> | 100 | /> |
81 | <div | 101 | <div |
82 | class="absolute inset-0 rounded-full shadow-inner" | 102 | class="absolute inset-0 rounded-full shadow-inner" |
83 | aria-hidden="true" | 103 | aria-hidden="true" |
84 | ></div> | 104 | ></div> |
85 | </div> | 105 | </div> |
86 | </div> | 106 | </div> |
87 | @else | 107 | @else |
88 | - | 108 | - |
89 | @endif | 109 | @endif |
90 | </td> | 110 | </td> |
91 | 111 | ||
92 | <td class="px-4 py-3"> | 112 | <td class="px-4 py-3"> |
93 | <div class="flex items-center text-sm"> | 113 | <div class="flex items-center text-sm"> |
94 | <div> | 114 | <div> |
95 | <p class="font-semibold"> | 115 | <p class="font-semibold"> |
96 | @if (isset($user->id)) | 116 | @if (isset($user->id)) |
97 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}}">{{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}</a> | 117 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}}">{{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}</a> |
98 | @else | 118 | @else |
99 | {{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }} | 119 | {{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }} |
100 | @endif | 120 | @endif |
101 | </p> | 121 | </p> |
102 | <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p> | 122 | <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p> |
103 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 123 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
104 | {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }} | 124 | {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }} |
105 | </p> | 125 | </p> |
106 | </div> | 126 | </div> |
107 | </div> | 127 | </div> |
108 | </td> | 128 | </td> |
109 | 129 | ||
110 | <td class="px-4 py-3"> | 130 | <td class="px-4 py-3"> |
111 | @if (isset($user->workers[0]->status_work)) | 131 | @if (isset($user->workers[0]->status_work)) |
112 | {{ $status_wor[$user->workers[0]->status_work] }} | 132 | {{ $status_wor[$user->workers[0]->status_work] }} |
113 | @else | 133 | @else |
114 | - | 134 | - |
115 | @endif | 135 | @endif |
116 | </td> | 136 | </td> |
117 | 137 | ||
118 | <td class="px-4 py-3 text-xs"> | 138 | <td class="px-4 py-3 text-xs"> |
119 | @if (isset($user->workers[0]->persent_anketa)) | 139 | @if (isset($user->workers[0]->persent_anketa)) |
120 | @if ($user->workers[0]->persent_anketa > 40) | 140 | @if ($user->workers[0]->persent_anketa > 40) |
121 | <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"> | 141 | <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"> |
122 | {{$user->workers[0]->persent_anketa}}% | 142 | {{$user->workers[0]->persent_anketa}}% |
123 | </span> | 143 | </span> |
124 | @else | 144 | @else |
125 | <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"> | 145 | <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"> |
126 | {{$user->workers[0]->persent_anketa}}% | 146 | {{$user->workers[0]->persent_anketa}}% |
127 | </span> | 147 | </span> |
128 | @endif | 148 | @endif |
129 | @else | 149 | @else |
130 | <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"> | 150 | <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"> |
131 | 0% | 151 | 0% |
132 | </span> | 152 | </span> |
133 | @endif | 153 | @endif |
134 | </td> | 154 | </td> |
135 | <td class="px-4 py-3 text-sm"> | 155 | <td class="px-4 py-3 text-sm"> |
136 | @if (isset($user->jobtitles[0]->name)) | 156 | @if (isset($user->jobtitles[0]->name)) |
137 | {{ $user->jobtitles[0]->name }} | 157 | {{ $user->jobtitles[0]->name }} |
138 | @else | 158 | @else |
139 | Не задана | 159 | Не задана |
140 | @endif | 160 | @endif |
141 | </td> | 161 | </td> |
142 | <td class="px-4 py-3 text-sm"> | 162 | <td class="px-4 py-3 text-sm"> |
143 | {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }} | 163 | {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }} |
144 | </td> | 164 | </td> |
145 | <td class="px-4 py-3 text-sm"> | 165 | <td class="px-4 py-3 text-sm"> |
146 | <!--if ($user->id > 1)--> | 166 | <!--if ($user->id > 1)--> |
147 | @if (isset($user->workers[0]->id)) | 167 | @if (isset($user->workers[0]->id)) |
148 | <a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Изменить</a> | 168 | <a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Изменить</a> |
149 | 169 | ||
150 | @endif | 170 | @endif |
151 | <!--endif--> | 171 | <!--endif--> |
152 | </td> | 172 | </td> |
153 | <!--<td class="px-4 py-3 text-sm"> | 173 | <!--<td class="px-4 py-3 text-sm"> |
154 | @if ($user->id > 1) | 174 | @if ($user->id > 1) |
155 | <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | 175 | <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> |
156 | @endif | 176 | @endif |
157 | </td>--> | 177 | </td>--> |
158 | </tr> | 178 | </tr> |
159 | @endforeach | 179 | @endforeach |
160 | </tbody> | 180 | </tbody> |
161 | </table> | 181 | </table> |
162 | </div> | 182 | </div> |
163 | 183 | ||
164 | <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"> | 184 | <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"> |
165 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> | 185 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> |
166 | </div> | 186 | </div> |
167 | 187 | ||
168 | 188 | ||
169 | <!--<div | 189 | <!--<div |
170 | 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" | 190 | 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" |
171 | > | 191 | > |
172 | <span class="flex items-center col-span-3"> | 192 | <span class="flex items-center col-span-3"> |
173 | Showing 21-30 of 100 | 193 | Showing 21-30 of 100 |
174 | </span> | 194 | </span> |
175 | <span class="col-span-2"></span> | 195 | <span class="col-span-2"></span> |
176 | 196 | ||
177 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 197 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
178 | <nav aria-label="Table navigation"> | 198 | <nav aria-label="Table navigation"> |
179 | <ul class="inline-flex items-center"> | 199 | <ul class="inline-flex items-center"> |
180 | <li> | 200 | <li> |
181 | <button | 201 | <button |
182 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 202 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
183 | aria-label="Previous" | 203 | aria-label="Previous" |
184 | > | 204 | > |
185 | <svg | 205 | <svg |
186 | aria-hidden="true" | 206 | aria-hidden="true" |
187 | class="w-4 h-4 fill-current" | 207 | class="w-4 h-4 fill-current" |
188 | viewBox="0 0 20 20" | 208 | viewBox="0 0 20 20" |
189 | > | 209 | > |
190 | <path | 210 | <path |
191 | 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" | 211 | 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" |
192 | clip-rule="evenodd" | 212 | clip-rule="evenodd" |
193 | fill-rule="evenodd" | 213 | fill-rule="evenodd" |
194 | ></path> | 214 | ></path> |
195 | </svg> | 215 | </svg> |
196 | </button> | 216 | </button> |
197 | </li> | 217 | </li> |
198 | <li> | 218 | <li> |
199 | <button | 219 | <button |
200 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 220 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
201 | > | 221 | > |
202 | 1 | 222 | 1 |
203 | </button> | 223 | </button> |
204 | </li> | 224 | </li> |
205 | <li> | 225 | <li> |
206 | <button | 226 | <button |
207 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 227 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
208 | > | 228 | > |
209 | 2 | 229 | 2 |
210 | </button> | 230 | </button> |
211 | </li> | 231 | </li> |
212 | <li> | 232 | <li> |
213 | <button | 233 | <button |
214 | 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" | 234 | 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" |
215 | > | 235 | > |
216 | 3 | 236 | 3 |
217 | </button> | 237 | </button> |
218 | </li> | 238 | </li> |
219 | <li> | 239 | <li> |
220 | <button | 240 | <button |
221 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 241 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
222 | > | 242 | > |
223 | 4 | 243 | 4 |
224 | </button> | 244 | </button> |
225 | </li> | 245 | </li> |
226 | <li> | 246 | <li> |
227 | <span class="px-3 py-1">...</span> | 247 | <span class="px-3 py-1">...</span> |
228 | </li> | 248 | </li> |
229 | <li> | 249 | <li> |
230 | <button | 250 | <button |
231 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 251 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
232 | > | 252 | > |
233 | 8 | 253 | 8 |
234 | </button> | 254 | </button> |
235 | </li> | 255 | </li> |
236 | <li> | 256 | <li> |
237 | <button | 257 | <button |
238 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 258 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
239 | > | 259 | > |
240 | 9 | 260 | 9 |
241 | </button> | 261 | </button> |
242 | </li> | 262 | </li> |
243 | <li> | 263 | <li> |
244 | <button | 264 | <button |
245 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 265 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
246 | aria-label="Next" | 266 | aria-label="Next" |
247 | > | 267 | > |
248 | <svg | 268 | <svg |
249 | class="w-4 h-4 fill-current" | 269 | class="w-4 h-4 fill-current" |
250 | aria-hidden="true" | 270 | aria-hidden="true" |
251 | viewBox="0 0 20 20" | 271 | viewBox="0 0 20 20" |
252 | > | 272 | > |
253 | <path | 273 | <path |
254 | 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" | 274 | 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" |
255 | clip-rule="evenodd" | 275 | clip-rule="evenodd" |
256 | fill-rule="evenodd" | 276 | fill-rule="evenodd" |
257 | ></path> | 277 | ></path> |
258 | </svg> | 278 | </svg> |
259 | </button> | 279 | </button> |
260 | </li> | 280 | </li> |
261 | </ul> | 281 | </ul> |
262 | </nav> | 282 | </nav> |
263 | </span> | 283 | </span> |
264 | </div>--> | 284 | </div>--> |
265 | </div> | 285 | </div> |
266 | 286 | ||
267 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | 287 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> |
268 | 288 | ||
269 | 289 | ||
270 | @endsection | 290 | @endsection |
271 | 291 |
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.css')}}" /> | 11 | <link rel="stylesheet" href="{{ asset('./assets/css/tailwind.output.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 | <!--class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100" | 41 | <!--class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100" |
42 | --> | 42 | --> |
43 | <a | 43 | <a |
44 | 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 }}" | 44 | 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 }}" |
45 | href="{{ route('admin.index') }}" | 45 | href="{{ route('admin.index') }}" |
46 | > | 46 | > |
47 | <svg | 47 | <svg |
48 | class="w-5 h-5" | 48 | class="w-5 h-5" |
49 | aria-hidden="true" | 49 | aria-hidden="true" |
50 | fill="none" | 50 | fill="none" |
51 | stroke-linecap="round" | 51 | stroke-linecap="round" |
52 | stroke-linejoin="round" | 52 | stroke-linejoin="round" |
53 | stroke-width="2" | 53 | stroke-width="2" |
54 | viewBox="0 0 24 24" | 54 | viewBox="0 0 24 24" |
55 | stroke="currentColor" | 55 | stroke="currentColor" |
56 | > | 56 | > |
57 | <path | 57 | <path |
58 | 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" | 58 | 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" |
59 | ></path> | 59 | ></path> |
60 | </svg> | 60 | </svg> |
61 | <span class="ml-4">Главная страница</span> | 61 | <span class="ml-4">Главная страница</span> |
62 | </a> | 62 | </a> |
63 | </li> | 63 | </li> |
64 | </ul> | 64 | </ul> |
65 | <ul> | 65 | <ul> |
66 | @if ($UserId == 1) | 66 | @if ($UserId == 1) |
67 | <li class="relative px-6 py-3"> | 67 | <li class="relative px-6 py-3"> |
68 | <a | 68 | <a |
69 | 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 }}" | 69 | 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 }}" |
70 | href="{{ route('admin.users') }}" | 70 | href="{{ route('admin.users') }}" |
71 | > | 71 | > |
72 | <svg | 72 | <svg |
73 | class="w-5 h-5" | 73 | class="w-5 h-5" |
74 | aria-hidden="true" | 74 | aria-hidden="true" |
75 | fill="none" | 75 | fill="none" |
76 | stroke-linecap="round" | 76 | stroke-linecap="round" |
77 | stroke-linejoin="round" | 77 | stroke-linejoin="round" |
78 | stroke-width="2" | 78 | stroke-width="2" |
79 | viewBox="0 0 24 24" | 79 | viewBox="0 0 24 24" |
80 | stroke="currentColor" | 80 | stroke="currentColor" |
81 | > | 81 | > |
82 | <path | 82 | <path |
83 | 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" | 83 | 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" |
84 | ></path> | 84 | ></path> |
85 | </svg> | 85 | </svg> |
86 | <span class="ml-4">Пользователи</span> | 86 | <span class="ml-4">Пользователи</span> |
87 | </a> | 87 | </a> |
88 | </li> | 88 | </li> |
89 | @endif | 89 | @endif |
90 | <li class="relative px-6 py-3"> | 90 | <li class="relative px-6 py-3"> |
91 | <a | 91 | <a |
92 | 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') }}" | 92 | 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') }}" |
93 | > | 93 | > |
94 | <svg | 94 | <svg |
95 | class="w-5 h-5" | 95 | class="w-5 h-5" |
96 | aria-hidden="true" | 96 | aria-hidden="true" |
97 | fill="none" | 97 | fill="none" |
98 | stroke-linecap="round" | 98 | stroke-linecap="round" |
99 | stroke-linejoin="round" | 99 | stroke-linejoin="round" |
100 | stroke-width="2" | 100 | stroke-width="2" |
101 | viewBox="0 0 24 24" | 101 | viewBox="0 0 24 24" |
102 | stroke="currentColor" | 102 | stroke="currentColor" |
103 | > | 103 | > |
104 | <path | 104 | <path |
105 | 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" | 105 | 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" |
106 | ></path> | 106 | ></path> |
107 | </svg> | 107 | </svg> |
108 | <span class="ml-4">Администраторы</span> | 108 | <span class="ml-4">Администраторы</span> |
109 | </a> | 109 | </a> |
110 | </li> | 110 | </li> |
111 | <li class="relative px-6 py-3"> | 111 | <li class="relative px-6 py-3"> |
112 | <a | 112 | <a |
113 | 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') }}" | 113 | 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') }}" |
114 | > | 114 | > |
115 | <svg | 115 | <svg |
116 | class="w-5 h-5" | 116 | class="w-5 h-5" |
117 | aria-hidden="true" | 117 | aria-hidden="true" |
118 | fill="none" | 118 | fill="none" |
119 | stroke-linecap="round" | 119 | stroke-linecap="round" |
120 | stroke-linejoin="round" | 120 | stroke-linejoin="round" |
121 | stroke-width="2" | 121 | stroke-width="2" |
122 | viewBox="0 0 24 24" | 122 | viewBox="0 0 24 24" |
123 | stroke="currentColor" | 123 | stroke="currentColor" |
124 | > | 124 | > |
125 | <path | 125 | <path |
126 | 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" | 126 | 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" |
127 | ></path> | 127 | ></path> |
128 | </svg> | 128 | </svg> |
129 | <span class="ml-4">Работодатели</span> | 129 | <span class="ml-4">Работодатели</span> |
130 | </a> | 130 | </a> |
131 | </li> | 131 | </li> |
132 | <li class="relative px-6 py-3"> | 132 | <li class="relative px-6 py-3"> |
133 | <a | 133 | <a |
134 | 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') }}" | 134 | 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') }}" |
135 | > | 135 | > |
136 | <svg | 136 | <svg |
137 | class="w-5 h-5" | 137 | class="w-5 h-5" |
138 | aria-hidden="true" | 138 | aria-hidden="true" |
139 | fill="none" | 139 | fill="none" |
140 | stroke-linecap="round" | 140 | stroke-linecap="round" |
141 | stroke-linejoin="round" | 141 | stroke-linejoin="round" |
142 | stroke-width="2" | 142 | stroke-width="2" |
143 | viewBox="0 0 24 24" | 143 | viewBox="0 0 24 24" |
144 | stroke="currentColor" | 144 | stroke="currentColor" |
145 | > | 145 | > |
146 | <path | 146 | <path |
147 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" | 147 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" |
148 | ></path> | 148 | ></path> |
149 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> | 149 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> |
150 | </svg> | 150 | </svg> |
151 | <span class="ml-4">Соискатели</span> | 151 | <span class="ml-4">Соискатели</span> |
152 | </a> | 152 | </a> |
153 | </li> | 153 | </li> |
154 | <li class="relative px-6 py-3"> | 154 | <li class="relative px-6 py-3"> |
155 | <a | 155 | <a |
156 | 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') }}" | 156 | 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') }}" |
157 | > | 157 | > |
158 | <svg | 158 | <svg |
159 | class="w-5 h-5" | 159 | class="w-5 h-5" |
160 | aria-hidden="true" | 160 | aria-hidden="true" |
161 | fill="none" | 161 | fill="none" |
162 | stroke-linecap="round" | 162 | stroke-linecap="round" |
163 | stroke-linejoin="round" | 163 | stroke-linejoin="round" |
164 | stroke-width="2" | 164 | stroke-width="2" |
165 | viewBox="0 0 24 24" | 165 | viewBox="0 0 24 24" |
166 | stroke="currentColor" | 166 | stroke="currentColor" |
167 | > | 167 | > |
168 | <path | 168 | <path |
169 | 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" | 169 | 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" |
170 | ></path> | 170 | ></path> |
171 | </svg> | 171 | </svg> |
172 | <span class="ml-4">Вакансии</span> | 172 | <span class="ml-4">Вакансии</span> |
173 | </a> | 173 | </a> |
174 | </li> | 174 | </li> |
175 | 175 | ||
176 | <li class="relative px-6 py-3"> | 176 | <li class="relative px-6 py-3"> |
177 | <a | 177 | <a |
178 | 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') }}" | 178 | 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') }}" |
179 | > | 179 | > |
180 | <svg | 180 | <svg |
181 | class="w-5 h-5" | 181 | class="w-5 h-5" |
182 | aria-hidden="true" | 182 | aria-hidden="true" |
183 | fill="none" | 183 | fill="none" |
184 | stroke-linecap="round" | 184 | stroke-linecap="round" |
185 | stroke-linejoin="round" | 185 | stroke-linejoin="round" |
186 | stroke-width="2" | 186 | stroke-width="2" |
187 | viewBox="0 0 24 24" | 187 | viewBox="0 0 24 24" |
188 | stroke="currentColor" | 188 | stroke="currentColor" |
189 | > | 189 | > |
190 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 190 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
191 | </svg> | 191 | </svg> |
192 | <span class="ml-4">Сообщения все</span> | 192 | <span class="ml-4">Сообщения все</span> |
193 | </a> | 193 | </a> |
194 | </li> | 194 | </li> |
195 | 195 | ||
196 | <li class="relative px-6 py-3"> | 196 | <li class="relative px-6 py-3"> |
197 | <a | 197 | <a |
198 | 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') }}" | 198 | 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') }}" |
199 | > | 199 | > |
200 | <svg | 200 | <svg |
201 | class="w-5 h-5" | 201 | class="w-5 h-5" |
202 | aria-hidden="true" | 202 | aria-hidden="true" |
203 | fill="none" | 203 | fill="none" |
204 | stroke-linecap="round" | 204 | stroke-linecap="round" |
205 | stroke-linejoin="round" | 205 | stroke-linejoin="round" |
206 | stroke-width="2" | 206 | stroke-width="2" |
207 | viewBox="0 0 24 24" | 207 | viewBox="0 0 24 24" |
208 | stroke="currentColor" | 208 | stroke="currentColor" |
209 | > | 209 | > |
210 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 210 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
211 | </svg> | 211 | </svg> |
212 | <span class="ml-4">Заявки на рассылку</span> | 212 | <span class="ml-4">Заявки на рассылку</span> |
213 | </a> | 213 | </a> |
214 | </li> | 214 | </li> |
215 | 215 | ||
216 | <li class="relative px-6 py-3"> | 216 | <li class="relative px-6 py-3"> |
217 | <a | 217 | <a |
218 | 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') }}" | 218 | 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') }}" |
219 | > | 219 | > |
220 | <svg | 220 | <svg |
221 | class="w-5 h-5" | 221 | class="w-5 h-5" |
222 | aria-hidden="true" | 222 | aria-hidden="true" |
223 | fill="none" | 223 | fill="none" |
224 | stroke-linecap="round" | 224 | stroke-linecap="round" |
225 | stroke-linejoin="round" | 225 | stroke-linejoin="round" |
226 | stroke-width="2" | 226 | stroke-width="2" |
227 | viewBox="0 0 24 24" | 227 | viewBox="0 0 24 24" |
228 | stroke="currentColor" | 228 | stroke="currentColor" |
229 | > | 229 | > |
230 | <path | 230 | <path |
231 | 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="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" |
232 | ></path> | 232 | ></path> |
233 | </svg> | 233 | </svg> |
234 | <span class="ml-4">Группы пользователей</span> | 234 | <span class="ml-4">Группы пользователей</span> |
235 | </a> | 235 | </a> |
236 | </li> | 236 | </li> |
237 | |||
238 | <li class="relative px-6 py-3"> | ||
239 | <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') }}"> | ||
240 | <svg | ||
241 | class="w-5 h-5" | ||
242 | aria-hidden="true" | ||
243 | fill="none" | ||
244 | stroke-linecap="round" | ||
245 | stroke-linejoin="round" | ||
246 | stroke-width="2" | ||
247 | viewBox="0 0 24 24" | ||
248 | stroke="currentColor" | ||
249 | > | ||
250 | <path | ||
251 | 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" | ||
252 | ></path> | ||
253 | </svg> | ||
254 | <span class="ml-4">Медиа</span> | ||
255 | </a> | ||
256 | </li> | ||
257 | |||
237 | @if ($UserId == 1) | 258 | @if ($UserId == 1) |
238 | <li class="relative px-6 py-3"> | 259 | <li class="relative px-6 py-3"> |
239 | <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') }}"> | 260 | <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') }}"> |
240 | <svg | 261 | <svg |
241 | class="w-5 h-5" | 262 | class="w-5 h-5" |
242 | aria-hidden="true" | 263 | aria-hidden="true" |
243 | fill="none" | 264 | fill="none" |
244 | stroke-linecap="round" | 265 | stroke-linecap="round" |
245 | stroke-linejoin="round" | 266 | stroke-linejoin="round" |
246 | stroke-width="2" | 267 | stroke-width="2" |
247 | viewBox="0 0 24 24" | 268 | viewBox="0 0 24 24" |
248 | stroke="currentColor" | 269 | stroke="currentColor" |
249 | > | 270 | > |
250 | <path | 271 | <path |
251 | 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" | 272 | 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" |
252 | ></path> | 273 | ></path> |
253 | </svg> | 274 | </svg> |
254 | <span class="ml-4">Роли пользователей</span> | 275 | <span class="ml-4">Роли пользователей</span> |
255 | </a> | 276 | </a> |
256 | </li> | 277 | </li> |
257 | @endif | 278 | @endif |
258 | <li class="relative px-6 py-3"> | 279 | <li class="relative px-6 py-3"> |
259 | <a | 280 | <a |
260 | 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') }}" | 281 | 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') }}" |
261 | > | 282 | > |
262 | <svg | 283 | <svg |
263 | class="w-5 h-5" | 284 | class="w-5 h-5" |
264 | aria-hidden="true" | 285 | aria-hidden="true" |
265 | fill="none" | 286 | fill="none" |
266 | stroke-linecap="round" | 287 | stroke-linecap="round" |
267 | stroke-linejoin="round" | 288 | stroke-linejoin="round" |
268 | stroke-width="2" | 289 | stroke-width="2" |
269 | viewBox="0 0 24 24" | 290 | viewBox="0 0 24 24" |
270 | stroke="currentColor" | 291 | stroke="currentColor" |
271 | > | 292 | > |
272 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 293 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
273 | </svg> | 294 | </svg> |
274 | <span class="ml-4">Базы данных</span> | 295 | <span class="ml-4">Базы данных</span> |
275 | </a> | 296 | </a> |
276 | </li> | 297 | </li> |
277 | 298 | ||
278 | <li class="relative px-6 py-3"> | 299 | <li class="relative px-6 py-3"> |
279 | <a | 300 | <a |
280 | 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') }}" | 301 | 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') }}" |
281 | > | 302 | > |
282 | <svg | 303 | <svg |
283 | class="w-5 h-5" | 304 | class="w-5 h-5" |
284 | aria-hidden="true" | 305 | aria-hidden="true" |
285 | fill="none" | 306 | fill="none" |
286 | stroke-linecap="round" | 307 | stroke-linecap="round" |
287 | stroke-linejoin="round" | 308 | stroke-linejoin="round" |
288 | stroke-width="2" | 309 | stroke-width="2" |
289 | viewBox="0 0 24 24" | 310 | viewBox="0 0 24 24" |
290 | stroke="currentColor" | 311 | stroke="currentColor" |
291 | > | 312 | > |
292 | <path | 313 | <path |
293 | 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" | 314 | 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" |
294 | ></path> | 315 | ></path> |
295 | </svg> | 316 | </svg> |
296 | <span class="ml-4">Учебн.заведения</span> | 317 | <span class="ml-4">Учебн.заведения</span> |
297 | </a> | 318 | </a> |
298 | </li> | 319 | </li> |
299 | 320 | ||
300 | <li class="relative px-6 py-3"> | 321 | <li class="relative px-6 py-3"> |
301 | <a | 322 | <a |
302 | 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') }}" | 323 | 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') }}" |
303 | > | 324 | > |
304 | <svg | 325 | <svg |
305 | class="w-5 h-5" | 326 | class="w-5 h-5" |
306 | aria-hidden="true" | 327 | aria-hidden="true" |
307 | fill="none" | 328 | fill="none" |
308 | stroke-linecap="round" | 329 | stroke-linecap="round" |
309 | stroke-linejoin="round" | 330 | stroke-linejoin="round" |
310 | stroke-width="2" | 331 | stroke-width="2" |
311 | viewBox="0 0 24 24" | 332 | viewBox="0 0 24 24" |
312 | stroke="currentColor" | 333 | stroke="currentColor" |
313 | > | 334 | > |
314 | <path | 335 | <path |
315 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" | 336 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" |
316 | ></path> | 337 | ></path> |
317 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> | 338 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> |
318 | </svg> | 339 | </svg> |
319 | <span class="ml-4">Статистика</span> | 340 | <span class="ml-4">Статистика</span> |
320 | </a> | 341 | </a> |
321 | </li> | 342 | </li> |
322 | <li class="relative px-6 py-3"> | 343 | <li class="relative px-6 py-3"> |
323 | <a | 344 | <a |
324 | 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') }}" | 345 | 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') }}" |
325 | > | 346 | > |
326 | <svg | 347 | <svg |
327 | class="w-5 h-5" | 348 | class="w-5 h-5" |
328 | aria-hidden="true" | 349 | aria-hidden="true" |
329 | fill="none" | 350 | fill="none" |
330 | stroke-linecap="round" | 351 | stroke-linecap="round" |
331 | stroke-linejoin="round" | 352 | stroke-linejoin="round" |
332 | stroke-width="2" | 353 | stroke-width="2" |
333 | viewBox="0 0 24 24" | 354 | viewBox="0 0 24 24" |
334 | stroke="currentColor" | 355 | stroke="currentColor" |
335 | > | 356 | > |
336 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 357 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
337 | </svg> | 358 | </svg> |
338 | <span class="ml-4">Модерация</span> | 359 | <span class="ml-4">Модерация</span> |
339 | </a> | 360 | </a> |
340 | </li> | 361 | </li> |
341 | <li class="relative px-6 py-3"> | 362 | <li class="relative px-6 py-3"> |
342 | <a | 363 | <a |
343 | 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') }}" | 364 | 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') }}" |
344 | > | 365 | > |
345 | <svg | 366 | <svg |
346 | class="w-5 h-5" | 367 | class="w-5 h-5" |
347 | aria-hidden="true" | 368 | aria-hidden="true" |
348 | fill="none" | 369 | fill="none" |
349 | stroke-linecap="round" | 370 | stroke-linecap="round" |
350 | stroke-linejoin="round" | 371 | stroke-linejoin="round" |
351 | stroke-width="2" | 372 | stroke-width="2" |
352 | viewBox="0 0 24 24" | 373 | viewBox="0 0 24 24" |
353 | stroke="currentColor" | 374 | stroke="currentColor" |
354 | > | 375 | > |
355 | <path | 376 | <path |
356 | 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" | 377 | 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" |
357 | ></path> | 378 | ></path> |
358 | </svg> | 379 | </svg> |
359 | <span class="ml-4">Реклама</span> | 380 | <span class="ml-4">Реклама</span> |
360 | </a> | 381 | </a> |
361 | </li> | 382 | </li> |
362 | <!-- Справочники --> | 383 | <!-- Справочники --> |
363 | <li class="relative px-6 py-3" x-data="{ open1: false }"> | 384 | <li class="relative px-6 py-3" x-data="{ open1: false }"> |
364 | <button | 385 | <button |
365 | 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" | 386 | 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" |
366 | @click="open1=!open1" | 387 | @click="open1=!open1" |
367 | aria-haspopup="true"> | 388 | aria-haspopup="true"> |
368 | <span class="inline-flex items-center"> | 389 | <span class="inline-flex items-center"> |
369 | <svg | 390 | <svg |
370 | class="w-5 h-5" | 391 | class="w-5 h-5" |
371 | aria-hidden="true" | 392 | aria-hidden="true" |
372 | fill="none" | 393 | fill="none" |
373 | stroke-linecap="round" | 394 | stroke-linecap="round" |
374 | stroke-linejoin="round" | 395 | stroke-linejoin="round" |
375 | stroke-width="2" | 396 | stroke-width="2" |
376 | viewBox="0 0 24 24" | 397 | viewBox="0 0 24 24" |
377 | stroke="currentColor"> | 398 | stroke="currentColor"> |
378 | <path | 399 | <path |
379 | 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" | 400 | 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" |
380 | ></path> | 401 | ></path> |
381 | </svg> | 402 | </svg> |
382 | <span class="ml-4">Справочники</span> | 403 | <span class="ml-4">Справочники</span> |
383 | </span> | 404 | </span> |
384 | <svg | 405 | <svg |
385 | class="w-4 h-4" | 406 | class="w-4 h-4" |
386 | aria-hidden="true" | 407 | aria-hidden="true" |
387 | fill="currentColor" | 408 | fill="currentColor" |
388 | viewBox="0 0 20 20" | 409 | viewBox="0 0 20 20" |
389 | > | 410 | > |
390 | <path | 411 | <path |
391 | fill-rule="evenodd" | 412 | fill-rule="evenodd" |
392 | 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" | 413 | 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" |
393 | clip-rule="evenodd" | 414 | clip-rule="evenodd" |
394 | ></path> | 415 | ></path> |
395 | </svg> | 416 | </svg> |
396 | </button> | 417 | </button> |
397 | <template x-if="open1"> | 418 | <template x-if="open1"> |
398 | <ul | 419 | <ul |
399 | x-transition:enter="transition-all ease-in-out duration-300" | 420 | x-transition:enter="transition-all ease-in-out duration-300" |
400 | x-transition:enter-start="opacity-25 max-h-0" | 421 | x-transition:enter-start="opacity-25 max-h-0" |
401 | x-transition:enter-end="opacity-100 max-h-xl" | 422 | x-transition:enter-end="opacity-100 max-h-xl" |
402 | x-transition:leave="transition-all ease-in-out duration-300" | 423 | x-transition:leave="transition-all ease-in-out duration-300" |
403 | x-transition:leave-start="opacity-100 max-h-xl" | 424 | x-transition:leave-start="opacity-100 max-h-xl" |
404 | x-transition:leave-end="opacity-0 max-h-0" | 425 | x-transition:leave-end="opacity-0 max-h-0" |
405 | 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" | 426 | 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" |
406 | aria-label="submenu" | 427 | aria-label="submenu" |
407 | > | 428 | > |
408 | <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 }}"> | 429 | <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 }}"> |
409 | <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a> | 430 | <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a> |
410 | </li> | 431 | </li> |
411 | <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 }}"> | 432 | <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 }}"> |
412 | <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a> | 433 | <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a> |
413 | </li> | 434 | </li> |
414 | <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 }}"> | 435 | <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 }}"> |
415 | <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a> | 436 | <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a> |
416 | </li> | 437 | </li> |
417 | <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 }}"> | 438 | <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 }}"> |
418 | <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a> | 439 | <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a> |
419 | </li> | 440 | </li> |
420 | 441 | ||
421 | </ul> | 442 | </ul> |
422 | </template> | 443 | </template> |
423 | </li> | 444 | </li> |
424 | 445 | ||
425 | 446 | ||
426 | <!-- Редактор --> | 447 | <!-- Редактор --> |
427 | <li class="relative px-6 py-3"> | 448 | <li class="relative px-6 py-3"> |
428 | <button | 449 | <button |
429 | 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" | 450 | 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" |
430 | @click="togglePagesMenu" | 451 | @click="togglePagesMenu" |
431 | aria-haspopup="true"> | 452 | aria-haspopup="true"> |
432 | <span class="inline-flex items-center"> | 453 | <span class="inline-flex items-center"> |
433 | <svg | 454 | <svg |
434 | class="w-5 h-5" | 455 | class="w-5 h-5" |
435 | aria-hidden="true" | 456 | aria-hidden="true" |
436 | fill="none" | 457 | fill="none" |
437 | stroke-linecap="round" | 458 | stroke-linecap="round" |
438 | stroke-linejoin="round" | 459 | stroke-linejoin="round" |
439 | stroke-width="2" | 460 | stroke-width="2" |
440 | viewBox="0 0 24 24" | 461 | viewBox="0 0 24 24" |
441 | stroke="currentColor"> | 462 | stroke="currentColor"> |
442 | <path | 463 | <path |
443 | 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" | 464 | 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" |
444 | ></path> | 465 | ></path> |
445 | </svg> | 466 | </svg> |
446 | <span class="ml-4">Редактор</span> | 467 | <span class="ml-4">Редактор</span> |
447 | </span> | 468 | </span> |
448 | <svg | 469 | <svg |
449 | class="w-4 h-4" | 470 | class="w-4 h-4" |
450 | aria-hidden="true" | 471 | aria-hidden="true" |
451 | fill="currentColor" | 472 | fill="currentColor" |
452 | viewBox="0 0 20 20" | 473 | viewBox="0 0 20 20" |
453 | > | 474 | > |
454 | <path | 475 | <path |
455 | fill-rule="evenodd" | 476 | fill-rule="evenodd" |
456 | 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" | 477 | 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" |
457 | clip-rule="evenodd" | 478 | clip-rule="evenodd" |
458 | ></path> | 479 | ></path> |
459 | </svg> | 480 | </svg> |
460 | </button> | 481 | </button> |
461 | <template x-if="isPagesMenuOpen"> | 482 | <template x-if="isPagesMenuOpen"> |
462 | <ul | 483 | <ul |
463 | x-transition:enter="transition-all ease-in-out duration-300" | 484 | x-transition:enter="transition-all ease-in-out duration-300" |
464 | x-transition:enter-start="opacity-25 max-h-0" | 485 | x-transition:enter-start="opacity-25 max-h-0" |
465 | x-transition:enter-end="opacity-100 max-h-xl" | 486 | x-transition:enter-end="opacity-100 max-h-xl" |
466 | x-transition:leave="transition-all ease-in-out duration-300" | 487 | x-transition:leave="transition-all ease-in-out duration-300" |
467 | x-transition:leave-start="opacity-100 max-h-xl" | 488 | x-transition:leave-start="opacity-100 max-h-xl" |
468 | x-transition:leave-end="opacity-0 max-h-0" | 489 | x-transition:leave-end="opacity-0 max-h-0" |
469 | 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" | 490 | 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" |
470 | aria-label="submenu" | 491 | aria-label="submenu" |
471 | > | 492 | > |
472 | <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 }}"> | 493 | <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 }}"> |
473 | <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> | 494 | <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> |
474 | </li> | 495 | </li> |
475 | <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 }}"> | 496 | <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 }}"> |
476 | <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> | 497 | <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> |
477 | </li> | 498 | </li> |
478 | 499 | ||
479 | <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 }}"> | 500 | <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 }}"> |
480 | <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> | 501 | <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> |
481 | </li> | 502 | </li> |
482 | <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 }}"> | 503 | <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 }}"> |
483 | <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> | 504 | <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> |
484 | </li> | 505 | </li> |
485 | <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 }}"> | 506 | <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 }}"> |
486 | <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> | 507 | <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> |
487 | </li> | 508 | </li> |
488 | <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 }}"> | 509 | <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 }}"> |
489 | <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> | 510 | <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> |
490 | </li> | 511 | </li> |
491 | </ul> | 512 | </ul> |
492 | </template> | 513 | </template> |
493 | </li> | 514 | </li> |
494 | 515 | ||
495 | </ul> | 516 | </ul> |
496 | <!--<div class="px-6 my-6"> | 517 | <!--<div class="px-6 my-6"> |
497 | <button | 518 | <button |
498 | 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" | 519 | 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" |
499 | > | 520 | > |
500 | Create account | 521 | Create account |
501 | <span class="ml-2" aria-hidden="true">+</span> | 522 | <span class="ml-2" aria-hidden="true">+</span> |
502 | </button> | 523 | </button> |
503 | </div>--> | 524 | </div>--> |
504 | </div> | 525 | </div> |
505 | </aside> | 526 | </aside> |
506 | <!-- Mobile sidebar --> | 527 | <!-- Mobile sidebar --> |
507 | <!-- Backdrop --> | 528 | <!-- Backdrop --> |
508 | <div | 529 | <div |
509 | x-show="isSideMenuOpen" | 530 | x-show="isSideMenuOpen" |
510 | x-transition:enter="transition ease-in-out duration-150" | 531 | x-transition:enter="transition ease-in-out duration-150" |
511 | x-transition:enter-start="opacity-0" | 532 | x-transition:enter-start="opacity-0" |
512 | x-transition:enter-end="opacity-100" | 533 | x-transition:enter-end="opacity-100" |
513 | x-transition:leave="transition ease-in-out duration-150" | 534 | x-transition:leave="transition ease-in-out duration-150" |
514 | x-transition:leave-start="opacity-100" | 535 | x-transition:leave-start="opacity-100" |
515 | x-transition:leave-end="opacity-0" | 536 | x-transition:leave-end="opacity-0" |
516 | class="fixed inset-0 z-10 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center" | 537 | class="fixed inset-0 z-10 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center" |
517 | ></div> | 538 | ></div> |
518 | <aside | 539 | <aside |
519 | 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" | 540 | 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" |
520 | x-show="isSideMenuOpen" | 541 | x-show="isSideMenuOpen" |
521 | x-transition:enter="transition ease-in-out duration-150" | 542 | x-transition:enter="transition ease-in-out duration-150" |
522 | x-transition:enter-start="opacity-0 transform -translate-x-20" | 543 | x-transition:enter-start="opacity-0 transform -translate-x-20" |
523 | x-transition:enter-end="opacity-100" | 544 | x-transition:enter-end="opacity-100" |
524 | x-transition:leave="transition ease-in-out duration-150" | 545 | x-transition:leave="transition ease-in-out duration-150" |
525 | x-transition:leave-start="opacity-100" | 546 | x-transition:leave-start="opacity-100" |
526 | x-transition:leave-end="opacity-0 transform -translate-x-20" | 547 | x-transition:leave-end="opacity-0 transform -translate-x-20" |
527 | @click.away="closeSideMenu" | 548 | @click.away="closeSideMenu" |
528 | @keydown.escape="closeSideMenu" | 549 | @keydown.escape="closeSideMenu" |
529 | > | 550 | > |
530 | <div class="py-4 text-gray-500 dark:text-gray-400"> | 551 | <div class="py-4 text-gray-500 dark:text-gray-400"> |
531 | <a | 552 | <a |
532 | class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200" | 553 | class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200" |
533 | href="{{ route('admin.index') }}" | 554 | href="{{ route('admin.index') }}" |
534 | > | 555 | > |
535 | Админка | 556 | Админка |
536 | </a> | 557 | </a> |
537 | <ul class="mt-6"> | 558 | <ul class="mt-6"> |
538 | <li class="relative px-6 py-3"> | 559 | <li class="relative px-6 py-3"> |
539 | <span | 560 | <span |
540 | class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg" | 561 | class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg" |
541 | aria-hidden="true" | 562 | aria-hidden="true" |
542 | ></span> | 563 | ></span> |
543 | <a | 564 | <a |
544 | 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') }}" | 565 | 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') }}" |
545 | > | 566 | > |
546 | <svg | 567 | <svg |
547 | class="w-5 h-5" | 568 | class="w-5 h-5" |
548 | aria-hidden="true" | 569 | aria-hidden="true" |
549 | fill="none" | 570 | fill="none" |
550 | stroke-linecap="round" | 571 | stroke-linecap="round" |
551 | stroke-linejoin="round" | 572 | stroke-linejoin="round" |
552 | stroke-width="2" | 573 | stroke-width="2" |
553 | viewBox="0 0 24 24" | 574 | viewBox="0 0 24 24" |
554 | stroke="currentColor" | 575 | stroke="currentColor" |
555 | > | 576 | > |
556 | <path | 577 | <path |
557 | 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" | 578 | 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" |
558 | ></path> | 579 | ></path> |
559 | </svg> | 580 | </svg> |
560 | <span class="ml-4">Главная страница</span> | 581 | <span class="ml-4">Главная страница</span> |
561 | </a> | 582 | </a> |
562 | </li> | 583 | </li> |
563 | </ul> | 584 | </ul> |
564 | <ul> | 585 | <ul> |
565 | @if ($UserId == 1) | 586 | @if ($UserId == 1) |
566 | <li class="relative px-6 py-3"> | 587 | <li class="relative px-6 py-3"> |
567 | <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') }}"> | 588 | <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') }}"> |
568 | <svg | 589 | <svg |
569 | class="w-5 h-5" | 590 | class="w-5 h-5" |
570 | aria-hidden="true" | 591 | aria-hidden="true" |
571 | fill="none" | 592 | fill="none" |
572 | stroke-linecap="round" | 593 | stroke-linecap="round" |
573 | stroke-linejoin="round" | 594 | stroke-linejoin="round" |
574 | stroke-width="2" | 595 | stroke-width="2" |
575 | viewBox="0 0 24 24" | 596 | viewBox="0 0 24 24" |
576 | stroke="currentColor" | 597 | stroke="currentColor" |
577 | > | 598 | > |
578 | <path | 599 | <path |
579 | 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" | 600 | 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" |
580 | ></path> | 601 | ></path> |
581 | </svg> | 602 | </svg> |
582 | <span class="ml-4">Пользователи</span> | 603 | <span class="ml-4">Пользователи</span> |
583 | </a> | 604 | </a> |
584 | </li> | 605 | </li> |
585 | @endif | 606 | @endif |
586 | <li class="relative px-6 py-3"> | 607 | <li class="relative px-6 py-3"> |
587 | <a | 608 | <a |
588 | 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') }}" | 609 | 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') }}" |
589 | > | 610 | > |
590 | <svg | 611 | <svg |
591 | class="w-5 h-5" | 612 | class="w-5 h-5" |
592 | aria-hidden="true" | 613 | aria-hidden="true" |
593 | fill="none" | 614 | fill="none" |
594 | stroke-linecap="round" | 615 | stroke-linecap="round" |
595 | stroke-linejoin="round" | 616 | stroke-linejoin="round" |
596 | stroke-width="2" | 617 | stroke-width="2" |
597 | viewBox="0 0 24 24" | 618 | viewBox="0 0 24 24" |
598 | stroke="currentColor" | 619 | stroke="currentColor" |
599 | > | 620 | > |
600 | <path | 621 | <path |
601 | 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" | 622 | 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" |
602 | ></path> | 623 | ></path> |
603 | </svg> | 624 | </svg> |
604 | <span class="ml-4">Администраторы</span> | 625 | <span class="ml-4">Администраторы</span> |
605 | </a> | 626 | </a> |
606 | </li> | 627 | </li> |
607 | 628 | ||
608 | <li class="relative px-6 py-3"> | 629 | <li class="relative px-6 py-3"> |
609 | <a | 630 | <a |
610 | 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') }}" | 631 | 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') }}" |
611 | > | 632 | > |
612 | <svg | 633 | <svg |
613 | class="w-5 h-5" | 634 | class="w-5 h-5" |
614 | aria-hidden="true" | 635 | aria-hidden="true" |
615 | fill="none" | 636 | fill="none" |
616 | stroke-linecap="round" | 637 | stroke-linecap="round" |
617 | stroke-linejoin="round" | 638 | stroke-linejoin="round" |
618 | stroke-width="2" | 639 | stroke-width="2" |
619 | viewBox="0 0 24 24" | 640 | viewBox="0 0 24 24" |
620 | stroke="currentColor" | 641 | stroke="currentColor" |
621 | > | 642 | > |
622 | <path | 643 | <path |
623 | 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" | 644 | 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" |
624 | ></path> | 645 | ></path> |
625 | </svg> | 646 | </svg> |
626 | <span class="ml-4">Работодатели</span> | 647 | <span class="ml-4">Работодатели</span> |
627 | </a> | 648 | </a> |
628 | </li> | 649 | </li> |
629 | <li class="relative px-6 py-3"> | 650 | <li class="relative px-6 py-3"> |
630 | <a | 651 | <a |
631 | 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') }}" | 652 | 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') }}" |
632 | > | 653 | > |
633 | <svg | 654 | <svg |
634 | class="w-5 h-5" | 655 | class="w-5 h-5" |
635 | aria-hidden="true" | 656 | aria-hidden="true" |
636 | fill="none" | 657 | fill="none" |
637 | stroke-linecap="round" | 658 | stroke-linecap="round" |
638 | stroke-linejoin="round" | 659 | stroke-linejoin="round" |
639 | stroke-width="2" | 660 | stroke-width="2" |
640 | viewBox="0 0 24 24" | 661 | viewBox="0 0 24 24" |
641 | stroke="currentColor" | 662 | stroke="currentColor" |
642 | > | 663 | > |
643 | <path | 664 | <path |
644 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" | 665 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" |
645 | ></path> | 666 | ></path> |
646 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> | 667 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> |
647 | </svg> | 668 | </svg> |
648 | <span class="ml-4">Соискатели</span> | 669 | <span class="ml-4">Соискатели</span> |
649 | </a> | 670 | </a> |
650 | </li> | 671 | </li> |
651 | <li class="relative px-6 py-3"> | 672 | <li class="relative px-6 py-3"> |
652 | <a | 673 | <a |
653 | 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') }}" | 674 | 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') }}" |
654 | > | 675 | > |
655 | <svg | 676 | <svg |
656 | class="w-5 h-5" | 677 | class="w-5 h-5" |
657 | aria-hidden="true" | 678 | aria-hidden="true" |
658 | fill="none" | 679 | fill="none" |
659 | stroke-linecap="round" | 680 | stroke-linecap="round" |
660 | stroke-linejoin="round" | 681 | stroke-linejoin="round" |
661 | stroke-width="2" | 682 | stroke-width="2" |
662 | viewBox="0 0 24 24" | 683 | viewBox="0 0 24 24" |
663 | stroke="currentColor" | 684 | stroke="currentColor" |
664 | > | 685 | > |
665 | <path | 686 | <path |
666 | 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" | 687 | 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" |
667 | ></path> | 688 | ></path> |
668 | </svg> | 689 | </svg> |
669 | <span class="ml-4">Вакансии</span> | 690 | <span class="ml-4">Вакансии</span> |
670 | </a> | 691 | </a> |
671 | </li> | 692 | </li> |
672 | <li class="relative px-6 py-3"> | 693 | <li class="relative px-6 py-3"> |
673 | <a | 694 | <a |
674 | 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') }}" | 695 | 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') }}" |
675 | > | 696 | > |
676 | <svg | 697 | <svg |
677 | class="w-5 h-5" | 698 | class="w-5 h-5" |
678 | aria-hidden="true" | 699 | aria-hidden="true" |
679 | fill="none" | 700 | fill="none" |
680 | stroke-linecap="round" | 701 | stroke-linecap="round" |
681 | stroke-linejoin="round" | 702 | stroke-linejoin="round" |
682 | stroke-width="2" | 703 | stroke-width="2" |
683 | viewBox="0 0 24 24" | 704 | viewBox="0 0 24 24" |
684 | stroke="currentColor" | 705 | stroke="currentColor" |
685 | > | 706 | > |
686 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 707 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
687 | </svg> | 708 | </svg> |
688 | <span class="ml-4">Сообщения все</span> | 709 | <span class="ml-4">Сообщения все</span> |
689 | </a> | 710 | </a> |
690 | </li> | 711 | </li> |
691 | 712 | ||
692 | <li class="relative px-6 py-3"> | 713 | <li class="relative px-6 py-3"> |
693 | <a | 714 | <a |
694 | 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') }}" | 715 | 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') }}" |
695 | > | 716 | > |
696 | <svg | 717 | <svg |
697 | class="w-5 h-5" | 718 | class="w-5 h-5" |
698 | aria-hidden="true" | 719 | aria-hidden="true" |
699 | fill="none" | 720 | fill="none" |
700 | stroke-linecap="round" | 721 | stroke-linecap="round" |
701 | stroke-linejoin="round" | 722 | stroke-linejoin="round" |
702 | stroke-width="2" | 723 | stroke-width="2" |
703 | viewBox="0 0 24 24" | 724 | viewBox="0 0 24 24" |
704 | stroke="currentColor" | 725 | stroke="currentColor" |
705 | > | 726 | > |
706 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 727 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
707 | </svg> | 728 | </svg> |
708 | <span class="ml-4">Заявки на рассылку</span> | 729 | <span class="ml-4">Заявки на рассылку</span> |
709 | </a> | 730 | </a> |
710 | </li> | 731 | </li> |
711 | 732 | ||
712 | 733 | ||
713 | <li class="relative px-6 py-3"> | 734 | <li class="relative px-6 py-3"> |
714 | <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') }}"> | 735 | <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') }}"> |
715 | <svg | 736 | <svg |
716 | class="w-5 h-5" | 737 | class="w-5 h-5" |
717 | aria-hidden="true" | 738 | aria-hidden="true" |
718 | fill="none" | 739 | fill="none" |
719 | stroke-linecap="round" | 740 | stroke-linecap="round" |
720 | stroke-linejoin="round" | 741 | stroke-linejoin="round" |
721 | stroke-width="2" | 742 | stroke-width="2" |
722 | viewBox="0 0 24 24" | 743 | viewBox="0 0 24 24" |
723 | stroke="currentColor" | 744 | stroke="currentColor" |
724 | > | 745 | > |
725 | <path | 746 | <path |
726 | 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" | 747 | 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" |
727 | ></path> | 748 | ></path> |
728 | </svg> | 749 | </svg> |
729 | <span class="ml-4">Группы пользователей</span> | 750 | <span class="ml-4">Группы пользователей</span> |
730 | </a> | 751 | </a> |
731 | </li> | 752 | </li> |
753 | |||
754 | <li class="relative px-6 py-3"> | ||
755 | <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') }}"> | ||
756 | <svg | ||
757 | class="w-5 h-5" | ||
758 | aria-hidden="true" | ||
759 | fill="none" | ||
760 | stroke-linecap="round" | ||
761 | stroke-linejoin="round" | ||
762 | stroke-width="2" | ||
763 | viewBox="0 0 24 24" | ||
764 | stroke="currentColor" | ||
765 | > | ||
766 | <path | ||
767 | 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" | ||
768 | ></path> | ||
769 | </svg> | ||
770 | <span class="ml-4">Медиа</span> | ||
771 | </a> | ||
772 | </li> | ||
773 | |||
732 | @if ($UserId == 1) | 774 | @if ($UserId == 1) |
733 | <li class="relative px-6 py-3"> | 775 | <li class="relative px-6 py-3"> |
734 | <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') }}"> | 776 | <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') }}"> |
735 | <svg | 777 | <svg |
736 | class="w-5 h-5" | 778 | class="w-5 h-5" |
737 | aria-hidden="true" | 779 | aria-hidden="true" |
738 | fill="none" | 780 | fill="none" |
739 | stroke-linecap="round" | 781 | stroke-linecap="round" |
740 | stroke-linejoin="round" | 782 | stroke-linejoin="round" |
741 | stroke-width="2" | 783 | stroke-width="2" |
742 | viewBox="0 0 24 24" | 784 | viewBox="0 0 24 24" |
743 | stroke="currentColor" | 785 | stroke="currentColor" |
744 | > | 786 | > |
745 | <path | 787 | <path |
746 | 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" | 788 | 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" |
747 | ></path> | 789 | ></path> |
748 | </svg> | 790 | </svg> |
749 | <span class="ml-4">Роли пользователей</span> | 791 | <span class="ml-4">Роли пользователей</span> |
750 | </a> | 792 | </a> |
751 | </li> | 793 | </li> |
752 | @endif | 794 | @endif |
753 | 795 | ||
754 | <li class="relative px-6 py-3"> | 796 | <li class="relative px-6 py-3"> |
755 | <a | 797 | <a |
756 | 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') }}" | 798 | 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') }}" |
757 | > | 799 | > |
758 | <svg | 800 | <svg |
759 | class="w-5 h-5" | 801 | class="w-5 h-5" |
760 | aria-hidden="true" | 802 | aria-hidden="true" |
761 | fill="none" | 803 | fill="none" |
762 | stroke-linecap="round" | 804 | stroke-linecap="round" |
763 | stroke-linejoin="round" | 805 | stroke-linejoin="round" |
764 | stroke-width="2" | 806 | stroke-width="2" |
765 | viewBox="0 0 24 24" | 807 | viewBox="0 0 24 24" |
766 | stroke="currentColor" | 808 | stroke="currentColor" |
767 | > | 809 | > |
768 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 810 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
769 | </svg> | 811 | </svg> |
770 | <span class="ml-4">Базы данных</span> | 812 | <span class="ml-4">Базы данных</span> |
771 | </a> | 813 | </a> |
772 | </li> | 814 | </li> |
773 | 815 | ||
774 | <li class="relative px-6 py-3"> | 816 | <li class="relative px-6 py-3"> |
775 | <a | 817 | <a |
776 | 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') }}" | 818 | 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') }}" |
777 | > | 819 | > |
778 | <svg | 820 | <svg |
779 | class="w-5 h-5" | 821 | class="w-5 h-5" |
780 | aria-hidden="true" | 822 | aria-hidden="true" |
781 | fill="none" | 823 | fill="none" |
782 | stroke-linecap="round" | 824 | stroke-linecap="round" |
783 | stroke-linejoin="round" | 825 | stroke-linejoin="round" |
784 | stroke-width="2" | 826 | stroke-width="2" |
785 | viewBox="0 0 24 24" | 827 | viewBox="0 0 24 24" |
786 | stroke="currentColor" | 828 | stroke="currentColor" |
787 | > | 829 | > |
788 | <path | 830 | <path |
789 | 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" | 831 | 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" |
790 | ></path> | 832 | ></path> |
791 | </svg> | 833 | </svg> |
792 | <span class="ml-4">Учебн.заведения</span> | 834 | <span class="ml-4">Учебн.заведения</span> |
793 | </a> | 835 | </a> |
794 | </li> | 836 | </li> |
795 | <li class="relative px-6 py-3"> | 837 | <li class="relative px-6 py-3"> |
796 | <a | 838 | <a |
797 | 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') }}" | 839 | 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') }}" |
798 | > | 840 | > |
799 | <svg | 841 | <svg |
800 | class="w-5 h-5" | 842 | class="w-5 h-5" |
801 | aria-hidden="true" | 843 | aria-hidden="true" |
802 | fill="none" | 844 | fill="none" |
803 | stroke-linecap="round" | 845 | stroke-linecap="round" |
804 | stroke-linejoin="round" | 846 | stroke-linejoin="round" |
805 | stroke-width="2" | 847 | stroke-width="2" |
806 | viewBox="0 0 24 24" | 848 | viewBox="0 0 24 24" |
807 | stroke="currentColor" | 849 | stroke="currentColor" |
808 | > | 850 | > |
809 | <path | 851 | <path |
810 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" | 852 | d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z" |
811 | ></path> | 853 | ></path> |
812 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> | 854 | <path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path> |
813 | </svg> | 855 | </svg> |
814 | <span class="ml-4">Статистика</span> | 856 | <span class="ml-4">Статистика</span> |
815 | </a> | 857 | </a> |
816 | </li> | 858 | </li> |
817 | <li class="relative px-6 py-3"> | 859 | <li class="relative px-6 py-3"> |
818 | <a | 860 | <a |
819 | 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') }}" | 861 | 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') }}" |
820 | > | 862 | > |
821 | <svg | 863 | <svg |
822 | class="w-5 h-5" | 864 | class="w-5 h-5" |
823 | aria-hidden="true" | 865 | aria-hidden="true" |
824 | fill="none" | 866 | fill="none" |
825 | stroke-linecap="round" | 867 | stroke-linecap="round" |
826 | stroke-linejoin="round" | 868 | stroke-linejoin="round" |
827 | stroke-width="2" | 869 | stroke-width="2" |
828 | viewBox="0 0 24 24" | 870 | viewBox="0 0 24 24" |
829 | stroke="currentColor" | 871 | stroke="currentColor" |
830 | > | 872 | > |
831 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> | 873 | <path d="M4 6h16M4 10h16M4 14h16M4 18h16"></path> |
832 | </svg> | 874 | </svg> |
833 | <span class="ml-4">Сообщения все</span> | 875 | <span class="ml-4">Сообщения все</span> |
834 | </a> | 876 | </a> |
835 | </li> | 877 | </li> |
836 | <li class="relative px-6 py-3"> | 878 | <li class="relative px-6 py-3"> |
837 | <a | 879 | <a |
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.reclames') ? 'dark:text-gray-100' : null }}" href="{{ route('admin.reclames') }}" | 880 | 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') }}" |
839 | > | 881 | > |
840 | <svg | 882 | <svg |
841 | class="w-5 h-5" | 883 | class="w-5 h-5" |
842 | aria-hidden="true" | 884 | aria-hidden="true" |
843 | fill="none" | 885 | fill="none" |
844 | stroke-linecap="round" | 886 | stroke-linecap="round" |
845 | stroke-linejoin="round" | 887 | stroke-linejoin="round" |
846 | stroke-width="2" | 888 | stroke-width="2" |
847 | viewBox="0 0 24 24" | 889 | viewBox="0 0 24 24" |
848 | stroke="currentColor" | 890 | stroke="currentColor" |
849 | > | 891 | > |
850 | <path | 892 | <path |
851 | 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" | 893 | 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" |
852 | ></path> | 894 | ></path> |
853 | </svg> | 895 | </svg> |
854 | <span class="ml-4">Реклама</span> | 896 | <span class="ml-4">Реклама</span> |
855 | </a> | 897 | </a> |
856 | </li> | 898 | </li> |
857 | <!-- Справочники --> | 899 | <!-- Справочники --> |
858 | <li class="relative px-6 py-3" x-data="{ open2: false }"> | 900 | <li class="relative px-6 py-3" x-data="{ open2: false }"> |
859 | <button | 901 | <button |
860 | 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" | 902 | 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" |
861 | @click="open2=!open2" | 903 | @click="open2=!open2" |
862 | aria-haspopup="true"> | 904 | aria-haspopup="true"> |
863 | <span class="inline-flex items-center"> | 905 | <span class="inline-flex items-center"> |
864 | <svg | 906 | <svg |
865 | class="w-5 h-5" | 907 | class="w-5 h-5" |
866 | aria-hidden="true" | 908 | aria-hidden="true" |
867 | fill="none" | 909 | fill="none" |
868 | stroke-linecap="round" | 910 | stroke-linecap="round" |
869 | stroke-linejoin="round" | 911 | stroke-linejoin="round" |
870 | stroke-width="2" | 912 | stroke-width="2" |
871 | viewBox="0 0 24 24" | 913 | viewBox="0 0 24 24" |
872 | stroke="currentColor"> | 914 | stroke="currentColor"> |
873 | <path | 915 | <path |
874 | 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" | 916 | 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" |
875 | ></path> | 917 | ></path> |
876 | </svg> | 918 | </svg> |
877 | <span class="ml-4">Справочники</span> | 919 | <span class="ml-4">Справочники</span> |
878 | </span> | 920 | </span> |
879 | <svg | 921 | <svg |
880 | class="w-4 h-4" | 922 | class="w-4 h-4" |
881 | aria-hidden="true" | 923 | aria-hidden="true" |
882 | fill="currentColor" | 924 | fill="currentColor" |
883 | viewBox="0 0 20 20" | 925 | viewBox="0 0 20 20" |
884 | > | 926 | > |
885 | <path | 927 | <path |
886 | fill-rule="evenodd" | 928 | fill-rule="evenodd" |
887 | 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" | 929 | 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" |
888 | clip-rule="evenodd" | 930 | clip-rule="evenodd" |
889 | ></path> | 931 | ></path> |
890 | </svg> | 932 | </svg> |
891 | </button> | 933 | </button> |
892 | <template x-if="open2"> | 934 | <template x-if="open2"> |
893 | <ul | 935 | <ul |
894 | x-transition:enter="transition-all ease-in-out duration-300" | 936 | x-transition:enter="transition-all ease-in-out duration-300" |
895 | x-transition:enter-start="opacity-25 max-h-0" | 937 | x-transition:enter-start="opacity-25 max-h-0" |
896 | x-transition:enter-end="opacity-100 max-h-xl" | 938 | x-transition:enter-end="opacity-100 max-h-xl" |
897 | x-transition:leave="transition-all ease-in-out duration-300" | 939 | x-transition:leave="transition-all ease-in-out duration-300" |
898 | x-transition:leave-start="opacity-100 max-h-xl" | 940 | x-transition:leave-start="opacity-100 max-h-xl" |
899 | x-transition:leave-end="opacity-0 max-h-0" | 941 | x-transition:leave-end="opacity-0 max-h-0" |
900 | 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" | 942 | 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" |
901 | aria-label="submenu" | 943 | aria-label="submenu" |
902 | > | 944 | > |
903 | <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 }}"> | 945 | <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 }}"> |
904 | <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a> | 946 | <a class="w-full" href="{{ route('admin.job-titles.index') }}">Должности</a> |
905 | </li> | 947 | </li> |
906 | <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 }}"> | 948 | <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 }}"> |
907 | <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a> | 949 | <a class="w-full" href="{{ route('admin.categories.index') }}">Категории вакансий</a> |
908 | </li> | 950 | </li> |
909 | <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 }}"> | 951 | <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 }}"> |
910 | <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a> | 952 | <a class="w-full" href="{{ route('admin.category-emp.index') }}">Категории работодателей</a> |
911 | </li> | 953 | </li> |
912 | <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 }}"> | 954 | <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 }}"> |
913 | <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a> | 955 | <a class="w-full" href="{{ route('admin.infobloks.index') }}">Блоки-Дипломы</a> |
914 | </li> | 956 | </li> |
915 | 957 | ||
916 | </ul> | 958 | </ul> |
917 | </template> | 959 | </template> |
918 | </li> | 960 | </li> |
919 | 961 | ||
920 | <!-- Редактор --> | 962 | <!-- Редактор --> |
921 | <li class="relative px-6 py-3"> | 963 | <li class="relative px-6 py-3"> |
922 | <button | 964 | <button |
923 | 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" | 965 | 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" |
924 | @click="togglePagesMenu" | 966 | @click="togglePagesMenu" |
925 | aria-haspopup="true" | 967 | aria-haspopup="true" |
926 | > | 968 | > |
927 | <span class="inline-flex items-center"> | 969 | <span class="inline-flex items-center"> |
928 | <svg | 970 | <svg |
929 | class="w-5 h-5" | 971 | class="w-5 h-5" |
930 | aria-hidden="true" | 972 | aria-hidden="true" |
931 | fill="none" | 973 | fill="none" |
932 | stroke-linecap="round" | 974 | stroke-linecap="round" |
933 | stroke-linejoin="round" | 975 | stroke-linejoin="round" |
934 | stroke-width="2" | 976 | stroke-width="2" |
935 | viewBox="0 0 24 24" | 977 | viewBox="0 0 24 24" |
936 | stroke="currentColor" | 978 | stroke="currentColor" |
937 | > | 979 | > |
938 | <path | 980 | <path |
939 | 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" | 981 | 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" |
940 | ></path> | 982 | ></path> |
941 | </svg> | 983 | </svg> |
942 | <span class="ml-4">Редактор</span> | 984 | <span class="ml-4">Редактор</span> |
943 | </span> | 985 | </span> |
944 | <svg | 986 | <svg |
945 | class="w-4 h-4" | 987 | class="w-4 h-4" |
946 | aria-hidden="true" | 988 | aria-hidden="true" |
947 | fill="currentColor" | 989 | fill="currentColor" |
948 | viewBox="0 0 20 20" | 990 | viewBox="0 0 20 20" |
949 | > | 991 | > |
950 | <path | 992 | <path |
951 | fill-rule="evenodd" | 993 | fill-rule="evenodd" |
952 | 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" | 994 | 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" |
953 | clip-rule="evenodd" | 995 | clip-rule="evenodd" |
954 | ></path> | 996 | ></path> |
955 | </svg> | 997 | </svg> |
956 | </button> | 998 | </button> |
957 | <template x-if="isPagesMenuOpen"> | 999 | <template x-if="isPagesMenuOpen"> |
958 | <ul | 1000 | <ul |
959 | x-transition:enter="transition-all ease-in-out duration-300" | 1001 | x-transition:enter="transition-all ease-in-out duration-300" |
960 | x-transition:enter-start="opacity-25 max-h-0" | 1002 | x-transition:enter-start="opacity-25 max-h-0" |
961 | x-transition:enter-end="opacity-100 max-h-xl" | 1003 | x-transition:enter-end="opacity-100 max-h-xl" |
962 | x-transition:leave="transition-all ease-in-out duration-300" | 1004 | x-transition:leave="transition-all ease-in-out duration-300" |
963 | x-transition:leave-start="opacity-100 max-h-xl" | 1005 | x-transition:leave-start="opacity-100 max-h-xl" |
964 | x-transition:leave-end="opacity-0 max-h-0" | 1006 | x-transition:leave-end="opacity-0 max-h-0" |
965 | 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" | 1007 | 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" |
966 | aria-label="submenu" | 1008 | aria-label="submenu" |
967 | > | 1009 | > |
968 | <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 }}"> | 1010 | <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 }}"> |
969 | <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> | 1011 | <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> |
970 | </li> | 1012 | </li> |
971 | <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 }}"> | 1013 | <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 }}"> |
972 | <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> | 1014 | <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> |
973 | </li> | 1015 | </li> |
974 | <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 }}"> | 1016 | <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 }}"> |
975 | <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> | 1017 | <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> |
976 | </li> | 1018 | </li> |
977 | <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 }}"> | 1019 | <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 }}"> |
978 | <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> | 1020 | <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> |
979 | </li> | 1021 | </li> |
980 | <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 }}"> | 1022 | <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 }}"> |
981 | <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> | 1023 | <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> |
982 | </li> | 1024 | </li> |
983 | <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 }}"> | 1025 | <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 }}"> |
984 | <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> | 1026 | <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> |
985 | </li> | 1027 | </li> |
986 | 1028 | ||
987 | </ul> | 1029 | </ul> |
988 | </template> | 1030 | </template> |
989 | </li> | 1031 | </li> |
990 | </ul> | 1032 | </ul> |
991 | <!--<div class="px-6 my-6"> | 1033 | <!--<div class="px-6 my-6"> |
992 | <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"> | 1034 | <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"> |
993 | Create account | 1035 | Create account |
994 | <span class="ml-2" aria-hidden="true">+</span> | 1036 | <span class="ml-2" aria-hidden="true">+</span> |
995 | </button> | 1037 | </button> |
996 | </div>--> | 1038 | </div>--> |
997 | </div> | 1039 | </div> |
998 | </aside> | 1040 | </aside> |
999 | <div class="flex flex-col flex-1 w-full"> | 1041 | <div class="flex flex-col flex-1 w-full"> |
1000 | <header class="z-10 py-4 bg-white shadow-md dark:bg-gray-800"> | 1042 | <header class="z-10 py-4 bg-white shadow-md dark:bg-gray-800"> |
1001 | <div | 1043 | <div |
1002 | class="container flex items-center justify-between h-full px-6 mx-auto text-purple-600 dark:text-purple-300" | 1044 | class="container flex items-center justify-between h-full px-6 mx-auto text-purple-600 dark:text-purple-300" |
1003 | > | 1045 | > |
1004 | <!-- Mobile hamburger --> | 1046 | <!-- Mobile hamburger --> |
1005 | <button | 1047 | <button |
1006 | class="p-1 mr-5 -ml-1 rounded-md md:hidden focus:outline-none focus:shadow-outline-purple" | 1048 | class="p-1 mr-5 -ml-1 rounded-md md:hidden focus:outline-none focus:shadow-outline-purple" |
1007 | @click="toggleSideMenu" | 1049 | @click="toggleSideMenu" |
1008 | aria-label="Menu" | 1050 | aria-label="Menu" |
1009 | > | 1051 | > |
1010 | <svg | 1052 | <svg |
1011 | class="w-6 h-6" | 1053 | class="w-6 h-6" |
1012 | aria-hidden="true" | 1054 | aria-hidden="true" |
1013 | fill="currentColor" | 1055 | fill="currentColor" |
1014 | viewBox="0 0 20 20" | 1056 | viewBox="0 0 20 20" |
1015 | > | 1057 | > |
1016 | <path | 1058 | <path |
1017 | fill-rule="evenodd" | 1059 | fill-rule="evenodd" |
1018 | 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" | 1060 | 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" |
1019 | clip-rule="evenodd" | 1061 | clip-rule="evenodd" |
1020 | ></path> | 1062 | ></path> |
1021 | </svg> | 1063 | </svg> |
1022 | </button> | 1064 | </button> |
1023 | <!-- Search input --> | 1065 | <!-- Search input --> |
1024 | <div class="flex justify-center flex-1 lg:mr-32"> | 1066 | <div class="flex justify-center flex-1 lg:mr-32"> |
1025 | <div | 1067 | <div |
1026 | class="relative w-full max-w-xl mr-6 focus-within:text-purple-500" | 1068 | class="relative w-full max-w-xl mr-6 focus-within:text-purple-500" |
1027 | > | 1069 | > |
1028 | 1070 | ||
1029 | @yield('search') | 1071 | @yield('search') |
1030 | </div> | 1072 | </div> |
1031 | </div> | 1073 | </div> |
1032 | <ul class="flex items-center flex-shrink-0 space-x-6"> | 1074 | <ul class="flex items-center flex-shrink-0 space-x-6"> |
1033 | <!-- Theme toggler --> | 1075 | <!-- Theme toggler --> |
1034 | <li class="flex"> | 1076 | <li class="flex"> |
1035 | <button | 1077 | <button |
1036 | class="rounded-md focus:outline-none focus:shadow-outline-purple" | 1078 | class="rounded-md focus:outline-none focus:shadow-outline-purple" |
1037 | @click="toggleTheme" | 1079 | @click="toggleTheme" |
1038 | aria-label="Toggle color mode" | 1080 | aria-label="Toggle color mode" |
1039 | > | 1081 | > |
1040 | <template x-if="!dark"> | 1082 | <template x-if="!dark"> |
1041 | <svg | 1083 | <svg |
1042 | class="w-5 h-5" | 1084 | class="w-5 h-5" |
1043 | aria-hidden="true" | 1085 | aria-hidden="true" |
1044 | fill="currentColor" | 1086 | fill="currentColor" |
1045 | viewBox="0 0 20 20" | 1087 | viewBox="0 0 20 20" |
1046 | > | 1088 | > |
1047 | <path | 1089 | <path |
1048 | d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" | 1090 | d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" |
1049 | ></path> | 1091 | ></path> |
1050 | </svg> | 1092 | </svg> |
1051 | </template> | 1093 | </template> |
1052 | <template x-if="dark"> | 1094 | <template x-if="dark"> |
1053 | <svg | 1095 | <svg |
1054 | class="w-5 h-5" | 1096 | class="w-5 h-5" |
1055 | aria-hidden="true" | 1097 | aria-hidden="true" |
1056 | fill="currentColor" | 1098 | fill="currentColor" |
1057 | viewBox="0 0 20 20" | 1099 | viewBox="0 0 20 20" |
1058 | > | 1100 | > |
1059 | <path | 1101 | <path |
1060 | fill-rule="evenodd" | 1102 | fill-rule="evenodd" |
1061 | 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" | 1103 | 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" |
1062 | clip-rule="evenodd" | 1104 | clip-rule="evenodd" |
1063 | ></path> | 1105 | ></path> |
1064 | </svg> | 1106 | </svg> |
1065 | </template> | 1107 | </template> |
1066 | </button> | 1108 | </button> |
1067 | </li> | 1109 | </li> |
1068 | <!-- Notifications menu --> | 1110 | <!-- Notifications menu --> |
1069 | <li class="relative"> | 1111 | <li class="relative"> |
1070 | <button | 1112 | <button |
1071 | class="relative align-middle rounded-md focus:outline-none focus:shadow-outline-purple" | 1113 | class="relative align-middle rounded-md focus:outline-none focus:shadow-outline-purple" |
1072 | @click="toggleNotificationsMenu" | 1114 | @click="toggleNotificationsMenu" |
1073 | @keydown.escape="closeNotificationsMenu" | 1115 | @keydown.escape="closeNotificationsMenu" |
1074 | aria-label="Notifications" | 1116 | aria-label="Notifications" |
1075 | aria-haspopup="true" | 1117 | aria-haspopup="true" |
1076 | > | 1118 | > |
1077 | <svg | 1119 | <svg |
1078 | class="w-5 h-5" | 1120 | class="w-5 h-5" |
1079 | aria-hidden="true" | 1121 | aria-hidden="true" |
1080 | fill="currentColor" | 1122 | fill="currentColor" |
1081 | viewBox="0 0 20 20" | 1123 | viewBox="0 0 20 20" |
1082 | > | 1124 | > |
1083 | <path | 1125 | <path |
1084 | 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" | 1126 | 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" |
1085 | ></path> | 1127 | ></path> |
1086 | </svg> | 1128 | </svg> |
1087 | <!-- Notification badge --> | 1129 | <!-- Notification badge --> |
1088 | <span | 1130 | <span |
1089 | aria-hidden="true" | 1131 | aria-hidden="true" |
1090 | 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" | 1132 | 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" |
1091 | ></span> | 1133 | ></span> |
1092 | </button> | 1134 | </button> |
1093 | <template x-if="isNotificationsMenuOpen"> | 1135 | <template x-if="isNotificationsMenuOpen"> |
1094 | <ul | 1136 | <ul |
1095 | x-transition:leave="transition ease-in duration-150" | 1137 | x-transition:leave="transition ease-in duration-150" |
1096 | x-transition:leave-start="opacity-100" | 1138 | x-transition:leave-start="opacity-100" |
1097 | x-transition:leave-end="opacity-0" | 1139 | x-transition:leave-end="opacity-0" |
1098 | @click.away="closeNotificationsMenu" | 1140 | @click.away="closeNotificationsMenu" |
1099 | @keydown.escape="closeNotificationsMenu" | 1141 | @keydown.escape="closeNotificationsMenu" |
1100 | 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" | 1142 | 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" |
1101 | > | 1143 | > |
1102 | <li class="flex"> | 1144 | <li class="flex"> |
1103 | <a | 1145 | <a |
1104 | 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" | 1146 | 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" |
1105 | href="{{ route('admin.admin-messages') }}" | 1147 | href="{{ route('admin.admin-messages') }}" |
1106 | > | 1148 | > |
1107 | <span>Сообщения</span> | 1149 | <span>Сообщения</span> |
1108 | @if($MsgCount > 0) | 1150 | @if($MsgCount > 0) |
1109 | <span | 1151 | <span |
1110 | 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" | 1152 | 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" |
1111 | > | 1153 | > |
1112 | 1154 | ||
1113 | {{ $MsgCount }} | 1155 | {{ $MsgCount }} |
1114 | </span> | 1156 | </span> |
1115 | @endif | 1157 | @endif |
1116 | </a> | 1158 | </a> |
1117 | </li> | 1159 | </li> |
1118 | <!--<li class="flex"> | 1160 | <!--<li class="flex"> |
1119 | <a | 1161 | <a |
1120 | 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" | 1162 | 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" |
1121 | href="#" | 1163 | href="#" |
1122 | > | 1164 | > |
1123 | <span>Логи</span> | 1165 | <span>Логи</span> |
1124 | </a> | 1166 | </a> |
1125 | </li>--> | 1167 | </li>--> |
1126 | </ul> | 1168 | </ul> |
1127 | </template> | 1169 | </template> |
1128 | </li> | 1170 | </li> |
1129 | <!-- Profile menu --> | 1171 | <!-- Profile menu --> |
1130 | <li class="relative"> | 1172 | <li class="relative"> |
1131 | <button | 1173 | <button |
1132 | class="align-middle rounded-full focus:shadow-outline-purple focus:outline-none" | 1174 | class="align-middle rounded-full focus:shadow-outline-purple focus:outline-none" |
1133 | @click="toggleProfileMenu" | 1175 | @click="toggleProfileMenu" |
1134 | @keydown.escape="closeProfileMenu" | 1176 | @keydown.escape="closeProfileMenu" |
1135 | aria-label="Account" | 1177 | aria-label="Account" |
1136 | aria-haspopup="true" | 1178 | aria-haspopup="true" |
1137 | > | 1179 | > |
1138 | <img | 1180 | <img |
1139 | class="object-cover w-8 h-8 rounded-full" | 1181 | class="object-cover w-8 h-8 rounded-full" |
1140 | src="{{ asset('assets/img/profile.jpg') }}" | 1182 | src="{{ asset('assets/img/profile.jpg') }}" |
1141 | alt="" | 1183 | alt="" |
1142 | aria-hidden="true" | 1184 | aria-hidden="true" |
1143 | /> | 1185 | /> |
1144 | </button> | 1186 | </button> |
1145 | <template x-if="isProfileMenuOpen"> | 1187 | <template x-if="isProfileMenuOpen"> |
1146 | <ul | 1188 | <ul |
1147 | x-transition:leave="transition ease-in duration-150" | 1189 | x-transition:leave="transition ease-in duration-150" |
1148 | x-transition:leave-start="opacity-100" | 1190 | x-transition:leave-start="opacity-100" |
1149 | x-transition:leave-end="opacity-0" | 1191 | x-transition:leave-end="opacity-0" |
1150 | @click.away="closeProfileMenu" | 1192 | @click.away="closeProfileMenu" |
1151 | @keydown.escape="closeProfileMenu" | 1193 | @keydown.escape="closeProfileMenu" |
1152 | 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" | 1194 | 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" |
1153 | aria-label="submenu" | 1195 | aria-label="submenu" |
1154 | > | 1196 | > |
1155 | <li class="flex"> | 1197 | <li class="flex"> |
1156 | <a | 1198 | <a |
1157 | 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" | 1199 | 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" |
1158 | href="{{ route('admin.profile') }}" | 1200 | href="{{ route('admin.profile') }}" |
1159 | > | 1201 | > |
1160 | <svg | 1202 | <svg |
1161 | class="w-4 h-4 mr-3" | 1203 | class="w-4 h-4 mr-3" |
1162 | aria-hidden="true" | 1204 | aria-hidden="true" |
1163 | fill="none" | 1205 | fill="none" |
1164 | stroke-linecap="round" | 1206 | stroke-linecap="round" |
1165 | stroke-linejoin="round" | 1207 | stroke-linejoin="round" |
1166 | stroke-width="2" | 1208 | stroke-width="2" |
1167 | viewBox="0 0 24 24" | 1209 | viewBox="0 0 24 24" |
1168 | stroke="currentColor" | 1210 | stroke="currentColor" |
1169 | > | 1211 | > |
1170 | <path | 1212 | <path |
1171 | d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" | 1213 | d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" |
1172 | ></path> | 1214 | ></path> |
1173 | </svg> | 1215 | </svg> |
1174 | <span>Профиль</span> | 1216 | <span>Профиль</span> |
1175 | </a> | 1217 | </a> |
1176 | </li> | 1218 | </li> |
1177 | <li class="flex"> | 1219 | <li class="flex"> |
1178 | <a | 1220 | <a |
1179 | 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" | 1221 | 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" |
1180 | href="{{ route('admin.config') }}" | 1222 | href="{{ route('admin.config') }}" |
1181 | > | 1223 | > |
1182 | <svg | 1224 | <svg |
1183 | class="w-4 h-4 mr-3" | 1225 | class="w-4 h-4 mr-3" |
1184 | aria-hidden="true" | 1226 | aria-hidden="true" |
1185 | fill="none" | 1227 | fill="none" |
1186 | stroke-linecap="round" | 1228 | stroke-linecap="round" |
1187 | stroke-linejoin="round" | 1229 | stroke-linejoin="round" |
1188 | stroke-width="2" | 1230 | stroke-width="2" |
1189 | viewBox="0 0 24 24" | 1231 | viewBox="0 0 24 24" |
1190 | stroke="currentColor" | 1232 | stroke="currentColor" |
1191 | > | 1233 | > |
1192 | <path | 1234 | <path |
1193 | 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" | 1235 | 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" |
1194 | ></path> | 1236 | ></path> |
1195 | <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path> | 1237 | <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path> |
1196 | </svg> | 1238 | </svg> |
1197 | <span>Настройки</span> | 1239 | <span>Настройки</span> |
1198 | </a> | 1240 | </a> |
1199 | </li> | 1241 | </li> |
1200 | <li class="flex"> | 1242 | <li class="flex"> |
1201 | <a | 1243 | <a |
1202 | 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" | 1244 | 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" |
1203 | href="{{ route('admin.logout') }}" | 1245 | href="{{ route('admin.logout') }}" |
1204 | > | 1246 | > |
1205 | <svg | 1247 | <svg |
1206 | class="w-4 h-4 mr-3" | 1248 | class="w-4 h-4 mr-3" |
1207 | aria-hidden="true" | 1249 | aria-hidden="true" |
1208 | fill="none" | 1250 | fill="none" |
1209 | stroke-linecap="round" | 1251 | stroke-linecap="round" |
1210 | stroke-linejoin="round" | 1252 | stroke-linejoin="round" |
1211 | stroke-width="2" | 1253 | stroke-width="2" |
1212 | viewBox="0 0 24 24" | 1254 | viewBox="0 0 24 24" |
1213 | stroke="currentColor" | 1255 | stroke="currentColor" |
1214 | > | 1256 | > |
1215 | <path | 1257 | <path |
1216 | 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" | 1258 | 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" |
1217 | ></path> | 1259 | ></path> |
1218 | </svg> | 1260 | </svg> |
1219 | <span>Выход</span> | 1261 | <span>Выход</span> |
1220 | </a> | 1262 | </a> |
1221 | </li> | 1263 | </li> |
1222 | </ul> | 1264 | </ul> |
1223 | </template> | 1265 | </template> |
1224 | </li> | 1266 | </li> |
1225 | </ul> | 1267 | </ul> |
1226 | </div> | 1268 | </div> |
1227 | </header> | 1269 | </header> |
1228 | <main class="h-full overflow-y-auto"> | 1270 | <main class="h-full overflow-y-auto"> |
1229 | <div class="container px-6 mx-auto grid"> | 1271 | <div class="container px-6 mx-auto grid"> |
1230 | <h2 | 1272 | <h2 |
1231 | class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200" | 1273 | class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200" |
1232 | > | 1274 | > |
1233 | {{$title}} | 1275 | {{$title}} |
1234 | </h2> | 1276 | </h2> |
1235 | <!-- CTA --> | 1277 | <!-- CTA --> |
1236 | <a | 1278 | <a |
1237 | 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" | 1279 | 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" |
1238 | href="{{ route('admin.admin-users') }}" | 1280 | href="{{ route('admin.admin-users') }}" |
1239 | > | 1281 | > |
1240 | <div class="flex items-center"> | 1282 | <div class="flex items-center"> |
1241 | <svg | 1283 | <svg |
1242 | class="w-5 h-5 mr-2" | 1284 | class="w-5 h-5 mr-2" |
1243 | fill="currentColor" | 1285 | fill="currentColor" |
1244 | viewBox="0 0 20 20" | 1286 | viewBox="0 0 20 20" |
1245 | > | 1287 | > |
1246 | <path | 1288 | <path |
1247 | 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" | 1289 | 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" |
1248 | ></path> | 1290 | ></path> |
1249 | </svg> | 1291 | </svg> |
1250 | <span>Контент для админов</span> | 1292 | <span>Контент для админов</span> |
1251 | </div> | 1293 | </div> |
1252 | <span>Список админов →</span> | 1294 | <span>Список админов →</span> |
1253 | </a> | 1295 | </a> |
1254 | 1296 | ||
1255 | @if ($message = Session::get('success')) | 1297 | @if ($message = Session::get('success')) |
1256 | <section> | 1298 | <section> |
1257 | <div class="alert alert-success alert-dismissible mt-0" role="alert"> | 1299 | <div class="alert alert-success alert-dismissible mt-0" role="alert"> |
1258 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> | 1300 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> |
1259 | <span aria-hidden="true">×</span> | 1301 | <span aria-hidden="true">×</span> |
1260 | </button> | 1302 | </button> |
1261 | {{ $message }} | 1303 | {{ $message }} |
1262 | </div> | 1304 | </div> |
1263 | </section> | 1305 | </section> |
1264 | @endif | 1306 | @endif |
1265 | 1307 | ||
1266 | @if ($errors->any()) | 1308 | @if ($errors->any()) |
1267 | <section> | 1309 | <section> |
1268 | <div class="alert alert-danger alert-dismissible mt-4" role="alert"> | 1310 | <div class="alert alert-danger alert-dismissible mt-4" role="alert"> |
1269 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> | 1311 | <button type="button" class="close" data-dismiss="alert" aria-label="Закрыть"> |
1270 | <span aria-hidden="true">×</span> | 1312 | <span aria-hidden="true">×</span> |
1271 | </button> | 1313 | </button> |
1272 | <ul class="mb-0"> | 1314 | <ul class="mb-0"> |
1273 | @foreach ($errors->all() as $error) | 1315 | @foreach ($errors->all() as $error) |
1274 | <li>{{ $error }}</li> | 1316 | <li>{{ $error }}</li> |
1275 | @endforeach | 1317 | @endforeach |
1276 | </ul> | 1318 | </ul> |
1277 | </div> | 1319 | </div> |
1278 | </section> | 1320 | </section> |
1279 | @endif | 1321 | @endif |
1280 | 1322 | ||
1281 | @yield('content') | 1323 | @yield('content') |
1282 | 1324 | ||
1283 | <!-- Cards | 1325 | <!-- Cards |
1284 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | 1326 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
1285 | 1327 | ||
1286 | <div | 1328 | <div |
1287 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" | 1329 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" |
1288 | > | 1330 | > |
1289 | <div | 1331 | <div |
1290 | class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500" | 1332 | class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500" |
1291 | > | 1333 | > |
1292 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 1334 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
1293 | <path | 1335 | <path |
1294 | 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" | 1336 | 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" |
1295 | ></path> | 1337 | ></path> |
1296 | </svg> | 1338 | </svg> |
1297 | </div> | 1339 | </div> |
1298 | <div> | 1340 | <div> |
1299 | <p | 1341 | <p |
1300 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" | 1342 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" |
1301 | > | 1343 | > |
1302 | Total clients | 1344 | Total clients |
1303 | </p> | 1345 | </p> |
1304 | <p | 1346 | <p |
1305 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" | 1347 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" |
1306 | > | 1348 | > |
1307 | 6389 | 1349 | 6389 |
1308 | </p> | 1350 | </p> |
1309 | </div> | 1351 | </div> |
1310 | </div> | 1352 | </div> |
1311 | 1353 | ||
1312 | <div | 1354 | <div |
1313 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" | 1355 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" |
1314 | > | 1356 | > |
1315 | <div | 1357 | <div |
1316 | class="p-3 mr-4 text-green-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-green-500" | 1358 | class="p-3 mr-4 text-green-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-green-500" |
1317 | > | 1359 | > |
1318 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 1360 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
1319 | <path | 1361 | <path |
1320 | fill-rule="evenodd" | 1362 | fill-rule="evenodd" |
1321 | 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" | 1363 | 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" |
1322 | clip-rule="evenodd" | 1364 | clip-rule="evenodd" |
1323 | ></path> | 1365 | ></path> |
1324 | </svg> | 1366 | </svg> |
1325 | </div> | 1367 | </div> |
1326 | <div> | 1368 | <div> |
1327 | <p | 1369 | <p |
1328 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" | 1370 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" |
1329 | > | 1371 | > |
1330 | Account balance | 1372 | Account balance |
1331 | </p> | 1373 | </p> |
1332 | <p | 1374 | <p |
1333 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" | 1375 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" |
1334 | > | 1376 | > |
1335 | $ 46,760.89 | 1377 | $ 46,760.89 |
1336 | </p> | 1378 | </p> |
1337 | </div> | 1379 | </div> |
1338 | </div> | 1380 | </div> |
1339 | 1381 | ||
1340 | <div | 1382 | <div |
1341 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" | 1383 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" |
1342 | > | 1384 | > |
1343 | <div | 1385 | <div |
1344 | class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:text-blue-100 dark:bg-blue-500" | 1386 | class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:text-blue-100 dark:bg-blue-500" |
1345 | > | 1387 | > |
1346 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 1388 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
1347 | <path | 1389 | <path |
1348 | 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" | 1390 | 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" |
1349 | ></path> | 1391 | ></path> |
1350 | </svg> | 1392 | </svg> |
1351 | </div> | 1393 | </div> |
1352 | <div> | 1394 | <div> |
1353 | <p | 1395 | <p |
1354 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" | 1396 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" |
1355 | > | 1397 | > |
1356 | New sales | 1398 | New sales |
1357 | </p> | 1399 | </p> |
1358 | <p | 1400 | <p |
1359 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" | 1401 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" |
1360 | > | 1402 | > |
1361 | 376 | 1403 | 376 |
1362 | </p> | 1404 | </p> |
1363 | </div> | 1405 | </div> |
1364 | </div> | 1406 | </div> |
1365 | 1407 | ||
1366 | <div | 1408 | <div |
1367 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" | 1409 | class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" |
1368 | > | 1410 | > |
1369 | <div | 1411 | <div |
1370 | class="p-3 mr-4 text-teal-500 bg-teal-100 rounded-full dark:text-teal-100 dark:bg-teal-500" | 1412 | class="p-3 mr-4 text-teal-500 bg-teal-100 rounded-full dark:text-teal-100 dark:bg-teal-500" |
1371 | > | 1413 | > |
1372 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 1414 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
1373 | <path | 1415 | <path |
1374 | fill-rule="evenodd" | 1416 | fill-rule="evenodd" |
1375 | 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" | 1417 | 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" |
1376 | clip-rule="evenodd" | 1418 | clip-rule="evenodd" |
1377 | ></path> | 1419 | ></path> |
1378 | </svg> | 1420 | </svg> |
1379 | </div> | 1421 | </div> |
1380 | <div> | 1422 | <div> |
1381 | <p | 1423 | <p |
1382 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" | 1424 | class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400" |
1383 | > | 1425 | > |
1384 | Pending contacts | 1426 | Pending contacts |
1385 | </p> | 1427 | </p> |
1386 | <p | 1428 | <p |
1387 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" | 1429 | class="text-lg font-semibold text-gray-700 dark:text-gray-200" |
1388 | > | 1430 | > |
1389 | 35 | 1431 | 35 |
1390 | </p> | 1432 | </p> |
1391 | </div> | 1433 | </div> |
1392 | </div> | 1434 | </div> |
1393 | </div> | 1435 | </div> |
1394 | --> | 1436 | --> |
1395 | <!-- New Table | 1437 | <!-- New Table |
1396 | <div class="w-full overflow-hidden rounded-lg shadow-xs"> | 1438 | <div class="w-full overflow-hidden rounded-lg shadow-xs"> |
1397 | <div class="w-full overflow-x-auto"> | 1439 | <div class="w-full overflow-x-auto"> |
1398 | <table class="w-full whitespace-no-wrap"> | 1440 | <table class="w-full whitespace-no-wrap"> |
1399 | <thead> | 1441 | <thead> |
1400 | <tr | 1442 | <tr |
1401 | 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" | 1443 | 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" |
1402 | > | 1444 | > |
1403 | <th class="px-4 py-3">Client</th> | 1445 | <th class="px-4 py-3">Client</th> |
1404 | <th class="px-4 py-3">Amount</th> | 1446 | <th class="px-4 py-3">Amount</th> |
1405 | <th class="px-4 py-3">Status</th> | 1447 | <th class="px-4 py-3">Status</th> |
1406 | <th class="px-4 py-3">Date</th> | 1448 | <th class="px-4 py-3">Date</th> |
1407 | </tr> | 1449 | </tr> |
1408 | </thead> | 1450 | </thead> |
1409 | <tbody | 1451 | <tbody |
1410 | class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800" | 1452 | class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800" |
1411 | > | 1453 | > |
1412 | <tr class="text-gray-700 dark:text-gray-400"> | 1454 | <tr class="text-gray-700 dark:text-gray-400"> |
1413 | <td class="px-4 py-3"> | 1455 | <td class="px-4 py-3"> |
1414 | <div class="flex items-center text-sm"> | 1456 | <div class="flex items-center text-sm"> |
1415 | 1457 | ||
1416 | <div | 1458 | <div |
1417 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1459 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1418 | > | 1460 | > |
1419 | <img | 1461 | <img |
1420 | class="object-cover w-full h-full rounded-full" | 1462 | class="object-cover w-full h-full rounded-full" |
1421 | 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" | 1463 | 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" |
1422 | alt="" | 1464 | alt="" |
1423 | loading="lazy" | 1465 | loading="lazy" |
1424 | /> | 1466 | /> |
1425 | <div | 1467 | <div |
1426 | class="absolute inset-0 rounded-full shadow-inner" | 1468 | class="absolute inset-0 rounded-full shadow-inner" |
1427 | aria-hidden="true" | 1469 | aria-hidden="true" |
1428 | ></div> | 1470 | ></div> |
1429 | </div> | 1471 | </div> |
1430 | <div> | 1472 | <div> |
1431 | <p class="font-semibold">Hans Burger</p> | 1473 | <p class="font-semibold">Hans Burger</p> |
1432 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1474 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1433 | 10x Developer | 1475 | 10x Developer |
1434 | </p> | 1476 | </p> |
1435 | </div> | 1477 | </div> |
1436 | </div> | 1478 | </div> |
1437 | </td> | 1479 | </td> |
1438 | <td class="px-4 py-3 text-sm"> | 1480 | <td class="px-4 py-3 text-sm"> |
1439 | $ 863.45 | 1481 | $ 863.45 |
1440 | </td> | 1482 | </td> |
1441 | <td class="px-4 py-3 text-xs"> | 1483 | <td class="px-4 py-3 text-xs"> |
1442 | <span | 1484 | <span |
1443 | 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" | 1485 | 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" |
1444 | > | 1486 | > |
1445 | Approved | 1487 | Approved |
1446 | </span> | 1488 | </span> |
1447 | </td> | 1489 | </td> |
1448 | <td class="px-4 py-3 text-sm"> | 1490 | <td class="px-4 py-3 text-sm"> |
1449 | 6/10/2020 | 1491 | 6/10/2020 |
1450 | </td> | 1492 | </td> |
1451 | </tr> | 1493 | </tr> |
1452 | 1494 | ||
1453 | <tr class="text-gray-700 dark:text-gray-400"> | 1495 | <tr class="text-gray-700 dark:text-gray-400"> |
1454 | <td class="px-4 py-3"> | 1496 | <td class="px-4 py-3"> |
1455 | <div class="flex items-center text-sm"> | 1497 | <div class="flex items-center text-sm"> |
1456 | 1498 | ||
1457 | <div | 1499 | <div |
1458 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1500 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1459 | > | 1501 | > |
1460 | <img | 1502 | <img |
1461 | class="object-cover w-full h-full rounded-full" | 1503 | class="object-cover w-full h-full rounded-full" |
1462 | 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" | 1504 | 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" |
1463 | alt="" | 1505 | alt="" |
1464 | loading="lazy" | 1506 | loading="lazy" |
1465 | /> | 1507 | /> |
1466 | <div | 1508 | <div |
1467 | class="absolute inset-0 rounded-full shadow-inner" | 1509 | class="absolute inset-0 rounded-full shadow-inner" |
1468 | aria-hidden="true" | 1510 | aria-hidden="true" |
1469 | ></div> | 1511 | ></div> |
1470 | </div> | 1512 | </div> |
1471 | <div> | 1513 | <div> |
1472 | <p class="font-semibold">Jolina Angelie</p> | 1514 | <p class="font-semibold">Jolina Angelie</p> |
1473 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1515 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1474 | Unemployed | 1516 | Unemployed |
1475 | </p> | 1517 | </p> |
1476 | </div> | 1518 | </div> |
1477 | </div> | 1519 | </div> |
1478 | </td> | 1520 | </td> |
1479 | <td class="px-4 py-3 text-sm"> | 1521 | <td class="px-4 py-3 text-sm"> |
1480 | $ 369.95 | 1522 | $ 369.95 |
1481 | </td> | 1523 | </td> |
1482 | <td class="px-4 py-3 text-xs"> | 1524 | <td class="px-4 py-3 text-xs"> |
1483 | <span | 1525 | <span |
1484 | class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600" | 1526 | class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600" |
1485 | > | 1527 | > |
1486 | Pending | 1528 | Pending |
1487 | </span> | 1529 | </span> |
1488 | </td> | 1530 | </td> |
1489 | <td class="px-4 py-3 text-sm"> | 1531 | <td class="px-4 py-3 text-sm"> |
1490 | 6/10/2020 | 1532 | 6/10/2020 |
1491 | </td> | 1533 | </td> |
1492 | </tr> | 1534 | </tr> |
1493 | 1535 | ||
1494 | <tr class="text-gray-700 dark:text-gray-400"> | 1536 | <tr class="text-gray-700 dark:text-gray-400"> |
1495 | <td class="px-4 py-3"> | 1537 | <td class="px-4 py-3"> |
1496 | <div class="flex items-center text-sm"> | 1538 | <div class="flex items-center text-sm"> |
1497 | 1539 | ||
1498 | <div | 1540 | <div |
1499 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1541 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1500 | > | 1542 | > |
1501 | <img | 1543 | <img |
1502 | class="object-cover w-full h-full rounded-full" | 1544 | class="object-cover w-full h-full rounded-full" |
1503 | 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" | 1545 | 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" |
1504 | alt="" | 1546 | alt="" |
1505 | loading="lazy" | 1547 | loading="lazy" |
1506 | /> | 1548 | /> |
1507 | <div | 1549 | <div |
1508 | class="absolute inset-0 rounded-full shadow-inner" | 1550 | class="absolute inset-0 rounded-full shadow-inner" |
1509 | aria-hidden="true" | 1551 | aria-hidden="true" |
1510 | ></div> | 1552 | ></div> |
1511 | </div> | 1553 | </div> |
1512 | <div> | 1554 | <div> |
1513 | <p class="font-semibold">Sarah Curry</p> | 1555 | <p class="font-semibold">Sarah Curry</p> |
1514 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1556 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1515 | Designer | 1557 | Designer |
1516 | </p> | 1558 | </p> |
1517 | </div> | 1559 | </div> |
1518 | </div> | 1560 | </div> |
1519 | </td> | 1561 | </td> |
1520 | <td class="px-4 py-3 text-sm"> | 1562 | <td class="px-4 py-3 text-sm"> |
1521 | $ 86.00 | 1563 | $ 86.00 |
1522 | </td> | 1564 | </td> |
1523 | <td class="px-4 py-3 text-xs"> | 1565 | <td class="px-4 py-3 text-xs"> |
1524 | <span | 1566 | <span |
1525 | 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" | 1567 | 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" |
1526 | > | 1568 | > |
1527 | Denied | 1569 | Denied |
1528 | </span> | 1570 | </span> |
1529 | </td> | 1571 | </td> |
1530 | <td class="px-4 py-3 text-sm"> | 1572 | <td class="px-4 py-3 text-sm"> |
1531 | 6/10/2020 | 1573 | 6/10/2020 |
1532 | </td> | 1574 | </td> |
1533 | </tr> | 1575 | </tr> |
1534 | 1576 | ||
1535 | <tr class="text-gray-700 dark:text-gray-400"> | 1577 | <tr class="text-gray-700 dark:text-gray-400"> |
1536 | <td class="px-4 py-3"> | 1578 | <td class="px-4 py-3"> |
1537 | <div class="flex items-center text-sm"> | 1579 | <div class="flex items-center text-sm"> |
1538 | 1580 | ||
1539 | <div | 1581 | <div |
1540 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1582 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1541 | > | 1583 | > |
1542 | <img | 1584 | <img |
1543 | class="object-cover w-full h-full rounded-full" | 1585 | class="object-cover w-full h-full rounded-full" |
1544 | 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" | 1586 | 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" |
1545 | alt="" | 1587 | alt="" |
1546 | loading="lazy" | 1588 | loading="lazy" |
1547 | /> | 1589 | /> |
1548 | <div | 1590 | <div |
1549 | class="absolute inset-0 rounded-full shadow-inner" | 1591 | class="absolute inset-0 rounded-full shadow-inner" |
1550 | aria-hidden="true" | 1592 | aria-hidden="true" |
1551 | ></div> | 1593 | ></div> |
1552 | </div> | 1594 | </div> |
1553 | <div> | 1595 | <div> |
1554 | <p class="font-semibold">Rulia Joberts</p> | 1596 | <p class="font-semibold">Rulia Joberts</p> |
1555 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1597 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1556 | Actress | 1598 | Actress |
1557 | </p> | 1599 | </p> |
1558 | </div> | 1600 | </div> |
1559 | </div> | 1601 | </div> |
1560 | </td> | 1602 | </td> |
1561 | <td class="px-4 py-3 text-sm"> | 1603 | <td class="px-4 py-3 text-sm"> |
1562 | $ 1276.45 | 1604 | $ 1276.45 |
1563 | </td> | 1605 | </td> |
1564 | <td class="px-4 py-3 text-xs"> | 1606 | <td class="px-4 py-3 text-xs"> |
1565 | <span | 1607 | <span |
1566 | 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" | 1608 | 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" |
1567 | > | 1609 | > |
1568 | Approved | 1610 | Approved |
1569 | </span> | 1611 | </span> |
1570 | </td> | 1612 | </td> |
1571 | <td class="px-4 py-3 text-sm"> | 1613 | <td class="px-4 py-3 text-sm"> |
1572 | 6/10/2020 | 1614 | 6/10/2020 |
1573 | </td> | 1615 | </td> |
1574 | </tr> | 1616 | </tr> |
1575 | 1617 | ||
1576 | <tr class="text-gray-700 dark:text-gray-400"> | 1618 | <tr class="text-gray-700 dark:text-gray-400"> |
1577 | <td class="px-4 py-3"> | 1619 | <td class="px-4 py-3"> |
1578 | <div class="flex items-center text-sm"> | 1620 | <div class="flex items-center text-sm"> |
1579 | 1621 | ||
1580 | <div | 1622 | <div |
1581 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1623 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1582 | > | 1624 | > |
1583 | <img | 1625 | <img |
1584 | class="object-cover w-full h-full rounded-full" | 1626 | class="object-cover w-full h-full rounded-full" |
1585 | 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" | 1627 | 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" |
1586 | alt="" | 1628 | alt="" |
1587 | loading="lazy" | 1629 | loading="lazy" |
1588 | /> | 1630 | /> |
1589 | <div | 1631 | <div |
1590 | class="absolute inset-0 rounded-full shadow-inner" | 1632 | class="absolute inset-0 rounded-full shadow-inner" |
1591 | aria-hidden="true" | 1633 | aria-hidden="true" |
1592 | ></div> | 1634 | ></div> |
1593 | </div> | 1635 | </div> |
1594 | <div> | 1636 | <div> |
1595 | <p class="font-semibold">Wenzel Dashington</p> | 1637 | <p class="font-semibold">Wenzel Dashington</p> |
1596 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1638 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1597 | Actor | 1639 | Actor |
1598 | </p> | 1640 | </p> |
1599 | </div> | 1641 | </div> |
1600 | </div> | 1642 | </div> |
1601 | </td> | 1643 | </td> |
1602 | <td class="px-4 py-3 text-sm"> | 1644 | <td class="px-4 py-3 text-sm"> |
1603 | $ 863.45 | 1645 | $ 863.45 |
1604 | </td> | 1646 | </td> |
1605 | <td class="px-4 py-3 text-xs"> | 1647 | <td class="px-4 py-3 text-xs"> |
1606 | <span | 1648 | <span |
1607 | 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" | 1649 | 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" |
1608 | > | 1650 | > |
1609 | Expired | 1651 | Expired |
1610 | </span> | 1652 | </span> |
1611 | </td> | 1653 | </td> |
1612 | <td class="px-4 py-3 text-sm"> | 1654 | <td class="px-4 py-3 text-sm"> |
1613 | 6/10/2020 | 1655 | 6/10/2020 |
1614 | </td> | 1656 | </td> |
1615 | </tr> | 1657 | </tr> |
1616 | 1658 | ||
1617 | <tr class="text-gray-700 dark:text-gray-400"> | 1659 | <tr class="text-gray-700 dark:text-gray-400"> |
1618 | <td class="px-4 py-3"> | 1660 | <td class="px-4 py-3"> |
1619 | <div class="flex items-center text-sm"> | 1661 | <div class="flex items-center text-sm"> |
1620 | 1662 | ||
1621 | <div | 1663 | <div |
1622 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1664 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1623 | > | 1665 | > |
1624 | <img | 1666 | <img |
1625 | class="object-cover w-full h-full rounded-full" | 1667 | class="object-cover w-full h-full rounded-full" |
1626 | 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" | 1668 | 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" |
1627 | alt="" | 1669 | alt="" |
1628 | loading="lazy" | 1670 | loading="lazy" |
1629 | /> | 1671 | /> |
1630 | <div | 1672 | <div |
1631 | class="absolute inset-0 rounded-full shadow-inner" | 1673 | class="absolute inset-0 rounded-full shadow-inner" |
1632 | aria-hidden="true" | 1674 | aria-hidden="true" |
1633 | ></div> | 1675 | ></div> |
1634 | </div> | 1676 | </div> |
1635 | <div> | 1677 | <div> |
1636 | <p class="font-semibold">Dave Li</p> | 1678 | <p class="font-semibold">Dave Li</p> |
1637 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1679 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1638 | Influencer | 1680 | Influencer |
1639 | </p> | 1681 | </p> |
1640 | </div> | 1682 | </div> |
1641 | </div> | 1683 | </div> |
1642 | </td> | 1684 | </td> |
1643 | <td class="px-4 py-3 text-sm"> | 1685 | <td class="px-4 py-3 text-sm"> |
1644 | $ 863.45 | 1686 | $ 863.45 |
1645 | </td> | 1687 | </td> |
1646 | <td class="px-4 py-3 text-xs"> | 1688 | <td class="px-4 py-3 text-xs"> |
1647 | <span | 1689 | <span |
1648 | 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" | 1690 | 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" |
1649 | > | 1691 | > |
1650 | Approved | 1692 | Approved |
1651 | </span> | 1693 | </span> |
1652 | </td> | 1694 | </td> |
1653 | <td class="px-4 py-3 text-sm"> | 1695 | <td class="px-4 py-3 text-sm"> |
1654 | 6/10/2020 | 1696 | 6/10/2020 |
1655 | </td> | 1697 | </td> |
1656 | </tr> | 1698 | </tr> |
1657 | 1699 | ||
1658 | <tr class="text-gray-700 dark:text-gray-400"> | 1700 | <tr class="text-gray-700 dark:text-gray-400"> |
1659 | <td class="px-4 py-3"> | 1701 | <td class="px-4 py-3"> |
1660 | <div class="flex items-center text-sm"> | 1702 | <div class="flex items-center text-sm"> |
1661 | 1703 | ||
1662 | <div | 1704 | <div |
1663 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1705 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1664 | > | 1706 | > |
1665 | <img | 1707 | <img |
1666 | class="object-cover w-full h-full rounded-full" | 1708 | class="object-cover w-full h-full rounded-full" |
1667 | 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" | 1709 | 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" |
1668 | alt="" | 1710 | alt="" |
1669 | loading="lazy" | 1711 | loading="lazy" |
1670 | /> | 1712 | /> |
1671 | <div | 1713 | <div |
1672 | class="absolute inset-0 rounded-full shadow-inner" | 1714 | class="absolute inset-0 rounded-full shadow-inner" |
1673 | aria-hidden="true" | 1715 | aria-hidden="true" |
1674 | ></div> | 1716 | ></div> |
1675 | </div> | 1717 | </div> |
1676 | <div> | 1718 | <div> |
1677 | <p class="font-semibold">Maria Ramovic</p> | 1719 | <p class="font-semibold">Maria Ramovic</p> |
1678 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1720 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1679 | Runner | 1721 | Runner |
1680 | </p> | 1722 | </p> |
1681 | </div> | 1723 | </div> |
1682 | </div> | 1724 | </div> |
1683 | </td> | 1725 | </td> |
1684 | <td class="px-4 py-3 text-sm"> | 1726 | <td class="px-4 py-3 text-sm"> |
1685 | $ 863.45 | 1727 | $ 863.45 |
1686 | </td> | 1728 | </td> |
1687 | <td class="px-4 py-3 text-xs"> | 1729 | <td class="px-4 py-3 text-xs"> |
1688 | <span | 1730 | <span |
1689 | 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" | 1731 | 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" |
1690 | > | 1732 | > |
1691 | Approved | 1733 | Approved |
1692 | </span> | 1734 | </span> |
1693 | </td> | 1735 | </td> |
1694 | <td class="px-4 py-3 text-sm"> | 1736 | <td class="px-4 py-3 text-sm"> |
1695 | 6/10/2020 | 1737 | 6/10/2020 |
1696 | </td> | 1738 | </td> |
1697 | </tr> | 1739 | </tr> |
1698 | 1740 | ||
1699 | <tr class="text-gray-700 dark:text-gray-400"> | 1741 | <tr class="text-gray-700 dark:text-gray-400"> |
1700 | <td class="px-4 py-3"> | 1742 | <td class="px-4 py-3"> |
1701 | <div class="flex items-center text-sm"> | 1743 | <div class="flex items-center text-sm"> |
1702 | 1744 | ||
1703 | <div | 1745 | <div |
1704 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1746 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1705 | > | 1747 | > |
1706 | <img | 1748 | <img |
1707 | class="object-cover w-full h-full rounded-full" | 1749 | class="object-cover w-full h-full rounded-full" |
1708 | 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" | 1750 | 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" |
1709 | alt="" | 1751 | alt="" |
1710 | loading="lazy" | 1752 | loading="lazy" |
1711 | /> | 1753 | /> |
1712 | <div | 1754 | <div |
1713 | class="absolute inset-0 rounded-full shadow-inner" | 1755 | class="absolute inset-0 rounded-full shadow-inner" |
1714 | aria-hidden="true" | 1756 | aria-hidden="true" |
1715 | ></div> | 1757 | ></div> |
1716 | </div> | 1758 | </div> |
1717 | <div> | 1759 | <div> |
1718 | <p class="font-semibold">Hitney Wouston</p> | 1760 | <p class="font-semibold">Hitney Wouston</p> |
1719 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1761 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1720 | Singer | 1762 | Singer |
1721 | </p> | 1763 | </p> |
1722 | </div> | 1764 | </div> |
1723 | </div> | 1765 | </div> |
1724 | </td> | 1766 | </td> |
1725 | <td class="px-4 py-3 text-sm"> | 1767 | <td class="px-4 py-3 text-sm"> |
1726 | $ 863.45 | 1768 | $ 863.45 |
1727 | </td> | 1769 | </td> |
1728 | <td class="px-4 py-3 text-xs"> | 1770 | <td class="px-4 py-3 text-xs"> |
1729 | <span | 1771 | <span |
1730 | 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" | 1772 | 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" |
1731 | > | 1773 | > |
1732 | Approved | 1774 | Approved |
1733 | </span> | 1775 | </span> |
1734 | </td> | 1776 | </td> |
1735 | <td class="px-4 py-3 text-sm"> | 1777 | <td class="px-4 py-3 text-sm"> |
1736 | 6/10/2020 | 1778 | 6/10/2020 |
1737 | </td> | 1779 | </td> |
1738 | </tr> | 1780 | </tr> |
1739 | 1781 | ||
1740 | <tr class="text-gray-700 dark:text-gray-400"> | 1782 | <tr class="text-gray-700 dark:text-gray-400"> |
1741 | <td class="px-4 py-3"> | 1783 | <td class="px-4 py-3"> |
1742 | <div class="flex items-center text-sm"> | 1784 | <div class="flex items-center text-sm"> |
1743 | 1785 | ||
1744 | <div | 1786 | <div |
1745 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 1787 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
1746 | > | 1788 | > |
1747 | <img | 1789 | <img |
1748 | class="object-cover w-full h-full rounded-full" | 1790 | class="object-cover w-full h-full rounded-full" |
1749 | 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" | 1791 | 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" |
1750 | alt="" | 1792 | alt="" |
1751 | loading="lazy" | 1793 | loading="lazy" |
1752 | /> | 1794 | /> |
1753 | <div | 1795 | <div |
1754 | class="absolute inset-0 rounded-full shadow-inner" | 1796 | class="absolute inset-0 rounded-full shadow-inner" |
1755 | aria-hidden="true" | 1797 | aria-hidden="true" |
1756 | ></div> | 1798 | ></div> |
1757 | </div> | 1799 | </div> |
1758 | <div> | 1800 | <div> |
1759 | <p class="font-semibold">Hans Burger</p> | 1801 | <p class="font-semibold">Hans Burger</p> |
1760 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 1802 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
1761 | 10x Developer | 1803 | 10x Developer |
1762 | </p> | 1804 | </p> |
1763 | </div> | 1805 | </div> |
1764 | </div> | 1806 | </div> |
1765 | </td> | 1807 | </td> |
1766 | <td class="px-4 py-3 text-sm"> | 1808 | <td class="px-4 py-3 text-sm"> |
1767 | $ 863.45 | 1809 | $ 863.45 |
1768 | </td> | 1810 | </td> |
1769 | <td class="px-4 py-3 text-xs"> | 1811 | <td class="px-4 py-3 text-xs"> |
1770 | <span | 1812 | <span |
1771 | 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" | 1813 | 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" |
1772 | > | 1814 | > |
1773 | Approved | 1815 | Approved |
1774 | </span> | 1816 | </span> |
1775 | </td> | 1817 | </td> |
1776 | <td class="px-4 py-3 text-sm"> | 1818 | <td class="px-4 py-3 text-sm"> |
1777 | 6/10/2020 | 1819 | 6/10/2020 |
1778 | </td> | 1820 | </td> |
1779 | </tr> | 1821 | </tr> |
1780 | </tbody> | 1822 | </tbody> |
1781 | </table> | 1823 | </table> |
1782 | </div> | 1824 | </div> |
1783 | <div | 1825 | <div |
1784 | 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" | 1826 | 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" |
1785 | > | 1827 | > |
1786 | <span class="flex items-center col-span-3"> | 1828 | <span class="flex items-center col-span-3"> |
1787 | Showing 21-30 of 100 | 1829 | Showing 21-30 of 100 |
1788 | </span> | 1830 | </span> |
1789 | <span class="col-span-2"></span> | 1831 | <span class="col-span-2"></span> |
1790 | 1832 | ||
1791 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 1833 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
1792 | <nav aria-label="Table navigation"> | 1834 | <nav aria-label="Table navigation"> |
1793 | <ul class="inline-flex items-center"> | 1835 | <ul class="inline-flex items-center"> |
1794 | <li> | 1836 | <li> |
1795 | <button | 1837 | <button |
1796 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 1838 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
1797 | aria-label="Previous" | 1839 | aria-label="Previous" |
1798 | > | 1840 | > |
1799 | <svg | 1841 | <svg |
1800 | aria-hidden="true" | 1842 | aria-hidden="true" |
1801 | class="w-4 h-4 fill-current" | 1843 | class="w-4 h-4 fill-current" |
1802 | viewBox="0 0 20 20" | 1844 | viewBox="0 0 20 20" |
1803 | > | 1845 | > |
1804 | <path | 1846 | <path |
1805 | 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" | 1847 | 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" |
1806 | clip-rule="evenodd" | 1848 | clip-rule="evenodd" |
1807 | fill-rule="evenodd" | 1849 | fill-rule="evenodd" |
1808 | ></path> | 1850 | ></path> |
1809 | </svg> | 1851 | </svg> |
1810 | </button> | 1852 | </button> |
1811 | </li> | 1853 | </li> |
1812 | <li> | 1854 | <li> |
1813 | <button | 1855 | <button |
1814 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 1856 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
1815 | > | 1857 | > |
1816 | 1 | 1858 | 1 |
1817 | </button> | 1859 | </button> |
1818 | </li> | 1860 | </li> |
1819 | <li> | 1861 | <li> |
1820 | <button | 1862 | <button |
1821 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 1863 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
1822 | > | 1864 | > |
1823 | 2 | 1865 | 2 |
1824 | </button> | 1866 | </button> |
1825 | </li> | 1867 | </li> |
1826 | <li> | 1868 | <li> |
1827 | <button | 1869 | <button |
1828 | 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" | 1870 | 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" |
1829 | > | 1871 | > |
1830 | 3 | 1872 | 3 |
1831 | </button> | 1873 | </button> |
1832 | </li> | 1874 | </li> |
1833 | <li> | 1875 | <li> |
1834 | <button | 1876 | <button |
1835 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 1877 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
1836 | > | 1878 | > |
1837 | 4 | 1879 | 4 |
1838 | </button> | 1880 | </button> |
1839 | </li> | 1881 | </li> |
1840 | <li> | 1882 | <li> |
1841 | <span class="px-3 py-1">...</span> | 1883 | <span class="px-3 py-1">...</span> |
1842 | </li> | 1884 | </li> |
1843 | <li> | 1885 | <li> |
1844 | <button | 1886 | <button |
1845 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 1887 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
1846 | > | 1888 | > |
1847 | 8 | 1889 | 8 |
1848 | </button> | 1890 | </button> |
1849 | </li> | 1891 | </li> |
1850 | <li> | 1892 | <li> |
1851 | <button | 1893 | <button |
1852 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 1894 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
1853 | > | 1895 | > |
1854 | 9 | 1896 | 9 |
1855 | </button> | 1897 | </button> |
1856 | </li> | 1898 | </li> |
1857 | <li> | 1899 | <li> |
1858 | <button | 1900 | <button |
1859 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 1901 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
1860 | aria-label="Next" | 1902 | aria-label="Next" |
1861 | > | 1903 | > |
1862 | <svg | 1904 | <svg |
1863 | class="w-4 h-4 fill-current" | 1905 | class="w-4 h-4 fill-current" |
1864 | aria-hidden="true" | 1906 | aria-hidden="true" |
1865 | viewBox="0 0 20 20" | 1907 | viewBox="0 0 20 20" |
1866 | > | 1908 | > |
1867 | <path | 1909 | <path |
1868 | 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" | 1910 | 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" |
1869 | clip-rule="evenodd" | 1911 | clip-rule="evenodd" |
1870 | fill-rule="evenodd" | 1912 | fill-rule="evenodd" |
1871 | ></path> | 1913 | ></path> |
1872 | </svg> | 1914 | </svg> |
1873 | </button> | 1915 | </button> |
1874 | </li> | 1916 | </li> |
1875 | </ul> | 1917 | </ul> |
1876 | </nav> | 1918 | </nav> |
1877 | </span> | 1919 | </span> |
1878 | </div> | 1920 | </div> |
1879 | </div> | 1921 | </div> |
1880 | --> | 1922 | --> |
1881 | <!-- Charts --> | 1923 | <!-- Charts --> |
1882 | <!-- | 1924 | <!-- |
1883 | <h2 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"> | 1925 | <h2 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"> |
1884 | Графики | 1926 | Графики |
1885 | </h2> | 1927 | </h2> |
1886 | <div class="grid gap-6 mb-8 md:grid-cols-2"> | 1928 | <div class="grid gap-6 mb-8 md:grid-cols-2"> |
1887 | <div | 1929 | <div |
1888 | class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" | 1930 | class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" |
1889 | > | 1931 | > |
1890 | <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300"> | 1932 | <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300"> |
1891 | Revenue | 1933 | Revenue |
1892 | </h4> | 1934 | </h4> |
1893 | <canvas id="pie"></canvas> | 1935 | <canvas id="pie"></canvas> |
1894 | <div | 1936 | <div |
1895 | class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400" | 1937 | class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400" |
1896 | > | 1938 | > |
1897 | 1939 | ||
1898 | <div class="flex items-center"> | 1940 | <div class="flex items-center"> |
1899 | <span | 1941 | <span |
1900 | class="inline-block w-3 h-3 mr-1 bg-blue-500 rounded-full" | 1942 | class="inline-block w-3 h-3 mr-1 bg-blue-500 rounded-full" |
1901 | ></span> | 1943 | ></span> |
1902 | <span>Shirts</span> | 1944 | <span>Shirts</span> |
1903 | </div> | 1945 | </div> |
1904 | <div class="flex items-center"> | 1946 | <div class="flex items-center"> |
1905 | <span | 1947 | <span |
1906 | class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full" | 1948 | class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full" |
1907 | ></span> | 1949 | ></span> |
1908 | <span>Shoes</span> | 1950 | <span>Shoes</span> |
1909 | </div> | 1951 | </div> |
1910 | <div class="flex items-center"> | 1952 | <div class="flex items-center"> |
1911 | <span | 1953 | <span |
1912 | class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full" | 1954 | class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full" |
1913 | ></span> | 1955 | ></span> |
1914 | <span>Bags</span> | 1956 | <span>Bags</span> |
1915 | </div> | 1957 | </div> |
1916 | </div> | 1958 | </div> |
1917 | </div> | 1959 | </div> |
1918 | <div | 1960 | <div |
1919 | class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" | 1961 | class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800" |
1920 | > | 1962 | > |
1921 | <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300"> | 1963 | <h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300"> |
1922 | Traffic | 1964 | Traffic |
1923 | </h4> | 1965 | </h4> |
1924 | <canvas id="line"></canvas> | 1966 | <canvas id="line"></canvas> |
1925 | <div | 1967 | <div |
1926 | class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400" | 1968 | class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400" |
1927 | > | 1969 | > |
1928 | 1970 | ||
1929 | <div class="flex items-center"> | 1971 | <div class="flex items-center"> |
1930 | <span | 1972 | <span |
1931 | class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full" | 1973 | class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full" |
1932 | ></span> | 1974 | ></span> |
1933 | <span>Organic</span> | 1975 | <span>Organic</span> |
1934 | </div> | 1976 | </div> |
1935 | <div class="flex items-center"> | 1977 | <div class="flex items-center"> |
1936 | <span | 1978 | <span |
1937 | class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full" | 1979 | class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full" |
1938 | ></span> | 1980 | ></span> |
1939 | <span>Paid</span> | 1981 | <span>Paid</span> |
1940 | </div> | 1982 | </div> |
1941 | </div> | 1983 | </div> |
1942 | </div> | 1984 | </div> |
1943 | </div> | 1985 | </div> |
1944 | --> | 1986 | --> |
1945 | </div> | 1987 | </div> |
1946 | </main> | 1988 | </main> |
1947 | </div> | 1989 | </div> |
1948 | </div> | 1990 | </div> |
1949 | @yield('modal') | 1991 | @yield('modal') |
1950 | </body> | 1992 | </body> |
1951 | @yield('script') | 1993 | @yield('script') |
1952 | </html> | 1994 | </html> |
1953 | 1995 |
routes/web.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use App\Http\Controllers\AdEmployerController; | 3 | use App\Http\Controllers\AdEmployerController; |
4 | use App\Http\Controllers\Admin\AdminController; | 4 | use App\Http\Controllers\Admin\AdminController; |
5 | use App\Http\Controllers\Admin\CategoryController; | 5 | use App\Http\Controllers\Admin\CategoryController; |
6 | use App\Http\Controllers\Admin\CategoryEmpController; | 6 | use App\Http\Controllers\Admin\CategoryEmpController; |
7 | use App\Http\Controllers\Admin\EducationController; | 7 | use App\Http\Controllers\Admin\EducationController; |
8 | use App\Http\Controllers\Admin\EmployersController; | 8 | use App\Http\Controllers\Admin\EmployersController; |
9 | use App\Http\Controllers\Admin\InfoBloksController; | 9 | use App\Http\Controllers\Admin\InfoBloksController; |
10 | use App\Http\Controllers\Admin\JobTitlesController; | 10 | use App\Http\Controllers\Admin\JobTitlesController; |
11 | use App\Http\Controllers\Admin\UsersController; | 11 | use App\Http\Controllers\Admin\UsersController; |
12 | use App\Http\Controllers\Admin\WorkersController; | 12 | use App\Http\Controllers\Admin\WorkersController; |
13 | use App\Http\Controllers\Auth\ForgotPasswordController; | 13 | use App\Http\Controllers\Auth\ForgotPasswordController; |
14 | use App\Http\Controllers\Auth\LoginController; | 14 | use App\Http\Controllers\Auth\LoginController; |
15 | use App\Http\Controllers\Auth\RegisterController; | 15 | use App\Http\Controllers\Auth\RegisterController; |
16 | use App\Http\Controllers\CKEditorController; | 16 | use App\Http\Controllers\CKEditorController; |
17 | use App\Http\Controllers\MediaController; | ||
17 | use App\Http\Controllers\WorkerController; | 18 | use App\Http\Controllers\WorkerController; |
18 | use App\Models\User; | 19 | use App\Models\User; |
19 | use App\Http\Controllers\MainController; | 20 | use App\Http\Controllers\MainController; |
20 | use App\Http\Controllers\HomeController; | 21 | use App\Http\Controllers\HomeController; |
21 | use Illuminate\Support\Facades\Route; | 22 | use Illuminate\Support\Facades\Route; |
22 | use App\Http\Controllers\Admin\CompanyController; | 23 | use App\Http\Controllers\Admin\CompanyController; |
23 | use App\Http\Controllers\Admin\Ad_EmployersController; | 24 | use App\Http\Controllers\Admin\Ad_EmployersController; |
24 | use App\Http\Controllers\Admin\MsgAnswersController; | 25 | use App\Http\Controllers\Admin\MsgAnswersController; |
25 | use App\Http\Controllers\Admin\GroupsController; | 26 | use App\Http\Controllers\Admin\GroupsController; |
26 | use App\Http\Controllers\PagesController; | 27 | use App\Http\Controllers\PagesController; |
27 | use Illuminate\Support\Facades\Storage; | 28 | use Illuminate\Support\Facades\Storage; |
28 | 29 | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | |-------------------------------------------------------------------------- | 32 | |-------------------------------------------------------------------------- |
32 | | Web Routes | 33 | | Web Routes |
33 | |-------------------------------------------------------------------------- | 34 | |-------------------------------------------------------------------------- |
34 | | | 35 | | |
35 | | Here is where you can register web routes for your application. These | 36 | | Here is where you can register web routes for your application. These |
36 | | routes are loaded by the RouteServiceProvider within a group which | 37 | | routes are loaded by the RouteServiceProvider within a group which |
37 | | contains the "web" middleware group. Now create something great! | 38 | | contains the "web" middleware group. Now create something great! |
38 | | | 39 | | |
39 | */ | 40 | */ |
40 | /* | 41 | /* |
41 | Route::get('/', function () { | 42 | Route::get('/', function () { |
42 | return view('welcome'); | 43 | return view('welcome'); |
43 | })->name('index'); | 44 | })->name('index'); |
44 | */ | 45 | */ |
45 | Route::get('/', [MainController::class, 'index'])->name('index'); | 46 | Route::get('/', [MainController::class, 'index'])->name('index'); |
46 | 47 | ||
47 | //Роуты авторизации, регистрации, восстановления, аутентификации | 48 | //Роуты авторизации, регистрации, восстановления, аутентификации |
48 | Auth::routes(['verify' => true]); | 49 | Auth::routes(['verify' => true]); |
49 | 50 | ||
50 | // роуты регистрации, авторизации, восстановления пароля, верификации почты | 51 | // роуты регистрации, авторизации, восстановления пароля, верификации почты |
51 | /*Route::group([ | 52 | /*Route::group([ |
52 | 'as' => 'auth.', //имя маршрута, например auth.index | 53 | 'as' => 'auth.', //имя маршрута, например auth.index |
53 | 'prefix' => 'auth', // префикс маршрута, например, auth/index | 54 | 'prefix' => 'auth', // префикс маршрута, например, auth/index |
54 | ], function () { | 55 | ], function () { |
55 | //форма регистрации | 56 | //форма регистрации |
56 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 57 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
57 | 58 | ||
58 | //создание пользователя | 59 | //создание пользователя |
59 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 60 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
60 | 61 | ||
61 | //форма входа авторизации | 62 | //форма входа авторизации |
62 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 63 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
63 | 64 | ||
64 | //аутентификация | 65 | //аутентификация |
65 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); | 66 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); |
66 | 67 | ||
67 | //выход | 68 | //выход |
68 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 69 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
69 | 70 | ||
70 | //форма ввода адреса почты | 71 | //форма ввода адреса почты |
71 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); | 72 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); |
72 | 73 | ||
73 | //письмо на почту | 74 | //письмо на почту |
74 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); | 75 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); |
75 | 76 | ||
76 | //форма восстановления пароля | 77 | //форма восстановления пароля |
77 | Route::get('reset-password/token/{token}/email/{email}', | 78 | Route::get('reset-password/token/{token}/email/{email}', |
78 | [ResetPasswordController::class, 'form'] | 79 | [ResetPasswordController::class, 'form'] |
79 | )->name('reset-form'); | 80 | )->name('reset-form'); |
80 | 81 | ||
81 | //восстановление пароля | 82 | //восстановление пароля |
82 | Route::post('reset-password', | 83 | Route::post('reset-password', |
83 | [ResetPasswordController::class, 'reset'] | 84 | [ResetPasswordController::class, 'reset'] |
84 | )->name('reset-password'); | 85 | )->name('reset-password'); |
85 | 86 | ||
86 | //сообщение о необходимости проверки адреса почты | 87 | //сообщение о необходимости проверки адреса почты |
87 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); | 88 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); |
88 | 89 | ||
89 | //подтверждение адреса почты нового пользователя | 90 | //подтверждение адреса почты нового пользователя |
90 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) | 91 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) |
91 | ->where('token', '[a-f0-9]{32}') | 92 | ->where('token', '[a-f0-9]{32}') |
92 | ->where('id', '[0-9]+') | 93 | ->where('id', '[0-9]+') |
93 | ->name('verify-email'); | 94 | ->name('verify-email'); |
94 | });*/ | 95 | });*/ |
95 | 96 | ||
96 | //Личный кабинет пользователя | 97 | //Личный кабинет пользователя |
97 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 98 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
98 | 99 | ||
99 | /* | 100 | /* |
100 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 101 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
101 | $user = User::where('email',$request->input('email'))->first(); | 102 | $user = User::where('email',$request->input('email'))->first(); |
102 | 103 | ||
103 | $user->sendEmailVerificationNotification(); | 104 | $user->sendEmailVerificationNotification(); |
104 | 105 | ||
105 | return 'your response'; | 106 | return 'your response'; |
106 | })->middleware('throttle:6,1')->name('verification.resend'); | 107 | })->middleware('throttle:6,1')->name('verification.resend'); |
107 | */ | 108 | */ |
108 | 109 | ||
109 | // Авторизация, регистрация в админку | 110 | // Авторизация, регистрация в админку |
110 | Route::group([ | 111 | Route::group([ |
111 | 'as' => 'admin.', // имя маршрута, например auth.index | 112 | 'as' => 'admin.', // имя маршрута, например auth.index |
112 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 113 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
113 | 'middleware' => ['guest'], | 114 | 'middleware' => ['guest'], |
114 | ], function () { | 115 | ], function () { |
115 | // Форма регистрации | 116 | // Форма регистрации |
116 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 117 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
117 | |||
118 | // Создание пользователя | 118 | // Создание пользователя |
119 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 119 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
120 | |||
120 | //Форма входа | 121 | //Форма входа |
121 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 122 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
122 | 123 | ||
123 | // аутентификация | 124 | // аутентификация |
124 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 125 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
125 | 126 | ||
126 | }); | 127 | }); |
127 | 128 | ||
128 | // Личный кабинет админки | 129 | // Личный кабинет админки |
129 | Route::group([ | 130 | Route::group([ |
130 | 'as' => 'admin.', // имя маршрута, например auth.index | 131 | 'as' => 'admin.', // имя маршрута, например auth.index |
131 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 132 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
132 | 'middleware' => ['auth'], ['admin'], | 133 | 'middleware' => ['auth'], ['admin'], |
133 | ], function() { | 134 | ], function() { |
134 | 135 | ||
135 | // выход | 136 | // выход |
136 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 137 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
137 | 138 | ||
138 | // кабинет главная страница | 139 | // кабинет главная страница |
139 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 140 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
140 | 141 | ||
141 | // кабинет профиль админа - форма | 142 | // кабинет профиль админа - форма |
142 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 143 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
143 | // кабинет профиль админа - сохранение формы | 144 | // кабинет профиль админа - сохранение формы |
144 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 145 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
145 | 146 | ||
146 | //кабинет сообщения админа | 147 | //кабинет сообщения админа |
147 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); | 148 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); |
148 | 149 | ||
149 | 150 | ||
150 | // кабинет профиль - форма пароли | 151 | // кабинет профиль - форма пароли |
151 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 152 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
152 | // кабинет профиль - сохранение формы пароля | 153 | // кабинет профиль - сохранение формы пароля |
153 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 154 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
154 | 155 | ||
155 | 156 | ||
156 | // кабинет профиль пользователя - форма | 157 | // кабинет профиль пользователя - форма |
157 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 158 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
158 | // кабинет профиль пользователя - сохранение формы | 159 | // кабинет профиль пользователя - сохранение формы |
159 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 160 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
160 | 161 | ||
161 | // кабинет профиль работодатель - форма | 162 | // кабинет профиль работодатель - форма |
162 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 163 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
163 | // кабинет профиль работодатель - сохранение формы | 164 | // кабинет профиль работодатель - сохранение формы |
164 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 165 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
165 | // кабинет удаление профиль работодателя и юзера | 166 | // кабинет удаление профиль работодателя и юзера |
166 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); | 167 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); |
167 | 168 | ||
168 | // кабинет профиль работник - форма | 169 | // кабинет профиль работник - форма |
169 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); | 170 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); |
170 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); | 171 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); |
171 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); | 172 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); |
172 | // кабинет профиль работник - сохранение формы | 173 | // кабинет профиль работник - сохранение формы |
173 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); | 174 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); |
174 | 175 | ||
176 | // Медиа | ||
177 | Route::get('media', [MediaController::class, 'index'])->name('media'); | ||
178 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); | ||
175 | 179 | ||
176 | // кабинет настройки сайта - форма | 180 | // кабинет настройки сайта - форма |
177 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 181 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
178 | // кабинет настройки сайта сохранение формы | 182 | // кабинет настройки сайта сохранение формы |
179 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 183 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
180 | 184 | ||
181 | // кабинет - пользователи | 185 | // кабинет - пользователи |
182 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 186 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
183 | 187 | ||
184 | // кабинет - пользователи | 188 | // кабинет - пользователи |
185 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 189 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
186 | 190 | ||
187 | // кабинет - работодатели | 191 | // кабинет - работодатели |
188 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 192 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
189 | 193 | ||
190 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); | 194 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); |
191 | 195 | ||
192 | // кабинет - соискатели | 196 | // кабинет - соискатели |
193 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 197 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
194 | 198 | ||
195 | // кабинет - база данных | 199 | // кабинет - база данных |
196 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); | 200 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); |
197 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); | 201 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); |
198 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); | 202 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); |
199 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); | 203 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); |
200 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); | 204 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); |
201 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); | 205 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); |
202 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); | 206 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); |
203 | 207 | ||
204 | // кабинет - вакансии | 208 | // кабинет - вакансии |
205 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 209 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
210 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); | ||
211 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); | ||
206 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); | 212 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); |
207 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); | 213 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); |
214 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); | ||
208 | 215 | ||
209 | // кабинет - категории | 216 | // кабинет - категории |
210 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 217 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
211 | /* | 218 | /* |
212 | * CRUD-операции над Справочником Категории | 219 | * CRUD-операции над Справочником Категории |
213 | */ | 220 | */ |
214 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 221 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
215 | 222 | ||
216 | // CRUD-операции над справочником Категории для работодателей | 223 | // CRUD-операции над справочником Категории для работодателей |
217 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); | 224 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); |
218 | 225 | ||
219 | // CRUD-операции над справочником Образование | 226 | // CRUD-операции над справочником Образование |
220 | Route::resource('education', EducationController::class, ['except' => ['show']]); | 227 | Route::resource('education', EducationController::class, ['except' => ['show']]); |
221 | 228 | ||
222 | Route::get('program-education/{education}/{level}', [EducationController::class, 'add_program'])->name('add-program-education'); | 229 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); |
223 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); | 230 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); |
231 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); | ||
224 | 232 | ||
225 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 233 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
226 | /* | 234 | /* |
227 | * кабинет - CRUD-операции по справочнику должности | 235 | * кабинет - CRUD-операции по справочнику должности |
228 | * | 236 | * |
229 | */ | 237 | */ |
230 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 238 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
231 | 239 | ||
232 | // кабинет - сообщения (чтение чужих) | 240 | // кабинет - сообщения (чтение чужих) |
233 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 241 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
234 | // кабинет - просмотр сообщения чужого (чтение) | 242 | // кабинет - просмотр сообщения чужого (чтение) |
235 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); | 243 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); |
236 | 244 | ||
237 | // кабинет - сообщения (админские) | 245 | // кабинет - сообщения (админские) |
238 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); | 246 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); |
239 | // кабинет - сообщения (админские) | 247 | // кабинет - сообщения (админские) |
240 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); | 248 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); |
241 | // кабинет - sql - конструкция запросов | 249 | // кабинет - sql - конструкция запросов |
242 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); | 250 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); |
243 | 251 | ||
244 | /* | 252 | /* |
245 | * Расписанный подход в описании каждой директорий групп пользователей. | 253 | * Расписанный подход в описании каждой директорий групп пользователей. |
246 | */ | 254 | */ |
247 | // кабинет - группы пользователей | 255 | // кабинет - группы пользователей |
248 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 256 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
249 | // кабинет - добавление форма группы пользователей | 257 | // кабинет - добавление форма группы пользователей |
250 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 258 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
251 | // кабинет - сохранение формы группы пользователей | 259 | // кабинет - сохранение формы группы пользователей |
252 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 260 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
253 | // кабинет - редактирование форма группы пользователей | 261 | // кабинет - редактирование форма группы пользователей |
254 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 262 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
255 | // кабинет - сохранение редактированной формы группы пользователей | 263 | // кабинет - сохранение редактированной формы группы пользователей |
256 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 264 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
257 | // кабинет - удаление группы пользователей | 265 | // кабинет - удаление группы пользователей |
258 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 266 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
259 | 267 | ||
260 | 268 | ||
261 | // кабинет - список админов | 269 | // кабинет - список админов |
262 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 270 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
263 | 271 | ||
264 | 272 | ||
265 | /////редактор////// кабинет - редактор сайта//////////////////////// | 273 | /////редактор////// кабинет - редактор сайта//////////////////////// |
266 | Route::get('editor-site', function() { | 274 | Route::get('editor-site', function() { |
267 | return view('admin.editor.index'); | 275 | return view('admin.editor.index'); |
268 | })->name('editor-site'); | 276 | })->name('editor-site'); |
269 | 277 | ||
270 | 278 | ||
271 | // кабинет - редактор шапки-футера сайта | 279 | // кабинет - редактор шапки-футера сайта |
272 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 280 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
273 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); | 281 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); |
274 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); | 282 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); |
275 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); | 283 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); |
276 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); | 284 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); |
277 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); | 285 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); |
278 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); | 286 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); |
279 | 287 | ||
280 | 288 | ||
281 | // кабинет - редактор должности на главной | 289 | // кабинет - редактор должности на главной |
282 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 290 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
283 | 291 | ||
284 | // кабинет - редактор работодатели на главной | 292 | // кабинет - редактор работодатели на главной |
285 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 293 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
286 | 294 | ||
287 | 295 | ||
288 | // кабинет - редактор seo-сайта | 296 | // кабинет - редактор seo-сайта |
289 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 297 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
290 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); | 298 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); |
291 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); | 299 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); |
292 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); | 300 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); |
293 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); | 301 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); |
294 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); | 302 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); |
295 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); | 303 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); |
296 | 304 | ||
297 | 305 | ||
298 | // кабинет - редактор страниц | 306 | // кабинет - редактор страниц |
299 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 307 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
300 | // кабинет - добавление страницы | 308 | // кабинет - добавление страницы |
301 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | 309 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); |
302 | // кабинет - сохранение формы страницы | 310 | // кабинет - сохранение формы страницы |
303 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | 311 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); |
304 | // кабинет - редактирование форма страницы | 312 | // кабинет - редактирование форма страницы |
305 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | 313 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); |
306 | // кабинет - сохранение редактированной формы страницы | 314 | // кабинет - сохранение редактированной формы страницы |
307 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | 315 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); |
308 | // кабинет - удаление страницы | 316 | // кабинет - удаление страницы |
309 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | 317 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); |
310 | 318 | ||
311 | 319 | ||
312 | // кабинет - реклама сайта | 320 | // кабинет - реклама сайта |
313 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 321 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
314 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); | 322 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); |
315 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); | 323 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); |
316 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); | 324 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); |
317 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); | 325 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); |
318 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); | 326 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); |
319 | //////////////////////////////////////////////////////////////////////// | 327 | //////////////////////////////////////////////////////////////////////// |
320 | 328 | ||
321 | 329 | ||
322 | // кабинет - отзывы о работодателе для модерации | 330 | // кабинет - отзывы о работодателе для модерации |
323 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 331 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
324 | 332 | ||
325 | // Общая страница статистики | 333 | // Общая страница статистики |
326 | Route::get('statics', function () { | 334 | Route::get('statics', function () { |
327 | return view('admin.static.index'); | 335 | return view('admin.static.index'); |
328 | })->name('statics'); | 336 | })->name('statics'); |
329 | 337 | ||
330 | // кабинет - статистика работников | 338 | // кабинет - статистика работников |
331 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 339 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
332 | 340 | ||
333 | // кабинет - статистика вакансий работодателя | 341 | // кабинет - статистика вакансий работодателя |
334 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 342 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
335 | 343 | ||
336 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 344 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
337 | /* | 345 | /* |
338 | * CRUD-операции над справочником дипломы и документы | 346 | * CRUD-операции над справочником дипломы и документы |
339 | */ | 347 | */ |
340 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 348 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
341 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 349 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
342 | 350 | ||
343 | // кабинет - роли пользователя | 351 | // кабинет - роли пользователя |
344 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 352 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
345 | 353 | ||
346 | Route::get('logs', function() { | 354 | Route::get('logs', function() { |
347 | $files = Storage::files('logs/laravel.log'); | 355 | $files = Storage::files('logs/laravel.log'); |
348 | print_r($files); | 356 | print_r($files); |
349 | })->name('logs'); | 357 | })->name('logs'); |
350 | 358 | ||
351 | }); | 359 | }); |
352 | 360 | ||
353 | // Инструментальные страницы | 361 | // Инструментальные страницы |
354 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); | 362 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); |
355 | 363 | ||
356 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); | 364 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); |
357 | 365 | ||
358 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); | 366 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); |
359 | 367 | ||
360 | // Страницы с произвольным контентом | 368 | // Страницы с произвольным контентом |
361 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); | 369 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); |
362 | 370 | ||
363 | // Публичные страницы соискателя | 371 | // Публичные страницы соискателя |
364 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); | 372 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); |
365 | 373 | ||
366 | //Страница вакансии | 374 | //Страница вакансии |
367 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); | 375 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); |