Commit b7b5bcec322d6597108e485ad09bde2d05877429
1 parent
99702d4264
Exists in
master
and in
1 other branch
Обновление - баги
Showing 3 changed files with 20 additions and 21 deletions Inline Diff
app/Http/Controllers/WorkerController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\RusDate; | 5 | use App\Classes\RusDate; |
6 | use App\Http\Requests\DocumentsRequest; | 6 | use App\Http\Requests\DocumentsRequest; |
7 | use App\Models\Ad_employer; | 7 | use App\Models\Ad_employer; |
8 | use App\Models\ad_response; | 8 | use App\Models\ad_response; |
9 | use App\Models\Category; | 9 | use App\Models\Category; |
10 | use App\Models\Dop_info; | 10 | use App\Models\Dop_info; |
11 | use App\Models\Employer; | 11 | use App\Models\Employer; |
12 | use App\Models\infobloks; | 12 | use App\Models\infobloks; |
13 | use App\Models\Job_title; | 13 | use App\Models\Job_title; |
14 | use App\Models\Message; | 14 | use App\Models\Message; |
15 | use App\Models\place_works; | 15 | use App\Models\place_works; |
16 | use App\Models\reclame; | 16 | use App\Models\reclame; |
17 | use App\Models\sertification; | 17 | use App\Models\sertification; |
18 | use App\Models\Static_worker; | 18 | use App\Models\Static_worker; |
19 | use App\Models\User; | 19 | use App\Models\User; |
20 | use App\Models\User as User_Model; | 20 | use App\Models\User as User_Model; |
21 | use App\Models\Worker; | 21 | use App\Models\Worker; |
22 | use Barryvdh\DomPDF\Facade\Pdf; | 22 | use Barryvdh\DomPDF\Facade\Pdf; |
23 | use Carbon\Carbon; | 23 | use Carbon\Carbon; |
24 | use Illuminate\Auth\Events\Registered; | 24 | use Illuminate\Auth\Events\Registered; |
25 | use Illuminate\Database\Eloquent\Builder; | 25 | use Illuminate\Database\Eloquent\Builder; |
26 | use Illuminate\Http\JsonResponse; | 26 | use Illuminate\Http\JsonResponse; |
27 | use Illuminate\Http\Request; | 27 | use Illuminate\Http\Request; |
28 | use Illuminate\Support\Facades\Auth; | 28 | use Illuminate\Support\Facades\Auth; |
29 | use Illuminate\Support\Facades\Hash; | 29 | use Illuminate\Support\Facades\Hash; |
30 | use Illuminate\Support\Facades\Storage; | 30 | use Illuminate\Support\Facades\Storage; |
31 | use Illuminate\Support\Facades\Validator; | 31 | use Illuminate\Support\Facades\Validator; |
32 | 32 | ||
33 | class WorkerController extends Controller | 33 | class WorkerController extends Controller |
34 | { | 34 | { |
35 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); | 35 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); |
36 | 36 | ||
37 | //профиль | 37 | //профиль |
38 | public function profile(Worker $worker) | 38 | public function profile(Worker $worker) |
39 | { | 39 | { |
40 | $get_date = date('Y.m'); | 40 | $get_date = date('Y.m'); |
41 | 41 | ||
42 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 42 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
43 | ->where('user_id', '=', $worker->users->id) | 43 | ->where('user_id', '=', $worker->users->id) |
44 | ->get(); | 44 | ->get(); |
45 | 45 | ||
46 | if ($c->count() > 0) { | 46 | if ($c->count() > 0) { |
47 | $upd = Static_worker::find($c[0]->id); | 47 | $upd = Static_worker::find($c[0]->id); |
48 | $upd->lookin = $upd->lookin + 1; | 48 | $upd->lookin = $upd->lookin + 1; |
49 | $upd->save(); | 49 | $upd->save(); |
50 | } else { | 50 | } else { |
51 | $crt = new Static_worker(); | 51 | $crt = new Static_worker(); |
52 | $crt->lookin = 1; | 52 | $crt->lookin = 1; |
53 | $crt->year_month = $get_date; | 53 | $crt->year_month = $get_date; |
54 | $crt->user_id = $worker->user_id; | 54 | $crt->user_id = $worker->user_id; |
55 | $crt->save(); | 55 | $crt->save(); |
56 | } | 56 | } |
57 | 57 | ||
58 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 58 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
59 | ->where('user_id', '=', $worker->users->id) | 59 | ->where('user_id', '=', $worker->users->id) |
60 | ->get(); | 60 | ->get(); |
61 | 61 | ||
62 | return view('public.workers.profile', compact('worker', 'stat')); | 62 | return view('public.workers.profile', compact('worker', 'stat')); |
63 | } | 63 | } |
64 | 64 | ||
65 | // лист база резюме | 65 | // лист база резюме |
66 | public function bd_resume(Request $request) | 66 | public function bd_resume(Request $request) |
67 | { | 67 | { |
68 | if (isset(Auth()->user()->id)) { | 68 | if (isset(Auth()->user()->id)) { |
69 | $idiot = Auth()->user()->id; | 69 | $idiot = Auth()->user()->id; |
70 | } else { | 70 | } else { |
71 | $idiot = 0; | 71 | $idiot = 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | $status_work = $this->status_work; | 74 | $status_work = $this->status_work; |
75 | $resumes = Worker::query()->with('users')->with('job_titles') | 75 | $resumes = Worker::query()->with('users')->with('job_titles'); |
76 | ->WhereHas('users', | 76 | $resumes = $resumes->whereHas('users', function (Builder $query) { |
77 | function (Builder $query) { | 77 | $query->Where('is_worker', '=', '1') |
78 | $query->Where('is_worker', '=', '1')-> | 78 | ->Where('is_bd', '=', '0'); |
79 | Where('is_bd', '=', '0'); | ||
80 | }); | 79 | }); |
81 | 80 | ||
82 | if ($request->get('sort')) { | 81 | if ($request->get('sort')) { |
83 | $sort = $request->get('sort'); | 82 | $sort = $request->get('sort'); |
84 | switch ($sort) { | 83 | switch ($sort) { |
85 | case 'name_up': | 84 | case 'name_up': |
86 | $resumes = $resumes->whereHas('users', function (Builder $query) { | 85 | $resumes = $resumes->orderBy(User::select('surname') |
87 | $query = $query->orderBy('surname')->orderBy('id'); | 86 | ->whereColumn('Workers.user_id', 'users.id') |
88 | }); | 87 | ); |
89 | break; | 88 | break; |
90 | case 'name_down': | 89 | case 'name_down': |
91 | $resumes = $resumes->whereHas('users', function (Builder $query) { | 90 | $resumes = $resumes->orderByDesc(User::select('surname') |
92 | $query = $query->orderByDesc('surname')->orderby('id'); | 91 | ->whereColumn('Workers.user_id', 'users.id') |
93 | }); | 92 | ); |
94 | break; | 93 | break; |
95 | case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; | 94 | case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; |
96 | case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; | 95 | case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; |
97 | case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; | 96 | case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; |
98 | default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; | 97 | default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; |
99 | } | 98 | } |
100 | } | 99 | } |
101 | 100 | ||
102 | $res_count = $resumes->count(); | 101 | $res_count = $resumes->count(); |
103 | $resumes = $resumes->paginate(6); | 102 | $resumes = $resumes->paginate(6); |
104 | if ($request->ajax()) { | 103 | if ($request->ajax()) { |
105 | // Условия обставлены | 104 | // Условия обставлены |
106 | if ($request->has('block') && ($request->get('block') == 1)) { | 105 | if ($request->has('block') && ($request->get('block') == 1)) { |
107 | return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); | 106 | return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); |
108 | } | 107 | } |
109 | 108 | ||
110 | if ($request->has('block') && ($request->get('block') == 2)) { | 109 | if ($request->has('block') && ($request->get('block') == 2)) { |
111 | return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); | 110 | return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); |
112 | } | 111 | } |
113 | } else { | 112 | } else { |
114 | return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); | 113 | return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); |
115 | } | 114 | } |
116 | } | 115 | } |
117 | 116 | ||
118 | // анкета соискателя | 117 | // анкета соискателя |
119 | public function resume_profile(Worker $worker) | 118 | public function resume_profile(Worker $worker) |
120 | { | 119 | { |
121 | $status_work = $this->status_work; | 120 | $status_work = $this->status_work; |
122 | $Query = Worker::query()->with('users')->with('job_titles') | 121 | $Query = Worker::query()->with('users')->with('job_titles') |
123 | ->with('place_worker')->with('sertificate')->with('prev_company') | 122 | ->with('place_worker')->with('sertificate')->with('prev_company') |
124 | ->with('infobloks'); | 123 | ->with('infobloks'); |
125 | $Query = $Query->where('id', '=', $worker->id); | 124 | $Query = $Query->where('id', '=', $worker->id); |
126 | $Query = $Query->get(); | 125 | $Query = $Query->get(); |
127 | return view('worker', compact('Query', 'status_work')); | 126 | return view('worker', compact('Query', 'status_work')); |
128 | } | 127 | } |
129 | 128 | ||
130 | // скачать анкету соискателя | 129 | // скачать анкету соискателя |
131 | public function resume_download(Worker $worker) | 130 | public function resume_download(Worker $worker) |
132 | { | 131 | { |
133 | $arr_house = ['0' => '$1000000000000000000']; | 132 | $arr_house = ['0' => '$1000000000000000000']; |
134 | 133 | ||
135 | view()->share('house',$arr_house); | 134 | view()->share('house',$arr_house); |
136 | 135 | ||
137 | $pdf = PDF::loadView('layout.pdf', $arr_house); //->setPaper('a4', 'landscape'); | 136 | $pdf = PDF::loadView('layout.pdf', $arr_house); //->setPaper('a4', 'landscape'); |
138 | 137 | ||
139 | return $pdf->stream(); | 138 | return $pdf->stream(); |
140 | } | 139 | } |
141 | 140 | ||
142 | // Кабинет работника | 141 | // Кабинет работника |
143 | public function cabinet() | 142 | public function cabinet() |
144 | { | 143 | { |
145 | $id = Auth()->user()->id; | 144 | $id = Auth()->user()->id; |
146 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> | 145 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> |
147 | with('infobloks')->with('place_worker')-> | 146 | with('infobloks')->with('place_worker')-> |
148 | WhereHas('users', | 147 | WhereHas('users', |
149 | function (Builder $query) use ($id) {$query->Where('id', $id); | 148 | function (Builder $query) use ($id) {$query->Where('id', $id); |
150 | })->get(); | 149 | })->get(); |
151 | 150 | ||
152 | $Job_titles = Job_title::query()->OrderBy('name')->get(); | 151 | $Job_titles = Job_title::query()->OrderBy('name')->get(); |
153 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); | 152 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); |
154 | 153 | ||
155 | return view('workers.cabinet', compact('Worker', 'Job_titles', 'Infoblocks')); | 154 | return view('workers.cabinet', compact('Worker', 'Job_titles', 'Infoblocks')); |
156 | } | 155 | } |
157 | 156 | ||
158 | // Сохранение данных | 157 | // Сохранение данных |
159 | public function cabinet_save(Worker $worker, Request $request) | 158 | public function cabinet_save(Worker $worker, Request $request) |
160 | { | 159 | { |
161 | $id = $worker->id; | 160 | $id = $worker->id; |
162 | $params = $request->all(); | 161 | $params = $request->all(); |
163 | 162 | ||
164 | $job_title_id = $request->get('job_title_id'); | 163 | $job_title_id = $request->get('job_title_id'); |
165 | 164 | ||
166 | unset($params['new_diplom']); | 165 | unset($params['new_diplom']); |
167 | unset($params['new_data_begin']); | 166 | unset($params['new_data_begin']); |
168 | unset($params['new_data_end']); | 167 | unset($params['new_data_end']); |
169 | unset($params['new_job_title']); | 168 | unset($params['new_job_title']); |
170 | unset($params['new_teplohod']); | 169 | unset($params['new_teplohod']); |
171 | unset($params['new_GWT']); | 170 | unset($params['new_GWT']); |
172 | unset($params['new_KBT']); | 171 | unset($params['new_KBT']); |
173 | unset($params['new_Begin_work']); | 172 | unset($params['new_Begin_work']); |
174 | unset($params['new_End_work']); | 173 | unset($params['new_End_work']); |
175 | unset($params['new_name_company']); | 174 | unset($params['new_name_company']); |
176 | 175 | ||
177 | $rules = [ | 176 | $rules = [ |
178 | 'surname' => ['required', 'string', 'max:255'], | 177 | 'surname' => ['required', 'string', 'max:255'], |
179 | 'name_man' => ['required', 'string', 'max:255'], | 178 | 'name_man' => ['required', 'string', 'max:255'], |
180 | 'email' => ['required', 'string', 'email', 'max:255'], | 179 | 'email' => ['required', 'string', 'email', 'max:255'], |
181 | 180 | ||
182 | ]; | 181 | ]; |
183 | 182 | ||
184 | $messages = [ | 183 | $messages = [ |
185 | 'required' => 'Укажите обязательное поле', | 184 | 'required' => 'Укажите обязательное поле', |
186 | 'min' => [ | 185 | 'min' => [ |
187 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 186 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
188 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 187 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
189 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 188 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
190 | ], | 189 | ], |
191 | 'max' => [ | 190 | 'max' => [ |
192 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 191 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
193 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 192 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
194 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 193 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
195 | ] | 194 | ] |
196 | ]; | 195 | ]; |
197 | 196 | ||
198 | $validator = Validator::make($params, $rules, $messages); | 197 | $validator = Validator::make($params, $rules, $messages); |
199 | 198 | ||
200 | if ($validator->fails()) { | 199 | if ($validator->fails()) { |
201 | return redirect()->route('worker.cabinet')->withErrors($validator); | 200 | return redirect()->route('worker.cabinet')->withErrors($validator); |
202 | } else { | 201 | } else { |
203 | 202 | ||
204 | if ($request->has('photo')) { | 203 | if ($request->has('photo')) { |
205 | if (!empty($Worker->photo)) { | 204 | if (!empty($Worker->photo)) { |
206 | Storage::delete($Worker->photo); | 205 | Storage::delete($Worker->photo); |
207 | } | 206 | } |
208 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); | 207 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); |
209 | } | 208 | } |
210 | 209 | ||
211 | if ($request->has('file')) { | 210 | if ($request->has('file')) { |
212 | if (!empty($Worker->file)) { | 211 | if (!empty($Worker->file)) { |
213 | Storage::delete($Worker->file); | 212 | Storage::delete($Worker->file); |
214 | } | 213 | } |
215 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); | 214 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); |
216 | } | 215 | } |
217 | 216 | ||
218 | $id_wor = $worker->update($params); | 217 | $id_wor = $worker->update($params); |
219 | 218 | ||
220 | $use = User_Model::find($id_wor); | 219 | $use = User_Model::find($id_wor); |
221 | $use->surname = $request->get('surname'); | 220 | $use->surname = $request->get('surname'); |
222 | $use->name_man = $request->get('name_man'); | 221 | $use->name_man = $request->get('name_man'); |
223 | $use->surname2 = $request->get('surname2'); | 222 | $use->surname2 = $request->get('surname2'); |
224 | 223 | ||
225 | $use->save(); | 224 | $use->save(); |
226 | $worker->job_titles()->sync($job_title_id); | 225 | $worker->job_titles()->sync($job_title_id); |
227 | 226 | ||
228 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); | 227 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); |
229 | } | 228 | } |
230 | } | 229 | } |
231 | 230 | ||
232 | // Сообщения данные | 231 | // Сообщения данные |
233 | public function messages($type_message) | 232 | public function messages($type_message) |
234 | { | 233 | { |
235 | $user_id = Auth()->user()->id; | 234 | $user_id = Auth()->user()->id; |
236 | 235 | ||
237 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 236 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
238 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 237 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
239 | 238 | ||
240 | $messages_output = Message::query()->with('vacancies')-> | 239 | $messages_output = Message::query()->with('vacancies')-> |
241 | with('user_to')->where('user_id', $user_id)-> | 240 | with('user_to')->where('user_id', $user_id)-> |
242 | OrderByDesc('created_at'); | 241 | OrderByDesc('created_at'); |
243 | 242 | ||
244 | 243 | ||
245 | $count_input = $messages_input->count(); | 244 | $count_input = $messages_input->count(); |
246 | $count_output = $messages_output->count(); | 245 | $count_output = $messages_output->count(); |
247 | 246 | ||
248 | if ($type_message == 'input') { | 247 | if ($type_message == 'input') { |
249 | $messages = $messages_input->paginate(15); | 248 | $messages = $messages_input->paginate(15); |
250 | } | 249 | } |
251 | 250 | ||
252 | if ($type_message == 'output') { | 251 | if ($type_message == 'output') { |
253 | $messages = $messages_output->paginate(15); | 252 | $messages = $messages_output->paginate(15); |
254 | } | 253 | } |
255 | // Вернуть все 100% | 254 | // Вернуть все 100% |
256 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 255 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
257 | } | 256 | } |
258 | 257 | ||
259 | // Избранный | 258 | // Избранный |
260 | public function favorite() | 259 | public function favorite() |
261 | { | 260 | { |
262 | return view('workers.favorite'); | 261 | return view('workers.favorite'); |
263 | } | 262 | } |
264 | 263 | ||
265 | // Сменить пароль | 264 | // Сменить пароль |
266 | public function new_password() | 265 | public function new_password() |
267 | { | 266 | { |
268 | $email = Auth()->user()->email; | 267 | $email = Auth()->user()->email; |
269 | return view('workers.new_password', compact('email')); | 268 | return view('workers.new_password', compact('email')); |
270 | } | 269 | } |
271 | 270 | ||
272 | // Обновление пароля | 271 | // Обновление пароля |
273 | public function save_new_password(Request $request) { | 272 | public function save_new_password(Request $request) { |
274 | $use = Auth()->user(); | 273 | $use = Auth()->user(); |
275 | $request->validate([ | 274 | $request->validate([ |
276 | 'password' => 'required|string', | 275 | 'password' => 'required|string', |
277 | 'new_password' => 'required|string', | 276 | 'new_password' => 'required|string', |
278 | 'new_password2' => 'required|string' | 277 | 'new_password2' => 'required|string' |
279 | ]); | 278 | ]); |
280 | 279 | ||
281 | if ($request->get('new_password') == $request->get('new_password2')) | 280 | if ($request->get('new_password') == $request->get('new_password2')) |
282 | if ($request->get('password') !== $request->get('new_password')) { | 281 | if ($request->get('password') !== $request->get('new_password')) { |
283 | $credentials = $request->only('email', 'password'); | 282 | $credentials = $request->only('email', 'password'); |
284 | if (Auth::attempt($credentials, $request->has('save_me'))) { | 283 | if (Auth::attempt($credentials, $request->has('save_me'))) { |
285 | 284 | ||
286 | if (!is_null($use->email_verified_at)){ | 285 | if (!is_null($use->email_verified_at)){ |
287 | 286 | ||
288 | $user_data = User_Model::find($use->id); | 287 | $user_data = User_Model::find($use->id); |
289 | $user_data->update([ | 288 | $user_data->update([ |
290 | 'password' => Hash::make($request->get('new_password')), | 289 | 'password' => Hash::make($request->get('new_password')), |
291 | 'pubpassword' => base64_encode($request->get('new_password')), | 290 | 'pubpassword' => base64_encode($request->get('new_password')), |
292 | ]); | 291 | ]); |
293 | return redirect() | 292 | return redirect() |
294 | ->route('worker.new_password') | 293 | ->route('worker.new_password') |
295 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 294 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
296 | } | 295 | } |
297 | 296 | ||
298 | return redirect() | 297 | return redirect() |
299 | ->route('worker.new_password') | 298 | ->route('worker.new_password') |
300 | ->withError('Данная учетная запись не было верифицированна!'); | 299 | ->withError('Данная учетная запись не было верифицированна!'); |
301 | } | 300 | } |
302 | } | 301 | } |
303 | 302 | ||
304 | return redirect() | 303 | return redirect() |
305 | ->route('worker.new_password') | 304 | ->route('worker.new_password') |
306 | ->withErrors('Не совпадение данных, обновите пароли!'); | 305 | ->withErrors('Не совпадение данных, обновите пароли!'); |
307 | } | 306 | } |
308 | 307 | ||
309 | // Удаление профиля форма | 308 | // Удаление профиля форма |
310 | public function delete_profile() | 309 | public function delete_profile() |
311 | { | 310 | { |
312 | $login = Auth()->user()->email; | 311 | $login = Auth()->user()->email; |
313 | return view('workers.delete_profile', compact('login')); | 312 | return view('workers.delete_profile', compact('login')); |
314 | } | 313 | } |
315 | 314 | ||
316 | // Удаление профиля код | 315 | // Удаление профиля код |
317 | public function delete_profile_result(Request $request) { | 316 | public function delete_profile_result(Request $request) { |
318 | $Answer = $request->all(); | 317 | $Answer = $request->all(); |
319 | $user_id = Auth()->user()->id; | 318 | $user_id = Auth()->user()->id; |
320 | $request->validate([ | 319 | $request->validate([ |
321 | 'password' => 'required|string', | 320 | 'password' => 'required|string', |
322 | ]); | 321 | ]); |
323 | 322 | ||
324 | $credentials = $request->only('email', 'password'); | 323 | $credentials = $request->only('email', 'password'); |
325 | if (Auth::attempt($credentials)) { | 324 | if (Auth::attempt($credentials)) { |
326 | Auth::logout(); | 325 | Auth::logout(); |
327 | $it = User_Model::find($user_id); | 326 | $it = User_Model::find($user_id); |
328 | //$it->delete(); | 327 | //$it->delete(); |
329 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 328 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
330 | } else { | 329 | } else { |
331 | return redirect()->route('worker.delete_profile') | 330 | return redirect()->route('worker.delete_profile') |
332 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 331 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
333 | } | 332 | } |
334 | } | 333 | } |
335 | 334 | ||
336 | // Регистрация соискателя | 335 | // Регистрация соискателя |
337 | public function register_worker(Request $request) | 336 | public function register_worker(Request $request) |
338 | { | 337 | { |
339 | $params = $request->all(); | 338 | $params = $request->all(); |
340 | 339 | ||
341 | $rules = [ | 340 | $rules = [ |
342 | 'surname' => ['required', 'string', 'max:255'], | 341 | 'surname' => ['required', 'string', 'max:255'], |
343 | 'name_man' => ['required', 'string', 'max:255'], | 342 | 'name_man' => ['required', 'string', 'max:255'], |
344 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 343 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
345 | 'password' => ['required', 'string', 'min:8'], | 344 | 'password' => ['required', 'string', 'min:8'], |
346 | ]; | 345 | ]; |
347 | 346 | ||
348 | $messages = [ | 347 | $messages = [ |
349 | 'required' => 'Укажите обязательное поле', | 348 | 'required' => 'Укажите обязательное поле', |
350 | 'min' => [ | 349 | 'min' => [ |
351 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 350 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
352 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 351 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
353 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 352 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
354 | ], | 353 | ], |
355 | 'max' => [ | 354 | 'max' => [ |
356 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 355 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
357 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 356 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
358 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 357 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
359 | ] | 358 | ] |
360 | ]; | 359 | ]; |
361 | 360 | ||
362 | if ($request->get('password') !== $request->get('confirmed')){ | 361 | if ($request->get('password') !== $request->get('confirmed')){ |
363 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 362 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
364 | } | 363 | } |
365 | 364 | ||
366 | $validator = Validator::make($request->all(), $rules, $messages); | 365 | $validator = Validator::make($request->all(), $rules, $messages); |
367 | 366 | ||
368 | if ($validator->fails()) { | 367 | if ($validator->fails()) { |
369 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 368 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
370 | } else { | 369 | } else { |
371 | $user = $this->create($params); | 370 | $user = $this->create($params); |
372 | event(new Registered($user)); | 371 | event(new Registered($user)); |
373 | 372 | ||
374 | Auth::guard()->login($user); | 373 | Auth::guard()->login($user); |
375 | } | 374 | } |
376 | if ($user) { | 375 | if ($user) { |
377 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; | 376 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; |
378 | } else { | 377 | } else { |
379 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 378 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
380 | } | 379 | } |
381 | } | 380 | } |
382 | 381 | ||
383 | // Создание пользователя | 382 | // Создание пользователя |
384 | protected function create(array $data) | 383 | protected function create(array $data) |
385 | { | 384 | { |
386 | $Use = new User(); | 385 | $Use = new User(); |
387 | $Code_user = $Use->create([ | 386 | $Code_user = $Use->create([ |
388 | 'name' => $data['surname']." ".$data['name_man'], | 387 | 'name' => $data['surname']." ".$data['name_man'], |
389 | 'name_man' => $data['name_man'], | 388 | 'name_man' => $data['name_man'], |
390 | 'surname' => $data['surname'], | 389 | 'surname' => $data['surname'], |
391 | 'surname2' => $data['surname2'], | 390 | 'surname2' => $data['surname2'], |
392 | 'subscribe_email' => $data['email'], | 391 | 'subscribe_email' => $data['email'], |
393 | 'email' => $data['email'], | 392 | 'email' => $data['email'], |
394 | 'telephone' => $data['telephone'], | 393 | 'telephone' => $data['telephone'], |
395 | 'password' => Hash::make($data['password']), | 394 | 'password' => Hash::make($data['password']), |
396 | 'pubpassword' => base64_encode($data['password']), | 395 | 'pubpassword' => base64_encode($data['password']), |
397 | 'email_verified_at' => Carbon::now() | 396 | 'email_verified_at' => Carbon::now() |
398 | ]); | 397 | ]); |
399 | if ($Code_user->id > 0) { | 398 | if ($Code_user->id > 0) { |
400 | $Worker = new Worker(); | 399 | $Worker = new Worker(); |
401 | $Worker->user_id = $Code_user->id; | 400 | $Worker->user_id = $Code_user->id; |
402 | $Worker->position_work = $data['job_titles']; | 401 | $Worker->position_work = $data['job_titles']; |
403 | $Worker->email = $data['email']; | 402 | $Worker->email = $data['email']; |
404 | $Worker->telephone = $data['telephone']; | 403 | $Worker->telephone = $data['telephone']; |
405 | $Worker->save(); | 404 | $Worker->save(); |
406 | 405 | ||
407 | return $Code_user; | 406 | return $Code_user; |
408 | } | 407 | } |
409 | } | 408 | } |
410 | 409 | ||
411 | // Борьба против колорадских жуков, хотя жуков победил все таки 45. | 410 | // Борьба против колорадских жуков, хотя жуков победил все таки 45. |
412 | public function colorado(Request $request) { | 411 | public function colorado(Request $request) { |
413 | if (isset($_COOKIE['favorite_vac'])) { | 412 | if (isset($_COOKIE['favorite_vac'])) { |
414 | $items = RusDate::count_vacancy_fav(); | 413 | $items = RusDate::count_vacancy_fav(); |
415 | $it = $_COOKIE['favorite_vac']; | 414 | $it = $_COOKIE['favorite_vac']; |
416 | $it = str_replace('"', "", $it); | 415 | $it = str_replace('"', "", $it); |
417 | $it = str_replace('[', "", $it); | 416 | $it = str_replace('[', "", $it); |
418 | $it = str_replace(']', "", $it); | 417 | $it = str_replace(']', "", $it); |
419 | $Arr = explode(",", $it); | 418 | $Arr = explode(",", $it); |
420 | } else { | 419 | } else { |
421 | $Arr = Array(); | 420 | $Arr = Array(); |
422 | } | 421 | } |
423 | 422 | ||
424 | $Query = Ad_employer::Query(); | 423 | $Query = Ad_employer::Query(); |
425 | if (count($Arr) > 0) { | 424 | if (count($Arr) > 0) { |
426 | $Query = $Query->whereIn('id', $Arr); | 425 | $Query = $Query->whereIn('id', $Arr); |
427 | } | 426 | } |
428 | $Query = $Query->with('jobs')-> | 427 | $Query = $Query->with('jobs')-> |
429 | with('cat')-> | 428 | with('cat')-> |
430 | with('employer')-> | 429 | with('employer')-> |
431 | whereHas('jobs_code', function ($query) use ($request) { | 430 | whereHas('jobs_code', function ($query) use ($request) { |
432 | if ($request->ajax()) { | 431 | if ($request->ajax()) { |
433 | if (null !== ($request->get('job'))) { | 432 | if (null !== ($request->get('job'))) { |
434 | $query->where('job_title_id', $request->get('job')); | 433 | $query->where('job_title_id', $request->get('job')); |
435 | } | 434 | } |
436 | } | 435 | } |
437 | })->select('ad_employers.*'); | 436 | })->select('ad_employers.*'); |
438 | 437 | ||
439 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 438 | $Job_title = Job_title::query()->OrderBy('name')->get(); |
440 | 439 | ||
441 | $Query_count = $Query->count(); | 440 | $Query_count = $Query->count(); |
442 | 441 | ||
443 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 442 | $Query = $Query->OrderBy('updated_at')->paginate(3); |
444 | 443 | ||
445 | return view('workers.favorite', compact('Query', | 444 | return view('workers.favorite', compact('Query', |
446 | 'Query_count', | 445 | 'Query_count', |
447 | 'Job_title')); | 446 | 'Job_title')); |
448 | 447 | ||
449 | } | 448 | } |
450 | 449 | ||
451 | //Переписка пись-пись-пись | 450 | //Переписка пись-пись-пись |
452 | public function dialog(User_Model $user1, User_Model $user2) { | 451 | public function dialog(User_Model $user1, User_Model $user2) { |
453 | if (isset($user2->id)) { | 452 | if (isset($user2->id)) { |
454 | $companion = User_Model::query()->with('workers')-> | 453 | $companion = User_Model::query()->with('workers')-> |
455 | with('employers')-> | 454 | with('employers')-> |
456 | where('id', $user2->id)->first(); | 455 | where('id', $user2->id)->first(); |
457 | } | 456 | } |
458 | 457 | ||
459 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { | 458 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { |
460 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 459 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
461 | })->orWhere(function($query) use ($user1, $user2) { | 460 | })->orWhere(function($query) use ($user1, $user2) { |
462 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 461 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
463 | })->OrderBy('created_at')->get(); | 462 | })->OrderBy('created_at')->get(); |
464 | 463 | ||
465 | $id_vac = null; | 464 | $id_vac = null; |
466 | foreach ($Messages as $it) { | 465 | foreach ($Messages as $it) { |
467 | if (isset($it->response)) { | 466 | if (isset($it->response)) { |
468 | foreach ($it->response as $r) { | 467 | foreach ($it->response as $r) { |
469 | if (isset($r->ad_employer_id)) { | 468 | if (isset($r->ad_employer_id)) { |
470 | $id_vac = $r->ad_employer_id; | 469 | $id_vac = $r->ad_employer_id; |
471 | break; | 470 | break; |
472 | } | 471 | } |
473 | } | 472 | } |
474 | } | 473 | } |
475 | if (!is_null($id_vac)) break; | 474 | if (!is_null($id_vac)) break; |
476 | } | 475 | } |
477 | 476 | ||
478 | $ad_employer = null; | 477 | $ad_employer = null; |
479 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 478 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
480 | $sender = $user1; | 479 | $sender = $user1; |
481 | 480 | ||
482 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); | 481 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); |
483 | } | 482 | } |
484 | 483 | ||
485 | // Даунылоады | 484 | // Даунылоады |
486 | public function download(Worker $worker) { | 485 | public function download(Worker $worker) { |
487 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; | 486 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; |
488 | view()->share('house',$arr_house); | 487 | view()->share('house',$arr_house); |
489 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); | 488 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); |
490 | return $pdf->stream(); | 489 | return $pdf->stream(); |
491 | } | 490 | } |
492 | 491 | ||
493 | // Поднятие анкеты | 492 | // Поднятие анкеты |
494 | public function up(Worker $worker) { | 493 | public function up(Worker $worker) { |
495 | $worker->updated_at = Carbon::now(); | 494 | $worker->updated_at = Carbon::now(); |
496 | $worker->save(); | 495 | $worker->save(); |
497 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); | 496 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); |
498 | } | 497 | } |
499 | 498 | ||
500 | // Добавление сертификата | 499 | // Добавление сертификата |
501 | public function add_serificate(Request $request) { | 500 | public function add_serificate(Request $request) { |
502 | $params = $request->all(); | 501 | $params = $request->all(); |
503 | $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); | 502 | $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); |
504 | $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); | 503 | $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); |
505 | $Sertificate = new sertification(); | 504 | $Sertificate = new sertification(); |
506 | $Sertificate->create($params); | 505 | $Sertificate->create($params); |
507 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); | 506 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); |
508 | return view('ajax.documents', compact('Docs')); | 507 | return view('ajax.documents', compact('Docs')); |
509 | } | 508 | } |
510 | 509 | ||
511 | 510 | ||
512 | // Удалить сертификат | 511 | // Удалить сертификат |
513 | public function delete_sertificate(sertification $doc) { | 512 | public function delete_sertificate(sertification $doc) { |
514 | $doc->delete(); | 513 | $doc->delete(); |
515 | 514 | ||
516 | return redirect()->route('worker.cabinet'); | 515 | return redirect()->route('worker.cabinet'); |
517 | } | 516 | } |
518 | 517 | ||
519 | // Добавление диплома | 518 | // Добавление диплома |
520 | public function add_diplom_ajax(Request $request) { | 519 | public function add_diplom_ajax(Request $request) { |
521 | // конец | 520 | // конец |
522 | $params = $request->all(); | 521 | $params = $request->all(); |
523 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 522 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
524 | 523 | ||
525 | if ($count == 0) $dop_info = Dop_info::create($params); | 524 | if ($count == 0) $dop_info = Dop_info::create($params); |
526 | $Infoblocks = infobloks::query()->get(); | 525 | $Infoblocks = infobloks::query()->get(); |
527 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); | 526 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); |
528 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); | 527 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); |
529 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); | 528 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); |
530 | } | 529 | } |
531 | 530 | ||
532 | // Добавление диплома без ajax | 531 | // Добавление диплома без ajax |
533 | public function add_diplom(Worker $worker) { | 532 | public function add_diplom(Worker $worker) { |
534 | $worker_id = $worker->id; | 533 | $worker_id = $worker->id; |
535 | $Infoblocks = infobloks::query()->get(); | 534 | $Infoblocks = infobloks::query()->get(); |
536 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); | 535 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); |
537 | } | 536 | } |
538 | // Сохранить | 537 | // Сохранить |
539 | // Сохраняю диплом | 538 | // Сохраняю диплом |
540 | public function add_diplom_save(Request $request) { | 539 | public function add_diplom_save(Request $request) { |
541 | $params = $request->all(); | 540 | $params = $request->all(); |
542 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 541 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
543 | if ($count == 0) $dop_info = Dop_info::create($params); | 542 | if ($count == 0) $dop_info = Dop_info::create($params); |
544 | return redirect()->route('worker.cabinet'); | 543 | return redirect()->route('worker.cabinet'); |
545 | } | 544 | } |
546 | 545 | ||
547 | // Добавление стандартного документа | 546 | // Добавление стандартного документа |
548 | public function add_document(Worker $worker) { | 547 | public function add_document(Worker $worker) { |
549 | return view('workers.docs', compact('worker')); | 548 | return view('workers.docs', compact('worker')); |
550 | } | 549 | } |
551 | 550 | ||
552 | //Сохранение стандартого документа | 551 | //Сохранение стандартого документа |
553 | public function add_document_save(DocumentsRequest $request) { | 552 | public function add_document_save(DocumentsRequest $request) { |
554 | $params = $request->all(); | 553 | $params = $request->all(); |
555 | $place_work = place_works::create($params); | 554 | $place_work = place_works::create($params); |
556 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); | 555 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); |
557 | } | 556 | } |
558 | 557 | ||
559 | // Редактирование документа | 558 | // Редактирование документа |
560 | public function edit_document(place_works $doc, Worker $worker) { | 559 | public function edit_document(place_works $doc, Worker $worker) { |
561 | return view('workers.docs-edit', compact('doc', 'worker')); | 560 | return view('workers.docs-edit', compact('doc', 'worker')); |
562 | } | 561 | } |
563 | 562 | ||
564 | //Сохранение отредактированного документа | 563 | //Сохранение отредактированного документа |
565 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { | 564 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { |
566 | $params = $request->all(); | 565 | $params = $request->all(); |
567 | $doc->update($params); | 566 | $doc->update($params); |
568 | 567 | ||
569 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | 568 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); |
570 | } | 569 | } |
571 | 570 | ||
572 | // Удаление документа | 571 | // Удаление документа |
573 | public function delete_document(place_works $doc) { | 572 | public function delete_document(place_works $doc) { |
574 | $doc->delete(); | 573 | $doc->delete(); |
575 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | 574 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); |
576 | } | 575 | } |
577 | 576 | ||
578 | //Отправка нового сообщения | 577 | //Отправка нового сообщения |
579 | public function new_message(Request $request) { | 578 | public function new_message(Request $request) { |
580 | $params = $request->all(); | 579 | $params = $request->all(); |
581 | 580 | ||
582 | $id = $params['send_user_id']; | 581 | $id = $params['send_user_id']; |
583 | $message = new Message(); | 582 | $message = new Message(); |
584 | $message->user_id = $params['send_user_id']; | 583 | $message->user_id = $params['send_user_id']; |
585 | $message->to_user_id = $params['send_to_user_id']; | 584 | $message->to_user_id = $params['send_to_user_id']; |
586 | $message->title = $params['send_title']; | 585 | $message->title = $params['send_title']; |
587 | $message->text = $params['send_text']; | 586 | $message->text = $params['send_text']; |
588 | if ($request->has('send_file')) { | 587 | if ($request->has('send_file')) { |
589 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); | 588 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); |
590 | } | 589 | } |
591 | $message->flag_new = 1; | 590 | $message->flag_new = 1; |
592 | $id_message = $message->save(); | 591 | $id_message = $message->save(); |
593 | 592 | ||
594 | $data['message_id'] = $id_message; | 593 | $data['message_id'] = $id_message; |
595 | $data['ad_employer_id'] = $params['send_vacancy']; | 594 | $data['ad_employer_id'] = $params['send_vacancy']; |
596 | $data['job_title_id'] = $params['send_job_title_id']; | 595 | $data['job_title_id'] = $params['send_job_title_id']; |
597 | $data['flag'] = 1; | 596 | $data['flag'] = 1; |
598 | $ad_responce = ad_response::create($data); | 597 | $ad_responce = ad_response::create($data); |
599 | return redirect()->route('worker.messages', ['type_message' => 'output']); | 598 | return redirect()->route('worker.messages', ['type_message' => 'output']); |
600 | } | 599 | } |
601 | } | 600 | } |
602 | 601 | ||
603 | 602 |
resources/views/index.blade.php
1 | @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <section class="work"> | 8 | <section class="work"> |
9 | <div class="container"> | 9 | <div class="container"> |
10 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> | 10 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> |
11 | <div class="work__body"> | 11 | <div class="work__body"> |
12 | <div class="work__title"> | 12 | <div class="work__title"> |
13 | Работа в море / | 13 | <h4>Работа в море / |
14 | <span class="br">Работа на реке</span> | 14 | <span class="br">Работа на реке</span></h4> |
15 | </div> | 15 | </div> |
16 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — | 16 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — |
17 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в | 17 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в |
18 | сложных, но очень интересных условиях. </div> | 18 | сложных, но очень интересных условиях. </div> |
19 | <div class="work__list"> | 19 | <div class="work__list"> |
20 | <div>Тысячи соискателей увидят Ваше объявление</div> | 20 | <div>Тысячи соискателей увидят Ваше объявление</div> |
21 | <div>Десятки компаний выкладывают объявления каждый день</div> | 21 | <div>Десятки компаний выкладывают объявления каждый день</div> |
22 | </div> | 22 | </div> |
23 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> | 23 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> |
24 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> | 24 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> |
25 | <button type="submit" class="button button_light">Посмотреть вакансии</button> | 25 | <button type="submit" class="button button_light">Посмотреть вакансии</button> |
26 | <span> | 26 | <span> |
27 | <svg> | 27 | <svg> |
28 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 28 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
29 | </svg> | 29 | </svg> |
30 | </span> | 30 | </span> |
31 | </form> | 31 | </form> |
32 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> | 32 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> |
33 | <div class="work__get"> | 33 | <div class="work__get"> |
34 | <b>Скачать приложение</b> | 34 | <b>Скачать приложение</b> |
35 | <a href=""> | 35 | <a href=""> |
36 | <img src="{{ asset('images/google.svg') }}" alt=""> | 36 | <img src="{{ asset('images/google.svg') }}" alt=""> |
37 | </a> | 37 | </a> |
38 | <a href=""> | 38 | <a href=""> |
39 | <img src="{{ asset('images/apple.svg') }}" alt=""> | 39 | <img src="{{ asset('images/apple.svg') }}" alt=""> |
40 | </a> | 40 | </a> |
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | </div> | 43 | </div> |
44 | </section> | 44 | </section> |
45 | <section class="numbers"> | 45 | <section class="numbers"> |
46 | <div class="container"> | 46 | <div class="container"> |
47 | <div class="numbers__body"> | 47 | <div class="numbers__body"> |
48 | <div class="numbers__item"> | 48 | <div class="numbers__item"> |
49 | <b>500+</b> | 49 | <b>500+</b> |
50 | <span>Резюме</span> | 50 | <span>Резюме</span> |
51 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют | 51 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют |
52 | фракционных разногласий и призваны к ответу. | 52 | фракционных разногласий и призваны к ответу. |
53 | </div> | 53 | </div> |
54 | <div class="numbers__item"> | 54 | <div class="numbers__item"> |
55 | <b>1 000+</b> | 55 | <b>1 000+</b> |
56 | <span>Вакансий</span> | 56 | <span>Вакансий</span> |
57 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих | 57 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих |
58 | собственных рациональных ограничений. | 58 | собственных рациональных ограничений. |
59 | </div> | 59 | </div> |
60 | <div class="numbers__item"> | 60 | <div class="numbers__item"> |
61 | <b>265</b> | 61 | <b>265</b> |
62 | <span>Компаний</span> | 62 | <span>Компаний</span> |
63 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных | 63 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных |
64 | ограничений. | 64 | ограничений. |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | </div> | 67 | </div> |
68 | </section> | 68 | </section> |
69 | <section class="vacancies"> | 69 | <section class="vacancies"> |
70 | <div class="container"> | 70 | <div class="container"> |
71 | <div class="title">Новые вакансии</div> | 71 | <div class="title"><h4>Новые вакансии</h4></div> |
72 | <div class="vacancies__body"> | 72 | <div class="vacancies__body"> |
73 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> | 73 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> |
74 | <div class="vacancies__list"> | 74 | <div class="vacancies__list"> |
75 | @if ($categories->count()) | 75 | @if ($categories->count()) |
76 | @foreach ($categories as $cat) | 76 | @foreach ($categories as $cat) |
77 | <a href="#" class="vacancies__item"> | 77 | <a href="#" class="vacancies__item"> |
78 | <span style="border-color:#F4C4C2"> | 78 | <span style="border-color:#F4C4C2"> |
79 | <b>{{ $cat->name }}</b> | 79 | <b>{{ $cat->name }}</b> |
80 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> | 80 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> |
81 | </span> | 81 | </span> |
82 | </a> | 82 | </a> |
83 | @endforeach | 83 | @endforeach |
84 | @else | 84 | @else |
85 | Тут пока нет никаких вакансий | 85 | Тут пока нет никаких вакансий |
86 | @endif | 86 | @endif |
87 | </div> | 87 | </div> |
88 | </div> | 88 | </div> |
89 | </div> | 89 | </div> |
90 | </section> | 90 | </section> |
91 | <section class="employer"> | 91 | <section class="employer"> |
92 | <div class="container"> | 92 | <div class="container"> |
93 | <div class="title">Работодатели</div> | 93 | <div class="title"><h4>Работодатели</h4></div> |
94 | <div class="swiper js-employer-swiper"> | 94 | <div class="swiper js-employer-swiper"> |
95 | <div class="swiper-wrapper"> | 95 | <div class="swiper-wrapper"> |
96 | 96 | ||
97 | @if ($employers->count()) | 97 | @if ($employers->count()) |
98 | @php | 98 | @php |
99 | $rec = 0; | 99 | $rec = 0; |
100 | $count = $employers->count(); | 100 | $count = $employers->count(); |
101 | @endphp | 101 | @endphp |
102 | @foreach($employers as $emp) | 102 | @foreach($employers as $emp) |
103 | @php $rec++ @endphp | 103 | @php $rec++ @endphp |
104 | @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) | 104 | @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) |
105 | <div class="swiper-slide"> | 105 | <div class="swiper-slide"> |
106 | <div class="employer__item"> | 106 | <div class="employer__item"> |
107 | @endif | 107 | @endif |
108 | @if (!empty($emp->logo)) | 108 | @if (!empty($emp->logo)) |
109 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> | 109 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> |
110 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> | 110 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> |
111 | </a> | 111 | </a> |
112 | @else | 112 | @else |
113 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> | 113 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> |
114 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> | 114 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> |
115 | </a> | 115 | </a> |
116 | @endif | 116 | @endif |
117 | @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) | 117 | @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) |
118 | </div> | 118 | </div> |
119 | </div> | 119 | </div> |
120 | @endif | 120 | @endif |
121 | @endforeach | 121 | @endforeach |
122 | @else | 122 | @else |
123 | <h5>Тут нет никаких записей</h5> | 123 | <h5>Тут нет никаких записей</h5> |
124 | @endif | 124 | @endif |
125 | </div> | 125 | </div> |
126 | <div class="swiper-pagination"></div> | 126 | <div class="swiper-pagination"></div> |
127 | </div> | 127 | </div> |
128 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> | 128 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> |
129 | </div> | 129 | </div> |
130 | </section> | 130 | </section> |
131 | <section class="about"> | 131 | <section class="about"> |
132 | <div class="container"> | 132 | <div class="container"> |
133 | <div class="about__wrapper"> | 133 | <div class="about__wrapper"> |
134 | <div class="title about__title">О нас</div> | 134 | <div class="title about__title"><h4>О нас</h4></div> |
135 | <div class="about__body"> | 135 | <div class="about__body"> |
136 | <div class="about__line"></div> | 136 | <div class="about__line"></div> |
137 | <div class="about__item"> | 137 | <div class="about__item"> |
138 | <b>Для работодателей</b> | 138 | <b>Для работодателей</b> |
139 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие | 139 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие |
140 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> | 140 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> |
141 | <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a> | 141 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> |
142 | </div> | 142 | </div> |
143 | <div class="about__item"> | 143 | <div class="about__item"> |
144 | <b>Для сотрудников</b> | 144 | <b>Для сотрудников</b> |
145 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и | 145 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и |
146 | СНГ ищут сотрудников через наши ресурсы</span> | 146 | СНГ ищут сотрудников через наши ресурсы</span> |
147 | <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a> | 147 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> |
148 | </div> | 148 | </div> |
149 | </div> | 149 | </div> |
150 | </div> | 150 | </div> |
151 | </div> | 151 | </div> |
152 | </section> | 152 | </section> |
153 | <section class="news"> | 153 | <section class="news"> |
154 | <div class="container"> | 154 | <div class="container"> |
155 | <div class="news__toper"> | 155 | <div class="news__toper"> |
156 | <div class="title">Новости и статьи</div> | 156 | <div class="title"><h4>Новости и статьи</h4></div> |
157 | <div class="navs"> | 157 | <div class="navs"> |
158 | <button class="js-news-swiper-button-prev"> | 158 | <button class="js-news-swiper-button-prev"> |
159 | <svg class="rotate180"> | 159 | <svg class="rotate180"> |
160 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 160 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
161 | </svg> | 161 | </svg> |
162 | </button> | 162 | </button> |
163 | <button class="js-news-swiper-button-next"> | 163 | <button class="js-news-swiper-button-next"> |
164 | <svg> | 164 | <svg> |
165 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 165 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
166 | </svg> | 166 | </svg> |
167 | </button> | 167 | </button> |
168 | </div> | 168 | </div> |
169 | </div> | 169 | </div> |
170 | <div class="swiper js-news-swiper"> | 170 | <div class="swiper js-news-swiper"> |
171 | <div class="swiper-wrapper"> | 171 | <div class="swiper-wrapper"> |
172 | @if ($news->count()) | 172 | @if ($news->count()) |
173 | @foreach ($news as $new) | 173 | @foreach ($news as $new) |
174 | <div class="swiper-slide"> | 174 | <div class="swiper-slide"> |
175 | <div class="news__item"> | 175 | <div class="news__item"> |
176 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> | 176 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> |
177 | <div class="news__item-body"> | 177 | <div class="news__item-body"> |
178 | <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time> | 178 | <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time> |
179 | <span class="news__item-title">{{ $new->title }}</span> | 179 | <span class="news__item-title">{{ $new->title }}</span> |
180 | <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> | 180 | <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> |
181 | <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> | 181 | <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> |
182 | </div> | 182 | </div> |
183 | </div> | 183 | </div> |
184 | </div> | 184 | </div> |
185 | @endforeach | 185 | @endforeach |
186 | @endif | 186 | @endif |
187 | </div> | 187 | </div> |
188 | <div class="swiper-pagination"></div> | 188 | <div class="swiper-pagination"></div> |
189 | </div> | 189 | </div> |
190 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> | 190 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> |
191 | </div> | 191 | </div> |
192 | </section> | 192 | </section> |
193 | <section class="info"> | 193 | <section class="info"> |
194 | <div class="container"> | 194 | <div class="container"> |
195 | <img src="images/5.png" alt="" class="info__pic"> | 195 | <img src="images/5.png" alt="" class="info__pic"> |
196 | <div class="info__body"> | 196 | <div class="info__body"> |
197 | <div class="title info__title">Мы в социальных сетях</div> | 197 | <div class="title info__title"><h4>Мы в социальных сетях</h4></div> |
198 | <div class="info__item"> | 198 | <div class="info__item"> |
199 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о | 199 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о |
200 | новых вакансиях прямо на свой смартфон</div> | 200 | новых вакансиях прямо на свой смартфон</div> |
201 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> | 201 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> |
202 | <svg> | 202 | <svg> |
203 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 203 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
204 | </svg> | 204 | </svg> |
205 | Телеграм | 205 | Телеграм |
206 | </a> | 206 | </a> |
207 | </div> | 207 | </div> |
208 | <div class="info__item"> | 208 | <div class="info__item"> |
209 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация | 209 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация |
210 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> | 210 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> |
211 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> | 211 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> |
212 | <svg> | 212 | <svg> |
213 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 213 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
214 | </svg> | 214 | </svg> |
215 | ВКонтакте | 215 | ВКонтакте |
216 | </a> | 216 | </a> |
217 | </div> | 217 | </div> |
218 | </div> | 218 | </div> |
219 | </div> | 219 | </div> |
220 | </section> | 220 | </section> |
221 | @endsection | 221 | @endsection |
222 | 222 |
resources/views/layout/frontend.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | 2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>{{ $title }}</title> | 6 | <title>{{ $title }}</title> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
8 | <meta name="theme-color" content="#377D87"> | 8 | <meta name="theme-color" content="#377D87"> |
9 | <script src="{{ asset('js/jquery.js') }}"></script> | 9 | <script src="{{ asset('js/jquery.js') }}"></script> |
10 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> | 10 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> |
11 | <link rel="stylesheet" href="{{ asset('css/style_new.css') }}"> | 11 | <link rel="stylesheet" href="{{ asset('css/style_new.css') }}"> |
12 | <style> | 12 | <style> |
13 | .err_red { | 13 | .err_red { |
14 | border: red 2px solid; | 14 | border: red 2px solid; |
15 | } | 15 | } |
16 | </style> | 16 | </style> |
17 | </head> | 17 | </head> |
18 | 18 | ||
19 | <body id="body"> | 19 | <body id="body"> |
20 | <a href="#body" class="to-top js-scroll-to"> | 20 | <a href="#body" class="to-top js-scroll-to"> |
21 | <svg> | 21 | <svg> |
22 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 22 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
23 | </svg> | 23 | </svg> |
24 | </a> | 24 | </a> |
25 | 25 | ||
26 | <div> <!-- BEGIN TOP WRAPPER --> | 26 | <div> <!-- BEGIN TOP WRAPPER --> |
27 | <header class="header"> | 27 | <header class="header"> |
28 | <div class="container"> | 28 | <div class="container"> |
29 | <div class="header__body"> | 29 | <div class="header__body"> |
30 | <div class="header__left"> | 30 | <div class="header__left"> |
31 | <a href="{{ route('index') }}" class="header__logo"> | 31 | <a href="{{ route('index') }}" class="header__logo"> |
32 | <svg> | 32 | <svg> |
33 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 33 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
34 | </svg> | 34 | </svg> |
35 | </a> | 35 | </a> |
36 | <nav class="header__menu"> | 36 | <nav class="header__menu"> |
37 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> | 37 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> |
38 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> | 38 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> |
39 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> | 39 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> |
40 | </nav> | 40 | </nav> |
41 | </div> | 41 | </div> |
42 | <div class="header__right"> | 42 | <div class="header__right"> |
43 | @guest | 43 | @guest |
44 | 44 | ||
45 | @else | 45 | @else |
46 | <button class="header__notifs header__notifs_actived"> | 46 | <button class="header__notifs header__notifs_actived"> |
47 | <svg> | 47 | <svg> |
48 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> | 48 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> |
49 | </svg> | 49 | </svg> |
50 | <span>Уведомления</span> | 50 | <span>Уведомления</span> |
51 | </button> | 51 | </button> |
52 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs"> | 52 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs"> |
53 | Кабинет | 53 | Кабинет |
54 | </a> | 54 | </a> |
55 | @endguest | 55 | @endguest |
56 | <div class="header__right-line"></div> | 56 | <div class="header__right-line"></div> |
57 | <button class="header__burger"> | 57 | <button class="header__burger"> |
58 | <svg> | 58 | <svg> |
59 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> | 59 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> |
60 | </svg> | 60 | </svg> |
61 | </button> | 61 | </button> |
62 | @guest | 62 | @guest |
63 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> | 63 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> |
64 | @else | 64 | @else |
65 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> | 65 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> |
66 | @endguest | 66 | @endguest |
67 | </div> | 67 | </div> |
68 | </div> | 68 | </div> |
69 | </div> | 69 | </div> |
70 | </header> | 70 | </header> |
71 | @yield('content') | 71 | @yield('content') |
72 | </div> <!-- END TOP WRAPPER --> | 72 | </div> <!-- END TOP WRAPPER --> |
73 | 73 | ||
74 | <div> <!-- BEGIN BOTTOM WRAPPER --> | 74 | <div> <!-- BEGIN BOTTOM WRAPPER --> |
75 | <footer class="footer"> | 75 | <footer class="footer"> |
76 | <div class="container"> | 76 | <div class="container"> |
77 | <div class="footer__mobile"> | 77 | <div class="footer__mobile"> |
78 | 78 | ||
79 | <button class="footer__mobile-toper js-toggle active"> | 79 | <button class="footer__mobile-toper js-toggle active"> |
80 | <a href="{{ route('index') }}"> | 80 | <a href="{{ route('index') }}"> |
81 | <svg> | 81 | <svg> |
82 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 82 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
83 | </svg> | 83 | </svg> |
84 | </a> | 84 | </a> |
85 | <span> | 85 | <span> |
86 | <svg> | 86 | <svg> |
87 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 87 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
88 | </svg> | 88 | </svg> |
89 | </span> | 89 | </span> |
90 | </button> | 90 | </button> |
91 | <div class="footer__mobile-menu"> | 91 | <div class="footer__mobile-menu"> |
92 | <div class="footer__mobile-menu-item"> | 92 | <div class="footer__mobile-menu-item"> |
93 | <button class="js-toggle"> | 93 | <button class="js-toggle"> |
94 | <b>Соискателям</b> | 94 | <b>Соискателям</b> |
95 | <span><svg> | 95 | <span><svg> |
96 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 96 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
97 | </svg></span> | 97 | </svg></span> |
98 | </button> | 98 | </button> |
99 | <div> | 99 | <div> |
100 | <a href="{{ route('vacancies') }}">Вакансии</a> | 100 | <a href="{{ route('vacancies') }}">Вакансии</a> |
101 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 101 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
102 | <a href="{{ route('education') }}">Образование</a> | 102 | <a href="{{ route('education') }}">Образование</a> |
103 | <a href="{{ route('news') }}">Новости</a> | 103 | <a href="{{ route('news') }}">Новости</a> |
104 | <a href="{{ route('contacts') }}">Контакты</a> | 104 | <a href="{{ route('contacts') }}">Контакты</a> |
105 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 105 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
106 | </div> | 106 | </div> |
107 | </div> | 107 | </div> |
108 | <div class="footer__mobile-menu-item"> | 108 | <div class="footer__mobile-menu-item"> |
109 | <button class="js-toggle"> | 109 | <button class="js-toggle"> |
110 | <b>Работодателям</b> | 110 | <b>Работодателям</b> |
111 | <span><svg> | 111 | <span><svg> |
112 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> | 112 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> |
113 | </svg></span> | 113 | </svg></span> |
114 | </button> | 114 | </button> |
115 | <div> | 115 | <div> |
116 | <a href="{{ route('register') }}">Регистрация</a> | 116 | <a href="{{ route('register') }}">Регистрация</a> |
117 | <a href="{{ route('bd_resume') }}">База резюме</a> | 117 | <a href="{{ route('bd_resume') }}">База резюме</a> |
118 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 118 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
119 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 119 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
120 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 120 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
121 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 121 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
122 | </div> | 122 | </div> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | <div class="footer__mobile-contacts"> | 125 | <div class="footer__mobile-contacts"> |
126 | <b>Контакты</b> | 126 | <b>Контакты</b> |
127 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 127 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
128 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 128 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
129 | </div> | 129 | </div> |
130 | <div class="footer__mobile-bottom"> | 130 | <div class="footer__mobile-bottom"> |
131 | <div class="socials"> | 131 | <div class="socials"> |
132 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 132 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
133 | <svg> | 133 | <svg> |
134 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 134 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
135 | </svg> | 135 | </svg> |
136 | </a> | 136 | </a> |
137 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 137 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
138 | <svg> | 138 | <svg> |
139 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 139 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
140 | </svg> | 140 | </svg> |
141 | </a> | 141 | </a> |
142 | </div> | 142 | </div> |
143 | <nav class="footer__mobile-links"> | 143 | <nav class="footer__mobile-links"> |
144 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 144 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
145 | <span></span> | 145 | <span></span> |
146 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 146 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
147 | </nav> | 147 | </nav> |
148 | © 2023 — RekaMore.su | 148 | © 2023 — RekaMore.su |
149 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 149 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
150 | <svg> | 150 | <svg> |
151 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 151 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
152 | </svg> | 152 | </svg> |
153 | <span> | 153 | <span> |
154 | Дизайн и разработка: | 154 | Дизайн и разработка: |
155 | <b>NoLogoStudio.ru</b> | 155 | <b>NoLogoStudio.ru</b> |
156 | </span> | 156 | </span> |
157 | </a> | 157 | </a> |
158 | </div> | 158 | </div> |
159 | </div> | 159 | </div> |
160 | <div class="footer__main"> | 160 | <div class="footer__main"> |
161 | <div class="footer__main-body"> | 161 | <div class="footer__main-body"> |
162 | 162 | ||
163 | <a href="" class="footer__main-logo"> | 163 | <a href="" class="footer__main-logo"> |
164 | <svg> | 164 | <svg> |
165 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 165 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
166 | </svg> | 166 | </svg> |
167 | </a> | 167 | </a> |
168 | <div class="footer__main-col"> | 168 | <div class="footer__main-col"> |
169 | <div class="footer__main-title">Соискателям</div> | 169 | <div class="footer__main-title">Соискателям</div> |
170 | <nav> | 170 | <nav> |
171 | <a href="{{ route('vacancies') }}">Вакансии</a> | 171 | <a href="{{ route('vacancies') }}">Вакансии</a> |
172 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 172 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
173 | <a href="{{ route('education') }}">Образование</a> | 173 | <a href="{{ route('education') }}">Образование</a> |
174 | <a href="{{ route('news') }}">Новости</a> | 174 | <a href="{{ route('news') }}">Новости</a> |
175 | <a href="{{ route('contacts') }}">Контакты</a> | 175 | <a href="{{ route('contacts') }}">Контакты</a> |
176 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 176 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
177 | </nav> | 177 | </nav> |
178 | </div> | 178 | </div> |
179 | <div class="footer__main-col"> | 179 | <div class="footer__main-col"> |
180 | <div class="footer__main-title">Работодателям</div> | 180 | <div class="footer__main-title">Работодателям</div> |
181 | <nav> | 181 | <nav> |
182 | <a href="{{ route('register') }}">Регистрация</a> | 182 | <a href="{{ route('register') }}">Регистрация</a> |
183 | <a href="{{ route('bd_resume') }}">База резюме</a> | 183 | <a href="{{ route('bd_resume') }}">База резюме</a> |
184 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 184 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
185 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 185 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
186 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 186 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
187 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 187 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
188 | </nav> | 188 | </nav> |
189 | </div> | 189 | </div> |
190 | 190 | ||
191 | <div class="footer__main-col"> | 191 | <div class="footer__main-col"> |
192 | <div class="footer__main-title">Контакты</div> | 192 | <div class="footer__main-title">Контакты</div> |
193 | <div class="footer__main-contacts"> | 193 | <div class="footer__main-contacts"> |
194 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 194 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
195 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 195 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
196 | </div> | 196 | </div> |
197 | <div class="socials"> | 197 | <div class="socials"> |
198 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 198 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
199 | <svg> | 199 | <svg> |
200 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 200 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
201 | </svg> | 201 | </svg> |
202 | </a> | 202 | </a> |
203 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 203 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
204 | <svg> | 204 | <svg> |
205 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 205 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
206 | </svg> | 206 | </svg> |
207 | </a> | 207 | </a> |
208 | </div> | 208 | </div> |
209 | </div> | 209 | </div> |
210 | </div> | 210 | </div> |
211 | <pre>{{ print_r($_COOKIE) }}</pre> | 211 | |
212 | <div class="footer__main-copy"> | 212 | <div class="footer__main-copy"> |
213 | <div>© 2023 — RekaMore.su</div> | 213 | <div>© 2023 — RekaMore.su</div> |
214 | <nav> | 214 | <nav> |
215 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 215 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
216 | <span></span> | 216 | <span></span> |
217 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 217 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
218 | </nav> | 218 | </nav> |
219 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 219 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
220 | <svg> | 220 | <svg> |
221 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 221 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
222 | </svg> | 222 | </svg> |
223 | <span> | 223 | <span> |
224 | Дизайн и разработка: | 224 | Дизайн и разработка: |
225 | <b>NoLogoStudio.ru</b> | 225 | <b>NoLogoStudio.ru</b> |
226 | </span> | 226 | </span> |
227 | </a> | 227 | </a> |
228 | </div> | 228 | </div> |
229 | </div> | 229 | </div> |
230 | </div> | 230 | </div> |
231 | </footer> | 231 | </footer> |
232 | </div> <!-- END BOTTOM WRAPPER --> | 232 | </div> <!-- END BOTTOM WRAPPER --> |
233 | 233 | ||
234 | <div hidden> <!-- BEGIN MODALS WRAPPER --> | 234 | <div hidden> <!-- BEGIN MODALS WRAPPER --> |
235 | <!-- Соискатель отправляет сообщение работодателю --> | 235 | <!-- Соискатель отправляет сообщение работодателю --> |
236 | @include('modals.send_worker') | 236 | @include('modals.send_worker') |
237 | 237 | ||
238 | <!-- Работодатель отправляет сообщение соискателю --> | 238 | <!-- Работодатель отправляет сообщение соискателю --> |
239 | @include('modals.send_employer') | 239 | @include('modals.send_employer') |
240 | 240 | ||
241 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> | 241 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> |
242 | @include('modals.send_message_noaut') | 242 | @include('modals.send_message_noaut') |
243 | 243 | ||
244 | <!-- Форма авторизации --> | 244 | <!-- Форма авторизации --> |
245 | @include('modals.send_login') | 245 | @include('modals.send_login') |
246 | 246 | ||
247 | <!-- Сбросить пароль --> | 247 | <!-- Сбросить пароль --> |
248 | @include('modals.reset_password') | 248 | @include('modals.reset_password') |
249 | 249 | ||
250 | <!-- Регистрация --> | 250 | <!-- Регистрация --> |
251 | @include('modals.register') | 251 | @include('modals.register') |
252 | 252 | ||
253 | <!-- Благодарность по отправке сообщения работодателю --> | 253 | <!-- Благодарность по отправке сообщения работодателю --> |
254 | @include('modals.thank_you_send_employer') | 254 | @include('modals.thank_you_send_employer') |
255 | 255 | ||
256 | <!-- Благодарность по отправке сообщения менеджеру --> | 256 | <!-- Благодарность по отправке сообщения менеджеру --> |
257 | @include('modals.thank_you_send_manager') | 257 | @include('modals.thank_you_send_manager') |
258 | 258 | ||
259 | <!-- Благодарность после регистрации --> | 259 | <!-- Благодарность после регистрации --> |
260 | @include('modals.thank_you_send_for_employer') | 260 | @include('modals.thank_you_send_for_employer') |
261 | 261 | ||
262 | <!-- Благодарность после регистрации для работника --> | 262 | <!-- Благодарность после регистрации для работника --> |
263 | @include('modals.thank_you_send_for_worker') | 263 | @include('modals.thank_you_send_for_worker') |
264 | 264 | ||
265 | <!-- Подтверждение удаления профиля --> | 265 | <!-- Подтверждение удаления профиля --> |
266 | @include('modals.delete_profile') | 266 | @include('modals.delete_profile') |
267 | 267 | ||
268 | <!-- Подверждение об удалении профиля --> | 268 | <!-- Подверждение об удалении профиля --> |
269 | @include('modals.success_delete_profile') | 269 | @include('modals.success_delete_profile') |
270 | 270 | ||
271 | </div> <!-- END MODALS WRAPPER --> | 271 | </div> <!-- END MODALS WRAPPER --> |
272 | 272 | ||
273 | 273 | ||
274 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> | 274 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> |
275 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> | 275 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> |
276 | <script src="{{ asset('js/jquery.select2.js') }}"></script> | 276 | <script src="{{ asset('js/jquery.select2.js') }}"></script> |
277 | <script src="{{ asset('js/swiper.js') }}"></script> | 277 | <script src="{{ asset('js/swiper.js') }}"></script> |
278 | <script src="{{ asset('js/script.js') }}"></script> | 278 | <script src="{{ asset('js/script.js') }}"></script> |
279 | <script> | 279 | <script> |
280 | var getUrlParameter = function getUrlParameter(sParam) { | 280 | var getUrlParameter = function getUrlParameter(sParam) { |
281 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), | 281 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), |
282 | sURLVariables = sPageURL.split('&'), | 282 | sURLVariables = sPageURL.split('&'), |
283 | sParameterName, | 283 | sParameterName, |
284 | i; | 284 | i; |
285 | for (i = 0; i < sURLVariables.length; i++) { | 285 | for (i = 0; i < sURLVariables.length; i++) { |
286 | sParameterName = sURLVariables[i].split('='); | 286 | sParameterName = sURLVariables[i].split('='); |
287 | if (sParameterName[0] === sParam) { | 287 | if (sParameterName[0] === sParam) { |
288 | return sParameterName[1] === undefined ? true : sParameterName[1]; | 288 | return sParameterName[1] === undefined ? true : sParameterName[1]; |
289 | } | 289 | } |
290 | } | 290 | } |
291 | }; | 291 | }; |
292 | </script> | 292 | </script> |
293 | @yield('scripts') | 293 | @yield('scripts') |
294 | 294 | ||
295 | @include('js.modals') | 295 | @include('js.modals') |
296 | </body> | 296 | </body> |
297 | </html> | 297 | </html> |
298 | 298 |