Commit ddb8f38fb5c15e3fc5bd04800fd7c45b9e3d18fa
1 parent
2e9be88ab5
Exists in
master
and in
1 other branch
Коммит по редизайну вакансий объявления
Showing 8 changed files with 81 additions and 54 deletions Inline Diff
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/JobTitlesRequest.php
- resources/views/admin/job_titles/form.blade.php
- resources/views/ajax/list_vacancies.blade.php
- resources/views/info_company_new.blade.php
- resources/views/list_vacancies.blade.php
- resources/views/vacance-item.blade.php
- resources/views/workers/favorite.blade.php
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\Http\Requests\PrevCompanyRequest; | 7 | use App\Http\Requests\PrevCompanyRequest; |
8 | use App\Http\Requests\SertificationRequest; | 8 | use App\Http\Requests\SertificationRequest; |
9 | use App\Models\Ad_employer; | 9 | use App\Models\Ad_employer; |
10 | use App\Models\ad_response; | 10 | use App\Models\ad_response; |
11 | use App\Models\Category; | 11 | use App\Models\Category; |
12 | use App\Models\Dop_info; | 12 | use App\Models\Dop_info; |
13 | use App\Models\Employer; | 13 | use App\Models\Employer; |
14 | use App\Models\infobloks; | 14 | use App\Models\infobloks; |
15 | use App\Models\Job_title; | 15 | use App\Models\Job_title; |
16 | use App\Models\Like_vacancy; | 16 | use App\Models\Like_vacancy; |
17 | use App\Models\Like_worker; | 17 | use App\Models\Like_worker; |
18 | use App\Models\Message; | 18 | use App\Models\Message; |
19 | use App\Models\place_works; | 19 | use App\Models\place_works; |
20 | use App\Models\PrevCompany; | 20 | use App\Models\PrevCompany; |
21 | use App\Models\reclame; | 21 | use App\Models\reclame; |
22 | use App\Models\ResponseWork; | 22 | use App\Models\ResponseWork; |
23 | use App\Models\sertification; | 23 | use App\Models\sertification; |
24 | use App\Models\Static_worker; | 24 | use App\Models\Static_worker; |
25 | use App\Models\Title_worker; | 25 | use App\Models\Title_worker; |
26 | use App\Models\User; | 26 | use App\Models\User; |
27 | use App\Models\User as User_Model; | 27 | use App\Models\User as User_Model; |
28 | use App\Models\Worker; | 28 | use App\Models\Worker; |
29 | use Barryvdh\DomPDF\Facade\Pdf; | 29 | use Barryvdh\DomPDF\Facade\Pdf; |
30 | use Carbon\Carbon; | 30 | use Carbon\Carbon; |
31 | use Illuminate\Auth\Events\Registered; | 31 | use Illuminate\Auth\Events\Registered; |
32 | use Illuminate\Database\Eloquent\Builder; | 32 | use Illuminate\Database\Eloquent\Builder; |
33 | use Illuminate\Database\Eloquent\Model; | 33 | use Illuminate\Database\Eloquent\Model; |
34 | use Illuminate\Http\JsonResponse; | 34 | use Illuminate\Http\JsonResponse; |
35 | use Illuminate\Http\Request; | 35 | use Illuminate\Http\Request; |
36 | use Illuminate\Support\Facades\Auth; | 36 | use Illuminate\Support\Facades\Auth; |
37 | use Illuminate\Support\Facades\Hash; | 37 | use Illuminate\Support\Facades\Hash; |
38 | use Illuminate\Support\Facades\Storage; | 38 | use Illuminate\Support\Facades\Storage; |
39 | use Illuminate\Support\Facades\Validator; | 39 | use Illuminate\Support\Facades\Validator; |
40 | 40 | ||
41 | class WorkerController extends Controller | 41 | class WorkerController extends Controller |
42 | { | 42 | { |
43 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); | 43 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); |
44 | 44 | ||
45 | //профиль | 45 | //профиль |
46 | public function profile(Worker $worker) | 46 | public function profile(Worker $worker) |
47 | { | 47 | { |
48 | $get_date = date('Y.m'); | 48 | $get_date = date('Y.m'); |
49 | 49 | ||
50 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 50 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
51 | ->where('user_id', '=', $worker->users->id) | 51 | ->where('user_id', '=', $worker->users->id) |
52 | ->get(); | 52 | ->get(); |
53 | 53 | ||
54 | if ($c->count() > 0) { | 54 | if ($c->count() > 0) { |
55 | $upd = Static_worker::find($c[0]->id); | 55 | $upd = Static_worker::find($c[0]->id); |
56 | $upd->lookin = $upd->lookin + 1; | 56 | $upd->lookin = $upd->lookin + 1; |
57 | $upd->save(); | 57 | $upd->save(); |
58 | } else { | 58 | } else { |
59 | $crt = new Static_worker(); | 59 | $crt = new Static_worker(); |
60 | $crt->lookin = 1; | 60 | $crt->lookin = 1; |
61 | $crt->year_month = $get_date; | 61 | $crt->year_month = $get_date; |
62 | $crt->user_id = $worker->user_id; | 62 | $crt->user_id = $worker->user_id; |
63 | $crt->save(); | 63 | $crt->save(); |
64 | } | 64 | } |
65 | 65 | ||
66 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 66 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
67 | ->where('user_id', '=', $worker->users->id) | 67 | ->where('user_id', '=', $worker->users->id) |
68 | ->get(); | 68 | ->get(); |
69 | 69 | ||
70 | return view('public.workers.profile', compact('worker', 'stat')); | 70 | return view('public.workers.profile', compact('worker', 'stat')); |
71 | } | 71 | } |
72 | 72 | ||
73 | // лист база резюме | 73 | // лист база резюме |
74 | public function bd_resume(Request $request) | 74 | public function bd_resume(Request $request) |
75 | { | 75 | { |
76 | $look = false; | 76 | $look = false; |
77 | $idiot = 0; | 77 | $idiot = 0; |
78 | if (isset(Auth()->user()->id)) { | 78 | if (isset(Auth()->user()->id)) { |
79 | $idiot = Auth()->user()->id; | 79 | $idiot = Auth()->user()->id; |
80 | if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin)) | 80 | if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin)) |
81 | $look = true; | 81 | $look = true; |
82 | } | 82 | } |
83 | 83 | ||
84 | if ($look) { | 84 | if ($look) { |
85 | $status_work = $this->status_work; | 85 | $status_work = $this->status_work; |
86 | $resumes = Worker::query()->with('users')->with('job_titles'); | 86 | $resumes = Worker::query()->with('users')->with('job_titles'); |
87 | $resumes = $resumes->whereHas('users', function (Builder $query) { | 87 | $resumes = $resumes->whereHas('users', function (Builder $query) { |
88 | $query->Where('is_worker', '=', '1') | 88 | $query->Where('is_worker', '=', '1') |
89 | ->Where('is_bd', '=', '0'); | 89 | ->Where('is_bd', '=', '0'); |
90 | }); | 90 | }); |
91 | 91 | ||
92 | //dd($request->get('job')); | 92 | //dd($request->get('job')); |
93 | if (($request->has('job')) && ($request->get('job') > 0)) { | 93 | if (($request->has('job')) && ($request->get('job') > 0)) { |
94 | $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) { | 94 | $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) { |
95 | $query->Where('job_titles.id', $request->get('job')); | 95 | $query->Where('job_titles.id', $request->get('job')); |
96 | }); | 96 | }); |
97 | } | 97 | } |
98 | 98 | ||
99 | $Job_title = Job_title::query()-> | 99 | $Job_title = Job_title::query()-> |
100 | where('is_remove', '=', '0')-> | 100 | where('is_remove', '=', '0')-> |
101 | where('is_bd', '=' , '1')-> | 101 | where('is_bd', '=' , '1')-> |
102 | get(); | 102 | get(); |
103 | 103 | ||
104 | if ($request->get('sort')) { | 104 | if ($request->get('sort')) { |
105 | $sort = $request->get('sort'); | 105 | $sort = $request->get('sort'); |
106 | switch ($sort) { | 106 | switch ($sort) { |
107 | case 'name_up': | 107 | case 'name_up': |
108 | $resumes = $resumes->orderBy(User::select('surname') | 108 | $resumes = $resumes->orderBy(User::select('surname') |
109 | ->whereColumn('Workers.user_id', 'users.id') | 109 | ->whereColumn('Workers.user_id', 'users.id') |
110 | ); | 110 | ); |
111 | break; | 111 | break; |
112 | case 'name_down': | 112 | case 'name_down': |
113 | $resumes = $resumes->orderByDesc(User::select('surname') | 113 | $resumes = $resumes->orderByDesc(User::select('surname') |
114 | ->whereColumn('Workers.user_id', 'users.id') | 114 | ->whereColumn('Workers.user_id', 'users.id') |
115 | ); | 115 | ); |
116 | break; | 116 | break; |
117 | case 'created_at_up': | 117 | case 'created_at_up': |
118 | $resumes = $resumes->OrderBy('created_at')->orderBy('id'); | 118 | $resumes = $resumes->OrderBy('created_at')->orderBy('id'); |
119 | break; | 119 | break; |
120 | case 'created_at_down': | 120 | case 'created_at_down': |
121 | $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); | 121 | $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); |
122 | break; | 122 | break; |
123 | case 'default': | 123 | case 'default': |
124 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); | 124 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); |
125 | break; | 125 | break; |
126 | default: | 126 | default: |
127 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); | 127 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); |
128 | break; | 128 | break; |
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | $res_count = $resumes->count(); | 132 | $res_count = $resumes->count(); |
133 | //$resumes = $resumes->get(); | 133 | //$resumes = $resumes->get(); |
134 | $resumes = $resumes->paginate(4); | 134 | $resumes = $resumes->paginate(4); |
135 | if ($request->ajax()) { | 135 | if ($request->ajax()) { |
136 | // Условия обставлены | 136 | // Условия обставлены |
137 | if ($request->has('block') && ($request->get('block') == 1)) { | 137 | if ($request->has('block') && ($request->get('block') == 1)) { |
138 | return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); | 138 | return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); |
139 | } | 139 | } |
140 | 140 | ||
141 | if ($request->has('block') && ($request->get('block') == 2)) { | 141 | if ($request->has('block') && ($request->get('block') == 2)) { |
142 | return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); | 142 | return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); |
143 | } | 143 | } |
144 | } else { | 144 | } else { |
145 | return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title')); | 145 | return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title')); |
146 | } | 146 | } |
147 | } else { | 147 | } else { |
148 | return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); | 148 | return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | //Лайк резюме | 152 | //Лайк резюме |
153 | public function like_controller() { | 153 | public function like_controller() { |
154 | 154 | ||
155 | } | 155 | } |
156 | 156 | ||
157 | // анкета соискателя | 157 | // анкета соискателя |
158 | public function resume_profile(Worker $worker) | 158 | public function resume_profile(Worker $worker) |
159 | { | 159 | { |
160 | if (isset(Auth()->user()->id)) { | 160 | if (isset(Auth()->user()->id)) { |
161 | $idiot = Auth()->user()->id; | 161 | $idiot = Auth()->user()->id; |
162 | } else { | 162 | } else { |
163 | $idiot = 0; | 163 | $idiot = 0; |
164 | } | 164 | } |
165 | 165 | ||
166 | $status_work = $this->status_work; | 166 | $status_work = $this->status_work; |
167 | $Query = Worker::query()->with('users')->with('job_titles') | 167 | $Query = Worker::query()->with('users')->with('job_titles') |
168 | ->with('place_worker')->with('sertificate')->with('prev_company') | 168 | ->with('place_worker')->with('sertificate')->with('prev_company') |
169 | ->with('infobloks')->with('response'); | 169 | ->with('infobloks')->with('response'); |
170 | $Query = $Query->where('id', '=', $worker->id); | 170 | $Query = $Query->where('id', '=', $worker->id); |
171 | $Query = $Query->get(); | 171 | $Query = $Query->get(); |
172 | 172 | ||
173 | $get_date = date('Y.m'); | 173 | $get_date = date('Y.m'); |
174 | 174 | ||
175 | $infoblocks = infobloks::query()->get(); | 175 | $infoblocks = infobloks::query()->get(); |
176 | 176 | ||
177 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 177 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
178 | ->where('user_id', '=', $worker->user_id) | 178 | ->where('user_id', '=', $worker->user_id) |
179 | ->get(); | 179 | ->get(); |
180 | 180 | ||
181 | if ($c->count() > 0) { | 181 | if ($c->count() > 0) { |
182 | $upd = Static_worker::find($c[0]->id); | 182 | $upd = Static_worker::find($c[0]->id); |
183 | $upd->lookin = $upd->lookin + 1; | 183 | $upd->lookin = $upd->lookin + 1; |
184 | $upd->save(); | 184 | $upd->save(); |
185 | } else { | 185 | } else { |
186 | $crt = new Static_worker(); | 186 | $crt = new Static_worker(); |
187 | $crt->lookin = 1; | 187 | $crt->lookin = 1; |
188 | $crt->year_month = $get_date; | 188 | $crt->year_month = $get_date; |
189 | $crt->user_id = $worker->user_id; | 189 | $crt->user_id = $worker->user_id; |
190 | $status = $crt->save(); | 190 | $status = $crt->save(); |
191 | } | 191 | } |
192 | 192 | ||
193 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 193 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
194 | ->where('user_id', '=', $worker->user_id) | 194 | ->where('user_id', '=', $worker->user_id) |
195 | ->get(); | 195 | ->get(); |
196 | 196 | ||
197 | return view('worker', compact('Query', 'infoblocks', 'status_work', 'idiot', 'stat')); | 197 | return view('worker', compact('Query', 'infoblocks', 'status_work', 'idiot', 'stat')); |
198 | } | 198 | } |
199 | 199 | ||
200 | // скачать анкету соискателя | 200 | // скачать анкету соискателя |
201 | public function resume_download(Worker $worker) | 201 | public function resume_download(Worker $worker) |
202 | { | 202 | { |
203 | $status_work = $this->status_work; | 203 | $status_work = $this->status_work; |
204 | $Query = Worker::query()->with('users')->with('job_titles') | 204 | $Query = Worker::query()->with('users')->with('job_titles') |
205 | ->with('place_worker')->with('sertificate')->with('prev_company') | 205 | ->with('place_worker')->with('sertificate')->with('prev_company') |
206 | ->with('infobloks'); | 206 | ->with('infobloks'); |
207 | $Query = $Query->where('id', '=', $worker->id); | 207 | $Query = $Query->where('id', '=', $worker->id); |
208 | $Query = $Query->get()->toArray(); | 208 | $Query = $Query->get()->toArray(); |
209 | 209 | ||
210 | view()->share('Query',$Query); | 210 | view()->share('Query',$Query); |
211 | 211 | ||
212 | 212 | ||
213 | $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); | 213 | $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); |
214 | 214 | ||
215 | return $pdf->stream(); | 215 | return $pdf->stream(); |
216 | } | 216 | } |
217 | 217 | ||
218 | public function resume_download_all() { | 218 | public function resume_download_all() { |
219 | $status_work = $this->status_work; | 219 | $status_work = $this->status_work; |
220 | $Query = Worker::query()->with('users')->with('job_titles') | 220 | $Query = Worker::query()->with('users')->with('job_titles') |
221 | ->with('place_worker')->with('sertificate')->with('prev_company') | 221 | ->with('place_worker')->with('sertificate')->with('prev_company') |
222 | ->with('infobloks')-> | 222 | ->with('infobloks')-> |
223 | whereHas('users', function (Builder $query) { | 223 | whereHas('users', function (Builder $query) { |
224 | $query->Where('is_worker', '=', '1') | 224 | $query->Where('is_worker', '=', '1') |
225 | ->Where('is_bd', '=', '1'); | 225 | ->Where('is_bd', '=', '1'); |
226 | }); | 226 | }); |
227 | //$Query = $Query->where('id', '=', $worker->id); | 227 | //$Query = $Query->where('id', '=', $worker->id); |
228 | $Query = $Query->get()->toArray(); | 228 | $Query = $Query->get()->toArray(); |
229 | 229 | ||
230 | view()->share('Query',$Query); | 230 | view()->share('Query',$Query); |
231 | 231 | ||
232 | $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape'); | 232 | $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape'); |
233 | 233 | ||
234 | return $pdf->stream(); | 234 | return $pdf->stream(); |
235 | } | 235 | } |
236 | 236 | ||
237 | // Кабинет работника | 237 | // Кабинет работника |
238 | public function cabinet(Request $request) | 238 | public function cabinet(Request $request) |
239 | { | 239 | { |
240 | // дата год и месяц | 240 | // дата год и месяц |
241 | $get_date = date('Y.m'); | 241 | $get_date = date('Y.m'); |
242 | 242 | ||
243 | $id = Auth()->user()->id; | 243 | $id = Auth()->user()->id; |
244 | 244 | ||
245 | $Infobloks = infobloks::query()->get(); | 245 | $Infobloks = infobloks::query()->get(); |
246 | 246 | ||
247 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> | 247 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> |
248 | with('infobloks')->with('place_worker')-> | 248 | with('infobloks')->with('place_worker')-> |
249 | WhereHas('users', | 249 | WhereHas('users', |
250 | function (Builder $query) use ($id) {$query->Where('id', $id); | 250 | function (Builder $query) use ($id) {$query->Where('id', $id); |
251 | })->get(); | 251 | })->get(); |
252 | 252 | ||
253 | $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> | 253 | $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> |
254 | where('is_bd', '=' , '1')-> | 254 | where('is_bd', '=' , '1')-> |
255 | OrderByDesc('sort')->OrderBy('name')->get(); | 255 | OrderByDesc('sort')->OrderBy('name')->get(); |
256 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); | 256 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); |
257 | 257 | ||
258 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 258 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
259 | ->where('user_id', '=', $id) | 259 | ->where('user_id', '=', $id) |
260 | ->get(); | 260 | ->get(); |
261 | 261 | ||
262 | 262 | ||
263 | // 10% | 263 | // 10% |
264 | 264 | ||
265 | $persent = 10; | 265 | $persent = 10; |
266 | $persent1 = 0; | 266 | $persent1 = 0; |
267 | $persent2 = 0; | 267 | $persent2 = 0; |
268 | $persent3 = 0; | 268 | $persent3 = 0; |
269 | $persent4 = 0; | 269 | $persent4 = 0; |
270 | $persent5 = 0; | 270 | $persent5 = 0; |
271 | 271 | ||
272 | if ((!empty($Worker[0]->telephone)) && | 272 | if ((!empty($Worker[0]->telephone)) && |
273 | (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && | 273 | (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && |
274 | (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { | 274 | (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { |
275 | // 40% | 275 | // 40% |
276 | $persent = $persent + 40; | 276 | $persent = $persent + 40; |
277 | $persent1 = 40; | 277 | $persent1 = 40; |
278 | } | 278 | } |
279 | 279 | ||
280 | //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year); | 280 | //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year); |
281 | 281 | ||
282 | if ($Worker[0]->sertificate->count() > 0) { | 282 | if ($Worker[0]->sertificate->count() > 0) { |
283 | // 15% | 283 | // 15% |
284 | $persent = $persent + 15; | 284 | $persent = $persent + 15; |
285 | $persent2 = 15; | 285 | $persent2 = 15; |
286 | } | 286 | } |
287 | 287 | ||
288 | if ($Worker[0]->infobloks->count() > 0) { | 288 | if ($Worker[0]->infobloks->count() > 0) { |
289 | // 20% | 289 | // 20% |
290 | $persent = $persent + 20; | 290 | $persent = $persent + 20; |
291 | $persent3 = 20; | 291 | $persent3 = 20; |
292 | } | 292 | } |
293 | 293 | ||
294 | if ($Worker[0]->prev_company->count() > 0) { | 294 | if ($Worker[0]->prev_company->count() > 0) { |
295 | // 10% | 295 | // 10% |
296 | $persent = $persent + 10; | 296 | $persent = $persent + 10; |
297 | $persent4 = 10; | 297 | $persent4 = 10; |
298 | } | 298 | } |
299 | 299 | ||
300 | if (!empty($Worker[0]->photo)) { | 300 | if (!empty($Worker[0]->photo)) { |
301 | // 5% | 301 | // 5% |
302 | $persent = $persent + 5; | 302 | $persent = $persent + 5; |
303 | $persent5 = 5; | 303 | $persent5 = 5; |
304 | } | 304 | } |
305 | if ($request->has('print')) { | 305 | if ($request->has('print')) { |
306 | dd($Worker); | 306 | dd($Worker); |
307 | } else { | 307 | } else { |
308 | return view('workers.cabinet', compact('Worker', 'Infobloks', 'persent', 'Job_titles', 'Infoblocks', 'stat')); | 308 | return view('workers.cabinet', compact('Worker', 'Infobloks', 'persent', 'Job_titles', 'Infoblocks', 'stat')); |
309 | } | 309 | } |
310 | } | 310 | } |
311 | 311 | ||
312 | // Сохранение данных | 312 | // Сохранение данных |
313 | public function cabinet_save(Worker $worker, Request $request) | 313 | public function cabinet_save(Worker $worker, Request $request) |
314 | { | 314 | { |
315 | $id = $worker->id; | 315 | $id = $worker->id; |
316 | $params = $request->all(); | 316 | $params = $request->all(); |
317 | 317 | ||
318 | $job_title_id = $request->get('job_title_id'); | 318 | $job_title_id = $request->get('job_title_id'); |
319 | 319 | ||
320 | unset($params['new_diplom']); | 320 | unset($params['new_diplom']); |
321 | unset($params['new_data_begin']); | 321 | unset($params['new_data_begin']); |
322 | unset($params['new_data_end']); | 322 | unset($params['new_data_end']); |
323 | unset($params['new_job_title']); | 323 | unset($params['new_job_title']); |
324 | unset($params['new_teplohod']); | 324 | unset($params['new_teplohod']); |
325 | unset($params['new_GWT']); | 325 | unset($params['new_GWT']); |
326 | unset($params['new_KBT']); | 326 | unset($params['new_KBT']); |
327 | unset($params['new_Begin_work']); | 327 | unset($params['new_Begin_work']); |
328 | unset($params['new_End_work']); | 328 | unset($params['new_End_work']); |
329 | unset($params['new_name_company']); | 329 | unset($params['new_name_company']); |
330 | 330 | ||
331 | $rules = [ | 331 | $rules = [ |
332 | 'surname' => ['required', 'string', 'max:255'], | 332 | 'surname' => ['required', 'string', 'max:255'], |
333 | 'name_man' => ['required', 'string', 'max:255'], | 333 | 'name_man' => ['required', 'string', 'max:255'], |
334 | 'email' => ['required', 'string', 'email', 'max:255'], | 334 | 'email' => ['required', 'string', 'email', 'max:255'], |
335 | 335 | ||
336 | ]; | 336 | ]; |
337 | 337 | ||
338 | $messages = [ | 338 | $messages = [ |
339 | 'required' => 'Укажите обязательное поле', | 339 | 'required' => 'Укажите обязательное поле', |
340 | 'min' => [ | 340 | 'min' => [ |
341 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 341 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
342 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 342 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
343 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 343 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
344 | ], | 344 | ], |
345 | 'max' => [ | 345 | 'max' => [ |
346 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 346 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
347 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 347 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
348 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 348 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
349 | ] | 349 | ] |
350 | ]; | 350 | ]; |
351 | 351 | ||
352 | $validator = Validator::make($params, $rules, $messages); | 352 | $validator = Validator::make($params, $rules, $messages); |
353 | 353 | ||
354 | if ($validator->fails()) { | 354 | if ($validator->fails()) { |
355 | return redirect()->route('worker.cabinet')->withErrors($validator); | 355 | return redirect()->route('worker.cabinet')->withErrors($validator); |
356 | } else { | 356 | } else { |
357 | 357 | ||
358 | if ($request->has('photo')) { | 358 | if ($request->has('photo')) { |
359 | if (!empty($Worker->photo)) { | 359 | if (!empty($Worker->photo)) { |
360 | Storage::delete($Worker->photo); | 360 | Storage::delete($Worker->photo); |
361 | } | 361 | } |
362 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); | 362 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); |
363 | } | 363 | } |
364 | 364 | ||
365 | if ($request->has('file')) { | 365 | if ($request->has('file')) { |
366 | if (!empty($Worker->file)) { | 366 | if (!empty($Worker->file)) { |
367 | Storage::delete($Worker->file); | 367 | Storage::delete($Worker->file); |
368 | } | 368 | } |
369 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); | 369 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); |
370 | } | 370 | } |
371 | 371 | ||
372 | $id_wor = $worker->update($params); | 372 | $id_wor = $worker->update($params); |
373 | $use = User::find($worker->user_id); | 373 | $use = User::find($worker->user_id); |
374 | $use->surname = $request->get('surname'); | 374 | $use->surname = $request->get('surname'); |
375 | $use->name_man = $request->get('name_man'); | 375 | $use->name_man = $request->get('name_man'); |
376 | $use->surname2 = $request->get('surname2'); | 376 | $use->surname2 = $request->get('surname2'); |
377 | 377 | ||
378 | $use->save(); | 378 | $use->save(); |
379 | $worker->job_titles()->sync($job_title_id); | 379 | $worker->job_titles()->sync($job_title_id); |
380 | 380 | ||
381 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); | 381 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); |
382 | } | 382 | } |
383 | } | 383 | } |
384 | 384 | ||
385 | // Сообщения данные | 385 | // Сообщения данные |
386 | public function messages($type_message) | 386 | public function messages($type_message) |
387 | { | 387 | { |
388 | $user_id = Auth()->user()->id; | 388 | $user_id = Auth()->user()->id; |
389 | 389 | ||
390 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 390 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
391 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 391 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
392 | 392 | ||
393 | $messages_output = Message::query()->with('vacancies')-> | 393 | $messages_output = Message::query()->with('vacancies')-> |
394 | with('user_to')->where('user_id', $user_id)-> | 394 | with('user_to')->where('user_id', $user_id)-> |
395 | OrderByDesc('created_at'); | 395 | OrderByDesc('created_at'); |
396 | 396 | ||
397 | $count_input = $messages_input->count(); | 397 | $count_input = $messages_input->count(); |
398 | $count_output = $messages_output->count(); | 398 | $count_output = $messages_output->count(); |
399 | 399 | ||
400 | if ($type_message == 'input') { | 400 | if ($type_message == 'input') { |
401 | $messages = $messages_input->paginate(5); | 401 | $messages = $messages_input->paginate(5); |
402 | } | 402 | } |
403 | 403 | ||
404 | if ($type_message == 'output') { | 404 | if ($type_message == 'output') { |
405 | $messages = $messages_output->paginate(5); | 405 | $messages = $messages_output->paginate(5); |
406 | } | 406 | } |
407 | 407 | ||
408 | //dd($messages); | 408 | //dd($messages); |
409 | // Вернуть все 100% | 409 | // Вернуть все 100% |
410 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 410 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
411 | } | 411 | } |
412 | 412 | ||
413 | // Избранный | 413 | // Избранный |
414 | public function favorite() | 414 | public function favorite() |
415 | { | 415 | { |
416 | return view('workers.favorite'); | 416 | return view('workers.favorite'); |
417 | } | 417 | } |
418 | 418 | ||
419 | // Сменить пароль | 419 | // Сменить пароль |
420 | public function new_password() | 420 | public function new_password() |
421 | { | 421 | { |
422 | $email = Auth()->user()->email; | 422 | $email = Auth()->user()->email; |
423 | return view('workers.new_password', compact('email')); | 423 | return view('workers.new_password', compact('email')); |
424 | } | 424 | } |
425 | 425 | ||
426 | // Обновление пароля | 426 | // Обновление пароля |
427 | public function save_new_password(Request $request) { | 427 | public function save_new_password(Request $request) { |
428 | $use = Auth()->user(); | 428 | $use = Auth()->user(); |
429 | $request->validate([ | 429 | $request->validate([ |
430 | 'password' => 'required|string', | 430 | 'password' => 'required|string', |
431 | 'new_password' => 'required|string', | 431 | 'new_password' => 'required|string', |
432 | 'new_password2' => 'required|string' | 432 | 'new_password2' => 'required|string' |
433 | ]); | 433 | ]); |
434 | 434 | ||
435 | if ($request->get('new_password') == $request->get('new_password2')) | 435 | if ($request->get('new_password') == $request->get('new_password2')) |
436 | if ($request->get('password') !== $request->get('new_password')) { | 436 | if ($request->get('password') !== $request->get('new_password')) { |
437 | $credentials = $request->only('email', 'password'); | 437 | $credentials = $request->only('email', 'password'); |
438 | if (Auth::attempt($credentials, $request->has('save_me'))) { | 438 | if (Auth::attempt($credentials, $request->has('save_me'))) { |
439 | 439 | ||
440 | if (!is_null($use->email_verified_at)){ | 440 | if (!is_null($use->email_verified_at)){ |
441 | 441 | ||
442 | $user_data = User_Model::find($use->id); | 442 | $user_data = User_Model::find($use->id); |
443 | $user_data->update([ | 443 | $user_data->update([ |
444 | 'password' => Hash::make($request->get('new_password')), | 444 | 'password' => Hash::make($request->get('new_password')), |
445 | 'pubpassword' => base64_encode($request->get('new_password')), | 445 | 'pubpassword' => base64_encode($request->get('new_password')), |
446 | ]); | 446 | ]); |
447 | return redirect() | 447 | return redirect() |
448 | ->route('worker.new_password') | 448 | ->route('worker.new_password') |
449 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 449 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
450 | } | 450 | } |
451 | 451 | ||
452 | return redirect() | 452 | return redirect() |
453 | ->route('worker.new_password') | 453 | ->route('worker.new_password') |
454 | ->withError('Данная учетная запись не было верифицированна!'); | 454 | ->withError('Данная учетная запись не было верифицированна!'); |
455 | } | 455 | } |
456 | } | 456 | } |
457 | 457 | ||
458 | return redirect() | 458 | return redirect() |
459 | ->route('worker.new_password') | 459 | ->route('worker.new_password') |
460 | ->withErrors('Не совпадение данных, обновите пароли!'); | 460 | ->withErrors('Не совпадение данных, обновите пароли!'); |
461 | } | 461 | } |
462 | 462 | ||
463 | // Удаление профиля форма | 463 | // Удаление профиля форма |
464 | public function delete_profile() | 464 | public function delete_profile() |
465 | { | 465 | { |
466 | $login = Auth()->user()->email; | 466 | $login = Auth()->user()->email; |
467 | return view('workers.delete_profile', compact('login')); | 467 | return view('workers.delete_profile', compact('login')); |
468 | } | 468 | } |
469 | 469 | ||
470 | // Удаление профиля код | 470 | // Удаление профиля код |
471 | public function delete_profile_result(Request $request) { | 471 | public function delete_profile_result(Request $request) { |
472 | $Answer = $request->all(); | 472 | $Answer = $request->all(); |
473 | $user_id = Auth()->user()->id; | 473 | $user_id = Auth()->user()->id; |
474 | $request->validate([ | 474 | $request->validate([ |
475 | 'password' => 'required|string', | 475 | 'password' => 'required|string', |
476 | ]); | 476 | ]); |
477 | 477 | ||
478 | $credentials = $request->only('email', 'password'); | 478 | $credentials = $request->only('email', 'password'); |
479 | if (Auth::attempt($credentials)) { | 479 | if (Auth::attempt($credentials)) { |
480 | Auth::logout(); | 480 | Auth::logout(); |
481 | $it = User_Model::find($user_id); | 481 | $it = User_Model::find($user_id); |
482 | $it->delete(); | 482 | $it->delete(); |
483 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 483 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
484 | } else { | 484 | } else { |
485 | return redirect()->route('worker.delete_profile') | 485 | return redirect()->route('worker.delete_profile') |
486 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 486 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
487 | } | 487 | } |
488 | } | 488 | } |
489 | 489 | ||
490 | // Регистрация соискателя | 490 | // Регистрация соискателя |
491 | public function register_worker(Request $request) | 491 | public function register_worker(Request $request) |
492 | { | 492 | { |
493 | $params = $request->all(); | 493 | $params = $request->all(); |
494 | $params['is_worker'] = 1; | 494 | $params['is_worker'] = 1; |
495 | 495 | ||
496 | $rules = [ | 496 | $rules = [ |
497 | 'surname' => ['required', 'string', 'max:255'], | 497 | 'surname' => ['required', 'string', 'max:255'], |
498 | 'name_man' => ['required', 'string', 'max:255'], | 498 | 'name_man' => ['required', 'string', 'max:255'], |
499 | 'email' => ['required', 'email', 'max:255', 'unique:users'], | 499 | 'email' => ['required', 'email', 'max:255', 'unique:users'], |
500 | 'password' => ['required', 'string', 'min:6'] | 500 | 'password' => ['required', 'string', 'min:6'] |
501 | ]; | 501 | ]; |
502 | 502 | ||
503 | $messages = [ | 503 | $messages = [ |
504 | 'required' => 'Укажите обязательное поле', | 504 | 'required' => 'Укажите обязательное поле', |
505 | 'min' => [ | 505 | 'min' => [ |
506 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 506 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
507 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 507 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
508 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 508 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
509 | ], | 509 | ], |
510 | 'max' => [ | 510 | 'max' => [ |
511 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 511 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
512 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 512 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
513 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 513 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
514 | ] | 514 | ] |
515 | ]; | 515 | ]; |
516 | 516 | ||
517 | $email = $request->get('email'); | 517 | $email = $request->get('email'); |
518 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | 518 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { |
519 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | 519 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); |
520 | } | 520 | } |
521 | 521 | ||
522 | if ($request->get('password') !== $request->get('confirmed')){ | 522 | if ($request->get('password') !== $request->get('confirmed')){ |
523 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 523 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
524 | } | 524 | } |
525 | 525 | ||
526 | if (strlen($request->get('password')) < 6) { | 526 | if (strlen($request->get('password')) < 6) { |
527 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | 527 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); |
528 | } | 528 | } |
529 | 529 | ||
530 | /*$haystack = $request->get('password'); | 530 | /*$haystack = $request->get('password'); |
531 | 531 | ||
532 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); | 532 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); |
533 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', | 533 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', |
534 | 'X', 'C', 'V', 'B', 'N', 'M'); | 534 | 'X', 'C', 'V', 'B', 'N', 'M'); |
535 | $lenpwd_bool = true; | 535 | $lenpwd_bool = true; |
536 | $spec_bool = false; | 536 | $spec_bool = false; |
537 | $alpha_bool = false; | 537 | $alpha_bool = false; |
538 | 538 | ||
539 | if (strlen($haystack) < 8) $lenpwd_bool = false; | 539 | if (strlen($haystack) < 8) $lenpwd_bool = false; |
540 | 540 | ||
541 | foreach ($specsumbol as $it) { | 541 | foreach ($specsumbol as $it) { |
542 | if (strpos($haystack, $it) !== false) { | 542 | if (strpos($haystack, $it) !== false) { |
543 | $spec_bool = true; | 543 | $spec_bool = true; |
544 | } | 544 | } |
545 | } | 545 | } |
546 | 546 | ||
547 | foreach ($alpha as $it) { | 547 | foreach ($alpha as $it) { |
548 | if (strpos($haystack, $it) !== false) { | 548 | if (strpos($haystack, $it) !== false) { |
549 | $alpha_bool = true; | 549 | $alpha_bool = true; |
550 | } | 550 | } |
551 | } | 551 | } |
552 | 552 | ||
553 | if ((!$spec_bool) || (!$alpha_bool)) { | 553 | if ((!$spec_bool) || (!$alpha_bool)) { |
554 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); | 554 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); |
555 | }*/ | 555 | }*/ |
556 | 556 | ||
557 | if (($request->has('politik')) && ($request->get('politik') == 1)) { | 557 | if (($request->has('politik')) && ($request->get('politik') == 1)) { |
558 | $validator = Validator::make($params, $rules, $messages); | 558 | $validator = Validator::make($params, $rules, $messages); |
559 | 559 | ||
560 | if ($validator->fails()) { | 560 | if ($validator->fails()) { |
561 | return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 561 | return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
562 | } else { | 562 | } else { |
563 | //dd($params); | 563 | //dd($params); |
564 | $user = $this->create($params); | 564 | $user = $this->create($params); |
565 | event(new Registered($user)); | 565 | event(new Registered($user)); |
566 | Auth::guard()->login($user); | 566 | Auth::guard()->login($user); |
567 | } | 567 | } |
568 | if ($user) { | 568 | if ($user) { |
569 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; | 569 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; |
570 | } else { | 570 | } else { |
571 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 571 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
572 | } | 572 | } |
573 | 573 | ||
574 | } else { | 574 | } else { |
575 | return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); | 575 | return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); |
576 | } | 576 | } |
577 | } | 577 | } |
578 | 578 | ||
579 | // Звездная оценка и ответ | 579 | // Звездная оценка и ответ |
580 | public function stars_answer(Request $request) { | 580 | public function stars_answer(Request $request) { |
581 | $params = $request->all(); | 581 | $params = $request->all(); |
582 | $rules = [ | 582 | $rules = [ |
583 | 'message' => ['required', 'string', 'max:255'], | 583 | 'message' => ['required', 'string', 'max:255'], |
584 | ]; | 584 | ]; |
585 | 585 | ||
586 | $messages = [ | 586 | $messages = [ |
587 | 'required' => 'Укажите обязательное поле', | 587 | 'required' => 'Укажите обязательное поле', |
588 | 'min' => [ | 588 | 'min' => [ |
589 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 589 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
590 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 590 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
591 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 591 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
592 | ], | 592 | ], |
593 | 'max' => [ | 593 | 'max' => [ |
594 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 594 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
595 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 595 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
596 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 596 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
597 | ] | 597 | ] |
598 | ]; | 598 | ]; |
599 | $response_worker = ResponseWork::create($params); | 599 | $response_worker = ResponseWork::create($params); |
600 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); | 600 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); |
601 | } | 601 | } |
602 | 602 | ||
603 | public function TestWorker() | 603 | public function TestWorker() |
604 | { | 604 | { |
605 | $Use = new User(); | 605 | $Use = new User(); |
606 | 606 | ||
607 | $Code_user = $Use->create([ | 607 | $Code_user = $Use->create([ |
608 | 'name' => 'surname name_man', | 608 | 'name' => 'surname name_man', |
609 | 'name_man' => 'name_man', | 609 | 'name_man' => 'name_man', |
610 | 'surname' => 'surname', | 610 | 'surname' => 'surname', |
611 | 'surname2' => 'surname2', | 611 | 'surname2' => 'surname2', |
612 | 'subscribe_email' => '1', | 612 | 'subscribe_email' => '1', |
613 | 'email' => 'email@mail.com', | 613 | 'email' => 'email@mail.com', |
614 | 'telephone' => '1234567890', | 614 | 'telephone' => '1234567890', |
615 | 'password' => Hash::make('password'), | 615 | 'password' => Hash::make('password'), |
616 | 'pubpassword' => base64_encode('password'), | 616 | 'pubpassword' => base64_encode('password'), |
617 | 'email_verified_at' => Carbon::now(), | 617 | 'email_verified_at' => Carbon::now(), |
618 | 'is_worker' => 1, | 618 | 'is_worker' => 1, |
619 | ]); | 619 | ]); |
620 | 620 | ||
621 | if ($Code_user->id > 0) { | 621 | if ($Code_user->id > 0) { |
622 | $Worker = new Worker(); | 622 | $Worker = new Worker(); |
623 | $Worker->user_id = $Code_user->id; | 623 | $Worker->user_id = $Code_user->id; |
624 | $Worker->position_work = 1; //'job_titles'; | 624 | $Worker->position_work = 1; //'job_titles'; |
625 | $Worker->email = 'email@email.com'; | 625 | $Worker->email = 'email@email.com'; |
626 | $Worker->telephone = '1234567890'; | 626 | $Worker->telephone = '1234567890'; |
627 | $status = $Worker->save(); | 627 | $status = $Worker->save(); |
628 | 628 | ||
629 | $Title_Worker = new Title_worker(); | 629 | $Title_Worker = new Title_worker(); |
630 | $Title_Worker->worker_id = $Worker->id; | 630 | $Title_Worker->worker_id = $Worker->id; |
631 | $Title_Worker->job_title_id = 1; | 631 | $Title_Worker->job_title_id = 1; |
632 | $Title_Worker->save(); | 632 | $Title_Worker->save(); |
633 | } | 633 | } |
634 | } | 634 | } |
635 | 635 | ||
636 | // Создание пользователя | 636 | // Создание пользователя |
637 | protected function create(array $data) | 637 | protected function create(array $data) |
638 | { | 638 | { |
639 | $Use = new User(); | 639 | $Use = new User(); |
640 | 640 | ||
641 | $Code_user = $Use->create([ | 641 | $Code_user = $Use->create([ |
642 | 'name' => $data['surname']." ".$data['name_man'], | 642 | 'name' => $data['surname']." ".$data['name_man'], |
643 | 'name_man' => $data['name_man'], | 643 | 'name_man' => $data['name_man'], |
644 | 'surname' => $data['surname'], | 644 | 'surname' => $data['surname'], |
645 | 'surname2' => $data['surname2'], | 645 | 'surname2' => $data['surname2'], |
646 | 'subscribe_email' => $data['email'], | 646 | 'subscribe_email' => $data['email'], |
647 | 'email' => $data['email'], | 647 | 'email' => $data['email'], |
648 | 'telephone' => $data['telephone'], | 648 | 'telephone' => $data['telephone'], |
649 | 'password' => Hash::make($data['password']), | 649 | 'password' => Hash::make($data['password']), |
650 | 'pubpassword' => base64_encode($data['password']), | 650 | 'pubpassword' => base64_encode($data['password']), |
651 | 'email_verified_at' => Carbon::now(), | 651 | 'email_verified_at' => Carbon::now(), |
652 | 'is_worker' => $data['is_worker'], | 652 | 'is_worker' => $data['is_worker'], |
653 | ]); | 653 | ]); |
654 | 654 | ||
655 | if ($Code_user->id > 0) { | 655 | if ($Code_user->id > 0) { |
656 | $Worker = new Worker(); | 656 | $Worker = new Worker(); |
657 | $Worker->user_id = $Code_user->id; | 657 | $Worker->user_id = $Code_user->id; |
658 | $Worker->position_work = $data['job_titles']; | 658 | $Worker->position_work = $data['job_titles']; |
659 | $Worker->email = $data['email']; | 659 | $Worker->email = $data['email']; |
660 | $Worker->telephone = $data['telephone']; | 660 | $Worker->telephone = $data['telephone']; |
661 | $Worker->save(); | 661 | $Worker->save(); |
662 | 662 | ||
663 | if (isset($Worker->id)) { | 663 | if (isset($Worker->id)) { |
664 | $Title_Worker = new Title_worker(); | 664 | $Title_Worker = new Title_worker(); |
665 | $Title_Worker->worker_id = $Worker->id; | 665 | $Title_Worker->worker_id = $Worker->id; |
666 | $Title_Worker->job_title_id = $data['job_titles']; | 666 | $Title_Worker->job_title_id = $data['job_titles']; |
667 | $Title_Worker->save(); | 667 | $Title_Worker->save(); |
668 | } | 668 | } |
669 | 669 | ||
670 | return $Code_user; | 670 | return $Code_user; |
671 | } | 671 | } |
672 | } | 672 | } |
673 | 673 | ||
674 | // Вакансии избранные | 674 | // Вакансии избранные |
675 | public function colorado(Request $request) { | 675 | public function colorado(Request $request) { |
676 | $IP_address = RusDate::ip_addr_client(); | 676 | $IP_address = RusDate::ip_addr_client(); |
677 | $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); | 677 | $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); |
678 | 678 | ||
679 | if ($Arr->count()) { | 679 | if ($Arr->count()) { |
680 | $A = Array(); | 680 | $A = Array(); |
681 | foreach ($Arr as $it) { | 681 | foreach ($Arr as $it) { |
682 | $A[] = $it->code_record; | 682 | $A[] = $it->code_record; |
683 | } | 683 | } |
684 | 684 | ||
685 | $Query = Ad_employer::query()->whereIn('id', $A); | 685 | $Query = Ad_employer::query()->whereIn('id', $A); |
686 | } else { | 686 | } else { |
687 | $Query = Ad_employer::query()->where('id', '=', '0'); | 687 | $Query = Ad_employer::query()->where('id', '=', '0'); |
688 | } | 688 | } |
689 | 689 | ||
690 | $Query = $Query->with('jobs')-> | 690 | $Query = $Query->with('jobs')-> |
691 | with('cat')-> | 691 | with('cat')-> |
692 | with('employer')-> | 692 | with('employer')-> |
693 | whereHas('jobs_code', function ($query) use ($request) { | 693 | whereHas('jobs_code', function ($query) use ($request) { |
694 | if ($request->ajax()) { | 694 | if ($request->ajax()) { |
695 | if (null !== ($request->get('job'))) { | 695 | if (null !== ($request->get('job'))) { |
696 | $query->where('job_title_id', $request->get('job')); | 696 | $query->where('job_title_id', $request->get('job')); |
697 | } | 697 | } |
698 | } | 698 | } |
699 | })->select('ad_employers.*'); | 699 | })->select('ad_employers.*'); |
700 | 700 | ||
701 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 701 | $Job_title = Job_title::query()->OrderBy('name')->get(); |
702 | 702 | ||
703 | $Query_count = $Query->count(); | 703 | $Query_count = $Query->count(); |
704 | 704 | ||
705 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 705 | $Query = $Query->OrderBy('updated_at')->paginate(3); |
706 | 706 | ||
707 | |||
707 | return view('workers.favorite', compact('Query', | 708 | return view('workers.favorite', compact('Query', |
708 | 'Query_count', | 709 | 'Query_count', |
709 | 'Job_title')); | 710 | 'Job_title')); |
710 | 711 | ||
711 | } | 712 | } |
712 | 713 | ||
713 | //Переписка | 714 | //Переписка |
714 | public function dialog(User_Model $user1, User_Model $user2, Request $request) { | 715 | public function dialog(User_Model $user1, User_Model $user2, Request $request) { |
715 | // Получение параметров. | 716 | // Получение параметров. |
716 | if ($request->has('ad_employer')){ | 717 | if ($request->has('ad_employer')){ |
717 | $ad_employer = $request->get('ad_employer'); | 718 | $ad_employer = $request->get('ad_employer'); |
718 | } else { | 719 | } else { |
719 | $ad_employer = 0; | 720 | $ad_employer = 0; |
720 | } | 721 | } |
721 | 722 | ||
722 | if (isset($user1->id)) { | 723 | if (isset($user1->id)) { |
723 | $sender = User_Model::query()->with('workers')-> | 724 | $sender = User_Model::query()->with('workers')-> |
724 | with('employers')-> | 725 | with('employers')-> |
725 | where('id', $user1->id)->first(); | 726 | where('id', $user1->id)->first(); |
726 | } | 727 | } |
727 | 728 | ||
728 | if (isset($user2->id)) { | 729 | if (isset($user2->id)) { |
729 | $companion = User_Model::query()->with('workers')-> | 730 | $companion = User_Model::query()->with('workers')-> |
730 | with('employers')-> | 731 | with('employers')-> |
731 | where('id', $user2->id)->first(); | 732 | where('id', $user2->id)->first(); |
732 | } | 733 | } |
733 | 734 | ||
734 | $Messages = Message::query()-> | 735 | $Messages = Message::query()-> |
735 | //with('response')-> | 736 | //with('response')-> |
736 | where(function($query) use ($user1, $user2) { | 737 | where(function($query) use ($user1, $user2) { |
737 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 738 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
738 | })->orWhere(function($query) use ($user1, $user2) { | 739 | })->orWhere(function($query) use ($user1, $user2) { |
739 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 740 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
740 | })->OrderBy('created_at')->get(); | 741 | })->OrderBy('created_at')->get(); |
741 | 742 | ||
742 | $id_vac = null; | 743 | $id_vac = null; |
743 | /*foreach ($Messages as $it) { | 744 | /*foreach ($Messages as $it) { |
744 | if (isset($it->response)) { | 745 | if (isset($it->response)) { |
745 | foreach ($it->response as $r) { | 746 | foreach ($it->response as $r) { |
746 | if (isset($r->ad_employer_id)) { | 747 | if (isset($r->ad_employer_id)) { |
747 | $id_vac = $r->ad_employer_id; | 748 | $id_vac = $r->ad_employer_id; |
748 | break; | 749 | break; |
749 | } | 750 | } |
750 | } | 751 | } |
751 | } | 752 | } |
752 | if (!is_null($id_vac)) break; | 753 | if (!is_null($id_vac)) break; |
753 | }*/ | 754 | }*/ |
754 | 755 | ||
755 | //$ad_employer = null; | 756 | //$ad_employer = null; |
756 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 757 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
757 | 758 | ||
758 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); | 759 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); |
759 | } | 760 | } |
760 | 761 | ||
761 | // Даунылоады | 762 | // Даунылоады |
762 | public function download(Worker $worker) { | 763 | public function download(Worker $worker) { |
763 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; | 764 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; |
764 | view()->share('house',$arr_house); | 765 | view()->share('house',$arr_house); |
765 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); | 766 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); |
766 | return $pdf->stream(); | 767 | return $pdf->stream(); |
767 | } | 768 | } |
768 | 769 | ||
769 | // Поднятие анкеты | 770 | // Поднятие анкеты |
770 | public function up(Worker $worker) { | 771 | public function up(Worker $worker) { |
771 | $worker->updated_at = Carbon::now(); | 772 | $worker->updated_at = Carbon::now(); |
772 | $worker->save(); | 773 | $worker->save(); |
773 | // 0 | 774 | // 0 |
774 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); | 775 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); |
775 | } | 776 | } |
776 | 777 | ||
777 | // Форма сертификате | 778 | // Форма сертификате |
778 | public function new_sertificate(Worker $worker) { | 779 | public function new_sertificate(Worker $worker) { |
779 | return view('workers.sertificate_add', compact('worker')); | 780 | return view('workers.sertificate_add', compact('worker')); |
780 | } | 781 | } |
781 | 782 | ||
782 | // Добавление сертификата | 783 | // Добавление сертификата |
783 | public function add_serificate(SertificationRequest $request) { | 784 | public function add_serificate(SertificationRequest $request) { |
784 | $params = $request->all(); | 785 | $params = $request->all(); |
785 | 786 | ||
786 | $Sertificate = new sertification(); | 787 | $Sertificate = new sertification(); |
787 | $Sertificate->create($params); | 788 | $Sertificate->create($params); |
788 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); | 789 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); |
789 | return redirect()->route('worker.cabinet'); | 790 | return redirect()->route('worker.cabinet'); |
790 | //return view('ajax.documents', compact('Docs')); | 791 | //return view('ajax.documents', compact('Docs')); |
791 | } | 792 | } |
792 | 793 | ||
793 | // Удалить сертификат | 794 | // Удалить сертификат |
794 | public function delete_sertificate(sertification $doc) { | 795 | public function delete_sertificate(sertification $doc) { |
795 | $doc->delete(); | 796 | $doc->delete(); |
796 | 797 | ||
797 | return redirect()->route('worker.cabinet'); | 798 | return redirect()->route('worker.cabinet'); |
798 | } | 799 | } |
799 | 800 | ||
800 | // Редактирование сертификата | 801 | // Редактирование сертификата |
801 | public function edit_sertificate(Worker $worker, sertification $doc) { | 802 | public function edit_sertificate(Worker $worker, sertification $doc) { |
802 | return view('workers.sertificate_edit', compact('doc', 'worker')); | 803 | return view('workers.sertificate_edit', compact('doc', 'worker')); |
803 | } | 804 | } |
804 | 805 | ||
805 | // Редактирование обновление сертификата | 806 | // Редактирование обновление сертификата |
806 | public function update_serificate(SertificationRequest $request, sertification $doc) { | 807 | public function update_serificate(SertificationRequest $request, sertification $doc) { |
807 | $all = $request->all(); | 808 | $all = $request->all(); |
808 | $doc->worker_id = $all['worker_id']; | 809 | $doc->worker_id = $all['worker_id']; |
809 | $doc->name = $all['name']; | 810 | $doc->name = $all['name']; |
810 | $doc->end_begin = $all['end_begin']; | 811 | $doc->end_begin = $all['end_begin']; |
811 | $doc->save(); | 812 | $doc->save(); |
812 | 813 | ||
813 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | 814 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); |
814 | } | 815 | } |
815 | 816 | ||
816 | public function delete_add_diplom(Request $request, Worker $worker) { | 817 | public function delete_add_diplom(Request $request, Worker $worker) { |
817 | $infoblok_id = $request->get('infoblok_id'); | 818 | $infoblok_id = $request->get('infoblok_id'); |
818 | 819 | ||
819 | if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0) | 820 | if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0) |
820 | $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); | 821 | $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); |
821 | else { | 822 | else { |
822 | $params['infoblok_id'] = $infoblok_id; | 823 | $params['infoblok_id'] = $infoblok_id; |
823 | $params['worker_id'] = $worker->id; | 824 | $params['worker_id'] = $worker->id; |
824 | $params['status'] = $request->get('val'); | 825 | $params['status'] = $request->get('val'); |
825 | $id = Dop_info::create($params); | 826 | $id = Dop_info::create($params); |
826 | //$id = $worker->infobloks()->sync([$infoblok_id]); | 827 | //$id = $worker->infobloks()->sync([$infoblok_id]); |
827 | } | 828 | } |
828 | 829 | ||
829 | //$Infoblocks = infobloks::query()->get(); | 830 | //$Infoblocks = infobloks::query()->get(); |
830 | return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); | 831 | return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); |
831 | } | 832 | } |
832 | 833 | ||
833 | 834 | ||
834 | 835 | ||
835 | // Добавление диплома | 836 | // Добавление диплома |
836 | public function add_diplom_ajax(Request $request) { | 837 | public function add_diplom_ajax(Request $request) { |
837 | // конец | 838 | // конец |
838 | $params = $request->all(); | 839 | $params = $request->all(); |
839 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 840 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
840 | 841 | ||
841 | if ($count == 0) $dop_info = Dop_info::create($params); | 842 | if ($count == 0) $dop_info = Dop_info::create($params); |
842 | $Infoblocks = infobloks::query()->get(); | 843 | $Infoblocks = infobloks::query()->get(); |
843 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); | 844 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); |
844 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); | 845 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); |
845 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); | 846 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); |
846 | } | 847 | } |
847 | 848 | ||
848 | // Добавление диплома без ajax | 849 | // Добавление диплома без ajax |
849 | public function add_diplom(Worker $worker) { | 850 | public function add_diplom(Worker $worker) { |
850 | $worker_id = $worker->id; | 851 | $worker_id = $worker->id; |
851 | $Infoblocks = infobloks::query()->get(); | 852 | $Infoblocks = infobloks::query()->get(); |
852 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); | 853 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); |
853 | } | 854 | } |
854 | // Сохранить | 855 | // Сохранить |
855 | // Сохраняю диплом | 856 | // Сохраняю диплом |
856 | public function add_diplom_save(Request $request) { | 857 | public function add_diplom_save(Request $request) { |
857 | $params = $request->all(); | 858 | $params = $request->all(); |
858 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 859 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
859 | if ($count == 0) $dop_info = Dop_info::create($params); | 860 | if ($count == 0) $dop_info = Dop_info::create($params); |
860 | return redirect()->route('worker.cabinet'); | 861 | return redirect()->route('worker.cabinet'); |
861 | } | 862 | } |
862 | 863 | ||
863 | // Добавление стандартного документа | 864 | // Добавление стандартного документа |
864 | public function add_document(Worker $worker) { | 865 | public function add_document(Worker $worker) { |
865 | return view('workers.docs', compact('worker')); | 866 | return view('workers.docs', compact('worker')); |
866 | } | 867 | } |
867 | 868 | ||
868 | //Сохранение стандартого документа | 869 | //Сохранение стандартого документа |
869 | public function add_document_save(DocumentsRequest $request) { | 870 | public function add_document_save(DocumentsRequest $request) { |
870 | $params = $request->all(); | 871 | $params = $request->all(); |
871 | $place_work = place_works::create($params); | 872 | $place_work = place_works::create($params); |
872 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); | 873 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); |
873 | } | 874 | } |
874 | 875 | ||
875 | // Редактирование документа | 876 | // Редактирование документа |
876 | public function edit_document(place_works $doc, Worker $worker) { | 877 | public function edit_document(place_works $doc, Worker $worker) { |
877 | return view('workers.docs-edit', compact('doc', 'worker')); | 878 | return view('workers.docs-edit', compact('doc', 'worker')); |
878 | } | 879 | } |
879 | 880 | ||
880 | //Сохранение отредактированного документа | 881 | //Сохранение отредактированного документа |
881 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { | 882 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { |
882 | $params = $request->all(); | 883 | $params = $request->all(); |
883 | $doc->update($params); | 884 | $doc->update($params); |
884 | 885 | ||
885 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | 886 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); |
886 | } | 887 | } |
887 | 888 | ||
888 | // Удаление документа | 889 | // Удаление документа |
889 | public function delete_document(place_works $doc) { | 890 | public function delete_document(place_works $doc) { |
890 | $doc->delete(); | 891 | $doc->delete(); |
891 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | 892 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); |
892 | } | 893 | } |
893 | 894 | ||
894 | //Отправка нового сообщения | 895 | //Отправка нового сообщения |
895 | public function new_message(Request $request) { | 896 | public function new_message(Request $request) { |
896 | $params = $request->all(); | 897 | $params = $request->all(); |
897 | 898 | ||
898 | $id = $params['send_user_id']; | 899 | $id = $params['send_user_id']; |
899 | $message = new Message(); | 900 | $message = new Message(); |
900 | $message->user_id = $params['send_user_id']; | 901 | $message->user_id = $params['send_user_id']; |
901 | $message->to_user_id = $params['send_to_user_id']; | 902 | $message->to_user_id = $params['send_to_user_id']; |
902 | $message->title = $params['send_title']; | 903 | $message->title = $params['send_title']; |
903 | $message->text = $params['send_text']; | 904 | $message->text = $params['send_text']; |
904 | $message->ad_employer_id = $params['send_vacancy']; | 905 | $message->ad_employer_id = $params['send_vacancy']; |
905 | if ($request->has('send_file')) { | 906 | if ($request->has('send_file')) { |
906 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); | 907 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); |
907 | } | 908 | } |
908 | $message->flag_new = 1; | 909 | $message->flag_new = 1; |
909 | $id_message = $message->save(); | 910 | $id_message = $message->save(); |
910 | 911 | ||
911 | $data['message_id'] = $id_message; | 912 | $data['message_id'] = $id_message; |
912 | $data['ad_employer_id'] = $params['send_vacancy']; | 913 | $data['ad_employer_id'] = $params['send_vacancy']; |
913 | $data['job_title_id'] = $params['send_job_title_id']; | 914 | $data['job_title_id'] = $params['send_job_title_id']; |
914 | $data['flag'] = 1; | 915 | $data['flag'] = 1; |
915 | $ad_responce = ad_response::create($data); | 916 | $ad_responce = ad_response::create($data); |
916 | return redirect()->route('worker.messages', ['type_message' => 'output']); | 917 | return redirect()->route('worker.messages', ['type_message' => 'output']); |
917 | } | 918 | } |
918 | 919 | ||
919 | 920 | ||
920 | public function test123(Request $request) { | 921 | public function test123(Request $request) { |
921 | $params = $request->all(); | 922 | $params = $request->all(); |
922 | $user1 = $params['user_id']; | 923 | $user1 = $params['user_id']; |
923 | $user2 = $params['to_user_id']; | 924 | $user2 = $params['to_user_id']; |
924 | $id_vacancy = $params['ad_employer_id']; | 925 | $id_vacancy = $params['ad_employer_id']; |
925 | $ad_name = $params['ad_name']; | 926 | $ad_name = $params['ad_name']; |
926 | 927 | ||
927 | $rules = [ | 928 | $rules = [ |
928 | 'text' => 'required|min:1|max:150000', | 929 | 'text' => 'required|min:1|max:150000', |
929 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' | 930 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' |
930 | ]; | 931 | ]; |
931 | $messages = [ | 932 | $messages = [ |
932 | 'required' => 'Укажите обязательное поле', | 933 | 'required' => 'Укажите обязательное поле', |
933 | 'min' => [ | 934 | 'min' => [ |
934 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 935 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
935 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 936 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
936 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 937 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
937 | ], | 938 | ], |
938 | 'max' => [ | 939 | 'max' => [ |
939 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 940 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
940 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 941 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
941 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 942 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
942 | ] | 943 | ] |
943 | ]; | 944 | ]; |
944 | 945 | ||
945 | $validator = Validator::make($request->all(), $rules, $messages); | 946 | $validator = Validator::make($request->all(), $rules, $messages); |
946 | 947 | ||
947 | if ($validator->fails()) { | 948 | if ($validator->fails()) { |
948 | return redirect()->route('worker.dialog', ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]) | 949 | return redirect()->route('worker.dialog', ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]) |
949 | ->withErrors($validator); | 950 | ->withErrors($validator); |
950 | } else { | 951 | } else { |
951 | if ($request->has('file')) { | 952 | if ($request->has('file')) { |
952 | $params['file'] = $request->file('file')->store("messages", 'public'); | 953 | $params['file'] = $request->file('file')->store("messages", 'public'); |
953 | } | 954 | } |
954 | Message::create($params); | 955 | Message::create($params); |
955 | //return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 956 | //return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
956 | return redirect()->route('worker.dialog', | 957 | return redirect()->route('worker.dialog', |
957 | ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]); | 958 | ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]); |
958 | 959 | ||
959 | } | 960 | } |
960 | } | 961 | } |
961 | 962 | ||
962 | // Информация о предыдущих компаниях | 963 | // Информация о предыдущих компаниях |
963 | public function new_prev_company(Worker $worker) { | 964 | public function new_prev_company(Worker $worker) { |
964 | return view('workers.prev_company_form', compact('worker')); | 965 | return view('workers.prev_company_form', compact('worker')); |
965 | } | 966 | } |
966 | 967 | ||
967 | // Добавление контакта компании | 968 | // Добавление контакта компании |
968 | public function add_prev_company(PrevCompanyRequest $request) { | 969 | public function add_prev_company(PrevCompanyRequest $request) { |
969 | // Возвращение параметров | 970 | // Возвращение параметров |
970 | $all = $request->all(); | 971 | $all = $request->all(); |
971 | $PrevCompany = PrevCompany::create($all); | 972 | $PrevCompany = PrevCompany::create($all); |
972 | 973 | ||
973 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); | 974 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); |
974 | } | 975 | } |
975 | 976 | ||
976 | // Редактирование контакта компании | 977 | // Редактирование контакта компании |
977 | public function edit_prev_company(PrevCompany $doc, Worker $worker) { | 978 | public function edit_prev_company(PrevCompany $doc, Worker $worker) { |
978 | return view('workers.prev_company_edit_form', compact('doc', 'worker')); | 979 | return view('workers.prev_company_edit_form', compact('doc', 'worker')); |
979 | } | 980 | } |
980 | 981 | ||
981 | //Сохранение редактирования контакта компании | 982 | //Сохранение редактирования контакта компании |
982 | public function update_prev_company(PrevCompany $doc, Request $request){ | 983 | public function update_prev_company(PrevCompany $doc, Request $request){ |
983 | $all = $request->all(); | 984 | $all = $request->all(); |
984 | $doc->update($all); | 985 | $doc->update($all); |
985 | 986 | ||
986 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); | 987 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); |
987 | } | 988 | } |
988 | 989 | ||
989 | // Удаление контакта предыдущей компании | 990 | // Удаление контакта предыдущей компании |
990 | public function delete_prev_company(PrevCompany $doc) { | 991 | public function delete_prev_company(PrevCompany $doc) { |
991 | $doc->delete(); | 992 | $doc->delete(); |
992 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | 993 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); |
993 | } | 994 | } |
994 | } | 995 | } |
995 | 996 | ||
996 | 997 |
app/Http/Requests/JobTitlesRequest.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Requests; | 3 | namespace App\Http\Requests; |
4 | 4 | ||
5 | use Illuminate\Foundation\Http\FormRequest; | 5 | use Illuminate\Foundation\Http\FormRequest; |
6 | 6 | ||
7 | class JobTitlesRequest extends FormRequest | 7 | class JobTitlesRequest extends FormRequest |
8 | { | 8 | { |
9 | /** | 9 | /** |
10 | * Determine if the user is authorized to make this request. | 10 | * Determine if the user is authorized to make this request. |
11 | * | 11 | * |
12 | * @return bool | 12 | * @return bool |
13 | */ | 13 | */ |
14 | public function authorize() | 14 | public function authorize() |
15 | { | 15 | { |
16 | return true; | 16 | return true; |
17 | } | 17 | } |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * Get the validation rules that apply to the request. | 20 | * Get the validation rules that apply to the request. |
21 | * | 21 | * |
22 | * @return array<string, mixed> | 22 | * @return array<string, mixed> |
23 | */ | 23 | */ |
24 | public function rules() | 24 | public function rules() |
25 | { | 25 | { |
26 | return [ | 26 | return [ |
27 | 'name' => [ | 27 | 'name' => [ |
28 | 'required', | 28 | 'required', |
29 | 'min:3', | 29 | 'min:3', |
30 | 'max:255', | 30 | 'max:255', |
31 | ], | 31 | ], |
32 | 'parent_id' => [ | 32 | 'parent_id' => [ |
33 | 'numeric', | 33 | 'numeric', |
34 | 'min:0', | 34 | 'min:0', |
35 | 'max:9999999', | 35 | 'max:9999999', |
36 | ], | 36 | ], |
37 | 'sort' => [ | ||
38 | 'numeric', | ||
39 | 'min:0', | ||
40 | 'max:9999999', | ||
41 | ] | ||
42 | |||
37 | ]; | 43 | ]; |
38 | } | 44 | } |
39 | 45 | ||
40 | public function messages() { | 46 | public function messages() { |
41 | return [ | 47 | return [ |
42 | 'required' => 'Поле «:attribute» обязательно для заполнения', | 48 | 'required' => 'Поле «:attribute» обязательно для заполнения', |
43 | 'unique' => 'Такое значение поля «:attribute» уже используется', | 49 | 'unique' => 'Такое значение поля «:attribute» уже используется', |
44 | 'min' => [ | 50 | 'min' => [ |
45 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 51 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
46 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 52 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
47 | ], | 53 | ], |
48 | 'max' => [ | 54 | 'max' => [ |
49 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 55 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
50 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 56 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
51 | ], | 57 | ], |
52 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', | 58 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', |
53 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', | 59 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', |
54 | ]; | 60 | ]; |
55 | 61 | ||
56 | } | 62 | } |
57 | } | 63 | } |
58 | 64 |
resources/views/admin/job_titles/form.blade.php
1 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 1 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
2 | <label class="block text-sm"> | 2 | <label class="block text-sm"> |
3 | <span class="text-gray-700 dark:text-gray-400">Название должности</span> | 3 | <span class="text-gray-700 dark:text-gray-400">Название должности</span> |
4 | <input name="name" id="name" | 4 | <input name="name" id="name" |
5 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | 5 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" |
6 | placeholder="Название должности" value="{{ old('name') ?? $job_title->name ?? '' }}" | 6 | placeholder="Название должности" value="{{ old('name') ?? $job_title->name ?? '' }}" |
7 | /> | 7 | /> |
8 | @error('name') | 8 | @error('name') |
9 | <span class="text-xs text-red-600 dark:text-red-400"> | 9 | <span class="text-xs text-red-600 dark:text-red-400"> |
10 | {{ $message }} | 10 | {{ $message }} |
11 | </span> | 11 | </span> |
12 | @enderror | 12 | @enderror |
13 | </label><br> | 13 | </label><br> |
14 | 14 | ||
15 | <label class="block text-sm"> | 15 | <label class="block text-sm"> |
16 | <span class="text-gray-700 dark:text-gray-400">Родитель</span> | 16 | <span class="text-gray-700 dark:text-gray-400">Родитель</span> |
17 | 17 | ||
18 | @php | 18 | @php |
19 | $parent_id = old('parent_id') ?? $job_title->parent_id ?? 0; | 19 | $parent_id = old('parent_id') ?? $job_title->parent_id ?? 0; |
20 | @endphp | 20 | @endphp |
21 | <select name="parent_id" 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" | 21 | <select name="parent_id" 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" |
22 | title="Родитель"> | 22 | title="Родитель"> |
23 | <option value="0">Без родителя</option> | 23 | <option value="0">Без родителя</option> |
24 | @include('admin.job_titles.parent_id', ['level' => -1, 'parent' => 0]) | 24 | @include('admin.job_titles.parent_id', ['level' => -1, 'parent' => 0]) |
25 | </select> | 25 | </select> |
26 | </label><br> | 26 | </label><br> |
27 | 27 | ||
28 | <label class="block text-sm"> | 28 | <label class="block text-sm"> |
29 | <span class="text-gray-700 dark:text-gray-400">Категория должности</span> | 29 | <span class="text-gray-700 dark:text-gray-400">Категория должности</span> |
30 | 30 | ||
31 | @php | 31 | @php |
32 | $category_id = old('position_id') ?? $job_title->position_id ?? 0; | 32 | $category_id = old('position_id') ?? $job_title->position_id ?? 0; |
33 | @endphp | 33 | @endphp |
34 | <select name="position_id" 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" | 34 | <select name="position_id" 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" |
35 | title="Родитель"> | 35 | title="Родитель"> |
36 | <option value="">Без родителя</option> | 36 | <option value="">Без родителя</option> |
37 | @foreach ($category as $it) | 37 | @foreach ($category as $it) |
38 | <option value="{{ $it->id }}" @if ($it->id == $category_id) selected @endif>{{ $it->name }}</option> | 38 | <option value="{{ $it->id }}" @if ($it->id == $category_id) selected @endif>{{ $it->name }}</option> |
39 | @endforeach | 39 | @endforeach |
40 | </select> | 40 | </select> |
41 | </label><br> | 41 | </label><br> |
42 | 42 | ||
43 | <label class="block text-sm"> | 43 | <label class="block text-sm"> |
44 | <span class="text-gray-700 dark:text-gray-400">Сортировка</span> | 44 | <span class="text-gray-700 dark:text-gray-400">Сортировка</span> |
45 | @php | 45 | @php |
46 | $sort_num = 100; | 46 | $sort_num = 100; |
47 | @endphp | 47 | @endphp |
48 | <select name="sort" 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" | 48 | |
49 | <input name="sort" id="sort" | ||
50 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | ||
51 | placeholder="Сортировка" value="{{ old('sort') ?? $job_title->sort ?? '100' }}" | ||
52 | /> | ||
53 | <!--<select name="sort" 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" | ||
49 | title="Сортировка"> | 54 | title="Сортировка"> |
50 | @for($i = 1; $i <= 10; $i++) | 55 | for($i = 1; $i <= 10; $i++) |
51 | <option value="{{ $sort_num }}" @if (isset($job_title)) @if ($sort_num == $job_title->sort) selected @else @endif @endif>{{ $sort_num }}</option> | 56 | <option value="{ $sort_num }}" if (isset($job_title)) if ($sort_num == $job_title->sort) selected else endif endif>{ $sort_num }}</option> |
52 | @php $sort_num = $sort_num + 10; @endphp | 57 | php $sort_num = $sort_num + 10; endphp |
53 | @endfor | 58 | endfor |
54 | </select> | 59 | </select>--> |
55 | </label><br> | 60 | </label><br> |
56 | 61 | ||
57 | <label class="block text-sm"> | 62 | <label class="block text-sm"> |
58 | <span class="text-gray-700 dark:text-gray-400">Видимость</span> | 63 | <span class="text-gray-700 dark:text-gray-400">Видимость</span> |
59 | 64 | ||
60 | <select name="is_bd" 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" | 65 | <select name="is_bd" 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" |
61 | title="Видимость"> | 66 | title="Видимость"> |
62 | <option value="0" @if (isset($job_title)) @if ($job_title->is_bd == 0) selected @endif @endif>Работодатель</option> | 67 | <option value="0" @if (isset($job_title)) @if ($job_title->is_bd == 0) selected @endif @endif>Работодатель</option> |
63 | <option value="1" @if (isset($job_title)) @if ($job_title->is_bd == 1) selected @endif @endif>Работник</option> | 68 | <option value="1" @if (isset($job_title)) @if ($job_title->is_bd == 1) selected @endif @endif>Работник</option> |
64 | <option value="2" @if (isset($job_title)) @if ($job_title->is_bd == 2) selected @endif @endif>База данных</option> | 69 | <option value="2" @if (isset($job_title)) @if ($job_title->is_bd == 2) selected @endif @endif>База данных</option> |
65 | </select> | 70 | </select> |
66 | </label><br> | 71 | </label><br> |
67 | 72 | ||
68 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 73 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
69 | <div> | 74 | <div> |
70 | <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"> | 75 | <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"> |
71 | Сохранить | 76 | Сохранить |
72 | </button> | 77 | </button> |
73 | 78 | ||
74 | <a href="{{ route('admin.job-titles.index') }}" | 79 | <a href="{{ route('admin.job-titles.index') }}" |
75 | 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" | 80 | 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" |
76 | style="display: -webkit-inline-box; height: 30px!important;" | 81 | style="display: -webkit-inline-box; height: 30px!important;" |
77 | >Назад</a> | 82 | >Назад</a> |
78 | </div> | 83 | </div> |
79 | </div> | 84 | </div> |
80 | </div> | 85 | </div> |
81 | 86 |
resources/views/ajax/list_vacancies.blade.php
1 | @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp | 1 | @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp |
2 | 2 | ||
3 | @foreach ($Query as $Q) | 3 | @foreach ($Query as $Q) |
4 | @foreach ($Reclama as $Rec) | 4 | @foreach ($Reclama as $Rec) |
5 | @if ($Rec->position == $i) | 5 | @if ($Rec->position == $i) |
6 | <div class="main__vacancies-thing"> | 6 | <div class="main__vacancies-thing"> |
7 | @if (!empty($Rec->image)) | 7 | @if (!empty($Rec->image)) |
8 | <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | 8 | <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> |
9 | @else | 9 | @else |
10 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | 10 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> |
11 | @endif | 11 | @endif |
12 | <div class="main__vacancies-thing-body"> | 12 | <div class="main__vacancies-thing-body"> |
13 | <h2>{{ $Rec->title }}</h2> | 13 | <h2>{{ $Rec->title }}</h2> |
14 | <div class="main__vacancies-thing-scroll"> | 14 | <div class="main__vacancies-thing-scroll"> |
15 | {!! $Rec->text !!} | 15 | {!! $Rec->text !!} |
16 | </div> | 16 | </div> |
17 | <a href="{{ $Rec->link }}" class="button">Узнать больше</a> | 17 | <a href="{{ $Rec->link }}" class="button">Узнать больше</a> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
20 | @endif | 20 | @endif |
21 | @endforeach | 21 | @endforeach |
22 | <div class="main__vacancies-item main__employer-page-two-item"> | 22 | <div class="main__vacancies-item main__employer-page-two-item"> |
23 | 23 | ||
24 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | 24 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> |
25 | <svg> | 25 | <svg> |
26 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 26 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
27 | </svg> | 27 | </svg> |
28 | <span> | 28 | <span> |
29 | Вернуться к списку вакансий | 29 | Вернуться к списку вакансий |
30 | </span> | 30 | </span> |
31 | </a> | 31 | </a> |
32 | 32 | ||
33 | <div class="main__employer-page-two-item-toper"> | 33 | <div class="main__employer-page-two-item-toper"> |
34 | @if (!empty($Q->employer->logo)) | 34 | @if (!empty($Q->employer->logo)) |
35 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | 35 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> |
36 | @else | 36 | @else |
37 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | 37 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> |
38 | @endif | 38 | @endif |
39 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> | 39 | <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif</span> |
40 | </div> | 40 | </div> |
41 | 41 | ||
42 | <div class="main__employer-page-two-item-text"> | 42 | <div class="main__employer-page-two-item-text"> |
43 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 43 | <div class="main__employer-page-two-item-text-name"> |
44 | специалистов на следующие должности:</div> | 44 | <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3> |
45 | <div class="main__employer-page-two-item-text-links"> | ||
46 | @if (isset($Q->jobs)) | ||
47 | @foreach ($Q->jobs as $key => $j) | ||
48 | <a>“{{ $j->name }}” – з/п от @if (isset($Q->jobs_code[$key]->min_salary)) {{ $Q->jobs_code[$key]->min_salary }} @endif - @if (isset($Q->jobs_code[$key]->max_salary)) {{ $Q->jobs_code[$key]->max_salary }} @endif рублей (на руки)</a> | ||
49 | @endforeach | ||
50 | @endif | ||
51 | </div> | 45 | </div> |
46 | <!--Судоходная компания ведет набор | ||
47 | специалистов на следующие должности:</div> | ||
48 | <div class="main__employer-page-two-item-text-links"> | ||
49 | if (isset($Q->jobs)) | ||
50 | foreach ($Q->jobs as $key => $j) | ||
51 | <a>“{ $j->name }}” <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> | ||
52 | <!-- </a> | ||
53 | endforeach | ||
54 | endif | ||
55 | </div>--> | ||
52 | </div> | 56 | </div> |
53 | 57 | ||
54 | <div class="main__employer-page-two-item-text"> | 58 | <div class="main__employer-page-two-item-text"> |
55 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 59 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
56 | <div class="main__employer-page-two-item-text-body"> | 60 | <div class="main__employer-page-two-item-text-body"> |
57 | {!! $Q->text !!} | 61 | {!! $Q->text !!} |
58 | </div> | 62 | </div> |
59 | </div> | 63 | </div> |
60 | <div class="main__employer-page-two-item-text"> | 64 | <!--<div class="main__employer-page-two-item-text"> |
61 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 65 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
62 | <div class="main__employer-page-two-item-text-body"> | 66 | <div class="main__employer-page-two-item-text-body"> |
63 | {!! $Q->description !!} | 67 | !! $Q->description !!} |
64 | </div> | 68 | </div> |
65 | </div> | 69 | </div> |
66 | <div class="main__employer-page-two-item-text"> | 70 | <div class="main__employer-page-two-item-text"> |
67 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 71 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
68 | <div class="main__employer-page-two-item-text-body"> | 72 | <div class="main__employer-page-two-item-text-body"> |
69 | {!! $Q->contacts_emails !!} | 73 | !! $Q->contacts_emails !!} |
70 | </div> | 74 | </div> |
71 | </div> | 75 | </div> |
72 | <div class="main__employer-page-two-item-text"> | 76 | <div class="main__employer-page-two-item-text"> |
73 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 77 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
74 | <div class="main__employer-page-two-item-text-body"> | 78 | <div class="main__employer-page-two-item-text-body"> |
75 | {!! $Q->contacts_telephones !!} | 79 | !! $Q->contacts_telephones !!} |
76 | </div> | 80 | </div> |
77 | </div> | 81 | </div> |
82 | --> | ||
78 | 83 | ||
79 | <div class="main__employer-page-two-item-tags"> | 84 | <div class="main__employer-page-two-item-tags"> |
80 | @if (!empty($Q->jobs_code[0]->position_ship)) | 85 | @if (!empty($Q->jobs_code[0]->position_ship)) |
81 | <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> | 86 | <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> |
82 | @else | 87 | @else |
83 | @if (isset($Q->jobs)) | 88 | @if (isset($Q->jobs)) |
84 | @foreach ($Q->jobs as $key => $j) | 89 | @foreach ($Q->jobs as $key => $j) |
85 | <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> | 90 | <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> |
86 | @endforeach | 91 | @endforeach |
87 | @endif | 92 | @endif |
88 | @endif | 93 | @endif |
89 | </div> | 94 | </div> |
95 | |||
90 | <div class="main__employer-page-two-item-buttons"> | 96 | <div class="main__employer-page-two-item-buttons"> |
91 | @guest | 97 | @guest |
92 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | 98 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' |
93 | class="button main__employer-page-two-item-button">Откликнуться</button> | 99 | class="button main__employer-page-two-item-button">Откликнуться</button> |
94 | @else | 100 | @else |
95 | @if (App\Classes\StatusUser::Status()==1) | 101 | @if (App\Classes\StatusUser::Status()==1) |
96 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | 102 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' |
97 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | 103 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> |
98 | @else | 104 | @else |
99 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | 105 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' |
100 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | 106 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> |
101 | @endif | 107 | @endif |
102 | @endguest | 108 | @endguest |
103 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | 109 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> |
104 | </div> | 110 | </div> |
105 | <div class="main__employer-page-two-item-bottom"> | 111 | <div class="main__employer-page-two-item-bottom"> |
106 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> | 112 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> |
107 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vacancy_favorites <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> | 113 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vacancy_favorites <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> |
108 | <svg> | 114 | <svg> |
109 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 115 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
110 | </svg> | 116 | </svg> |
111 | </button> | 117 | </button> |
112 | </div> | 118 | </div> |
113 | </div> | 119 | </div> |
resources/views/info_company_new.blade.php
1 | @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '#sort_ajax', function() { | 6 | $(document).on('change', '#sort_ajax', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.val(); | 8 | var val_ = this_.val(); |
9 | console.log('sort items '+val_); | 9 | console.log('sort items '+val_); |
10 | 10 | ||
11 | $.ajax({ | 11 | $.ajax({ |
12 | type: "GET", | 12 | type: "GET", |
13 | url: "{{ route('shipping_companies') }}", | 13 | url: "{{ route('shipping_companies') }}", |
14 | data: "sort="+val_+"&block=1", | 14 | data: "sort="+val_+"&block=1", |
15 | success: function (data) { | 15 | success: function (data) { |
16 | console.log('Выбор сортировки'); | 16 | console.log('Выбор сортировки'); |
17 | console.log(data); | 17 | console.log(data); |
18 | $('#block_1').html(data); | 18 | $('#block_1').html(data); |
19 | }, | 19 | }, |
20 | headers: { | 20 | headers: { |
21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
22 | }, | 22 | }, |
23 | error: function (data) { | 23 | error: function (data) { |
24 | data = JSON.stringify(data); | 24 | data = JSON.stringify(data); |
25 | console.log('Error: ' + data); | 25 | console.log('Error: ' + data); |
26 | } | 26 | } |
27 | }); | 27 | }); |
28 | 28 | ||
29 | $.ajax({ | 29 | $.ajax({ |
30 | type: "GET", | 30 | type: "GET", |
31 | url: "{{ route('shipping_companies') }}", | 31 | url: "{{ route('shipping_companies') }}", |
32 | data: "sort="+val_+"&block=2", | 32 | data: "sort="+val_+"&block=2", |
33 | success: function (data) { | 33 | success: function (data) { |
34 | console.log('Выбор сортировки2'); | 34 | console.log('Выбор сортировки2'); |
35 | console.log(data); | 35 | console.log(data); |
36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
37 | $('#block_2').html(data); | 37 | $('#block_2').html(data); |
38 | }, | 38 | }, |
39 | headers: { | 39 | headers: { |
40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
41 | }, | 41 | }, |
42 | error: function (data) { | 42 | error: function (data) { |
43 | data = JSON.stringify(data); | 43 | data = JSON.stringify(data); |
44 | console.log('Error: ' + data); | 44 | console.log('Error: ' + data); |
45 | } | 45 | } |
46 | }); | 46 | }); |
47 | }); | 47 | }); |
48 | 48 | ||
49 | $(document).ready(function(){ | 49 | $(document).ready(function(){ |
50 | var sel = $('#select2-sort_ajax-container'); | 50 | var sel = $('#select2-sort_ajax-container'); |
51 | var key = getUrlParameter('sort'); | 51 | var key = getUrlParameter('sort'); |
52 | if (key !=='') { | 52 | if (key !=='') { |
53 | console.log(key); | 53 | console.log(key); |
54 | switch (key) { | 54 | switch (key) { |
55 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 55 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
56 | case "name_up": sel.html('По имени (возрастание)'); break; | 56 | case "name_up": sel.html('По имени (возрастание)'); break; |
57 | case "name_down": sel.html('По дате (убывание)'); break; | 57 | case "name_down": sel.html('По дате (убывание)'); break; |
58 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 58 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
59 | case "created_at_down": sel.html('По дате (убывание)'); break; | 59 | case "created_at_down": sel.html('По дате (убывание)'); break; |
60 | } | 60 | } |
61 | 61 | ||
62 | } | 62 | } |
63 | }); | 63 | }); |
64 | 64 | ||
65 | //end | 65 | //end |
66 | $(document).on('click', '.js_send_it_button', function() { | 66 | $(document).on('click', '.js_send_it_button', function() { |
67 | var this_ = $(this); | 67 | var this_ = $(this); |
68 | var code_user_id = this_.attr('data-uid'); | 68 | var code_user_id = this_.attr('data-uid'); |
69 | var code_to_user_id = this_.attr('data-tuid'); | 69 | var code_to_user_id = this_.attr('data-tuid'); |
70 | var code_vacancy = this_.attr('data-vacancy'); | 70 | var code_vacancy = this_.attr('data-vacancy'); |
71 | var user_id = $('#send_user_id'); | 71 | var user_id = $('#send_user_id'); |
72 | var to_user_id = $('#send_to_user_id'); | 72 | var to_user_id = $('#send_to_user_id'); |
73 | var vacancy = $('#send_vacancy'); | 73 | var vacancy = $('#send_vacancy'); |
74 | 74 | ||
75 | console.log('Клик на кнопки...'); | 75 | console.log('Клик на кнопки...'); |
76 | 76 | ||
77 | user_id.val(code_user_id); | 77 | user_id.val(code_user_id); |
78 | to_user_id.val(code_to_user_id); | 78 | to_user_id.val(code_to_user_id); |
79 | vacancy.val(code_vacancy); | 79 | vacancy.val(code_vacancy); |
80 | }); | 80 | }); |
81 | </script> | 81 | </script> |
82 | @include('js.favorite-vacancy-45') | 82 | @include('js.favorite-vacancy-45') |
83 | @endsection | 83 | @endsection |
84 | 84 | ||
85 | @section('content') | 85 | @section('content') |
86 | <section class="thing"> | 86 | <section class="thing"> |
87 | <div class="container"> | 87 | <div class="container"> |
88 | <div class="thing__body"> | 88 | <div class="thing__body"> |
89 | <ul class="breadcrumbs thing__breadcrumbs"> | 89 | <ul class="breadcrumbs thing__breadcrumbs"> |
90 | <li><a href="{{ route('index') }}">Главная</a></li> | 90 | <li><a href="{{ route('index') }}">Главная</a></li> |
91 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> | 91 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> |
92 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> | 92 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> |
93 | </ul> | 93 | </ul> |
94 | @if ($company[0]->oficial_status == 1) | 94 | @if ($company[0]->oficial_status == 1) |
95 | <div class="thing__badge"> | 95 | <div class="thing__badge"> |
96 | <svg> | 96 | <svg> |
97 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> | 97 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> |
98 | </svg> | 98 | </svg> |
99 | Компания проверена | 99 | Компания проверена |
100 | </div> | 100 | </div> |
101 | @endif | 101 | @endif |
102 | 102 | ||
103 | @if (!empty($company[0]->logo)) | 103 | @if (!empty($company[0]->logo)) |
104 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | 104 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> |
105 | @else | 105 | @else |
106 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | 106 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> |
107 | @endif | 107 | @endif |
108 | 108 | ||
109 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> | 109 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> |
110 | <!--<p class="thing__text"> $company[0]->text !!}</p>--> | 110 | <!--<p class="thing__text"> $company[0]->text !!}</p>--> |
111 | <div class="thing__buttons"> | 111 | <div class="thing__buttons"> |
112 | <button type="button" class="button"> | 112 | <button type="button" class="button"> |
113 | <svg> | 113 | <svg> |
114 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | 114 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> |
115 | </svg> | 115 | </svg> |
116 | {{ $company[0]->ads->count() }} вакансии | 116 | {{ $company[0]->ads->count() }} вакансии |
117 | </button> | 117 | </button> |
118 | @if ($user_id == 0) | 118 | @if ($user_id == 0) |
119 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> | 119 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> |
120 | Написать сообщение | 120 | Написать сообщение |
121 | </a> | 121 | </a> |
122 | @else | 122 | @else |
123 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> | 123 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> |
124 | Написать сообщение | 124 | Написать сообщение |
125 | </a> | 125 | </a> |
126 | @endif | 126 | @endif |
127 | </div> | 127 | </div> |
128 | </div> | 128 | </div> |
129 | </div> | 129 | </div> |
130 | </section> | 130 | </section> |
131 | <main class="main"> | 131 | <main class="main"> |
132 | <div class="container"> | 132 | <div class="container"> |
133 | <div class="main__employer-page"> | 133 | <div class="main__employer-page"> |
134 | <h2 class="main__employer-page-title">О компании</h2> | 134 | <h2 class="main__employer-page-title">О компании</h2> |
135 | <div class="main__employer-page-info"> | 135 | <div class="main__employer-page-info"> |
136 | <div class="main__employer-page-item"> | 136 | <div class="main__employer-page-item"> |
137 | <b>Адрес компании</b> | 137 | <b>Адрес компании</b> |
138 | <span> | 138 | <span> |
139 | {{ $company[0]->address }} | 139 | {{ $company[0]->address }} |
140 | </span> | 140 | </span> |
141 | </div> | 141 | </div> |
142 | <div class="main__employer-page-item"> | 142 | <div class="main__employer-page-item"> |
143 | <b>Сайт</b> | 143 | <b>Сайт</b> |
144 | <span> | 144 | <span> |
145 | <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> | 145 | <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> |
146 | </span> | 146 | </span> |
147 | </div> | 147 | </div> |
148 | <div class="main__employer-page-item"> | 148 | <div class="main__employer-page-item"> |
149 | <b>Почта</b> | 149 | <b>Почта</b> |
150 | <span> | 150 | <span> |
151 | <a href="mailto:">{{ $company[0]->email }}</a> | 151 | <a href="mailto:">{{ $company[0]->email }}</a> |
152 | </span> | 152 | </span> |
153 | </div> | 153 | </div> |
154 | <div class="main__employer-page-item"> | 154 | <div class="main__employer-page-item"> |
155 | <b>Телефон</b> | 155 | <b>Телефон</b> |
156 | <span> | 156 | <span> |
157 | <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> | 157 | <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> |
158 | </span> | 158 | </span> |
159 | </div> | 159 | </div> |
160 | </div> | 160 | </div> |
161 | 161 | ||
162 | <div class="main__employer-page-item"> | 162 | <div class="main__employer-page-item"> |
163 | <b>Описание</b> | 163 | <b>Описание</b> |
164 | <span> | 164 | <span> |
165 | {!! $company[0]->text !!} | 165 | {!! $company[0]->text !!} |
166 | </span> | 166 | </span> |
167 | </div> | 167 | </div> |
168 | 168 | ||
169 | <div> | 169 | <div> |
170 | 170 | ||
171 | <div class="main__employer-page-tabs"> | 171 | <div class="main__employer-page-tabs"> |
172 | <button type="button" class="main__employer-page-tabs-item active" | 172 | <button type="button" class="main__employer-page-tabs-item active" |
173 | data-tab="1">Флот</button> | 173 | data-tab="1">Флот</button> |
174 | <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> | 174 | <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> |
175 | </div> | 175 | </div> |
176 | 176 | ||
177 | <div class="main__employer-page-body"> | 177 | <div class="main__employer-page-body"> |
178 | <div class="main__employer-page-body-item showed" data-body="1"> | 178 | <div class="main__employer-page-body-item showed" data-body="1"> |
179 | <div class="main__employer-page-one"> | 179 | <div class="main__employer-page-one"> |
180 | @if ($company[0]->flots->count()) | 180 | @if ($company[0]->flots->count()) |
181 | @foreach ($company[0]->flots as $flot) | 181 | @foreach ($company[0]->flots as $flot) |
182 | <a href="" class="main__employer-page-one-item"> | 182 | <a href="" class="main__employer-page-one-item"> |
183 | @if (!empty($flot->image)) | 183 | @if (!empty($flot->image)) |
184 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> | 184 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> |
185 | @else | 185 | @else |
186 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}"> | 186 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}"> |
187 | @endif | 187 | @endif |
188 | <b>{{ $flot->name }}</b> | 188 | <b>{{ $flot->name }}</b> |
189 | <b>{{ $flot->region }}</b> | 189 | <b>{{ $flot->region }}</b> |
190 | <span><i>DWT</i> {{ $flot->DWT }}</span> | 190 | <span><i>DWT</i> {{ $flot->DWT }}</span> |
191 | <span><i>Мощность ГД</i> {{ $flot->POWER_GD }}</span> | 191 | <span><i>Мощность ГД</i> {{ $flot->POWER_GD }}</span> |
192 | <span><i>IMO</i> {{ $flot->IMO }}</span> | 192 | <span><i>IMO</i> {{ $flot->IMO }}</span> |
193 | <span>{{ $flot->power }}</span> | 193 | <span>{{ $flot->power }}</span> |
194 | </a> | 194 | </a> |
195 | @endforeach | 195 | @endforeach |
196 | @endif | 196 | @endif |
197 | </div> | 197 | </div> |
198 | </div> | 198 | </div> |
199 | 199 | ||
200 | <div class="main__employer-page-body-item" data-body="2"> | 200 | <div class="main__employer-page-body-item" data-body="2"> |
201 | <div class="main__employer-page-two"> | 201 | <div class="main__employer-page-two"> |
202 | @foreach ($ads as $job) | 202 | @foreach ($ads as $job) |
203 | <div class="main__employer-page-two-item"> | 203 | <div class="main__employer-page-two-item"> |
204 | <div class="main__employer-page-two-item-toper"> | 204 | <div class="main__employer-page-two-item-toper"> |
205 | @if (!empty($company[0]->logo)) | 205 | @if (!empty($company[0]->logo)) |
206 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> | 206 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> |
207 | @else | 207 | @else |
208 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}"> | 208 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}"> |
209 | @endif | 209 | @endif |
210 | <span>{{ $job->name }}</span> | 210 | <span>{{ $company[0]->name_company }}</span> |
211 | </div> | 211 | </div> |
212 | <!--<div class="main__employer-page-two-item-title"> $item->flot }}</div>--> | 212 | <!--<div class="main__employer-page-two-item-title"> $item->flot }}</div>--> |
213 | <div class="main__employer-page-two-item-text"> | 213 | <div class="main__employer-page-two-item-text"> |
214 | @if ((isset($job->jobs)) && ($job->jobs->count())) | 214 | <h3>{{ $job->name }}</h3> |
215 | @foreach($job->jobs as $item) | 215 | <!--if ((isset($job->jobs)) && ($job->jobs->count())) |
216 | foreach($job->jobs as $item) | ||
216 | <a class="main__employer-page-two-item-text-name"> | 217 | <a class="main__employer-page-two-item-text-name"> |
217 | {{ $item->name }} | 218 | { $item->name }} |
218 | </a> | 219 | </a> |
219 | @endforeach | 220 | endforeach |
220 | @endif | 221 | endif |
222 | --> | ||
221 | <span>Описание: | 223 | <span>Описание: |
222 | {!! $job->text !!} | 224 | {!! $job->text !!} |
223 | </span> | 225 | </span> |
224 | <!--<div class="main__employer-page-two-item-text-body"> | 226 | <!--<div class="main__employer-page-two-item-text-body"> |
225 | <p>Зарплата: $item->min_salary }} - $item->max_salary }}р + $item->sytki }} суточные.</p> | 227 | <p>Зарплата: $item->min_salary }} - $item->max_salary }}р + $item->sytki }} суточные.</p> |
226 | <p>Контракт: $item->period }} мес.</p> | 228 | <p>Контракт: $item->period }} мес.</p> |
227 | </div>--> | 229 | </div>--> |
228 | </div> | 230 | </div> |
229 | <!--<div class="main__employer-page-two-item-text"> | 231 | <!--<div class="main__employer-page-two-item-text"> |
230 | <div class="main__employer-page-two-item-text-name">Район работы</div> | 232 | <div class="main__employer-page-two-item-text-name">Район работы</div> |
231 | <div class="main__employer-page-two-item-text-body"> | 233 | <div class="main__employer-page-two-item-text-body"> |
232 | <p> $item->region }}</p> | 234 | <p> $item->region }}</p> |
233 | </div> | 235 | </div> |
234 | </div> | 236 | </div> |
235 | <div class="main__employer-page-two-item-text"> | 237 | <div class="main__employer-page-two-item-text"> |
236 | <div class="main__employer-page-two-item-text-name">Посадка</div> | 238 | <div class="main__employer-page-two-item-text-name">Посадка</div> |
237 | <div class="main__employer-page-two-item-text-body"> | 239 | <div class="main__employer-page-two-item-text-body"> |
238 | <p> $item->start }}</p> | 240 | <p> $item->start }}</p> |
239 | !! $item->description !!} | 241 | !! $item->description !!} |
240 | </div> | 242 | </div> |
241 | </div>--> | 243 | </div>--> |
242 | 244 | ||
243 | <!--<div class="main__employer-page-two-item-text"> | 245 | <!--<div class="main__employer-page-two-item-text"> |
244 | <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: | 246 | <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: |
245 | </div> | 247 | </div> |
246 | <div class="main__employer-page-two-item-text-body"> | 248 | <div class="main__employer-page-two-item-text-body"> |
247 | <a href="tel: $job->telephone }}"> $job->telephone }}</a> | 249 | <a href="tel: $job->telephone }}"> $job->telephone }}</a> |
248 | </div> | 250 | </div> |
249 | </div> | 251 | </div> |
250 | <div class="main__employer-page-two-item-text"> | 252 | <div class="main__employer-page-two-item-text"> |
251 | <div class="main__employer-page-two-item-text-name">Анкеты присылать на | 253 | <div class="main__employer-page-two-item-text-name">Анкеты присылать на |
252 | почту: | 254 | почту: |
253 | </div> | 255 | </div> |
254 | <div class="main__employer-page-two-item-text-body"> | 256 | <div class="main__employer-page-two-item-text-body"> |
255 | <a href="mailto: $job->email }}"> $job->email }}</a> | 257 | <a href="mailto: $job->email }}"> $job->email }}</a> |
256 | </div> | 258 | </div> |
257 | </div>--> | 259 | </div>--> |
258 | 260 | ||
259 | @if ((isset($job->jobs)) && ($job->jobs->count())) | 261 | @if ((isset($job->jobs)) && ($job->jobs->count())) |
260 | <div class="main__employer-page-two-item-tags"> | 262 | <div class="main__employer-page-two-item-tags"> |
261 | @foreach ($job->jobs as $item) | 263 | @foreach ($job->jobs as $item) |
262 | <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span> | 264 | <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span> |
263 | @endforeach | 265 | @endforeach |
264 | </div> | 266 | </div> |
265 | @endif | 267 | @endif |
266 | <div class="main__employer-page-two-item-buttons"> | 268 | <div class="main__employer-page-two-item-buttons"> |
267 | 269 | ||
268 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $job->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' | 270 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $job->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' |
269 | class="button main__employer-page-two-item-button js_send_it_button">Оставить | 271 | class="button main__employer-page-two-item-button js_send_it_button">Оставить |
270 | отклик...</button> | 272 | отклик...</button> |
271 | 273 | ||
272 | <!--<a href="#" | 274 | <!--<a href="#" |
273 | class="button button_light main__employer-page-two-item-button">Подробнее</a>--> | 275 | class="button button_light main__employer-page-two-item-button">Подробнее</a>--> |
274 | </div> | 276 | </div> |
275 | <div class="main__employer-page-two-item-bottom"> | 277 | <div class="main__employer-page-two-item-bottom"> |
276 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> | 278 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> |
277 | <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" | 279 | <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" |
278 | class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> | 280 | class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> |
279 | <svg> | 281 | <svg> |
280 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 282 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
281 | </svg> | 283 | </svg> |
282 | </button> | 284 | </button> |
283 | </div> | 285 | </div> |
284 | </div> | 286 | </div> |
285 | @endforeach | 287 | @endforeach |
286 | 288 | ||
287 | <div style="margin-top: 20px"> | 289 | <div style="margin-top: 20px"> |
288 | {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }} | 290 | {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }} |
289 | </div> | 291 | </div> |
290 | <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> | 292 | <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> |
291 | <span>Показать ещё</span> | 293 | <span>Показать ещё</span> |
292 | <span>Скрыть</span> | 294 | <span>Скрыть</span> |
293 | </button>--> | 295 | </button>--> |
294 | </div> | 296 | </div> |
295 | </div> | 297 | </div> |
296 | </div> | 298 | </div> |
297 | </div> | 299 | </div> |
298 | </div> | 300 | </div> |
299 | </div> | 301 | </div> |
300 | </main> | 302 | </main> |
301 | @endsection | 303 | @endsection |
302 | 304 |
resources/views/list_vacancies.blade.php
1 | @php | 1 | @php |
2 | use App\Classes\StatusUser; | 2 | use App\Classes\StatusUser; |
3 | @endphp | 3 | @endphp |
4 | 4 | ||
5 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) | 5 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) |
6 | 6 | ||
7 | @section('scripts') | 7 | @section('scripts') |
8 | <script> | 8 | <script> |
9 | console.log('Test system'); | 9 | console.log('Test system'); |
10 | $(document).on('change', '#jobs', function() { | 10 | $(document).on('change', '#jobs', function() { |
11 | var val = $(this).val(); | 11 | var val = $(this).val(); |
12 | var main_oskar = $('#main_ockar'); | 12 | var main_oskar = $('#main_ockar'); |
13 | var ti_head = $('#title_head'); | 13 | var ti_head = $('#title_head'); |
14 | 14 | ||
15 | console.log('Code='+val); | 15 | console.log('Code='+val); |
16 | console.log('Click change...'); | 16 | console.log('Click change...'); |
17 | $.ajax({ | 17 | $.ajax({ |
18 | type: "GET", | 18 | type: "GET", |
19 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | 19 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
20 | data: "job="+val, | 20 | data: "job="+val, |
21 | success: function (data) { | 21 | success: function (data) { |
22 | console.log('Выбор сделан!'); | 22 | console.log('Выбор сделан!'); |
23 | 23 | ||
24 | main_oskar.html(data); | 24 | main_oskar.html(data); |
25 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 25 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
26 | }, | 26 | }, |
27 | headers: { | 27 | headers: { |
28 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 28 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
29 | }, | 29 | }, |
30 | error: function (data) { | 30 | error: function (data) { |
31 | data = JSON.stringify(data); | 31 | data = JSON.stringify(data); |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | 35 | ||
36 | if ((val == '') || (val == '0')) { | 36 | if ((val == '') || (val == '0')) { |
37 | title_head.html('Все категории'); | 37 | title_head.html('Все категории'); |
38 | } else { | 38 | } else { |
39 | $.ajax({ | 39 | $.ajax({ |
40 | type: "GET", | 40 | type: "GET", |
41 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif", | 41 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}?@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif", |
42 | data: "job=" + val +"&title=1", | 42 | data: "job=" + val +"&title=1", |
43 | success: function (data) { | 43 | success: function (data) { |
44 | 44 | ||
45 | console.log(data); | 45 | console.log(data); |
46 | }, | 46 | }, |
47 | 47 | ||
48 | headers: { | 48 | headers: { |
49 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 49 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
50 | }, | 50 | }, |
51 | 51 | ||
52 | error: function (data) { | 52 | error: function (data) { |
53 | data = JSON.stringify(data); | 53 | data = JSON.stringify(data); |
54 | console.log('Error: ' + data); | 54 | console.log('Error: ' + data); |
55 | } | 55 | } |
56 | }); | 56 | }); |
57 | 57 | ||
58 | } | 58 | } |
59 | }); | 59 | }); |
60 | 60 | ||
61 | $(document).on('click', '.js_send_it_button', function() { | 61 | $(document).on('click', '.js_send_it_button', function() { |
62 | var this_ = $(this); | 62 | var this_ = $(this); |
63 | var code_user_id = this_.attr('data-uid'); | 63 | var code_user_id = this_.attr('data-uid'); |
64 | var code_to_user_id = this_.attr('data-tuid'); | 64 | var code_to_user_id = this_.attr('data-tuid'); |
65 | var code_vacancy = this_.attr('data-vacancy'); | 65 | var code_vacancy = this_.attr('data-vacancy'); |
66 | var user_id = $('#_user_id'); | 66 | var user_id = $('#_user_id'); |
67 | var to_user_id = $('#_to_user_id'); | 67 | var to_user_id = $('#_to_user_id'); |
68 | var vacancy = $('#_vacancy'); | 68 | var vacancy = $('#_vacancy'); |
69 | 69 | ||
70 | console.log('Клик на кнопки...'); | 70 | console.log('Клик на кнопки...'); |
71 | 71 | ||
72 | user_id.val(code_user_id); | 72 | user_id.val(code_user_id); |
73 | to_user_id.val(code_to_user_id); | 73 | to_user_id.val(code_to_user_id); |
74 | vacancy.val(code_vacancy); | 74 | vacancy.val(code_vacancy); |
75 | }); | 75 | }); |
76 | 76 | ||
77 | $(document).on('click', '.js_send_for_emp', function() { | 77 | $(document).on('click', '.js_send_for_emp', function() { |
78 | var this_ = $(this); | 78 | var this_ = $(this); |
79 | var code_user_id = this_.attr('data-uid'); | 79 | var code_user_id = this_.attr('data-uid'); |
80 | var code_to_user_id = this_.attr('data-tuid'); | 80 | var code_to_user_id = this_.attr('data-tuid'); |
81 | var code_vacancy = this_.attr('data-vacancy'); | 81 | var code_vacancy = this_.attr('data-vacancy'); |
82 | var user_id = $('#send_user_id'); | 82 | var user_id = $('#send_user_id'); |
83 | var to_user_id = $('#send_to_user_id'); | 83 | var to_user_id = $('#send_to_user_id'); |
84 | var vacancy = $('#send_vacancy'); | 84 | var vacancy = $('#send_vacancy'); |
85 | 85 | ||
86 | console.log('code_to_user_id='+code_to_user_id); | 86 | console.log('code_to_user_id='+code_to_user_id); |
87 | console.log('code_user_id='+code_user_id); | 87 | console.log('code_user_id='+code_user_id); |
88 | console.log('code_vacancy='+code_vacancy); | 88 | console.log('code_vacancy='+code_vacancy); |
89 | console.log('Клик на кнопке...'); | 89 | console.log('Клик на кнопке...'); |
90 | 90 | ||
91 | user_id.val(code_user_id); | 91 | user_id.val(code_user_id); |
92 | to_user_id.val(code_to_user_id); | 92 | to_user_id.val(code_to_user_id); |
93 | vacancy.val(code_vacancy); | 93 | vacancy.val(code_vacancy); |
94 | }); | 94 | }); |
95 | 95 | ||
96 | $(document).on('change', '#sort_ajax', function() { | 96 | $(document).on('change', '#sort_ajax', function() { |
97 | var this_ = $(this); | 97 | var this_ = $(this); |
98 | var val_ = this_.val(); | 98 | var val_ = this_.val(); |
99 | console.log('sort items '+val_); | 99 | console.log('sort items '+val_); |
100 | 100 | ||
101 | $.ajax({ | 101 | $.ajax({ |
102 | type: "GET", | 102 | type: "GET", |
103 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | 103 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
104 | data: "sort="+val_+"&block=1", | 104 | data: "sort="+val_+"&block=1", |
105 | success: function (data) { | 105 | success: function (data) { |
106 | console.log('Выбор сортировки'); | 106 | console.log('Выбор сортировки'); |
107 | console.log(data); | 107 | console.log(data); |
108 | $('#main_ockar').html(data); | 108 | $('#main_ockar').html(data); |
109 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 109 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['job']))&job={{ $_GET['job'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
110 | }, | 110 | }, |
111 | headers: { | 111 | headers: { |
112 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 112 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
113 | }, | 113 | }, |
114 | error: function (data) { | 114 | error: function (data) { |
115 | data = JSON.stringify(data); | 115 | data = JSON.stringify(data); |
116 | console.log('Error: ' + data); | 116 | console.log('Error: ' + data); |
117 | } | 117 | } |
118 | }); | 118 | }); |
119 | }); | 119 | }); |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | $(document).ready(function(){ | 123 | $(document).ready(function(){ |
124 | var sel = $('#select2-sort_ajax-container'); | 124 | var sel = $('#select2-sort_ajax-container'); |
125 | var key = getUrlParameter('sort'); | 125 | var key = getUrlParameter('sort'); |
126 | console.log(sel); | 126 | console.log(sel); |
127 | console.log(key); | 127 | console.log(key); |
128 | 128 | ||
129 | if (key !=='') { | 129 | if (key !=='') { |
130 | console.log(key); | 130 | console.log(key); |
131 | switch (key) { | 131 | switch (key) { |
132 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 132 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
133 | case "name_up": sel.html('По имени (возрастание)'); break; | 133 | case "name_up": sel.html('По имени (возрастание)'); break; |
134 | case "name_down": sel.html('По дате (убывание)'); break; | 134 | case "name_down": sel.html('По дате (убывание)'); break; |
135 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 135 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
136 | case "created_at_down": sel.html('По дате (убывание)'); break; | 136 | case "created_at_down": sel.html('По дате (убывание)'); break; |
137 | } | 137 | } |
138 | 138 | ||
139 | } | 139 | } |
140 | }); | 140 | }); |
141 | </script> | 141 | </script> |
142 | @include('js.favorite-vacancy-45') | 142 | @include('js.favorite-vacancy-45') |
143 | @endsection | 143 | @endsection |
144 | @section('content') | 144 | @section('content') |
145 | <section class="thing"> | 145 | <section class="thing"> |
146 | <div class="container"> | 146 | <div class="container"> |
147 | <form class="thing__body" action="{{ route('list-vacancies', ['categories' => (!empty($Name_categori)) ? $Name_categori[0]->id : '0']) }}" method="POST"> | 147 | <form class="thing__body" action="{{ route('list-vacancies', ['categories' => (!empty($Name_categori)) ? $Name_categori[0]->id : '0']) }}" method="POST"> |
148 | <ul class="breadcrumbs thing__breadcrumbs"> | 148 | <ul class="breadcrumbs thing__breadcrumbs"> |
149 | <li><a href="{{ route('index') }}">Главная</a></li> | 149 | <li><a href="{{ route('index') }}">Главная</a></li> |
150 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> | 150 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> |
151 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> | 151 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> |
152 | </ul> | 152 | </ul> |
153 | <h1 class="thing__title">Вакансии</h1> | 153 | <h1 class="thing__title">Вакансии</h1> |
154 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | 154 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для |
155 | существующих финансовых и административных условий.</p> | 155 | существующих финансовых и административных условий.</p> |
156 | <div class="select select_search thing__select"> | 156 | <div class="select select_search thing__select"> |
157 | <div class="select__icon"> | 157 | <div class="select__icon"> |
158 | <svg> | 158 | <svg> |
159 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 159 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
160 | </svg> | 160 | </svg> |
161 | </div> | 161 | </div> |
162 | <select class="js-select2" id="jobs" name="jobs"> | 162 | <select class="js-select2" id="jobs" name="jobs"> |
163 | <option value="0" selected>Выберите должность</option> | 163 | <option value="0" selected>Выберите должность</option> |
164 | @if ($Job_title->count()) | 164 | @if ($Job_title->count()) |
165 | @foreach($Job_title as $JT) | 165 | @foreach($Job_title as $JT) |
166 | <option value="{{ $JT->id }}" @if(isset($_GET['job']) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option> | 166 | <option value="{{ $JT->id }}" @if(isset($_GET['job']) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option> |
167 | @endforeach | 167 | @endforeach |
168 | @endif | 168 | @endif |
169 | </select> | 169 | </select> |
170 | </div> | 170 | </div> |
171 | </form> | 171 | </form> |
172 | </div> | 172 | </div> |
173 | </section> | 173 | </section> |
174 | <main class="main"> | 174 | <main class="main"> |
175 | <div class="container"> | 175 | <div class="container"> |
176 | <div class="main__vacancies" > | 176 | <div class="main__vacancies" > |
177 | @if (isset($Name_categori[0]->name)) | 177 | @if (isset($Name_categori[0]->name)) |
178 | <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2> | 178 | <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2> |
179 | @else | 179 | @else |
180 | <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2> | 180 | <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2> |
181 | @endif | 181 | @endif |
182 | <div class="filters main__vacancies-filters"> | 182 | <div class="filters main__vacancies-filters"> |
183 | <div class="filters__label" id="col-vo" name="col-vo">Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> | 183 | <div class="filters__label" id="col-vo" name="col-vo">Показано {{ $Query->firstItem() }} – {{ $Query->lastItem() }} из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> |
184 | <div class="filters__body"> | 184 | <div class="filters__body"> |
185 | <div class="select filters__select"> | 185 | <div class="select filters__select"> |
186 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 186 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
187 | <option value="default">Сортировка (по умолчанию)</option> | 187 | <option value="default">Сортировка (по умолчанию)</option> |
188 | <option value="name_up">По имени (возрастание)</option> | 188 | <option value="name_up">По имени (возрастание)</option> |
189 | <option value="name_down">По имени (убывание)</option> | 189 | <option value="name_down">По имени (убывание)</option> |
190 | <option value="created_at_up">По дате (возрастание)</option> | 190 | <option value="created_at_up">По дате (возрастание)</option> |
191 | <option value="created_at_down">По дате (убывание)</option> | 191 | <option value="created_at_down">По дате (убывание)</option> |
192 | </select> | 192 | </select> |
193 | </div> | 193 | </div> |
194 | </div> | 194 | </div> |
195 | </div> | 195 | </div> |
196 | 196 | ||
197 | <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar"> | 197 | <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar"> |
198 | @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp | 198 | @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp |
199 | 199 | ||
200 | @foreach ($Query as $Q) | 200 | @foreach ($Query as $Q) |
201 | @foreach ($Reclama as $Rec) | 201 | @foreach ($Reclama as $Rec) |
202 | @if ($Rec->position == $i) | 202 | @if ($Rec->position == $i) |
203 | <div class="main__vacancies-thing"> | 203 | <div class="main__vacancies-thing"> |
204 | @if (!empty($Rec->image)) | 204 | @if (!empty($Rec->image)) |
205 | <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | 205 | <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> |
206 | @else | 206 | @else |
207 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | 207 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> |
208 | @endif | 208 | @endif |
209 | <div class="main__vacancies-thing-body"> | 209 | <div class="main__vacancies-thing-body"> |
210 | <h2>{{ $Rec->title }}</h2> | 210 | <h2>{{ $Rec->title }}</h2> |
211 | <div class="main__vacancies-thing-scroll"> | 211 | <div class="main__vacancies-thing-scroll"> |
212 | {!! $Rec->text !!} | 212 | {!! $Rec->text !!} |
213 | </div> | 213 | </div> |
214 | <a href="{{ $Rec->link }}" class="button">Узнать больше</a> | 214 | <a href="{{ $Rec->link }}" class="button">Узнать больше</a> |
215 | </div> | 215 | </div> |
216 | </div> | 216 | </div> |
217 | @endif | 217 | @endif |
218 | @endforeach | 218 | @endforeach |
219 | <div class="main__vacancies-item main__employer-page-two-item"> | 219 | <div class="main__vacancies-item main__employer-page-two-item"> |
220 | 220 | ||
221 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | 221 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> |
222 | <svg> | 222 | <svg> |
223 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 223 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
224 | </svg> | 224 | </svg> |
225 | <span> | 225 | <span> |
226 | Вернуться к списку вакансий | 226 | Вернуться к списку вакансий |
227 | </span> | 227 | </span> |
228 | </a> | 228 | </a> |
229 | 229 | ||
230 | <div class="main__employer-page-two-item-toper"> | 230 | <div class="main__employer-page-two-item-toper"> |
231 | @if (!empty($Q->employer->logo)) | 231 | @if (!empty($Q->employer->logo)) |
232 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | 232 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> |
233 | @else | 233 | @else |
234 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | 234 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> |
235 | @endif | 235 | @endif |
236 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> | 236 | <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif</span> |
237 | </div> | 237 | </div> |
238 | 238 | ||
239 | <div class="main__employer-page-two-item-text"> | 239 | <div class="main__employer-page-two-item-text"> |
240 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 240 | <div class="main__employer-page-two-item-text-name"> |
241 | <h3>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h3> | ||
242 | </div> | ||
243 | <!--Судоходная компания ведет набор | ||
241 | специалистов на следующие должности:</div> | 244 | специалистов на следующие должности:</div> |
242 | <div class="main__employer-page-two-item-text-links"> | 245 | <div class="main__employer-page-two-item-text-links"> |
243 | @if (isset($Q->jobs)) | 246 | if (isset($Q->jobs)) |
244 | @foreach ($Q->jobs as $key => $j) | 247 | foreach ($Q->jobs as $key => $j) |
245 | <a>“{{ $j->name }}” <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> | 248 | <a>“{ $j->name }}” <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> |
246 | </a> | 249 | <!-- </a> |
247 | @endforeach | 250 | endforeach |
248 | @endif | 251 | endif |
249 | </div> | 252 | </div>--> |
250 | </div> | 253 | </div> |
251 | 254 | ||
252 | <div class="main__employer-page-two-item-text"> | 255 | <div class="main__employer-page-two-item-text"> |
253 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 256 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
254 | <div class="main__employer-page-two-item-text-body"> | 257 | <div class="main__employer-page-two-item-text-body"> |
255 | {!! $Q->text !!} | 258 | {!! $Q->text !!} |
256 | </div> | 259 | </div> |
257 | </div> | 260 | </div> |
258 | <!--<div class="main__employer-page-two-item-text"> | 261 | <!--<div class="main__employer-page-two-item-text"> |
259 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 262 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
260 | <div class="main__employer-page-two-item-text-body"> | 263 | <div class="main__employer-page-two-item-text-body"> |
261 | !! $Q->description !!} | 264 | !! $Q->description !!} |
262 | </div> | 265 | </div> |
263 | </div> | 266 | </div> |
264 | <div class="main__employer-page-two-item-text"> | 267 | <div class="main__employer-page-two-item-text"> |
265 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 268 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
266 | <div class="main__employer-page-two-item-text-body"> | 269 | <div class="main__employer-page-two-item-text-body"> |
267 | !! $Q->contacts_emails !!} | 270 | !! $Q->contacts_emails !!} |
268 | </div> | 271 | </div> |
269 | </div> | 272 | </div> |
270 | <div class="main__employer-page-two-item-text"> | 273 | <div class="main__employer-page-two-item-text"> |
271 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 274 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
272 | <div class="main__employer-page-two-item-text-body"> | 275 | <div class="main__employer-page-two-item-text-body"> |
273 | !! $Q->contacts_telephones !!} | 276 | !! $Q->contacts_telephones !!} |
274 | </div> | 277 | </div> |
275 | </div>--> | 278 | </div>--> |
276 | 279 | ||
277 | <div class="main__employer-page-two-item-tags"> | 280 | <div class="main__employer-page-two-item-tags"> |
278 | @if (!empty($Q->jobs_code[0]->position_ship)) | 281 | @if (!empty($Q->jobs_code[0]->position_ship)) |
279 | <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> | 282 | <span class="main__employer-page-two-item-tag"> #{{ $Q->jobs_code[0]->position_ship }}</span> |
280 | @else | 283 | @else |
281 | @if (isset($Q->jobs)) | 284 | @if (isset($Q->jobs)) |
282 | @foreach ($Q->jobs as $key => $j) | 285 | @foreach ($Q->jobs as $key => $j) |
283 | <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> | 286 | <span class="main__employer-page-two-item-tag"> #{{ $j->name }}</span> |
284 | @endforeach | 287 | @endforeach |
285 | @endif | 288 | @endif |
286 | @endif | 289 | @endif |
287 | </div> | 290 | </div> |
288 | <div class="main__employer-page-two-item-buttons"> | 291 | <div class="main__employer-page-two-item-buttons"> |
289 | @guest | 292 | @guest |
290 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | 293 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' |
291 | class="button main__employer-page-two-item-button">Откликнуться</button> | 294 | class="button main__employer-page-two-item-button">Откликнуться</button> |
292 | @else | 295 | @else |
293 | @if (App\Classes\StatusUser::Status()==1) | 296 | @if (App\Classes\StatusUser::Status()==1) |
294 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | 297 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' |
295 | class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> | 298 | class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> |
296 | @else | 299 | @else |
297 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | 300 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' |
298 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | 301 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> |
299 | @endif | 302 | @endif |
300 | @endguest | 303 | @endguest |
301 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | 304 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> |
302 | </div> | 305 | </div> |
303 | <div class="main__employer-page-two-item-bottom"> | 306 | <div class="main__employer-page-two-item-bottom"> |
304 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> | 307 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> |
305 | <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> | 308 | <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> |
306 | <svg> | 309 | <svg> |
307 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 310 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
308 | </svg> | 311 | </svg> |
309 | </button> | 312 | </button> |
310 | </div> | 313 | </div> |
311 | </div> | 314 | </div> |
312 | @php $i++ @endphp | 315 | @php $i++ @endphp |
313 | @endforeach | 316 | @endforeach |
314 | <div style="margin-top: 20px"> | 317 | <div style="margin-top: 20px"> |
315 | {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }} | 318 | {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }} |
316 | </div><!-- конец --> | 319 | </div><!-- конец --> |
317 | 320 | ||
318 | </div> | 321 | </div> |
319 | </div> | 322 | </div> |
320 | </div> | 323 | </div> |
321 | </main> | 324 | </main> |
322 | @endsection | 325 | @endsection |
323 | 326 |
resources/views/vacance-item.blade.php
1 | @php | 1 | @php |
2 | use App\Classes\StatusUser; | 2 | use App\Classes\StatusUser; |
3 | @endphp | 3 | @endphp |
4 | 4 | ||
5 | @extends('layout.frontend', ['title' => $title]) | 5 | @extends('layout.frontend', ['title' => $title]) |
6 | 6 | ||
7 | @section('scripts') | 7 | @section('scripts') |
8 | <!--include('js.favorite-vacancy')--> | 8 | <!--include('js.favorite-vacancy')--> |
9 | <script> | 9 | <script> |
10 | $(document).on('click', '.js_send_it_button', function() { | 10 | $(document).on('click', '.js_send_it_button', function() { |
11 | var this_ = $(this); | 11 | var this_ = $(this); |
12 | var code_user_id = this_.attr('data-uid'); | 12 | var code_user_id = this_.attr('data-uid'); |
13 | var code_to_user_id = this_.attr('data-tuid'); | 13 | var code_to_user_id = this_.attr('data-tuid'); |
14 | var code_vacancy = this_.attr('data-vacancy'); | 14 | var code_vacancy = this_.attr('data-vacancy'); |
15 | var user_id = $('#_user_id'); | 15 | var user_id = $('#_user_id'); |
16 | var to_user_id = $('#_to_user_id'); | 16 | var to_user_id = $('#_to_user_id'); |
17 | var vacancy = $('#_vacancy'); | 17 | var vacancy = $('#_vacancy'); |
18 | 18 | ||
19 | console.log('Клик на кнопки...'); | 19 | console.log('Клик на кнопки...'); |
20 | 20 | ||
21 | user_id.val(code_user_id); | 21 | user_id.val(code_user_id); |
22 | to_user_id.val(code_to_user_id); | 22 | to_user_id.val(code_to_user_id); |
23 | vacancy.val(code_vacancy); | 23 | vacancy.val(code_vacancy); |
24 | }); | 24 | }); |
25 | </script> | 25 | </script> |
26 | <script> | 26 | <script> |
27 | $(document).on('click', '.js_send_for_emp', function() { | 27 | $(document).on('click', '.js_send_for_emp', function() { |
28 | var this_ = $(this); | 28 | var this_ = $(this); |
29 | var code_user_id = this_.attr('data-uid'); | 29 | var code_user_id = this_.attr('data-uid'); |
30 | var code_to_user_id = this_.attr('data-tuid'); | 30 | var code_to_user_id = this_.attr('data-tuid'); |
31 | var code_vacancy = this_.attr('data-vacancy'); | 31 | var code_vacancy = this_.attr('data-vacancy'); |
32 | var user_id = $('#send_user_id'); | 32 | var user_id = $('#send_user_id'); |
33 | var to_user_id = $('#send_to_user_id'); | 33 | var to_user_id = $('#send_to_user_id'); |
34 | var vacancy = $('#send_vacancy'); | 34 | var vacancy = $('#send_vacancy'); |
35 | 35 | ||
36 | console.log('code_to_user_id='+code_to_user_id); | 36 | console.log('code_to_user_id='+code_to_user_id); |
37 | console.log('code_user_id='+code_user_id); | 37 | console.log('code_user_id='+code_user_id); |
38 | console.log('code_vacancy='+code_vacancy); | 38 | console.log('code_vacancy='+code_vacancy); |
39 | console.log('Клик на кнопке...'); | 39 | console.log('Клик на кнопке...'); |
40 | 40 | ||
41 | user_id.val(code_user_id); | 41 | user_id.val(code_user_id); |
42 | to_user_id.val(code_to_user_id); | 42 | to_user_id.val(code_to_user_id); |
43 | vacancy.val(code_vacancy); | 43 | vacancy.val(code_vacancy); |
44 | }); | 44 | }); |
45 | </script> | 45 | </script> |
46 | @include('js.favorite-vacancy-45') | 46 | @include('js.favorite-vacancy-45') |
47 | @endsection | 47 | @endsection |
48 | 48 | ||
49 | @section('content') | 49 | @section('content') |
50 | <main class="main"> | 50 | <main class="main"> |
51 | <div class="container"> | 51 | <div class="container"> |
52 | <ul class="breadcrumbs main__breadcrumbs"> | 52 | <ul class="breadcrumbs main__breadcrumbs"> |
53 | <li><a href="{{ route('index') }}">Главная</a></li> | 53 | <li><a href="{{ route('index') }}">Главная</a></li> |
54 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> | 54 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> |
55 | <li><b>{{ $title }}</b></li> | 55 | <li><b>{{ $title }}</b></li> |
56 | </ul> | 56 | </ul> |
57 | <div class="main__employer-page"> | 57 | <div class="main__employer-page"> |
58 | 58 | ||
59 | @if (isset($Query[0]->employer)) | 59 | @if (isset($Query[0]->employer)) |
60 | <h2 class="main__employer-page-title">О компании</h2> | 60 | <h2 class="main__employer-page-title">О компании</h2> |
61 | <div class="main__employer-page-two-item-toper"> | 61 | <div class="main__employer-page-two-item-toper"> |
62 | @if (!empty($Query[0]->employer->logo)) | 62 | @if (!empty($Query[0]->employer->logo)) |
63 | <img src="{{ asset(Storage::url($Query[0]->employer->logo)) }}" alt="{{ $Query[0]->employer->name }}"> | 63 | <img src="{{ asset(Storage::url($Query[0]->employer->logo)) }}" alt="{{ $Query[0]->employer->name }}"> |
64 | @else | 64 | @else |
65 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Query[0]->employer->name }}"> | 65 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Query[0]->employer->name }}"> |
66 | @endif | 66 | @endif |
67 | <span>{{ $Query[0]->employer->name_company }}</span> | 67 | <span>{{ $Query[0]->employer->name_company }}</span> |
68 | </div> | 68 | </div> |
69 | 69 | ||
70 | <div class="main__employer-page-info"> | 70 | <div class="main__employer-page-info"> |
71 | <div class="main__employer-page-item"> | 71 | <div class="main__employer-page-item"> |
72 | <b> Адрес компании</b> | 72 | <b> Адрес компании</b> |
73 | <span> | 73 | <span> |
74 | {{ $Query[0]->employer->address }} | 74 | {{ $Query[0]->employer->address }} |
75 | </span> | 75 | </span> |
76 | </div> | 76 | </div> |
77 | <div class="main__employer-page-item"> | 77 | <div class="main__employer-page-item"> |
78 | <b>Сайт</b> | 78 | <b>Сайт</b> |
79 | <span> | 79 | <span> |
80 | <a href="{{ $Query[0]->employer->site }}">{{ $Query[0]->employer->site }}</a> | 80 | <a href="{{ $Query[0]->employer->site }}">{{ $Query[0]->employer->site }}</a> |
81 | </span> | 81 | </span> |
82 | </div> | 82 | </div> |
83 | <div class="main__employer-page-item"> | 83 | <div class="main__employer-page-item"> |
84 | <b>Почта</b> | 84 | <b>Почта</b> |
85 | <span> | 85 | <span> |
86 | <a href="{{ $Query[0]->employer->email }}">{{ $Query[0]->employer->email }}</a> | 86 | <a href="{{ $Query[0]->employer->email }}">{{ $Query[0]->employer->email }}</a> |
87 | </span> | 87 | </span> |
88 | </div> | 88 | </div> |
89 | <div class="main__employer-page-item"> | 89 | <div class="main__employer-page-item"> |
90 | <b>Телефон</b> | 90 | <b>Телефон</b> |
91 | <span> | 91 | <span> |
92 | <a href="tel:{{ $Query[0]->employer->telephone }}">{{ $Query[0]->employer->telephone }}</a> | 92 | <a href="tel:{{ $Query[0]->employer->telephone }}">{{ $Query[0]->employer->telephone }}</a> |
93 | </span> | 93 | </span> |
94 | </div> | 94 | </div> |
95 | </div> | 95 | </div> |
96 | @else | 96 | @else |
97 | <div class="main__employer-page-info"> | 97 | <div class="main__employer-page-info"> |
98 | <div class="main__employer-page-item"> | 98 | <div class="main__employer-page-item"> |
99 | <b>Ничего не найдено</b> | 99 | <b>Ничего не найдено</b> |
100 | <span> | 100 | <span> |
101 | Нет данных о компании | 101 | Нет данных о компании |
102 | </span> | 102 | </span> |
103 | </div> | 103 | </div> |
104 | </div> | 104 | </div> |
105 | @endif | 105 | @endif |
106 | <h2 class="main__employer-page-title">{{ $Query[0]->name }}</h2> | 106 | <h2 class="main__employer-page-title">{{ $Query[0]->name }}</h2> |
107 | <h3 class="main__employer-page-title_">Описание вакансии</h3> | 107 | <h3 class="main__employer-page-title_">Описание вакансии</h3> |
108 | 108 | ||
109 | </div> | 109 | </div> |
110 | 110 | ||
111 | @foreach ($Query as $Q) | 111 | @foreach ($Query as $Q) |
112 | <div class="main__vacancies-item-page main__employer-page-two-item"> | 112 | <div class="main__vacancies-item-page main__employer-page-two-item"> |
113 | <div class="main__employer-page-two-item-text"> | 113 | <!--<div class="main__employer-page-two-item-text"> |
114 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 114 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор |
115 | специалистов на следующие должности:</div> | 115 | специалистов на следующие должности:</div> |
116 | <div class="main__employer-page-two-item-text-links"> | 116 | <div class="main__employer-page-two-item-text-links"> |
117 | @if (isset($Q->jobs)) | 117 | if (isset($Q->jobs)) |
118 | @foreach ($Q->jobs as $key => $j) | 118 | foreach ($Q->jobs as $key => $j) |
119 | <a>“{{ $j->name }}” | 119 | <a>“{ $j->name }}” |
120 | <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> | 120 | <!-- з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> |
121 | </a> | 121 | <!--</a> |
122 | @endforeach | 122 | endforeach |
123 | @endif | 123 | endif |
124 | </div> | 124 | </div> |
125 | </div> | 125 | </div>--> |
126 | <div class="main__employer-page-two-item-text"> | 126 | <div class="main__employer-page-two-item-text"> |
127 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 127 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
128 | <div class="main__employer-page-two-item-text-body"> | 128 | <div class="main__employer-page-two-item-text-body"> |
129 | {!! $Q->text !!} | 129 | {!! $Q->text !!} |
130 | </div> | 130 | </div> |
131 | </div> | 131 | </div> |
132 | <!--<div class="main__employer-page-two-item-text"> | 132 | <!--<div class="main__employer-page-two-item-text"> |
133 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 133 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
134 | <div class="main__employer-page-two-item-text-body"> | 134 | <div class="main__employer-page-two-item-text-body"> |
135 | !! $Q->description !!} | 135 | !! $Q->description !!} |
136 | </div> | 136 | </div> |
137 | </div> | 137 | </div> |
138 | <div class="main__employer-page-two-item-text"> | 138 | <div class="main__employer-page-two-item-text"> |
139 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 139 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
140 | <div class="main__employer-page-two-item-text-body"> | 140 | <div class="main__employer-page-two-item-text-body"> |
141 | !! $Q->contacts_emails !!} | 141 | !! $Q->contacts_emails !!} |
142 | </div> | 142 | </div> |
143 | <div class="main__employer-page-two-item-text"> | 143 | <div class="main__employer-page-two-item-text"> |
144 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 144 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
145 | <div class="main__employer-page-two-item-text-body"> | 145 | <div class="main__employer-page-two-item-text-body"> |
146 | !! $Q->contacts_telephones !!} | 146 | !! $Q->contacts_telephones !!} |
147 | </div> | 147 | </div> |
148 | </div>--> | 148 | </div>--> |
149 | 149 | ||
150 | <div class="main__employer-page-two-item-tags"> | 150 | <div class="main__employer-page-two-item-tags"> |
151 | @if (!empty($Q->jobs_code[0]->position_ship)) | 151 | @if (!empty($Q->jobs_code[0]->position_ship)) |
152 | <span class="main__employer-page-two-item-tag">#{{ $Q->jobs_code[0]->position_ship }}</span> | 152 | <span class="main__employer-page-two-item-tag">#{{ $Q->jobs_code[0]->position_ship }}</span> |
153 | @else | 153 | @else |
154 | @if (isset($Q->jobs)) | 154 | @if (isset($Q->jobs)) |
155 | @foreach ($Q->jobs as $key => $j) | 155 | @foreach ($Q->jobs as $key => $j) |
156 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 156 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
157 | @endforeach | 157 | @endforeach |
158 | @endif | 158 | @endif |
159 | @endif | 159 | @endif |
160 | </div> | 160 | </div> |
161 | <br> | 161 | <br> |
162 | <div class="main__employer-page-two-item-buttons"> | 162 | <div class="main__employer-page-two-item-buttons"> |
163 | @guest | 163 | @guest |
164 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | 164 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' |
165 | class="button main__employer-page-two-item-button">Откликнуться</button> | 165 | class="button main__employer-page-two-item-button">Откликнуться</button> |
166 | @else | 166 | @else |
167 | @if (App\Classes\StatusUser::Status()==1) | 167 | @if (App\Classes\StatusUser::Status()==1) |
168 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | 168 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' |
169 | class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> | 169 | class="button main__employer-page-two-item-button js_send_for_emp">Откликнуться</button> |
170 | @else | 170 | @else |
171 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | 171 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' |
172 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | 172 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> |
173 | @endif | 173 | @endif |
174 | @endguest | 174 | @endguest |
175 | </div> | 175 | </div> |
176 | <div class="main__employer-page-two-item-bottom"> | 176 | <div class="main__employer-page-two-item-bottom"> |
177 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> | 177 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> |
178 | <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js_vac_favorite js-toggle {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> | 178 | <button type="button" id="like{{ $Q->id }}" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js_vac_favorite js-toggle {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}"> |
179 | <svg> | 179 | <svg> |
180 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 180 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
181 | </svg> | 181 | </svg> |
182 | </button> | 182 | </button> |
183 | </div> | 183 | </div> |
184 | 184 | ||
185 | </div> | 185 | </div> |
186 | 186 | ||
187 | @endforeach | 187 | @endforeach |
188 | 188 | ||
189 | </div> <a href="{{ redirect()->back()->getTargetUrl() }}" class="back"> | 189 | <a href="{{ redirect()->back()->getTargetUrl() }}" class="back"> |
190 | <svg> | 190 | <svg> |
191 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 191 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
192 | </svg> | 192 | </svg> |
193 | <span> | 193 | <span> |
194 | Вернуться к списку вакансий | 194 | Вернуться к списку вакансий |
195 | </span> | 195 | </span> |
196 | </a> | 196 | </a> |
197 | </div> | ||
197 | </main> | 198 | </main> |
198 | </div> | 199 | </div> |
199 | @endsection | 200 | @endsection |
200 | 201 |
resources/views/workers/favorite.blade.php
1 | @extends('layout.frontend', ['title' => 'Избранные - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Избранные - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | @include('js.favorite-vacancy-45') | 4 | @include('js.favorite-vacancy-45') |
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <section class="cabinet"> | 8 | <section class="cabinet"> |
9 | <div class="container"> | 9 | <div class="container"> |
10 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 10 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
11 | <li><a href="{{ route('index') }}">Главная</a></li> | 11 | <li><a href="{{ route('index') }}">Главная</a></li> |
12 | <li><b>Личный кабинет</b></li> | 12 | <li><b>Личный кабинет</b></li> |
13 | </ul> | 13 | </ul> |
14 | <div class="cabinet__wrapper"> | 14 | <div class="cabinet__wrapper"> |
15 | <div class="cabinet__side"> | 15 | <div class="cabinet__side"> |
16 | <div class="cabinet__side-toper"> | 16 | <div class="cabinet__side-toper"> |
17 | @include('workers.emblema') | 17 | @include('workers.emblema') |
18 | 18 | ||
19 | </div> | 19 | </div> |
20 | @include('workers.menu', ['item' => 3]) | 20 | @include('workers.menu', ['item' => 3]) |
21 | </div> | 21 | </div> |
22 | 22 | ||
23 | <div class="cabinet__body"> | 23 | <div class="cabinet__body"> |
24 | <div class="cabinet__body-item"> | 24 | <div class="cabinet__body-item"> |
25 | <h2 class="title cabinet__title">Избранные вакансии</h2> | 25 | <h2 class="title cabinet__title">Избранные вакансии</h2> |
26 | </div> | 26 | </div> |
27 | <div class="cabinet__body-item"> | 27 | <div class="cabinet__body-item"> |
28 | <div class="cabinet__filters"> | 28 | <div class="cabinet__filters"> |
29 | <div class="cabinet__filters-item"> | 29 | <div class="cabinet__filters-item"> |
30 | <form class="search" action="{{ route('worker.colorado') }}" method="GET"> | 30 | <form class="search" action="{{ route('worker.colorado') }}" method="GET"> |
31 | <input type="search" name="search" id="search" class="input" placeholder="Поиск…"> | 31 | <input type="search" name="search" id="search" class="input" placeholder="Поиск…"> |
32 | <button type="submit" class="button">Найти</button> | 32 | <button type="submit" class="button">Найти</button> |
33 | <span> | 33 | <span> |
34 | <svg> | 34 | <svg> |
35 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 35 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
36 | </svg> | 36 | </svg> |
37 | </span> | 37 | </span> |
38 | </form> | 38 | </form> |
39 | </div> | 39 | </div> |
40 | <!--<div class="cabinet__filters-item"> | 40 | <!--<div class="cabinet__filters-item"> |
41 | <div class="select"> | 41 | <div class="select"> |
42 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 42 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
43 | <option value="default">Сортировка (по умолчанию)</option> | 43 | <option value="default">Сортировка (по умолчанию)</option> |
44 | <option value="name (asc)">По имени (возрастание)</option> | 44 | <option value="name (asc)">По имени (возрастание)</option> |
45 | <option value="name (desc)">По имени (убывание)</option> | 45 | <option value="name (desc)">По имени (убывание)</option> |
46 | <option value="created_at (asc)">По дате (возрастание)</option> | 46 | <option value="created_at (asc)">По дате (возрастание)</option> |
47 | <option value="created_at (desc)">По дате (убывание)</option> | 47 | <option value="created_at (desc)">По дате (убывание)</option> |
48 | </select> | 48 | </select> |
49 | </div> | 49 | </div> |
50 | </div>--> | 50 | </div>--> |
51 | </div> | 51 | </div> |
52 | @if ($Query->count()) | 52 | @if ($Query->count()) |
53 | <div class="cabinet__vacs"> | 53 | <div class="cabinet__vacs"> |
54 | <div id="main_ockar" name="main_ockar" class="cabinet__vacs-body" style="width:100%;"> | 54 | <div id="main_ockar" name="main_ockar" class="cabinet__vacs-body" style="width:100%;"> |
55 | @foreach ($Query as $Q) | 55 | @foreach ($Query as $Q) |
56 | <div class="main__vacancies-item main__employer-page-two-item"> | 56 | <div class="main__vacancies-item main__employer-page-two-item"> |
57 | <a href="{{ route('list-vacancies') }}" class="back main__employer-page-two-item-back"> | 57 | <a href="{{ route('list-vacancies') }}" class="back main__employer-page-two-item-back"> |
58 | <svg> | 58 | <svg> |
59 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 59 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
60 | </svg> | 60 | </svg> |
61 | <span> | 61 | <span> |
62 | Вернуться к списку вакансий | 62 | Вернуться к списку вакансий |
63 | </span> | 63 | </span> |
64 | </a> | 64 | </a> |
65 | <div class="main__employer-page-two-item-toper"> | 65 | <div class="main__employer-page-two-item-toper"> |
66 | @if (!empty($Q->employer->logo)) | 66 | @if (!empty($Q->employer->logo)) |
67 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | 67 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> |
68 | @else | 68 | @else |
69 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Q->employer->name }}" class="main__vacancies-thing-pic"> | 69 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $Q->employer->name }}" class="main__vacancies-thing-pic"> |
70 | @endif | 70 | @endif |
71 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> | 71 | <span>@if (isset($Q->employer->name_company)) {{ $Q->employer->name_company }} @else Не определена @endif </span> |
72 | </div> | 72 | </div> |
73 | <div class="main__employer-page-two-item-text"> | 73 | <div class="main__employer-page-two-item-text"> |
74 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 74 | <div class="main__employer-page-two-item-text-name"> |
75 | <h2>@if (!empty($Q->name)) {{ $Q->name }}@else Не указано @endif </h2> | ||
76 | </div> | ||
77 | <!-- Судоходная компания ведет набор | ||
75 | специалистов на следующие должности:</div> | 78 | специалистов на следующие должности:</div> |
76 | <div class="main__employer-page-two-item-text-links"> | 79 | <div class="main__employer-page-two-item-text-links"> |
77 | @if (isset($Q->jobs)) | 80 | if (isset($Q->jobs)) |
78 | @foreach ($Q->jobs as $key => $j) | 81 | foreach ($Q->jobs as $key => $j) |
79 | <a>“{{ $j->name }}” | 82 | <a>“{ $j->name }}” |
80 | <!--– з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> | 83 | <!-- з/п от if (isset($Q->jobs_code[$key]->min_salary)) { $Q->jobs_code[$key]->min_salary }} endif - if (isset($Q->jobs_code[$key]->max_salary)) { $Q->jobs_code[$key]->max_salary }} endif рублей (на руки)--> |
81 | </a> | 84 | <!-- </a> |
82 | @endforeach | 85 | endforeach |
83 | @endif | 86 | endif |
84 | </div> | 87 | </div>--> |
85 | </div> | 88 | </div> |
86 | <div class="main__employer-page-two-item-text"> | 89 | <div class="main__employer-page-two-item-text"> |
87 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 90 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
88 | <div class="main__employer-page-two-item-text-body"> | 91 | <div class="main__employer-page-two-item-text-body"> |
89 | {!! $Q->text !!} | 92 | {!! $Q->text !!} |
90 | </div> | 93 | </div> |
91 | </div> | 94 | </div> |
92 | <!--<div class="main__employer-page-two-item-text"> | 95 | <!--<div class="main__employer-page-two-item-text"> |
93 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 96 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
94 | <div class="main__employer-page-two-item-text-body"> | 97 | <div class="main__employer-page-two-item-text-body"> |
95 | !! $Q->description !!} | 98 | !! $Q->description !!} |
96 | </div> | 99 | </div> |
97 | </div> | 100 | </div> |
98 | <div class="main__employer-page-two-item-text"> | 101 | <div class="main__employer-page-two-item-text"> |
99 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 102 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
100 | <div class="main__employer-page-two-item-text-body"> | 103 | <div class="main__employer-page-two-item-text-body"> |
101 | !! $Q->contacts_emails !!} | 104 | !! $Q->contacts_emails !!} |
102 | </div> | 105 | </div> |
103 | </div> | 106 | </div> |
104 | <div class="main__employer-page-two-item-text"> | 107 | <div class="main__employer-page-two-item-text"> |
105 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 108 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
106 | <div class="main__employer-page-two-item-text-body"> | 109 | <div class="main__employer-page-two-item-text-body"> |
107 | !! $Q->contacts_telephones !!} | 110 | !! $Q->contacts_telephones !!} |
108 | </div> | 111 | </div> |
109 | </div>--> | 112 | </div>--> |
110 | <div class="main__employer-page-two-item-tags"> | 113 | <div class="main__employer-page-two-item-tags"> |
111 | @if (isset($Q->jobs)) | 114 | @if (isset($Q->jobs)) |
112 | @foreach ($Q->jobs as $key => $j) | 115 | @foreach ($Q->jobs as $key => $j) |
113 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 116 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
114 | @endforeach | 117 | @endforeach |
115 | @endif | 118 | @endif |
116 | </div> | 119 | </div> |
117 | <div class="main__employer-page-two-item-buttons"> | 120 | <div class="main__employer-page-two-item-buttons"> |
118 | <!--<button type="button" | 121 | <!--<button type="button" |
119 | class="button main__employer-page-two-item-button">Откликнуться</button>--> | 122 | class="button main__employer-page-two-item-button">Откликнуться</button>--> |
120 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | 123 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> |
121 | </div> | 124 | </div> |
122 | <div class="main__employer-page-two-item-bottom"> | 125 | <div class="main__employer-page-two-item-bottom"> |
123 | <div class="main__employer-page-two-item-bottom-date">{{ $Q->created_at }}</div> | 126 | <div class="main__employer-page-two-item-bottom-date">{{ $Q->created_at }}</div> |
124 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}?>"> | 127 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($Q) }}?>"> |
125 | <svg> | 128 | <svg> |
126 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 129 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
127 | </svg> | 130 | </svg> |
128 | </button> | 131 | </button> |
129 | </div> | 132 | </div> |
130 | </div> | 133 | </div> |
131 | @endforeach | 134 | @endforeach |
132 | <div style="margin-top: 20px"> | 135 | <div style="margin-top: 20px"> |
133 | {{ $Query->appends($_GET)->links('paginate') }} | 136 | {{ $Query->appends($_GET)->links('paginate') }} |
134 | </div> | 137 | </div> |
135 | </div> | 138 | </div> |
136 | @else | 139 | @else |
137 | <div class="notify"> | 140 | <div class="notify"> |
138 | <svg> | 141 | <svg> |
139 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> | 142 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> |
140 | </svg> | 143 | </svg> |
141 | <span>Нет избранных вакансий</span> | 144 | <span>Нет избранных вакансий</span> |
142 | </div> | 145 | </div> |
143 | @endif | 146 | @endif |
144 | </div> | 147 | </div> |
145 | </div> | 148 | </div> |
146 | </div> | 149 | </div> |
147 | </div> | 150 | </div> |
148 | </section> | 151 | </section> |
149 | </div> | 152 | </div> |
150 | 153 | ||
151 | @endsection | 154 | @endsection |
152 | 155 |