Commit 2726f0123ad3a4a074966124e5bd103664535791
1 parent
7fea6c8d4d
Exists in
master
and in
1 other branch
Коммит по багам до 35 пункта (не включительно)
Showing 9 changed files with 37 additions and 17 deletions Inline Diff
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/DocumentsRequest.php
- app/Http/Requests/PrevCompanyRequest.php
- resources/views/ajax/resume_1.blade.php
- resources/views/js/favorite-worker.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/worker.blade.php
- resources/views/workers/docs.blade.php
- resources/views/workers/prev_company_form.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()->get(); | 99 | $Job_title = Job_title::query()-> |
100 | where('is_remove', '=', '0')-> | ||
101 | where('is_bd', '=' , '1')-> | ||
102 | get(); | ||
100 | 103 | ||
101 | if ($request->get('sort')) { | 104 | if ($request->get('sort')) { |
102 | $sort = $request->get('sort'); | 105 | $sort = $request->get('sort'); |
103 | switch ($sort) { | 106 | switch ($sort) { |
104 | case 'name_up': | 107 | case 'name_up': |
105 | $resumes = $resumes->orderBy(User::select('surname') | 108 | $resumes = $resumes->orderBy(User::select('surname') |
106 | ->whereColumn('Workers.user_id', 'users.id') | 109 | ->whereColumn('Workers.user_id', 'users.id') |
107 | ); | 110 | ); |
108 | break; | 111 | break; |
109 | case 'name_down': | 112 | case 'name_down': |
110 | $resumes = $resumes->orderByDesc(User::select('surname') | 113 | $resumes = $resumes->orderByDesc(User::select('surname') |
111 | ->whereColumn('Workers.user_id', 'users.id') | 114 | ->whereColumn('Workers.user_id', 'users.id') |
112 | ); | 115 | ); |
113 | break; | 116 | break; |
114 | case 'created_at_up': | 117 | case 'created_at_up': |
115 | $resumes = $resumes->OrderBy('created_at')->orderBy('id'); | 118 | $resumes = $resumes->OrderBy('created_at')->orderBy('id'); |
116 | break; | 119 | break; |
117 | case 'created_at_down': | 120 | case 'created_at_down': |
118 | $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); | 121 | $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); |
119 | break; | 122 | break; |
120 | case 'default': | 123 | case 'default': |
121 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); | 124 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); |
122 | break; | 125 | break; |
123 | default: | 126 | default: |
124 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); | 127 | $resumes = $resumes->orderBy('id')->orderby('updated_at'); |
125 | break; | 128 | break; |
126 | } | 129 | } |
127 | } | 130 | } |
128 | 131 | ||
129 | $res_count = $resumes->count(); | 132 | $res_count = $resumes->count(); |
130 | //$resumes = $resumes->get(); | 133 | //$resumes = $resumes->get(); |
131 | $resumes = $resumes->paginate(4); | 134 | $resumes = $resumes->paginate(4); |
132 | if ($request->ajax()) { | 135 | if ($request->ajax()) { |
133 | // Условия обставлены | 136 | // Условия обставлены |
134 | if ($request->has('block') && ($request->get('block') == 1)) { | 137 | if ($request->has('block') && ($request->get('block') == 1)) { |
135 | 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')); |
136 | } | 139 | } |
137 | 140 | ||
138 | if ($request->has('block') && ($request->get('block') == 2)) { | 141 | if ($request->has('block') && ($request->get('block') == 2)) { |
139 | 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')); |
140 | } | 143 | } |
141 | } else { | 144 | } else { |
142 | 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')); |
143 | } | 146 | } |
144 | } else { | 147 | } else { |
145 | return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); | 148 | return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); |
146 | } | 149 | } |
147 | } | 150 | } |
148 | 151 | ||
149 | //Лайк резюме | 152 | //Лайк резюме |
150 | public function like_controller() { | 153 | public function like_controller() { |
151 | 154 | ||
152 | } | 155 | } |
153 | 156 | ||
154 | // анкета соискателя | 157 | // анкета соискателя |
155 | public function resume_profile(Worker $worker) | 158 | public function resume_profile(Worker $worker) |
156 | { | 159 | { |
157 | if (isset(Auth()->user()->id)) { | 160 | if (isset(Auth()->user()->id)) { |
158 | $idiot = Auth()->user()->id; | 161 | $idiot = Auth()->user()->id; |
159 | } else { | 162 | } else { |
160 | $idiot = 0; | 163 | $idiot = 0; |
161 | } | 164 | } |
162 | 165 | ||
163 | $status_work = $this->status_work; | 166 | $status_work = $this->status_work; |
164 | $Query = Worker::query()->with('users')->with('job_titles') | 167 | $Query = Worker::query()->with('users')->with('job_titles') |
165 | ->with('place_worker')->with('sertificate')->with('prev_company') | 168 | ->with('place_worker')->with('sertificate')->with('prev_company') |
166 | ->with('infobloks'); | 169 | ->with('infobloks'); |
167 | $Query = $Query->where('id', '=', $worker->id); | 170 | $Query = $Query->where('id', '=', $worker->id); |
168 | $Query = $Query->get(); | 171 | $Query = $Query->get(); |
169 | 172 | ||
170 | $get_date = date('Y.m'); | 173 | $get_date = date('Y.m'); |
171 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 174 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
172 | ->where('user_id', '=', $worker->id) | 175 | ->where('user_id', '=', $worker->user_id) |
173 | ->get(); | 176 | ->get(); |
174 | 177 | ||
175 | if ($c->count() > 0) { | 178 | if ($c->count() > 0) { |
176 | $upd = Static_worker::find($c[0]->id); | 179 | $upd = Static_worker::find($c[0]->id); |
177 | $upd->lookin = $upd->lookin + 1; | 180 | $upd->lookin = $upd->lookin + 1; |
178 | $upd->save(); | 181 | $upd->save(); |
179 | } else { | 182 | } else { |
180 | $crt = new Static_worker(); | 183 | $crt = new Static_worker(); |
181 | $crt->lookin = 1; | 184 | $crt->lookin = 1; |
182 | $crt->year_month = $get_date; | 185 | $crt->year_month = $get_date; |
183 | $crt->user_id = $worker->user_id; | 186 | $crt->user_id = $worker->user_id; |
184 | $crt->save(); | 187 | $status = $crt->save(); |
185 | } | 188 | } |
186 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 189 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
187 | ->where('user_id', '=', $worker->id) | 190 | ->where('user_id', '=', $worker->id) |
188 | ->get(); | 191 | ->get(); |
189 | return view('worker', compact('Query', 'status_work', 'idiot')); | 192 | return view('worker', compact('Query', 'status_work', 'idiot')); |
190 | } | 193 | } |
191 | 194 | ||
192 | // скачать анкету соискателя | 195 | // скачать анкету соискателя |
193 | public function resume_download(Worker $worker) | 196 | public function resume_download(Worker $worker) |
194 | { | 197 | { |
195 | $status_work = $this->status_work; | 198 | $status_work = $this->status_work; |
196 | $Query = Worker::query()->with('users')->with('job_titles') | 199 | $Query = Worker::query()->with('users')->with('job_titles') |
197 | ->with('place_worker')->with('sertificate')->with('prev_company') | 200 | ->with('place_worker')->with('sertificate')->with('prev_company') |
198 | ->with('infobloks'); | 201 | ->with('infobloks'); |
199 | $Query = $Query->where('id', '=', $worker->id); | 202 | $Query = $Query->where('id', '=', $worker->id); |
200 | $Query = $Query->get()->toArray(); | 203 | $Query = $Query->get()->toArray(); |
201 | 204 | ||
202 | view()->share('Query',$Query); | 205 | view()->share('Query',$Query); |
203 | 206 | ||
204 | 207 | ||
205 | $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); | 208 | $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); |
206 | 209 | ||
207 | return $pdf->stream(); | 210 | return $pdf->stream(); |
208 | } | 211 | } |
209 | 212 | ||
210 | public function resume_download_all() { | 213 | public function resume_download_all() { |
211 | $status_work = $this->status_work; | 214 | $status_work = $this->status_work; |
212 | $Query = Worker::query()->with('users')->with('job_titles') | 215 | $Query = Worker::query()->with('users')->with('job_titles') |
213 | ->with('place_worker')->with('sertificate')->with('prev_company') | 216 | ->with('place_worker')->with('sertificate')->with('prev_company') |
214 | ->with('infobloks')-> | 217 | ->with('infobloks')-> |
215 | whereHas('users', function (Builder $query) { | 218 | whereHas('users', function (Builder $query) { |
216 | $query->Where('is_worker', '=', '1') | 219 | $query->Where('is_worker', '=', '1') |
217 | ->Where('is_bd', '=', '1'); | 220 | ->Where('is_bd', '=', '1'); |
218 | }); | 221 | }); |
219 | //$Query = $Query->where('id', '=', $worker->id); | 222 | //$Query = $Query->where('id', '=', $worker->id); |
220 | $Query = $Query->get()->toArray(); | 223 | $Query = $Query->get()->toArray(); |
221 | 224 | ||
222 | view()->share('Query',$Query); | 225 | view()->share('Query',$Query); |
223 | 226 | ||
224 | $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape'); | 227 | $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape'); |
225 | 228 | ||
226 | return $pdf->stream(); | 229 | return $pdf->stream(); |
227 | } | 230 | } |
228 | 231 | ||
229 | // Кабинет работника | 232 | // Кабинет работника |
230 | public function cabinet(Request $request) | 233 | public function cabinet(Request $request) |
231 | { | 234 | { |
232 | // дата год и месяц | 235 | // дата год и месяц |
233 | $get_date = date('Y.m'); | 236 | $get_date = date('Y.m'); |
234 | 237 | ||
235 | $id = Auth()->user()->id; | 238 | $id = Auth()->user()->id; |
236 | 239 | ||
237 | $Infobloks = infobloks::query()->get(); | 240 | $Infobloks = infobloks::query()->get(); |
238 | 241 | ||
239 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> | 242 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> |
240 | with('infobloks')->with('place_worker')-> | 243 | with('infobloks')->with('place_worker')-> |
241 | WhereHas('users', | 244 | WhereHas('users', |
242 | function (Builder $query) use ($id) {$query->Where('id', $id); | 245 | function (Builder $query) use ($id) {$query->Where('id', $id); |
243 | })->get(); | 246 | })->get(); |
244 | 247 | ||
245 | $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> | 248 | $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> |
246 | where('is_bd', '=' , '1')-> | 249 | where('is_bd', '=' , '1')-> |
247 | OrderByDesc('sort')->OrderBy('name')->get(); | 250 | OrderByDesc('sort')->OrderBy('name')->get(); |
248 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); | 251 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); |
249 | 252 | ||
250 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 253 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
251 | ->where('user_id', '=', $Worker[0]->id) | 254 | ->where('user_id', '=', $Worker[0]->id) |
252 | ->get(); | 255 | ->get(); |
253 | 256 | ||
254 | // 10% | 257 | // 10% |
255 | 258 | ||
256 | $persent = 10; | 259 | $persent = 10; |
257 | $persent1 = 0; | 260 | $persent1 = 0; |
258 | $persent2 = 0; | 261 | $persent2 = 0; |
259 | $persent3 = 0; | 262 | $persent3 = 0; |
260 | $persent4 = 0; | 263 | $persent4 = 0; |
261 | $persent5 = 0; | 264 | $persent5 = 0; |
262 | 265 | ||
263 | if ((!empty($Worker[0]->telephone)) && | 266 | if ((!empty($Worker[0]->telephone)) && |
264 | (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && | 267 | (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && |
265 | (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { | 268 | (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { |
266 | // 40% | 269 | // 40% |
267 | $persent = $persent + 40; | 270 | $persent = $persent + 40; |
268 | $persent1 = 40; | 271 | $persent1 = 40; |
269 | } | 272 | } |
270 | 273 | ||
271 | //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year); | 274 | //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year); |
272 | 275 | ||
273 | if ($Worker[0]->sertificate->count() > 0) { | 276 | if ($Worker[0]->sertificate->count() > 0) { |
274 | // 15% | 277 | // 15% |
275 | $persent = $persent + 15; | 278 | $persent = $persent + 15; |
276 | $persent2 = 15; | 279 | $persent2 = 15; |
277 | } | 280 | } |
278 | 281 | ||
279 | if ($Worker[0]->infobloks->count() > 0) { | 282 | if ($Worker[0]->infobloks->count() > 0) { |
280 | // 20% | 283 | // 20% |
281 | $persent = $persent + 20; | 284 | $persent = $persent + 20; |
282 | $persent3 = 20; | 285 | $persent3 = 20; |
283 | } | 286 | } |
284 | 287 | ||
285 | if ($Worker[0]->prev_company->count() > 0) { | 288 | if ($Worker[0]->prev_company->count() > 0) { |
286 | // 10% | 289 | // 10% |
287 | $persent = $persent + 10; | 290 | $persent = $persent + 10; |
288 | $persent4 = 10; | 291 | $persent4 = 10; |
289 | } | 292 | } |
290 | 293 | ||
291 | if (!empty($Worker[0]->photo)) { | 294 | if (!empty($Worker[0]->photo)) { |
292 | // 5% | 295 | // 5% |
293 | $persent = $persent + 5; | 296 | $persent = $persent + 5; |
294 | $persent5 = 5; | 297 | $persent5 = 5; |
295 | } | 298 | } |
296 | if ($request->has('print')) { | 299 | if ($request->has('print')) { |
297 | dd($Worker); | 300 | dd($Worker); |
298 | } else { | 301 | } else { |
299 | return view('workers.cabinet', compact('Worker', 'Infobloks', 'persent', 'Job_titles', 'Infoblocks', 'stat')); | 302 | return view('workers.cabinet', compact('Worker', 'Infobloks', 'persent', 'Job_titles', 'Infoblocks', 'stat')); |
300 | } | 303 | } |
301 | } | 304 | } |
302 | 305 | ||
303 | // Сохранение данных | 306 | // Сохранение данных |
304 | public function cabinet_save(Worker $worker, Request $request) | 307 | public function cabinet_save(Worker $worker, Request $request) |
305 | { | 308 | { |
306 | $id = $worker->id; | 309 | $id = $worker->id; |
307 | $params = $request->all(); | 310 | $params = $request->all(); |
308 | 311 | ||
309 | $job_title_id = $request->get('job_title_id'); | 312 | $job_title_id = $request->get('job_title_id'); |
310 | 313 | ||
311 | unset($params['new_diplom']); | 314 | unset($params['new_diplom']); |
312 | unset($params['new_data_begin']); | 315 | unset($params['new_data_begin']); |
313 | unset($params['new_data_end']); | 316 | unset($params['new_data_end']); |
314 | unset($params['new_job_title']); | 317 | unset($params['new_job_title']); |
315 | unset($params['new_teplohod']); | 318 | unset($params['new_teplohod']); |
316 | unset($params['new_GWT']); | 319 | unset($params['new_GWT']); |
317 | unset($params['new_KBT']); | 320 | unset($params['new_KBT']); |
318 | unset($params['new_Begin_work']); | 321 | unset($params['new_Begin_work']); |
319 | unset($params['new_End_work']); | 322 | unset($params['new_End_work']); |
320 | unset($params['new_name_company']); | 323 | unset($params['new_name_company']); |
321 | 324 | ||
322 | $rules = [ | 325 | $rules = [ |
323 | 'surname' => ['required', 'string', 'max:255'], | 326 | 'surname' => ['required', 'string', 'max:255'], |
324 | 'name_man' => ['required', 'string', 'max:255'], | 327 | 'name_man' => ['required', 'string', 'max:255'], |
325 | 'email' => ['required', 'string', 'email', 'max:255'], | 328 | 'email' => ['required', 'string', 'email', 'max:255'], |
326 | 329 | ||
327 | ]; | 330 | ]; |
328 | 331 | ||
329 | $messages = [ | 332 | $messages = [ |
330 | 'required' => 'Укажите обязательное поле', | 333 | 'required' => 'Укажите обязательное поле', |
331 | 'min' => [ | 334 | 'min' => [ |
332 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 335 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
333 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 336 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
334 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 337 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
335 | ], | 338 | ], |
336 | 'max' => [ | 339 | 'max' => [ |
337 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 340 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
338 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 341 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
339 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 342 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
340 | ] | 343 | ] |
341 | ]; | 344 | ]; |
342 | 345 | ||
343 | $validator = Validator::make($params, $rules, $messages); | 346 | $validator = Validator::make($params, $rules, $messages); |
344 | 347 | ||
345 | if ($validator->fails()) { | 348 | if ($validator->fails()) { |
346 | return redirect()->route('worker.cabinet')->withErrors($validator); | 349 | return redirect()->route('worker.cabinet')->withErrors($validator); |
347 | } else { | 350 | } else { |
348 | 351 | ||
349 | if ($request->has('photo')) { | 352 | if ($request->has('photo')) { |
350 | if (!empty($Worker->photo)) { | 353 | if (!empty($Worker->photo)) { |
351 | Storage::delete($Worker->photo); | 354 | Storage::delete($Worker->photo); |
352 | } | 355 | } |
353 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); | 356 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); |
354 | } | 357 | } |
355 | 358 | ||
356 | if ($request->has('file')) { | 359 | if ($request->has('file')) { |
357 | if (!empty($Worker->file)) { | 360 | if (!empty($Worker->file)) { |
358 | Storage::delete($Worker->file); | 361 | Storage::delete($Worker->file); |
359 | } | 362 | } |
360 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); | 363 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); |
361 | } | 364 | } |
362 | 365 | ||
363 | $id_wor = $worker->update($params); | 366 | $id_wor = $worker->update($params); |
364 | $use = User::find($worker->user_id); | 367 | $use = User::find($worker->user_id); |
365 | $use->surname = $request->get('surname'); | 368 | $use->surname = $request->get('surname'); |
366 | $use->name_man = $request->get('name_man'); | 369 | $use->name_man = $request->get('name_man'); |
367 | $use->surname2 = $request->get('surname2'); | 370 | $use->surname2 = $request->get('surname2'); |
368 | 371 | ||
369 | $use->save(); | 372 | $use->save(); |
370 | $worker->job_titles()->sync($job_title_id); | 373 | $worker->job_titles()->sync($job_title_id); |
371 | 374 | ||
372 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); | 375 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); |
373 | } | 376 | } |
374 | } | 377 | } |
375 | 378 | ||
376 | // Сообщения данные | 379 | // Сообщения данные |
377 | public function messages($type_message) | 380 | public function messages($type_message) |
378 | { | 381 | { |
379 | $user_id = Auth()->user()->id; | 382 | $user_id = Auth()->user()->id; |
380 | 383 | ||
381 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 384 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
382 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 385 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
383 | 386 | ||
384 | $messages_output = Message::query()->with('vacancies')-> | 387 | $messages_output = Message::query()->with('vacancies')-> |
385 | with('user_to')->where('user_id', $user_id)-> | 388 | with('user_to')->where('user_id', $user_id)-> |
386 | OrderByDesc('created_at'); | 389 | OrderByDesc('created_at'); |
387 | 390 | ||
388 | 391 | ||
389 | $count_input = $messages_input->count(); | 392 | $count_input = $messages_input->count(); |
390 | $count_output = $messages_output->count(); | 393 | $count_output = $messages_output->count(); |
391 | 394 | ||
392 | if ($type_message == 'input') { | 395 | if ($type_message == 'input') { |
393 | $messages = $messages_input->paginate(5); | 396 | $messages = $messages_input->paginate(5); |
394 | } | 397 | } |
395 | 398 | ||
396 | if ($type_message == 'output') { | 399 | if ($type_message == 'output') { |
397 | $messages = $messages_output->paginate(5); | 400 | $messages = $messages_output->paginate(5); |
398 | } | 401 | } |
399 | 402 | ||
400 | // Вернуть все 100% | 403 | // Вернуть все 100% |
401 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 404 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
402 | } | 405 | } |
403 | 406 | ||
404 | // Избранный | 407 | // Избранный |
405 | public function favorite() | 408 | public function favorite() |
406 | { | 409 | { |
407 | return view('workers.favorite'); | 410 | return view('workers.favorite'); |
408 | } | 411 | } |
409 | 412 | ||
410 | // Сменить пароль | 413 | // Сменить пароль |
411 | public function new_password() | 414 | public function new_password() |
412 | { | 415 | { |
413 | $email = Auth()->user()->email; | 416 | $email = Auth()->user()->email; |
414 | return view('workers.new_password', compact('email')); | 417 | return view('workers.new_password', compact('email')); |
415 | } | 418 | } |
416 | 419 | ||
417 | // Обновление пароля | 420 | // Обновление пароля |
418 | public function save_new_password(Request $request) { | 421 | public function save_new_password(Request $request) { |
419 | $use = Auth()->user(); | 422 | $use = Auth()->user(); |
420 | $request->validate([ | 423 | $request->validate([ |
421 | 'password' => 'required|string', | 424 | 'password' => 'required|string', |
422 | 'new_password' => 'required|string', | 425 | 'new_password' => 'required|string', |
423 | 'new_password2' => 'required|string' | 426 | 'new_password2' => 'required|string' |
424 | ]); | 427 | ]); |
425 | 428 | ||
426 | if ($request->get('new_password') == $request->get('new_password2')) | 429 | if ($request->get('new_password') == $request->get('new_password2')) |
427 | if ($request->get('password') !== $request->get('new_password')) { | 430 | if ($request->get('password') !== $request->get('new_password')) { |
428 | $credentials = $request->only('email', 'password'); | 431 | $credentials = $request->only('email', 'password'); |
429 | if (Auth::attempt($credentials, $request->has('save_me'))) { | 432 | if (Auth::attempt($credentials, $request->has('save_me'))) { |
430 | 433 | ||
431 | if (!is_null($use->email_verified_at)){ | 434 | if (!is_null($use->email_verified_at)){ |
432 | 435 | ||
433 | $user_data = User_Model::find($use->id); | 436 | $user_data = User_Model::find($use->id); |
434 | $user_data->update([ | 437 | $user_data->update([ |
435 | 'password' => Hash::make($request->get('new_password')), | 438 | 'password' => Hash::make($request->get('new_password')), |
436 | 'pubpassword' => base64_encode($request->get('new_password')), | 439 | 'pubpassword' => base64_encode($request->get('new_password')), |
437 | ]); | 440 | ]); |
438 | return redirect() | 441 | return redirect() |
439 | ->route('worker.new_password') | 442 | ->route('worker.new_password') |
440 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 443 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
441 | } | 444 | } |
442 | 445 | ||
443 | return redirect() | 446 | return redirect() |
444 | ->route('worker.new_password') | 447 | ->route('worker.new_password') |
445 | ->withError('Данная учетная запись не было верифицированна!'); | 448 | ->withError('Данная учетная запись не было верифицированна!'); |
446 | } | 449 | } |
447 | } | 450 | } |
448 | 451 | ||
449 | return redirect() | 452 | return redirect() |
450 | ->route('worker.new_password') | 453 | ->route('worker.new_password') |
451 | ->withErrors('Не совпадение данных, обновите пароли!'); | 454 | ->withErrors('Не совпадение данных, обновите пароли!'); |
452 | } | 455 | } |
453 | 456 | ||
454 | // Удаление профиля форма | 457 | // Удаление профиля форма |
455 | public function delete_profile() | 458 | public function delete_profile() |
456 | { | 459 | { |
457 | $login = Auth()->user()->email; | 460 | $login = Auth()->user()->email; |
458 | return view('workers.delete_profile', compact('login')); | 461 | return view('workers.delete_profile', compact('login')); |
459 | } | 462 | } |
460 | 463 | ||
461 | // Удаление профиля код | 464 | // Удаление профиля код |
462 | public function delete_profile_result(Request $request) { | 465 | public function delete_profile_result(Request $request) { |
463 | $Answer = $request->all(); | 466 | $Answer = $request->all(); |
464 | $user_id = Auth()->user()->id; | 467 | $user_id = Auth()->user()->id; |
465 | $request->validate([ | 468 | $request->validate([ |
466 | 'password' => 'required|string', | 469 | 'password' => 'required|string', |
467 | ]); | 470 | ]); |
468 | 471 | ||
469 | $credentials = $request->only('email', 'password'); | 472 | $credentials = $request->only('email', 'password'); |
470 | if (Auth::attempt($credentials)) { | 473 | if (Auth::attempt($credentials)) { |
471 | Auth::logout(); | 474 | Auth::logout(); |
472 | $it = User_Model::find($user_id); | 475 | $it = User_Model::find($user_id); |
473 | $it->delete(); | 476 | $it->delete(); |
474 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 477 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
475 | } else { | 478 | } else { |
476 | return redirect()->route('worker.delete_profile') | 479 | return redirect()->route('worker.delete_profile') |
477 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 480 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
478 | } | 481 | } |
479 | } | 482 | } |
480 | 483 | ||
481 | // Регистрация соискателя | 484 | // Регистрация соискателя |
482 | public function register_worker(Request $request) | 485 | public function register_worker(Request $request) |
483 | { | 486 | { |
484 | $params = $request->all(); | 487 | $params = $request->all(); |
485 | $params['is_worker'] = 1; | 488 | $params['is_worker'] = 1; |
486 | 489 | ||
487 | $rules = [ | 490 | $rules = [ |
488 | 'surname' => ['required', 'string', 'max:255'], | 491 | 'surname' => ['required', 'string', 'max:255'], |
489 | 'name_man' => ['required', 'string', 'max:255'], | 492 | 'name_man' => ['required', 'string', 'max:255'], |
490 | 'email' => ['required', 'email', 'max:255', 'unique:users'], | 493 | 'email' => ['required', 'email', 'max:255', 'unique:users'], |
491 | 'password' => ['required', 'string', 'min:6'] | 494 | 'password' => ['required', 'string', 'min:6'] |
492 | ]; | 495 | ]; |
493 | 496 | ||
494 | $messages = [ | 497 | $messages = [ |
495 | 'required' => 'Укажите обязательное поле', | 498 | 'required' => 'Укажите обязательное поле', |
496 | 'min' => [ | 499 | 'min' => [ |
497 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 500 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
498 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 501 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
499 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 502 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
500 | ], | 503 | ], |
501 | 'max' => [ | 504 | 'max' => [ |
502 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 505 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
503 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 506 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
504 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 507 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
505 | ] | 508 | ] |
506 | ]; | 509 | ]; |
507 | 510 | ||
508 | $email = $request->get('email'); | 511 | $email = $request->get('email'); |
509 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | 512 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { |
510 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | 513 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); |
511 | } | 514 | } |
512 | 515 | ||
513 | if ($request->get('password') !== $request->get('confirmed')){ | 516 | if ($request->get('password') !== $request->get('confirmed')){ |
514 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 517 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
515 | } | 518 | } |
516 | 519 | ||
517 | if (strlen($request->get('password')) < 6) { | 520 | if (strlen($request->get('password')) < 6) { |
518 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | 521 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); |
519 | } | 522 | } |
520 | 523 | ||
521 | /*$haystack = $request->get('password'); | 524 | /*$haystack = $request->get('password'); |
522 | 525 | ||
523 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); | 526 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); |
524 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', | 527 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', |
525 | 'X', 'C', 'V', 'B', 'N', 'M'); | 528 | 'X', 'C', 'V', 'B', 'N', 'M'); |
526 | $lenpwd_bool = true; | 529 | $lenpwd_bool = true; |
527 | $spec_bool = false; | 530 | $spec_bool = false; |
528 | $alpha_bool = false; | 531 | $alpha_bool = false; |
529 | 532 | ||
530 | if (strlen($haystack) < 8) $lenpwd_bool = false; | 533 | if (strlen($haystack) < 8) $lenpwd_bool = false; |
531 | 534 | ||
532 | foreach ($specsumbol as $it) { | 535 | foreach ($specsumbol as $it) { |
533 | if (strpos($haystack, $it) !== false) { | 536 | if (strpos($haystack, $it) !== false) { |
534 | $spec_bool = true; | 537 | $spec_bool = true; |
535 | } | 538 | } |
536 | } | 539 | } |
537 | 540 | ||
538 | foreach ($alpha as $it) { | 541 | foreach ($alpha as $it) { |
539 | if (strpos($haystack, $it) !== false) { | 542 | if (strpos($haystack, $it) !== false) { |
540 | $alpha_bool = true; | 543 | $alpha_bool = true; |
541 | } | 544 | } |
542 | } | 545 | } |
543 | 546 | ||
544 | if ((!$spec_bool) || (!$alpha_bool)) { | 547 | if ((!$spec_bool) || (!$alpha_bool)) { |
545 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); | 548 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); |
546 | }*/ | 549 | }*/ |
547 | 550 | ||
548 | if (($request->has('politik')) && ($request->get('politik') == 1)) { | 551 | if (($request->has('politik')) && ($request->get('politik') == 1)) { |
549 | $validator = Validator::make($params, $rules, $messages); | 552 | $validator = Validator::make($params, $rules, $messages); |
550 | 553 | ||
551 | if ($validator->fails()) { | 554 | if ($validator->fails()) { |
552 | return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 555 | return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
553 | } else { | 556 | } else { |
554 | //dd($params); | 557 | //dd($params); |
555 | $user = $this->create($params); | 558 | $user = $this->create($params); |
556 | event(new Registered($user)); | 559 | event(new Registered($user)); |
557 | Auth::guard()->login($user); | 560 | Auth::guard()->login($user); |
558 | } | 561 | } |
559 | if ($user) { | 562 | if ($user) { |
560 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; | 563 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; |
561 | } else { | 564 | } else { |
562 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 565 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
563 | } | 566 | } |
564 | 567 | ||
565 | } else { | 568 | } else { |
566 | return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); | 569 | return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); |
567 | } | 570 | } |
568 | } | 571 | } |
569 | 572 | ||
570 | // Звездная оценка и ответ | 573 | // Звездная оценка и ответ |
571 | public function stars_answer(Request $request) { | 574 | public function stars_answer(Request $request) { |
572 | $params = $request->all(); | 575 | $params = $request->all(); |
573 | $rules = [ | 576 | $rules = [ |
574 | 'message' => ['required', 'string', 'max:255'], | 577 | 'message' => ['required', 'string', 'max:255'], |
575 | ]; | 578 | ]; |
576 | 579 | ||
577 | $messages = [ | 580 | $messages = [ |
578 | 'required' => 'Укажите обязательное поле', | 581 | 'required' => 'Укажите обязательное поле', |
579 | 'min' => [ | 582 | 'min' => [ |
580 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 583 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
581 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 584 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
582 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 585 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
583 | ], | 586 | ], |
584 | 'max' => [ | 587 | 'max' => [ |
585 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 588 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
586 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 589 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
587 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 590 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
588 | ] | 591 | ] |
589 | ]; | 592 | ]; |
590 | $response_worker = ResponseWork::create($params); | 593 | $response_worker = ResponseWork::create($params); |
591 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); | 594 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); |
592 | } | 595 | } |
593 | 596 | ||
594 | public function TestWorker() | 597 | public function TestWorker() |
595 | { | 598 | { |
596 | $Use = new User(); | 599 | $Use = new User(); |
597 | 600 | ||
598 | $Code_user = $Use->create([ | 601 | $Code_user = $Use->create([ |
599 | 'name' => 'surname name_man', | 602 | 'name' => 'surname name_man', |
600 | 'name_man' => 'name_man', | 603 | 'name_man' => 'name_man', |
601 | 'surname' => 'surname', | 604 | 'surname' => 'surname', |
602 | 'surname2' => 'surname2', | 605 | 'surname2' => 'surname2', |
603 | 'subscribe_email' => '1', | 606 | 'subscribe_email' => '1', |
604 | 'email' => 'email@mail.com', | 607 | 'email' => 'email@mail.com', |
605 | 'telephone' => '1234567890', | 608 | 'telephone' => '1234567890', |
606 | 'password' => Hash::make('password'), | 609 | 'password' => Hash::make('password'), |
607 | 'pubpassword' => base64_encode('password'), | 610 | 'pubpassword' => base64_encode('password'), |
608 | 'email_verified_at' => Carbon::now(), | 611 | 'email_verified_at' => Carbon::now(), |
609 | 'is_worker' => 1, | 612 | 'is_worker' => 1, |
610 | ]); | 613 | ]); |
611 | 614 | ||
612 | if ($Code_user->id > 0) { | 615 | if ($Code_user->id > 0) { |
613 | $Worker = new Worker(); | 616 | $Worker = new Worker(); |
614 | $Worker->user_id = $Code_user->id; | 617 | $Worker->user_id = $Code_user->id; |
615 | $Worker->position_work = 1; //'job_titles'; | 618 | $Worker->position_work = 1; //'job_titles'; |
616 | $Worker->email = 'email@email.com'; | 619 | $Worker->email = 'email@email.com'; |
617 | $Worker->telephone = '1234567890'; | 620 | $Worker->telephone = '1234567890'; |
618 | $status = $Worker->save(); | 621 | $status = $Worker->save(); |
619 | 622 | ||
620 | $Title_Worker = new Title_worker(); | 623 | $Title_Worker = new Title_worker(); |
621 | $Title_Worker->worker_id = $Worker->id; | 624 | $Title_Worker->worker_id = $Worker->id; |
622 | $Title_Worker->job_title_id = 1; | 625 | $Title_Worker->job_title_id = 1; |
623 | $Title_Worker->save(); | 626 | $Title_Worker->save(); |
624 | } | 627 | } |
625 | } | 628 | } |
626 | 629 | ||
627 | // Создание пользователя | 630 | // Создание пользователя |
628 | protected function create(array $data) | 631 | protected function create(array $data) |
629 | { | 632 | { |
630 | $Use = new User(); | 633 | $Use = new User(); |
631 | 634 | ||
632 | $Code_user = $Use->create([ | 635 | $Code_user = $Use->create([ |
633 | 'name' => $data['surname']." ".$data['name_man'], | 636 | 'name' => $data['surname']." ".$data['name_man'], |
634 | 'name_man' => $data['name_man'], | 637 | 'name_man' => $data['name_man'], |
635 | 'surname' => $data['surname'], | 638 | 'surname' => $data['surname'], |
636 | 'surname2' => $data['surname2'], | 639 | 'surname2' => $data['surname2'], |
637 | 'subscribe_email' => $data['email'], | 640 | 'subscribe_email' => $data['email'], |
638 | 'email' => $data['email'], | 641 | 'email' => $data['email'], |
639 | 'telephone' => $data['telephone'], | 642 | 'telephone' => $data['telephone'], |
640 | 'password' => Hash::make($data['password']), | 643 | 'password' => Hash::make($data['password']), |
641 | 'pubpassword' => base64_encode($data['password']), | 644 | 'pubpassword' => base64_encode($data['password']), |
642 | 'email_verified_at' => Carbon::now(), | 645 | 'email_verified_at' => Carbon::now(), |
643 | 'is_worker' => $data['is_worker'], | 646 | 'is_worker' => $data['is_worker'], |
644 | ]); | 647 | ]); |
645 | 648 | ||
646 | if ($Code_user->id > 0) { | 649 | if ($Code_user->id > 0) { |
647 | $Worker = new Worker(); | 650 | $Worker = new Worker(); |
648 | $Worker->user_id = $Code_user->id; | 651 | $Worker->user_id = $Code_user->id; |
649 | $Worker->position_work = $data['job_titles']; | 652 | $Worker->position_work = $data['job_titles']; |
650 | $Worker->email = $data['email']; | 653 | $Worker->email = $data['email']; |
651 | $Worker->telephone = $data['telephone']; | 654 | $Worker->telephone = $data['telephone']; |
652 | $Worker->save(); | 655 | $Worker->save(); |
653 | 656 | ||
654 | if (isset($Worker->id)) { | 657 | if (isset($Worker->id)) { |
655 | $Title_Worker = new Title_worker(); | 658 | $Title_Worker = new Title_worker(); |
656 | $Title_Worker->worker_id = $Worker->id; | 659 | $Title_Worker->worker_id = $Worker->id; |
657 | $Title_Worker->job_title_id = $data['job_titles']; | 660 | $Title_Worker->job_title_id = $data['job_titles']; |
658 | $Title_Worker->save(); | 661 | $Title_Worker->save(); |
659 | } | 662 | } |
660 | 663 | ||
661 | return $Code_user; | 664 | return $Code_user; |
662 | } | 665 | } |
663 | } | 666 | } |
664 | 667 | ||
665 | // Вакансии избранные | 668 | // Вакансии избранные |
666 | public function colorado(Request $request) { | 669 | public function colorado(Request $request) { |
667 | $IP_address = RusDate::ip_addr_client(); | 670 | $IP_address = RusDate::ip_addr_client(); |
668 | $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); | 671 | $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); |
669 | 672 | ||
670 | if ($Arr->count()) { | 673 | if ($Arr->count()) { |
671 | $A = Array(); | 674 | $A = Array(); |
672 | foreach ($Arr as $it) { | 675 | foreach ($Arr as $it) { |
673 | $A[] = $it->code_record; | 676 | $A[] = $it->code_record; |
674 | } | 677 | } |
675 | 678 | ||
676 | $Query = Ad_employer::query()->whereIn('id', $A); | 679 | $Query = Ad_employer::query()->whereIn('id', $A); |
677 | } else { | 680 | } else { |
678 | $Query = Ad_employer::query()->where('id', '=', '0'); | 681 | $Query = Ad_employer::query()->where('id', '=', '0'); |
679 | } | 682 | } |
680 | 683 | ||
681 | $Query = $Query->with('jobs')-> | 684 | $Query = $Query->with('jobs')-> |
682 | with('cat')-> | 685 | with('cat')-> |
683 | with('employer')-> | 686 | with('employer')-> |
684 | whereHas('jobs_code', function ($query) use ($request) { | 687 | whereHas('jobs_code', function ($query) use ($request) { |
685 | if ($request->ajax()) { | 688 | if ($request->ajax()) { |
686 | if (null !== ($request->get('job'))) { | 689 | if (null !== ($request->get('job'))) { |
687 | $query->where('job_title_id', $request->get('job')); | 690 | $query->where('job_title_id', $request->get('job')); |
688 | } | 691 | } |
689 | } | 692 | } |
690 | })->select('ad_employers.*'); | 693 | })->select('ad_employers.*'); |
691 | 694 | ||
692 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 695 | $Job_title = Job_title::query()->OrderBy('name')->get(); |
693 | 696 | ||
694 | $Query_count = $Query->count(); | 697 | $Query_count = $Query->count(); |
695 | 698 | ||
696 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 699 | $Query = $Query->OrderBy('updated_at')->paginate(3); |
697 | 700 | ||
698 | return view('workers.favorite', compact('Query', | 701 | return view('workers.favorite', compact('Query', |
699 | 'Query_count', | 702 | 'Query_count', |
700 | 'Job_title')); | 703 | 'Job_title')); |
701 | 704 | ||
702 | } | 705 | } |
703 | 706 | ||
704 | //Переписка | 707 | //Переписка |
705 | public function dialog(User_Model $user1, User_Model $user2) { | 708 | public function dialog(User_Model $user1, User_Model $user2) { |
706 | if (isset($user2->id)) { | 709 | if (isset($user2->id)) { |
707 | $companion = User_Model::query()->with('workers')-> | 710 | $companion = User_Model::query()->with('workers')-> |
708 | with('employers')-> | 711 | with('employers')-> |
709 | where('id', $user2->id)->first(); | 712 | where('id', $user2->id)->first(); |
710 | } | 713 | } |
711 | 714 | ||
712 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { | 715 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { |
713 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 716 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
714 | })->orWhere(function($query) use ($user1, $user2) { | 717 | })->orWhere(function($query) use ($user1, $user2) { |
715 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 718 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
716 | })->OrderBy('created_at')->get(); | 719 | })->OrderBy('created_at')->get(); |
717 | 720 | ||
718 | $id_vac = null; | 721 | $id_vac = null; |
719 | foreach ($Messages as $it) { | 722 | foreach ($Messages as $it) { |
720 | if (isset($it->response)) { | 723 | if (isset($it->response)) { |
721 | foreach ($it->response as $r) { | 724 | foreach ($it->response as $r) { |
722 | if (isset($r->ad_employer_id)) { | 725 | if (isset($r->ad_employer_id)) { |
723 | $id_vac = $r->ad_employer_id; | 726 | $id_vac = $r->ad_employer_id; |
724 | break; | 727 | break; |
725 | } | 728 | } |
726 | } | 729 | } |
727 | } | 730 | } |
728 | if (!is_null($id_vac)) break; | 731 | if (!is_null($id_vac)) break; |
729 | } | 732 | } |
730 | 733 | ||
731 | $ad_employer = null; | 734 | $ad_employer = null; |
732 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 735 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
733 | $sender = $user1; | 736 | $sender = $user1; |
734 | 737 | ||
735 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); | 738 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); |
736 | } | 739 | } |
737 | 740 | ||
738 | // Даунылоады | 741 | // Даунылоады |
739 | public function download(Worker $worker) { | 742 | public function download(Worker $worker) { |
740 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; | 743 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; |
741 | view()->share('house',$arr_house); | 744 | view()->share('house',$arr_house); |
742 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); | 745 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); |
743 | return $pdf->stream(); | 746 | return $pdf->stream(); |
744 | } | 747 | } |
745 | 748 | ||
746 | // Поднятие анкеты | 749 | // Поднятие анкеты |
747 | public function up(Worker $worker) { | 750 | public function up(Worker $worker) { |
748 | $worker->updated_at = Carbon::now(); | 751 | $worker->updated_at = Carbon::now(); |
749 | $worker->save(); | 752 | $worker->save(); |
750 | // 0 | 753 | // 0 |
751 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); | 754 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); |
752 | } | 755 | } |
753 | 756 | ||
754 | // Форма сертификате | 757 | // Форма сертификате |
755 | public function new_sertificate(Worker $worker) { | 758 | public function new_sertificate(Worker $worker) { |
756 | return view('workers.sertificate_add', compact('worker')); | 759 | return view('workers.sertificate_add', compact('worker')); |
757 | } | 760 | } |
758 | 761 | ||
759 | // Добавление сертификата | 762 | // Добавление сертификата |
760 | public function add_serificate(SertificationRequest $request) { | 763 | public function add_serificate(SertificationRequest $request) { |
761 | $params = $request->all(); | 764 | $params = $request->all(); |
762 | 765 | ||
763 | $Sertificate = new sertification(); | 766 | $Sertificate = new sertification(); |
764 | $Sertificate->create($params); | 767 | $Sertificate->create($params); |
765 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); | 768 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); |
766 | return redirect()->route('worker.cabinet'); | 769 | return redirect()->route('worker.cabinet'); |
767 | //return view('ajax.documents', compact('Docs')); | 770 | //return view('ajax.documents', compact('Docs')); |
768 | } | 771 | } |
769 | 772 | ||
770 | // Удалить сертификат | 773 | // Удалить сертификат |
771 | public function delete_sertificate(sertification $doc) { | 774 | public function delete_sertificate(sertification $doc) { |
772 | $doc->delete(); | 775 | $doc->delete(); |
773 | 776 | ||
774 | return redirect()->route('worker.cabinet'); | 777 | return redirect()->route('worker.cabinet'); |
775 | } | 778 | } |
776 | 779 | ||
777 | // Редактирование сертификата | 780 | // Редактирование сертификата |
778 | public function edit_sertificate(Worker $worker, sertification $doc) { | 781 | public function edit_sertificate(Worker $worker, sertification $doc) { |
779 | return view('workers.sertificate_edit', compact('doc', 'worker')); | 782 | return view('workers.sertificate_edit', compact('doc', 'worker')); |
780 | } | 783 | } |
781 | 784 | ||
782 | // Редактирование обновление сертификата | 785 | // Редактирование обновление сертификата |
783 | public function update_serificate(SertificationRequest $request, sertification $doc) { | 786 | public function update_serificate(SertificationRequest $request, sertification $doc) { |
784 | $all = $request->all(); | 787 | $all = $request->all(); |
785 | $doc->worker_id = $all['worker_id']; | 788 | $doc->worker_id = $all['worker_id']; |
786 | $doc->name = $all['name']; | 789 | $doc->name = $all['name']; |
787 | $doc->end_begin = $all['end_begin']; | 790 | $doc->end_begin = $all['end_begin']; |
788 | $doc->save(); | 791 | $doc->save(); |
789 | 792 | ||
790 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | 793 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); |
791 | } | 794 | } |
792 | 795 | ||
793 | public function delete_add_diplom(Request $request, Worker $worker) { | 796 | public function delete_add_diplom(Request $request, Worker $worker) { |
794 | $infoblok_id = $request->get('infoblok_id'); | 797 | $infoblok_id = $request->get('infoblok_id'); |
795 | 798 | ||
796 | if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0) | 799 | if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0) |
797 | $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); | 800 | $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); |
798 | else { | 801 | else { |
799 | $params['infoblok_id'] = $infoblok_id; | 802 | $params['infoblok_id'] = $infoblok_id; |
800 | $params['worker_id'] = $worker->id; | 803 | $params['worker_id'] = $worker->id; |
801 | $params['status'] = $request->get('val'); | 804 | $params['status'] = $request->get('val'); |
802 | $id = Dop_info::create($params); | 805 | $id = Dop_info::create($params); |
803 | //$id = $worker->infobloks()->sync([$infoblok_id]); | 806 | //$id = $worker->infobloks()->sync([$infoblok_id]); |
804 | } | 807 | } |
805 | 808 | ||
806 | //$Infoblocks = infobloks::query()->get(); | 809 | //$Infoblocks = infobloks::query()->get(); |
807 | return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); | 810 | return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); |
808 | } | 811 | } |
809 | 812 | ||
810 | 813 | ||
811 | 814 | ||
812 | // Добавление диплома | 815 | // Добавление диплома |
813 | public function add_diplom_ajax(Request $request) { | 816 | public function add_diplom_ajax(Request $request) { |
814 | // конец | 817 | // конец |
815 | $params = $request->all(); | 818 | $params = $request->all(); |
816 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 819 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
817 | 820 | ||
818 | if ($count == 0) $dop_info = Dop_info::create($params); | 821 | if ($count == 0) $dop_info = Dop_info::create($params); |
819 | $Infoblocks = infobloks::query()->get(); | 822 | $Infoblocks = infobloks::query()->get(); |
820 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); | 823 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); |
821 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); | 824 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); |
822 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); | 825 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); |
823 | } | 826 | } |
824 | 827 | ||
825 | // Добавление диплома без ajax | 828 | // Добавление диплома без ajax |
826 | public function add_diplom(Worker $worker) { | 829 | public function add_diplom(Worker $worker) { |
827 | $worker_id = $worker->id; | 830 | $worker_id = $worker->id; |
828 | $Infoblocks = infobloks::query()->get(); | 831 | $Infoblocks = infobloks::query()->get(); |
829 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); | 832 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); |
830 | } | 833 | } |
831 | // Сохранить | 834 | // Сохранить |
832 | // Сохраняю диплом | 835 | // Сохраняю диплом |
833 | public function add_diplom_save(Request $request) { | 836 | public function add_diplom_save(Request $request) { |
834 | $params = $request->all(); | 837 | $params = $request->all(); |
835 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 838 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
836 | if ($count == 0) $dop_info = Dop_info::create($params); | 839 | if ($count == 0) $dop_info = Dop_info::create($params); |
837 | return redirect()->route('worker.cabinet'); | 840 | return redirect()->route('worker.cabinet'); |
838 | } | 841 | } |
839 | 842 | ||
840 | // Добавление стандартного документа | 843 | // Добавление стандартного документа |
841 | public function add_document(Worker $worker) { | 844 | public function add_document(Worker $worker) { |
842 | return view('workers.docs', compact('worker')); | 845 | return view('workers.docs', compact('worker')); |
843 | } | 846 | } |
844 | 847 | ||
845 | //Сохранение стандартого документа | 848 | //Сохранение стандартого документа |
846 | public function add_document_save(DocumentsRequest $request) { | 849 | public function add_document_save(DocumentsRequest $request) { |
847 | $params = $request->all(); | 850 | $params = $request->all(); |
848 | $place_work = place_works::create($params); | 851 | $place_work = place_works::create($params); |
849 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); | 852 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); |
850 | } | 853 | } |
851 | 854 | ||
852 | // Редактирование документа | 855 | // Редактирование документа |
853 | public function edit_document(place_works $doc, Worker $worker) { | 856 | public function edit_document(place_works $doc, Worker $worker) { |
854 | return view('workers.docs-edit', compact('doc', 'worker')); | 857 | return view('workers.docs-edit', compact('doc', 'worker')); |
855 | } | 858 | } |
856 | 859 | ||
857 | //Сохранение отредактированного документа | 860 | //Сохранение отредактированного документа |
858 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { | 861 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { |
859 | $params = $request->all(); | 862 | $params = $request->all(); |
860 | $doc->update($params); | 863 | $doc->update($params); |
861 | 864 | ||
862 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | 865 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); |
863 | } | 866 | } |
864 | 867 | ||
865 | // Удаление документа | 868 | // Удаление документа |
866 | public function delete_document(place_works $doc) { | 869 | public function delete_document(place_works $doc) { |
867 | $doc->delete(); | 870 | $doc->delete(); |
868 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | 871 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); |
869 | } | 872 | } |
870 | 873 | ||
871 | //Отправка нового сообщения | 874 | //Отправка нового сообщения |
872 | public function new_message(Request $request) { | 875 | public function new_message(Request $request) { |
873 | $params = $request->all(); | 876 | $params = $request->all(); |
874 | 877 | ||
875 | $id = $params['send_user_id']; | 878 | $id = $params['send_user_id']; |
876 | $message = new Message(); | 879 | $message = new Message(); |
877 | $message->user_id = $params['send_user_id']; | 880 | $message->user_id = $params['send_user_id']; |
878 | $message->to_user_id = $params['send_to_user_id']; | 881 | $message->to_user_id = $params['send_to_user_id']; |
879 | $message->title = $params['send_title']; | 882 | $message->title = $params['send_title']; |
880 | $message->text = $params['send_text']; | 883 | $message->text = $params['send_text']; |
881 | $message->ad_employer_id = $params['send_vacancy']; | 884 | $message->ad_employer_id = $params['send_vacancy']; |
882 | if ($request->has('send_file')) { | 885 | if ($request->has('send_file')) { |
883 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); | 886 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); |
884 | } | 887 | } |
885 | $message->flag_new = 1; | 888 | $message->flag_new = 1; |
886 | $id_message = $message->save(); | 889 | $id_message = $message->save(); |
887 | 890 | ||
888 | $data['message_id'] = $id_message; | 891 | $data['message_id'] = $id_message; |
889 | $data['ad_employer_id'] = $params['send_vacancy']; | 892 | $data['ad_employer_id'] = $params['send_vacancy']; |
890 | $data['job_title_id'] = $params['send_job_title_id']; | 893 | $data['job_title_id'] = $params['send_job_title_id']; |
891 | $data['flag'] = 1; | 894 | $data['flag'] = 1; |
892 | $ad_responce = ad_response::create($data); | 895 | $ad_responce = ad_response::create($data); |
893 | return redirect()->route('worker.messages', ['type_message' => 'output']); | 896 | return redirect()->route('worker.messages', ['type_message' => 'output']); |
894 | } | 897 | } |
895 | 898 | ||
896 | // Информация о предыдущих компаниях | 899 | // Информация о предыдущих компаниях |
897 | public function new_prev_company(Worker $worker) { | 900 | public function new_prev_company(Worker $worker) { |
898 | return view('workers.prev_company_form', compact('worker')); | 901 | return view('workers.prev_company_form', compact('worker')); |
899 | } | 902 | } |
900 | 903 | ||
901 | // Добавление контакта компании | 904 | // Добавление контакта компании |
902 | public function add_prev_company(PrevCompanyRequest $request) { | 905 | public function add_prev_company(PrevCompanyRequest $request) { |
903 | // Возвращение параметров | 906 | // Возвращение параметров |
904 | $all = $request->all(); | 907 | $all = $request->all(); |
905 | $PrevCompany = PrevCompany::create($all); | 908 | $PrevCompany = PrevCompany::create($all); |
906 | 909 | ||
907 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); | 910 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); |
908 | } | 911 | } |
909 | 912 | ||
910 | // Редактирование контакта компании | 913 | // Редактирование контакта компании |
911 | public function edit_prev_company(PrevCompany $doc, Worker $worker) { | 914 | public function edit_prev_company(PrevCompany $doc, Worker $worker) { |
912 | return view('workers.prev_company_edit_form', compact('doc', 'worker')); | 915 | return view('workers.prev_company_edit_form', compact('doc', 'worker')); |
913 | } | 916 | } |
914 | 917 | ||
915 | //Сохранение редактирования контакта компании | 918 | //Сохранение редактирования контакта компании |
916 | public function update_prev_company(PrevCompany $doc, Request $request){ | 919 | public function update_prev_company(PrevCompany $doc, Request $request){ |
917 | $all = $request->all(); | 920 | $all = $request->all(); |
918 | $doc->update($all); | 921 | $doc->update($all); |
919 | 922 | ||
920 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); | 923 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); |
921 | } | 924 | } |
922 | 925 | ||
923 | // Удаление контакта предыдущей компании | 926 | // Удаление контакта предыдущей компании |
924 | public function delete_prev_company(PrevCompany $doc) { | 927 | public function delete_prev_company(PrevCompany $doc) { |
925 | $doc->delete(); | 928 | $doc->delete(); |
926 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | 929 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); |
927 | } | 930 | } |
928 | } | 931 | } |
929 | 932 | ||
930 | 933 |
app/Http/Requests/DocumentsRequest.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 DocumentsRequest extends FormRequest | 7 | class DocumentsRequest 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 | 'job_title' => ['required', 'string', 'max:255'], | 27 | 'job_title' => ['required', 'string', 'max:255'], |
28 | 'teplohod' => ['required', 'string', 'max:255'], | 28 | 'teplohod' => ['required', 'string', 'max:255'], |
29 | 'name_company' => ['required', 'string', 'max:255'], | 29 | 'name_company' => ['required', 'string', 'max:255'], |
30 | 'GWT' => ['required', 'string', 'max:255'], | ||
31 | 'GRT' => ['required', 'string', 'max:255'], | ||
30 | ]; | 32 | ]; |
31 | } | 33 | } |
32 | 34 | ||
33 | public function messages() { | 35 | public function messages() { |
34 | return [ | 36 | return [ |
35 | 'required' => 'Укажите обязательное поле «:attribute»', | 37 | 'job_title.required' => 'Укажите обязательное поле "Должность"', |
38 | 'teplohod.required' => 'Укажите обязательное поле "Название т/х"', | ||
39 | 'name_company.required' => 'Укажите обязательное поле "Название компании"', | ||
40 | 'GWT.required' => 'Укажите обязательное поле "Тип судна"', | ||
41 | 'GRT.required' => 'Укажите обязательное поле "Водоизмещение"', | ||
42 | |||
43 | //'required' => 'Укажите обязательное поле «:attribute»', | ||
36 | 'min' => [ | 44 | 'min' => [ |
37 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 45 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
38 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 46 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
39 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 47 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
40 | ], | 48 | ], |
41 | 'max' => [ | 49 | 'max' => [ |
42 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 50 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
43 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 51 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
44 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 52 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
45 | ]]; | 53 | ]]; |
46 | } | 54 | } |
47 | } | 55 | } |
48 | 56 |
app/Http/Requests/PrevCompanyRequest.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 PrevCompanyRequest extends FormRequest | 7 | class PrevCompanyRequest 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_company' => [ | 27 | 'name_company' => [ |
28 | 'required', | 28 | 'required', |
29 | 'string', | 29 | 'string', |
30 | 'min:3', | ||
31 | 'max:255', | 30 | 'max:255', |
32 | ], | 31 | ], |
33 | 'direct' => [ | 32 | 'direct' => [ |
34 | 'required', | 33 | 'required', |
35 | 'string', | 34 | 'string', |
36 | 'min:3', | ||
37 | 'max:255' | 35 | 'max:255' |
38 | ], | 36 | ], |
39 | ]; | 37 | ]; |
40 | } | 38 | } |
41 | 39 | ||
42 | public function messages() { | 40 | public function messages() { |
43 | return [ | 41 | return [ |
44 | 'required' => 'Поле :attribute обязательно для ввода', | 42 | //'required' => 'Поле :attribute обязательно для ввода', |
43 | 'name_company.required' => 'Укажите обязательное поле "Название компании"', | ||
44 | 'direct.required' => 'Укажите обязательное поле "ФИО сотрудника"', | ||
45 | 'unique' => 'Поле :attribute должно быть уникальным', | 45 | 'unique' => 'Поле :attribute должно быть уникальным', |
46 | 'mimes' => 'Допускаются файлы только с расширением jpeg,jpg,png', | 46 | 'mimes' => 'Допускаются файлы только с расширением jpeg,jpg,png', |
47 | 'numeric' => 'Поле :attribute должно быть числом', | 47 | 'numeric' => 'Поле :attribute должно быть числом', |
48 | 'min' => [ | 48 | 'min' => [ |
49 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 49 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
50 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 50 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
51 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 51 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
52 | ], | 52 | ], |
53 | 53 | ||
54 | 'max' => [ | 54 | 'max' => [ |
55 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 55 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
56 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 56 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
57 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 57 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
58 | ], | 58 | ], |
59 | 59 | ||
60 | ]; | 60 | ]; |
61 | } | 61 | } |
resources/views/ajax/resume_1.blade.php
1 | 1 | @if ($resumes->count()) | |
2 | @foreach ($resumes as $res) | ||
2 | <div class="main__resume-base-body-item"> | 3 | <div class="main__resume-base-body-item"> |
3 | <div class="main__resume-base-body-item-buttons"> | 4 | <div class="main__resume-base-body-item-buttons"> |
4 | <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> | 5 | <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> |
5 | <svg> | 6 | <svg> |
6 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 7 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
7 | </svg> | 8 | </svg> |
8 | </button> | 9 | </button> |
9 | @guest | 10 | @guest |
10 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | 11 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' |
11 | class="chat js-toggle js_it_button"> | 12 | class="chat js-toggle js_it_button"> |
12 | <svg> | 13 | <svg> |
13 | <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | 14 | <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> |
14 | </svg> | 15 | </svg> |
15 | </button> | 16 | </button> |
16 | @else | 17 | @else |
17 | @if (App\Classes\StatusUser::Status()==0) | 18 | @if (App\Classes\StatusUser::Status()==0) |
18 | @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) | 19 | @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) |
19 | <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'> | 20 | <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'> |
20 | <svg> | 21 | <svg> |
21 | <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | 22 | <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> |
22 | </svg> | 23 | </svg> |
23 | </button> | 24 | </button> |
24 | @endif | 25 | @endif |
25 | @else | 26 | @else |
26 | <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' | 27 | <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' |
27 | class="chat js-toggle js_it_button"> | 28 | class="chat js-toggle js_it_button"> |
28 | <svg> | 29 | <svg> |
29 | <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> | 30 | <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> |
30 | </svg> | 31 | </svg> |
31 | </button> @endif | 32 | </button> @endif |
32 | @endif | 33 | @endif |
33 | </div> | 34 | </div> |
34 | <div class="main__resume-base-body-item-wrapper"> | 35 | <div class="main__resume-base-body-item-wrapper"> |
35 | <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> | 36 | <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> |
36 | <div class="main__resume-base-body-item-inner"> | 37 | <div class="main__resume-base-body-item-inner"> |
37 | <div> | 38 | <div> |
38 | <b>Статус</b> | 39 | <b>Статус</b> |
39 | <span>{{ $status_work[$res->status_work] }}</span> | 40 | <span>{{ $status_work[$res->status_work] }}</span> |
40 | </div> | 41 | </div> |
41 | <div> | 42 | <div> |
42 | <b>Имя работника</b> | 43 | <b>Имя работника</b> |
43 | <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> | 44 | <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> |
44 | </div> | 45 | </div> |
45 | <div> | 46 | <div> |
46 | <b>Номер телефона</b> | 47 | <b>Номер телефона</b> |
47 | <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> | 48 | <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> |
48 | </div> | 49 | </div> |
49 | <div> | 50 | <div> |
50 | <b>Электронный адрес</b> | 51 | <b>Электронный адрес</b> |
51 | <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> | 52 | <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> |
52 | </div> | 53 | </div> |
53 | <div> | 54 | <div> |
54 | <b>Город проживания</b> | 55 | <b>Город проживания</b> |
55 | <span>{{ $res->city }}</span> | 56 | <span>{{ $res->city }}</span> |
56 | </div> | 57 | </div> |
57 | <div> | 58 | <div> |
58 | <b>Опыт работы</b> | 59 | <b>Опыт работы</b> |
59 | <span>{{ $res->experience }}</span> | 60 | <span>{{ $res->experience }}</span> |
60 | </div> | 61 | </div> |
61 | </div> | 62 | </div> |
62 | </div> | 63 | </div> |
63 | <div class="main__employer-page-two-item-tags"> | 64 | <div class="main__employer-page-two-item-tags"> |
64 | @if ($res->job_titles->count()) | 65 | @if ($res->job_titles->count()) |
65 | @if (isset($res->job_titles)) | 66 | @if (isset($res->job_titles)) |
66 | @foreach ($res->job_titles as $key => $j) | 67 | @foreach ($res->job_titles as $key => $j) |
67 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 68 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
68 | @endforeach | 69 | @endforeach |
69 | @endif | 70 | @endif |
70 | @endif | 71 | @endif |
71 | </div> | 72 | </div> |
72 | <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a> | 73 | <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a> |
73 | </div> | 74 | </div> |
74 | @endforeach | 75 | @endforeach |
75 | 76 | ||
76 | {{ $resumes->appends($_GET)->links('paginate') }} | 77 | {{ $resumes->appends($_GET)->links('paginate') }} |
77 | @else | 78 | @else |
78 | <p>По данному запросу ничего не найдено</p> | 79 | <p>По данному запросу ничего не найдено</p> |
79 | @endif | 80 | @endif |
80 | 81 |
resources/views/js/favorite-worker.blade.php
1 | <script> | 1 | <script> |
2 | console.log('js выполняется...123'); | 2 | console.log('js выполняется...123'); |
3 | 3 | ||
4 | $(document).ready(function() { | 4 | $(document).ready(function() { |
5 | $(document).on('click', '.js_box_favorit', function () { | 5 | $(document).on('click', '.js_box_favorit', function () { |
6 | var _this = $(this); | 6 | var _this = $(this); |
7 | var id = _this.attr('id'); | 7 | var id = _this.attr('id'); |
8 | var id_worker = _this.attr('data-val'); | 8 | var id_worker = _this.attr('data-val'); |
9 | console.log('active='+id); | 9 | console.log('active='+id); |
10 | console.log('is_worker='+id_worker); | ||
10 | 11 | ||
11 | if ($( "#"+id ).hasClass( "active" )) { | 12 | if ($( "#"+id ).hasClass( "active" )) { |
12 | console.log('Download 41... final'); | 13 | console.log('Download 41... final'); |
13 | $.ajax({ | 14 | $.ajax({ |
14 | type: "GET", | 15 | type: "GET", |
15 | url: "{{ route('like_resume') }}", | 16 | url: "{{ route('like_resume') }}", |
16 | data: "code_record=" + id_worker, | 17 | data: "code_record=" + id_worker, |
17 | success: function (data) { | 18 | success: function (data) { |
18 | console.log('Выбор сортировки'); | 19 | console.log('Выбор сортировки'); |
19 | console.log(data); | 20 | console.log(data); |
20 | 21 | ||
21 | }, | 22 | }, |
22 | headers: { | 23 | headers: { |
23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 24 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
24 | }, | 25 | }, |
25 | error: function (data) { | 26 | error: function (data) { |
26 | data = JSON.stringify(data); | 27 | data = JSON.stringify(data); |
27 | console.log('Error: ' + data); | 28 | console.log('Error: ' + data); |
28 | } | 29 | } |
29 | }); | 30 | }); |
30 | } else { | 31 | } else { |
31 | console.log('Не выполнить условие никогда'); | 32 | console.log('Не выполнить условие никогда'); |
32 | $.ajax({ | 33 | $.ajax({ |
33 | type: "GET", | 34 | type: "GET", |
34 | url: "{{ route('like_resume') }}", | 35 | url: "{{ route('like_resume') }}", |
35 | data: "code_record=" + id_worker + "&delete=1", | 36 | data: "code_record=" + id_worker + "&delete=1", |
36 | success: function (data) { | 37 | success: function (data) { |
37 | console.log('Выбор сортировки'); | 38 | console.log('Выбор сортировки'); |
38 | console.log(data); | 39 | console.log(data); |
39 | }, | 40 | }, |
40 | headers: { | 41 | headers: { |
41 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 42 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
42 | }, | 43 | }, |
43 | error: function (data) { | 44 | error: function (data) { |
44 | data = JSON.stringify(data); | 45 | data = JSON.stringify(data); |
45 | console.log('Error: ' + data); | 46 | console.log('Error: ' + data); |
46 | } | 47 | } |
47 | }); | 48 | }); |
48 | } | 49 | } |
49 | }); | 50 | }); |
50 | }); | 51 | }); |
51 | </script> | 52 | </script> |
52 | 53 |
resources/views/layout/frontend.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | 2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>{{ $title }}</title> | 6 | <title>{{ $title }}</title> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
8 | <meta name="theme-color" content="#377D87"> | 8 | <meta name="theme-color" content="#377D87"> |
9 | <script src="{{ asset('js/jquery.js') }}"></script> | 9 | <script src="{{ asset('js/jquery.js') }}"></script> |
10 | <!--<script type="text/javascript" src=" asset('js/jquery.cookie.js') }}"></script>--> | 10 | <!--<script type="text/javascript" src=" asset('js/jquery.cookie.js') }}"></script>--> |
11 | <link rel="stylesheet" href="{{ asset('css/telegram.css') }}"> | 11 | <link rel="stylesheet" href="{{ asset('css/telegram.css') }}"> |
12 | <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> | 12 | <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> |
13 | <link rel="stylesheet" href="{{ asset('css/style_may2024.css') }}"> | 13 | <link rel="stylesheet" href="{{ asset('css/style_may2024.css') }}"> |
14 | <style> | 14 | <style> |
15 | .err_red { | 15 | .err_red { |
16 | border: red 2px solid; | 16 | border: red 2px solid; |
17 | } | 17 | } |
18 | |||
19 | .input[disabled] { | ||
20 | /* color: #9c9d9d; */ | ||
21 | background: #FFFFFF; | ||
22 | } | ||
18 | </style> | 23 | </style> |
19 | </head> | 24 | </head> |
20 | 25 | ||
21 | <body id="body" onload="createCaptcha()"> | 26 | <body id="body" onload="createCaptcha()"> |
22 | <a href="#body" class="to-top js-scroll-to"> | 27 | <a href="#body" class="to-top js-scroll-to"> |
23 | <svg> | 28 | <svg> |
24 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 29 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
25 | </svg> | 30 | </svg> |
26 | </a> | 31 | </a> |
27 | 32 | ||
28 | <div> <!-- BEGIN TOP WRAPPER --> | 33 | <div> <!-- BEGIN TOP WRAPPER --> |
29 | <header class="header"> | 34 | <header class="header"> |
30 | <div class="container"> | 35 | <div class="container"> |
31 | <div class="header__body"> | 36 | <div class="header__body"> |
32 | <div class="header__left"> | 37 | <div class="header__left"> |
33 | <a href="{{ route('index') }}" class="header__logo"> | 38 | <a href="{{ route('index') }}" class="header__logo"> |
34 | <svg> | 39 | <svg> |
35 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 40 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
36 | </svg> | 41 | </svg> |
37 | </a> | 42 | </a> |
38 | <nav class="header__menu"> | 43 | <nav class="header__menu"> |
39 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> | 44 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> |
40 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> | 45 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> |
41 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> | 46 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> |
42 | </nav> | 47 | </nav> |
43 | </div> | 48 | </div> |
44 | <div class="header__right"> | 49 | <div class="header__right"> |
45 | @guest | 50 | @guest |
46 | 51 | ||
47 | @else | 52 | @else |
48 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> | 53 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> |
49 | <svg> | 54 | <svg> |
50 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> | 55 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> |
51 | </svg> | 56 | </svg> |
52 | <span>Уведомления</span> | 57 | <span>Уведомления</span> |
53 | </a> | 58 | </a> |
54 | 59 | ||
55 | @endguest | 60 | @endguest |
56 | <div class="header__right-line"></div> | 61 | <div class="header__right-line"></div> |
57 | <button class="header__burger"> | 62 | <button class="header__burger"> |
58 | <svg> | 63 | <svg> |
59 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> | 64 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> |
60 | </svg> | 65 | </svg> |
61 | </button> | 66 | </button> |
62 | @guest | 67 | @guest |
63 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> | 68 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> |
64 | @else | 69 | @else |
65 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> | 70 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> |
66 | @endguest | 71 | @endguest |
67 | </div> | 72 | </div> |
68 | </div> | 73 | </div> |
69 | </div> | 74 | </div> |
70 | </header> | 75 | </header> |
71 | 76 | ||
72 | @yield('content') | 77 | @yield('content') |
73 | </div> <!-- END TOP WRAPPER --> | 78 | </div> <!-- END TOP WRAPPER --> |
74 | 79 | ||
75 | <div> <!-- BEGIN BOTTOM WRAPPER --> | 80 | <div> <!-- BEGIN BOTTOM WRAPPER --> |
76 | <footer class="footer"> | 81 | <footer class="footer"> |
77 | <div class="container"> | 82 | <div class="container"> |
78 | <div class="footer__mobile"> | 83 | <div class="footer__mobile"> |
79 | 84 | ||
80 | <button class="footer__mobile-toper js-toggle active"> | 85 | <button class="footer__mobile-toper js-toggle active"> |
81 | <a href="{{ route('index') }}"> | 86 | <a href="{{ route('index') }}"> |
82 | <svg> | 87 | <svg> |
83 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 88 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
84 | </svg> | 89 | </svg> |
85 | </a> | 90 | </a> |
86 | <span> | 91 | <span> |
87 | <svg> | 92 | <svg> |
88 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 93 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
89 | </svg> | 94 | </svg> |
90 | </span> | 95 | </span> |
91 | </button> | 96 | </button> |
92 | <div class="footer__mobile-menu"> | 97 | <div class="footer__mobile-menu"> |
93 | <div class="footer__mobile-menu-item"> | 98 | <div class="footer__mobile-menu-item"> |
94 | <button class="js-toggle"> | 99 | <button class="js-toggle"> |
95 | <b>Соискателям</b> | 100 | <b>Соискателям</b> |
96 | <span><svg> | 101 | <span><svg> |
97 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 102 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
98 | </svg></span> | 103 | </svg></span> |
99 | </button> | 104 | </button> |
100 | <div> | 105 | <div> |
101 | <a href="{{ route('vacancies') }}">Вакансии</a> | 106 | <a href="{{ route('vacancies') }}">Вакансии</a> |
102 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 107 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
103 | <a href="{{ route('education') }}">Образование</a> | 108 | <a href="{{ route('education') }}">Образование</a> |
104 | <a href="{{ route('news') }}">Новости</a> | 109 | <a href="{{ route('news') }}">Новости</a> |
105 | <a href="{{ route('contacts') }}">Контакты</a> | 110 | <a href="{{ route('contacts') }}">Контакты</a> |
106 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 111 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
107 | </div> | 112 | </div> |
108 | </div> | 113 | </div> |
109 | <div class="footer__mobile-menu-item"> | 114 | <div class="footer__mobile-menu-item"> |
110 | <button class="js-toggle"> | 115 | <button class="js-toggle"> |
111 | <b>Работодателям</b> | 116 | <b>Работодателям</b> |
112 | <span><svg> | 117 | <span><svg> |
113 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> | 118 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> |
114 | </svg></span> | 119 | </svg></span> |
115 | </button> | 120 | </button> |
116 | <div> | 121 | <div> |
117 | <a href="{{ route('register') }}">Регистрация</a> | 122 | <a href="{{ route('register') }}">Регистрация</a> |
118 | <a href="{{ route('bd_resume') }}">База резюме</a> | 123 | <a href="{{ route('bd_resume') }}">База резюме</a> |
119 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 124 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
120 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 125 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
121 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 126 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
122 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 127 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
123 | </div> | 128 | </div> |
124 | </div> | 129 | </div> |
125 | </div> | 130 | </div> |
126 | <div class="footer__mobile-contacts"> | 131 | <div class="footer__mobile-contacts"> |
127 | <b>Контакты</b> | 132 | <b>Контакты</b> |
128 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 133 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
129 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 134 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
130 | </div> | 135 | </div> |
131 | <div class="footer__mobile-bottom"> | 136 | <div class="footer__mobile-bottom"> |
132 | <div class="socials"> | 137 | <div class="socials"> |
133 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 138 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
134 | <svg> | 139 | <svg> |
135 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 140 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
136 | </svg> | 141 | </svg> |
137 | </a> | 142 | </a> |
138 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 143 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
139 | <svg> | 144 | <svg> |
140 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 145 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
141 | </svg> | 146 | </svg> |
142 | </a> | 147 | </a> |
143 | </div> | 148 | </div> |
144 | <nav class="footer__mobile-links"> | 149 | <nav class="footer__mobile-links"> |
145 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 150 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
146 | <span></span> | 151 | <span></span> |
147 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 152 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
148 | </nav> | 153 | </nav> |
149 | © 2023 — RekaMore.su | 154 | © 2023 — RekaMore.su |
150 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 155 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
151 | <svg> | 156 | <svg> |
152 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 157 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
153 | </svg> | 158 | </svg> |
154 | <span> | 159 | <span> |
155 | Дизайн и разработка: | 160 | Дизайн и разработка: |
156 | <b>NoLogoStudio.ru</b> | 161 | <b>NoLogoStudio.ru</b> |
157 | </span> | 162 | </span> |
158 | </a> | 163 | </a> |
159 | </div> | 164 | </div> |
160 | </div> | 165 | </div> |
161 | <div class="footer__main"> | 166 | <div class="footer__main"> |
162 | <div class="footer__main-body"> | 167 | <div class="footer__main-body"> |
163 | 168 | ||
164 | <a href="" class="footer__main-logo"> | 169 | <a href="" class="footer__main-logo"> |
165 | <svg> | 170 | <svg> |
166 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 171 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
167 | </svg> | 172 | </svg> |
168 | </a> | 173 | </a> |
169 | <div class="footer__main-col"> | 174 | <div class="footer__main-col"> |
170 | <div class="footer__main-title">Соискателям</div> | 175 | <div class="footer__main-title">Соискателям</div> |
171 | <nav> | 176 | <nav> |
172 | <a href="{{ route('vacancies') }}">Вакансии</a> | 177 | <a href="{{ route('vacancies') }}">Вакансии</a> |
173 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 178 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
174 | <a href="{{ route('education') }}">Образование</a> | 179 | <a href="{{ route('education') }}">Образование</a> |
175 | <a href="{{ route('news') }}">Новости</a> | 180 | <a href="{{ route('news') }}">Новости</a> |
176 | <a href="{{ route('contacts') }}">Контакты</a> | 181 | <a href="{{ route('contacts') }}">Контакты</a> |
177 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 182 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
178 | </nav> | 183 | </nav> |
179 | </div> | 184 | </div> |
180 | <div class="footer__main-col"> | 185 | <div class="footer__main-col"> |
181 | <div class="footer__main-title">Работодателям</div> | 186 | <div class="footer__main-title">Работодателям</div> |
182 | <nav> | 187 | <nav> |
183 | <a href="{{ route('register') }}">Регистрация</a> | 188 | <a href="{{ route('register') }}">Регистрация</a> |
184 | <a href="{{ route('bd_resume') }}">База резюме</a> | 189 | <a href="{{ route('bd_resume') }}">База резюме</a> |
185 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 190 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
186 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 191 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
187 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 192 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
188 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 193 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
189 | </nav> | 194 | </nav> |
190 | </div> | 195 | </div> |
191 | 196 | ||
192 | <div class="footer__main-col"> | 197 | <div class="footer__main-col"> |
193 | <div class="footer__main-title">Контакты</div> | 198 | <div class="footer__main-title">Контакты</div> |
194 | <div class="footer__main-contacts"> | 199 | <div class="footer__main-contacts"> |
195 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 200 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
196 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 201 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
197 | </div> | 202 | </div> |
198 | <div class="socials"> | 203 | <div class="socials"> |
199 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 204 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
200 | <svg> | 205 | <svg> |
201 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 206 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
202 | </svg> | 207 | </svg> |
203 | </a> | 208 | </a> |
204 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 209 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
205 | <svg> | 210 | <svg> |
206 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 211 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
207 | </svg> | 212 | </svg> |
208 | </a> | 213 | </a> |
209 | </div> | 214 | </div> |
210 | </div> | 215 | </div> |
211 | </div> | 216 | </div> |
212 | 217 | ||
213 | <div class="footer__main-copy"> | 218 | <div class="footer__main-copy"> |
214 | <div>© 2023 — RekaMore.su</div> | 219 | <div>© 2023 — RekaMore.su</div> |
215 | <nav> | 220 | <nav> |
216 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 221 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
217 | <span></span> | 222 | <span></span> |
218 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 223 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
219 | </nav> | 224 | </nav> |
220 | <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div> | 225 | <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div> |
221 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 226 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
222 | <svg> | 227 | <svg> |
223 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 228 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
224 | </svg> | 229 | </svg> |
225 | <span> | 230 | <span> |
226 | Дизайн и разработка: | 231 | Дизайн и разработка: |
227 | <b>NoLogoStudio.ru</b> | 232 | <b>NoLogoStudio.ru</b> |
228 | </span> | 233 | </span> |
229 | </a> | 234 | </a> |
230 | </div> | 235 | </div> |
231 | </div> | 236 | </div> |
232 | </div> | 237 | </div> |
233 | </footer> | 238 | </footer> |
234 | </div> <!-- END BOTTOM WRAPPER --> | 239 | </div> <!-- END BOTTOM WRAPPER --> |
235 | 240 | ||
236 | <div hidden> <!-- BEGIN MODALS WRAPPER --> | 241 | <div hidden> <!-- BEGIN MODALS WRAPPER --> |
237 | <!-- Соискатель отправляет сообщение работодателю --> | 242 | <!-- Соискатель отправляет сообщение работодателю --> |
238 | @include('modals.send_worker_new') | 243 | @include('modals.send_worker_new') |
239 | 244 | ||
240 | <!-- Работодатель отправляет сообщение соискателю --> | 245 | <!-- Работодатель отправляет сообщение соискателю --> |
241 | @include('modals.send_employer') | 246 | @include('modals.send_employer') |
242 | 247 | ||
243 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> | 248 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> |
244 | @include('modals.send_message_noaut') | 249 | @include('modals.send_message_noaut') |
245 | 250 | ||
246 | @include('modals.send_message_noaut2') | 251 | @include('modals.send_message_noaut2') |
247 | 252 | ||
248 | <!-- Форма авторизации --> | 253 | <!-- Форма авторизации --> |
249 | @include('modals.send_login') | 254 | @include('modals.send_login') |
250 | 255 | ||
251 | <!-- Сбросить пароль --> | 256 | <!-- Сбросить пароль --> |
252 | @include('modals.reset_password') | 257 | @include('modals.reset_password') |
253 | 258 | ||
254 | <!-- Регистрация --> | 259 | <!-- Регистрация --> |
255 | @include('modals.register') | 260 | @include('modals.register') |
256 | 261 | ||
257 | <!-- Благодарность по отправке сообщения работодателю --> | 262 | <!-- Благодарность по отправке сообщения работодателю --> |
258 | @include('modals.thank_you_send_employer') | 263 | @include('modals.thank_you_send_employer') |
259 | 264 | ||
260 | <!-- Благодарность по отправке сообщения менеджеру --> | 265 | <!-- Благодарность по отправке сообщения менеджеру --> |
261 | @include('modals.thank_you_send_manager') | 266 | @include('modals.thank_you_send_manager') |
262 | 267 | ||
263 | <!-- Благодарность после регистрации --> | 268 | <!-- Благодарность после регистрации --> |
264 | @include('modals.thank_you_send_for_employer') | 269 | @include('modals.thank_you_send_for_employer') |
265 | 270 | ||
266 | <!-- Благодарность после регистрации для работника --> | 271 | <!-- Благодарность после регистрации для работника --> |
267 | @include('modals.thank_you_send_for_worker') | 272 | @include('modals.thank_you_send_for_worker') |
268 | 273 | ||
269 | <!-- Подтверждение удаления профиля --> | 274 | <!-- Подтверждение удаления профиля --> |
270 | @include('modals.delete_profile') | 275 | @include('modals.delete_profile') |
271 | 276 | ||
272 | <!-- Подверждение об удалении профиля --> | 277 | <!-- Подверждение об удалении профиля --> |
273 | @include('modals.success_delete_profile') | 278 | @include('modals.success_delete_profile') |
274 | 279 | ||
275 | </div> <!-- END MODALS WRAPPER --> | 280 | </div> <!-- END MODALS WRAPPER --> |
276 | 281 | ||
277 | 282 | ||
278 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> | 283 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> |
279 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> | 284 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> |
280 | <script src="{{ asset('js/jquery.select2.js') }}"></script> | 285 | <script src="{{ asset('js/jquery.select2.js') }}"></script> |
281 | <script src="{{ asset('js/swiper.js') }}"></script> | 286 | <script src="{{ asset('js/swiper.js') }}"></script> |
282 | <script src="{{ asset('js/script-vc.js') }}"></script> | 287 | <script src="{{ asset('js/script-vc.js') }}"></script> |
283 | <script src="{{ asset('js/star-rating.min.js') }}"></script> | 288 | <script src="{{ asset('js/star-rating.min.js') }}"></script> |
284 | <script> | 289 | <script> |
285 | var getUrlParameter = function getUrlParameter(sParam) { | 290 | var getUrlParameter = function getUrlParameter(sParam) { |
286 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), | 291 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), |
287 | sURLVariables = sPageURL.split('&'), | 292 | sURLVariables = sPageURL.split('&'), |
288 | sParameterName, | 293 | sParameterName, |
289 | i; | 294 | i; |
290 | for (i = 0; i < sURLVariables.length; i++) { | 295 | for (i = 0; i < sURLVariables.length; i++) { |
291 | sParameterName = sURLVariables[i].split('='); | 296 | sParameterName = sURLVariables[i].split('='); |
292 | if (sParameterName[0] === sParam) { | 297 | if (sParameterName[0] === sParam) { |
293 | return sParameterName[1] === undefined ? true : sParameterName[1]; | 298 | return sParameterName[1] === undefined ? true : sParameterName[1]; |
294 | } | 299 | } |
295 | } | 300 | } |
296 | }; | 301 | }; |
297 | </script> | 302 | </script> |
298 | @include('js.modals') | 303 | @include('js.modals') |
299 | @include('js.captha') | 304 | @include('js.captha') |
300 | @yield('scripts') | 305 | @yield('scripts') |
301 | </body> | 306 | </body> |
302 | </html> | 307 | </html> |
303 | 308 |
resources/views/worker.blade.php
1 | @extends('layout.frontend', ['title' => 'Карточка соискателя - РекаМоре']) | 1 | @extends('layout.frontend', ['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', '#jobs', function() { | 6 | $(document).on('change', '#jobs', function() { |
7 | var val = $(this).val(); | 7 | var val = $(this).val(); |
8 | var main_oskar = $('#main_ockar'); | 8 | var main_oskar = $('#main_ockar'); |
9 | 9 | ||
10 | console.log('Code='+val); | 10 | console.log('Code='+val); |
11 | console.log('Click change...'); | 11 | console.log('Click change...'); |
12 | $.ajax({ | 12 | $.ajax({ |
13 | type: "GET", | 13 | type: "GET", |
14 | url: "", | 14 | url: "", |
15 | data: "job="+val, | 15 | data: "job="+val, |
16 | success: function (data) { | 16 | success: function (data) { |
17 | console.log('Выбор сделан!'); | 17 | console.log('Выбор сделан!'); |
18 | console.log(data); | 18 | console.log(data); |
19 | main_oskar.html(data); | 19 | main_oskar.html(data); |
20 | }, | 20 | }, |
21 | headers: { | 21 | headers: { |
22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
23 | }, | 23 | }, |
24 | error: function (data) { | 24 | error: function (data) { |
25 | data = JSON.stringify(data); | 25 | data = JSON.stringify(data); |
26 | console.log('Error: ' + data); | 26 | console.log('Error: ' + data); |
27 | } | 27 | } |
28 | }); | 28 | }); |
29 | }); | 29 | }); |
30 | </script> | 30 | </script> |
31 | 31 | ||
32 | <script> | 32 | <script> |
33 | $(document).on('click', '.js_it_button', function() { | 33 | $(document).on('click', '.js_it_button', function() { |
34 | var this_ = $(this); | 34 | var this_ = $(this); |
35 | var code_user_id = this_.attr('data-uid'); | 35 | var code_user_id = this_.attr('data-uid'); |
36 | var code_to_user_id = this_.attr('data-tuid'); | 36 | var code_to_user_id = this_.attr('data-tuid'); |
37 | var code_vacancy = this_.attr('data-vacancy'); | 37 | var code_vacancy = this_.attr('data-vacancy'); |
38 | var user_id = $('#_user_id'); | 38 | var user_id = $('#_user_id'); |
39 | var to_user_id = $('#_to_user_id'); | 39 | var to_user_id = $('#_to_user_id'); |
40 | var vacancy = $('#_vacancy'); | 40 | var vacancy = $('#_vacancy'); |
41 | 41 | ||
42 | console.log('code_to_user_id='+code_to_user_id); | 42 | console.log('code_to_user_id='+code_to_user_id); |
43 | console.log('code_user_id='+code_user_id); | 43 | console.log('code_user_id='+code_user_id); |
44 | console.log('code_vacancy='+code_vacancy); | 44 | console.log('code_vacancy='+code_vacancy); |
45 | console.log('Клик на кнопке...'); | 45 | console.log('Клик на кнопке...'); |
46 | 46 | ||
47 | user_id.val(code_user_id); | 47 | user_id.val(code_user_id); |
48 | to_user_id.val(code_to_user_id); | 48 | to_user_id.val(code_to_user_id); |
49 | vacancy.val(code_vacancy); | 49 | vacancy.val(code_vacancy); |
50 | }); | 50 | }); |
51 | </script> | 51 | </script> |
52 | @include('js.favorite-worker') | 52 | @include('js.favorite-worker') |
53 | @endsection | 53 | @endsection |
54 | 54 | ||
55 | @section('content') | 55 | @section('content') |
56 | <section class="thing"> | 56 | <section class="thing"> |
57 | <div class="container"> | 57 | <div class="container"> |
58 | <ul class="breadcrumbs thing__breadcrumbs"> | 58 | <ul class="breadcrumbs thing__breadcrumbs"> |
59 | <li><a href="{{ route('index') }}">Главная</a></li> | 59 | <li><a href="{{ route('index') }}">Главная</a></li> |
60 | <li><a href="{{ route('bd_resume') }}">База резюме</a></li> | 60 | <li><a href="{{ route('bd_resume') }}">База резюме</a></li> |
61 | <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> | 61 | <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> |
62 | </ul> | 62 | </ul> |
63 | <div class="thing__profile"> | 63 | <div class="thing__profile"> |
64 | <img src="@if (isset($Query[0]->photo)) {{ asset(Storage::url($Query[0]->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="main__resume-base-body-item-photo"> | 64 | <img src="@if (isset($Query[0]->photo)) {{ asset(Storage::url($Query[0]->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="main__resume-base-body-item-photo"> |
65 | <div class="thing__profile-body"> | 65 | <div class="thing__profile-body"> |
66 | <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> | 66 | <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> |
67 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены | 67 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены |
68 | исключительно в разрезе маркетинговых и финансовых предпосылок.</p> | 68 | исключительно в разрезе маркетинговых и финансовых предпосылок.</p> |
69 | <div class="thing__bottom"> | 69 | <div class="thing__bottom"> |
70 | <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}"> | 70 | <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}"> |
71 | Скачать резюме | 71 | Скачать резюме |
72 | <svg> | 72 | <svg> |
73 | <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> | 73 | <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> |
74 | </svg> | 74 | </svg> |
75 | </a> | 75 | </a> |
76 | <button type="button" class="like js-toggle"> | 76 | <button type="button" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($Query[0]) }}" data-val="{{ $Query[0]->id }}" id="elem{{ $Query[0]->id }}"> |
77 | <svg> | 77 | <svg> |
78 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 78 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
79 | </svg> | 79 | </svg> |
80 | </button> | 80 | </button> |
81 | </div> | 81 | </div> |
82 | </div> | 82 | </div> |
83 | </div> | 83 | </div> |
84 | </div> | 84 | </div> |
85 | </section> | 85 | </section> |
86 | <main class="main"> | 86 | <main class="main"> |
87 | <div class="container"> | 87 | <div class="container"> |
88 | <div class="main__resume-profile"> | 88 | <div class="main__resume-profile"> |
89 | <div class="main__content"> | 89 | <div class="main__content"> |
90 | <div class="main__spoiler"> | 90 | <div class="main__spoiler"> |
91 | <button type="button" class="main__spoiler-toper js-toggle active"> | 91 | <button type="button" class="main__spoiler-toper js-toggle active"> |
92 | Основная информация</button> | 92 | Основная информация</button> |
93 | 93 | ||
94 | <div class="main__spoiler-body"> | 94 | <div class="main__spoiler-body"> |
95 | <table class="main__table"> | 95 | <table class="main__table"> |
96 | <tbody> | 96 | <tbody> |
97 | <tr> | 97 | <tr> |
98 | <td>Имя:</td> | 98 | <td>Имя:</td> |
99 | <td><b>{{ $Query[0]->users->name_man }}</b></td> | 99 | <td><b>{{ $Query[0]->users->name_man }}</b></td> |
100 | </tr> | 100 | </tr> |
101 | <tr> | 101 | <tr> |
102 | <td>Должность:</td> | 102 | <td>Должность:</td> |
103 | <td> | 103 | <td> |
104 | @if ($Query[0]->job_titles->count()) | 104 | @if ($Query[0]->job_titles->count()) |
105 | @foreach ($Query[0]->job_titles as $it) | 105 | @foreach ($Query[0]->job_titles as $it) |
106 | @if ($it->is_remove == 0) | ||
106 | <b>{{ $it->name }}</b> | 107 | <b>{{ $it->name }}</b> |
108 | @endif | ||
107 | @endforeach | 109 | @endforeach |
108 | @endif | 110 | @endif |
109 | </td> | 111 | </td> |
110 | </tr> | 112 | </tr> |
111 | <tr> | 113 | <tr> |
112 | <td>Телефон:</td> | 114 | <td>Телефон:</td> |
113 | <td><b><a href="tel:{{ $Query[0]->telephone }}">{{ $Query[0]->telephone }}</a></b></td> | 115 | <td><b><a href="tel:{{ $Query[0]->telephone }}">{{ $Query[0]->telephone }}</a></b></td> |
114 | </tr> | 116 | </tr> |
115 | <tr> | 117 | <tr> |
116 | <td>E-mail:</td> | 118 | <td>E-mail:</td> |
117 | <td><b><a href="emailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> | 119 | <td><b><a href="mailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> |
118 | </tr> | 120 | </tr> |
119 | <tr> | 121 | <tr> |
120 | <td>Возраст:</td> | 122 | <td>Возраст:</td> |
121 | <td><b>{{ $Query[0]->old_year }}</b></td> | 123 | <td><b>{{ $Query[0]->old_year }}</b></td> |
122 | </tr> | 124 | </tr> |
123 | <tr> | 125 | <tr> |
124 | <td>Статус:</td> | 126 | <td>Статус:</td> |
125 | <td><b>{{ $status_work[$Query[0]->status_work] }}</b></td> | 127 | <td><b>{{ $status_work[$Query[0]->status_work] }}</b></td> |
126 | </tr> | 128 | </tr> |
127 | <tr> | 129 | <tr> |
128 | <td>Город проживания:</td> | 130 | <td>Город проживания:</td> |
129 | <td><b>{{ $Query[0]->city }}</b></td> | 131 | <td><b>{{ $Query[0]->city }}</b></td> |
130 | </tr> | 132 | </tr> |
131 | <tr> | 133 | <tr> |
132 | <td>Уровень английского:</td> | 134 | <td>Уровень английского:</td> |
133 | <td><b>{{ $Query[0]->en_is }}</b></td> | 135 | <td><b>{{ $Query[0]->en_is }}</b></td> |
134 | </tr> | 136 | </tr> |
135 | <tr> | 137 | <tr> |
136 | <td>Опыт работы:</td> | 138 | <td>Опыт работы:</td> |
137 | <td><b>{{ $Query[0]->experience }}</b></td> | 139 | <td><b>{{ $Query[0]->experience }}</b></td> |
138 | </tr> | 140 | </tr> |
139 | </tbody> | 141 | </tbody> |
140 | </table> | 142 | </table> |
141 | </div> | 143 | </div> |
142 | </div> | 144 | </div> |
143 | <div class="main__spoiler"> | 145 | <div class="main__spoiler"> |
144 | <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button> | 146 | <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button> |
145 | <div class="main__spoiler-body"> | 147 | <div class="main__spoiler-body"> |
146 | 148 | ||
147 | @if (isset($Query[0]->sertificate)) | 149 | @if (isset($Query[0]->sertificate)) |
148 | @if ($Query[0]->sertificate->count()) | 150 | @if ($Query[0]->sertificate->count()) |
149 | @foreach($Query[0]->sertificate as $it) | 151 | @foreach($Query[0]->sertificate as $it) |
150 | <table class="main__table"> | 152 | <table class="main__table"> |
151 | <tbody> | 153 | <tbody> |
152 | <tr> | 154 | <tr> |
153 | <td>Название сертификата:</td> | 155 | <td>Название сертификата:</td> |
154 | <td><b>{{ $it->name }}</b></td> | 156 | <td><b>{{ $it->name }}</b></td> |
155 | </tr> | 157 | </tr> |
156 | <tr> | 158 | <tr> |
157 | <td>Организация выдавшая документ:</td> | 159 | <td>Организация выдавшая документ:</td> |
158 | <td><b>{{ $it->education }}</b></td> | 160 | <td><b>{{ $it->education }}</b></td> |
159 | </tr> | 161 | </tr> |
160 | <tr> | 162 | <tr> |
161 | <td>Дата начала обучения:</td> | 163 | <td>Дата начала обучения:</td> |
162 | <td><b>{{ $it->date_begin }}</b></td> | 164 | <td><b>{{ $it->date_begin }}</b></td> |
163 | </tr> | 165 | </tr> |
164 | <tr> | 166 | <tr> |
165 | <td>Дата конца обучения:</td> | 167 | <td>Дата конца обучения:</td> |
166 | <td><b>{{ $it->end_begin }}</b></td> | 168 | <td><b>{{ $it->end_begin }}</b></td> |
167 | </tr> | 169 | </tr> |
168 | </tbody> | 170 | </tbody> |
169 | </table> | 171 | </table> |
170 | <br> | 172 | <br> |
171 | @endforeach | 173 | @endforeach |
172 | @endif | 174 | @endif |
173 | @endif | 175 | @endif |
174 | </div> | 176 | </div> |
175 | </div> | 177 | </div> |
176 | 178 | ||
177 | <div class="main__spoiler"> | 179 | <div class="main__spoiler"> |
178 | <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button> | 180 | <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button> |
179 | <div class="main__spoiler-body"> | 181 | <div class="main__spoiler-body"> |
180 | 182 | ||
181 | @if (isset($Query[0]->place_worker)) | 183 | @if (isset($Query[0]->place_worker)) |
182 | @if ($Query[0]->place_worker->count()) | 184 | @if ($Query[0]->place_worker->count()) |
183 | @foreach($Query[0]->place_worker as $it) | 185 | @foreach($Query[0]->place_worker as $it) |
184 | 186 | ||
185 | <table class="main__table"> | 187 | <table class="main__table"> |
186 | <tbody> | 188 | <tbody> |
187 | <tr> | 189 | <tr> |
188 | <td>Должность:</td> | 190 | <td>Должность:</td> |
189 | <td><b>{{ $it->job_title }}</b></td> | 191 | <td><b>{{ $it->job_title }}</b></td> |
190 | </tr> | 192 | </tr> |
191 | <tr> | 193 | <tr> |
192 | <td>Опыт работы в танкерном флоте:</td> | 194 | <td>Опыт работы в танкерном флоте:</td> |
193 | <td><b>@if($it->tanker==1) Есть @else Нет @endif</b></td> | 195 | <td><b>@if($it->tanker==1) Есть @else Нет @endif</b></td> |
194 | </tr> | 196 | </tr> |
195 | <tr> | 197 | <tr> |
196 | <td>Дата начала работы:</td> | 198 | <td>Дата начала работы:</td> |
197 | <td><b>{{ $it->begin_work }}</b></td> | 199 | <td><b>{{ $it->begin_work }}</b></td> |
198 | </tr> | 200 | </tr> |
199 | <tr> | 201 | <tr> |
200 | <td>Дата конца работы:</td> | 202 | <td>Дата конца работы:</td> |
201 | <td><b>{{ $it->end_work }}</b></td> | 203 | <td><b>{{ $it->end_work }}</b></td> |
202 | </tr> | 204 | </tr> |
203 | <tr> | 205 | <tr> |
204 | <td>Название компании:</td> | 206 | <td>Название компании:</td> |
205 | <td><b>{{ $it->name_company }}</b></td> | 207 | <td><b>{{ $it->name_company }}</b></td> |
206 | </tr> | 208 | </tr> |
207 | <tr> | 209 | <tr> |
208 | <td>GWT тип</td> | 210 | <td>GWT тип</td> |
209 | <td><b>{{ $it->GWT }}</b></td> | 211 | <td><b>{{ $it->GWT }}</b></td> |
210 | </tr> | 212 | </tr> |
211 | <tr> | 213 | <tr> |
212 | <td>ГД:</td> | 214 | <td>ГД:</td> |
213 | <td><b>{{ $it->KBT }}</b></td> | 215 | <td><b>{{ $it->KBT }}</b></td> |
214 | </tr> | 216 | </tr> |
215 | </tbody> | 217 | </tbody> |
216 | </table> | 218 | </table> |
217 | <br> | 219 | <br> |
218 | @endforeach | 220 | @endforeach |
219 | @endif | 221 | @endif |
220 | @endif | 222 | @endif |
221 | </div> | 223 | </div> |
222 | </div> | 224 | </div> |
223 | 225 | ||
224 | <div class="main__spoiler"> | 226 | <div class="main__spoiler"> |
225 | <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button> | 227 | <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button> |
226 | <div class="main__spoiler-body"> | 228 | <div class="main__spoiler-body"> |
227 | 229 | ||
228 | @if (isset($Query[0]->infobloks)) | 230 | @if (isset($Query[0]->infobloks)) |
229 | @if ($Query[0]->infobloks->count()) | 231 | @if ($Query[0]->infobloks->count()) |
230 | <table class="main__table"> | 232 | <table class="main__table"> |
231 | <tbody> | 233 | <tbody> |
232 | @foreach($Query[0]->infobloks as $it) | 234 | @foreach($Query[0]->infobloks as $it) |
233 | <tr> | 235 | <tr> |
234 | <td>Документ:</td> | 236 | <td>Документ:</td> |
235 | <td><b>{{ $it->name }}</b></td> | 237 | <td><b>{{ $it->name }}</b></td> |
236 | </tr> | 238 | </tr> |
237 | @endforeach | 239 | @endforeach |
238 | </tbody> | 240 | </tbody> |
239 | </table> | 241 | </table> |
240 | @endif | 242 | @endif |
241 | @endif | 243 | @endif |
242 | </div> | 244 | </div> |
243 | </div> | 245 | </div> |
244 | </div> | 246 | </div> |
245 | 247 | ||
246 | <div class="main__resume-profile-about"> | 248 | <div class="main__resume-profile-about"> |
247 | <h2 class="main__resume-profile-about-title">О себе</h2> | 249 | <h2 class="main__resume-profile-about-title">О себе</h2> |
248 | <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p> | 250 | <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p> |
249 | @if (App\Classes\StatusUser::Status()==0) | 251 | @if (App\Classes\StatusUser::Status()==0) |
250 | @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) | 252 | @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) |
251 | <div class="button main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot }}" data-tuid="{{ $Query[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'>Написать сообщение</div> | 253 | <div class="button main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot }}" data-tuid="{{ $Query[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'>Написать сообщение</div> |
252 | @endif | 254 | @endif |
253 | @endif | 255 | @endif |
254 | </div> | 256 | </div> |
255 | <div class="main__resume-profile-info"> | 257 | <div class="main__resume-profile-info"> |
256 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> | 258 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> |
257 | <div class="main__resume-profile-info-body"> | 259 | <div class="main__resume-profile-info-body"> |
258 | @if ((isset($Query[0]->prev_company)) && ($Query[0]->prev_company->count())) | 260 | @if ((isset($Query[0]->prev_company)) && ($Query[0]->prev_company->count())) |
259 | @foreach ($Query[0]->prev_company as $it) | 261 | @foreach ($Query[0]->prev_company as $it) |
260 | <div class="main__resume-profile-info-body-item"> | 262 | <div class="main__resume-profile-info-body-item"> |
261 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it->name_company }}</h3> | 263 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it->name_company }}</h3> |
262 | <ul class="main__resume-profile-info-body-inner"> | 264 | <ul class="main__resume-profile-info-body-inner"> |
263 | <li> | 265 | <li> |
264 | <b>Руководитель</b> | 266 | <b>Руководитель</b> |
265 | <span>{{ $it->direct }}</span> | 267 | <span>{{ $it->direct }}</span> |
266 | </li> | 268 | </li> |
267 | <li> | 269 | <li> |
268 | <b>Телефон того, кто может дать рекомендацию</b> | 270 | <b>Телефон того, кто может дать рекомендацию</b> |
269 | <span> | 271 | <span> |
270 | @if (!empty($it->telephone)) | 272 | @if (!empty($it->telephone)) |
271 | <a href="tel:{{$it->telephone }}">{{ $it->telephone }}</a> | 273 | <a href="tel:{{$it->telephone }}">{{ $it->telephone }}</a> |
272 | @endif | 274 | @endif |
273 | @if (!empty($it->telephone2)) | 275 | @if (!empty($it->telephone2)) |
274 | <a href="tel:{{$it->telephone2 }}">{{ $it->telephone2 }}</a> | 276 | <a href="tel:{{$it->telephone2 }}">{{ $it->telephone2 }}</a> |
275 | @endif | 277 | @endif |
276 | </span> | 278 | </span> |
277 | </li> | 279 | </li> |
278 | </ul> | 280 | </ul> |
279 | </div> | 281 | </div> |
280 | @endforeach | 282 | @endforeach |
281 | @else | 283 | @else |
282 | <div class="main__resume-profile-info-body-item"> | 284 | <div class="main__resume-profile-info-body-item"> |
283 | <h3 class="main__resume-profile-info-body-subtitle">Нету данных о компании</h3> | 285 | <h3 class="main__resume-profile-info-body-subtitle">Нету данных о компании</h3> |
284 | </div> | 286 | </div> |
285 | @endif | 287 | @endif |
286 | </div> | 288 | </div> |
287 | </div> | 289 | </div> |
288 | 290 | ||
289 | <div class="main__resume-profile-review"> | 291 | <div class="main__resume-profile-review"> |
290 | <form action="{{ route('stars_answer') }}" method="POST"> | 292 | <form action="{{ route('stars_answer') }}" method="POST"> |
291 | @csrf | 293 | @csrf |
292 | <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2> | 294 | <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2> |
293 | <div class="rate"> | 295 | <div class="rate"> |
294 | <div class="rate__label">Ваша оценка:</div> | 296 | <div class="rate__label">Ваша оценка:</div> |
295 | <div class="rate__stars"> | 297 | <div class="rate__stars"> |
296 | <select name="stars" id="stars" class="star-rating js-stars"> | 298 | <select name="stars" id="stars" class="star-rating js-stars"> |
297 | <option value="5">5</option> | 299 | <option value="5">5</option> |
298 | <option value="4">4</option> | 300 | <option value="4">4</option> |
299 | <option value="3">3</option> | 301 | <option value="3">3</option> |
300 | <option value="2">2</option> | 302 | <option value="2">2</option> |
301 | <option value="1" selected>1</option> | 303 | <option value="1" selected>1</option> |
302 | </select> | 304 | </select> |
303 | </div> | 305 | </div> |
304 | </div> | 306 | </div> |
305 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/> | 307 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/> |
306 | <div class="main__resume-profile-review-body"> | 308 | <div class="main__resume-profile-review-body"> |
307 | <h3>Ваш отзыв</h3> | 309 | <h3>Ваш отзыв</h3> |
308 | <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва…" required></textarea> | 310 | <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва…" required></textarea> |
309 | <button type="submit" class="button">Оставить отзыв</button> | 311 | <button type="submit" class="button">Оставить отзыв</button> |
310 | </div> | 312 | </div> |
311 | </form> | 313 | </form> |
312 | </div> | 314 | </div> |
313 | </div> | 315 | </div> |
314 | </div> | 316 | </div> |
315 | </main> | 317 | </main> |
316 | </div> | 318 | </div> |
317 | @endsection | 319 | @endsection |
318 | 320 |
resources/views/workers/docs.blade.php
1 | @extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <section class="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 | 20 | ||
21 | @include('workers.menu', ['item' => 1]) | 21 | @include('workers.menu', ['item' => 1]) |
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | <form class="cabinet__body" action="{{ route('worker.add_document_save') }}" method="POST"> | 24 | <form class="cabinet__body" action="{{ route('worker.add_document_save') }}" method="POST"> |
25 | @csrf | 25 | @csrf |
26 | <div class="cabinet__works-item"> | 26 | <div class="cabinet__works-item"> |
27 | @include('messages_error') | 27 | @include('messages_error') |
28 | <div class="cabinet__works-spoiler active"> | 28 | <div class="cabinet__works-spoiler active"> |
29 | <div class="cabinet__works-spoiler-left"> | 29 | <div class="cabinet__works-spoiler-left"> |
30 | <div class="cabinet__works-spoiler-text">Новая работа</div> | 30 | <div class="cabinet__works-spoiler-text">Новая работа</div> |
31 | </div> | 31 | </div> |
32 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | 32 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> |
33 | <svg> | 33 | <svg> |
34 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 34 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> |
35 | </svg> | 35 | </svg> |
36 | </button> | 36 | </button> |
37 | </div> | 37 | </div> |
38 | <div class="cabinet__works-body"> | 38 | <div class="cabinet__works-body"> |
39 | <div class="cabinet__inputs"> | 39 | <div class="cabinet__inputs"> |
40 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/> | 40 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/> |
41 | <div class="cabinet__inputs-item form-group"> | 41 | <div class="cabinet__inputs-item form-group"> |
42 | <label class="form-group__label">Должность</label> | 42 | <label class="form-group__label">Должность*</label> |
43 | <div class="form-group__item"> | 43 | <div class="form-group__item"> |
44 | <input type="text" name="job_title" id="job_title" class="input" value="{{ old('job_title') ?? $doc->job_title ?? '' }}"> | 44 | <input type="text" name="job_title" id="job_title" class="input" value="{{ old('job_title') ?? $doc->job_title ?? '' }}"> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
47 | <!--<div class="cabinet__inputs-item form-group"> | 47 | <!--<div class="cabinet__inputs-item form-group"> |
48 | <label class="form-group__label">Опыт работы в танкерном флоте</label> | 48 | <label class="form-group__label">Опыт работы в танкерном флоте</label> |
49 | <div class="form-group__item"> | 49 | <div class="form-group__item"> |
50 | <select class="js-select2" name="tanker" id="tanker"> | 50 | <select class="js-select2" name="tanker" id="tanker"> |
51 | <option value="0" if ($doc->tanker == 0) seleted endif>Нет</option> | 51 | <option value="0" if ($doc->tanker == 0) seleted endif>Нет</option> |
52 | <option value="1" if ($doc->tanker == 1) seleted endif>Да</option> | 52 | <option value="1" if ($doc->tanker == 1) seleted endif>Да</option> |
53 | </select> | 53 | </select> |
54 | </div> | 54 | </div> |
55 | </div>--> | 55 | </div>--> |
56 | <div class="cabinet__inputs-item form-group"> | 56 | <div class="cabinet__inputs-item form-group"> |
57 | <label class="form-group__label">Название т/х</label> | 57 | <label class="form-group__label">Название т/х*</label> |
58 | <div class="form-group__item"> | 58 | <div class="form-group__item"> |
59 | <input type="text" name="teplohod" id="teplohod" class="input" value="{{ old('teplohod') ?? $doc->teplohod ?? '' }}"> | 59 | <input type="text" name="teplohod" id="teplohod" class="input" value="{{ old('teplohod') ?? $doc->teplohod ?? '' }}"> |
60 | </div> | 60 | </div> |
61 | </div> | 61 | </div> |
62 | <div class="cabinet__inputs-item form-group"> | 62 | <div class="cabinet__inputs-item form-group"> |
63 | <label class="form-group__label">Тип судна</label> | 63 | <label class="form-group__label">Тип судна*</label> |
64 | <div class="form-group__item"> | 64 | <div class="form-group__item"> |
65 | <input type="text" name="GWT" id="GWT" class="input" value="{{ old('GWT') ?? $doc->GWT ?? '' }}"> | 65 | <input type="text" name="GWT" id="GWT" class="input" value="{{ old('GWT') ?? $doc->GWT ?? '' }}"> |
66 | </div> | 66 | </div> |
67 | </div> | 67 | </div> |
68 | 68 | ||
69 | <div class="cabinet__inputs-item form-group"> | 69 | <div class="cabinet__inputs-item form-group"> |
70 | <label class="form-group__label">Марка ГД</label> | 70 | <label class="form-group__label">Марка ГД</label> |
71 | <div class="form-group__item"> | 71 | <div class="form-group__item"> |
72 | <input type="text" name="Marka_GD" id="Marka_GD" class="input" value="{{ old('Marka_GD') ?? $doc->Marka_GD ?? '' }}"> | 72 | <input type="text" name="Marka_GD" id="Marka_GD" class="input" value="{{ old('Marka_GD') ?? $doc->Marka_GD ?? '' }}"> |
73 | </div> | 73 | </div> |
74 | </div> | 74 | </div> |
75 | 75 | ||
76 | <div class="cabinet__inputs-item form-group"> | 76 | <div class="cabinet__inputs-item form-group"> |
77 | <label class="form-group__label">Мощность (кВт)</label> | 77 | <label class="form-group__label">Мощность (кВт)</label> |
78 | <div class="form-group__item"> | 78 | <div class="form-group__item"> |
79 | <input type="text" name="KBT" id="KBT" class="input" value="{{ old('KBT') ?? $doc->KBT ?? '' }}"> | 79 | <input type="text" name="KBT" id="KBT" class="input" value="{{ old('KBT') ?? $doc->KBT ?? '' }}"> |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
82 | 82 | ||
83 | <div class="cabinet__inputs-item form-group"> | 83 | <div class="cabinet__inputs-item form-group"> |
84 | <label class="form-group__label">Водоизмещение (GRT)</label> | 84 | <label class="form-group__label">Водоизмещение (GRT)*</label> |
85 | <div class="form-group__item"> | 85 | <div class="form-group__item"> |
86 | <input type="text" name="GRT" id="GRT" class="input" value="{{ old('GRT') ?? $doc->GRT ?? '' }}"> | 86 | <input type="text" name="GRT" id="GRT" class="input" value="{{ old('GRT') ?? $doc->GRT ?? '' }}"> |
87 | </div> | 87 | </div> |
88 | </div> | 88 | </div> |
89 | 89 | ||
90 | <div class="cabinet__inputs-item form-group"> | 90 | <div class="cabinet__inputs-item form-group"> |
91 | <label class="form-group__label">Название компании</label> | 91 | <label class="form-group__label">Название компании*</label> |
92 | <div class="form-group__item"> | 92 | <div class="form-group__item"> |
93 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}"> | 93 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}"> |
94 | </div> | 94 | </div> |
95 | </div> | 95 | </div> |
96 | 96 | ||
97 | <div class="cabinet__inputs-item form-group"> | 97 | <div class="cabinet__inputs-item form-group"> |
98 | <label class="form-group__label">Начало контракта</label> | 98 | <label class="form-group__label">Начало контракта</label> |
99 | <div class="form-group__item"> | 99 | <div class="form-group__item"> |
100 | <input type="text" name="Begin_work" id="Begin_work" class="input" value="{{ old('begin_work') ?? $doc->begin_work ?? '' }}"> | 100 | <input type="text" name="Begin_work" id="Begin_work" class="input" value="{{ old('begin_work') ?? $doc->begin_work ?? '' }}"> |
101 | </div> | 101 | </div> |
102 | </div> | 102 | </div> |
103 | 103 | ||
104 | <div class="cabinet__inputs-item form-group"> | 104 | <div class="cabinet__inputs-item form-group"> |
105 | <label class="form-group__label">Окончание контракта</label> | 105 | <label class="form-group__label">Окончание контракта</label> |
106 | <div class="form-group__item"> | 106 | <div class="form-group__item"> |
107 | <input type="text" name="End_work" id="End_work" class="input" value="{{ old('end_work') ?? $doc->end_work ?? '' }}"> | 107 | <input type="text" name="End_work" id="End_work" class="input" value="{{ old('end_work') ?? $doc->end_work ?? '' }}"> |
108 | </div> | 108 | </div> |
109 | </div> | 109 | </div> |
110 | 110 | ||
111 | <button type="submit" class="button">Сохранить</button> | 111 | <button type="submit" class="button">Сохранить</button> |
112 | </div> | 112 | </div> |
113 | </div> | 113 | </div> |
114 | </div> | 114 | </div> |
115 | </form> | 115 | </form> |
116 | </div> | 116 | </div> |
117 | </div> | 117 | </div> |
118 | </section> | 118 | </section> |
119 | </div> | 119 | </div> |
120 | @endsection | 120 | @endsection |
121 | 121 |
resources/views/workers/prev_company_form.blade.php
1 | @extends('layout.frontend', ['title' => 'Добавление контакта предыдущей компании - РекаМоре']) | 1 | @extends('layout.frontend', ['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('submit', '#submit_form', function() { | 6 | $(document).on('submit', '#submit_form', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var new_diplom = $('#name'); | 8 | var new_diplom = $('#name'); |
9 | var new_diplom_val = new_diplom.val(); | 9 | var new_diplom_val = new_diplom.val(); |
10 | var new_data_begin = $('#new_data_begin'); | 10 | var new_data_begin = $('#new_data_begin'); |
11 | var new_data_begin_val = new_data_begin.val(); | 11 | var new_data_begin_val = new_data_begin.val(); |
12 | var new_data_end = $('#new_data_end'); | 12 | var new_data_end = $('#new_data_end'); |
13 | var new_data_end_val = new_data_end.val(); | 13 | var new_data_end_val = new_data_end.val(); |
14 | var education = $('#education'); | 14 | var education = $('#education'); |
15 | var education_val = education.val(); | 15 | var education_val = education.val(); |
16 | var worker_id = $('#new_id'); | 16 | var worker_id = $('#new_id'); |
17 | var worker_val = worker_id.val(); | 17 | var worker_val = worker_id.val(); |
18 | 18 | ||
19 | console.log('Валидация формы.'); | 19 | console.log('Валидация формы.'); |
20 | 20 | ||
21 | if (new_diplom_val == '') { | 21 | if (new_diplom_val == '') { |
22 | new_diplom.addClass('err_red'); | 22 | new_diplom.addClass('err_red'); |
23 | console.log('Border Up'); | 23 | console.log('Border Up'); |
24 | return false; | 24 | return false; |
25 | } else { | 25 | } else { |
26 | return true; | 26 | return true; |
27 | } | 27 | } |
28 | }); | 28 | }); |
29 | </script> | 29 | </script> |
30 | @endsection | 30 | @endsection |
31 | 31 | ||
32 | @section('content') | 32 | @section('content') |
33 | <section class="cabinet"> | 33 | <section class="cabinet"> |
34 | <div class="container"> | 34 | <div class="container"> |
35 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 35 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
36 | <li><a href="{{ route('index') }}">Главная</a></li> | 36 | <li><a href="{{ route('index') }}">Главная</a></li> |
37 | <li><b>Личный кабинет</b></li> | 37 | <li><b>Личный кабинет</b></li> |
38 | </ul> | 38 | </ul> |
39 | <div class="cabinet__wrapper"> | 39 | <div class="cabinet__wrapper"> |
40 | <div class="cabinet__side"> | 40 | <div class="cabinet__side"> |
41 | <div class="cabinet__side-toper"> | 41 | <div class="cabinet__side-toper"> |
42 | @include('workers.emblema') | 42 | @include('workers.emblema') |
43 | </div> | 43 | </div> |
44 | @include('workers.menu', ['item' => 1]) | 44 | @include('workers.menu', ['item' => 1]) |
45 | </div> | 45 | </div> |
46 | 46 | ||
47 | <div class="cabinet__body"> | 47 | <div class="cabinet__body"> |
48 | <div class="cabinet__body-item"> | 48 | <div class="cabinet__body-item"> |
49 | @include('messages_error') | 49 | @include('messages_error') |
50 | 50 | ||
51 | <h4 class="cabinet__h4">Добавление контакта предыдущей компании</h4> | 51 | <h4 class="cabinet__h4">Добавление контакта предыдущей компании</h4> |
52 | <form id="submit_form" name="submit_form" action="{{ route('worker.add_prev_company') }}" class="cabinet__inputs" method="GET"> | 52 | <form id="submit_form" name="submit_form" action="{{ route('worker.add_prev_company') }}" class="cabinet__inputs" method="GET"> |
53 | @csrf | 53 | @csrf |
54 | <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}"> | 54 | <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}"> |
55 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 55 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
56 | <label class="form-group__label">Название компании</label> | 56 | <label class="form-group__label">Название компании*</label> |
57 | <div class="form-group__item"> | 57 | <div class="form-group__item"> |
58 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? '' }}"> | 58 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? '' }}"> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 61 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
62 | <label class="form-group__label">ФИО сотрудника</label> | 62 | <label class="form-group__label">ФИО сотрудника*</label> |
63 | <div class="form-group__item"> | 63 | <div class="form-group__item"> |
64 | <input type="text" name="direct" id="direct" class="input" value="{{ old('direct') ?? '' }}"> | 64 | <input type="text" name="direct" id="direct" class="input" value="{{ old('direct') ?? '' }}"> |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 67 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
68 | <label class="form-group__label">Должность сотрудника</label> | 68 | <label class="form-group__label">Должность сотрудника</label> |
69 | <div class="form-group__item"> | 69 | <div class="form-group__item"> |
70 | <input type="text" name="telephone" id="telephone" class="input" value="{{ old('telephone') ?? '' }}"> | 70 | <input type="text" name="telephone" id="telephone" class="input" value="{{ old('telephone') ?? '' }}"> |
71 | </div> | 71 | </div> |
72 | </div> | 72 | </div> |
73 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 73 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
74 | <label class="form-group__label">Телефон сотрудника</label> | 74 | <label class="form-group__label">Телефон сотрудника</label> |
75 | <div class="form-group__item"> | 75 | <div class="form-group__item"> |
76 | <input type="text" name="telephone2" id="telephone2" class="input" value="{{ old('telephone2') ?? '' }}"> | 76 | <input type="text" name="telephone2" id="telephone2" class="input" value="{{ old('telephone2') ?? '' }}"> |
77 | </div> | 77 | </div> |
78 | </div> | 78 | </div> |
79 | <button type="submit" class="button">Сохранить</button> | 79 | <button type="submit" class="button">Сохранить</button> |
80 | <a href="{{ route('worker.cabinet') }}" class="button">Назад</a> | 80 | <a href="{{ route('worker.cabinet') }}" class="button">Назад</a> |
81 | </form> | 81 | </form> |
82 | </div> | 82 | </div> |
83 | </div> | 83 | </div> |
84 | </div> | 84 | </div> |
85 | </div> | 85 | </div> |
86 | </section> | 86 | </section> |
87 | 87 | ||
88 | @endsection | 88 | @endsection |
89 | 89 |