Commit 50aa60b60198862c3ce6c7c326505854a695f38c
1 parent
7c268179ef
Exists in
master
and in
1 other branch
Работодатели лого, комментарий
Showing 5 changed files with 48 additions and 4 deletions Inline Diff
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.*'])->join('employers as emp','emp.user_id','users.id') | 28 | $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.*'])->join('employers as emp','emp.user_id','users.id') |
29 | ->where('users.is_worker', '0')->Realuser(); | 29 | ->where('users.is_worker', '0')->Realuser(); |
30 | $all_employer = $users->count(); | 30 | $all_employer = $users->count(); |
31 | 31 | ||
32 | $find_cat = ""; | 32 | $find_cat = ""; |
33 | if (isset($request->category)) { | 33 | if (isset($request->category)) { |
34 | if ($request->category != 'Все категории') { | 34 | if ($request->category != 'Все категории') { |
35 | $users = $users->where('category', '=', $request->category); | 35 | $users = $users->where('category', '=', $request->category); |
36 | $find_cat = $request->category; | 36 | $find_cat = $request->category; |
37 | } | 37 | } |
38 | } | 38 | } |
39 | $find_key = ""; | 39 | $find_key = ""; |
40 | 40 | ||
41 | if (isset($request->find)) { | 41 | if (isset($request->find)) { |
42 | $find_key = $request->find; | 42 | $find_key = $request->find; |
43 | $users = $users->where(function($query) use($find_key) { | 43 | $users = $users->where(function($query) use($find_key) { |
44 | $query->Where('users.name', 'LIKE', "%$find_key%") | 44 | $query->Where('users.name', 'LIKE', "%$find_key%") |
45 | ->orWhere('emp.email', 'LIKE', "%$find_key%") | 45 | ->orWhere('emp.email', 'LIKE', "%$find_key%") |
46 | ->orWhere('emp.telephone', 'LIKE', "%$find_key%"); | 46 | ->orWhere('emp.telephone', 'LIKE', "%$find_key%"); |
47 | }); | 47 | }); |
48 | } | 48 | } |
49 | 49 | ||
50 | //DB::enableQueryLog(); | 50 | //DB::enableQueryLog(); |
51 | $users = $users->paginate(15); | 51 | $users = $users->paginate(15); |
52 | //dd(DB::getQueryLog()); | 52 | //dd(DB::getQueryLog()); |
53 | 53 | ||
54 | $select_category = CategoryEmp::query()->active()->get(); | 54 | $select_category = CategoryEmp::query()->active()->get(); |
55 | 55 | ||
56 | if ($request->ajax()) { | 56 | if ($request->ajax()) { |
57 | return view('admin.employer.index_ajax', compact('users')); | 57 | return view('admin.employer.index_ajax', compact('users')); |
58 | } else { | 58 | } else { |
59 | return view('admin.employer.index', compact('users', 'find_key', 'find_cat', 'all_employer', 'select_category')); | 59 | return view('admin.employer.index', compact('users', 'find_key', 'find_cat', 'all_employer', 'select_category')); |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | public function comment_read(Employer $employer) { | ||
64 | return view('admin.employer.comment', compact('employer')); | ||
65 | } | ||
66 | |||
63 | public function form_update_employer(Employer $employer) { | 67 | public function form_update_employer(Employer $employer) { |
64 | $select_category = CategoryEmp::query()->active()->get(); | 68 | $select_category = CategoryEmp::query()->active()->get(); |
65 | return view('admin.employer.edit', compact('employer', 'select_category')); | 69 | return view('admin.employer.edit', compact('employer', 'select_category')); |
66 | } | 70 | } |
67 | 71 | ||
68 | public function update_employer(Employer $employer, Request $request) | 72 | public function update_employer(Employer $employer, Request $request) |
69 | { | 73 | { |
70 | $params = $request->all(); | 74 | $params = $request->all(); |
71 | unset($params['logo']); | 75 | unset($params['logo']); |
72 | unset($params['telephone']); | 76 | unset($params['telephone']); |
73 | unset($params['email']); | 77 | unset($params['email']); |
74 | unset($params['address']); | 78 | unset($params['address']); |
75 | unset($params['site']); | 79 | unset($params['site']); |
76 | unset($params['status_hidden']); | 80 | unset($params['status_hidden']); |
77 | unset($params['oficial_status']); | 81 | unset($params['oficial_status']); |
78 | unset($params['social_is']); | 82 | unset($params['social_is']); |
79 | unset($params['sending_is']); | 83 | unset($params['sending_is']); |
80 | unset($params['category']); | 84 | unset($params['category']); |
81 | unset($params['comment_admin']); | 85 | unset($params['comment_admin']); |
82 | 86 | ||
83 | $rules = [ | 87 | $rules = [ |
84 | 'name' => 'required|string|max:255', | 88 | 'name' => 'required|string|max:255', |
85 | ]; | 89 | ]; |
86 | 90 | ||
87 | $messages = [ | 91 | $messages = [ |
88 | 'required' => 'Укажите обязательное поле «:attribute»', | 92 | 'required' => 'Укажите обязательное поле «:attribute»', |
89 | 'confirmed' => 'Пароли не совпадают', | 93 | 'confirmed' => 'Пароли не совпадают', |
90 | 'email' => 'Введите корректный email', | 94 | 'email' => 'Введите корректный email', |
91 | 'min' => [ | 95 | 'min' => [ |
92 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 96 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
93 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 97 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
94 | ], | 98 | ], |
95 | 'max' => [ | 99 | 'max' => [ |
96 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 100 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
97 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 101 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
98 | ], | 102 | ], |
99 | ]; | 103 | ]; |
100 | 104 | ||
101 | $validator = Validator::make($params, $rules, $messages); | 105 | $validator = Validator::make($params, $rules, $messages); |
102 | 106 | ||
103 | if ($validator->fails()) { | 107 | if ($validator->fails()) { |
104 | return back()->withErrors($validator)->withInput(); //->route('admin.register') | 108 | return back()->withErrors($validator)->withInput(); //->route('admin.register') |
105 | 109 | ||
106 | } else { | 110 | } else { |
107 | 111 | ||
108 | //$user = User::find($employer->user_id); | 112 | //$user = User::find($employer->user_id); |
109 | $user_id = $employer->user_id; | 113 | $user_id = $employer->user_id; |
110 | $employer->telephone = $request->telephone; | 114 | $employer->telephone = $request->telephone; |
111 | $employer->email = $request->email; | 115 | $employer->email = $request->email; |
112 | $employer->address = $request->address; | 116 | $employer->address = $request->address; |
113 | $employer->site = $request->site; | 117 | $employer->site = $request->site; |
114 | $employer->text = $request->text; | 118 | $employer->text = $request->text; |
115 | $employer->status_hidden = $request->status_hidden; | 119 | $employer->status_hidden = $request->status_hidden; |
116 | $employer->oficial_status = $request->oficial_status; | 120 | $employer->oficial_status = $request->oficial_status; |
117 | $employer->social_is = $request->social_is; | 121 | $employer->social_is = $request->social_is; |
118 | $employer->sending_is = $request->sending_is; | 122 | $employer->sending_is = $request->sending_is; |
119 | $employer->category = $request->category; | 123 | $employer->category = $request->category; |
120 | $employer->comment_admin = $request->comment_admin; | 124 | $employer->comment_admin = $request->comment_admin; |
121 | 125 | ||
122 | if ($request->has('logo')) { | 126 | if ($request->has('logo')) { |
123 | if (!empty($employer->logo)) { | 127 | if (!empty($employer->logo)) { |
124 | Storage::delete($employer->logo); | 128 | Storage::delete($employer->logo); |
125 | } | 129 | } |
126 | $employer->logo = $request->file('logo')->store("employer/$user_id", 'public'); | 130 | $employer->logo = $request->file('logo')->store("employer/$user_id", 'public'); |
127 | } | 131 | } |
128 | $employer->save(); | 132 | $employer->save(); |
129 | 133 | ||
130 | $user = User::find($user_id); | 134 | $user = User::find($user_id); |
131 | $user->update($params); | 135 | $user->update($params); |
132 | 136 | ||
133 | return redirect()->route('admin.employer-profile', ['employer' => $employer->id]) | 137 | return redirect()->route('admin.employer-profile', ['employer' => $employer->id]) |
134 | ->with('success', 'Данные были успешно сохранены'); | 138 | ->with('success', 'Данные были успешно сохранены'); |
135 | } | 139 | } |
136 | } | 140 | } |
137 | 141 | ||
138 | // Удаление работодателя, вакансий и профиля юзера | 142 | // Удаление работодателя, вакансий и профиля юзера |
139 | public function delete_employer(Employer $employer, User $user) { | 143 | public function delete_employer(Employer $employer, User $user) { |
140 | try { | 144 | try { |
141 | if (!empty($employer)) { | 145 | if (!empty($employer)) { |
142 | $employer->ads()->delete(); | 146 | $employer->ads()->delete(); |
143 | if (!empty($employer->logo)) { | 147 | if (!empty($employer->logo)) { |
144 | Storage::delete($employer->logo); | 148 | Storage::delete($employer->logo); |
145 | } | 149 | } |
146 | $employer->delete(); | 150 | $employer->delete(); |
147 | } | 151 | } |
148 | } finally { | 152 | } finally { |
149 | $user->delete(); | 153 | $user->delete(); |
150 | } | 154 | } |
151 | 155 | ||
152 | return redirect()->route('admin.employers')->with('success', 'Данные были удалены о работодателе'); | 156 | return redirect()->route('admin.employers')->with('success', 'Данные были удалены о работодателе'); |
153 | } | 157 | } |
154 | 158 | ||
155 | // кабинет - отзывы о работодателе для модерации | 159 | // кабинет - отзывы о работодателе для модерации |
156 | public function answers(Request $request) { | 160 | public function answers(Request $request) { |
157 | if ($request->ajax()) { | 161 | if ($request->ajax()) { |
158 | $user = Answer::find($request->id); | 162 | $user = Answer::find($request->id); |
159 | $request->offsetUnset('id'); | 163 | $request->offsetUnset('id'); |
160 | $user->update($request->all()); | 164 | $user->update($request->all()); |
161 | } | 165 | } |
162 | 166 | ||
163 | $answers = Answer::query()->orderByDesc('id')->paginate(15); | 167 | $answers = Answer::query()->orderByDesc('id')->paginate(15); |
164 | 168 | ||
165 | if ($request->ajax()) { | 169 | if ($request->ajax()) { |
166 | return view('admin.answers.index_ajax', compact('answers')); | 170 | return view('admin.answers.index_ajax', compact('answers')); |
167 | } else { | 171 | } else { |
168 | return view('admin.answers.index', compact('answers')); | 172 | return view('admin.answers.index', compact('answers')); |
169 | } | 173 | } |
170 | } | 174 | } |
171 | 175 | ||
172 | // кабинет - статистика вакансий работодателя | 176 | // кабинет - статистика вакансий работодателя |
173 | public function static_ads(Request $request) { | 177 | public function static_ads(Request $request) { |
174 | $stat = Static_ad::with('ads'); | 178 | $stat = Static_ad::with('ads'); |
175 | $ads = Ad_employer::query()->active()->OrderBy('id')->get(); | 179 | $ads = Ad_employer::query()->active()->OrderBy('id')->get(); |
176 | $periods = Static_ad::query()->distinct('year_month')->select('year_month')->get(); | 180 | $periods = Static_ad::query()->distinct('year_month')->select('year_month')->get(); |
177 | if ($request->ajax()) { | 181 | if ($request->ajax()) { |
178 | if (isset($request->ad_employer_id)) | 182 | if (isset($request->ad_employer_id)) |
179 | if (!$request->ad_employer_id == "0") | 183 | if (!$request->ad_employer_id == "0") |
180 | $stat = $stat->Where('ad_employer_id', '=', $request->ad_employer_id); | 184 | $stat = $stat->Where('ad_employer_id', '=', $request->ad_employer_id); |
181 | if (isset($request->year_month)) { | 185 | if (isset($request->year_month)) { |
182 | if (!$request->year_month == "0") | 186 | if (!$request->year_month == "0") |
183 | $stat = $stat->Where('year_month', '=', $request->year_month); | 187 | $stat = $stat->Where('year_month', '=', $request->year_month); |
184 | } | 188 | } |
185 | } | 189 | } |
186 | 190 | ||
187 | $stat = $stat->OrderByDesc('year_month'); | 191 | $stat = $stat->OrderByDesc('year_month'); |
188 | $stat = $stat->paginate(15); | 192 | $stat = $stat->paginate(15); |
189 | 193 | ||
190 | if ($request->ajax()) | 194 | if ($request->ajax()) |
191 | return view('admin.static.index_ads_ajax', compact('stat')); | 195 | return view('admin.static.index_ads_ajax', compact('stat')); |
192 | else | 196 | else |
193 | return view('admin.static.index_ads', compact('stat', 'ads', 'periods')); | 197 | return view('admin.static.index_ads', compact('stat', 'ads', 'periods')); |
194 | 198 | ||
195 | } | 199 | } |
196 | 200 | ||
197 | 201 | ||
198 | } | 202 | } |
199 | 203 |
resources/views/admin/employer/comment.blade.php
File was created | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование работодателя']) | |
2 | |||
3 | @section('content') | ||
4 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | ||
5 | Работодатель-пользователь: "{{$employer->users->name_man}} ({{$employer->user_id}})" | ||
6 | </h4> | ||
7 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | ||
8 | <label class="block mt-4 text-sm"> | ||
9 | <span class="text-gray-700 dark:text-gray-400">Комментарий админа</span> | ||
10 | <textarea name="comment_admin" id="comment_admin" | ||
11 | 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" | ||
12 | rows="3" | ||
13 | placeholder="Комментарий админа" | ||
14 | >{{ $employer->comment_admin }}</textarea> | ||
15 | </label> | ||
16 | |||
17 | <br> | ||
18 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | ||
19 | <div> | ||
20 | |||
21 | <a href="{{ route('admin.employers') }}" | ||
22 | 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" | ||
23 | style="display: -webkit-inline-box; height: 30px!important;" | ||
24 | >Назад</a> | ||
25 | |||
26 | </div> | ||
27 | </div> | ||
28 | </div> | ||
29 | @endsection | ||
30 |
resources/views/admin/employer/edit.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Редактирование работодателя']) | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование работодателя']) |
2 | 2 | ||
3 | @section('content') | 3 | @section('content') |
4 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | 4 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> |
5 | Работодатель-пользователь: "{{$employer->users->name_man}} ({{$employer->user_id}})" | 5 | Работодатель-пользователь: "{{$employer->users->name_man}} ({{$employer->user_id}})" |
6 | </h4> | 6 | </h4> |
7 | <form method="POST" action="" enctype="multipart/form-data"> | 7 | <form method="POST" action="" enctype="multipart/form-data"> |
8 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 8 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
9 | @csrf | 9 | @csrf |
10 | <div class="tabs"> | 10 | <div class="tabs"> |
11 | <input type="radio" name="tab-btn" id="tab-btn-1" value="" checked> | 11 | <input type="radio" name="tab-btn" id="tab-btn-1" value="" checked> |
12 | <label for="tab-btn-1">Персональная информация</label> | 12 | <label for="tab-btn-1">Персональная информация</label> |
13 | <input type="radio" name="tab-btn" id="tab-btn-2" value=""> | 13 | <input type="radio" name="tab-btn" id="tab-btn-2" value=""> |
14 | <label for="tab-btn-2">Настройки</label> | 14 | <label for="tab-btn-2">Настройки</label> |
15 | <!--<input type="radio" name="tab-btn" id="tab-btn-3" value=""> | 15 | <!--<input type="radio" name="tab-btn" id="tab-btn-3" value=""> |
16 | <label for="tab-btn-3">Вкладка 3</label>--> | 16 | <label for="tab-btn-3">Вкладка 3</label>--> |
17 | <div id="content-1"> | 17 | <div id="content-1"> |
18 | 18 | ||
19 | <label class="block text-sm"> | 19 | <label class="block text-sm"> |
20 | <span class="text-gray-700 dark:text-gray-400">Имя компании</span> | 20 | <span class="text-gray-700 dark:text-gray-400">Имя компании</span> |
21 | <input name="name" id="name" | 21 | <input name="name" id="name" |
22 | 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" | 22 | 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" |
23 | placeholder="Имя компании" value="{{ old('name') ?? $employer->users->name ?? '' }}" | 23 | placeholder="Имя компании" value="{{ old('name') ?? $employer->users->name ?? '' }}" |
24 | /> | 24 | /> |
25 | @error('name') | 25 | @error('name') |
26 | <span class="text-xs text-red-600 dark:text-red-400"> | 26 | <span class="text-xs text-red-600 dark:text-red-400"> |
27 | {{ $message }} | 27 | {{ $message }} |
28 | </span> | 28 | </span> |
29 | @enderror | 29 | @enderror |
30 | </label><br> | 30 | </label><br> |
31 | 31 | ||
32 | <label class="block text-sm"> | 32 | <label class="block text-sm"> |
33 | <span class="text-gray-700 dark:text-gray-400">Email</span> | 33 | <span class="text-gray-700 dark:text-gray-400">Email</span> |
34 | <input name="email" id="email" disabled | 34 | <input name="email" id="email" |
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" | 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" |
36 | placeholder="Почта" value="{{ old('email') ?? $employer->email ?? '' }}" | 36 | placeholder="Почта" value="{{ old('email') ?? $employer->email ?? '' }}" |
37 | /> | 37 | /> |
38 | @error('email') | 38 | @error('email') |
39 | <span class="text-xs text-red-600 dark:text-red-400"> | 39 | <span class="text-xs text-red-600 dark:text-red-400"> |
40 | {{ $message }} | 40 | {{ $message }} |
41 | </span> | 41 | </span> |
42 | @enderror | 42 | @enderror |
43 | </label><br> | 43 | </label><br> |
44 | 44 | ||
45 | <label class="block text-sm"> | 45 | <label class="block text-sm"> |
46 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> | 46 | <span class="text-gray-700 dark:text-gray-400">Телефон</span> |
47 | <input name="telephone" id="telephone" | 47 | <input name="telephone" id="telephone" |
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" | 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" |
49 | placeholder="Телефон" value="{{ old('telephone') ?? $employer->telephone ?? '' }}" | 49 | placeholder="Телефон" value="{{ old('telephone') ?? $employer->telephone ?? '' }}" |
50 | /> | 50 | /> |
51 | @error('telephone') | 51 | @error('telephone') |
52 | <span class="text-xs text-red-600 dark:text-red-400"> | 52 | <span class="text-xs text-red-600 dark:text-red-400"> |
53 | {{ $message }} | 53 | {{ $message }} |
54 | </span> | 54 | </span> |
55 | @enderror | 55 | @enderror |
56 | </label><br> | 56 | </label><br> |
57 | 57 | ||
58 | <label class="block text-sm"> | 58 | <label class="block text-sm"> |
59 | <span class="text-gray-700 dark:text-gray-400">Адрес</span> | 59 | <span class="text-gray-700 dark:text-gray-400">Адрес</span> |
60 | <input name="address" id="address" | 60 | <input name="address" id="address" |
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" | 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" |
62 | placeholder="Адрес" value="{{ old('address') ?? $employer->address ?? '' }}" | 62 | placeholder="Адрес" value="{{ old('address') ?? $employer->address ?? '' }}" |
63 | /> | 63 | /> |
64 | @error('address') | 64 | @error('address') |
65 | <span class="text-xs text-red-600 dark:text-red-400"> | 65 | <span class="text-xs text-red-600 dark:text-red-400"> |
66 | {{ $message }} | 66 | {{ $message }} |
67 | </span> | 67 | </span> |
68 | @enderror | 68 | @enderror |
69 | </label><br> | 69 | </label><br> |
70 | 70 | ||
71 | <label class="block text-sm"> | 71 | <label class="block text-sm"> |
72 | <span class="text-gray-700 dark:text-gray-400">Сайт</span> | 72 | <span class="text-gray-700 dark:text-gray-400">Сайт</span> |
73 | <input name="site" id="site" | 73 | <input name="site" id="site" |
74 | 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" | 74 | 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" |
75 | placeholder="Сайт" value="{{ old('site') ?? $employer->site ?? '' }}" | 75 | placeholder="Сайт" value="{{ old('site') ?? $employer->site ?? '' }}" |
76 | /> | 76 | /> |
77 | @error('site') | 77 | @error('site') |
78 | <span class="text-xs text-red-600 dark:text-red-400"> | 78 | <span class="text-xs text-red-600 dark:text-red-400"> |
79 | {{ $message }} | 79 | {{ $message }} |
80 | </span> | 80 | </span> |
81 | @enderror | 81 | @enderror |
82 | </label><br> | 82 | </label><br> |
83 | 83 | ||
84 | <label class="block text-sm"> | 84 | <label class="block text-sm"> |
85 | <span class="text-gray-700 dark:text-gray-400">Лого</span> | 85 | <span class="text-gray-700 dark:text-gray-400">Лого</span> |
86 | 86 | ||
87 | <input name="logo" id="logo" type="file" | 87 | <input name="logo" id="logo" type="file" |
88 | 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" | 88 | 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" |
89 | placeholder="Лого" value="" | 89 | placeholder="Лого" value="" |
90 | /> | 90 | /> |
91 | @isset($employer->logo) | 91 | @isset($employer->logo) |
92 | <img src="<?=asset(Storage::url($employer->logo))?>" width="150"/> | 92 | <img src="<?=asset(Storage::url($employer->logo))?>" width="150"/> |
93 | @endisset | 93 | @endisset |
94 | @error('logo') | 94 | @error('logo') |
95 | <span class="text-xs text-red-600 dark:text-red-400"> | 95 | <span class="text-xs text-red-600 dark:text-red-400"> |
96 | {{ $message }} | 96 | {{ $message }} |
97 | </span> | 97 | </span> |
98 | @enderror | 98 | @enderror |
99 | </label><br> | 99 | </label><br> |
100 | 100 | ||
101 | <label class="block mt-4 text-sm"> | 101 | <label class="block mt-4 text-sm"> |
102 | <span class="text-gray-700 dark:text-gray-400">Описание</span> | 102 | <span class="text-gray-700 dark:text-gray-400">Описание</span> |
103 | <textarea name="text" id="text" | 103 | <textarea name="text" id="text" |
104 | 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" | 104 | 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" |
105 | rows="3" | 105 | rows="3" |
106 | placeholder="Описание компании" | 106 | placeholder="Описание компании" |
107 | >{{ old('text') ?? $employer->text ?? '' }}</textarea> | 107 | >{{ old('text') ?? $employer->text ?? '' }}</textarea> |
108 | </label> | 108 | </label> |
109 | 109 | ||
110 | <hr> | 110 | <hr> |
111 | 111 | ||
112 | <label class="block mt-4 text-sm"> | 112 | <label class="block mt-4 text-sm"> |
113 | <span class="text-gray-700 dark:text-gray-400">Категории</span> | 113 | <span class="text-gray-700 dark:text-gray-400">Категории</span> |
114 | 114 | ||
115 | <select name="category" id="category" class="form-control"> | 115 | <select name="category" id="category" class="form-control"> |
116 | @foreach($select_category as $cat) | 116 | @foreach($select_category as $cat) |
117 | <option value="{{ $cat->name }}" | 117 | <option value="{{ $cat->name }}" |
118 | @isset($employer) | 118 | @isset($employer) |
119 | @if($cat->name == $employer->category) | 119 | @if($cat->name == $employer->category) |
120 | selected | 120 | selected |
121 | @endif | 121 | @endif |
122 | @endisset | 122 | @endisset |
123 | >{{ $cat->name }}</option> | 123 | >{{ $cat->name }}</option> |
124 | @endforeach | 124 | @endforeach |
125 | </select> | 125 | </select> |
126 | 126 | ||
127 | @error('category') | 127 | @error('category') |
128 | <div class="alert alert-danger">{{ $message }}</div> | 128 | <div class="alert alert-danger">{{ $message }}</div> |
129 | @enderror | 129 | @enderror |
130 | </label> | 130 | </label> |
131 | 131 | ||
132 | <label class="block mt-4 text-sm"> | 132 | <label class="block mt-4 text-sm"> |
133 | <span class="text-gray-700 dark:text-gray-400">Комментарий админа</span> | 133 | <span class="text-gray-700 dark:text-gray-400">Комментарий админа</span> |
134 | <textarea name="comment_admin" id="comment_admin" | 134 | <textarea name="comment_admin" id="comment_admin" |
135 | 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" | 135 | 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" |
136 | rows="3" | 136 | rows="3" |
137 | placeholder="Комментарий админа" | 137 | placeholder="Комментарий админа" |
138 | >{{ old('comment_admin') ?? $employer->comment_admin ?? '' }}</textarea> | 138 | >{{ old('comment_admin') ?? $employer->comment_admin ?? '' }}</textarea> |
139 | </label> | 139 | </label> |
140 | 140 | ||
141 | </div> | 141 | </div> |
142 | <div id="content-2"> | 142 | <div id="content-2"> |
143 | <label class="block text-sm"> | 143 | <label class="block text-sm"> |
144 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | 144 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> |
145 | Права работодателя: | 145 | Права работодателя: |
146 | </h4> | 146 | </h4> |
147 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Просмотр базы резюме </p> | 147 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Просмотр базы резюме </p> |
148 | <input type="hidden" name="is_lookin" value="0" /> | 148 | <input type="hidden" name="is_lookin" value="0" /> |
149 | <input name="is_lookin" <? if ($employer->users->is_lookin) echo "checked";?> | 149 | <input name="is_lookin" <? if ($employer->users->is_lookin) echo "checked";?> |
150 | 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 " | 150 | 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 " |
151 | placeholder="" type="checkbox" value="1" | 151 | placeholder="" type="checkbox" value="1" |
152 | /><br> | 152 | /><br> |
153 | 153 | ||
154 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Отправка сообщений</p> | 154 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Отправка сообщений</p> |
155 | <input type="hidden" name="is_message" value="0" /> | 155 | <input type="hidden" name="is_message" value="0" /> |
156 | <input name="is_message" id="is_message" <? if ($employer->users->is_message) echo "checked";?> | 156 | <input name="is_message" id="is_message" <? if ($employer->users->is_message) echo "checked";?> |
157 | 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 " | 157 | 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 " |
158 | placeholder="" type="checkbox" value="1" | 158 | placeholder="" type="checkbox" value="1" |
159 | /><br> | 159 | /><br> |
160 | 160 | ||
161 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Публикация вакансий</p> | 161 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Публикация вакансий</p> |
162 | <input type="hidden" name="is_public" value="0" /> | 162 | <input type="hidden" name="is_public" value="0" /> |
163 | <input name="is_public" id="is_public" <? if ($employer->users->is_public) echo "checked";?> | 163 | <input name="is_public" id="is_public" <? if ($employer->users->is_public) echo "checked";?> |
164 | 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 " | 164 | 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 " |
165 | placeholder="" type="checkbox" value="1" | 165 | placeholder="" type="checkbox" value="1" |
166 | /><br> | 166 | /><br> |
167 | 167 | ||
168 | </label> | 168 | </label> |
169 | 169 | ||
170 | <label class="block text-sm"> | 170 | <label class="block text-sm"> |
171 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Работодатель скрыт </p> | 171 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Работодатель скрыт </p> |
172 | <input type="hidden" name="status_hidden" value="0" /> | 172 | <input type="hidden" name="status_hidden" value="0" /> |
173 | <input name="status_hidden" <? if ($employer->status_hidden) echo "checked";?> | 173 | <input name="status_hidden" <? if ($employer->status_hidden) echo "checked";?> |
174 | 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 " | 174 | 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 " |
175 | placeholder="" type="checkbox" value="1" | 175 | placeholder="" type="checkbox" value="1" |
176 | /> | 176 | /> |
177 | </label><br> | 177 | </label><br> |
178 | 178 | ||
179 | <label class="block text-sm"> | 179 | <label class="block text-sm"> |
180 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Компания подтверждена </p> | 180 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Компания подтверждена </p> |
181 | <input type="hidden" name="oficial_status" value="0" /> | 181 | <input type="hidden" name="oficial_status" value="0" /> |
182 | <input name="oficial_status" <? if ($employer->oficial_status) echo "checked";?> | 182 | <input name="oficial_status" <? if ($employer->oficial_status) echo "checked";?> |
183 | 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 " | 183 | 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 " |
184 | placeholder="" type="checkbox" value="1" | 184 | placeholder="" type="checkbox" value="1" |
185 | /> | 185 | /> |
186 | </label><br> | 186 | </label><br> |
187 | 187 | ||
188 | <label class="block text-sm"> | 188 | <label class="block text-sm"> |
189 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Разрешение публикации в соц.сетях </p> | 189 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Разрешение публикации в соц.сетях </p> |
190 | <input type="hidden" name="social_is" value="0" /> | 190 | <input type="hidden" name="social_is" value="0" /> |
191 | <input name="social_is" <? if ($employer->social_is) echo "checked";?> | 191 | <input name="social_is" <? if ($employer->social_is) echo "checked";?> |
192 | 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 " | 192 | 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 " |
193 | placeholder="" type="checkbox" value="1" | 193 | placeholder="" type="checkbox" value="1" |
194 | /> | 194 | /> |
195 | </label><br> | 195 | </label><br> |
196 | 196 | ||
197 | <label class="block text-sm"> | 197 | <label class="block text-sm"> |
198 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Рассылка </p> | 198 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Рассылка </p> |
199 | <input type="hidden" name="sending_is" value="0" /> | 199 | <input type="hidden" name="sending_is" value="0" /> |
200 | <input name="sending_is" <? if ($employer->sending_is) echo "checked";?> | 200 | <input name="sending_is" <? if ($employer->sending_is) echo "checked";?> |
201 | 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 " | 201 | 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 " |
202 | placeholder="" type="checkbox" value="1" | 202 | placeholder="" type="checkbox" value="1" |
203 | /> | 203 | /> |
204 | </label><br> | 204 | </label><br> |
205 | 205 | ||
206 | </div> | 206 | </div> |
207 | <div id="content-3"> | 207 | <div id="content-3"> |
208 | Содержимое 3... | 208 | Содержимое 3... |
209 | </div> | 209 | </div> |
210 | </div> | 210 | </div> |
211 | <br> | 211 | <br> |
212 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 212 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
213 | <div> | 213 | <div> |
214 | <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"> | 214 | <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"> |
215 | Сохранить | 215 | Сохранить |
216 | </button> | 216 | </button> |
217 | <a href="{{ route('admin.employers') }}" | 217 | <a href="{{ route('admin.employers') }}" |
218 | 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" | 218 | 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" |
219 | style="display: -webkit-inline-box; height: 30px!important;" | 219 | style="display: -webkit-inline-box; height: 30px!important;" |
220 | >Назад</a> | 220 | >Назад</a> |
221 | 221 | ||
222 | </div> | 222 | </div> |
223 | <!--<div> | 223 | <!--<div> |
224 | <a href="">Флот</a> | 224 | <a href="">Флот</a> |
225 | </div> | 225 | </div> |
226 | <div> | 226 | <div> |
227 | <a href="">Вакансии</a> | 227 | <a href="">Вакансии</a> |
228 | </div> | 228 | </div> |
229 | <div> | 229 | <div> |
230 | <a href="">Контакты</a> | 230 | <a href="">Контакты</a> |
231 | </div>--> | 231 | </div>--> |
232 | </div> | 232 | </div> |
233 | </div> | 233 | </div> |
234 | </form> | 234 | </form> |
235 | <!-- | 235 | <!-- |
236 | <label class="block mt-4 text-sm"> | 236 | <label class="block mt-4 text-sm"> |
237 | <span class="text-gray-700 dark:text-gray-400"> | 237 | <span class="text-gray-700 dark:text-gray-400"> |
238 | Requested Limit | 238 | Requested Limit |
239 | </span> | 239 | </span> |
240 | <select | 240 | <select |
241 | 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" | 241 | 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" |
242 | > | 242 | > |
243 | <option>$1,000</option> | 243 | <option>$1,000</option> |
244 | <option>$5,000</option> | 244 | <option>$5,000</option> |
245 | <option>$10,000</option> | 245 | <option>$10,000</option> |
246 | <option>$25,000</option> | 246 | <option>$25,000</option> |
247 | </select> | 247 | </select> |
248 | </label> | 248 | </label> |
249 | 249 | ||
250 | <label class="block mt-4 text-sm"> | 250 | <label class="block mt-4 text-sm"> |
251 | <span class="text-gray-700 dark:text-gray-400"> | 251 | <span class="text-gray-700 dark:text-gray-400"> |
252 | Multiselect | 252 | Multiselect |
253 | </span> | 253 | </span> |
254 | <select | 254 | <select |
255 | 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" | 255 | 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" |
256 | multiple | 256 | multiple |
257 | > | 257 | > |
258 | <option>Option 1</option> | 258 | <option>Option 1</option> |
259 | <option>Option 2</option> | 259 | <option>Option 2</option> |
260 | <option>Option 3</option> | 260 | <option>Option 3</option> |
261 | <option>Option 4</option> | 261 | <option>Option 4</option> |
262 | <option>Option 5</option> | 262 | <option>Option 5</option> |
263 | </select> | 263 | </select> |
264 | </label> | 264 | </label> |
265 | 265 | ||
266 | <label class="block mt-4 text-sm"> | 266 | <label class="block mt-4 text-sm"> |
267 | <span class="text-gray-700 dark:text-gray-400">Message</span> | 267 | <span class="text-gray-700 dark:text-gray-400">Message</span> |
268 | <textarea | 268 | <textarea |
269 | 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" | 269 | 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" |
270 | rows="3" | 270 | rows="3" |
271 | placeholder="Enter some long form content." | 271 | placeholder="Enter some long form content." |
272 | ></textarea> | 272 | ></textarea> |
273 | </label> | 273 | </label> |
274 | 274 | ||
275 | <div class="flex mt-6 text-sm"> | 275 | <div class="flex mt-6 text-sm"> |
276 | <label class="flex items-center dark:text-gray-400"> | 276 | <label class="flex items-center dark:text-gray-400"> |
277 | <input | 277 | <input |
278 | type="checkbox" | 278 | type="checkbox" |
279 | class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 279 | class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
280 | /> | 280 | /> |
281 | <span class="ml-2"> | 281 | <span class="ml-2"> |
282 | I agree to the | 282 | I agree to the |
283 | <span class="underline">privacy policy</span> | 283 | <span class="underline">privacy policy</span> |
284 | </span> | 284 | </span> |
285 | </label> | 285 | </label> |
286 | </div> | 286 | </div> |
287 | </div> | 287 | </div> |
288 | 288 | ||
289 | <!-- Validation inputs --> | 289 | <!-- Validation inputs --> |
290 | <!--<h4 | 290 | <!--<h4 |
291 | class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300" | 291 | class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300" |
292 | > | 292 | > |
293 | Validation | 293 | Validation |
294 | </h4> | 294 | </h4> |
295 | <div | 295 | <div |
296 | class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800" | 296 | class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800" |
297 | > | 297 | > |
298 | <!-- Invalid input --> | 298 | <!-- Invalid input --> |
299 | <!--<label class="block text-sm"> | 299 | <!--<label class="block text-sm"> |
300 | <span class="text-gray-700 dark:text-gray-400"> | 300 | <span class="text-gray-700 dark:text-gray-400"> |
301 | Invalid input | 301 | Invalid input |
302 | </span> | 302 | </span> |
303 | <input | 303 | <input |
304 | class="block w-full mt-1 text-sm border-red-600 dark:text-gray-300 dark:bg-gray-700 focus:border-red-400 focus:outline-none focus:shadow-outline-red form-input" | 304 | class="block w-full mt-1 text-sm border-red-600 dark:text-gray-300 dark:bg-gray-700 focus:border-red-400 focus:outline-none focus:shadow-outline-red form-input" |
305 | placeholder="Jane Doe" | 305 | placeholder="Jane Doe" |
306 | /> | 306 | /> |
307 | <span class="text-xs text-red-600 dark:text-red-400"> | 307 | <span class="text-xs text-red-600 dark:text-red-400"> |
308 | Your password is too short. | 308 | Your password is too short. |
309 | </span> | 309 | </span> |
310 | </label> | 310 | </label> |
311 | 311 | ||
312 | <!-- Valid input --> | 312 | <!-- Valid input --> |
313 | <!--<label class="block mt-4 text-sm"> | 313 | <!--<label class="block mt-4 text-sm"> |
314 | <span class="text-gray-700 dark:text-gray-400"> | 314 | <span class="text-gray-700 dark:text-gray-400"> |
315 | Valid input | 315 | Valid input |
316 | </span> | 316 | </span> |
317 | <input | 317 | <input |
318 | class="block w-full mt-1 text-sm border-green-600 dark:text-gray-300 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green form-input" | 318 | class="block w-full mt-1 text-sm border-green-600 dark:text-gray-300 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green form-input" |
319 | placeholder="Jane Doe" | 319 | placeholder="Jane Doe" |
320 | /> | 320 | /> |
321 | <span class="text-xs text-green-600 dark:text-green-400"> | 321 | <span class="text-xs text-green-600 dark:text-green-400"> |
322 | Your password is strong. | 322 | Your password is strong. |
323 | </span> | 323 | </span> |
324 | </label> | 324 | </label> |
325 | 325 | ||
326 | <!-- Helper text --> | 326 | <!-- Helper text --> |
327 | <!--<label class="block mt-4 text-sm"> | 327 | <!--<label class="block mt-4 text-sm"> |
328 | <span class="text-gray-700 dark:text-gray-400"> | 328 | <span class="text-gray-700 dark:text-gray-400"> |
329 | Helper text | 329 | Helper text |
330 | </span> | 330 | </span> |
331 | <input | 331 | <input |
332 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" | 332 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" |
333 | placeholder="Jane Doe" | 333 | placeholder="Jane Doe" |
334 | /> | 334 | /> |
335 | <span class="text-xs text-gray-600 dark:text-gray-400"> | 335 | <span class="text-xs text-gray-600 dark:text-gray-400"> |
336 | Your password must be at least 6 characters long. | 336 | Your password must be at least 6 characters long. |
337 | </span> | 337 | </span> |
338 | </label> | 338 | </label> |
339 | </div> | 339 | </div> |
340 | 340 | ||
341 | <!-- Inputs with icons --> | 341 | <!-- Inputs with icons --> |
342 | <!--<h4 | 342 | <!--<h4 |
343 | class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300" | 343 | class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300" |
344 | > | 344 | > |
345 | Icons | 345 | Icons |
346 | </h4> | 346 | </h4> |
347 | <div | 347 | <div |
348 | class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800" | 348 | class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800" |
349 | > | 349 | > |
350 | <label class="block text-sm"> | 350 | <label class="block text-sm"> |
351 | <span class="text-gray-700 dark:text-gray-400">Icon left</span> | 351 | <span class="text-gray-700 dark:text-gray-400">Icon left</span> |
352 | <!-- focus-within sets the color for the icon when input is focused --> | 352 | <!-- focus-within sets the color for the icon when input is focused --> |
353 | <!--<div | 353 | <!--<div |
354 | class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400" | 354 | class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400" |
355 | > | 355 | > |
356 | <input | 356 | <input |
357 | class="block w-full pl-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" | 357 | class="block w-full pl-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" |
358 | placeholder="Jane Doe" | 358 | placeholder="Jane Doe" |
359 | /> | 359 | /> |
360 | <div | 360 | <div |
361 | class="absolute inset-y-0 flex items-center ml-3 pointer-events-none" | 361 | class="absolute inset-y-0 flex items-center ml-3 pointer-events-none" |
362 | > | 362 | > |
363 | <svg | 363 | <svg |
364 | class="w-5 h-5" | 364 | class="w-5 h-5" |
365 | aria-hidden="true" | 365 | aria-hidden="true" |
366 | fill="none" | 366 | fill="none" |
367 | stroke-linecap="round" | 367 | stroke-linecap="round" |
368 | stroke-linejoin="round" | 368 | stroke-linejoin="round" |
369 | stroke-width="2" | 369 | stroke-width="2" |
370 | viewBox="0 0 24 24" | 370 | viewBox="0 0 24 24" |
371 | stroke="currentColor" | 371 | stroke="currentColor" |
372 | > | 372 | > |
373 | <path | 373 | <path |
374 | d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" | 374 | d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" |
375 | ></path> | 375 | ></path> |
376 | </svg> | 376 | </svg> |
377 | </div> | 377 | </div> |
378 | </div> | 378 | </div> |
379 | </label> | 379 | </label> |
380 | 380 | ||
381 | <label class="block mt-4 text-sm"> | 381 | <label class="block mt-4 text-sm"> |
382 | <span class="text-gray-700 dark:text-gray-400">Icon right</span> | 382 | <span class="text-gray-700 dark:text-gray-400">Icon right</span> |
383 | <!-- focus-within sets the color for the icon when input is focused --> | 383 | <!-- focus-within sets the color for the icon when input is focused --> |
384 | <!--<div | 384 | <!--<div |
385 | class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400" | 385 | class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400" |
386 | > | 386 | > |
387 | <input | 387 | <input |
388 | class="block w-full pr-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" | 388 | class="block w-full pr-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" |
389 | placeholder="Jane Doe" | 389 | placeholder="Jane Doe" |
390 | /> | 390 | /> |
391 | <div | 391 | <div |
392 | class="absolute inset-y-0 right-0 flex items-center mr-3 pointer-events-none" | 392 | class="absolute inset-y-0 right-0 flex items-center mr-3 pointer-events-none" |
393 | > | 393 | > |
394 | <svg | 394 | <svg |
395 | class="w-5 h-5" | 395 | class="w-5 h-5" |
396 | aria-hidden="true" | 396 | aria-hidden="true" |
397 | fill="none" | 397 | fill="none" |
398 | stroke-linecap="round" | 398 | stroke-linecap="round" |
399 | stroke-linejoin="round" | 399 | stroke-linejoin="round" |
400 | stroke-width="2" | 400 | stroke-width="2" |
401 | viewBox="0 0 24 24" | 401 | viewBox="0 0 24 24" |
402 | stroke="currentColor" | 402 | stroke="currentColor" |
403 | > | 403 | > |
404 | <path | 404 | <path |
405 | d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" | 405 | d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" |
406 | ></path> | 406 | ></path> |
407 | </svg> | 407 | </svg> |
408 | </div> | 408 | </div> |
409 | </div> | 409 | </div> |
410 | </label> | 410 | </label> |
411 | </div> | 411 | </div> |
412 | 412 | ||
413 | <!-- Inputs with buttons --> | 413 | <!-- Inputs with buttons --> |
414 | <!--<h4 | 414 | <!--<h4 |
415 | class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300" | 415 | class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300" |
416 | > | 416 | > |
417 | Buttons | 417 | Buttons |
418 | </h4> | 418 | </h4> |
419 | <div | 419 | <div |
420 | class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800" | 420 | class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800" |
421 | > | 421 | > |
422 | <label class="block text-sm"> | 422 | <label class="block text-sm"> |
423 | <span class="text-gray-700 dark:text-gray-400"> | 423 | <span class="text-gray-700 dark:text-gray-400"> |
424 | Button left | 424 | Button left |
425 | </span> | 425 | </span> |
426 | <div class="relative"> | 426 | <div class="relative"> |
427 | <input | 427 | <input |
428 | class="block w-full pl-20 mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" | 428 | class="block w-full pl-20 mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" |
429 | placeholder="Jane Doe" | 429 | placeholder="Jane Doe" |
430 | /> | 430 | /> |
431 | <button | 431 | <button |
432 | class="absolute inset-y-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-l-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 432 | class="absolute inset-y-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-l-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
433 | > | 433 | > |
434 | Click | 434 | Click |
435 | </button> | 435 | </button> |
436 | </div> | 436 | </div> |
437 | </label> | 437 | </label> |
438 | 438 | ||
439 | <label class="block mt-4 text-sm"> | 439 | <label class="block mt-4 text-sm"> |
440 | <span class="text-gray-700 dark:text-gray-400"> | 440 | <span class="text-gray-700 dark:text-gray-400"> |
441 | Button right | 441 | Button right |
442 | </span> | 442 | </span> |
443 | <div | 443 | <div |
444 | class="relative text-gray-500 focus-within:text-purple-600" | 444 | class="relative text-gray-500 focus-within:text-purple-600" |
445 | > | 445 | > |
446 | <input | 446 | <input |
447 | class="block w-full pr-20 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" | 447 | class="block w-full pr-20 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input" |
448 | placeholder="Jane Doe" | 448 | placeholder="Jane Doe" |
449 | /> | 449 | /> |
450 | <button | 450 | <button |
451 | class="absolute inset-y-0 right-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-r-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" | 451 | class="absolute inset-y-0 right-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-r-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" |
452 | > | 452 | > |
453 | Click | 453 | Click |
454 | </button> | 454 | </button> |
455 | </div> | 455 | </div> |
456 | </label> | 456 | </label> |
457 | </div>--> | 457 | </div>--> |
458 | @endsection | 458 | @endsection |
459 | 459 |
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 | const id = e.target.id; | 44 | const id = e.target.id; |
45 | let form = document.getElementById("form_modal_del"); | 45 | let form = document.getElementById("form_modal_del"); |
46 | form.action = "<?=$_SERVER['HTTP_REFERER']?>/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); | 46 | form.action = "<?=$_SERVER['HTTP_REFERER']?>/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 | <pre> | 84 | <pre> |
85 | <?//print_r($_SERVER);?> | 85 | <?//print_r($_SERVER);?> |
86 | </pre> | 86 | </pre> |
87 | 87 | ||
88 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 88 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
89 | <div class="w-full overflow-x-auto"> | 89 | <div class="w-full overflow-x-auto"> |
90 | <table class="w-full whitespace-no-wrap"> | 90 | <table class="w-full whitespace-no-wrap"> |
91 | <thead> | 91 | <thead> |
92 | <tr | 92 | <tr |
93 | 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" | 93 | 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" |
94 | > | 94 | > |
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">Email/Телефон</th> | 98 | <th class="px-4 py-3">Email/Телефон</th> |
98 | <th class="px-4 py-3">Категория</th> | 99 | <th class="px-4 py-3">Категория</th> |
99 | <th class="px-4 py-3">Комментарий</th> | 100 | <th class="px-4 py-3">Комментарий</th> |
100 | <th class="px-4 py-3">Дата регистрации</th> | 101 | <th class="px-4 py-3">Дата регистрации</th> |
101 | <th class="px-4 py-3">Редакт.</th> | 102 | <th class="px-4 py-3">Редакт.</th> |
102 | </tr> | 103 | </tr> |
103 | </thead> | 104 | </thead> |
104 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 105 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
105 | @foreach($users as $user) | 106 | @foreach($users as $user) |
106 | <tr class="text-gray-700 dark:text-gray-400"> | 107 | <tr class="text-gray-700 dark:text-gray-400"> |
107 | <td class="px-4 py-3"> | 108 | <td class="px-4 py-3"> |
108 | {{$user->id}} | 109 | {{$user->id}} |
109 | </td> | 110 | </td> |
110 | <td class="px-4 py-3"> | 111 | <td class="px-4 py-3"> |
111 | {{$user->name}} | 112 | {{$user->name}} |
112 | </td> | 113 | </td> |
113 | <td class="px-4 py-3"> | 114 | <td class="px-4 py-3"> |
115 | @if (isset($user->employers[0]->logo) && ($user->employers[0]->logo)) | ||
116 | <img src="{{ asset(Storage::url($user->employers[0]->logo)) }}" style="width:50px"/> | ||
117 | @else | ||
118 | - | ||
119 | @endif | ||
120 | </td> | ||
121 | <td class="px-4 py-3"> | ||
114 | <div class="flex items-center text-sm"> | 122 | <div class="flex items-center text-sm"> |
115 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 123 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
116 | <div | 124 | <div |
117 | class="absolute inset-0 rounded-full shadow-inner" | 125 | class="absolute inset-0 rounded-full shadow-inner" |
118 | aria-hidden="true" | 126 | aria-hidden="true" |
119 | ></div> | 127 | ></div> |
120 | </div>--> | 128 | </div>--> |
121 | <div> | 129 | <div> |
122 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> | 130 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> |
123 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 131 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
124 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} | 132 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} |
125 | </p> | 133 | </p> |
126 | </div> | 134 | </div> |
127 | </div> | 135 | </div> |
128 | 136 | ||
129 | </td> | 137 | </td> |
130 | <td class="px-4 py-3 text-sm"> | 138 | <td class="px-4 py-3 text-sm"> |
131 | {{ $user->category }} | 139 | {{ $user->category }} |
132 | </td> | 140 | </td> |
133 | <td class="px-4 py-3 text-sm"> | 141 | <td class="px-4 py-3 text-sm"> |
134 | @if (!empty($user->comment_admin)) | 142 | @if (!empty($user->comment_admin)) |
135 | Есть | 143 | |
144 | <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->id]) }}">Есть</a> | ||
136 | @else | 145 | @else |
137 | Нет | 146 | Нет |
138 | @endif | 147 | @endif |
139 | </td> | 148 | </td> |
140 | <td class="px-4 py-3 text-sm"> | 149 | <td class="px-4 py-3 text-sm"> |
141 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 150 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
142 | </td> | 151 | </td> |
143 | <td class="px-4 py-3 text-sm"> | 152 | <td class="px-4 py-3 text-sm"> |
144 | @if (!empty($user->emp_id)) | 153 | @if (!empty($user->emp_id)) |
145 | <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> | | 154 | <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> | |
146 | <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> | 155 | <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> |
147 | @endif | 156 | @endif |
148 | </td> | 157 | </td> |
149 | <!--<td class="px-4 py-3 text-sm"> | 158 | <!--<td class="px-4 py-3 text-sm"> |
150 | @if ($user->usr_id > 1) | 159 | @if ($user->usr_id > 1) |
151 | <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | 160 | <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> |
152 | @endif | 161 | @endif |
153 | </td>--> | 162 | </td>--> |
154 | </tr> | 163 | </tr> |
155 | @endforeach | 164 | @endforeach |
156 | </tbody> | 165 | </tbody> |
157 | </table> | 166 | </table> |
158 | </div> | 167 | </div> |
159 | 168 | ||
160 | <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"> |
161 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> | 170 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> |
162 | </div> | 171 | </div> |
163 | </div> | 172 | </div> |
164 | @endsection | 173 | @endsection |
165 | 174 |
routes/web.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use App\Http\Controllers\Admin\AdminController; | 3 | use App\Http\Controllers\Admin\AdminController; |
4 | use App\Http\Controllers\Admin\CategoryController; | 4 | use App\Http\Controllers\Admin\CategoryController; |
5 | use App\Http\Controllers\Admin\CategoryEmpController; | 5 | use App\Http\Controllers\Admin\CategoryEmpController; |
6 | use App\Http\Controllers\Admin\EducationController; | 6 | use App\Http\Controllers\Admin\EducationController; |
7 | use App\Http\Controllers\Admin\EmployersController; | 7 | use App\Http\Controllers\Admin\EmployersController; |
8 | use App\Http\Controllers\Admin\InfoBloksController; | 8 | use App\Http\Controllers\Admin\InfoBloksController; |
9 | use App\Http\Controllers\Admin\JobTitlesController; | 9 | use App\Http\Controllers\Admin\JobTitlesController; |
10 | use App\Http\Controllers\Admin\UsersController; | 10 | use App\Http\Controllers\Admin\UsersController; |
11 | use App\Http\Controllers\Admin\WorkersController; | 11 | use App\Http\Controllers\Admin\WorkersController; |
12 | use App\Http\Controllers\Auth\ForgotPasswordController; | 12 | use App\Http\Controllers\Auth\ForgotPasswordController; |
13 | use App\Http\Controllers\Auth\LoginController; | 13 | use App\Http\Controllers\Auth\LoginController; |
14 | use App\Http\Controllers\Auth\RegisterController; | 14 | use App\Http\Controllers\Auth\RegisterController; |
15 | use App\Http\Controllers\CKEditorController; | 15 | use App\Http\Controllers\CKEditorController; |
16 | use App\Models\User; | 16 | use App\Models\User; |
17 | use App\Http\Controllers\MainController; | 17 | use App\Http\Controllers\MainController; |
18 | use App\Http\Controllers\HomeController; | 18 | use App\Http\Controllers\HomeController; |
19 | use Illuminate\Support\Facades\Route; | 19 | use Illuminate\Support\Facades\Route; |
20 | use App\Http\Controllers\Admin\CompanyController; | 20 | use App\Http\Controllers\Admin\CompanyController; |
21 | use App\Http\Controllers\Admin\Ad_EmployersController; | 21 | use App\Http\Controllers\Admin\Ad_EmployersController; |
22 | use App\Http\Controllers\Admin\MsgAnswersController; | 22 | use App\Http\Controllers\Admin\MsgAnswersController; |
23 | use App\Http\Controllers\Admin\GroupsController; | 23 | use App\Http\Controllers\Admin\GroupsController; |
24 | use App\Http\Controllers\PagesController; | 24 | use App\Http\Controllers\PagesController; |
25 | use Illuminate\Support\Facades\Storage; | 25 | use Illuminate\Support\Facades\Storage; |
26 | 26 | ||
27 | 27 | ||
28 | /* | 28 | /* |
29 | |-------------------------------------------------------------------------- | 29 | |-------------------------------------------------------------------------- |
30 | | Web Routes | 30 | | Web Routes |
31 | |-------------------------------------------------------------------------- | 31 | |-------------------------------------------------------------------------- |
32 | | | 32 | | |
33 | | Here is where you can register web routes for your application. These | 33 | | Here is where you can register web routes for your application. These |
34 | | routes are loaded by the RouteServiceProvider within a group which | 34 | | routes are loaded by the RouteServiceProvider within a group which |
35 | | contains the "web" middleware group. Now create something great! | 35 | | contains the "web" middleware group. Now create something great! |
36 | | | 36 | | |
37 | */ | 37 | */ |
38 | /* | 38 | /* |
39 | Route::get('/', function () { | 39 | Route::get('/', function () { |
40 | return view('welcome'); | 40 | return view('welcome'); |
41 | })->name('index'); | 41 | })->name('index'); |
42 | */ | 42 | */ |
43 | Route::get('/', [MainController::class, 'index'])->name('index'); | 43 | Route::get('/', [MainController::class, 'index'])->name('index'); |
44 | 44 | ||
45 | //Роуты авторизации, регистрации, восстановления, аутентификации | 45 | //Роуты авторизации, регистрации, восстановления, аутентификации |
46 | Auth::routes(['verify' => true]); | 46 | Auth::routes(['verify' => true]); |
47 | 47 | ||
48 | // роуты регистрации, авторизации, восстановления пароля, верификации почты | 48 | // роуты регистрации, авторизации, восстановления пароля, верификации почты |
49 | /*Route::group([ | 49 | /*Route::group([ |
50 | 'as' => 'auth.', //имя маршрута, например auth.index | 50 | 'as' => 'auth.', //имя маршрута, например auth.index |
51 | 'prefix' => 'auth', // префикс маршрута, например, auth/index | 51 | 'prefix' => 'auth', // префикс маршрута, например, auth/index |
52 | ], function () { | 52 | ], function () { |
53 | //форма регистрации | 53 | //форма регистрации |
54 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 54 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
55 | 55 | ||
56 | //создание пользователя | 56 | //создание пользователя |
57 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 57 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
58 | 58 | ||
59 | //форма входа авторизации | 59 | //форма входа авторизации |
60 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 60 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
61 | 61 | ||
62 | //аутентификация | 62 | //аутентификация |
63 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); | 63 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); |
64 | 64 | ||
65 | //выход | 65 | //выход |
66 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 66 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
67 | 67 | ||
68 | //форма ввода адреса почты | 68 | //форма ввода адреса почты |
69 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); | 69 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); |
70 | 70 | ||
71 | //письмо на почту | 71 | //письмо на почту |
72 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); | 72 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); |
73 | 73 | ||
74 | //форма восстановления пароля | 74 | //форма восстановления пароля |
75 | Route::get('reset-password/token/{token}/email/{email}', | 75 | Route::get('reset-password/token/{token}/email/{email}', |
76 | [ResetPasswordController::class, 'form'] | 76 | [ResetPasswordController::class, 'form'] |
77 | )->name('reset-form'); | 77 | )->name('reset-form'); |
78 | 78 | ||
79 | //восстановление пароля | 79 | //восстановление пароля |
80 | Route::post('reset-password', | 80 | Route::post('reset-password', |
81 | [ResetPasswordController::class, 'reset'] | 81 | [ResetPasswordController::class, 'reset'] |
82 | )->name('reset-password'); | 82 | )->name('reset-password'); |
83 | 83 | ||
84 | //сообщение о необходимости проверки адреса почты | 84 | //сообщение о необходимости проверки адреса почты |
85 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); | 85 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); |
86 | 86 | ||
87 | //подтверждение адреса почты нового пользователя | 87 | //подтверждение адреса почты нового пользователя |
88 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) | 88 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) |
89 | ->where('token', '[a-f0-9]{32}') | 89 | ->where('token', '[a-f0-9]{32}') |
90 | ->where('id', '[0-9]+') | 90 | ->where('id', '[0-9]+') |
91 | ->name('verify-email'); | 91 | ->name('verify-email'); |
92 | });*/ | 92 | });*/ |
93 | 93 | ||
94 | //Личный кабинет пользователя | 94 | //Личный кабинет пользователя |
95 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 95 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
96 | 96 | ||
97 | /* | 97 | /* |
98 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 98 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
99 | $user = User::where('email',$request->input('email'))->first(); | 99 | $user = User::where('email',$request->input('email'))->first(); |
100 | 100 | ||
101 | $user->sendEmailVerificationNotification(); | 101 | $user->sendEmailVerificationNotification(); |
102 | 102 | ||
103 | return 'your response'; | 103 | return 'your response'; |
104 | })->middleware('throttle:6,1')->name('verification.resend'); | 104 | })->middleware('throttle:6,1')->name('verification.resend'); |
105 | */ | 105 | */ |
106 | 106 | ||
107 | // Авторизация, регистрация в админку | 107 | // Авторизация, регистрация в админку |
108 | Route::group([ | 108 | Route::group([ |
109 | 'as' => 'admin.', // имя маршрута, например auth.index | 109 | 'as' => 'admin.', // имя маршрута, например auth.index |
110 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 110 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
111 | 'middleware' => ['guest'], | 111 | 'middleware' => ['guest'], |
112 | ], function () { | 112 | ], function () { |
113 | // Форма регистрации | 113 | // Форма регистрации |
114 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 114 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
115 | 115 | ||
116 | // Создание пользователя | 116 | // Создание пользователя |
117 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 117 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
118 | //Форма входа | 118 | //Форма входа |
119 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 119 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
120 | 120 | ||
121 | // аутентификация | 121 | // аутентификация |
122 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 122 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
123 | 123 | ||
124 | }); | 124 | }); |
125 | 125 | ||
126 | // Личный кабинет админки | 126 | // Личный кабинет админки |
127 | Route::group([ | 127 | Route::group([ |
128 | 'as' => 'admin.', // имя маршрута, например auth.index | 128 | 'as' => 'admin.', // имя маршрута, например auth.index |
129 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 129 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
130 | 'middleware' => ['auth'], ['admin'], | 130 | 'middleware' => ['auth'], ['admin'], |
131 | ], function() { | 131 | ], function() { |
132 | 132 | ||
133 | // выход | 133 | // выход |
134 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 134 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
135 | 135 | ||
136 | // кабинет главная страница | 136 | // кабинет главная страница |
137 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 137 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
138 | 138 | ||
139 | // кабинет профиль админа - форма | 139 | // кабинет профиль админа - форма |
140 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 140 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
141 | // кабинет профиль админа - сохранение формы | 141 | // кабинет профиль админа - сохранение формы |
142 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 142 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
143 | 143 | ||
144 | //кабинет сообщения админа | 144 | //кабинет сообщения админа |
145 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); | 145 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); |
146 | 146 | ||
147 | 147 | ||
148 | // кабинет профиль - форма пароли | 148 | // кабинет профиль - форма пароли |
149 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 149 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
150 | // кабинет профиль - сохранение формы пароля | 150 | // кабинет профиль - сохранение формы пароля |
151 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 151 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
152 | 152 | ||
153 | 153 | ||
154 | // кабинет профиль пользователя - форма | 154 | // кабинет профиль пользователя - форма |
155 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 155 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
156 | // кабинет профиль пользователя - сохранение формы | 156 | // кабинет профиль пользователя - сохранение формы |
157 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 157 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
158 | 158 | ||
159 | // кабинет профиль работодатель - форма | 159 | // кабинет профиль работодатель - форма |
160 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 160 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
161 | // кабинет профиль работодатель - сохранение формы | 161 | // кабинет профиль работодатель - сохранение формы |
162 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 162 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
163 | // кабинет удаление профиль работодателя и юзера | 163 | // кабинет удаление профиль работодателя и юзера |
164 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); | 164 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); |
165 | 165 | ||
166 | // кабинет профиль работник - форма | 166 | // кабинет профиль работник - форма |
167 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); | 167 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); |
168 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); | 168 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); |
169 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); | 169 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); |
170 | // кабинет профиль работник - сохранение формы | 170 | // кабинет профиль работник - сохранение формы |
171 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); | 171 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); |
172 | 172 | ||
173 | 173 | ||
174 | // кабинет настройки сайта - форма | 174 | // кабинет настройки сайта - форма |
175 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 175 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
176 | // кабинет настройки сайта сохранение формы | 176 | // кабинет настройки сайта сохранение формы |
177 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 177 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
178 | 178 | ||
179 | // кабинет - пользователи | 179 | // кабинет - пользователи |
180 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 180 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
181 | 181 | ||
182 | // кабинет - пользователи | 182 | // кабинет - пользователи |
183 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 183 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
184 | 184 | ||
185 | // кабинет - работодатели | 185 | // кабинет - работодатели |
186 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 186 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
187 | 187 | ||
188 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); | ||
189 | |||
188 | // кабинет - соискатели | 190 | // кабинет - соискатели |
189 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 191 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
190 | 192 | ||
191 | // кабинет - база данных | 193 | // кабинет - база данных |
192 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); | 194 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); |
193 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); | 195 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); |
194 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); | 196 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); |
195 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); | 197 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); |
196 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); | 198 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); |
197 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); | 199 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); |
198 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); | 200 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); |
199 | 201 | ||
200 | // кабинет - вакансии | 202 | // кабинет - вакансии |
201 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 203 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
202 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); | 204 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); |
203 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); | 205 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); |
204 | 206 | ||
205 | // кабинет - категории | 207 | // кабинет - категории |
206 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 208 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
207 | /* | 209 | /* |
208 | * CRUD-операции над Справочником Категории | 210 | * CRUD-операции над Справочником Категории |
209 | */ | 211 | */ |
210 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 212 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
211 | 213 | ||
212 | // CRUD-операции над справочником Категории для работодателей | 214 | // CRUD-операции над справочником Категории для работодателей |
213 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); | 215 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); |
214 | 216 | ||
215 | // CRUD-операции над справочником Образование | 217 | // CRUD-операции над справочником Образование |
216 | Route::resource('education', EducationController::class, ['except' => ['show']]); | 218 | Route::resource('education', EducationController::class, ['except' => ['show']]); |
217 | 219 | ||
218 | Route::get('program-education/{education}/{level}', [EducationController::class, 'add_program'])->name('add-program-education'); | 220 | Route::get('program-education/{education}/{level}', [EducationController::class, 'add_program'])->name('add-program-education'); |
219 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); | 221 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); |
220 | 222 | ||
221 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 223 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
222 | /* | 224 | /* |
223 | * кабинет - CRUD-операции по справочнику должности | 225 | * кабинет - CRUD-операции по справочнику должности |
224 | * | 226 | * |
225 | */ | 227 | */ |
226 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 228 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
227 | 229 | ||
228 | // кабинет - сообщения (чтение чужих) | 230 | // кабинет - сообщения (чтение чужих) |
229 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 231 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
230 | // кабинет - просмотр сообщения чужого (чтение) | 232 | // кабинет - просмотр сообщения чужого (чтение) |
231 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); | 233 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); |
232 | 234 | ||
233 | // кабинет - сообщения (админские) | 235 | // кабинет - сообщения (админские) |
234 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); | 236 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); |
235 | // кабинет - сообщения (админские) | 237 | // кабинет - сообщения (админские) |
236 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); | 238 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); |
237 | // кабинет - sql - конструкция запросов | 239 | // кабинет - sql - конструкция запросов |
238 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); | 240 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); |
239 | 241 | ||
240 | /* | 242 | /* |
241 | * Расписанный подход в описании каждой директорий групп пользователей. | 243 | * Расписанный подход в описании каждой директорий групп пользователей. |
242 | */ | 244 | */ |
243 | // кабинет - группы пользователей | 245 | // кабинет - группы пользователей |
244 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 246 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
245 | // кабинет - добавление форма группы пользователей | 247 | // кабинет - добавление форма группы пользователей |
246 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 248 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
247 | // кабинет - сохранение формы группы пользователей | 249 | // кабинет - сохранение формы группы пользователей |
248 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 250 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
249 | // кабинет - редактирование форма группы пользователей | 251 | // кабинет - редактирование форма группы пользователей |
250 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 252 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
251 | // кабинет - сохранение редактированной формы группы пользователей | 253 | // кабинет - сохранение редактированной формы группы пользователей |
252 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 254 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
253 | // кабинет - удаление группы пользователей | 255 | // кабинет - удаление группы пользователей |
254 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 256 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
255 | 257 | ||
256 | 258 | ||
257 | // кабинет - список админов | 259 | // кабинет - список админов |
258 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 260 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
259 | 261 | ||
260 | 262 | ||
261 | /////редактор////// кабинет - редактор сайта//////////////////////// | 263 | /////редактор////// кабинет - редактор сайта//////////////////////// |
262 | Route::get('editor-site', function() { | 264 | Route::get('editor-site', function() { |
263 | return view('admin.editor.index'); | 265 | return view('admin.editor.index'); |
264 | })->name('editor-site'); | 266 | })->name('editor-site'); |
265 | 267 | ||
266 | 268 | ||
267 | // кабинет - редактор шапки-футера сайта | 269 | // кабинет - редактор шапки-футера сайта |
268 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 270 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
269 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); | 271 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); |
270 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); | 272 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); |
271 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); | 273 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); |
272 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); | 274 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); |
273 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); | 275 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); |
274 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); | 276 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); |
275 | 277 | ||
276 | 278 | ||
277 | // кабинет - редактор должности на главной | 279 | // кабинет - редактор должности на главной |
278 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 280 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
279 | 281 | ||
280 | // кабинет - редактор работодатели на главной | 282 | // кабинет - редактор работодатели на главной |
281 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 283 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
282 | 284 | ||
283 | 285 | ||
284 | // кабинет - редактор seo-сайта | 286 | // кабинет - редактор seo-сайта |
285 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 287 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
286 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); | 288 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); |
287 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); | 289 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); |
288 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); | 290 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); |
289 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); | 291 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); |
290 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); | 292 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); |
291 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); | 293 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); |
292 | 294 | ||
293 | 295 | ||
294 | // кабинет - редактор страниц | 296 | // кабинет - редактор страниц |
295 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 297 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
296 | // кабинет - добавление страницы | 298 | // кабинет - добавление страницы |
297 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | 299 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); |
298 | // кабинет - сохранение формы страницы | 300 | // кабинет - сохранение формы страницы |
299 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | 301 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); |
300 | // кабинет - редактирование форма страницы | 302 | // кабинет - редактирование форма страницы |
301 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | 303 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); |
302 | // кабинет - сохранение редактированной формы страницы | 304 | // кабинет - сохранение редактированной формы страницы |
303 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | 305 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); |
304 | // кабинет - удаление страницы | 306 | // кабинет - удаление страницы |
305 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | 307 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); |
306 | 308 | ||
307 | 309 | ||
308 | // кабинет - реклама сайта | 310 | // кабинет - реклама сайта |
309 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 311 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
310 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); | 312 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); |
311 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); | 313 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); |
312 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); | 314 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); |
313 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); | 315 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); |
314 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); | 316 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); |
315 | //////////////////////////////////////////////////////////////////////// | 317 | //////////////////////////////////////////////////////////////////////// |
316 | 318 | ||
317 | 319 | ||
318 | // кабинет - отзывы о работодателе для модерации | 320 | // кабинет - отзывы о работодателе для модерации |
319 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 321 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
320 | 322 | ||
321 | // Общая страница статистики | 323 | // Общая страница статистики |
322 | Route::get('statics', function () { | 324 | Route::get('statics', function () { |
323 | return view('admin.static.index'); | 325 | return view('admin.static.index'); |
324 | })->name('statics'); | 326 | })->name('statics'); |
325 | 327 | ||
326 | // кабинет - статистика работников | 328 | // кабинет - статистика работников |
327 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 329 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
328 | 330 | ||
329 | // кабинет - статистика вакансий работодателя | 331 | // кабинет - статистика вакансий работодателя |
330 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 332 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
331 | 333 | ||
332 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 334 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
333 | /* | 335 | /* |
334 | * CRUD-операции над справочником дипломы и документы | 336 | * CRUD-операции над справочником дипломы и документы |
335 | */ | 337 | */ |
336 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 338 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
337 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 339 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
338 | 340 | ||
339 | // кабинет - роли пользователя | 341 | // кабинет - роли пользователя |
340 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 342 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
341 | 343 | ||
342 | Route::get('logs', function() { | 344 | Route::get('logs', function() { |
343 | $files = Storage::files('logs/laravel.log'); | 345 | $files = Storage::files('logs/laravel.log'); |
344 | print_r($files); | 346 | print_r($files); |
345 | })->name('logs'); | 347 | })->name('logs'); |
346 | 348 | ||
347 | }); | 349 | }); |
348 | 350 | ||
349 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); | 351 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); |
350 | 352 | ||
351 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); | 353 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); |
352 | 354 | ||
353 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); | 355 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); |
354 | 356 | ||
355 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); | 357 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); |
356 | 358 |