Commit e5cf2b39d22769d0a2fd211e36ed2c10c0b9e60b
Exists in
master
Коммит блейд добавление вакансии
Showing 14 changed files Inline Diff
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Requests/FlotRequest.php
- resources/views/employers/add_vacancy.blade.php
- resources/views/employers/edit-flot.blade.php
- resources/views/employers/favorite.blade.php
- resources/views/employers/fly-flot.blade.php
- resources/views/layout/pdf-list-people.blade.php
- resources/views/layout/pdf.blade.php
- resources/views/workers/cabinet.blade.php
- resources/views/workers/docs.blade.php
- resources/views/workers/prev_company_edit_form.blade.php
- resources/views/workers/prev_company_form.blade.php
- routes/web.php
app/Http/Controllers/EmployerController.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\Classes\Tools; | 6 | use App\Classes\Tools; |
7 | use App\Http\Requests\BaseUser_min_Request; | 7 | use App\Http\Requests\BaseUser_min_Request; |
8 | use App\Http\Requests\BaseUserRequest; | 8 | use App\Http\Requests\BaseUserRequest; |
9 | use App\Http\Requests\FlotRequest; | 9 | use App\Http\Requests\FlotRequest; |
10 | use App\Http\Requests\MessagesRequiest; | 10 | use App\Http\Requests\MessagesRequiest; |
11 | use App\Http\Requests\VacancyRequestEdit; | 11 | use App\Http\Requests\VacancyRequestEdit; |
12 | use App\Http\Requests\VacansiaRequiest; | 12 | use App\Http\Requests\VacansiaRequiest; |
13 | use App\Mail\MailSotrudnichestvo; | 13 | use App\Mail\MailSotrudnichestvo; |
14 | use App\Mail\SendAllMessages; | 14 | use App\Mail\SendAllMessages; |
15 | use App\Models\Ad_employer; | 15 | use App\Models\Ad_employer; |
16 | use App\Models\Ad_jobs; | 16 | use App\Models\Ad_jobs; |
17 | use App\Models\ad_response; | 17 | use App\Models\ad_response; |
18 | use App\Models\Category; | 18 | use App\Models\Category; |
19 | use App\Models\Education; | 19 | use App\Models\Education; |
20 | use App\Models\Employer; | 20 | use App\Models\Employer; |
21 | use App\Models\employers_main; | 21 | use App\Models\employers_main; |
22 | use App\Models\Flot; | 22 | use App\Models\Flot; |
23 | use App\Models\Job_title; | 23 | use App\Models\Job_title; |
24 | use App\Models\Like_vacancy; | 24 | use App\Models\Like_vacancy; |
25 | use App\Models\Like_worker; | 25 | use App\Models\Like_worker; |
26 | use App\Models\Message; | 26 | use App\Models\Message; |
27 | use App\Models\Positions; | 27 | use App\Models\Positions; |
28 | use App\Models\Worker; | 28 | use App\Models\Worker; |
29 | use Carbon\Carbon; | 29 | use Carbon\Carbon; |
30 | use Illuminate\Auth\Events\Registered; | 30 | use Illuminate\Auth\Events\Registered; |
31 | use Illuminate\Database\Eloquent\Builder; | 31 | use Illuminate\Database\Eloquent\Builder; |
32 | use Illuminate\Database\Eloquent\Model; | 32 | use Illuminate\Database\Eloquent\Model; |
33 | use Illuminate\Foundation\Auth\User; | 33 | use Illuminate\Foundation\Auth\User; |
34 | use Illuminate\Http\Request; | 34 | use Illuminate\Http\Request; |
35 | use Illuminate\Support\Facades\Auth; | 35 | use Illuminate\Support\Facades\Auth; |
36 | use Illuminate\Support\Facades\Hash; | 36 | use Illuminate\Support\Facades\Hash; |
37 | use Illuminate\Support\Facades\Mail; | 37 | use Illuminate\Support\Facades\Mail; |
38 | use Illuminate\Support\Facades\Storage; | 38 | use Illuminate\Support\Facades\Storage; |
39 | use App\Models\User as User_Model; | 39 | use App\Models\User as User_Model; |
40 | use Illuminate\Support\Facades\Validator; | 40 | use Illuminate\Support\Facades\Validator; |
41 | 41 | ||
42 | class EmployerController extends Controller | 42 | class EmployerController extends Controller |
43 | { | 43 | { |
44 | public function vacancie($vacancy, Request $request) { | 44 | public function vacancie($vacancy, Request $request) { |
45 | $title = 'Заголовок вакансии'; | 45 | $title = 'Заголовок вакансии'; |
46 | $Query = Ad_employer::with('jobs')-> | 46 | $Query = Ad_employer::with('jobs')-> |
47 | with('cat')-> | 47 | with('cat')-> |
48 | with('employer')-> | 48 | with('employer')-> |
49 | with('jobs_code')-> | 49 | with('jobs_code')-> |
50 | select('ad_employers.*')-> | 50 | select('ad_employers.*')-> |
51 | where('id', '=', $vacancy)->get(); | 51 | where('id', '=', $vacancy)->get(); |
52 | 52 | ||
53 | if (isset(Auth()->user()->id)) | 53 | if (isset(Auth()->user()->id)) |
54 | $uid = Auth()->user()->id; | 54 | $uid = Auth()->user()->id; |
55 | else | 55 | else |
56 | $uid = 0; | 56 | $uid = 0; |
57 | $title = $Query[0]->name; | 57 | $title = $Query[0]->name; |
58 | if ($request->ajax()) { | 58 | if ($request->ajax()) { |
59 | return view('ajax.vacance-item', compact('Query','uid')); | 59 | return view('ajax.vacance-item', compact('Query','uid')); |
60 | } else { | 60 | } else { |
61 | return view('vacance-item', compact('title', 'Query', 'uid')); | 61 | return view('vacance-item', compact('title', 'Query', 'uid')); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | public function logout() { | 65 | public function logout() { |
66 | Auth::logout(); | 66 | Auth::logout(); |
67 | return redirect()->route('index') | 67 | return redirect()->route('index') |
68 | ->with('success', 'Вы вышли из личного кабинета'); | 68 | ->with('success', 'Вы вышли из личного кабинета'); |
69 | } | 69 | } |
70 | 70 | ||
71 | public function employer_info() { | 71 | public function employer_info() { |
72 | // код юзера | 72 | // код юзера |
73 | $user_info = Auth()->user(); | 73 | $user_info = Auth()->user(); |
74 | // вьюшка для вывода данных | 74 | // вьюшка для вывода данных |
75 | return view('employers.info', compact('user_info')); | 75 | return view('employers.info', compact('user_info')); |
76 | } | 76 | } |
77 | 77 | ||
78 | public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { | 78 | public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { |
79 | // Все данные через реквест | 79 | // Все данные через реквест |
80 | $all = $request->all(); | 80 | $all = $request->all(); |
81 | unset($all['_token']); | 81 | unset($all['_token']); |
82 | // обновление | 82 | // обновление |
83 | $user->update($all); | 83 | $user->update($all); |
84 | return redirect()->route('employer.employer_info'); | 84 | return redirect()->route('employer.employer_info'); |
85 | } | 85 | } |
86 | 86 | ||
87 | public function cabinet() { | 87 | public function cabinet() { |
88 | $id = Auth()->user()->id; | 88 | $id = Auth()->user()->id; |
89 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 89 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
90 | WhereHas('users', | 90 | WhereHas('users', |
91 | function (Builder $query) use ($id) {$query->Where('id', $id); | 91 | function (Builder $query) use ($id) {$query->Where('id', $id); |
92 | })->get(); | 92 | })->get(); |
93 | return view('employers.cabinet45', compact('Employer')); | 93 | return view('employers.cabinet45', compact('Employer')); |
94 | } | 94 | } |
95 | 95 | ||
96 | public function slider_flot() { | 96 | public function slider_flot() { |
97 | $id = Auth()->user()->id; | 97 | $id = Auth()->user()->id; |
98 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 98 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
99 | WhereHas('users', | 99 | WhereHas('users', |
100 | function (Builder $query) use ($id) {$query->Where('id', $id); | 100 | function (Builder $query) use ($id) {$query->Where('id', $id); |
101 | })->get(); | 101 | })->get(); |
102 | return view('employers.fly-flot', compact('Employer')); | 102 | return view('employers.fly-flot', compact('Employer')); |
103 | } | 103 | } |
104 | 104 | ||
105 | public function cabinet_save(Employer $Employer, Request $request) { | 105 | public function cabinet_save(Employer $Employer, Request $request) { |
106 | $params = $request->all(); | 106 | $params = $request->all(); |
107 | $params['user_id'] = Auth()->user()->id; | 107 | $params['user_id'] = Auth()->user()->id; |
108 | $id = $Employer->id; | 108 | $id = $Employer->id; |
109 | 109 | ||
110 | if ($request->has('logo')) { | 110 | if ($request->has('logo')) { |
111 | if (!empty($Employer->logo)) { | 111 | if (!empty($Employer->logo)) { |
112 | Storage::delete($Employer->logo); | 112 | Storage::delete($Employer->logo); |
113 | } | 113 | } |
114 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); | 114 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); |
115 | } | 115 | } |
116 | 116 | ||
117 | $Employer->update($params); | 117 | $Employer->update($params); |
118 | 118 | ||
119 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); | 119 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); |
120 | } | 120 | } |
121 | 121 | ||
122 | public function save_add_flot(FlotRequest $request) { | 122 | public function save_add_flot(FlotRequest $request) { |
123 | // отмена | 123 | // отмена |
124 | $params = $request->all(); | 124 | $params = $request->all(); |
125 | 125 | ||
126 | if ($request->has('image')) { | 126 | if ($request->has('image')) { |
127 | $params['image'] = $request->file('image')->store("flot", 'public'); | 127 | $params['image'] = $request->file('image')->store("flot", 'public'); |
128 | } | 128 | } |
129 | Flot::create($params); | 129 | Flot::create($params); |
130 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); | 130 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); |
131 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | 131 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); |
132 | } | 132 | } |
133 | 133 | ||
134 | public function edit_flot(Flot $Flot, Employer $Employer) { | ||
135 | return view('employers.edit-flot', compact('Flot', 'Employer')); | ||
136 | } | ||
137 | |||
138 | public function update_flot(FlotRequest $request, Flot $Flot) { | ||
139 | $params = $request->all(); | ||
140 | |||
141 | if ($request->has('image')) { | ||
142 | if (!empty($flot->image)) { | ||
143 | Storage::delete($flot->image); | ||
144 | } | ||
145 | $params['image'] = $request->file('image')->store("flot", 'public'); | ||
146 | } else { | ||
147 | if (!empty($flot->image)) $params['image'] = $flot->image; | ||
148 | } | ||
149 | |||
150 | $Flot->update($params); | ||
151 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | ||
152 | } | ||
153 | |||
134 | public function edit_flot(Flot $Flot, Employer $Employer) { | 154 | public function delete_flot(Flot $Flot) { |
135 | return view('employers.edit-flot', compact('Flot', 'Employer')); | 155 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); |
136 | } | 156 | |
137 | 157 | if (isset($Flot->id)) $Flot->delete(); | |
138 | public function update_flot(FlotRequest $request, Flot $Flot) { | 158 | return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); |
139 | $params = $request->all(); | 159 | } |
140 | 160 | ||
141 | if ($request->has('image')) { | 161 | // Форма добавления вакансий |
142 | if (!empty($flot->image)) { | 162 | public function cabinet_vacancie() { |
143 | Storage::delete($flot->image); | 163 | $id = Auth()->user()->id; |
144 | } | 164 | |
145 | $params['image'] = $request->file('image')->store("flot", 'public'); | 165 | $categories = Category::query()->active()->get(); |
146 | } else { | 166 | |
147 | if (!empty($flot->image)) $params['image'] = $flot->image; | 167 | |
148 | } | 168 | if ($categories->count()) { |
149 | 169 | $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', $categories[0]->id)->get(); | |
150 | $Flot->update($params); | 170 | } else { |
151 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | 171 | $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', 0)->get(); |
152 | } | 172 | } |
153 | 173 | ||
154 | public function delete_flot(Flot $Flot) { | 174 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
155 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); | 175 | WhereHas('users', |
156 | 176 | function (Builder $query) use ($id) {$query->Where('id', $id); | |
157 | if (isset($Flot->id)) $Flot->delete(); | 177 | })->get(); |
158 | return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); | ||
159 | } | 178 | return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories')); |
160 | 179 | } | |
161 | // Форма добавления вакансий | 180 | |
162 | public function cabinet_vacancie() { | 181 | // Сохранение вакансии |
163 | $id = Auth()->user()->id; | 182 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { |
164 | 183 | $params_emp = $request->all(); | |
165 | $categories = Category::query()->active()->get(); | 184 | $params_job["job_title_id"] = $params_emp['job_title_id']; |
166 | 185 | $params_job["min_salary"] = $params_emp['min_salary']; | |
167 | $Positions = Category::query()->active()->get(); | 186 | $params_job["max_salary"] = $params_emp['max_salary']; |
168 | 187 | $params_job["region"] = $params_emp['region']; | |
169 | if ($Positions->count()) { | 188 | $params_job["power"] = $params_emp['power']; |
170 | $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', $Positions[0]->id)->get(); | 189 | $params_job["sytki"] = $params_emp['sytki']; |
171 | } else { | 190 | $params_job["start"] = $params_emp['start']; |
172 | $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', 0)->get(); | 191 | $params_job["flot"] = $params_emp['flot']; |
173 | } | 192 | $params_job["description"] = $params_emp['description']; |
174 | 193 | ||
175 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 194 | $ad_jobs = Ad_employer::create($params_emp); |
176 | WhereHas('users', | 195 | $params_job['ad_employer_id'] = $ad_jobs->id; |
177 | function (Builder $query) use ($id) {$query->Where('id', $id); | 196 | Ad_jobs::create($params_job); |
178 | })->get(); | 197 | return redirect()->route('employer.vacancy_list'); |
179 | 198 | } | |
180 | return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories', 'Positions')); | 199 | |
181 | } | 200 | // Список вакансий |
182 | 201 | public function vacancy_list(Request $request) { | |
183 | // Сохранение вакансии | 202 | $id = Auth()->user()->id; |
184 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { | 203 | $Employer = Employer::query()->where('user_id', $id)->first(); |
185 | $params_emp = $request->all(); | 204 | $vacancy_list = Ad_employer::query()->with('jobs')-> |
186 | $params_job["job_title_id"] = $params_emp['job_title_id']; | 205 | with('jobs_code')-> |
187 | $params_job["min_salary"] = $params_emp['min_salary']; | 206 | where('employer_id', $Employer->id); |
188 | $params_job["max_salary"] = $params_emp['max_salary']; | 207 | |
189 | $params_job["region"] = $params_emp['region']; | 208 | if ($request->get('sort')) { |
190 | $params_job["power"] = $params_emp['power']; | 209 | $sort = $request->get('sort'); |
191 | $params_job["sytki"] = $params_emp['sytki']; | 210 | switch ($sort) { |
192 | $params_job["start"] = $params_emp['start']; | 211 | case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; |
193 | $params_job["flot"] = $params_emp['flot']; | 212 | case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; |
194 | $params_job["description"] = $params_emp['description']; | 213 | case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; |
195 | 214 | case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; | |
196 | $ad_jobs = Ad_employer::create($params_emp); | 215 | case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; |
197 | $params_job['ad_employer_id'] = $ad_jobs->id; | 216 | default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; |
198 | Ad_jobs::create($params_job); | 217 | } |
199 | return redirect()->route('employer.vacancy_list'); | 218 | } |
200 | } | 219 | $vacancy_list = $vacancy_list->paginate(4); |
201 | 220 | ||
202 | // Список вакансий | 221 | //ajax |
203 | public function vacancy_list(Request $request) { | 222 | if ($request->ajax()) { |
204 | $id = Auth()->user()->id; | 223 | return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); |
205 | $Employer = Employer::query()->where('user_id', $id)->first(); | 224 | } else { |
206 | $vacancy_list = Ad_employer::query()->with('jobs')-> | 225 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); |
207 | with('jobs_code')-> | 226 | } |
208 | where('employer_id', $Employer->id); | 227 | } |
209 | 228 | ||
210 | if ($request->get('sort')) { | 229 | // Карточка вакансии |
211 | $sort = $request->get('sort'); | 230 | public function vacancy_edit(Ad_employer $ad_employer) { |
212 | switch ($sort) { | 231 | $id = Auth()->user()->id; |
213 | case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; | 232 | |
214 | case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; | 233 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); |
215 | case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; | 234 | if ($Positions->count()) { |
216 | case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; | 235 | $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); |
217 | case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; | 236 | } else { |
218 | default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; | 237 | $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); |
219 | } | 238 | } |
220 | } | 239 | |
221 | $vacancy_list = $vacancy_list->paginate(4); | 240 | |
222 | 241 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | |
223 | //ajax | 242 | where('user_id', $id)->first(); |
224 | if ($request->ajax()) { | 243 | |
225 | return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); | 244 | return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); |
226 | } else { | 245 | } |
227 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); | 246 | |
228 | } | 247 | // Сохранение-редактирование записи |
229 | } | 248 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { |
230 | 249 | $params = $request->all(); | |
231 | // Карточка вакансии | 250 | |
232 | public function vacancy_edit(Ad_employer $ad_employer) { | 251 | //$jobs['flot'] = $params['flot']; |
233 | $id = Auth()->user()->id; | 252 | //$jobs['job_title_id'] = $params['job_title_id']; |
234 | 253 | //$titles['position_id'] = $params['position_id']; | |
235 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); | 254 | //unset($params['job_title_id']); |
236 | if ($Positions->count()) { | 255 | |
237 | $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); | 256 | $ad_employer->update($params); |
238 | } else { | 257 | |
239 | $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); | 258 | //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> |
240 | } | 259 | // where('ad_employer_id', $ad_employer->id)->first(); |
241 | 260 | //$data = Ad_jobs::find($job_->id); | |
242 | 261 | //$ad_jobs = $data->update($jobs); | |
243 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 262 | return redirect()->route('employer.vacancy_list'); |
244 | where('user_id', $id)->first(); | 263 | } |
245 | 264 | ||
246 | return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); | 265 | // Сохранение карточки вакансии |
247 | } | 266 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { |
248 | 267 | $all = $request->all(); | |
249 | // Сохранение-редактирование записи | 268 | $ad_employer->update($all); |
250 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { | 269 | return redirect()->route('employer.cabinet_vacancie'); |
251 | $params = $request->all(); | 270 | } |
252 | 271 | ||
253 | //$jobs['flot'] = $params['flot']; | 272 | // Удаление карточки вакансии |
254 | //$jobs['job_title_id'] = $params['job_title_id']; | 273 | public function vacancy_delete(Ad_employer $ad_employer) { |
255 | //$titles['position_id'] = $params['position_id']; | 274 | $ad_employer->delete(); |
256 | //unset($params['job_title_id']); | 275 | |
257 | 276 | return redirect()->route('employer.vacancy_list') | |
258 | $ad_employer->update($params); | 277 | ->with('success', 'Данные были успешно сохранены'); |
259 | 278 | } | |
260 | //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> | 279 | |
261 | // where('ad_employer_id', $ad_employer->id)->first(); | 280 | // Обновление даты |
262 | //$data = Ad_jobs::find($job_->id); | 281 | public function vacancy_up(Ad_employer $ad_employer) { |
263 | //$ad_jobs = $data->update($jobs); | 282 | $up = date('m/d/Y h:i:s', time());; |
264 | return redirect()->route('employer.vacancy_list'); | 283 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
265 | } | 284 | $vac_emp->updated_at = $up; |
266 | 285 | $vac_emp->save(); | |
267 | // Сохранение карточки вакансии | 286 | |
268 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { | 287 | return redirect()->route('employer.vacancy_list'); |
269 | $all = $request->all(); | 288 | // начало конца |
270 | $ad_employer->update($all); | 289 | } |
271 | return redirect()->route('employer.cabinet_vacancie'); | 290 | |
272 | } | 291 | //Видимость вакансии |
273 | 292 | public function vacancy_eye(Ad_employer $ad_employer, $status) { | |
274 | // Удаление карточки вакансии | 293 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
275 | public function vacancy_delete(Ad_employer $ad_employer) { | 294 | $vac_emp->active_is = $status; |
276 | $ad_employer->delete(); | 295 | $vac_emp->save(); |
277 | 296 | ||
278 | return redirect()->route('employer.vacancy_list') | 297 | return redirect()->route('employer.vacancy_list'); |
279 | ->with('success', 'Данные были успешно сохранены'); | 298 | } |
280 | } | 299 | |
281 | 300 | //Вакансия редактирования (шаблон) | |
282 | // Обновление даты | 301 | public function vacancy_update(Ad_employer $id) { |
283 | public function vacancy_up(Ad_employer $ad_employer) { | 302 | |
284 | $up = date('m/d/Y h:i:s', time());; | 303 | } |
285 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 304 | |
286 | $vac_emp->updated_at = $up; | 305 | //Отклики на вакансию - лист |
287 | $vac_emp->save(); | 306 | public function answers(Employer $employer, Request $request) { |
288 | 307 | $user_id = Auth()->user()->id; | |
289 | return redirect()->route('employer.vacancy_list'); | 308 | $answer = Ad_employer::query()->where('employer_id', $employer->id); |
290 | // начало конца | 309 | if ($request->has('search')) { |
291 | } | 310 | $search = trim($request->get('search')); |
292 | 311 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); | |
293 | //Видимость вакансии | 312 | } |
294 | public function vacancy_eye(Ad_employer $ad_employer, $status) { | 313 | |
295 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 314 | $answer = $answer->with('response')->get(); |
296 | $vac_emp->active_is = $status; | 315 | |
297 | $vac_emp->save(); | 316 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); |
298 | 317 | } | |
299 | return redirect()->route('employer.vacancy_list'); | 318 | |
300 | } | 319 | //Обновление статуса |
301 | 320 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { | |
302 | //Вакансия редактирования (шаблон) | 321 | $ad_response->update(Array('flag' => $flag)); |
303 | public function vacancy_update(Ad_employer $id) { | 322 | return redirect()->route('employer.answers', ['employer' => $employer->id]); |
304 | 323 | } | |
305 | } | 324 | |
306 | 325 | //Страницы сообщений список | |
307 | //Отклики на вакансию - лист | 326 | public function messages($type_message) { |
308 | public function answers(Employer $employer, Request $request) { | 327 | $user_id = Auth()->user()->id; |
309 | $user_id = Auth()->user()->id; | 328 | |
310 | $answer = Ad_employer::query()->where('employer_id', $employer->id); | 329 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
311 | if ($request->has('search')) { | 330 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
312 | $search = trim($request->get('search')); | 331 | |
313 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); | 332 | $messages_output = Message::query()->with('vacancies')-> |
314 | } | 333 | with('user_to')->where('user_id', $user_id)-> |
315 | 334 | OrderByDesc('created_at'); | |
316 | $answer = $answer->with('response')->get(); | 335 | |
317 | 336 | ||
318 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); | 337 | $count_input = $messages_input->count(); |
319 | } | 338 | $count_output = $messages_output->count(); |
320 | 339 | ||
321 | //Обновление статуса | 340 | if ($type_message == 'input') { |
322 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { | 341 | $messages = $messages_input->paginate(5); |
323 | $ad_response->update(Array('flag' => $flag)); | 342 | } |
324 | return redirect()->route('employer.answers', ['employer' => $employer->id]); | 343 | |
325 | } | 344 | if ($type_message == 'output') { |
326 | 345 | $messages = $messages_output->paginate(5); | |
327 | //Страницы сообщений список | 346 | } |
328 | public function messages($type_message) { | 347 | |
329 | $user_id = Auth()->user()->id; | 348 | //dd($user_id, $messages[2]->vacancies); |
330 | 349 | //jobs); | |
331 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 350 | |
332 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 351 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
333 | 352 | } | |
334 | $messages_output = Message::query()->with('vacancies')-> | 353 | |
335 | with('user_to')->where('user_id', $user_id)-> | 354 | // Диалог между пользователями |
336 | OrderByDesc('created_at'); | 355 | public function dialog(Request $request, User_Model $user1, User_Model $user2) { |
337 | 356 | // Получение параметров. | |
338 | 357 | if ($request->has('ad_employer')){ | |
339 | $count_input = $messages_input->count(); | 358 | $ad_employer = $request->get('ad_employer'); |
340 | $count_output = $messages_output->count(); | 359 | } else { |
341 | 360 | $ad_employer = 0; | |
342 | if ($type_message == 'input') { | 361 | } |
343 | $messages = $messages_input->paginate(5); | 362 | |
344 | } | 363 | if (isset($user2->id)) { |
345 | 364 | $companion = User_Model::query()->with('workers')-> | |
346 | if ($type_message == 'output') { | 365 | with('employers')-> |
347 | $messages = $messages_output->paginate(5); | 366 | where('id', $user2->id)->first(); |
348 | } | 367 | } |
349 | 368 | ||
350 | //dd($user_id, $messages[2]->vacancies); | 369 | $Messages = Message::query()-> |
351 | //jobs); | 370 | where('ad_employer_id', '=', $ad_employer)-> |
352 | 371 | where(function($query) use ($user1, $user2) { | |
353 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 372 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
354 | } | 373 | })->orWhere(function($query) use ($user1, $user2) { |
355 | 374 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | |
356 | // Диалог между пользователями | 375 | })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); |
357 | public function dialog(Request $request, User_Model $user1, User_Model $user2) { | 376 | |
358 | // Получение параметров. | 377 | $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; |
359 | if ($request->has('ad_employer')){ | 378 | |
360 | $ad_employer = $request->get('ad_employer'); | 379 | //$ad_employer = null; |
361 | } else { | 380 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
362 | $ad_employer = 0; | 381 | $sender = $user1; |
363 | } | 382 | |
364 | 383 | return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); | |
365 | if (isset($user2->id)) { | 384 | } |
366 | $companion = User_Model::query()->with('workers')-> | 385 | |
367 | with('employers')-> | 386 | // Регистрация работодателя |
368 | where('id', $user2->id)->first(); | 387 | public function register_employer(Request $request) { |
369 | } | 388 | $params = $request->all(); |
370 | 389 | ||
371 | $Messages = Message::query()-> | 390 | $rules = [ |
372 | where('ad_employer_id', '=', $ad_employer)-> | 391 | //'surname' => ['required', 'string', 'max:255'], |
373 | where(function($query) use ($user1, $user2) { | 392 | //'name_man' => ['required', 'string', 'max:255'], |
374 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 393 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
375 | })->orWhere(function($query) use ($user1, $user2) { | 394 | 'name_company' => ['required', 'string', 'max:255'], |
376 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 395 | 'password' => ['required', 'string', 'min:6'], |
377 | })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); | 396 | ]; |
378 | 397 | ||
379 | $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; | 398 | |
380 | 399 | $messages = [ | |
381 | //$ad_employer = null; | 400 | 'required' => 'Укажите обязательное поле', |
382 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 401 | 'min' => [ |
383 | $sender = $user1; | 402 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
384 | 403 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | |
385 | return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); | 404 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
386 | } | 405 | ], |
387 | 406 | 'max' => [ | |
388 | // Регистрация работодателя | 407 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
389 | public function register_employer(Request $request) { | 408 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
390 | $params = $request->all(); | 409 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
391 | 410 | ] | |
392 | $rules = [ | 411 | ]; |
393 | //'surname' => ['required', 'string', 'max:255'], | 412 | |
394 | //'name_man' => ['required', 'string', 'max:255'], | 413 | $email = $request->get('email'); |
395 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 414 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { |
396 | 'name_company' => ['required', 'string', 'max:255'], | 415 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); |
397 | 'password' => ['required', 'string', 'min:6'], | 416 | } |
398 | ]; | 417 | |
399 | 418 | if ($request->get('password') !== $request->get('confirmed')){ | |
400 | 419 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | |
401 | $messages = [ | 420 | } |
402 | 'required' => 'Укажите обязательное поле', | 421 | |
403 | 'min' => [ | 422 | if (strlen($request->get('password')) < 6) { |
404 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 423 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); |
405 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 424 | } |
406 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 425 | /* |
407 | ], | 426 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); |
408 | 'max' => [ | 427 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', |
409 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 428 | 'X', 'C', 'V', 'B', 'N', 'M'); |
410 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 429 | $spec_bool = false; |
411 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 430 | $alpha_bool = false; |
412 | ] | 431 | |
413 | ]; | 432 | $haystack = $request->get('password'); |
414 | 433 | ||
415 | $email = $request->get('email'); | 434 | foreach ($specsumbol as $it) { |
416 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | 435 | if (strpos($haystack, $it) !== false) { |
417 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | 436 | $spec_bool = true; |
418 | } | 437 | } |
419 | 438 | } | |
420 | if ($request->get('password') !== $request->get('confirmed')){ | 439 | |
421 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 440 | foreach ($alpha as $it) { |
422 | } | 441 | if (strpos($haystack, $it) !== false) { |
423 | 442 | $alpha_bool = true; | |
424 | if (strlen($request->get('password')) < 6) { | 443 | } |
425 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | 444 | } |
426 | } | 445 | |
427 | /* | 446 | if ((!$spec_bool) || (!$alpha_bool)) { |
428 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); | 447 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); |
429 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', | 448 | }*/ |
430 | 'X', 'C', 'V', 'B', 'N', 'M'); | 449 | |
431 | $spec_bool = false; | 450 | if (empty($request->get('surname'))) { |
432 | $alpha_bool = false; | 451 | $params['surname'] = 'Неизвестно'; |
433 | 452 | } | |
434 | $haystack = $request->get('password'); | 453 | if (empty($request->get('name_man'))) { |
435 | 454 | $params['name_man'] = 'Неизвестно'; | |
436 | foreach ($specsumbol as $it) { | 455 | } |
437 | if (strpos($haystack, $it) !== false) { | 456 | $validator = Validator::make($params, $rules, $messages); |
438 | $spec_bool = true; | 457 | |
439 | } | 458 | if ($validator->fails()) { |
440 | } | 459 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
441 | 460 | } else { | |
442 | foreach ($alpha as $it) { | 461 | $user = $this->create($params); |
443 | if (strpos($haystack, $it) !== false) { | 462 | event(new Registered($user)); |
444 | $alpha_bool = true; | 463 | Auth::guard()->login($user); |
445 | } | 464 | } |
446 | } | 465 | |
447 | 466 | if ($user) { | |
448 | if ((!$spec_bool) || (!$alpha_bool)) { | 467 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; |
449 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); | 468 | } else { |
450 | }*/ | 469 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
451 | 470 | } | |
452 | if (empty($request->get('surname'))) { | 471 | } |
453 | $params['surname'] = 'Неизвестно'; | 472 | |
454 | } | 473 | // Создание пользователя |
455 | if (empty($request->get('name_man'))) { | 474 | protected function create(array $data) |
456 | $params['name_man'] = 'Неизвестно'; | 475 | { |
457 | } | 476 | $Use = new User_Model(); |
458 | $validator = Validator::make($params, $rules, $messages); | 477 | $Code_user = $Use->create([ |
459 | 478 | 'name' => $data['surname']." ".$data['name_man'], | |
460 | if ($validator->fails()) { | 479 | 'name_man' => $data['name_man'], |
461 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 480 | 'surname' => $data['surname'], |
462 | } else { | 481 | 'surname2' => $data['surname2'], |
463 | $user = $this->create($params); | 482 | 'subscribe_email' => $data['email'], |
464 | event(new Registered($user)); | 483 | 'email' => $data['email'], |
465 | Auth::guard()->login($user); | 484 | 'telephone' => $data['telephone'], |
466 | } | 485 | 'is_worker' => 0, |
467 | 486 | 'password' => Hash::make($data['password']), | |
468 | if ($user) { | 487 | 'pubpassword' => base64_encode($data['password']), |
469 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; | 488 | 'email_verified_at' => Carbon::now() |
470 | } else { | 489 | ]); |
471 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 490 | |
472 | } | 491 | if ($Code_user->id > 0) { |
473 | } | 492 | $Employer = new Employer(); |
474 | 493 | $Employer->user_id = $Code_user->id; | |
475 | // Создание пользователя | 494 | $Employer->name_company = $data['name_company']; |
476 | protected function create(array $data) | 495 | $Employer->email = $data['email']; |
477 | { | 496 | $Employer->telephone = $data['telephone']; |
478 | $Use = new User_Model(); | 497 | $Employer->code = Tools::generator_id(10); |
479 | $Code_user = $Use->create([ | 498 | $Employer->save(); |
480 | 'name' => $data['surname']." ".$data['name_man'], | 499 | |
481 | 'name_man' => $data['name_man'], | 500 | return $Code_user; |
482 | 'surname' => $data['surname'], | 501 | } |
483 | 'surname2' => $data['surname2'], | 502 | } |
484 | 'subscribe_email' => $data['email'], | 503 | |
485 | 'email' => $data['email'], | 504 | // Отправка сообщения от работодателя |
486 | 'telephone' => $data['telephone'], | 505 | public function send_message(MessagesRequiest $request) { |
487 | 'is_worker' => 0, | 506 | $params = $request->all(); |
488 | 'password' => Hash::make($data['password']), | 507 | dd($params); |
489 | 'pubpassword' => base64_encode($data['password']), | 508 | $user1 = $params['user_id']; |
490 | 'email_verified_at' => Carbon::now() | 509 | $user2 = $params['to_user_id']; |
491 | ]); | 510 | |
492 | 511 | if ($request->has('file')) { | |
493 | if ($Code_user->id > 0) { | 512 | $params['file'] = $request->file('file')->store("messages", 'public'); |
494 | $Employer = new Employer(); | 513 | } |
495 | $Employer->user_id = $Code_user->id; | 514 | Message::create($params); |
496 | $Employer->name_company = $data['name_company']; | 515 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
497 | $Employer->email = $data['email']; | 516 | } |
498 | $Employer->telephone = $data['telephone']; | 517 | |
499 | $Employer->code = Tools::generator_id(10); | 518 | public function test123(Request $request) { |
500 | $Employer->save(); | 519 | $params = $request->all(); |
501 | 520 | $user1 = $params['user_id']; | |
502 | return $Code_user; | 521 | $user2 = $params['to_user_id']; |
503 | } | 522 | |
504 | } | 523 | $rules = [ |
505 | 524 | 'text' => 'required|min:1|max:150000', | |
506 | // Отправка сообщения от работодателя | 525 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' |
507 | public function send_message(MessagesRequiest $request) { | 526 | ]; |
508 | $params = $request->all(); | 527 | $messages = [ |
509 | dd($params); | 528 | 'required' => 'Укажите обязательное поле', |
510 | $user1 = $params['user_id']; | 529 | 'min' => [ |
511 | $user2 = $params['to_user_id']; | 530 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
512 | 531 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | |
513 | if ($request->has('file')) { | 532 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
514 | $params['file'] = $request->file('file')->store("messages", 'public'); | 533 | ], |
515 | } | 534 | 'max' => [ |
516 | Message::create($params); | 535 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
517 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 536 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
518 | } | 537 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
519 | 538 | ] | |
520 | public function test123(Request $request) { | 539 | ]; |
521 | $params = $request->all(); | 540 | |
522 | $user1 = $params['user_id']; | 541 | $validator = Validator::make($request->all(), $rules, $messages); |
523 | $user2 = $params['to_user_id']; | 542 | |
524 | 543 | if ($validator->fails()) { | |
525 | $rules = [ | 544 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) |
526 | 'text' => 'required|min:1|max:150000', | 545 | ->withErrors($validator); |
527 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' | 546 | } else { |
528 | ]; | 547 | if ($request->has('file')) { |
529 | $messages = [ | 548 | $params['file'] = $request->file('file')->store("messages", 'public'); |
530 | 'required' => 'Укажите обязательное поле', | 549 | } |
531 | 'min' => [ | 550 | Message::create($params); |
532 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 551 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
533 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 552 | |
534 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 553 | } |
535 | ], | 554 | } |
536 | 'max' => [ | 555 | |
537 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 556 | //Избранные люди |
538 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 557 | public function favorites(Request $request) { |
539 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 558 | $IP_address = RusDate::ip_addr_client(); |
540 | ] | 559 | $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); |
541 | ]; | 560 | |
542 | 561 | if ($Arr->count()) { | |
543 | $validator = Validator::make($request->all(), $rules, $messages); | 562 | $A = Array(); |
544 | 563 | foreach ($Arr as $it) { | |
545 | if ($validator->fails()) { | 564 | $A[] = $it->code_record; |
546 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) | 565 | } |
547 | ->withErrors($validator); | 566 | |
548 | } else { | 567 | $Workers = Worker::query()->whereIn('id', $A); |
549 | if ($request->has('file')) { | 568 | } else { |
550 | $params['file'] = $request->file('file')->store("messages", 'public'); | 569 | $Workers = Worker::query()->where('id', '=', '0'); |
551 | } | 570 | } |
552 | Message::create($params); | 571 | |
553 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 572 | if (($request->has('search')) && (!empty($request->get('search')))) { |
554 | 573 | $search = $request->get('search'); | |
555 | } | 574 | |
556 | } | 575 | $Workers = $Workers->WhereHas('users', |
557 | 576 | function (Builder $query) use ($search) { | |
558 | //Избранные люди | 577 | $query->Where('surname', 'LIKE', "%$search%") |
559 | public function favorites(Request $request) { | 578 | ->orWhere('name_man', 'LIKE', "%$search%") |
560 | $IP_address = RusDate::ip_addr_client(); | 579 | ->orWhere('surname2', 'LIKE', "%$search%"); |
561 | $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); | 580 | }); |
562 | 581 | } else { | |
563 | if ($Arr->count()) { | 582 | $Workers = $Workers->with('users'); |
564 | $A = Array(); | 583 | } |
565 | foreach ($Arr as $it) { | 584 | |
585 | $Workers = $Workers->get(); | ||
586 | |||
566 | $A[] = $it->code_record; | 587 | |
567 | } | 588 | return view('employers.favorite', compact('Workers')); |
568 | 589 | } | |
569 | $Workers = Worker::query()->whereIn('id', $A); | 590 | |
570 | } else { | 591 | // База данных |
571 | $Workers = Worker::query()->where('id', '=', '0'); | 592 | public function bd(Request $request) { |
572 | } | 593 | // для типа BelongsTo |
573 | 594 | //$documents = Document::query()->orderBy(Location::select('name') | |
574 | if (($request->has('search')) && (!empty($request->get('search')))) { | 595 | // ->whereColumn('locations.id', 'documents.location_id') |
575 | $search = $request->get('search'); | 596 | //); |
576 | 597 | ||
577 | $Workers = $Workers->WhereHas('users', | 598 | // для типа HasOne/Many |
578 | function (Builder $query) use ($search) { | 599 | // $documents = Document::::query()->orderBy(Location::select('name') |
579 | $query->Where('surname', 'LIKE', "%$search%") | 600 | // ->whereColumn('locations.document_id', 'documents.id') |
580 | ->orWhere('name_man', 'LIKE', "%$search%") | 601 | //); |
581 | ->orWhere('surname2', 'LIKE', "%$search%"); | 602 | |
582 | }); | 603 | |
583 | } else { | 604 | $users = User_Model::query()->with('workers'); |
584 | $Workers = $Workers->with('users'); | 605 | |
585 | } | 606 | if ($request->has('search')) { |
586 | 607 | $find_key = $request->get('search'); | |
587 | $Workers = $Workers->get(); | 608 | $users = $users->where('name', 'LIKE', "%$find_key%") |
588 | 609 | ->orWhere('surname', 'LIKE', "%$find_key%") | |
589 | 610 | ->orWhere('name_man', 'LIKE', "%$find_key%") | |
590 | return view('employers.favorite', compact('Workers')); | 611 | ->orWhere('email', 'LIKE', "%$find_key%") |
591 | } | 612 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
592 | 613 | } | |
593 | // База данных | 614 | |
594 | public function bd(Request $request) { | 615 | // Данные |
595 | // для типа BelongsTo | 616 | $users = $users->Baseuser()-> |
596 | //$documents = Document::query()->orderBy(Location::select('name') | 617 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); |
597 | // ->whereColumn('locations.id', 'documents.location_id') | 618 | $count_users = $users; |
598 | //); | 619 | $users = $users->paginate(5); |
599 | 620 | ||
600 | // для типа HasOne/Many | 621 | |
601 | // $documents = Document::::query()->orderBy(Location::select('name') | 622 | return view('employers.bd', compact('users', 'count_users')); |
602 | // ->whereColumn('locations.document_id', 'documents.id') | 623 | } |
603 | //); | 624 | |
604 | 625 | //Настройка уведомлений | |
605 | 626 | public function subscribe() { | |
606 | $users = User_Model::query()->with('workers'); | 627 | return view('employers.subcribe'); |
607 | 628 | } | |
608 | if ($request->has('search')) { | 629 | |
609 | $find_key = $request->get('search'); | 630 | //Установка уведомлений сохранение |
610 | $users = $users->where('name', 'LIKE', "%$find_key%") | 631 | public function save_subscribe(Request $request) { |
611 | ->orWhere('surname', 'LIKE', "%$find_key%") | 632 | dd($request->all()); |
612 | ->orWhere('name_man', 'LIKE', "%$find_key%") | 633 | $msg = $request->validate([ |
613 | ->orWhere('email', 'LIKE', "%$find_key%") | 634 | 'subscribe_email' => 'required|email|min:5|max:255', |
614 | ->orWhere('telephone', 'LIKE', "%$find_key%"); | 635 | ]); |
615 | } | 636 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); |
616 | 637 | } | |
617 | // Данные | 638 | |
618 | $users = $users->Baseuser()-> | 639 | //Сбросить форму с паролем |
619 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); | 640 | public function password_reset() { |
620 | $count_users = $users; | 641 | $email = Auth()->user()->email; |
621 | $users = $users->paginate(5); | 642 | return view('employers.password-reset', compact('email')); |
622 | 643 | } | |
623 | 644 | ||
624 | return view('employers.bd', compact('users', 'count_users')); | 645 | //Обновление пароля |
625 | } | 646 | public function new_password(Request $request) { |
626 | 647 | $use = Auth()->user(); | |
627 | //Настройка уведомлений | 648 | $request->validate([ |
628 | public function subscribe() { | 649 | 'password' => 'required|string', |
629 | return view('employers.subcribe'); | 650 | 'new_password' => 'required|string', |
630 | } | 651 | 'new_password2' => 'required|string' |
631 | 652 | ]); | |
632 | //Установка уведомлений сохранение | 653 | |
633 | public function save_subscribe(Request $request) { | 654 | if ($request->get('new_password') == $request->get('new_password2')) |
634 | dd($request->all()); | 655 | if ($request->get('password') !== $request->get('new_password')) { |
635 | $msg = $request->validate([ | 656 | $credentials = $request->only('email', 'password'); |
636 | 'subscribe_email' => 'required|email|min:5|max:255', | 657 | if (Auth::attempt($credentials)) { |
637 | ]); | 658 | |
638 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); | 659 | if (!is_null($use->email_verified_at)){ |
639 | } | 660 | |
640 | 661 | $user_data = User_Model::find($use->id); | |
641 | //Сбросить форму с паролем | 662 | $user_data->update([ |
642 | public function password_reset() { | 663 | 'password' => Hash::make($request->get('new_password')), |
643 | $email = Auth()->user()->email; | 664 | 'pubpassword' => base64_encode($request->get('new_password')), |
644 | return view('employers.password-reset', compact('email')); | 665 | ]); |
645 | } | 666 | return redirect() |
646 | 667 | ->route('employer.password_reset') | |
647 | //Обновление пароля | 668 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
648 | public function new_password(Request $request) { | 669 | } |
649 | $use = Auth()->user(); | 670 | |
650 | $request->validate([ | 671 | return redirect() |
651 | 'password' => 'required|string', | 672 | ->route('employer.password_reset') |
652 | 'new_password' => 'required|string', | 673 | ->withError('Данная учетная запись не было верифицированна!'); |
653 | 'new_password2' => 'required|string' | 674 | } |
654 | ]); | 675 | } |
655 | 676 | ||
656 | if ($request->get('new_password') == $request->get('new_password2')) | 677 | return redirect() |
657 | if ($request->get('password') !== $request->get('new_password')) { | 678 | ->route('employer.password_reset') |
658 | $credentials = $request->only('email', 'password'); | 679 | ->withErrors('Не совпадение данных, обновите пароли!'); |
659 | if (Auth::attempt($credentials)) { | 680 | } |
660 | 681 | ||
661 | if (!is_null($use->email_verified_at)){ | 682 | |
662 | 683 | ||
663 | $user_data = User_Model::find($use->id); | 684 | // Форма Удаление пипла |
664 | $user_data->update([ | 685 | public function delete_people() { |
665 | 'password' => Hash::make($request->get('new_password')), | 686 | $login = Auth()->user()->email; |
666 | 'pubpassword' => base64_encode($request->get('new_password')), | 687 | return view('employers.delete_people', compact('login')); |
667 | ]); | 688 | } |
668 | return redirect() | 689 | |
669 | ->route('employer.password_reset') | 690 | // Удаление аккаунта |
670 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 691 | public function action_delete_user(Request $request) { |
671 | } | 692 | $Answer = $request->all(); |
672 | 693 | $user_id = Auth()->user()->id; | |
673 | return redirect() | 694 | $request->validate([ |
674 | ->route('employer.password_reset') | 695 | 'password' => 'required|string', |
675 | ->withError('Данная учетная запись не было верифицированна!'); | 696 | ]); |
676 | } | 697 | |
677 | } | 698 | $credentials = $request->only('email', 'password'); |
678 | 699 | if (Auth::attempt($credentials)) { | |
679 | return redirect() | 700 | Auth::logout(); |
680 | ->route('employer.password_reset') | 701 | $it = User_Model::find($user_id); |
681 | ->withErrors('Не совпадение данных, обновите пароли!'); | 702 | $it->delete(); |
682 | } | 703 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
683 | 704 | } else { | |
684 | 705 | return redirect()->route('employer.delete_people') | |
685 | 706 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | |
686 | // Форма Удаление пипла | 707 | } |
687 | public function delete_people() { | 708 | } |
688 | $login = Auth()->user()->email; | 709 | |
689 | return view('employers.delete_people', compact('login')); | 710 | public function ajax_delete_user(Request $request) { |
690 | } | 711 | $Answer = $request->all(); |
691 | 712 | $user_id = Auth()->user()->id; | |
692 | // Удаление аккаунта | 713 | $request->validate([ |
693 | public function action_delete_user(Request $request) { | 714 | 'password' => 'required|string', |
694 | $Answer = $request->all(); | 715 | ]); |
695 | $user_id = Auth()->user()->id; | 716 | $credentials = $request->only('email', 'password'); |
696 | $request->validate([ | 717 | if (Auth::attempt($credentials)) { |
697 | 'password' => 'required|string', | 718 | |
698 | ]); | 719 | return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', |
699 | 720 | 'email' => $request->get('email'), | |
700 | $credentials = $request->only('email', 'password'); | 721 | 'password' => $request->get('password'))); |
701 | if (Auth::attempt($credentials)) { | 722 | } else { |
702 | Auth::logout(); | 723 | return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); |
703 | $it = User_Model::find($user_id); | 724 | } |
704 | $it->delete(); | 725 | } |
705 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 726 | |
706 | } else { | 727 | // FAQ - Вопросы/ответы для работодателей и соискателей |
707 | return redirect()->route('employer.delete_people') | 728 | public function faq() { |
708 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 729 | return view('employers.faq'); |
709 | } | 730 | } |
710 | } | 731 | |
711 | 732 | // Рассылка сообщений | |
712 | public function ajax_delete_user(Request $request) { | 733 | public function send_all_messages() { |
713 | $Answer = $request->all(); | 734 | return view('employers.send_all'); |
714 | $user_id = Auth()->user()->id; | 735 | } |
715 | $request->validate([ | 736 | |
716 | 'password' => 'required|string', | 737 | // Отправка сообщений для информации |
717 | ]); | 738 | public function send_all_post(Request $request) { |
718 | $credentials = $request->only('email', 'password'); | 739 | $data = $request->all(); |
719 | if (Auth::attempt($credentials)) { | 740 | |
720 | 741 | $emails = User_Model::query()->where('is_worker', '1')->get(); | |
721 | return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', | 742 | |
722 | 'email' => $request->get('email'), | 743 | foreach ($emails as $e) { |
723 | 'password' => $request->get('password'))); | 744 | Mail::to($e->email)->send(new SendAllMessages($data)); |
724 | } else { | 745 | } |
725 | return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); | 746 | |
726 | } | 747 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); |
727 | } | 748 | } |
728 | 749 | ||
729 | // FAQ - Вопросы/ответы для работодателей и соискателей | 750 | // База резюме |
730 | public function faq() { | 751 | public function bd_tupe(Request $request) { |
731 | return view('employers.faq'); | 752 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); |
732 | } | 753 | |
733 | 754 | return view('employers.bd_tupe', compact('Resume')); | |
734 | // Рассылка сообщений | 755 | } |
735 | public function send_all_messages() { | 756 | |
736 | return view('employers.send_all'); | 757 | ////////////////////////////////////////////////////////////////// |
737 | } | 758 | // Отправил сообщение |
738 | 759 | ////////////////////////////////////////////////////////////////// | |
739 | // Отправка сообщений для информации | 760 | public function new_message(Request $request) { |
740 | public function send_all_post(Request $request) { | 761 | $params = $request->all(); |
741 | $data = $request->all(); | 762 | $id = $params['_user_id']; |
742 | 763 | $message = new Message(); | |
743 | $emails = User_Model::query()->where('is_worker', '1')->get(); | 764 | $message->user_id = $params['_user_id']; |
744 | 765 | $message->to_user_id = $params['_to_user_id']; | |
745 | foreach ($emails as $e) { | 766 | $message->title = $params['title']; |
746 | Mail::to($e->email)->send(new SendAllMessages($data)); | 767 | $message->text = $params['text']; |
747 | } | 768 | if ($request->has('_file')) { |
748 | 769 | $message->file = $request->file('_file')->store("worker/$id", 'public'); | |
749 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); | 770 | } |
750 | } | 771 | $message->ad_employer_id = $params['_vacancy']; |
751 | 772 | $message->flag_new = 1; | |
752 | // База резюме | 773 | $id_message = $message->save(); |
753 | public function bd_tupe(Request $request) { | 774 | |
754 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); | 775 | //$data['message_id'] = $id_message; |
755 | 776 | //$data['ad_employer_id'] = $params['_vacancy']; | |
756 | return view('employers.bd_tupe', compact('Resume')); | 777 | //$data['job_title_id'] = 0; |
757 | } | 778 | |
758 | 779 | $data['flag'] = 1; | |
759 | ////////////////////////////////////////////////////////////////// | 780 | //$ad_responce = ad_response::create($data); |
760 | // Отправил сообщение | 781 | return redirect()->route('employer.messages', ['type_message' => 'output']); |
761 | ////////////////////////////////////////////////////////////////// | 782 | } |
762 | public function new_message(Request $request) { | 783 | |
763 | $params = $request->all(); | 784 | // Восстановление пароля |
764 | $id = $params['_user_id']; | 785 | public function repair_password(Request $request) { |
765 | $message = new Message(); | 786 | $params = $request->get('email'); |
766 | $message->user_id = $params['_user_id']; | 787 | } |
767 | $message->to_user_id = $params['_to_user_id']; | 788 | |
768 | $message->title = $params['title']; | 789 | // Избранные люди на корабль |
769 | $message->text = $params['text']; | 790 | public function selected_people(Request $request) { |
770 | if ($request->has('_file')) { | 791 | $id = $request->get('id'); |
771 | $message->file = $request->file('_file')->store("worker/$id", 'public'); | 792 | $favorite_people = Job_title::query()->Notbdif()->where('is_remove', '=', '0')->where('position_id', $id)->get(); |
772 | } | 793 | return view('favorite_people', compact('favorite_people')); |
773 | $message->ad_employer_id = $params['_vacancy']; | 794 | } |
774 | $message->flag_new = 1; | 795 | } |
775 | $id_message = $message->save(); | 796 | |
776 |
app/Http/Controllers/MainController.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\Classes\Tools; | 6 | use App\Classes\Tools; |
7 | use App\Mail\MailRegistration; | 7 | use App\Mail\MailRegistration; |
8 | use App\Mail\MailRepair; | 8 | use App\Mail\MailRepair; |
9 | use App\Models\Ad_employer; | 9 | use App\Models\Ad_employer; |
10 | use App\Models\Ad_jobs; | 10 | use App\Models\Ad_jobs; |
11 | use App\Models\Category; | 11 | use App\Models\Category; |
12 | use App\Models\Education; | 12 | use App\Models\Education; |
13 | use App\Models\Employer; | 13 | use App\Models\Employer; |
14 | use App\Models\employers_main; | 14 | use App\Models\employers_main; |
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\News; | 18 | use App\Models\News; |
19 | use App\Models\Positions; | 19 | use App\Models\Positions; |
20 | use App\Models\reclame; | 20 | use App\Models\reclame; |
21 | use App\Models\User; | 21 | use App\Models\User; |
22 | use Illuminate\Http\Request; | 22 | use Illuminate\Http\Request; |
23 | use Illuminate\Support\Facades\Auth; | 23 | use Illuminate\Support\Facades\Auth; |
24 | use Illuminate\Support\Facades\DB; | 24 | use Illuminate\Support\Facades\DB; |
25 | use Illuminate\Support\Facades\Hash; | 25 | use Illuminate\Support\Facades\Hash; |
26 | use Illuminate\Support\Facades\Mail; | 26 | use Illuminate\Support\Facades\Mail; |
27 | use Illuminate\Support\Facades\Validator; | 27 | use Illuminate\Support\Facades\Validator; |
28 | use App\Classes\StatusUser; | 28 | use App\Classes\StatusUser; |
29 | 29 | ||
30 | class MainController extends Controller | 30 | class MainController extends Controller |
31 | { | 31 | { |
32 | // Главная страница публичной части | 32 | // Главная страница публичной части |
33 | public function index() { | 33 | public function index() { |
34 | $news = News::query()->orderByDesc('id')->limit(6)->get(); | 34 | $news = News::query()->orderByDesc('id')->limit(6)->get(); |
35 | 35 | ||
36 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') | 36 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
37 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') | 37 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') |
38 | ->OrderByDesc('created_at') | 38 | ->OrderByDesc('created_at') |
39 | ->GroupBy('categories.id') | 39 | ->GroupBy('categories.id') |
40 | ->get(); | 40 | ->get(); |
41 | 41 | ||
42 | $Position = Category::query()->where('is_remove', '=', '0')->get(); | 42 | $Position = Category::query()->where('is_remove', '=', '0')->get(); |
43 | $job_titles = Job_title::query()->where('is_remove', '=', 0)->get(); | 43 | $job_titles = Job_title::query()->where('is_remove', '=', 0)->get(); |
44 | /*$BigFlot = Array(); | 44 | /*$BigFlot = Array(); |
45 | foreach ($Position as $position) { | 45 | foreach ($Position as $position) { |
46 | $BigFlot[] = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> | 46 | $BigFlot[] = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> |
47 | orderBy('job_titles.sort')-> | 47 | orderBy('job_titles.sort')-> |
48 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> | 48 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> |
49 | where('position_ship', "$position->name")-> | 49 | where('position_ship', "$position->name")-> |
50 | groupby('job_title_id','position_ship')-> | 50 | groupby('job_title_id','position_ship')-> |
51 | get(); | 51 | get(); |
52 | } | 52 | } |
53 | $BigFlot = Array(); | 53 | $BigFlot = Array(); |
54 | foreach ($Position as $position) { | 54 | foreach ($Position as $position) { |
55 | $BigFlot[] = Ad_jobs::query()->with(['job_title' => function($query) { | 55 | $BigFlot[] = Ad_jobs::query()->with(['job_title' => function($query) { |
56 | $query->OrderBy('sort'); | 56 | $query->OrderBy('sort'); |
57 | }])->whereHas('job_title', function ($query) use ($position) { | 57 | }])->whereHas('job_title', function ($query) use ($position) { |
58 | $query->where('position_id', $position->id); | 58 | $query->where('position_id', $position->id); |
59 | })-> | 59 | })-> |
60 | distinct('job_title_id')-> | 60 | distinct('job_title_id')-> |
61 | get(); | 61 | get(); |
62 | }*/ | 62 | }*/ |
63 | /*$BigFlot = Array(); | 63 | /*$BigFlot = Array(); |
64 | foreach ($Position as $position) { | 64 | foreach ($Position as $position) { |
65 | $BigFlot[$position->id] = DB::table('ad_jobs')-> | 65 | $BigFlot[$position->id] = DB::table('ad_jobs')-> |
66 | selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name, job_titles.position_id')-> | 66 | selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name, job_titles.position_id')-> |
67 | orderByDesc('job_titles.sort')-> | 67 | orderByDesc('job_titles.sort')-> |
68 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> | 68 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> |
69 | where('job_titles.position_id', $position->id)-> | 69 | where('job_titles.position_id', $position->id)-> |
70 | groupby('job_title_id')-> | 70 | groupby('job_title_id')-> |
71 | get(); | 71 | get(); |
72 | }*/ | 72 | }*/ |
73 | $Data = DB::table('job_titles')-> | 73 | $Data = DB::table('job_titles')-> |
74 | selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> | 74 | selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> |
75 | where('categories.is_remove', '=', '0')-> | 75 | where('categories.is_remove', '=', '0')-> |
76 | where('job_titles.is_remove', '=', '0')-> | 76 | where('job_titles.is_remove', '=', '0')-> |
77 | leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> | 77 | leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> |
78 | join('categories', 'categories.id', '=', 'job_titles.position_id')-> | 78 | join('categories', 'categories.id', '=', 'job_titles.position_id')-> |
79 | groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> | 79 | groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> |
80 | orderByDesc('job_titles.sort')->get()->toArray(); | 80 | orderByDesc('job_titles.sort')->get()->toArray(); |
81 | 81 | ||
82 | |||
82 | $Main_Job = array(); | 83 | $Main_Job = array(); |
83 | $name_cat = ''; | 84 | $name_cat = ''; |
84 | foreach ($Data as $it) { | 85 | foreach ($Data as $it) { |
85 | $it_arr = (array)$it; | 86 | $it_arr = (array)$it; |
86 | if ($name_cat != $it_arr['catname']) $name_cat = $it_arr['catname']; | 87 | if ($name_cat != $it_arr['catname']) $name_cat = $it_arr['catname']; |
87 | $Main_Job[$name_cat][] = $it_arr; | 88 | $Main_Job[$name_cat][] = $it_arr; |
88 | } | 89 | } |
89 | 90 | ||
90 | $employers = employers_main::query()->with('employer')->orderBy('id')->limit(8)->get(); | 91 | $employers = employers_main::query()->with('employer')->orderBy('id')->limit(8)->get(); |
91 | $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get(); | 92 | $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get(); |
92 | return view('index', compact('news', 'job_titles', 'categories', 'employers', 'vacancy', 'Main_Job')); | 93 | return view('index', compact('news', 'job_titles', 'categories', 'employers', 'vacancy', 'Main_Job')); |
93 | } | 94 | } |
94 | 95 | ||
95 | public function search_vacancies(Request $request) { | 96 | public function search_vacancies(Request $request) { |
96 | if ($request->has('search')) { | 97 | if ($request->has('search')) { |
97 | $search = $request->get('search'); | 98 | $search = $request->get('search'); |
98 | $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); | 99 | $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); |
99 | if (isset($job_titles->id)) | 100 | if (isset($job_titles->id)) |
100 | if ($job_titles->id > 0) | 101 | if ($job_titles->id > 0) |
101 | return redirect()->route('vacancies', ['job' => $job_titles->id]); | 102 | return redirect()->route('vacancies', ['job' => $job_titles->id]); |
102 | } | 103 | } |
103 | } | 104 | } |
104 | 105 | ||
105 | // Лайк вакансии | 106 | // Лайк вакансии |
106 | public function like_vacancy(Request $request) { | 107 | public function like_vacancy(Request $request) { |
107 | $IP_address = RusDate::ip_addr_client(); | 108 | $IP_address = RusDate::ip_addr_client(); |
108 | 109 | ||
109 | if ($request->has('code_record')) { | 110 | if ($request->has('code_record')) { |
110 | if ($request->has('delete')) { | 111 | if ($request->has('delete')) { |
112 | $code = $request->get('code_record'); | ||
111 | $code = $request->get('code_record'); | 113 | $atomic_era = Like_vacancy::select('id')-> |
112 | $atomic_era = Like_vacancy::select('id')-> | 114 | where('code_record', '=', $code)->toSql(); |
113 | where('code_record', '=', $code)->toSql(); | ||
114 | DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete(); | ||
115 | 115 | DB::table('like_vacancy')->where('code_record', $request->get('code_record'))->delete(); | |
116 | } else { | 116 | |
117 | $params = $request->all(); | 117 | } else { |
118 | $params['ip_address'] = $IP_address; | 118 | $params = $request->all(); |
119 | Like_vacancy::create($params); | 119 | $params['ip_address'] = $IP_address; |
120 | } | 120 | Like_vacancy::create($params); |
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | } | |
124 | // Лайк соискателю. | 124 | |
125 | public function like_worker(Request $request) { | 125 | // Лайк соискателю. |
126 | $IP_address = RusDate::ip_addr_client(); | 126 | public function like_worker(Request $request) { |
127 | 127 | $IP_address = RusDate::ip_addr_client(); | |
128 | if ($request->has('code_record')) { | 128 | |
129 | if ($request->has('delete')) { | 129 | if ($request->has('code_record')) { |
130 | $atomic_era = Like_worker::select('id')-> | 130 | if ($request->has('delete')) { |
131 | where('code_record', '=', $request-> | 131 | $atomic_era = Like_worker::select('id')-> |
132 | get('code_record'))->first(); | 132 | where('code_record', '=', $request-> |
133 | 133 | get('code_record'))->first(); | |
134 | DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete(); | 134 | |
135 | 135 | DB::table('like_worker')->where('code_record', $request->get('code_record'))->delete(); | |
136 | return "Вот и результат удаления!"; | 136 | |
137 | 137 | return "Вот и результат удаления!"; | |
138 | } else { | 138 | |
139 | $params = $request->all(); | 139 | } else { |
140 | $params['ip_address'] = $IP_address; | 140 | $params = $request->all(); |
141 | Like_worker::create($params); | 141 | $params['ip_address'] = $IP_address; |
142 | } | 142 | Like_worker::create($params); |
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | } | |
146 | public function vacancies(Request $request) { | 146 | |
147 | //должности | 147 | public function vacancies(Request $request) { |
148 | $Job_title = Job_title::query()->where('is_remove', '=', '0')->orderBy('name')->get(); | 148 | //должности |
149 | 149 | $Job_title = Job_title::query()->where('is_remove', '=', '0')->orderBy('name')->get(); | |
150 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') | 150 | |
151 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') | 151 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
152 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') | 152 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') |
153 | ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); | 153 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') |
154 | 154 | ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); | |
155 | //категории и вакансии | 155 | |
156 | if (($request->has('job')) && ($request->get('job') > 0)) { | 156 | //категории и вакансии |
157 | $categories = $categories->Where('job_title_id', '=', $request->get('job')); | 157 | if (($request->has('job')) && ($request->get('job') > 0)) { |
158 | } | 158 | $categories = $categories->Where('job_title_id', '=', $request->get('job')); |
159 | 159 | } | |
160 | $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); | 160 | |
161 | 161 | $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); | |
162 | //$Position = Category::query()->where('is_remove', '=', '0')->get(); | 162 | |
163 | 163 | //$Position = Category::query()->where('is_remove', '=', '0')->get(); | |
164 | 164 | ||
165 | /*$BigFlot = Array(); | 165 | |
166 | foreach ($Position as $position) { | 166 | /*$BigFlot = Array(); |
167 | $War_flot = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> | 167 | foreach ($Position as $position) { |
168 | orderBy('job_titles.sort')-> | 168 | $War_flot = DB::table('ad_jobs')->selectRaw('name, job_titles.id as id_title, count(`ad_jobs`.`id`) as cnt, ad_jobs.position_ship')-> |
169 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> | 169 | orderBy('job_titles.sort')-> |
170 | where('position_ship', "$position->name"); | 170 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> |
171 | if (($request->has('job')) && ($request->get('job') > 0)) { | 171 | where('position_ship', "$position->name"); |
172 | $War_flot = $War_flot->where('job_title_id', $request->get('job')); | 172 | if (($request->has('job')) && ($request->get('job') > 0)) { |
173 | } | 173 | $War_flot = $War_flot->where('job_title_id', $request->get('job')); |
174 | $War_flot = $War_flot->groupby('job_title_id','position_ship')->get(); | 174 | } |
175 | $BigFlot[] = $War_flot; | 175 | $War_flot = $War_flot->groupby('job_title_id','position_ship')->get(); |
176 | }*/ | 176 | $BigFlot[] = $War_flot; |
177 | /* | 177 | }*/ |
178 | $BigFlot = Array(); | 178 | /* |
179 | foreach ($Position as $position) { | 179 | $BigFlot = Array(); |
180 | $WarFlot = DB::table('ad_jobs')-> | 180 | foreach ($Position as $position) { |
181 | selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')-> | 181 | $WarFlot = DB::table('ad_jobs')-> |
182 | orderByDesc('job_titles.sort')-> | 182 | selectRaw('name, count(`ad_jobs`.`id`) as cnt, job_title_id, job_titles.name')-> |
183 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> | 183 | orderByDesc('job_titles.sort')-> |
184 | where('job_titles.position_id', $position->id); | 184 | join('job_titles', 'job_titles.id', '=', 'ad_jobs.job_title_id')-> |
185 | if (($request->has('job')) && ($request->get('job') > 0)) { | 185 | where('job_titles.position_id', $position->id); |
186 | $WarFlot = $WarFlot->where('job_title_id', $request->get('job')); | 186 | if (($request->has('job')) && ($request->get('job') > 0)) { |
187 | } | 187 | $WarFlot = $WarFlot->where('job_title_id', $request->get('job')); |
188 | $WarFlot = $WarFlot->groupby('job_title_id')->get(); | 188 | } |
189 | $BigFlot[] = $WarFlot; | 189 | $WarFlot = $WarFlot->groupby('job_title_id')->get(); |
190 | } | 190 | $BigFlot[] = $WarFlot; |
191 | */ | 191 | } |
192 | 192 | */ | |
193 | $Data = DB::table('job_titles')-> | 193 | |
194 | selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> | 194 | $Data = DB::table('job_titles')-> |
195 | where('categories.is_remove', '=', '0')-> | 195 | selectRaw('job_titles.name as jn, count(`ad_jobs`.`job_title_id`) as cnt, job_titles.id as id_job, categories.name as catname, categories.id as id_cat')-> |
196 | where('job_titles.is_remove', '=', '0'); | 196 | where('categories.is_remove', '=', '0')-> |
197 | if (($request->has('job')) && ($request->get('job') > 0)) { | 197 | where('job_titles.is_remove', '=', '0'); |
198 | $Data = $Data->where('job_title_id', $request->get('job')); | 198 | if (($request->has('job')) && ($request->get('job') > 0)) { |
199 | } | 199 | $Data = $Data->where('job_title_id', $request->get('job')); |
200 | $Data = $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> | 200 | } |
201 | join('categories', 'categories.id', '=', 'job_titles.position_id')-> | 201 | $Data = $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id')-> |
202 | groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> | 202 | join('categories', 'categories.id', '=', 'job_titles.position_id')-> |
203 | orderByDesc('job_titles.sort')->get()->toArray(); | 203 | groupBy('job_titles.id')->orderByDesc('job_titles.position_id')-> |
204 | 204 | orderByDesc('job_titles.sort')->get()->toArray(); | |
205 | $Main_Job = array(); | 205 | |
206 | $name_cat = ''; | 206 | $Main_Job = array(); |
207 | foreach ($Data as $it) { | 207 | $name_cat = ''; |
208 | $it_arr = (array)$it; | 208 | foreach ($Data as $it) { |
209 | if ($name_cat != $it_arr['catname']) | 209 | $it_arr = (array)$it; |
210 | $name_cat = $it_arr['catname']; | 210 | if ($name_cat != $it_arr['catname']) |
211 | $Main_Job[$name_cat][] = $it_arr; | 211 | $name_cat = $it_arr['catname']; |
212 | } | 212 | $Main_Job[$name_cat][] = $it_arr; |
213 | 213 | } | |
214 | if ($request->ajax()) { | 214 | |
215 | return view('ajax.new_sky', compact('categories', 'Main_Job')); | 215 | if ($request->ajax()) { |
216 | } else { | 216 | return view('ajax.new_sky', compact('categories', 'Main_Job')); |
217 | return view('new_sky', compact('Job_title', 'categories', 'Main_Job')); | 217 | } else { |
218 | } | 218 | return view('new_sky', compact('Job_title', 'categories', 'Main_Job')); |
219 | } | 219 | } |
220 | 220 | } | |
221 | //Вакансии категория детальная | 221 | |
222 | public function list_vacancies(Category $categories, Request $request) { | 222 | //Вакансии категория детальная |
223 | if (isset(Auth()->user()->id)) | 223 | public function list_vacancies(Category $categories, Request $request) { |
224 | $uid = Auth()->user()->id; | 224 | if (isset(Auth()->user()->id)) |
225 | else | 225 | $uid = Auth()->user()->id; |
226 | $uid = 0; | 226 | else |
227 | 227 | $uid = 0; | |
228 | if ($request->get('job') == 0) | 228 | |
229 | $job_search = ''; | 229 | if ($request->get('job') == 0) |
230 | else | 230 | $job_search = ''; |
231 | $job_search = $request->get('job'); | 231 | else |
232 | 232 | $job_search = $request->get('job'); | |
233 | $Query = Ad_employer::with('jobs')-> | 233 | |
234 | with('cat')-> | 234 | $Query = Ad_employer::with('jobs')-> |
235 | with('employer')-> | 235 | with('cat')-> |
236 | 236 | with('employer')-> | |
237 | whereHas('jobs_code', function ($query) use ($job_search) { | 237 | |
238 | if (!empty($job_search)) { | 238 | whereHas('jobs_code', function ($query) use ($job_search) { |
239 | $query->where('job_title_id', $job_search); | 239 | if (!empty($job_search)) { |
240 | } | 240 | $query->where('job_title_id', $job_search); |
241 | })->select('ad_employers.*'); | 241 | } |
242 | 242 | })->select('ad_employers.*'); | |
243 | if (isset($categories->id) && ($categories->id > 0)) { | 243 | |
244 | $Query = $Query->where('category_id', '=', $categories->id); | 244 | if (isset($categories->id) && ($categories->id > 0)) { |
245 | $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); | 245 | $Query = $Query->where('category_id', '=', $categories->id); |
246 | } else { | 246 | $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); |
247 | $Name_categori = ''; | 247 | } else { |
248 | } | 248 | $Name_categori = ''; |
249 | 249 | } | |
250 | if ($request->get('sort')) { | 250 | |
251 | $sort = $request->get('sort'); | 251 | if ($request->get('sort')) { |
252 | switch ($sort) { | 252 | $sort = $request->get('sort'); |
253 | case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; | 253 | switch ($sort) { |
254 | case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; | 254 | case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; |
255 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; | 255 | case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; |
256 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; | 256 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; |
257 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 257 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; |
258 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 258 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
259 | } | 259 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
260 | } | 260 | } |
261 | 261 | } | |
262 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 262 | |
263 | 263 | $Job_title = Job_title::query()->OrderBy('name')->get(); | |
264 | $Query_count = $Query->count(); | 264 | |
265 | 265 | $Query_count = $Query->count(); | |
266 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 266 | |
267 | 267 | $Query = $Query->OrderBy('updated_at')->paginate(3); | |
268 | $Reclama = reclame::query()->get(); | 268 | |
269 | 269 | $Reclama = reclame::query()->get(); | |
270 | if ($request->ajax()) { | 270 | |
271 | if ($request->has('title')) { | 271 | if ($request->ajax()) { |
272 | return view('ajax.list_category', compact( | 272 | if ($request->has('title')) { |
273 | 'Name_categori' | 273 | return view('ajax.list_category', compact( |
274 | )); | 274 | 'Name_categori' |
275 | } else { | 275 | )); |
276 | return view('ajax.list_vacancies', compact('Query', | 276 | } else { |
277 | 'Query_count', | 277 | return view('ajax.list_vacancies', compact('Query', |
278 | 'Name_categori', | 278 | 'Query_count', |
279 | 'Reclama', | 279 | 'Name_categori', |
280 | 'categories', | 280 | 'Reclama', |
281 | 'Job_title', | 281 | 'categories', |
282 | 'uid')); | 282 | 'Job_title', |
283 | } | 283 | 'uid')); |
284 | } else { | 284 | } |
285 | //Вернуть все | 285 | } else { |
286 | return view('list_vacancies', compact('Query', | 286 | //Вернуть все |
287 | 'Query_count', | 287 | return view('list_vacancies', compact('Query', |
288 | 'Reclama', | 288 | 'Query_count', |
289 | 'Name_categori', | 289 | 'Reclama', |
290 | 'categories', | 290 | 'Name_categori', |
291 | 'Job_title', | 291 | 'categories', |
292 | 'uid')); | 292 | 'Job_title', |
293 | } | 293 | 'uid')); |
294 | } | 294 | } |
295 | 295 | } | |
296 | // Образование | 296 | |
297 | public function education(Request $request) { | 297 | // Образование |
298 | $educations = Education::query(); | 298 | public function education(Request $request) { |
299 | if (($request->has('search')) && (!empty($request->get('search')))) { | 299 | $educations = Education::query(); |
300 | $search = trim($request->get('search')); | 300 | if (($request->has('search')) && (!empty($request->get('search')))) { |
301 | $educations = $educations->where('name', 'LIKE', "%$search%"); | 301 | $search = trim($request->get('search')); |
302 | } | 302 | $educations = $educations->where('name', 'LIKE', "%$search%"); |
303 | 303 | } | |
304 | if ($request->get('sort')) { | 304 | |
305 | $sort = $request->get('sort'); | 305 | if ($request->get('sort')) { |
306 | switch ($sort) { | 306 | $sort = $request->get('sort'); |
307 | case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break; | 307 | switch ($sort) { |
308 | case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break; | 308 | case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break; |
309 | case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break; | 309 | case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break; |
310 | case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break; | 310 | case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break; |
311 | case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break; | 311 | case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break; |
312 | default: $educations = $educations->orderBy('id')->orderby('updated_at'); break; | 312 | case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break; |
313 | } | 313 | default: $educations = $educations->orderBy('id')->orderby('updated_at'); break; |
314 | } | 314 | } |
315 | 315 | } | |
316 | $count_edu = $educations->count(); | 316 | |
317 | $educations = $educations->paginate(6); | 317 | $count_edu = $educations->count(); |
318 | if ($request->ajax()) { | 318 | $educations = $educations->paginate(6); |
319 | return view('ajax.education', compact('educations')); | 319 | if ($request->ajax()) { |
320 | } else { | 320 | return view('ajax.education', compact('educations')); |
321 | return view('education', compact('educations', 'count_edu')); | 321 | } else { |
322 | } | 322 | return view('education', compact('educations', 'count_edu')); |
323 | } | 323 | } |
324 | 324 | } | |
325 | // Контакты | 325 | |
326 | public function contacts() { | 326 | // Контакты |
327 | return view('contacts'); | 327 | public function contacts() { |
328 | } | 328 | return view('contacts'); |
329 | 329 | } | |
330 | // Вход в личный кабинет | 330 | |
331 | public function input_login(Request $request) | 331 | // Вход в личный кабинет |
332 | { | 332 | public function input_login(Request $request) |
333 | $params = $request->all(); | 333 | { |
334 | 334 | $params = $request->all(); | |
335 | 335 | ||
336 | $rules = [ | 336 | |
337 | 'email' => 'required|string|email', | 337 | $rules = [ |
338 | 'password' => 'required|string|min:3|max:25', | 338 | 'email' => 'required|string|email', |
339 | ]; | 339 | 'password' => 'required|string|min:3|max:25', |
340 | 340 | ]; | |
341 | $messages = [ | 341 | |
342 | 'required' => 'Укажите обязательное поле «:attribute»', | 342 | $messages = [ |
343 | 'email' => 'Введите корректный email', | 343 | 'required' => 'Укажите обязательное поле «:attribute»', |
344 | 'min' => [ | 344 | 'email' => 'Введите корректный email', |
345 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 345 | 'min' => [ |
346 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 346 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
347 | ], | 347 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
348 | 'max' => [ | 348 | ], |
349 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 349 | 'max' => [ |
350 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 350 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
351 | ], | 351 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
352 | ]; | 352 | ], |
353 | $validator = Validator::make($request->all(), $rules, $messages); | 353 | ]; |
354 | if ($validator->fails()) { | 354 | $validator = Validator::make($request->all(), $rules, $messages); |
355 | if (Auth::check()) | 355 | if ($validator->fails()) { |
356 | $user_id = $request->user()->id; | 356 | if (Auth::check()) |
357 | else | 357 | $user_id = $request->user()->id; |
358 | $user_id = 0; | 358 | else |
359 | 359 | $user_id = 0; | |
360 | if ($user_id > 0) | 360 | |
361 | return json_encode(Array("ERROR" => "Email или пароль невалидный!")); | 361 | if ($user_id > 0) |
362 | else | 362 | return json_encode(Array("ERROR" => "Email или пароль невалидный!")); |
363 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); | 363 | else |
364 | } else { | 364 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); |
365 | $credentials = $request->only('email', 'password'); | 365 | } else { |
366 | 366 | $credentials = $request->only('email', 'password'); | |
367 | if (Auth::attempt($credentials, $request->has('remember'))) { | 367 | |
368 | 368 | if (Auth::attempt($credentials, $request->has('remember'))) { | |
369 | if (is_null(Auth::user()->email_verified_at)) { | 369 | |
370 | Auth::logout(); | 370 | if (is_null(Auth::user()->email_verified_at)) { |
371 | return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); | 371 | Auth::logout(); |
372 | } | 372 | return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); |
373 | 373 | } | |
374 | if (Auth::user()->is_worker) { | 374 | |
375 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); | 375 | if (Auth::user()->is_worker) { |
376 | } else { | 376 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); |
377 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); | 377 | } else { |
378 | } | 378 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); |
379 | 379 | } | |
380 | return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); | 380 | |
381 | //->route('index') | 381 | return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); |
382 | //->with('success', 'Вы вошли в личный кабинет.'); | 382 | //->route('index') |
383 | } else { | 383 | //->with('success', 'Вы вошли в личный кабинет.'); |
384 | return json_encode(Array("ERROR" => "Неверный логин или пароль!")); | 384 | } else { |
385 | } | 385 | return json_encode(Array("ERROR" => "Неверный логин или пароль!")); |
386 | } | 386 | } |
387 | } | 387 | } |
388 | 388 | } | |
389 | // Восстановление пароля | 389 | |
390 | public function repair_password(Request $request) { | 390 | // Восстановление пароля |
391 | $rules = [ | 391 | public function repair_password(Request $request) { |
392 | 'email' => 'required|string|email', | 392 | $rules = [ |
393 | ]; | 393 | 'email' => 'required|string|email', |
394 | 394 | ]; | |
395 | $messages = [ | 395 | |
396 | 'required' => 'Укажите обязательное поле «:attribute»', | 396 | $messages = [ |
397 | 'email' => 'Введите корректный email', | 397 | 'required' => 'Укажите обязательное поле «:attribute»', |
398 | 'min' => [ | 398 | 'email' => 'Введите корректный email', |
399 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 399 | 'min' => [ |
400 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 400 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
401 | ], | 401 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
402 | 'max' => [ | 402 | ], |
403 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 403 | 'max' => [ |
404 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 404 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
405 | ], | 405 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
406 | ]; | 406 | ], |
407 | 407 | ]; | |
408 | $validator = Validator::make($request->all(), $rules, $messages); | 408 | |
409 | 409 | $validator = Validator::make($request->all(), $rules, $messages); | |
410 | if ($validator->fails()) { | 410 | |
411 | return redirect()->back()->with('Error', "Email невалидный"); | 411 | if ($validator->fails()) { |
412 | } else { | 412 | return redirect()->back()->with('Error', "Email невалидный"); |
413 | $new_password = Tools::generator_id(10); | 413 | } else { |
414 | $hash_password = Hash::make($new_password); | 414 | $new_password = Tools::generator_id(10); |
415 | $user = User::query()->where('email', $request->get('email'))->first(); | 415 | $hash_password = Hash::make($new_password); |
416 | $EditRec = User::find($user->id); | 416 | $user = User::query()->where('email', $request->get('email'))->first(); |
417 | $EditRec->password = $hash_password; | 417 | $EditRec = User::find($user->id); |
418 | $EditRec->save(); | 418 | $EditRec->password = $hash_password; |
419 | 419 | $EditRec->save(); | |
420 | foreach ([$request->get('email')] as $recipient) { | 420 | |
421 | Mail::to($recipient)->send(new MailRepair($new_password)); | 421 | foreach ([$request->get('email')] as $recipient) { |
422 | } | 422 | Mail::to($recipient)->send(new MailRepair($new_password)); |
423 | return redirect()->route('index'); | 423 | } |
424 | 424 | return redirect()->route('index'); | |
425 | } | 425 | |
426 | 426 | } | |
427 | } | 427 | |
428 | 428 | } | |
429 | // Вывод новостей | 429 | |
430 | public function news(Request $request) { | 430 | // Вывод новостей |
431 | $Query = News::query(); | 431 | public function news(Request $request) { |
432 | if ($request->has('search')) { | 432 | $Query = News::query(); |
433 | $search = $request->get('search'); | 433 | if ($request->has('search')) { |
434 | $Query = $Query->where('title', 'LIKE', "%$search%")-> | 434 | $search = $request->get('search'); |
435 | orWhere('text', 'LIKE', "%$search%"); | 435 | $Query = $Query->where('title', 'LIKE', "%$search%")-> |
436 | } | 436 | orWhere('text', 'LIKE', "%$search%"); |
437 | 437 | } | |
438 | if ($request->ajax()) { | 438 | |
439 | if ($request->get('sort')) { | 439 | if ($request->ajax()) { |
440 | $sort = $request->get('sort'); | 440 | if ($request->get('sort')) { |
441 | switch ($sort) { | 441 | $sort = $request->get('sort'); |
442 | case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; | 442 | switch ($sort) { |
443 | case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; | 443 | case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; |
444 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; | 444 | case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; |
445 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; | 445 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; |
446 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 446 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; |
447 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 447 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
448 | } | 448 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
449 | } | 449 | } |
450 | } | 450 | } |
451 | $Query_count = $Query->count(); | 451 | } |
452 | $Query = $Query->paginate(6); | 452 | $Query_count = $Query->count(); |
453 | 453 | $Query = $Query->paginate(6); | |
454 | if ($request->ajax()) { | 454 | |
455 | return view('ajax.news-list', compact('Query', 'Query_count')); | 455 | if ($request->ajax()) { |
456 | } else { | 456 | return view('ajax.news-list', compact('Query', 'Query_count')); |
457 | return view('news-list', compact('Query', 'Query_count')); | 457 | } else { |
458 | } | 458 | return view('news-list', compact('Query', 'Query_count')); |
459 | } | 459 | } |
460 | 460 | } | |
461 | //Детальная новость | 461 | |
462 | public function detail_new(News $new) { | 462 | //Детальная новость |
463 | // Наборка | 463 | public function detail_new(News $new) { |
464 | $Query = News::query()->where('id', $new->id)->get(); | 464 | // Наборка |
465 | $title = $Query[0]->title; | 465 | $Query = News::query()->where('id', $new->id)->get(); |
466 | $All_Query = News::query()->paginate(8); | 466 | $title = $Query[0]->title; |
467 | return view('detail_new', compact('Query', 'All_Query', 'title')); | 467 | $All_Query = News::query()->paginate(8); |
468 | } | 468 | return view('detail_new', compact('Query', 'All_Query', 'title')); |
469 | } | 469 | } |
app/Http/Requests/FlotRequest.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 FlotRequest extends FormRequest | 7 | class FlotRequest 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' => 'required|min:3|max:255', | 27 | 'name' => 'required|min:3|max:255', |
28 | 'text' => 'required|min:5', | 28 | 'text' => 'required|min:5', |
29 | //'image' => [ | 29 | //'image' => [ |
30 | // 'mimes:jpeg,jpg,png', | 30 | // 'mimes:jpeg,jpg,png', |
31 | // 'max:20000' | 31 | // 'max:20000' |
32 | //], | 32 | //], |
33 | 'region' => 'required|min:3|max:255', | 33 | 'region' => 'required|min:3|max:255', |
34 | 'power' => 'required|min:3|max:255' | 34 | 'power' => 'required|min:3|max:255' |
35 | ]; | 35 | ]; |
36 | } | 36 | } |
37 | 37 | ||
38 | public function messages() { | 38 | public function messages() { |
39 | return [ | 39 | return [ |
40 | 'required' => 'Поле :attribute обязательно для ввода', | 40 | 'required' => 'Поле :attribute обязательно для ввода', |
41 | 'min' => [ | 41 | 'min' => [ |
42 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 42 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
43 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 43 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
44 | ], | 44 | ], |
45 | 'max' => [ | 45 | 'max' => [ |
46 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 46 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
47 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 47 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
48 | ], | 48 | ], |
49 | 'email' => 'Введите корректный емайл' | 49 | 'email' => 'Введите корректный емайл' |
50 | 50 | ||
51 | ]; | 51 | ]; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 |
resources/views/employers/add_vacancy.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('Приближаемся к системе, нас рой тут...'); | 5 | console.log('Приближаемся к системе, нас рой тут...'); |
6 | $(document).on('change', '#category_id', function() { | 6 | $(document).on('change', '#category_id', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.val(); | 8 | var val_ = this_.val(); |
9 | var ajax_ = $('#job_title_id'); | 9 | var ajax_ = $('#job_title_id'); |
10 | 10 | ||
11 | console.log('Создания списка людей, которые поднимутся на корабль...'); | 11 | console.log('Создания списка людей, которые поднимутся на корабль...'); |
12 | 12 | ||
13 | $.ajax({ | 13 | $.ajax({ |
14 | type: "GET", | 14 | type: "GET", |
15 | url: "{{ route('employer.selected_people') }}", | 15 | url: "{{ route('employer.selected_people') }}", |
16 | data: "id="+val_, | 16 | data: "id="+val_, |
17 | success: function (data) { | 17 | success: function (data) { |
18 | console.log('Ответка пришла'); | 18 | console.log('Ответка пришла'); |
19 | console.log('Список избранных людей создан'); | 19 | console.log('Список избранных людей создан'); |
20 | ajax_.html(data); | 20 | ajax_.html(data); |
21 | }, | 21 | }, |
22 | headers: { | 22 | headers: { |
23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
24 | }, | 24 | }, |
25 | error: function (data) { | 25 | error: function (data) { |
26 | console.log('Обрыв связи'); | 26 | console.log('Обрыв связи'); |
27 | console.log('Error: ' + data); | 27 | console.log('Error: ' + data); |
28 | } | 28 | } |
29 | }); | 29 | }); |
30 | }); | 30 | }); |
31 | </script> | 31 | </script> |
32 | @endsection | 32 | @endsection |
33 | @section('content') | 33 | @section('content') |
34 | <section class="cabinet"> | 34 | <section class="cabinet"> |
35 | <div class="container"> | 35 | <div class="container"> |
36 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 36 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
37 | <li><a href="{{ route('index') }}">Главная</a></li> | 37 | <li><a href="{{ route('index') }}">Главная</a></li> |
38 | <li><b>Личный кабинет</b></li> | 38 | <li><b>Личный кабинет</b></li> |
39 | </ul> | 39 | </ul> |
40 | <div class="cabinet__wrapper"> | 40 | <div class="cabinet__wrapper"> |
41 | <div class="cabinet__side"> | 41 | <div class="cabinet__side"> |
42 | <div class="cabinet__side-toper"> | 42 | <div class="cabinet__side-toper"> |
43 | 43 | ||
44 | @include('employers.emblema') | 44 | @include('employers.emblema') |
45 | 45 | ||
46 | </div> | 46 | </div> |
47 | 47 | ||
48 | @include('employers.menu', ['item' => 2]) | 48 | @include('employers.menu', ['item' => 2]) |
49 | 49 | ||
50 | </div> | 50 | </div> |
51 | 51 | ||
52 | <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> | 52 | <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> |
53 | @csrf | 53 | @csrf |
54 | <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/> | 54 | <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/> |
55 | <div class="cabinet__body-item"> | 55 | <div class="cabinet__body-item"> |
56 | <div class="cabinet__descr"> | 56 | <div class="cabinet__descr"> |
57 | <h2 class="title cabinet__title">Разместить вакансию</h2> | 57 | <h2 class="title cabinet__title">Разместить вакансию</h2> |
58 | <p class="cabinet__text"><b>Данные по вакансии</b></p> | 58 | <p class="cabinet__text"><b>Данные по вакансии</b></p> |
59 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> | 59 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> |
60 | </div> | 60 | </div> |
61 | </div> | 61 | </div> |
62 | 62 | ||
63 | <div class="cabinet__body-item"> | 63 | <div class="cabinet__body-item"> |
64 | <h4>Поля для вакансии</h4> | 64 | <h4>Поля для вакансии</h4> |
65 | <div class="cabinet__inputs"> | 65 | <div class="cabinet__inputs"> |
66 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 66 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
67 | <label class="form-group__label">Название вакансии</label> | 67 | <label class="form-group__label">Название вакансии</label> |
68 | <div class="form-group__item"> | 68 | <div class="form-group__item"> |
69 | <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required> | 69 | <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required> |
70 | @error('name') | 70 | @error('name') |
71 | <span class="text-xs text-red-600 dark:text-red-400"> | 71 | <span class="text-xs text-red-600 dark:text-red-400"> |
72 | {{ $message }} | 72 | {{ $message }} |
73 | </span> | 73 | </span> |
74 | @enderror | 74 | @enderror |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | 77 | ||
78 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 78 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
79 | <label class="form-group__label">Телефон</label> | 79 | <label class="form-group__label">Телефон</label> |
80 | <div class="form-group__item"> | 80 | <div class="form-group__item"> |
81 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> | 81 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> |
82 | @error('telephone') | 82 | @error('telephone') |
83 | <span class="text-xs text-red-600 dark:text-red-400"> | 83 | <span class="text-xs text-red-600 dark:text-red-400"> |
84 | {{ $message }} | 84 | {{ $message }} |
85 | </span> | 85 | </span> |
86 | @enderror | 86 | @enderror |
87 | </div> | 87 | </div> |
88 | </div> | 88 | </div> |
89 | 89 | ||
90 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 90 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth 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" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> | 93 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> |
94 | @error('email') | 94 | @error('email') |
95 | <span class="text-xs text-red-600 dark:text-red-400"> | 95 | <span class="text-xs text-red-600 dark:text-red-400"> |
96 | {{ $message }} | 96 | {{ $message }} |
97 | </span> | 97 | </span> |
98 | @enderror | 98 | @enderror |
99 | </div> | 99 | </div> |
100 | </div> | 100 | </div> |
101 | 101 | ||
102 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | 102 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> |
103 | <label class="form-group__label">Зарплата среднестатистическая для вакансии</label> | 103 | <label class="form-group__label">Зарплата среднестатистическая для вакансии</label> |
104 | <div class="form-group__item"> | 104 | <div class="form-group__item"> |
105 | <input type="text" class="input" name="salary" id="salary" value="0" placeholder="Среднестатистическая зарплата"> | 105 | <input type="text" class="input" name="salary" id="salary" value="0" placeholder="Среднестатистическая зарплата"> |
106 | @error('salary') | 106 | @error('salary') |
107 | <span class="text-xs text-red-600 dark:text-red-400"> | 107 | <span class="text-xs text-red-600 dark:text-red-400"> |
108 | {{ $message }} | 108 | {{ $message }} |
109 | </span> | 109 | </span> |
110 | @enderror | 110 | @enderror |
111 | </div> | 111 | </div> |
112 | </div> | 112 | </div> |
113 | 113 | ||
114 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | 114 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> |
115 | <label class="form-group__label">Город посадки</label> | 115 | <label class="form-group__label">Город посадки</label> |
116 | <div class="form-group__item"> | 116 | <div class="form-group__item"> |
117 | <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> | 117 | <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> |
118 | @error('city') | 118 | @error('city') |
119 | <span class="text-xs text-red-600"> | 119 | <span class="text-xs text-red-600"> |
120 | {{ $message }} | 120 | {{ $message }} |
121 | </span> | 121 | </span> |
122 | @enderror | 122 | @enderror |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | 125 | ||
126 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 126 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
127 | <label class="form-group__label">Категория (локация)</label> | 127 | <label class="form-group__label">Категория (локация)</label> |
128 | <div class="form-group__item"> | 128 | <div class="form-group__item"> |
129 | <div class="select"> | 129 | <div class="select"> |
130 | <select class="js-select2" name="category_id" id="category_id"> | 130 | <select class="js-select2" name="category_id" id="category_id"> |
131 | <option selected> Выберите категорию из списка</option> | ||
131 | @php $i = 1 @endphp | 132 | @php $i = 1 @endphp |
132 | @if ($categories->count()) | 133 | @if ($categories->count()) |
133 | @foreach($categories as $j) | 134 | @foreach($categories as $j) |
134 | @if ($i == 1) <option selected> Выберите категорию из списка</option> | ||
135 | @else | ||
136 | <option value="{{ $j->id }}">{{ $j->name }}</option> | 135 | <option value="{{ $j->id }}">{{ $j->name }}</option> |
137 | @endif | ||
138 | @php $i++ @endphp | 136 | @php $i++ @endphp |
139 | @endforeach | 137 | @endforeach |
140 | @endif | 138 | @endif |
141 | </select> | 139 | </select> |
142 | @error('category_id') | 140 | @error('category_id') |
143 | <span class="text-xs text-red-600 dark:text-red-400"> | 141 | <span class="text-xs text-red-600 dark:text-red-400"> |
144 | {{ $message }} | 142 | {{ $message }} |
145 | </span> | 143 | </span> |
146 | @enderror | 144 | @enderror |
147 | </div> | 145 | </div> |
148 | </div> | 146 | </div> |
149 | </div> | 147 | </div> |
150 | 148 | ||
151 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 149 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
152 | <label class="form-group__label">Описание вакансии</label> | 150 | <label class="form-group__label">Описание вакансии</label> |
153 | <div class="form-group__item"> | 151 | <div class="form-group__item"> |
154 | <textarea class="textarea" name="text" id="text">{{ $Employer[0]->text ?? '' }}</textarea> | 152 | <textarea class="textarea" name="text" id="text">{{ $Employer[0]->text ?? '' }}</textarea> |
155 | @error('text') | 153 | @error('text') |
156 | <span class="text-xs text-red-600"> | 154 | <span class="text-xs text-red-600"> |
157 | {{ $message }} | 155 | {{ $message }} |
158 | </span> | 156 | </span> |
159 | @enderror | 157 | @enderror |
160 | </div> | 158 | </div> |
161 | </div> | 159 | </div> |
162 | </div> | 160 | </div> |
163 | </div> | 161 | </div> |
164 | 162 | ||
165 | <div class="cabinet__body-item"> | 163 | <div class="cabinet__body-item"> |
166 | <div class="cabinet__body-item"> | 164 | <div class="cabinet__body-item"> |
167 | <div class="cabinet__descr"> | 165 | <div class="cabinet__descr"> |
168 | <p class="cabinet__text"><b>Добавление должности</b></p> | 166 | <p class="cabinet__text"><b>Добавление должности</b></p> |
169 | </div> | 167 | </div> |
170 | </div> | 168 | </div> |
171 | 169 | ||
172 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 170 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
173 | <label class="form-group__label">Должность соискателя</label> | 171 | <label class="form-group__label">Должность соискателя</label> |
174 | <div class="form-group__item"> | 172 | <div class="form-group__item"> |
175 | <div class="select"> | 173 | <div class="select"> |
176 | <select class="js-select2" name="job_title_id" id="job_title_id"> | 174 | <select class="js-select2" name="job_title_id" id="job_title_id"> |
177 | @php $i = 1 @endphp | 175 | @php $i = 1 @endphp |
178 | @if ($jobs->count()) | 176 | @if ($jobs->count()) |
179 | @foreach($jobs as $j) | 177 | @foreach($jobs as $j) |
180 | @if ($i == 1) <option selected> Выберите должность из списка</option> | 178 | @if ($i == 1) <option selected> Выберите должность из списка</option> |
181 | @else | 179 | @else |
182 | <option value="{{ $j->id }}">{{ $j->name }}</option> | 180 | <option value="{{ $j->id }}">{{ $j->name }}</option> |
183 | @endif | 181 | @endif |
184 | @php $i++ @endphp | 182 | @php $i++ @endphp |
185 | @endforeach | 183 | @endforeach |
186 | @endif | 184 | @endif |
187 | </select> | 185 | </select> |
188 | @error('job_title_id') | 186 | @error('job_title_id') |
189 | <span class="text-xs text-red-600 dark:text-red-400"> | 187 | <span class="text-xs text-red-600 dark:text-red-400"> |
190 | {{ $message }} | 188 | {{ $message }} |
191 | </span> | 189 | </span> |
192 | @enderror | 190 | @enderror |
193 | </div> | 191 | </div> |
194 | </div> | 192 | </div> |
195 | </div> | 193 | </div> |
196 | 194 | ||
197 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 195 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
198 | <label class="form-group__label">Минимальная зарплата</label> | 196 | <label class="form-group__label">Минимальная зарплата</label> |
199 | <div class="form-group__item"> | 197 | <div class="form-group__item"> |
200 | <input type="text" class="input" name="min_salary" id="min_salary" value="{{ old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> | 198 | <input type="text" class="input" name="min_salary" id="min_salary" value="{{ old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> |
201 | @error('min_salary') | 199 | @error('min_salary') |
202 | <span class="text-xs text-red-600"> | 200 | <span class="text-xs text-red-600"> |
203 | {{ $message }} | 201 | {{ $message }} |
204 | </span> | 202 | </span> |
205 | @enderror | 203 | @enderror |
206 | </div> | 204 | </div> |
207 | </div> | 205 | </div> |
208 | 206 | ||
209 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 207 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
210 | <label class="form-group__label">Максимальная зарплата</label> | 208 | <label class="form-group__label">Максимальная зарплата</label> |
211 | <div class="form-group__item"> | 209 | <div class="form-group__item"> |
212 | <input type="text" class="input" name="max_salary" id="max_salary" value="{{ old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> | 210 | <input type="text" class="input" name="max_salary" id="max_salary" value="{{ old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> |
213 | @error('salary') | 211 | @error('salary') |
214 | <span class="text-xs text-red-600 dark:text-red-400"> | 212 | <span class="text-xs text-red-600 dark:text-red-400"> |
215 | {{ $message }} | 213 | {{ $message }} |
216 | </span> | 214 | </span> |
217 | @enderror | 215 | @enderror |
218 | </div> | 216 | </div> |
219 | </div> | 217 | </div> |
220 | 218 | ||
221 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 219 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
222 | <label class="form-group__label">Регион отплытия</label> | 220 | <label class="form-group__label">Регион отплытия</label> |
223 | <div class="form-group__item"> | 221 | <div class="form-group__item"> |
224 | <input type="text" class="input" name="region" id="region" value="{{ old('region') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> | 222 | <input type="text" class="input" name="region" id="region" value="{{ old('region') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> |
225 | @error('region') | 223 | @error('region') |
226 | <span class="text-xs text-red-600"> | 224 | <span class="text-xs text-red-600"> |
227 | {{ $message }} | 225 | {{ $message }} |
228 | </span> | 226 | </span> |
229 | @enderror | 227 | @enderror |
230 | </div> | 228 | </div> |
231 | </div> | 229 | </div> |
232 | 230 | ||
233 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 231 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
234 | <label class="form-group__label">Мощность</label> | 232 | <label class="form-group__label">Мощность</label> |
235 | <div class="form-group__item"> | 233 | <div class="form-group__item"> |
236 | <input type="text" class="input" name="power" id="power" value="{{ old('power') ?? '' }}" placeholder="POWER-45"> | 234 | <input type="text" class="input" name="power" id="power" value="{{ old('power') ?? '' }}" placeholder="POWER-45"> |
237 | @error('power') | 235 | @error('power') |
238 | <span class="text-xs text-red-600"> | 236 | <span class="text-xs text-red-600"> |
239 | {{ $message }} | 237 | {{ $message }} |
240 | </span> | 238 | </span> |
241 | @enderror | 239 | @enderror |
242 | </div> | 240 | </div> |
243 | </div> | 241 | </div> |
244 | 242 | ||
245 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 243 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
246 | <label class="form-group__label">Суточные выплаты</label> | 244 | <label class="form-group__label">Суточные выплаты</label> |
247 | <div class="form-group__item"> | 245 | <div class="form-group__item"> |
248 | <input type="text" class="input" name="sytki" id="sytki" value="{{ old('sytki') ?? '' }}" placeholder="2000"> | 246 | <input type="text" class="input" name="sytki" id="sytki" value="{{ old('sytki') ?? '' }}" placeholder="2000"> |
249 | @error('power') | 247 | @error('power') |
250 | <span class="text-xs text-red-600"> | 248 | <span class="text-xs text-red-600"> |
251 | {{ $message }} | 249 | {{ $message }} |
252 | </span> | 250 | </span> |
253 | @enderror | 251 | @enderror |
254 | </div> | 252 | </div> |
255 | </div> | 253 | </div> |
256 | 254 | ||
257 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 255 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
258 | <label class="form-group__label">Начало отплытия</label> | 256 | <label class="form-group__label">Начало отплытия</label> |
259 | <div class="form-group__item"> | 257 | <div class="form-group__item"> |
260 | <input type="text" class="input" name="start" id="start" value="{{ old('start') ?? '' }}" placeholder="20 сентября 2024"> | 258 | <input type="text" class="input" name="start" id="start" value="{{ old('start') ?? '' }}" placeholder="20 сентября 2024"> |
261 | @error('power') | 259 | @error('power') |
262 | <span class="text-xs text-red-600"> | 260 | <span class="text-xs text-red-600"> |
263 | {{ $message }} | 261 | {{ $message }} |
264 | </span> | 262 | </span> |
265 | @enderror | 263 | @enderror |
266 | </div> | 264 | </div> |
267 | </div> | 265 | </div> |
268 | 266 | ||
269 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 267 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
270 | <label class="form-group__label">Корабль для посадки</label> | 268 | <label class="form-group__label">Корабль для посадки</label> |
271 | <div class="form-group__item"> | 269 | <div class="form-group__item"> |
272 | <div class="select"> | 270 | <div class="select"> |
273 | <select class="js-select2" name="flot" id="flot"> | 271 | <select class="js-select2" name="flot" id="flot"> |
274 | <option value="" selected> Не указан корабль</option> | 272 | <option value="" selected> Не указан корабль</option> |
275 | @if ($Employer[0]->flots->count()) | 273 | @if ($Employer[0]->flots->count()) |
276 | @foreach($Employer[0]->flots as $j) | 274 | @foreach($Employer[0]->flots as $j) |
277 | <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> | 275 | <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> |
278 | @endforeach | 276 | @endforeach |
279 | @endif | 277 | @endif |
280 | </select> | 278 | </select> |
281 | @error('flot') | 279 | @error('flot') |
282 | <span class="text-xs text-red-600"> | 280 | <span class="text-xs text-red-600"> |
283 | {{ $message }} | 281 | {{ $message }} |
284 | </span> | 282 | </span> |
285 | @enderror | 283 | @enderror |
286 | </div> | 284 | </div> |
287 | </div> | 285 | </div> |
288 | </div> | 286 | </div> |
289 | 287 | ||
290 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 288 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
291 | <label class="form-group__label">Дополнительная информация</label> | 289 | <label class="form-group__label">Дополнительная информация</label> |
292 | <div class="form-group__item"> | 290 | <div class="form-group__item"> |
293 | <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> | 291 | <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> |
294 | @error('description') | 292 | @error('description') |
295 | <span class="text-xs text-red-600"> | 293 | <span class="text-xs text-red-600"> |
296 | {{ $message }} | 294 | {{ $message }} |
297 | </span> | 295 | </span> |
298 | @enderror | 296 | @enderror |
299 | </div> | 297 | </div> |
300 | </div> | 298 | </div> |
301 | 299 | ||
302 | </div> | 300 | </div> |
303 | <button type="submit" class="button cabinet__submit">Опубликовать</button> | 301 | <button type="submit" class="button cabinet__submit">Опубликовать</button> |
304 | </div> | 302 | </div> |
305 | </form> | 303 | </form> |
306 | </div> | 304 | </div> |
307 | </div> | 305 | </div> |
308 | </section> | 306 | </section> |
309 | </div> | 307 | </div> |
310 | @endsection | 308 | @endsection |
resources/views/employers/edit-flot.blade.php
File was created | 1 | @extends('layout.frontend', ['title' => 'Редактирование флота - РекаМоре']) | |
2 | |||
3 | @section('scripts') | ||
4 | <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> | ||
5 | <script> | ||
6 | ClassicEditor | ||
7 | .create( document.querySelector( '#txtarea' ) ) | ||
8 | .catch( error => { | ||
9 | console.error( error ); | ||
10 | } ); | ||
11 | </script> | ||
12 | @endsection | ||
13 | @section('content') | ||
14 | <section class="cabinet"> | ||
15 | <div class="container"> | ||
16 | <ul class="breadcrumbs cabinet__breadcrumbs"> | ||
17 | <li><a href="{{ route('index') }}">Главная</a></li> | ||
18 | <li><b>Личный кабинет</b></li> | ||
19 | </ul> | ||
20 | <div class="cabinet__wrapper"> | ||
21 | <div class="cabinet__side"> | ||
22 | <div class="cabinet__side-toper"> | ||
23 | @include('employers.emblema') | ||
24 | </div> | ||
25 | |||
26 | @include('employers.menu', ['item' => 12]) | ||
27 | |||
28 | </div> | ||
29 | <div class="cabinet__body"> | ||
30 | @include('messages_error') | ||
31 | |||
32 | <div class="cabinet__body-item"> | ||
33 | <div class="cabinet__descr"> | ||
34 | <h2 class="title cabinet__title">Редактирование флота</h2> | ||
35 | </div> | ||
36 | |||
37 | <form action="{{ route('employer.update_flot_save', ['Flot' => $Flot->id]) }}" enctype="multipart/form-data" method="POST" class="cabinet__add"> | ||
38 | @csrf | ||
39 | <label class="cabinet__add-pic" style="vertical-align: top"> | ||
40 | <input type="file" name="image" id="image"> | ||
41 | @error('image') | ||
42 | <span class="text-xs text-red-600"> | ||
43 | {{ $message }} | ||
44 | </span> | ||
45 | @enderror | ||
46 | <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer->id }}"/> | ||
47 | <svg> | ||
48 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | ||
49 | </svg> | ||
50 | <span> | ||
51 | <svg> | ||
52 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | ||
53 | </svg> | ||
54 | Загрузить фото | ||
55 | </span> | ||
56 | </label> | ||
57 | |||
58 | <div class="cabinet__add-body"> | ||
59 | <div class="form-group"> | ||
60 | <label class="form-group__label">Название</label> | ||
61 | <div class="form-group__item"> | ||
62 | <input type="text" name="name" id="flot_name" class="input" value="{{ old('name') ?? $Flot->name ?? '' }}" placeholder="Корабль №000001" required> | ||
63 | @error('name') | ||
64 | <span class="text-xs text-red-600"> | ||
65 | {{ $message }} | ||
66 | </span> | ||
67 | @enderror | ||
68 | </div> | ||
69 | </div> | ||
70 | <div class="form-group" style="display:none"> | ||
71 | <label class="form-group__label">Описание</label> | ||
72 | <div class="form-group__item"> | ||
73 | <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." value="{{ old('text') ?? $Flot->text ?? '' }}"> | ||
74 | @error('text') | ||
75 | <span class="text-xs text-red-600"> | ||
76 | {{ $message }} | ||
77 | </span> | ||
78 | @enderror | ||
79 | </div> | ||
80 | </div> | ||
81 | <div class="form-group" style="display:none"> | ||
82 | <label class="form-group__label">Регион</label> | ||
83 | <div class="form-group__item"> | ||
84 | <input type="text" name="region" id="region" class="input" placeholder="Мурманск" value="{{ old('region') ?? $Flot->region ?? '' }}"> | ||
85 | @error('region') | ||
86 | <span class="text-xs text-red-600"> | ||
87 | {{ $message }} | ||
88 | </span> | ||
89 | @enderror | ||
90 | </div> | ||
91 | </div> | ||
92 | <div class="form-group" style="display:none"> | ||
93 | <label class="form-group__label">Мощность</label> | ||
94 | <div class="form-group__item"> | ||
95 | <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" value="{{ old('power') ?? $Flot->power ?? '' }}"> | ||
96 | @error('power') | ||
97 | <span class="text-xs text-red-600"> | ||
98 | {{ $message }} | ||
99 | </span> | ||
100 | @enderror | ||
101 | </div> | ||
102 | </div> | ||
103 | <div class="form-group"> | ||
104 | <label class="form-group__label">DWT</label> | ||
105 | <div class="form-group__item"> | ||
106 | <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т" value="{{ old('DWT') ?? $Flot->DWT ?? '' }}"> | ||
107 | @error('DWT') | ||
108 | <span class="text-xs text-red-600"> | ||
109 | {{ $message }} | ||
110 | </span> | ||
111 | @enderror | ||
112 | </div> | ||
113 | </div> | ||
114 | <div class="form-group"> | ||
115 | <label class="form-group__label">Мощность ГД (кВт)</label> | ||
116 | <div class="form-group__item"> | ||
117 | <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт" value="{{ old('POWER_GD') ?? $Flot->POWER_GD ?? '' }}"> | ||
118 | @error('POWER_GD') | ||
119 | <span class="text-xs text-red-600"> | ||
120 | {{ $message }} | ||
121 | </span> | ||
122 | @enderror | ||
123 | </div> | ||
124 | </div> | ||
125 | <div class="form-group" style=""> | ||
126 | <label class="form-group__label">IMO</label> | ||
127 | <div class="form-group__item"> | ||
128 | <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275" value="{{ old('IMO') ?? $Flot->IMO ?? '' }}"> | ||
129 | @error('IMO') | ||
130 | <span class="text-xs text-red-600"> | ||
131 | {{ $message }} | ||
132 | </span> | ||
133 | @enderror | ||
134 | </div> | ||
135 | </div> | ||
136 | <button type="submit" class="button" id="ajax_flot-" name="ajax_flot-">Сохранить флот</button> | ||
137 | </div> | ||
138 | </form> | ||
139 | </div> | ||
140 | </div> | ||
141 | </div> | ||
142 | </div> | ||
143 | |||
144 | </section> | ||
145 | </div> | ||
146 | <!-- END TOP WRAPPER --> | ||
147 | @endsection | ||
1 | @extends('layout.frontend', ['title' => 'Редактирование флота - РекаМоре']) | 148 |
resources/views/employers/favorite.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', '#sort_ajax', function() { | 6 | $(document).on('change', '#sort_ajax', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.val(); | 8 | var val_ = this_.val(); |
9 | console.log('sort items '+val_); | 9 | console.log('sort items '+val_); |
10 | 10 | ||
11 | $.ajax({ | 11 | $.ajax({ |
12 | type: "GET", | 12 | type: "GET", |
13 | url: "{{ route('shipping_companies') }}", | 13 | url: "{{ route('shipping_companies') }}", |
14 | data: "sort="+val_+"&block=1", | 14 | data: "sort="+val_+"&block=1", |
15 | success: function (data) { | 15 | success: function (data) { |
16 | console.log('Выбор сортировки'); | 16 | console.log('Выбор сортировки'); |
17 | console.log(data); | 17 | console.log(data); |
18 | $('#block_1').html(data); | 18 | $('#block_1').html(data); |
19 | }, | 19 | }, |
20 | headers: { | 20 | headers: { |
21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
22 | }, | 22 | }, |
23 | error: function (data) { | 23 | error: function (data) { |
24 | data = JSON.stringify(data); | 24 | data = JSON.stringify(data); |
25 | console.log('Error: ' + data); | 25 | console.log('Error: ' + data); |
26 | } | 26 | } |
27 | }); | 27 | }); |
28 | 28 | ||
29 | $.ajax({ | 29 | $.ajax({ |
30 | type: "GET", | 30 | type: "GET", |
31 | url: "{{ route('shipping_companies') }}", | 31 | url: "{{ route('shipping_companies') }}", |
32 | data: "sort="+val_+"&block=2", | 32 | data: "sort="+val_+"&block=2", |
33 | success: function (data) { | 33 | success: function (data) { |
34 | console.log('Выбор сортировки2'); | 34 | console.log('Выбор сортировки2'); |
35 | console.log(data); | 35 | console.log(data); |
36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
37 | $('#block_2').html(data); | 37 | $('#block_2').html(data); |
38 | }, | 38 | }, |
39 | headers: { | 39 | headers: { |
40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
41 | }, | 41 | }, |
42 | error: function (data) { | 42 | error: function (data) { |
43 | data = JSON.stringify(data); | 43 | data = JSON.stringify(data); |
44 | console.log('Error: ' + data); | 44 | console.log('Error: ' + data); |
45 | } | 45 | } |
46 | }); | 46 | }); |
47 | }); | 47 | }); |
48 | </script> | 48 | </script> |
49 | @include('js.favorite-worker') | 49 | @include('js.favorite-worker') |
50 | @endsection | 50 | @endsection |
51 | 51 | ||
52 | @section('content') | 52 | @section('content') |
53 | <section class="cabinet"> | 53 | <section class="cabinet"> |
54 | <div class="container"> | 54 | <div class="container"> |
55 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 55 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
56 | <li><a href="{{ route('index') }}">Главная</a></li> | 56 | <li><a href="{{ route('index') }}">Главная</a></li> |
57 | <li><b>Личный кабинет</b></li> | 57 | <li><b>Личный кабинет</b></li> |
58 | </ul> | 58 | </ul> |
59 | <div class="cabinet__wrapper"> | 59 | <div class="cabinet__wrapper"> |
60 | <div class="cabinet__side"> | 60 | <div class="cabinet__side"> |
61 | <div class="cabinet__side-toper"> | 61 | <div class="cabinet__side-toper"> |
62 | @include('employers.emblema') | 62 | @include('employers.emblema') |
63 | </div> | 63 | </div> |
64 | 64 | ||
65 | @include('employers.menu', ['item' => 6]) | 65 | @include('employers.menu', ['item' => 6]) |
66 | 66 | ||
67 | </div> | 67 | </div> |
68 | 68 | ||
69 | <div class="cabinet__body"> | 69 | <div class="cabinet__body"> |
70 | <div class="cabinet__body-item"> | 70 | <div class="cabinet__body-item"> |
71 | <h2 class="title cabinet__title">Избранные кандидаты</h2> | 71 | <h2 class="title cabinet__title">Избранные кандидаты</h2> |
72 | </div> | 72 | </div> |
73 | <div class="cabinet__body-item"> | 73 | <div class="cabinet__body-item"> |
74 | <div class="cabinet__filters"> | 74 | <div class="cabinet__filters"> |
75 | <div class="cabinet__filters-item"> | 75 | <div class="cabinet__filters-item"> |
76 | <form class="search" action="{{ route('employer.favorites') }}"> | 76 | <form class="search" action="{{ route('employer.favorites') }}"> |
77 | <input type="search" name="search" id="search" class="input" placeholder="Поиск…" value="@if ((isset($_GET['search'])) && (!empty($_GET['search']))) {{ $_GET['search'] }} @endif"> | 77 | <input type="search" name="search" id="search" class="input" placeholder="Поиск…" value="@if ((isset($_GET['search'])) && (!empty($_GET['search']))) {{ $_GET['search'] }} @endif"> |
78 | <button type="submit" class="button">Найти</button> | 78 | <button type="submit" class="button">Найти</button> |
79 | <span> | 79 | <span> |
80 | <svg> | 80 | <svg> |
81 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 81 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
82 | </svg> | 82 | </svg> |
83 | </span> | 83 | </span> |
84 | </form> | 84 | </form> |
85 | </div> | 85 | </div> |
86 | <!--<div class="cabinet__filters-item"> | 86 | <!--<div class="cabinet__filters-item"> |
87 | <div class="select"> | 87 | <div class="select"> |
88 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 88 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
89 | <option value="default">Сортировка (по умолчанию)</option> | 89 | <option value="default">Сортировка (по умолчанию)</option> |
90 | <option value="name (asc)">По имени (возрастание)</option> | 90 | <option value="name (asc)">По имени (возрастание)</option> |
91 | <option value="name (desc)">По имени (убывание)</option> | 91 | <option value="name (desc)">По имени (убывание)</option> |
92 | <option value="created_at (asc)">По дате (возрастание)</option> | 92 | <option value="created_at (asc)">По дате (возрастание)</option> |
93 | <option value="created_at (desc)">По дате (убывание)</option> | 93 | <option value="created_at (desc)">По дате (убывание)</option> |
94 | </select> | 94 | </select> |
95 | </div> | 95 | </div> |
96 | </div>--> | 96 | </div>--> |
97 | </div> | 97 | </div> |
98 | <div class="cvs"> | 98 | <div class="cvs"> |
99 | <!--<button type="button" class="cvs__button js-toggle js-parent-toggle button button_light button_more"> | 99 | <!--<button type="button" class="cvs__button js-toggle js-parent-toggle button button_light button_more"> |
100 | <span>Показать ещё</span> | 100 | <span>Показать ещё</span> |
101 | <span>Скрыть</span> | 101 | <span>Скрыть</span> |
102 | </button>--> | 102 | </button>--> |
103 | @if ((isset($Workers) && ($Workers->count()))) | 103 | @if ((isset($Workers) && ($Workers->count()))) |
104 | @foreach ($Workers as $it) | 104 | @foreach ($Workers as $it) |
105 | <div class="cvs__body"> | 105 | <div class="cvs__body"> |
106 | <div class="cvs__item"> | 106 | <div class="cvs__item"> |
107 | <button type="button" id="elem_{{ $it->id }}" data-val="{{ $it->id }}" class="like cvs__item-like js_box_favorit js-toggle {{ \App\Classes\LikesClass::get_status_worker($it) }}"> | 107 | <button type="button" id="elem_{{ $it->id }}" data-val="{{ $it->id }}" class="like cvs__item-like js_box_favorit js-toggle {{ \App\Classes\LikesClass::get_status_worker($it) }}"> |
108 | <svg> | 108 | <svg> |
109 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 109 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
110 | </svg> | 110 | </svg> |
111 | </button> | 111 | </button> |
112 | <div class="cvs__item-photo"> | 112 | <div class="cvs__item-photo"> |
113 | <svg> | 113 | <svg> |
114 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | 114 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
115 | </svg> | 115 | </svg> |
116 | @if (!empty($it->photo)) | 116 | @if (!empty($it->photo)) |
117 | <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($it->photo)) }}" alt=""> | ||
118 | @else | ||
119 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | ||
120 | @endif | ||
117 | <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($it->photo)) }}" alt=""> | 121 | </div> |
118 | @else | 122 | <div class="cvs__item-text"> |
119 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 123 | <div> |
120 | @endif | 124 | Статус |
121 | </div> | 125 | <span>@if ($it->status_work == 0) Ищу работу |
122 | <div class="cvs__item-text"> | 126 | @elseif ($it->status_work == 1) Не указано |
123 | <div> | 127 | @elseif ($it->status_work == 2) Не ищу |
124 | Статус | 128 | @endif |
125 | <span>@if ($it->status_work == 0) Ищу работу | 129 | </span> |
126 | @elseif ($it->status_work == 1) Не указано | 130 | </div> |
127 | @elseif ($it->status_work == 2) Не ищу | 131 | <div> |
128 | @endif | 132 | Имя кандидата |
129 | </span> | 133 | <span>({{ $it->id }}) @if (isset($it->users)) {{ $it->users->surname." ".$it->users->name_man." ".$it->users->surname2." (".$it->users->id.")" }} @endif</span> |
130 | </div> | 134 | </div> |
131 | <div> | 135 | |
132 | Имя кандидата | 136 | @if (!empty($it->telephone)) |
133 | <span>({{ $it->id }}) @if (isset($it->users)) {{ $it->users->surname." ".$it->users->name_man." ".$it->users->surname2." (".$it->users->id.")" }} @endif</span> | 137 | <div> |
134 | </div> | 138 | Номер телефона |
135 | 139 | <a href="tel:{{ $it->telephone }}">{{ $it->telephone }}</a> | |
136 | @if (!empty($it->telephone)) | 140 | </div> |
137 | <div> | 141 | @endif |
138 | Номер телефона | 142 | |
139 | <a href="tel:{{ $it->telephone }}">{{ $it->telephone }}</a> | 143 | @if (!empty($it->telephone2)) |
140 | </div> | 144 | <div> |
141 | @endif | 145 | Номер телефона2 |
142 | 146 | <a href="tel:{{ $it->telephone2 }}">{{ $it->telephone2 }}</a> | |
143 | @if (!empty($it->telephone2)) | 147 | </div> |
144 | <div> | 148 | @endif |
145 | Номер телефона2 | 149 | @if (!empty($it->email)) |
146 | <a href="tel:{{ $it->telephone2 }}">{{ $it->telephone2 }}</a> | 150 | <div> |
147 | </div> | 151 | Электронный адрес |
148 | @endif | 152 | <a href="emailto: {{ $it->email }}">{{ $it->email }}</a> |
149 | @if (!empty($it->email)) | 153 | </div> |
150 | <div> | 154 | @endif |
151 | Электронный адрес | 155 | @if (!empty($it->city)) |
152 | <a href="emailto: {{ $it->email }}">{{ $it->email }}</a> | 156 | <div> |
153 | </div> | 157 | Город проживания |
154 | @endif | 158 | <span>{{ $it->city }}, {{ $it->address }}</span> |
155 | @if (!empty($it->city)) | 159 | </div> |
156 | <div> | 160 | @endif |
157 | Город проживания | 161 | |
158 | <span>{{ $it->city }}, {{ $it->address }}</span> | 162 | <div> |
159 | </div> | 163 | Опыт работы на танкерах |
160 | @endif | 164 | <span>@if (!empty($it->experience)) {{ $it->experience }} @else 0 @endif годов (лет).</span> |
161 | 165 | </div> | |
162 | <div> | 166 | </div> |
163 | Опыт работы на танкерах | 167 | <div class="cvs__item-button"> |
164 | <span>@if (!empty($it->experience)) {{ $it->experience }} @else 0 @endif годов (лет).</span> | 168 | <a href="{{ route('resume_profile', ['worker' => $it->id]) }}" class="button">Перейти к профилю</a> |
165 | </div> | 169 | </div> |
166 | </div> | 170 | </div> |
167 | <div class="cvs__item-button"> | 171 | </div> |
168 | <a href="{{ route('resume_profile', ['worker' => $it->id]) }}" class="button">Перейти к профилю</a> | 172 | @endforeach |
169 | </div> | 173 | </div> |
170 | </div> | 174 | @else |
171 | </div> | 175 | <div class="notify"> |
172 | @endforeach | 176 | <svg> |
173 | </div> | 177 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> |
174 | @else | 178 | </svg> |
175 | <div class="notify"> | 179 | <span>Нет избранных кандидатов</span> |
176 | <svg> | 180 | </div> |
177 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> | 181 | @endif |
178 | </svg> | 182 | </div> |
179 | <span>Нет избранных кандидатов</span> | 183 | </div> |
180 | </div> | 184 | </div> |
181 | @endif | 185 | </div> |
182 | </div> | 186 | |
183 | </div> | 187 | </section> |
184 | </div> | 188 | </div> |
185 | </div> | 189 | @endsection |
186 | 190 |
resources/views/employers/fly-flot.blade.php
1 | @extends('layout.frontend', ['title' => 'Мой флот - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Мой флот - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> | 4 | <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> |
5 | <script> | 5 | <script> |
6 | ClassicEditor | 6 | ClassicEditor |
7 | .create( document.querySelector( '#txtarea' ) ) | 7 | .create( document.querySelector( '#txtarea' ) ) |
8 | .catch( error => { | 8 | .catch( error => { |
9 | console.error( error ); | 9 | console.error( error ); |
10 | } ); | 10 | } ); |
11 | </script> | 11 | </script> |
12 | @endsection | 12 | @endsection |
13 | @section('content') | 13 | @section('content') |
14 | <section class="cabinet"> | 14 | <section class="cabinet"> |
15 | <div class="container"> | 15 | <div class="container"> |
16 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 16 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
17 | <li><a href="{{ route('index') }}">Главная</a></li> | 17 | <li><a href="{{ route('index') }}">Главная</a></li> |
18 | <li><b>Личный кабинет</b></li> | 18 | <li><b>Личный кабинет</b></li> |
19 | </ul> | 19 | </ul> |
20 | <div class="cabinet__wrapper"> | 20 | <div class="cabinet__wrapper"> |
21 | <div class="cabinet__side"> | 21 | <div class="cabinet__side"> |
22 | <div class="cabinet__side-toper"> | 22 | <div class="cabinet__side-toper"> |
23 | @include('employers.emblema') | 23 | @include('employers.emblema') |
24 | </div> | 24 | </div> |
25 | 25 | ||
26 | @include('employers.menu', ['item' => 12]) | 26 | @include('employers.menu', ['item' => 12]) |
27 | 27 | ||
28 | </div> | 28 | </div> |
29 | <div class="cabinet__body"> | 29 | <div class="cabinet__body"> |
30 | @include('messages_error') | 30 | @include('messages_error') |
31 | 31 | ||
32 | <div class="cabinet__body-item"> | 32 | <div class="cabinet__body-item"> |
33 | <div class="cabinet__descr"> | 33 | <div class="cabinet__descr"> |
34 | <h2 class="title cabinet__title">Мой флот</h2> | 34 | <h2 class="title cabinet__title">Мой флот</h2> |
35 | </div> | 35 | </div> |
36 | 36 | ||
37 | <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> | 37 | <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> |
38 | @csrf | 38 | @csrf |
39 | <label class="cabinet__add-pic" style="vertical-align: top"> | 39 | <label class="cabinet__add-pic" style="vertical-align: top"> |
40 | <input type="file" name="image" id="image"> | 40 | <input type="file" name="image" id="image"> |
41 | @error('image') | 41 | @error('image') |
42 | <span class="text-xs text-red-600"> | 42 | <span class="text-xs text-red-600"> |
43 | {{ $message }} | 43 | {{ $message }} |
44 | </span> | 44 | </span> |
45 | @enderror | 45 | @enderror |
46 | <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> | 46 | <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> |
47 | <svg> | 47 | <svg> |
48 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | 48 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
49 | </svg> | 49 | </svg> |
50 | <span> | 50 | <span> |
51 | <svg> | 51 | <svg> |
52 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | 52 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |
53 | </svg> | 53 | </svg> |
54 | Загрузить фото | 54 | Загрузить фото |
55 | </span> | 55 | </span> |
56 | </label> | 56 | </label> |
57 | 57 | ||
58 | <div class="cabinet__add-body"> | 58 | <div class="cabinet__add-body"> |
59 | <div class="form-group"> | 59 | <div class="form-group"> |
60 | <label class="form-group__label">Название</label> | 60 | <label class="form-group__label">Название</label> |
61 | <div class="form-group__item"> | 61 | <div class="form-group__item"> |
62 | <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> | 62 | <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> |
63 | @error('name') | 63 | @error('name') |
64 | <span class="text-xs text-red-600"> | 64 | <span class="text-xs text-red-600"> |
65 | {{ $message }} | 65 | {{ $message }} |
66 | </span> | 66 | </span> |
67 | @enderror | 67 | @enderror |
68 | </div> | 68 | </div> |
69 | </div> | 69 | </div> |
70 | <div class="form-group" style="display:none"> | 70 | <div class="form-group" style="display:none"> |
71 | <label class="form-group__label">Описание</label> | 71 | <label class="form-group__label">Описание</label> |
72 | <div class="form-group__item"> | 72 | <div class="form-group__item"> |
73 | <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." value="True info"> | 73 | <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." value="True info"> |
74 | @error('text') | 74 | @error('text') |
75 | <span class="text-xs text-red-600"> | 75 | <span class="text-xs text-red-600"> |
76 | {{ $message }} | 76 | {{ $message }} |
77 | </span> | 77 | </span> |
78 | @enderror | 78 | @enderror |
79 | </div> | 79 | </div> |
80 | </div> | 80 | </div> |
81 | <div class="form-group" style="display:none"> | 81 | <div class="form-group" style="display:none"> |
82 | <label class="form-group__label">Регион</label> | 82 | <label class="form-group__label">Регион</label> |
83 | <div class="form-group__item"> | 83 | <div class="form-group__item"> |
84 | <input type="text" name="region" id="region" class="input" placeholder="Мурманск" value="True Region"> | 84 | <input type="text" name="region" id="region" class="input" placeholder="Мурманск" value="True Region"> |
85 | @error('region') | 85 | @error('region') |
86 | <span class="text-xs text-red-600"> | 86 | <span class="text-xs text-red-600"> |
87 | {{ $message }} | 87 | {{ $message }} |
88 | </span> | 88 | </span> |
89 | @enderror | 89 | @enderror |
90 | </div> | 90 | </div> |
91 | </div> | 91 | </div> |
92 | <div class="form-group" style="display:none"> | 92 | <div class="form-group" style="display:none"> |
93 | <label class="form-group__label">Мощность</label> | 93 | <label class="form-group__label">Мощность</label> |
94 | <div class="form-group__item"> | 94 | <div class="form-group__item"> |
95 | <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" value="Power"> | 95 | <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" value="Power"> |
96 | @error('power') | 96 | @error('power') |
97 | <span class="text-xs text-red-600"> | 97 | <span class="text-xs text-red-600"> |
98 | {{ $message }} | 98 | {{ $message }} |
99 | </span> | 99 | </span> |
100 | @enderror | 100 | @enderror |
101 | </div> | 101 | </div> |
102 | </div> | 102 | </div> |
103 | <div class="form-group"> | 103 | <div class="form-group"> |
104 | <label class="form-group__label">DWT</label> | 104 | <label class="form-group__label">DWT</label> |
105 | <div class="form-group__item"> | 105 | <div class="form-group__item"> |
106 | <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т"> | 106 | <input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т"> |
107 | @error('DWT') | 107 | @error('DWT') |
108 | <span class="text-xs text-red-600"> | 108 | <span class="text-xs text-red-600"> |
109 | {{ $message }} | 109 | {{ $message }} |
110 | </span> | 110 | </span> |
111 | @enderror | 111 | @enderror |
112 | </div> | 112 | </div> |
113 | </div> | 113 | </div> |
114 | <div class="form-group"> | 114 | <div class="form-group"> |
115 | <label class="form-group__label">Мощность ГД (кВт)</label> | 115 | <label class="form-group__label">Мощность ГД (кВт)</label> |
116 | <div class="form-group__item"> | 116 | <div class="form-group__item"> |
117 | <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт"> | 117 | <input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт"> |
118 | @error('POWER_GD') | 118 | @error('POWER_GD') |
119 | <span class="text-xs text-red-600"> | 119 | <span class="text-xs text-red-600"> |
120 | {{ $message }} | 120 | {{ $message }} |
121 | </span> | 121 | </span> |
122 | @enderror | 122 | @enderror |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | <div class="form-group" style=""> | 125 | <div class="form-group" style=""> |
126 | <label class="form-group__label">IMO</label> | 126 | <label class="form-group__label">IMO</label> |
127 | <div class="form-group__item"> | 127 | <div class="form-group__item"> |
128 | <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275" value=""> | 128 | <input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275" value=""> |
129 | @error('IMO') | 129 | @error('IMO') |
130 | <span class="text-xs text-red-600"> | 130 | <span class="text-xs text-red-600"> |
131 | {{ $message }} | 131 | {{ $message }} |
132 | </span> | 132 | </span> |
133 | @enderror | 133 | @enderror |
134 | </div> | 134 | </div> |
135 | </div> | 135 | </div> |
136 | <button type="submit" class="button" id="ajax_flot_" name="ajax_flot_">Добавить флот</button> | 136 | <button type="submit" class="button" id="ajax_flot_" name="ajax_flot_">Добавить флот</button> |
137 | </div> | 137 | </div> |
138 | 138 | ||
139 | </form> | 139 | </form> |
140 | 140 | ||
141 | <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> | 141 | <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> |
142 | @if (isset($Employer[0]->flots)) | 142 | @if (isset($Employer[0]->flots)) |
143 | @if ($Employer[0]->flots->count()) | 143 | @if ($Employer[0]->flots->count()) |
144 | @foreach ($Employer[0]->flots as $it) | 144 | @foreach ($Employer[0]->flots as $it) |
145 | <div class="cabinet__fleet-item main__employer-page-one-item"> | 145 | <div class="cabinet__fleet-item main__employer-page-one-item"> |
146 | <div style="margin-bottom: -10px"> | ||
146 | <div style="margin-bottom: -10px"> | 147 | <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> |
147 | <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> | 148 | <svg> |
148 | <svg> | 149 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
149 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 150 | </svg> |
150 | </svg> | 151 | </a> |
152 | <a href="{{ route('employer.edit_flot', ['Flot' => $it->id, 'Employer' => $Employer[0]->id]) }}" class="del die_black" style="margin-left: 40px"> | ||
153 | <svg> | ||
154 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | ||
155 | </svg> | ||
156 | </a> | ||
157 | </div> | ||
151 | </a> | 158 | @if (!empty($it->image)) |
152 | <a href="{{ route('employer.edit_flot', ['Flot' => $it->id, 'Employer' => $Employer[0]->id]) }}" class="del die_black" style="margin-left: 40px"> | 159 | <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> |
153 | <svg> | 160 | @else |
154 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | 161 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> |
155 | </svg> | 162 | @endif |
156 | </a> | 163 | <b>{{ $it->name }}</b> |
157 | </div> | 164 | <!--<span> $it->region }}</span>--> |
158 | @if (!empty($it->image)) | 165 | <span><i>DWT</i>{{ $it->DWT }}</span> |
159 | <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> | 166 | |
160 | @else | 167 | <span><i>Мощность ГД (кВт)</i>{{ $it->POWER_GD }}</span> |
161 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> | 168 | |
162 | @endif | 169 | <span><i>IMO</i>{{ $it->IMO }}</span> |
163 | <b>{{ $it->name }}</b> | 170 | <!--<span> $it->power }}</span>--> |
164 | <!--<span> $it->region }}</span>--> | 171 | </div> |
165 | <span><i>DWT</i>{{ $it->DWT }}</span> | 172 | @endforeach |
166 | 173 | @endif | |
167 | <span><i>Мощность ГД (кВт)</i>{{ $it->POWER_GD }}</span> | 174 | @endif |
168 | 175 | </div> | |
169 | <span><i>IMO</i>{{ $it->IMO }}</span> | 176 | </div> |
170 | <!--<span> $it->power }}</span>--> | 177 | </div> |
171 | </div> | 178 | </div> |
172 | @endforeach | 179 | </div> |
173 | @endif | 180 | </section> |
174 | @endif | 181 | </div> |
175 | </div> | 182 | <!-- END TOP WRAPPER --> |
176 | </div> | 183 | @endsection |
177 | </div> | 184 |
resources/views/layout/pdf-list-people.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="ru"> | 2 | <html lang="ru"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>Резюме соискателя</title> | 6 | <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 | 9 | ||
10 | <!--<link rel="stylesheet" href=" asset('css/style.css') }}">--> | 10 | <!--<link rel="stylesheet" href=" asset('css/style.css') }}">--> |
11 | 11 | ||
12 | <style> | 12 | <style> |
13 | body { | 13 | body { |
14 | font-family:'DejaVu Sans',sans-serif; | 14 | font-family:'DejaVu Sans',sans-serif; |
15 | background:#fff; | 15 | background:#fff; |
16 | font-size:1.6rem; | 16 | font-size:1.6rem; |
17 | font-weight:400; | 17 | font-weight:400; |
18 | color:#363A3F; | 18 | color:#363A3F; |
19 | } | 19 | } |
20 | 20 | ||
21 | .main { | 21 | .main { |
22 | padding: 30px 0; | 22 | padding: 30px 0; |
23 | } | 23 | } |
24 | 24 | ||
25 | .thing { | 25 | .thing { |
26 | color: #3a3b3c; | 26 | color: #3a3b3c; |
27 | /* background-color: #f2f5fc; */ | 27 | /* background-color: #f2f5fc; */ |
28 | } | 28 | } |
29 | 29 | ||
30 | .thing__profile { | 30 | .thing__profile { |
31 | 31 | ||
32 | } | 32 | } |
33 | 33 | ||
34 | .thing__profile-photo { | 34 | .thing__profile-photo { |
35 | width: 200px; | 35 | width: 200px; |
36 | border-radius: 8px; | 36 | border-radius: 8px; |
37 | float: left; | 37 | float: left; |
38 | margin-right: 20px; | 38 | margin-right: 20px; |
39 | } | 39 | } |
40 | 40 | ||
41 | .thing__profile-body { | 41 | .thing__profile-body { |
42 | 42 | ||
43 | } | 43 | } |
44 | 44 | ||
45 | .thing__title { | 45 | .thing__title { |
46 | width: 100%; | 46 | width: 100%; |
47 | font-size: 32px; | 47 | font-size: 32px; |
48 | font-weight: 700; | 48 | font-weight: 700; |
49 | line-height: 1.1; | 49 | line-height: 1.1; |
50 | margin: 0; | 50 | margin: 0; |
51 | } | 51 | } |
52 | 52 | ||
53 | .thing__text { | 53 | .thing__text { |
54 | font-size: 14px; | 54 | font-size: 14px; |
55 | line-height: 1.4; | 55 | line-height: 1.4; |
56 | margin: 15px 0 0 0; | 56 | margin: 15px 0 0 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | .main__spoiler { | 59 | .main__spoiler { |
60 | margin: 0px 0px 32px 0px; | 60 | margin: 0px 0px 32px 0px; |
61 | } | 61 | } |
62 | 62 | ||
63 | .main__spoiler-body { | 63 | .main__spoiler-body { |
64 | 64 | ||
65 | } | 65 | } |
66 | 66 | ||
67 | .main__table { | 67 | .main__table { |
68 | border-collapse: collapse; | 68 | border-collapse: collapse; |
69 | table-layout: fixed; | 69 | table-layout: fixed; |
70 | font-size: 14px; | 70 | font-size: 14px; |
71 | width: 100%; | 71 | width: 100%; |
72 | background: #ffffff; | 72 | background: #ffffff; |
73 | } | 73 | } |
74 | 74 | ||
75 | .main__table thead { | 75 | .main__table thead { |
76 | color: #ffffff; | 76 | color: #ffffff; |
77 | font-size: 16px; | 77 | font-size: 16px; |
78 | background-color: #377d87; | 78 | background-color: #377d87; |
79 | } | 79 | } |
80 | 80 | ||
81 | .main__table th { | 81 | .main__table th { |
82 | padding: 8px 16px; | 82 | padding: 8px 16px; |
83 | } | 83 | } |
84 | 84 | ||
85 | .main__table td { | 85 | .main__table td { |
86 | width: 40%; | 86 | width: 40%; |
87 | padding: 8px 16px; | 87 | padding: 8px 16px; |
88 | border: 1px solid #cecece; | 88 | border: 1px solid #cecece; |
89 | } | 89 | } |
90 | 90 | ||
91 | .main__table td b { | 91 | .main__table td b { |
92 | font-weight: 700; | 92 | font-weight: 700; |
93 | } | 93 | } |
94 | 94 | ||
95 | .main__table b { | 95 | .main__table b { |
96 | display: block; | 96 | display: block; |
97 | } | 97 | } |
98 | 98 | ||
99 | .main__table a { | 99 | .main__table a { |
100 | color: #377d87; | 100 | color: #377d87; |
101 | text-decoration: underline; | 101 | text-decoration: underline; |
102 | } | 102 | } |
103 | 103 | ||
104 | .main__table td + td { | 104 | .main__table td + td { |
105 | width: 60%; | 105 | width: 60%; |
106 | } | 106 | } |
107 | 107 | ||
108 | .main__table_three td { | 108 | .main__table_three td { |
109 | width: 25% !important; | 109 | width: 25% !important; |
110 | } | 110 | } |
111 | 111 | ||
112 | .main__table_three td:last-child { | 112 | .main__table_three td:last-child { |
113 | width: 50% !important; | 113 | width: 50% !important; |
114 | } | 114 | } |
115 | 115 | ||
116 | .main h2 { | 116 | .main h2 { |
117 | margin: 0; | 117 | margin: 0; |
118 | font-weight: 700; | 118 | font-weight: 700; |
119 | font-size: 30px; | 119 | font-size: 30px; |
120 | } | 120 | } |
121 | 121 | ||
122 | .main p { | 122 | .main p { |
123 | margin: 0; | 123 | margin: 0; |
124 | font-size: 14px; | 124 | font-size: 14px; |
125 | line-height: 1.4; | 125 | line-height: 1.4; |
126 | margin: 15px 0 0 0; | 126 | margin: 15px 0 0 0; |
127 | } | 127 | } |
128 | 128 | ||
129 | .main__resume-profile-info { | 129 | .main__resume-profile-info { |
130 | margin: 30px 0px 0px 0px; | 130 | margin: 30px 0px 0px 0px; |
131 | } | 131 | } |
132 | 132 | ||
133 | .main__resume-profile-info-title { | 133 | .main__resume-profile-info-title { |
134 | margin-bottom: 20px !important; | 134 | margin-bottom: 20px !important; |
135 | color: #3a3b3c; | 135 | color: #3a3b3c; |
136 | } | 136 | } |
137 | 137 | ||
138 | .main__resume-profile-info-body-item { | 138 | .main__resume-profile-info-body-item { |
139 | margin: 0px 0px 20px 0px; | 139 | margin: 0px 0px 20px 0px; |
140 | } | 140 | } |
141 | 141 | ||
142 | .main__resume-profile-info-body-subtitle { | 142 | .main__resume-profile-info-body-subtitle { |
143 | color: #4d88d9; | 143 | color: #4d88d9; |
144 | margin: 0px 0px 10px 0px; | 144 | margin: 0px 0px 10px 0px; |
145 | font-weight: 700; | 145 | font-weight: 700; |
146 | font-size: 22px; | 146 | font-size: 22px; |
147 | } | 147 | } |
148 | 148 | ||
149 | .main__resume-profile-info-body-inner { | 149 | .main__resume-profile-info-body-inner { |
150 | margin: 0; | 150 | margin: 0; |
151 | padding: 0; | 151 | padding: 0; |
152 | font-size: 12px; | 152 | font-size: 12px; |
153 | } | 153 | } |
154 | 154 | ||
155 | .main__resume-profile-info-body-inner li { | 155 | .main__resume-profile-info-body-inner li { |
156 | list-style-type: none; | 156 | list-style-type: none; |
157 | margin: 0px 0px 20px 0px; | 157 | margin: 0px 0px 20px 0px; |
158 | } | 158 | } |
159 | 159 | ||
160 | .main__resume-profile-info-body-inner b { | 160 | .main__resume-profile-info-body-inner b { |
161 | display: block; | 161 | display: block; |
162 | margin: 0px 0px 6px 0px; | 162 | margin: 0px 0px 6px 0px; |
163 | color: #377d87; | 163 | color: #377d87; |
164 | font-size: 14px; | 164 | font-size: 14px; |
165 | } | 165 | } |
166 | 166 | ||
167 | .main__resume-profile-info-body-inner span { | 167 | .main__resume-profile-info-body-inner span { |
168 | display: block; | 168 | display: block; |
169 | } | 169 | } |
170 | 170 | ||
171 | .main__resume-profile-info-body-inner a { | 171 | .main__resume-profile-info-body-inner a { |
172 | display: block; | 172 | display: block; |
173 | text-decoration: none; | 173 | text-decoration: none; |
174 | color: inherit; | 174 | color: inherit; |
175 | } | 175 | } |
176 | 176 | ||
177 | </style> | 177 | </style> |
178 | </head> | 178 | </head> |
179 | 179 | ||
180 | <body id="body" class="pdf"> | 180 | <body id="body" class="pdf"> |
181 | @if (count($Query) > 0) | 181 | @if (count($Query) > 0) |
182 | @foreach ($Query as $Q) | 182 | @foreach ($Query as $Q) |
183 | <section class="thing thing_pdf"> | 183 | <section class="thing thing_pdf"> |
184 | <div class="container"> | 184 | <div class="container"> |
185 | <div class="thing__profile"> | 185 | <div class="thing__profile"> |
186 | @if (!empty($Q['photo'])) | 186 | @if (!empty($Q['photo'])) |
187 | <img src="{{ asset(Storage::url($Q['photo'])) }}" alt="" class="thing__profile-photo"> | 187 | <img src="{{ asset(Storage::url($Q['photo'])) }}" alt="" class="thing__profile-photo"> |
188 | @else | 188 | @else |
189 | <img src="{{ asset('images/default_man.jpg') }}" alt="" class="thing__profile-photo"> | 189 | <img src="{{ asset('images/default_man.jpg') }}" alt="" class="thing__profile-photo"> |
190 | @endif | 190 | @endif |
191 | <div class="thing__profile-body"> | 191 | <div class="thing__profile-body"> |
192 | <h1 class="thing__title">@if (isset($Q['users']['surname'])) {{ $Q['users']['surname']." ".$Q['users']['name_man']." ".$Q['users']['surname2'] }} @endif</h1> | 192 | <h1 class="thing__title">@if (isset($Q['users']['surname'])) {{ $Q['users']['surname']." ".$Q['users']['name_man']." ".$Q['users']['surname2'] }} @endif</h1> |
193 | <div style="clear:both;"></div> | 193 | <div style="clear:both;"></div> |
194 | <p class="thing__text">{{ $Q['text'] }}</p> | 194 | <p class="thing__text">{{ $Q['text'] }}</p> |
195 | </div> | 195 | </div> |
196 | </div> | 196 | </div> |
197 | @if (!empty($Q['users']['file'])) | 197 | @if (!empty($Q['users']['file'])) |
198 | <a href="{{ asset(Storage::url($Q['users']['file'])) }}">Анкета-файл</a> | 198 | <a href="{{ asset(Storage::url($Q['users']['file'])) }}">Анкета-файл</a> |
199 | @endif | 199 | @endif |
200 | </div> | 200 | </div> |
201 | </section> | 201 | </section> |
202 | 202 | ||
203 | <main class="main"> | 203 | <main class="main"> |
204 | <div class="container"> | 204 | <div class="container"> |
205 | 205 | ||
206 | <!--php dd($Query); endphp--> | 206 | <!--php dd($Query); endphp--> |
207 | 207 | ||
208 | <div class="main__resume-profile"> | 208 | <div class="main__resume-profile"> |
209 | <div class="main__content"> | 209 | <div class="main__content"> |
210 | <div class="main__spoiler"> | 210 | <div class="main__spoiler"> |
211 | 211 | ||
212 | <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная | 212 | <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная |
213 | информация</button> --> | 213 | информация</button> --> |
214 | <div class="main__spoiler-body"> | 214 | <div class="main__spoiler-body"> |
215 | <table class="main__table"> | 215 | <table class="main__table"> |
216 | <thead> | 216 | <thead> |
217 | <tr> | 217 | <tr> |
218 | <th colspan="2">Основная информация</th> | 218 | <th colspan="2">Основная информация</th> |
219 | </tr> | 219 | </tr> |
220 | </thead> | 220 | </thead> |
221 | <tbody> | 221 | <tbody> |
222 | <tr> | 222 | <tr> |
223 | <td>Имя:</td> | 223 | <td>Имя:</td> |
224 | <td><b>@if (isset($Q['users']['name_man'])) {{ $Q['users']['name_man'] }} @endif</b></td> | 224 | <td><b>@if (isset($Q['users']['name_man'])) {{ $Q['users']['name_man'] }} @endif</b></td> |
225 | </tr> | 225 | </tr> |
226 | <tr> | 226 | <tr> |
227 | <td>Должность:</td> | 227 | <td>Должность:</td> |
228 | <td> | 228 | <td> |
229 | @foreach ($Q['job_titles'] as $it) | 229 | @foreach ($Q['job_titles'] as $it) |
230 | <b>{{ $it['name'] }}</b><br> | 230 | <b>{{ $it['name'] }}</b><br> |
231 | @endforeach | 231 | @endforeach |
232 | </td> | 232 | </td> |
233 | </tr> | 233 | </tr> |
234 | <tr> | 234 | <tr> |
235 | <td>Телефон:</td> | 235 | <td>Телефон:</td> |
236 | <td><b><a>{{ $Q['telephone'] }}</a></b> | 236 | <td><b><a>{{ $Q['telephone'] }}</a></b> |
237 | <b><a>{{ $Q['telephone2'] }}</a></b> | 237 | <b><a>{{ $Q['telephone2'] }}</a></b> |
238 | </td> | 238 | </td> |
239 | </tr> | 239 | </tr> |
240 | <tr> | 240 | <tr> |
241 | <td>E-mail:</td> | 241 | <td>E-mail:</td> |
242 | <td><b><a>{{ $Q['email'] }}</a></b></td> | 242 | <td><b><a>{{ $Q['email'] }}</a></b></td> |
243 | </tr> | 243 | </tr> |
244 | <tr> | 244 | <tr> |
245 | <td>Возраст:</td> | 245 | <td>Возраст:</td> |
246 | <td><b>{{ $Q['old_year'] }}</b></td> | 246 | <td><b>{{ $Q['old_year'] }}</b></td> |
247 | </tr> | 247 | </tr> |
248 | <tr> | 248 | <tr> |
249 | <td>Статус:</td> | 249 | <td>Статус:</td> |
250 | <td> | 250 | <td> |
251 | @php $code = $Q['status_work']; @endphp | 251 | @php $code = $Q['status_work']; @endphp |
252 | <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td> | 252 | <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td> |
253 | </tr> | 253 | </tr> |
254 | <tr> | 254 | <tr> |
255 | <td>Город проживания:</td> | 255 | <td>Город проживания:</td> |
256 | <td><b>{{ $Q['city'] }}</b></td> | 256 | <td><b>{{ $Q['city'] }}</b></td> |
257 | </tr> | 257 | </tr> |
258 | <tr> | 258 | <tr> |
259 | <td>Уровень английского:</td> | 259 | <td>Уровень английского:</td> |
260 | <td><b>{{ $Q['en_is'] }}</b></td> | 260 | <td><b>{{ $Q['en_is'] }}</b></td> |
261 | </tr> | 261 | </tr> |
262 | <tr> | 262 | <tr> |
263 | <td>Опыт работы:</td> | 263 | <td>Опыт работы:</td> |
264 | <td><b>{{ $Q['old_year'] }}</b></td> | 264 | <td><b>{{ $Q['old_year'] }}</b></td> |
265 | </tr> | 265 | </tr> |
266 | </tbody> | 266 | </tbody> |
267 | </table> | 267 | </table> |
268 | </div> | 268 | </div> |
269 | </div> | 269 | </div> |
270 | <div class="main__spoiler"> | 270 | <div class="main__spoiler"> |
271 | <div class="main__spoiler-body"> | 271 | <div class="main__spoiler-body"> |
272 | <table class="main__table"> | 272 | <table class="main__table"> |
273 | <thead> | 273 | <thead> |
274 | <tr> | 274 | <tr> |
275 | <th colspan="2">Сертификаты / документы</th> | 275 | <th colspan="2">Сертификаты / документы</th> |
276 | </tr> | 276 | </tr> |
277 | </thead> | 277 | </thead> |
278 | <tbody> | 278 | <tbody> |
279 | @if (count($Q['sertificate'])) | 279 | @if (count($Q['sertificate'])) |
280 | @foreach($Q['sertificate'] as $it) | 280 | @foreach($Q['sertificate'] as $it) |
281 | <tr> | 281 | <tr> |
282 | <td>{{ $it['name']." ".$it['education'] }}</td> | 282 | <td>{{ $it['name']." ".$it['education'] }}</td> |
283 | <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td> | 283 | <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td> |
284 | </tr> | 284 | </tr> |
285 | @endforeach | 285 | @endforeach |
286 | @else | 286 | @else |
287 | <tr> | 287 | <tr> |
288 | <td> - </td> | 288 | <td> - </td> |
289 | <td> - </td> | 289 | <td> - </td> |
290 | </tr> | 290 | </tr> |
291 | @endif | 291 | @endif |
292 | </tbody> | 292 | </tbody> |
293 | </table> | 293 | </table> |
294 | </div> | 294 | </div> |
295 | </div> | 295 | </div> |
296 | <div class="main__spoiler"> | 296 | <div class="main__spoiler"> |
297 | <div class="main__spoiler-body"> | 297 | <div class="main__spoiler-body"> |
298 | <table class="main__table main__table_three"> | 298 | <table class="main__table main__table_three"> |
299 | <thead> | 299 | <thead> |
300 | <tr> | 300 | <tr> |
301 | <th colspan="3">Опыт работы</th> | 301 | <th colspan="3">Опыт работы</th> |
302 | </tr> | 302 | </tr> |
303 | </thead> | 303 | </thead> |
304 | <tbody> | 304 | <tbody> |
305 | @if (count($Q['place_worker']) > 0) | 305 | @if (count($Q['place_worker']) > 0) |
306 | @foreach($Q['place_worker'] as $it) | 306 | @foreach($Q['place_worker'] as $it) |
307 | <tr> | 307 | <tr> |
308 | <td>{{ $it['begin_work']." - ".$it['end_work'] }} | 308 | <td>{{ $it['begin_work']." - ".$it['end_work'] }} |
309 | </td> | 309 | </td> |
310 | <td><b>{{ $it['name_company'] }}</b> | 310 | <td><b>{{ $it['name_company'] }}</b> |
311 | </td> | 311 | </td> |
312 | <td><b>{{ $it['job_title'] }}</b> | 312 | <td><b>{{ $it['job_title'] }}</b> |
313 | Судно: {{ $it['teplohod'] }} | 313 | Судно: {{ $it['teplohod'] }} |
314 | </td> | 314 | </td> |
315 | </tr> | 315 | </tr> |
316 | @endforeach | 316 | @endforeach |
317 | @endif | 317 | @endif |
318 | </tbody> | 318 | </tbody> |
319 | </table> | 319 | </table> |
320 | </div> | 320 | </div> |
321 | </div> | 321 | </div> |
322 | </div> | 322 | </div> |
323 | <div class="main__resume-profile-about"> | 323 | <div class="main__resume-profile-about"> |
324 | <h2 class="main__resume-profile-about-title">О себе</h2> | 324 | <h2 class="main__resume-profile-about-title">О себе</h2> |
325 | <p class="main__resume-profile-about-text">{{ $Q['text'] }}</p> | 325 | <p class="main__resume-profile-about-text">{{ $Q['text'] }}</p> |
326 | 326 | ||
327 | </div> | 327 | </div> |
328 | <div class="main__resume-profile-info"> | 328 | <div class="main__resume-profile-info"> |
329 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> | 329 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> |
330 | <div class="main__resume-profile-info-body"> | 330 | <div class="main__resume-profile-info-body"> |
331 | @if ((isset($Q['prev_company'])) && (count($Q['prev_company']) > 0)) | 331 | @if ((isset($Q['prev_company'])) && (count($Q['prev_company']) > 0)) |
332 | @foreach ($Q['prev_company'] as $it) | 332 | @foreach ($Q['prev_company'] as $it) |
333 | <div class="main__resume-profile-info-body-item"> | 333 | <div class="main__resume-profile-info-body-item"> |
334 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3> | 334 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3> |
335 | <ul class="main__resume-profile-info-body-inner"> | 335 | <ul class="main__resume-profile-info-body-inner"> |
336 | <li> | 336 | <li> |
337 | <b>Руководитель</b> | 337 | <b>Руководитель</b> |
338 | <span>{{ $it['direct'] }}</span> | 338 | <span>{{ $it['direct'] }}</span> |
339 | </li> | 339 | </li> |
340 | <li> | 340 | <li> |
341 | <b>Телефон того, кто может дать рекомендацию</b> | 341 | <b>Телефон того, кто может дать рекомендацию</b> |
342 | <span> | 342 | <span> |
343 | <a>{{ $it['telephone'] }}</a> | 343 | <a>{{ $it['telephone'] }}</a> |
344 | <a>{{ $it['telephone2'] }}</a> | 344 | <a>{{ $it['telephone2'] }}</a> |
345 | </span> | 345 | </span> |
346 | </li> | 346 | </li> |
347 | </ul> | 347 | </ul> |
348 | </div> | ||
349 | @endforeach | ||
350 | @else | ||
351 | <div class="main__resume-profile-info-body-item"> | ||
352 | <h3 class="main__resume-profile-info-body-subtitle">Не указано</h3> | ||
353 | <ul class="main__resume-profile-info-body-inner"> | ||
354 | <li> | ||
355 | <b>Руководитель</b> | ||
356 | <span>Нет сведений</span> | ||
357 | </li> | ||
358 | <li> | ||
359 | <b>Телефон того, кто может дать рекомендацию</b> | ||
360 | <span> | ||
361 | <a>Нет сведений</a> | ||
362 | </span> | ||
363 | </li> | ||
364 | </ul> | ||
348 | </div> | 365 | </div> |
349 | @endforeach | 366 | |
350 | @else | 367 | @endif |
351 | <div class="main__resume-profile-info-body-item"> | 368 | </div> |
352 | <h3 class="main__resume-profile-info-body-subtitle">Не указано</h3> | 369 | </div> |
353 | <ul class="main__resume-profile-info-body-inner"> | 370 | </div> |
354 | <li> | 371 | |
355 | <b>Руководитель</b> | 372 | </div> |
356 | <span>Нет сведений</span> | 373 | </main> |
357 | </li> | 374 | @endforeach |
358 | <li> | 375 | @endif |
359 | <b>Телефон того, кто может дать рекомендацию</b> | 376 | </body> |
360 | <span> | 377 | </html> |
361 | <a>Нет сведений</a> | 378 |
resources/views/layout/pdf.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="ru"> | 2 | <html lang="ru"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>Резюме соискателя</title> | 6 | <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 | <!--<link rel="stylesheet" href=" asset('css/style.css') }}">--> | 9 | <!--<link rel="stylesheet" href=" asset('css/style.css') }}">--> |
10 | 10 | ||
11 | <style> | 11 | <style> |
12 | body { | 12 | body { |
13 | font-family:'DejaVu Sans',sans-serif; | 13 | font-family:'DejaVu Sans',sans-serif; |
14 | background:#fff; | 14 | background:#fff; |
15 | font-size:1.6rem; | 15 | font-size:1.6rem; |
16 | font-weight:400; | 16 | font-weight:400; |
17 | color:#363A3F; | 17 | color:#363A3F; |
18 | } | 18 | } |
19 | 19 | ||
20 | .main { | 20 | .main { |
21 | padding: 30px 0; | 21 | padding: 30px 0; |
22 | } | 22 | } |
23 | 23 | ||
24 | .thing { | 24 | .thing { |
25 | color: #3a3b3c; | 25 | color: #3a3b3c; |
26 | /* background-color: #f2f5fc; */ | 26 | /* background-color: #f2f5fc; */ |
27 | } | 27 | } |
28 | 28 | ||
29 | .thing__profile { | 29 | .thing__profile { |
30 | 30 | ||
31 | } | 31 | } |
32 | 32 | ||
33 | .thing__profile-photo { | 33 | .thing__profile-photo { |
34 | width: 200px; | 34 | width: 200px; |
35 | border-radius: 8px; | 35 | border-radius: 8px; |
36 | float: left; | 36 | float: left; |
37 | margin-right: 20px; | 37 | margin-right: 20px; |
38 | } | 38 | } |
39 | 39 | ||
40 | .thing__profile-body { | 40 | .thing__profile-body { |
41 | 41 | ||
42 | } | 42 | } |
43 | 43 | ||
44 | .thing__title { | 44 | .thing__title { |
45 | width: 100%; | 45 | width: 100%; |
46 | font-size: 32px; | 46 | font-size: 32px; |
47 | font-weight: 700; | 47 | font-weight: 700; |
48 | line-height: 1.1; | 48 | line-height: 1.1; |
49 | margin: 0; | 49 | margin: 0; |
50 | } | 50 | } |
51 | 51 | ||
52 | .thing__text { | 52 | .thing__text { |
53 | font-size: 14px; | 53 | font-size: 14px; |
54 | line-height: 1.4; | 54 | line-height: 1.4; |
55 | margin: 15px 0 0 0; | 55 | margin: 15px 0 0 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | .main__spoiler { | 58 | .main__spoiler { |
59 | margin: 0px 0px 32px 0px; | 59 | margin: 0px 0px 32px 0px; |
60 | } | 60 | } |
61 | 61 | ||
62 | .main__spoiler-body { | 62 | .main__spoiler-body { |
63 | 63 | ||
64 | } | 64 | } |
65 | 65 | ||
66 | .main__table { | 66 | .main__table { |
67 | border-collapse: collapse; | 67 | border-collapse: collapse; |
68 | table-layout: fixed; | 68 | table-layout: fixed; |
69 | font-size: 14px; | 69 | font-size: 14px; |
70 | width: 100%; | 70 | width: 100%; |
71 | background: #ffffff; | 71 | background: #ffffff; |
72 | } | 72 | } |
73 | 73 | ||
74 | .main__table thead { | 74 | .main__table thead { |
75 | color: #ffffff; | 75 | color: #ffffff; |
76 | font-size: 16px; | 76 | font-size: 16px; |
77 | background-color: #377d87; | 77 | background-color: #377d87; |
78 | } | 78 | } |
79 | 79 | ||
80 | .main__table th { | 80 | .main__table th { |
81 | padding: 8px 16px; | 81 | padding: 8px 16px; |
82 | } | 82 | } |
83 | 83 | ||
84 | .main__table td { | 84 | .main__table td { |
85 | width: 40%; | 85 | width: 40%; |
86 | padding: 8px 16px; | 86 | padding: 8px 16px; |
87 | border: 1px solid #cecece; | 87 | border: 1px solid #cecece; |
88 | } | 88 | } |
89 | 89 | ||
90 | .main__table td b { | 90 | .main__table td b { |
91 | font-weight: 700; | 91 | font-weight: 700; |
92 | } | 92 | } |
93 | 93 | ||
94 | .main__table b { | 94 | .main__table b { |
95 | display: block; | 95 | display: block; |
96 | } | 96 | } |
97 | 97 | ||
98 | .main__table a { | 98 | .main__table a { |
99 | color: #377d87; | 99 | color: #377d87; |
100 | text-decoration: underline; | 100 | text-decoration: underline; |
101 | } | 101 | } |
102 | 102 | ||
103 | .main__table td + td { | 103 | .main__table td + td { |
104 | width: 60%; | 104 | width: 60%; |
105 | } | 105 | } |
106 | 106 | ||
107 | .main__table_three td { | 107 | .main__table_three td { |
108 | width: 25% !important; | 108 | width: 25% !important; |
109 | } | 109 | } |
110 | 110 | ||
111 | .main__table_three td:last-child { | 111 | .main__table_three td:last-child { |
112 | width: 50% !important; | 112 | width: 50% !important; |
113 | } | 113 | } |
114 | 114 | ||
115 | .main h2 { | 115 | .main h2 { |
116 | margin: 0; | 116 | margin: 0; |
117 | font-weight: 700; | 117 | font-weight: 700; |
118 | font-size: 30px; | 118 | font-size: 30px; |
119 | } | 119 | } |
120 | 120 | ||
121 | .main p { | 121 | .main p { |
122 | margin: 0; | 122 | margin: 0; |
123 | font-size: 14px; | 123 | font-size: 14px; |
124 | line-height: 1.4; | 124 | line-height: 1.4; |
125 | margin: 15px 0 0 0; | 125 | margin: 15px 0 0 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | .main__resume-profile-info { | 128 | .main__resume-profile-info { |
129 | margin: 30px 0px 0px 0px; | 129 | margin: 30px 0px 0px 0px; |
130 | } | 130 | } |
131 | 131 | ||
132 | .main__resume-profile-info-title { | 132 | .main__resume-profile-info-title { |
133 | margin-bottom: 20px !important; | 133 | margin-bottom: 20px !important; |
134 | color: #3a3b3c; | 134 | color: #3a3b3c; |
135 | } | 135 | } |
136 | 136 | ||
137 | .main__resume-profile-info-body-item { | 137 | .main__resume-profile-info-body-item { |
138 | margin: 0px 0px 20px 0px; | 138 | margin: 0px 0px 20px 0px; |
139 | } | 139 | } |
140 | 140 | ||
141 | .main__resume-profile-info-body-subtitle { | 141 | .main__resume-profile-info-body-subtitle { |
142 | color: #4d88d9; | 142 | color: #4d88d9; |
143 | margin: 0px 0px 10px 0px; | 143 | margin: 0px 0px 10px 0px; |
144 | font-weight: 700; | 144 | font-weight: 700; |
145 | font-size: 22px; | 145 | font-size: 22px; |
146 | } | 146 | } |
147 | 147 | ||
148 | .main__resume-profile-info-body-inner { | 148 | .main__resume-profile-info-body-inner { |
149 | margin: 0; | 149 | margin: 0; |
150 | padding: 0; | 150 | padding: 0; |
151 | font-size: 12px; | 151 | font-size: 12px; |
152 | } | 152 | } |
153 | 153 | ||
154 | .main__resume-profile-info-body-inner li { | 154 | .main__resume-profile-info-body-inner li { |
155 | list-style-type: none; | 155 | list-style-type: none; |
156 | margin: 0px 0px 20px 0px; | 156 | margin: 0px 0px 20px 0px; |
157 | } | 157 | } |
158 | 158 | ||
159 | .main__resume-profile-info-body-inner b { | 159 | .main__resume-profile-info-body-inner b { |
160 | display: block; | 160 | display: block; |
161 | margin: 0px 0px 6px 0px; | 161 | margin: 0px 0px 6px 0px; |
162 | color: #377d87; | 162 | color: #377d87; |
163 | font-size: 14px; | 163 | font-size: 14px; |
164 | } | 164 | } |
165 | 165 | ||
166 | .main__resume-profile-info-body-inner span { | 166 | .main__resume-profile-info-body-inner span { |
167 | display: block; | 167 | display: block; |
168 | } | 168 | } |
169 | 169 | ||
170 | .main__resume-profile-info-body-inner a { | 170 | .main__resume-profile-info-body-inner a { |
171 | display: block; | 171 | display: block; |
172 | text-decoration: none; | 172 | text-decoration: none; |
173 | color: inherit; | 173 | color: inherit; |
174 | } | 174 | } |
175 | 175 | ||
176 | </style> | 176 | </style> |
177 | </head> | 177 | </head> |
178 | 178 | ||
179 | <body id="body" class="pdf"> | 179 | <body id="body" class="pdf"> |
180 | <section class="thing thing_pdf"> | 180 | <section class="thing thing_pdf"> |
181 | <div class="container"> | 181 | <div class="container"> |
182 | <div class="thing__profile"> | 182 | <div class="thing__profile"> |
183 | @if (!empty($Query[0]['photo'])) | 183 | @if (!empty($Query[0]['photo'])) |
184 | <img src="{{ asset(Storage::url($Query[0]['photo'])) }}" alt="" class="thing__profile-photo"> | 184 | <img src="{{ asset(Storage::url($Query[0]['photo'])) }}" alt="" class="thing__profile-photo"> |
185 | @else | 185 | @else |
186 | <img src="{{ asset('images/default_man.jpg') }}" alt="" class="thing__profile-photo"> | 186 | <img src="{{ asset('images/default_man.jpg') }}" alt="" class="thing__profile-photo"> |
187 | @endif | 187 | @endif |
188 | <div class="thing__profile-body"> | 188 | <div class="thing__profile-body"> |
189 | <h1 class="thing__title">{{ $Query[0]['users']['surname']." ".$Query[0]['users']['name_man']." ".$Query[0]['users']['surname2'] }}</h1> | 189 | <h1 class="thing__title">{{ $Query[0]['users']['surname']." ".$Query[0]['users']['name_man']." ".$Query[0]['users']['surname2'] }}</h1> |
190 | <div style="clear:both;"></div> | 190 | <div style="clear:both;"></div> |
191 | <p class="thing__text">{{ $Query[0]['text'] }}</p> | 191 | <p class="thing__text">{{ $Query[0]['text'] }}</p> |
192 | </div> | 192 | </div> |
193 | </div> | 193 | </div> |
194 | @if (!empty($Query[0]['users']['file'])) | 194 | @if (!empty($Query[0]['users']['file'])) |
195 | <a href="{{ asset(Storage::url($Query[0]['users']['file'])) }}">Анкета-файл</a> | 195 | <a href="{{ asset(Storage::url($Query[0]['users']['file'])) }}">Анкета-файл</a> |
196 | @endif | 196 | @endif |
197 | </div> | 197 | </div> |
198 | </section> | 198 | </section> |
199 | <main class="main"> | 199 | <main class="main"> |
200 | <div class="container"> | 200 | <div class="container"> |
201 | <div class="main__resume-profile"> | 201 | <div class="main__resume-profile"> |
202 | <div class="main__content"> | 202 | <div class="main__content"> |
203 | <div class="main__spoiler"> | 203 | <div class="main__spoiler"> |
204 | <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная | 204 | <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная |
205 | информация</button> --> | 205 | информация</button> --> |
206 | <div class="main__spoiler-body"> | 206 | <div class="main__spoiler-body"> |
207 | <table class="main__table"> | 207 | <table class="main__table"> |
208 | <thead> | 208 | <thead> |
209 | <tr> | 209 | <tr> |
210 | <th colspan="2">Основная информация</th> | 210 | <th colspan="2">Основная информация</th> |
211 | </tr> | 211 | </tr> |
212 | </thead> | 212 | </thead> |
213 | <tbody> | 213 | <tbody> |
214 | <tr> | 214 | <tr> |
215 | <td>Имя:</td> | 215 | <td>Имя:</td> |
216 | <td><b>{{ $Query[0]['users']['name_man'] }}</b></td> | 216 | <td><b>{{ $Query[0]['users']['name_man'] }}</b></td> |
217 | </tr> | 217 | </tr> |
218 | <tr> | 218 | <tr> |
219 | <td>Должность:</td> | 219 | <td>Должность:</td> |
220 | <td> | 220 | <td> |
221 | @foreach ($Query[0]['job_titles'] as $it) | 221 | @foreach ($Query[0]['job_titles'] as $it) |
222 | <b>{{ $it['name'] }}</b><br> | 222 | <b>{{ $it['name'] }}</b><br> |
223 | @endforeach | 223 | @endforeach |
224 | </td> | 224 | </td> |
225 | </tr> | 225 | </tr> |
226 | <tr> | 226 | <tr> |
227 | <td>Телефон:</td> | 227 | <td>Телефон:</td> |
228 | <td><b><a>{{ $Query[0]['telephone'] }}</a></b> | 228 | <td><b><a>{{ $Query[0]['telephone'] }}</a></b> |
229 | <b><a>{{ $Query[0]['telephone2'] }}</a></b> | 229 | <b><a>{{ $Query[0]['telephone2'] }}</a></b> |
230 | </td> | 230 | </td> |
231 | </tr> | 231 | </tr> |
232 | <tr> | 232 | <tr> |
233 | <td>E-mail:</td> | 233 | <td>E-mail:</td> |
234 | <td><b><a>{{ $Query[0]['email'] }}</a></b></td> | 234 | <td><b><a>{{ $Query[0]['email'] }}</a></b></td> |
235 | </tr> | 235 | </tr> |
236 | <tr> | 236 | <tr> |
237 | <td>Возраст:</td> | 237 | <td>Возраст:</td> |
238 | <td><b>{{ $Query[0]['old_year'] }}</b></td> | 238 | <td><b>{{ $Query[0]['old_year'] }}</b></td> |
239 | </tr> | 239 | </tr> |
240 | <tr> | 240 | <tr> |
241 | <td>Статус:</td> | 241 | <td>Статус:</td> |
242 | <td> | 242 | <td> |
243 | @php $code = $Query[0]['status_work']; @endphp | 243 | @php $code = $Query[0]['status_work']; @endphp |
244 | <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td> | 244 | <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td> |
245 | </tr> | 245 | </tr> |
246 | <tr> | 246 | <tr> |
247 | <td>Город проживания:</td> | 247 | <td>Город проживания:</td> |
248 | <td><b>{{ $Query[0]['city'] }}</b></td> | 248 | <td><b>{{ $Query[0]['city'] }}</b></td> |
249 | </tr> | 249 | </tr> |
250 | <tr> | 250 | <tr> |
251 | <td>Уровень английского:</td> | 251 | <td>Уровень английского:</td> |
252 | <td><b>{{ $Query[0]['en_is'] }}</b></td> | 252 | <td><b>{{ $Query[0]['en_is'] }}</b></td> |
253 | </tr> | 253 | </tr> |
254 | <tr> | 254 | <tr> |
255 | <td>Опыт работы:</td> | 255 | <td>Опыт работы:</td> |
256 | <td><b>{{ $Query[0]['old_year'] }}</b></td> | 256 | <td><b>{{ $Query[0]['old_year'] }}</b></td> |
257 | </tr> | 257 | </tr> |
258 | </tbody> | 258 | </tbody> |
259 | </table> | 259 | </table> |
260 | </div> | 260 | </div> |
261 | </div> | 261 | </div> |
262 | <div class="main__spoiler"> | 262 | <div class="main__spoiler"> |
263 | 263 | ||
264 | <div class="main__spoiler-body"> | 264 | <div class="main__spoiler-body"> |
265 | <table class="main__table"> | 265 | <table class="main__table"> |
266 | <thead> | 266 | <thead> |
267 | <tr> | 267 | <tr> |
268 | <th colspan="2">Сертификаты / документы</th> | 268 | <th colspan="2">Сертификаты / документы</th> |
269 | </tr> | 269 | </tr> |
270 | </thead> | 270 | </thead> |
271 | <tbody> | 271 | <tbody> |
272 | @if (count($Query[0]['sertificate'])) | 272 | @if (count($Query[0]['sertificate'])) |
273 | @foreach($Query[0]['sertificate'] as $it) | 273 | @foreach($Query[0]['sertificate'] as $it) |
274 | <tr> | 274 | <tr> |
275 | <td>{{ $it['name']." ".$it['education'] }}</td> | 275 | <td>{{ $it['name']." ".$it['education'] }}</td> |
276 | <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td> | 276 | <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td> |
277 | </tr> | 277 | </tr> |
278 | @endforeach | 278 | @endforeach |
279 | @else | 279 | @else |
280 | <tr> | 280 | <tr> |
281 | <td> - </td> | 281 | <td> - </td> |
282 | <td> - </td> | 282 | <td> - </td> |
283 | </tr> | 283 | </tr> |
284 | @endif | 284 | @endif |
285 | </tbody> | 285 | </tbody> |
286 | </table> | 286 | </table> |
287 | </div> | 287 | </div> |
288 | </div> | 288 | </div> |
289 | <div class="main__spoiler"> | 289 | <div class="main__spoiler"> |
290 | 290 | ||
291 | <div class="main__spoiler-body"> | 291 | <div class="main__spoiler-body"> |
292 | <table class="main__table main__table_three"> | 292 | <table class="main__table main__table_three"> |
293 | <thead> | 293 | <thead> |
294 | <tr> | 294 | <tr> |
295 | <th colspan="3">Опыт работы</th> | 295 | <th colspan="3">Опыт работы</th> |
296 | </tr> | 296 | </tr> |
297 | </thead> | 297 | </thead> |
298 | <tbody> | 298 | <tbody> |
299 | @if (count($Query[0]['place_worker']) > 0) | 299 | @if (count($Query[0]['place_worker']) > 0) |
300 | @foreach($Query[0]['place_worker'] as $it) | 300 | @foreach($Query[0]['place_worker'] as $it) |
301 | <tr> | 301 | <tr> |
302 | <td>{{ $it['begin_work']." - ".$it['end_work'] }} | 302 | <td>{{ $it['begin_work']." - ".$it['end_work'] }} |
303 | </td> | 303 | </td> |
304 | <td><b>{{ $it['name_company'] }}</b> | 304 | <td><b>{{ $it['name_company'] }}</b> |
305 | </td> | 305 | </td> |
306 | <td><b>{{ $it['job_title'] }}</b> | 306 | <td><b>{{ $it['job_title'] }}</b> |
307 | Судно: {{ $it['teplohod'] }} | 307 | Судно: {{ $it['teplohod'] }} |
308 | </td> | 308 | </td> |
309 | </tr> | 309 | </tr> |
310 | @endforeach | 310 | @endforeach |
311 | @endif | 311 | @endif |
312 | </tbody> | 312 | </tbody> |
313 | </table> | 313 | </table> |
314 | </div> | 314 | </div> |
315 | </div> | 315 | </div> |
316 | </div> | 316 | </div> |
317 | <div class="main__resume-profile-about"> | 317 | <div class="main__resume-profile-about"> |
318 | <h2 class="main__resume-profile-about-title">О себе</h2> | 318 | <h2 class="main__resume-profile-about-title">О себе</h2> |
319 | <p class="main__resume-profile-about-text">{{ $Query[0]['text'] }}</p> | 319 | <p class="main__resume-profile-about-text">{{ $Query[0]['text'] }}</p> |
320 | </div> | 320 | </div> |
321 | <div class="main__resume-profile-info"> | 321 | <div class="main__resume-profile-info"> |
322 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> | 322 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> |
323 | <div class="main__resume-profile-info-body"> | 323 | <div class="main__resume-profile-info-body"> |
324 | @if ((isset($Query[0]['prev_company'])) && (count($Query[0]['prev_company']) > 0)) | 324 | @if ((isset($Query[0]['prev_company'])) && (count($Query[0]['prev_company']) > 0)) |
325 | @foreach ($Query[0]['prev_company'] as $it) | 325 | @foreach ($Query[0]['prev_company'] as $it) |
326 | <div class="main__resume-profile-info-body-item"> | 326 | <div class="main__resume-profile-info-body-item"> |
327 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3> | 327 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3> |
328 | <ul class="main__resume-profile-info-body-inner"> | 328 | <ul class="main__resume-profile-info-body-inner"> |
329 | <li> | 329 | <li> |
330 | <b>Руководитель</b> | 330 | <b>Руководитель</b> |
331 | <span>{{ $it['direct'] }}</span> | 331 | <span>{{ $it['direct'] }}</span> |
332 | </li> | 332 | </li> |
333 | <li> | 333 | <li> |
334 | <b>Телефон того, кто может дать рекомендацию</b> | 334 | <b>Телефон того, кто может дать рекомендацию</b> |
335 | <span> | 335 | <span> |
336 | <a>{{ $it['telephone'] }}</a> | 336 | <a>{{ $it['telephone'] }}</a> |
337 | <a>{{ $it['telephone2'] }}</a> | 337 | <a>{{ $it['telephone2'] }}</a> |
338 | </span> | 338 | </span> |
339 | </li> | 339 | </li> |
340 | </ul> | 340 | </ul> |
341 | </div> | ||
342 | @endforeach | ||
343 | @else | ||
344 | <div class="main__resume-profile-info-body-item"> | ||
345 | <h3 class="main__resume-profile-info-body-subtitle">Не указано</h3> | ||
346 | <ul class="main__resume-profile-info-body-inner"> | ||
347 | <li> | ||
348 | <b>Руководитель</b> | ||
349 | <span>Нет сведений</span> | ||
350 | </li> | ||
351 | <li> | ||
352 | <b>Телефон того, кто может дать рекомендацию</b> | ||
353 | <span> | ||
354 | <a>Нет сведений</a> | ||
355 | </span> | ||
356 | </li> | ||
341 | </div> | 357 | </ul> |
342 | @endforeach | 358 | </div> |
343 | @else | 359 | @endif |
344 | <div class="main__resume-profile-info-body-item"> | 360 | </div> |
345 | <h3 class="main__resume-profile-info-body-subtitle">Не указано</h3> | 361 | </div> |
346 | <ul class="main__resume-profile-info-body-inner"> | 362 | </div> |
347 | <li> | 363 | </div> |
348 | <b>Руководитель</b> | 364 | </main> |
349 | <span>Нет сведений</span> | 365 | </body> |
350 | </li> | 366 | </html> |
351 | <li> | 367 |
resources/views/workers/cabinet.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('click', '#button_new_doc123', function() { | 6 | $(document).on('click', '#button_new_doc123', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.attr('data-val'); | 8 | var val_ = this_.attr('data-val'); |
9 | var new_diplom = $('#new_diplom'); | 9 | var new_diplom = $('#new_diplom'); |
10 | var new_diplom_val = new_diplom.val(); | 10 | var new_diplom_val = new_diplom.val(); |
11 | var new_data_begin = $('#new_data_begin'); | 11 | var new_data_begin = $('#new_data_begin'); |
12 | var new_data_begin_val = new_data_begin.val(); | 12 | var new_data_begin_val = new_data_begin.val(); |
13 | var new_data_end = $('#new_data_end'); | 13 | var new_data_end = $('#new_data_end'); |
14 | var new_data_end_val = new_data_end.val(); | 14 | var new_data_end_val = new_data_end.val(); |
15 | var education = $('#education'); | 15 | var education = $('#education'); |
16 | var education_val = education.val(); | 16 | var education_val = education.val(); |
17 | var worker_id = $('#new_id'); | 17 | var worker_id = $('#new_id'); |
18 | var worker_val = worker_id.val(); | 18 | var worker_val = worker_id.val(); |
19 | 19 | ||
20 | console.log('sort items ' + val_); | 20 | console.log('sort items ' + val_); |
21 | 21 | ||
22 | if (new_diplom_val == '') { | 22 | if (new_diplom_val == '') { |
23 | new_diplom.addClass('err_red'); | 23 | new_diplom.addClass('err_red'); |
24 | console.log('Border Up'); | 24 | console.log('Border Up'); |
25 | } else { | 25 | } else { |
26 | $.ajax({ | 26 | $.ajax({ |
27 | type: "GET", | 27 | type: "GET", |
28 | url: "{{ route('worker.add_serificate') }}", | 28 | url: "{{ route('worker.add_serificate') }}", |
29 | data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val, | 29 | data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val, |
30 | success: function (data) { | 30 | success: function (data) { |
31 | console.log('Блокировка...'); | 31 | console.log('Блокировка...'); |
32 | console.log(data); | 32 | console.log(data); |
33 | $('#sertificate').html(data); | 33 | $('#sertificate').html(data); |
34 | if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); | 34 | if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); |
35 | }, | 35 | }, |
36 | headers: { | 36 | headers: { |
37 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 37 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
38 | }, | 38 | }, |
39 | error: function (data) { | 39 | error: function (data) { |
40 | data = JSON.stringify(data); | 40 | data = JSON.stringify(data); |
41 | console.log('Error: ' + data); | 41 | console.log('Error: ' + data); |
42 | } | 42 | } |
43 | }); | 43 | }); |
44 | } | 44 | } |
45 | }); | 45 | }); |
46 | 46 | ||
47 | $(document).on('click', '#btn_new_diplom123', function() { | 47 | $(document).on('click', '#btn_new_diplom123', function() { |
48 | var this_ = $(this); | 48 | var this_ = $(this); |
49 | var val_ = this_.attr('data-val'); | 49 | var val_ = this_.attr('data-val'); |
50 | var documents = $('#documents'); | 50 | var documents = $('#documents'); |
51 | var doc_val = documents.val(); | 51 | var doc_val = documents.val(); |
52 | var block = $('#ajax_dop_diplomi'); | 52 | var block = $('#ajax_dop_diplomi'); |
53 | 53 | ||
54 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); | 54 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); |
55 | 55 | ||
56 | $.ajax({ | 56 | $.ajax({ |
57 | type: "GET", | 57 | type: "GET", |
58 | url: "", | 58 | url: "", |
59 | data: "worker_id="+val_+"&infoblok_id="+doc_val, | 59 | data: "worker_id="+val_+"&infoblok_id="+doc_val, |
60 | success: function (data) { | 60 | success: function (data) { |
61 | location.url = data; | 61 | location.url = data; |
62 | console.log('Добавление документа-диплома'); | 62 | console.log('Добавление документа-диплома'); |
63 | console.log(data); | 63 | console.log(data); |
64 | block.html(data); | 64 | block.html(data); |
65 | }, | 65 | }, |
66 | headers: { | 66 | headers: { |
67 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 67 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
68 | }, | 68 | }, |
69 | error: function (data) { | 69 | error: function (data) { |
70 | data = JSON.stringify(data); | 70 | data = JSON.stringify(data); |
71 | console.log('Error: ' + data); | 71 | console.log('Error: ' + data); |
72 | } | 72 | } |
73 | }); | 73 | }); |
74 | }); | 74 | }); |
75 | 75 | ||
76 | $(document).on('click', '#new_work', function() { | 76 | $(document).on('click', '#new_work', function() { |
77 | var this_ = $(this); | 77 | var this_ = $(this); |
78 | var val_ = this_.attr('data-val'); | 78 | var val_ = this_.attr('data-val'); |
79 | var new_diplom = $('#new_diplom').val(); | 79 | var new_diplom = $('#new_diplom').val(); |
80 | var new_data_begin = $('#new_data_begin').val(); | 80 | var new_data_begin = $('#new_data_begin').val(); |
81 | var new_data_end = $('#new_data_end').val(); | 81 | var new_data_end = $('#new_data_end').val(); |
82 | var new_job_title = $('#new_job_title').val(); | 82 | var new_job_title = $('#new_job_title').val(); |
83 | var new_teplohod = $('#new_teplohod').val(); | 83 | var new_teplohod = $('#new_teplohod').val(); |
84 | var new_GWT = $('#new_GWT').val(); | 84 | var new_GWT = $('#new_GWT').val(); |
85 | var new_KBT = $('#new_KBT').val(); | 85 | var new_KBT = $('#new_KBT').val(); |
86 | var new_Begin_work = $('#new_Begin_work').val(); | 86 | var new_Begin_work = $('#new_Begin_work').val(); |
87 | var new_End_work = $('#new_End_work').val(); | 87 | var new_End_work = $('#new_End_work').val(); |
88 | var new_name_company = $('#new_name_company').val(); | 88 | var new_name_company = $('#new_name_company').val(); |
89 | 89 | ||
90 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); | 90 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); |
91 | 91 | ||
92 | $.ajax({ | 92 | $.ajax({ |
93 | type: "GET", | 93 | type: "GET", |
94 | url: "", | 94 | url: "", |
95 | data: "worker_id="+val_+"&infoblok_id="+doc_val, | 95 | data: "worker_id="+val_+"&infoblok_id="+doc_val, |
96 | success: function (data) { | 96 | success: function (data) { |
97 | location.url = data; | 97 | location.url = data; |
98 | console.log('Добавление документа-диплома'); | 98 | console.log('Добавление документа-диплома'); |
99 | console.log(data); | 99 | console.log(data); |
100 | block.html(data); | 100 | block.html(data); |
101 | }, | 101 | }, |
102 | headers: { | 102 | headers: { |
103 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 103 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
104 | }, | 104 | }, |
105 | error: function (data) { | 105 | error: function (data) { |
106 | data = JSON.stringify(data); | 106 | data = JSON.stringify(data); |
107 | console.log('Error: ' + data); | 107 | console.log('Error: ' + data); |
108 | } | 108 | } |
109 | }); | 109 | }); |
110 | }); | 110 | }); |
111 | 111 | ||
112 | $(document).on('click', '#old_year', function() { | 112 | $(document).on('click', '#old_year', function() { |
113 | var this_ = $(this); | 113 | var this_ = $(this); |
114 | var val = this_.val(); | 114 | var val = this_.val(); |
115 | 115 | ||
116 | if (val < 0) | 116 | if (val < 0) |
117 | $('#old_year').val(0); | 117 | $('#old_year').val(0); |
118 | 118 | ||
119 | console.log('Возраст не может выполнить такую операцию'); | 119 | console.log('Возраст не может выполнить такую операцию'); |
120 | }); | 120 | }); |
121 | 121 | ||
122 | $(document).on('change', '.sertificates_js', function() { | 122 | $(document).on('change', '.sertificates_js', function() { |
123 | var this_ = $(this); | 123 | var this_ = $(this); |
124 | var infoblock_id = this_.attr('data-info'); | 124 | var infoblock_id = this_.attr('data-info'); |
125 | var val = this_.val(); | 125 | var val = this_.val(); |
126 | var block = $('#block_sertificate'); | 126 | var block = $('#block_sertificate'); |
127 | 127 | ||
128 | console.log('infoblok='+infoblock_id); | 128 | console.log('infoblok='+infoblock_id); |
129 | console.log('val='+val); | 129 | console.log('val='+val); |
130 | 130 | ||
131 | $.ajax({ | 131 | $.ajax({ |
132 | type: "GET", | 132 | type: "GET", |
133 | url: "{{ route('worker.delete_add_diplom', ['worker' => $Worker[0]->id]) }}", | 133 | url: "{{ route('worker.delete_add_diplom', ['worker' => $Worker[0]->id]) }}", |
134 | data: "&infoblok_id=" + infoblock_id+"&val="+val, | 134 | data: "&infoblok_id=" + infoblock_id+"&val="+val, |
135 | success: function (data) { | 135 | success: function (data) { |
136 | location.url = data; | 136 | location.url = data; |
137 | console.log('Удаление левых документов + добавление реальных документов'); | 137 | console.log('Удаление левых документов + добавление реальных документов'); |
138 | 138 | ||
139 | console.log('Info 100% +'+ data); | 139 | console.log('Info 100% +'+ data); |
140 | //window.location.href = data; | 140 | //window.location.href = data; |
141 | //block.html(data); | 141 | //block.html(data); |
142 | }, | 142 | }, |
143 | headers: { | 143 | headers: { |
144 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 144 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
145 | }, | 145 | }, |
146 | error: function (data) { | 146 | error: function (data) { |
147 | data = JSON.stringify(data); | 147 | data = JSON.stringify(data); |
148 | console.log('Error: ' + data); | 148 | console.log('Error: ' + data); |
149 | } | 149 | } |
150 | }); | 150 | }); |
151 | 151 | ||
152 | }); | 152 | }); |
153 | 153 | ||
154 | </script> | 154 | </script> |
155 | @endsection | 155 | @endsection |
156 | 156 | ||
157 | @section('content') | 157 | @section('content') |
158 | <section class="cabinet"> | 158 | <section class="cabinet"> |
159 | <div class="container"> | 159 | <div class="container"> |
160 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 160 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
161 | <li><a href="{{ route('index') }}">Главная</a></li> | 161 | <li><a href="{{ route('index') }}">Главная</a></li> |
162 | <li><b>Личный кабинет</b></li> | 162 | <li><b>Личный кабинет</b></li> |
163 | </ul> | 163 | </ul> |
164 | <div class="cabinet__wrapper"> | 164 | <div class="cabinet__wrapper"> |
165 | <div class="cabinet__side"> | 165 | <div class="cabinet__side"> |
166 | <div class="cabinet__side-toper"> | 166 | <div class="cabinet__side-toper"> |
167 | @include('workers.emblema') | 167 | @include('workers.emblema') |
168 | 168 | ||
169 | </div> | 169 | </div> |
170 | 170 | ||
171 | @include('workers.menu', ['item' => 1]) | 171 | @include('workers.menu', ['item' => 1]) |
172 | </div> | 172 | </div> |
173 | <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> | 173 | <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> |
174 | @csrf | 174 | @csrf |
175 | @include('messages_error') | 175 | @include('messages_error') |
176 | <div class="cabinet__body-item"> | 176 | <div class="cabinet__body-item"> |
177 | <div class="cabinet__anketa"> | 177 | <div class="cabinet__anketa"> |
178 | <h2 class="title cabinet__title">Моя анкета</h2> | 178 | <h2 class="title cabinet__title">Моя анкета</h2> |
179 | <div class="cabinet__anketa-buttons"> | 179 | <div class="cabinet__anketa-buttons"> |
180 | <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> | 180 | <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> |
181 | <a href="{{ route('resume_download', ['worker' => $Worker[0]->id]) }}" target="_blank" class="button"> | 181 | <a href="{{ route('resume_download', ['worker' => $Worker[0]->id]) }}" target="_blank" class="button"> |
182 | <svg> | 182 | <svg> |
183 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> | 183 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> |
184 | </svg> | 184 | </svg> |
185 | Скачать резюме | 185 | Скачать резюме |
186 | </a> | 186 | </a> |
187 | </div> | 187 | </div> |
188 | </div> | 188 | </div> |
189 | </div> | 189 | </div> |
190 | <div class="cabinet__body-item"> | 190 | <div class="cabinet__body-item"> |
191 | <div class="cabinet__stats"> | 191 | <div class="cabinet__stats"> |
192 | <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> | 192 | <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> |
193 | <div class="cabinet__stats-body"> | 193 | <div class="cabinet__stats-body"> |
194 | <div class="cabinet__stats-item"> | 194 | <div class="cabinet__stats-item"> |
195 | <svg> | 195 | <svg> |
196 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> | 196 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> |
197 | </svg> | 197 | </svg> |
198 | <span>Просмотров:</span> | 198 | <span>Просмотров:</span> |
199 | <b>@if (isset($stat[0]->lookin)) {{ $stat[0]->lookin }} @else 0 @endif</b> | 199 | <b>@if (isset($stat[0]->lookin)) {{ $stat[0]->lookin }} @else 0 @endif</b> |
200 | </div> | 200 | </div> |
201 | <div class="cabinet__stats-item"> | 201 | <div class="cabinet__stats-item"> |
202 | <svg> | 202 | <svg> |
203 | <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> | 203 | <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> |
204 | </svg> | 204 | </svg> |
205 | <span>Отзывов:</span> | 205 | <span>Отзывов:</span> |
206 | <b>@if (isset($stat[0]->message)) {{ $stat[0]->message }} @else 0 @endif</b> | 206 | <b>@if (isset($stat[0]->message)) {{ $stat[0]->message }} @else 0 @endif</b> |
207 | </div> | 207 | </div> |
208 | </div> | 208 | </div> |
209 | <div class="cabinet__stats-subtitle">Анкета заполнена на {{ $persent }}%</div> | 209 | <div class="cabinet__stats-subtitle">Анкета заполнена на {{ $persent }}%</div> |
210 | <div class="cabinet__stats-line"> | 210 | <div class="cabinet__stats-line"> |
211 | <span style="width:{{ $persent }}%"></span> | 211 | <span style="width:{{ $persent }}%"></span> |
212 | </div> | 212 | </div> |
213 | <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> | 213 | <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> |
214 | </div> | 214 | </div> |
215 | </div> | 215 | </div> |
216 | <div class="cabinet__body-item"> | 216 | <div class="cabinet__body-item"> |
217 | <h3 class="cabinet__subtitle">Профиль</h3> | 217 | <h3 class="cabinet__subtitle">Профиль</h3> |
218 | <div class="cabinet__avatar"> | 218 | <div class="cabinet__avatar"> |
219 | <div class="cabinet__avatar-pic"> | 219 | <div class="cabinet__avatar-pic"> |
220 | 220 | ||
221 | @if (!empty($Worker[0]->photo)) | 221 | @if (!empty($Worker[0]->photo)) |
222 | <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> | 222 | <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> |
223 | @else | 223 | @else |
224 | <svg> | 224 | <svg> |
225 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | 225 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
226 | </svg> | 226 | </svg> |
227 | @endif | 227 | @endif |
228 | </div> | 228 | </div> |
229 | <div class="cabinet__avatar-form"> | 229 | <div class="cabinet__avatar-form"> |
230 | <label class="file"> | 230 | <label class="file"> |
231 | <span class="file__input"> | 231 | <span class="file__input"> |
232 | <input type="file" name="photo" id="photo"> | 232 | <input type="file" name="photo" id="photo"> |
233 | 233 | ||
234 | <span class="button"> | 234 | <span class="button"> |
235 | <svg> | 235 | <svg> |
236 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | 236 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |
237 | </svg> | 237 | </svg> |
238 | Загрузить | 238 | Загрузить |
239 | </span> | 239 | </span> |
240 | </span> | 240 | </span> |
241 | </label> | 241 | </label> |
242 | <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> | 242 | <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> |
243 | </div> | 243 | </div> |
244 | </div> | 244 | </div> |
245 | </div> | 245 | </div> |
246 | <div class="cabinet__body-item"> | 246 | <div class="cabinet__body-item"> |
247 | <div class="cabinet__inputs"> | 247 | <div class="cabinet__inputs"> |
248 | <div class="cabinet__inputs-item form-group"> | 248 | <div class="cabinet__inputs-item form-group"> |
249 | <label class="form-group__label">Электронная почта *</label> | 249 | <label class="form-group__label">Электронная почта *</label> |
250 | <div class="form-group__item"> | 250 | <div class="form-group__item"> |
251 | <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required> | 251 | <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required> |
252 | </div> | 252 | </div> |
253 | </div> | 253 | </div> |
254 | <div class="cabinet__inputs-item form-group"> | 254 | <div class="cabinet__inputs-item form-group"> |
255 | <label class="form-group__label">Статус</label> | 255 | <label class="form-group__label">Статус</label> |
256 | <div class="form-group__item"> | 256 | <div class="form-group__item"> |
257 | <div class="select"> | 257 | <div class="select"> |
258 | <select class="js-select2" name="status_work" id="status_work"> | 258 | <select class="js-select2" name="status_work" id="status_work"> |
259 | <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option> | 259 | <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option> |
260 | <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option> | 260 | <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option> |
261 | <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option> | 261 | <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option> |
262 | </select> | 262 | </select> |
263 | </div> | 263 | </div> |
264 | </div> | 264 | </div> |
265 | </div> | 265 | </div> |
266 | <!--<div class="cabinet__inputs-item form-group"> | 266 | <!--<div class="cabinet__inputs-item form-group"> |
267 | <label class="form-group__label">Статус *</label> | 267 | <label class="form-group__label">Статус *</label> |
268 | <div class="form-group__item"> | 268 | <div class="form-group__item"> |
269 | <input type="text" class="input" required> | 269 | <input type="text" class="input" required> |
270 | </div> | 270 | </div> |
271 | </div>--> | 271 | </div>--> |
272 | @if (isset($Worker[0]->users)) | 272 | @if (isset($Worker[0]->users)) |
273 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 273 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
274 | <label class="form-group__label">Фамилия *</label> | 274 | <label class="form-group__label">Фамилия *</label> |
275 | <div class="form-group__item"> | 275 | <div class="form-group__item"> |
276 | <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> | 276 | <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> |
277 | </div> | 277 | </div> |
278 | </div> | 278 | </div> |
279 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 279 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
280 | <label class="form-group__label">Имя *</label> | 280 | <label class="form-group__label">Имя *</label> |
281 | <div class="form-group__item"> | 281 | <div class="form-group__item"> |
282 | <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> | 282 | <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> |
283 | </div> | 283 | </div> |
284 | </div> | 284 | </div> |
285 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 285 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
286 | <label class="form-group__label">Отчество *</label> | 286 | <label class="form-group__label">Отчество *</label> |
287 | <div class="form-group__item"> | 287 | <div class="form-group__item"> |
288 | <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> | 288 | <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> |
289 | </div> | 289 | </div> |
290 | </div> | 290 | </div> |
291 | @endif | 291 | @endif |
292 | </div> | 292 | </div> |
293 | </div> | 293 | </div> |
294 | <div class="cabinet__body-item"> | 294 | <div class="cabinet__body-item"> |
295 | <h3 class="cabinet__subtitle">Основная информация</h3> | 295 | <h3 class="cabinet__subtitle">Основная информация</h3> |
296 | <div class="cabinet__inputs"> | 296 | <div class="cabinet__inputs"> |
297 | <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> | 297 | <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> |
298 | <label class="form-group__label">Возраст</label> | 298 | <label class="form-group__label">Возраст</label> |
299 | <div class="form-group__item"> | 299 | <div class="form-group__item"> |
300 | <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required> | 300 | <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required> |
301 | </div> | 301 | </div> |
302 | </div> | 302 | </div> |
303 | <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> | 303 | <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> |
304 | <label class="form-group__label">Желаемые вакансии</label> | 304 | <label class="form-group__label">Желаемые вакансии</label> |
305 | <div class="form-group__item"> | 305 | <div class="form-group__item"> |
306 | <div class="select"> | 306 | <div class="select"> |
307 | <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> | 307 | <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> |
308 | @if ($Job_titles->count()) | 308 | @if ($Job_titles->count()) |
309 | @foreach($Job_titles as $it) | 309 | @foreach($Job_titles as $it) |
310 | @php $selected = false; @endphp | 310 | @php $selected = false; @endphp |
311 | @if (isset($Worker[0]->job_titles)) | 311 | @if (isset($Worker[0]->job_titles)) |
312 | @if ($Worker[0]->job_titles->count()) | 312 | @if ($Worker[0]->job_titles->count()) |
313 | @foreach($Worker[0]->job_titles as $select) | 313 | @foreach($Worker[0]->job_titles as $select) |
314 | @if ($it->id == $select->id) | 314 | @if ($it->id == $select->id) |
315 | @php $selected = true; @endphp | 315 | @php $selected = true; @endphp |
316 | @endif | 316 | @endif |
317 | @endforeach | 317 | @endforeach |
318 | @endif | 318 | @endif |
319 | @endif | 319 | @endif |
320 | <option value="{{ $it->id }}" @if ($selected) selected @endif>{{ $it->name }}</option> | 320 | <option value="{{ $it->id }}" @if ($selected) selected @endif>{{ $it->name }}</option> |
321 | @endforeach | 321 | @endforeach |
322 | @endif | 322 | @endif |
323 | </select> | 323 | </select> |
324 | </div> | 324 | </div> |
325 | </div> | 325 | </div> |
326 | </div> | 326 | </div> |
327 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 327 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
328 | <label class="form-group__label">Город</label> | 328 | <label class="form-group__label">Город</label> |
329 | <div class="form-group__item"> | 329 | <div class="form-group__item"> |
330 | <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> | 330 | <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> |
331 | </div> | 331 | </div> |
332 | </div> | 332 | </div> |
333 | <div class="cabinet__inputs-item form-group"> | 333 | <div class="cabinet__inputs-item form-group"> |
334 | <label class="form-group__label">Опыт работы</label> | 334 | <label class="form-group__label">Опыт работы</label> |
335 | <div class="form-group__item"> | 335 | <div class="form-group__item"> |
336 | <div class="select"> | 336 | <div class="select"> |
337 | <select class="js-select2" id="experience" name="experience"> | 337 | <select class="js-select2" id="experience" name="experience"> |
338 | <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> | 338 | <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> |
339 | <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> | 339 | <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> |
340 | <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> | 340 | <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> |
341 | <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> | 341 | <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> |
342 | <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> | 342 | <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> |
343 | <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> | 343 | <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> |
344 | </select> | 344 | </select> |
345 | </div> | 345 | </div> |
346 | </div> | 346 | </div> |
347 | </div> | 347 | </div> |
348 | 348 | ||
349 | <div class="cabinet__inputs-item form-group"> | 349 | <div class="cabinet__inputs-item form-group"> |
350 | <label class="form-group__label">Номер телефона 1</label> | 350 | <label class="form-group__label">Номер телефона 1</label> |
351 | <div class="form-group__item"> | 351 | <div class="form-group__item"> |
352 | <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> | 352 | <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> |
353 | </div> | 353 | </div> |
354 | </div> | 354 | </div> |
355 | <div class="cabinet__inputs-item form-group"> | 355 | <div class="cabinet__inputs-item form-group"> |
356 | <label class="form-group__label">Номер телефона 2</label> | 356 | <label class="form-group__label">Номер телефона 2</label> |
357 | <div class="form-group__item"> | 357 | <div class="form-group__item"> |
358 | <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> | 358 | <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> |
359 | </div> | 359 | </div> |
360 | </div> | 360 | </div> |
361 | </div> | 361 | </div> |
362 | </div> | 362 | </div> |
363 | 363 | ||
364 | <div class="cabinet__body-item"> | 364 | <div class="cabinet__body-item"> |
365 | <h4 class="cabinet__h4">О себе</h4> | 365 | <h4 class="cabinet__h4">О себе</h4> |
366 | <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> | 366 | <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> |
367 | <div class="cabinet__buttons"> | 367 | <div class="cabinet__buttons"> |
368 | <button type="submit" class="button">Сохранить</button> | 368 | <button type="submit" class="button">Сохранить</button> |
369 | <label class="file"> | 369 | <label class="file"> |
370 | <span class="file__input"> | 370 | <span class="file__input"> |
371 | <input type="file" name="file" id="file"> | 371 | <input type="file" name="file" id="file"> |
372 | <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else Обновить резюме @endif</span> | 372 | <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else Обновить резюме @endif</span> |
373 | </span> | 373 | </span> |
374 | </label> | 374 | </label> |
375 | </div> | 375 | </div> |
376 | </div> | 376 | </div> |
377 | 377 | ||
378 | 378 | ||
379 | <div id="sertificate" name="sertificate"> | 379 | <div id="sertificate" name="sertificate"> |
380 | @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) | 380 | @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) |
381 | @php $i = 0; @endphp | 381 | @php $i = 0; @endphp |
382 | @foreach($Worker[0]->sertificate as $it) | 382 | @foreach($Worker[0]->sertificate as $it) |
383 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | 383 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
384 | @if ($i == 0) | 384 | @if ($i == 0) |
385 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | 385 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> |
386 | @endif | 386 | @endif |
387 | <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> | 387 | <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> |
388 | <div class="cabinet__inputs"> | 388 | <div class="cabinet__inputs"> |
389 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 389 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
390 | <label class="form-group__label">Название сертификата:</label> | 390 | <label class="form-group__label">Название сертификата:</label> |
391 | <div class="form-group__item"> | 391 | <div class="form-group__item"> |
392 | <input type="text" class="input" value="{{ $it->name }}" > | 392 | <input type="text" class="input" value="{{ $it->name }}" > |
393 | </div> | 393 | </div> |
394 | </div> | 394 | </div> |
395 | <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 395 | <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
396 | <label class="form-group__label">Учебное заведение</label> | 396 | <label class="form-group__label">Учебное заведение</label> |
397 | <div class="form-group__item"> | 397 | <div class="form-group__item"> |
398 | <input type="text" class="input" value=" $it->education }}" disabled> | 398 | <input type="text" class="input" value=" $it->education }}" disabled> |
399 | </div> | 399 | </div> |
400 | </div>--> | 400 | </div>--> |
401 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 401 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
402 | <label class="form-group__label">Действителен до:</label> | 402 | <label class="form-group__label">Действителен до:</label> |
403 | <div class="form-group__item"> | 403 | <div class="form-group__item"> |
404 | <input type="text" class="input" value="{{ $it->end_begin }}"> | 404 | <input type="text" class="input" value="{{ $it->end_begin }}"> |
405 | </div> | 405 | </div> |
406 | </div> | 406 | </div> |
407 | <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> | 407 | <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> |
408 | <svg> | 408 | <svg> |
409 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 409 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
410 | </svg> | 410 | </svg> |
411 | Удалить | 411 | Удалить |
412 | </a> | 412 | </a> |
413 | <a href="{{ route('worker.edit_sertificate', ['worker' => $Worker[0]->id, 'doc' => $it->id ]) }}" class="button">Редактирование</a> | 413 | <a href="{{ route('worker.edit_sertificate', ['worker' => $Worker[0]->id, 'doc' => $it->id ]) }}" class="button">Редактирование</a> |
414 | </div> | 414 | </div> |
415 | </div> | 415 | </div> |
416 | @php $i++ @endphp | 416 | @php $i++ @endphp |
417 | @endforeach | 417 | @endforeach |
418 | @else | 418 | @else |
419 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | 419 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
420 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | 420 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> |
421 | Нет сертификатов | 421 | Нет сертификатов |
422 | </div> | 422 | </div> |
423 | @endif | 423 | @endif |
424 | </div> | 424 | </div> |
425 | 425 | ||
426 | <div class="cabinet__body-item"> | 426 | <div class="cabinet__body-item"> |
427 | <a class="button button_light" href="{{ route('worker.new_sertificate',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc"> | 427 | <a class="button button_light" href="{{ route('worker.new_sertificate',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc"> |
428 | Добавить сертификат | 428 | Добавить сертификат |
429 | </a> | 429 | </a> |
430 | </div> | 430 | </div> |
431 | 431 | ||
432 | <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> | 432 | <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> |
433 | <h4 class="cabinet__h4">Дополнительная информация</h4> | 433 | <h4 class="cabinet__h4">Дополнительная информация</h4> |
434 | <div class="cabinet__inputs" id="block_sertificate"> | 434 | <div class="cabinet__inputs" id="block_sertificate"> |
435 | @if ($Infobloks->count()) | 435 | @if ($Infobloks->count()) |
436 | @foreach ($Infobloks as $doc) | 436 | @foreach ($Infobloks as $doc) |
437 | <div class="cabinet__inputs-item form-group"> | 437 | <div class="cabinet__inputs-item form-group"> |
438 | <label class="form-group__label">{{ $doc->name }}</label> | 438 | <label class="form-group__label">{{ $doc->name }}</label> |
439 | <div class="form-group__item"> | 439 | <div class="form-group__item"> |
440 | <div class="select"> | 440 | <div class="select"> |
441 | @php $Selected = 0; @endphp | 441 | @php $Selected = 0; @endphp |
442 | @if ($Worker[0]->infobloks->count()) | 442 | @if ($Worker[0]->infobloks->count()) |
443 | @foreach ($Worker[0]->dop_info as $info) | 443 | @foreach ($Worker[0]->dop_info as $info) |
444 | @if ($info->infoblok_id == $doc->id) | 444 | @if ($info->infoblok_id == $doc->id) |
445 | @php $Selected = $info->status; @endphp | 445 | @php $Selected = $info->status; @endphp |
446 | @endif | 446 | @endif |
447 | @endforeach | 447 | @endforeach |
448 | @endif | 448 | @endif |
449 | <select data-info="{{ $doc->id }}" class="js-select2 sertificates_js"> | 449 | <select data-info="{{ $doc->id }}" class="js-select2 sertificates_js"> |
450 | <option value="0" @if ($Selected == 0) selected @endif>Не указано</option> | 450 | <option value="0" @if ($Selected == 0) selected @endif>Не указано</option> |
451 | <option value="1" @if ($Selected == 1) selected @endif>В наличии</option> | 451 | <option value="1" @if ($Selected == 1) selected @endif>В наличии</option> |
452 | <option value="2" @if ($Selected == 2) selected @endif>Отсутствует</option> | 452 | <option value="2" @if ($Selected == 2) selected @endif>Отсутствует</option> |
453 | </select> | 453 | </select> |
454 | </div> | 454 | </div> |
455 | </div> | 455 | </div> |
456 | </div> | 456 | </div> |
457 | @endforeach | 457 | @endforeach |
458 | @endif | 458 | @endif |
459 | <!--_if (isset($Worker[0]->infobloks)) | 459 | <!--_if (isset($Worker[0]->infobloks)) |
460 | _php dd($Worker[0]->infobloks) _endphp | 460 | _php dd($Worker[0]->infobloks) _endphp |
461 | _if ($Worker[0]->infobloks->count()) | 461 | _if ($Worker[0]->infobloks->count()) |
462 | _php $i = 1; _endphp | 462 | _php $i = 1; _endphp |
463 | _foreach ($Worker[0]->infobloks as $info) | 463 | _foreach ($Worker[0]->infobloks as $info) |
464 | <div class="cabinet__inputs-item form-group"> | 464 | <div class="cabinet__inputs-item form-group"> |
465 | <label class="form-group__label"> $info->name }}</label> | 465 | <label class="form-group__label"> $info->name }}</label> |
466 | <div class="form-group__item"> | 466 | <div class="form-group__item"> |
467 | <div class="select"> | 467 | <div class="select"> |
468 | <select data-info=" $info->id }}" class="js-select2 sertificates_js"> | 468 | <select data-info=" $info->id }}" class="js-select2 sertificates_js"> |
469 | <option value="0">Нет</option> | 469 | <option value="0">Нет</option> |
470 | <option value="1" selected>Да</option> | 470 | <option value="1" selected>Да</option> |
471 | </select> | 471 | </select> |
472 | </div> | 472 | </div> |
473 | </div> | 473 | </div> |
474 | </div> | 474 | </div> |
475 | _php $i++; _endphp | 475 | _php $i++; _endphp |
476 | _endforeach | 476 | _endforeach |
477 | _endif | 477 | _endif |
478 | _endif | 478 | _endif |
479 | --> | 479 | --> |
480 | 480 | ||
481 | <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 481 | <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
482 | <label class="form-group__label">Образцы дипломов и документов</label> | 482 | <label class="form-group__label">Образцы дипломов и документов</label> |
483 | <div class="form-group__item"> | 483 | <div class="form-group__item"> |
484 | <div class="select"> | 484 | <div class="select"> |
485 | <select class="js-select2" id="documents" name="documents"> | 485 | <select class="js-select2" id="documents" name="documents"> |
486 | _if ($Infoblocks->count()) | 486 | _if ($Infoblocks->count()) |
487 | _foreach ($Infoblocks as $it) | 487 | _foreach ($Infoblocks as $it) |
488 | <option value="_$it->id }}">_$it->name }}</option> | 488 | <option value="_$it->id }}">_$it->name }}</option> |
489 | _endforeach | 489 | _endforeach |
490 | _endif | 490 | _endif |
491 | </select> | 491 | </select> |
492 | </div> | 492 | </div> |
493 | </div> | 493 | </div> |
494 | </div>--> | 494 | </div>--> |
495 | </div> | 495 | </div> |
496 | <!--<a href=" route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light"> | 496 | <!--<a href=" route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light"> |
497 | Добавить документ | 497 | Добавить документ |
498 | </a>--> | 498 | </a>--> |
499 | </div> | 499 | </div> |
500 | <div class="cabinet__body-item"> | 500 | <div class="cabinet__body-item"> |
501 | <div class="cabinet__works"> | 501 | <div class="cabinet__works"> |
502 | @if (isset($Worker[0]->place_worker)) | 502 | @if (isset($Worker[0]->place_worker)) |
503 | @php $i = 1; @endphp | 503 | @php $i = 1; @endphp |
504 | @foreach($Worker[0]->place_worker as $company) | 504 | @foreach($Worker[0]->place_worker as $company) |
505 | <div class="cabinet__works-item"> | 505 | <div class="cabinet__works-item"> |
506 | <div class="cabinet__works-spoiler active"> | 506 | <div class="cabinet__works-spoiler active"> |
507 | <div class="cabinet__works-spoiler-left"> | 507 | <div class="cabinet__works-spoiler-left"> |
508 | <div class="cabinet__works-spoiler-buttons"> | 508 | <div class="cabinet__works-spoiler-buttons"> |
509 | <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove"> | 509 | <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove"> |
510 | <svg> | 510 | <svg> |
511 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 511 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
512 | </svg> | 512 | </svg> |
513 | </a> | 513 | </a> |
514 | <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit"> | 514 | <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit"> |
515 | <svg> | 515 | <svg> |
516 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | 516 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> |
517 | </svg> | 517 | </svg> |
518 | </a> | 518 | </a> |
519 | </div> | 519 | </div> |
520 | <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> | 520 | <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> |
521 | </div> | 521 | </div> |
522 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | 522 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> |
523 | <svg> | 523 | <svg> |
524 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 524 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> |
525 | </svg> | 525 | </svg> |
526 | </button> | 526 | </button> |
527 | </div> | 527 | </div> |
528 | <div class="cabinet__works-body"> | 528 | <div class="cabinet__works-body"> |
529 | <div class="cabinet__inputs"> | 529 | <div class="cabinet__inputs"> |
530 | <div class="cabinet__inputs-item form-group"> | 530 | <div class="cabinet__inputs-item form-group"> |
531 | <label class="form-group__label">Должность</label> | 531 | <label class="form-group__label">Должность</label> |
532 | <div class="form-group__item"> | 532 | <div class="form-group__item"> |
533 | <input type="text" class="input" value="{{ $company->job_title }}" disabled> | 533 | <input type="text" class="input" value="{{ $company->job_title }}" disabled> |
534 | </div> | 534 | </div> |
535 | </div> | 535 | </div> |
536 | <!--<div class="cabinet__inputs-item form-group"> | 536 | <!--<div class="cabinet__inputs-item form-group"> |
537 | <label class="form-group__label">Опыт работы в танкерном флоте</label> | 537 | <label class="form-group__label">Опыт работы в танкерном флоте</label> |
538 | <div class="form-group__item"> | 538 | <div class="form-group__item"> |
539 | <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif"> | 539 | <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif"> |
540 | </div> | 540 | </div> |
541 | </div>--> | 541 | </div>--> |
542 | <div class="cabinet__inputs-item form-group"> | 542 | <div class="cabinet__inputs-item form-group"> |
543 | <label class="form-group__label">Название т/х</label> | 543 | <label class="form-group__label">Название т/х</label> |
544 | <div class="form-group__item"> | 544 | <div class="form-group__item"> |
545 | <input type="text" class="input" value="{{ $company->teplohod }}" disabled> | 545 | <input type="text" class="input" value="{{ $company->teplohod }}" disabled> |
546 | </div> | 546 | </div> |
547 | </div> | 547 | </div> |
548 | <div class="cabinet__inputs-item form-group"> | 548 | <div class="cabinet__inputs-item form-group"> |
549 | <label class="form-group__label">Тип суда (GWT)</label> | 549 | <label class="form-group__label">Тип суда (GWT)</label> |
550 | <div class="form-group__item"> | 550 | <div class="form-group__item"> |
551 | <input type="text" class="input" value="{{ $company->GWT }}" disabled> | 551 | <input type="text" class="input" value="{{ $company->GWT }}" disabled> |
552 | </div> | 552 | </div> |
553 | </div> | 553 | </div> |
554 | <div class="cabinet__inputs-item form-group"> | 554 | <div class="cabinet__inputs-item form-group"> |
555 | <label class="form-group__label">Марка ГД</label> | 555 | <label class="form-group__label">Марка ГД</label> |
556 | <div class="form-group__item"> | 556 | <div class="form-group__item"> |
557 | <input type="text" class="input" value="{{ $company->Marka_GD }}" disabled> | 557 | <input type="text" class="input" value="{{ $company->Marka_GD }}" disabled> |
558 | </div> | 558 | </div> |
559 | </div> | 559 | </div> |
560 | <div class="cabinet__inputs-item form-group"> | 560 | <div class="cabinet__inputs-item form-group"> |
561 | <label class="form-group__label">Мощность ГД (кВТ)</label> | 561 | <label class="form-group__label">Мощность ГД (кВТ)</label> |
562 | <div class="form-group__item"> | 562 | <div class="form-group__item"> |
563 | <input type="text" class="input" value="{{ $company->KBT }}" disabled> | 563 | <input type="text" class="input" value="{{ $company->KBT }}" disabled> |
564 | </div> | 564 | </div> |
565 | </div> | 565 | </div> |
566 | <div class="cabinet__inputs-item form-group"> | 566 | <div class="cabinet__inputs-item form-group"> |
567 | <label class="form-group__label">Водоизмещение (GRT)</label> | 567 | <label class="form-group__label">Водоизмещение (GRT)</label> |
568 | <div class="form-group__item"> | 568 | <div class="form-group__item"> |
569 | <input type="text" class="input" value="{{ $company->GRT }}" disabled> | 569 | <input type="text" class="input" value="{{ $company->GRT }}" disabled> |
570 | </div> | 570 | </div> |
571 | </div> | 571 | </div> |
572 | <div class="cabinet__inputs-item form-group"> | 572 | <div class="cabinet__inputs-item form-group"> |
573 | <label class="form-group__label">Название компании</label> | 573 | <label class="form-group__label">Название компании</label> |
574 | <div class="form-group__item"> | 574 | <div class="form-group__item"> |
575 | <input type="text" class="input" value="{{ $company->name_company }}" disabled> | 575 | <input type="text" class="input" value="{{ $company->name_company }}" disabled> |
576 | </div> | 576 | </div> |
577 | </div> | 577 | </div> |
578 | <div class="cabinet__inputs-item form-group"> | 578 | <div class="cabinet__inputs-item form-group"> |
579 | <label class="form-group__label">Начало контракта</label> | 579 | <label class="form-group__label">Начало контракта</label> |
580 | <div class="form-group__item"> | 580 | <div class="form-group__item"> |
581 | <input type="text" class="input" value="{{ $company->begin_work }}" disabled> | 581 | <input type="text" class="input" value="{{ $company->begin_work }}" disabled> |
582 | </div> | 582 | </div> |
583 | </div> | 583 | </div> |
584 | <div class="cabinet__inputs-item form-group"> | 584 | <div class="cabinet__inputs-item form-group"> |
585 | <label class="form-group__label">Окончание контракта</label> | 585 | <label class="form-group__label">Окончание контракта</label> |
586 | <div class="form-group__item"> | 586 | <div class="form-group__item"> |
587 | <input type="text" class="input" value="{{ $company->end_work }}" disabled> | 587 | <input type="text" class="input" value="{{ $company->end_work }}" disabled> |
588 | </div> | 588 | </div> |
589 | </div> | 589 | </div> |
590 | 590 | ||
591 | </div> | 591 | </div> |
592 | </div> | 592 | </div> |
593 | </div> | 593 | </div> |
594 | @php $i++ @endphp | 594 | @php $i++ @endphp |
595 | @endforeach | 595 | @endforeach |
596 | @endif | 596 | @endif |
597 | </div> | 597 | </div> |
598 | 598 | ||
599 | </div> | 599 | </div> |
600 | 600 | ||
601 | <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add" style="width:100%; max-width:none;">Новое место работы</a> | 601 | <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add" style="width:100%; max-width:none;">Новое место работы</a> |
602 | 602 | ||
603 | <div id="prev_worker" name="prev_worker"> | 603 | <div id="prev_worker" name="prev_worker"> |
604 | @if ((isset($Worker[0]->prev_company)) && ($Worker[0]->prev_company->count() > 0)) | 604 | @if ((isset($Worker[0]->prev_company)) && ($Worker[0]->prev_company->count() > 0)) |
605 | @php $i = 0; @endphp | 605 | @php $i = 0; @endphp |
606 | @foreach($Worker[0]->prev_company as $it) | 606 | @foreach($Worker[0]->prev_company as $it) |
607 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | 607 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
608 | @if ($i == 0) | 608 | @if ($i == 0) |
609 | <h3 class="cabinet__subtitle">Контакты предыдущих компаний</h3> | 609 | <h3 class="cabinet__subtitle">Контакты предыдущих компаний</h3> |
610 | @endif | 610 | @endif |
611 | <h4 class="cabinet__h4">Компания {{ $i+1 }}</h4> | 611 | <h4 class="cabinet__h4">Компания {{ $i+1 }}</h4> |
612 | <div class="cabinet__inputs"> | 612 | <div class="cabinet__inputs"> |
613 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 613 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
614 | <label class="form-group__label">Название компании</label> | 614 | <label class="form-group__label">Название компании</label> |
615 | <div class="form-group__item"> | 615 | <div class="form-group__item"> |
616 | <input type="text" class="input" value="{{ $it->name_company }}" > | 616 | <input type="text" class="input" value="{{ $it->name_company }}" > |
617 | </div> | 617 | </div> |
618 | </div> | 618 | </div> |
619 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 619 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
620 | <label class="form-group__label">ФИО сотрудника</label> | 620 | <label class="form-group__label">ФИО сотрудника</label> |
621 | <div class="form-group__item"> | 621 | <div class="form-group__item"> |
622 | <input type="text" class="input" value="{{ $it->direct }}" > | 622 | <input type="text" class="input" value="{{ $it->direct }}" > |
623 | </div> | 623 | </div> |
624 | </div> | 624 | </div> |
625 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 625 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
626 | <label class="form-group__label">Должность сотрудника</label> | 626 | <label class="form-group__label">Должность сотрудника</label> |
627 | <div class="form-group__item"> | 627 | <div class="form-group__item"> |
628 | <input type="text" class="input" value="{{ $it->telephone }}" > | 628 | <input type="text" class="input" value="{{ $it->telephone }}" > |
629 | </div> | 629 | </div> |
630 | </div> | 630 | </div> |
631 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 631 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
632 | <label class="form-group__label">Телефон сотрудника</label> | 632 | <label class="form-group__label">Телефон сотрудника</label> |
633 | <div class="form-group__item"> | 633 | <div class="form-group__item"> |
634 | <input type="text" class="input" value="{{ $it->telephone2 }}" > | 634 | <input type="text" class="input" value="{{ $it->telephone2 }}" > |
635 | </div> | 635 | </div> |
636 | </div> | 636 | </div> |
637 | <a href="{{ route('worker.delete_prev_company', ['doc' => $it->id]) }}" class="button button_light"> | 637 | <a href="{{ route('worker.delete_prev_company', ['doc' => $it->id]) }}" class="button button_light"> |
638 | <svg> | 638 | <svg> |
639 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 639 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
640 | </svg> | 640 | </svg> |
641 | Удалить | 641 | Удалить |
642 | </a> | 642 | </a> |
643 | <a href="{{ route('worker.edit_prev_company', ['worker' => $Worker[0]->id, 'doc' => $it->id ]) }}" class="button">Редактирование</a> | 643 | <a href="{{ route('worker.edit_prev_company', ['worker' => $Worker[0]->id, 'doc' => $it->id ]) }}" class="button">Редактирование</a> |
644 | </div> | 644 | </div> |
645 | </div> | 645 | </div> |
646 | @php $i++ @endphp | 646 | @php $i++ @endphp |
647 | @endforeach | 647 | @endforeach |
648 | @else | 648 | @else |
649 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | 649 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
650 | <h3 class="cabinet__subtitle">Предыдущие компании</h3> | 650 | <h3 class="cabinet__subtitle">Предыдущие компании</h3> |
651 | Нет предыдущих компаний | 651 | Нет предыдущих компаний |
652 | </div> | 652 | </div> |
653 | @endif | 653 | @endif |
654 | </div> | 654 | </div> |
655 | 655 | ||
656 | <div class="cabinet__body-item"> | 656 | <div class="cabinet__body-item"> |
657 | <a class="button button_light" href="{{ route('worker.new_prev_company',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc"> | 657 | <a class="button button_light" href="{{ route('worker.new_prev_company',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc"> |
658 | Добавить официльную контактную информацию | 658 | Добавить официльную контактную информацию |
659 | </a> | 659 | </a> |
660 | </div> | 660 | </div> |
661 | 661 | ||
662 | </form> | 662 | </form> |
663 | </div> | 663 | </div> |
664 | </div> | 664 | </div> |
665 | </section> | 665 | </section> |
666 | </div> | 666 | </div> |
667 | <div> | 667 | <div> |
668 | @endsection | 668 | @endsection |
669 | 669 |
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_edit_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 | <h4 class="cabinet__h4">Добавление контакта предыдущей компании</h4> | 49 | <h4 class="cabinet__h4">Добавление контакта предыдущей компании</h4> |
50 | <form id="submit_form" name="submit_form" action="{{ route('worker.update_prev_company', ['doc' => $doc]) }}" class="cabinet__inputs" method="POST"> | 50 | <form id="submit_form" name="submit_form" action="{{ route('worker.update_prev_company', ['doc' => $doc]) }}" class="cabinet__inputs" method="POST"> |
51 | @csrf | 51 | @csrf |
52 | <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}"> | 52 | <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}"> |
53 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 53 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
54 | <label class="form-group__label">Название компании</label> | 54 | <label class="form-group__label">Название компании</label> |
55 | <div class="form-group__item"> | 55 | <div class="form-group__item"> |
56 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}"> | 56 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}"> |
57 | </div> | 57 | </div> |
58 | </div> | 58 | </div> |
59 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 59 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
60 | <label class="form-group__label">ФИО сотрудника</label> | 60 | <label class="form-group__label">ФИО сотрудника</label> |
61 | <div class="form-group__item"> | 61 | <div class="form-group__item"> |
62 | <input type="text" name="direct" id="direct" class="input" value="{{ old('direct') ?? $doc->direct ?? '' }}"> | 62 | <input type="text" name="direct" id="direct" class="input" value="{{ old('direct') ?? $doc->direct ?? '' }}"> |
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 65 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
66 | <label class="form-group__label">Должность сотрудника</label> | 66 | <label class="form-group__label">Должность сотрудника</label> |
67 | <div class="form-group__item"> | 67 | <div class="form-group__item"> |
68 | <input type="text" name="telephone" id="telephone" class="input" value="{{ old('telephone') ?? $doc->telephone ?? '' }}"> | 68 | <input type="text" name="telephone" id="telephone" class="input" value="{{ old('telephone') ?? $doc->telephone ?? '' }}"> |
69 | </div> | 69 | </div> |
70 | </div> | 70 | </div> |
71 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 71 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
72 | <label class="form-group__label">Телефон сотрудника</label> | 72 | <label class="form-group__label">Телефон сотрудника</label> |
73 | <div class="form-group__item"> | 73 | <div class="form-group__item"> |
74 | <input type="text" name="telephone2" id="telephone2" class="input" value="{{ old('telephone2') ?? $doc->telephone2 ?? '' }}"> | 74 | <input type="text" name="telephone2" id="telephone2" class="input" value="{{ old('telephone2') ?? $doc->telephone2 ?? '' }}"> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | <button type="submit" class="button">Сохранить</button> | 77 | <button type="submit" class="button">Сохранить</button> |
78 | <a href="{{ route('worker.cabinet') }}" class="button">Назад</a> | 78 | <a href="{{ route('worker.cabinet') }}" class="button">Назад</a> |
79 | </form> | 79 | </form> |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
82 | </div> | 82 | </div> |
83 | </div> | 83 | </div> |
84 | </section> | 84 | </section> |
85 | 85 | ||
86 | @endsection | 86 | @endsection |
87 | 87 |
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 |
routes/web.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use App\Http\Controllers\Ad_jobsController; | 3 | use App\Http\Controllers\Ad_jobsController; |
4 | use App\Http\Controllers\AdEmployerController; | 4 | use App\Http\Controllers\AdEmployerController; |
5 | use App\Http\Controllers\Admin\AdminController; | 5 | use App\Http\Controllers\Admin\AdminController; |
6 | use App\Http\Controllers\Admin\CategoryController; | 6 | use App\Http\Controllers\Admin\CategoryController; |
7 | use App\Http\Controllers\Admin\CategoryEmpController; | 7 | use App\Http\Controllers\Admin\CategoryEmpController; |
8 | use App\Http\Controllers\Admin\EducationController; | 8 | use App\Http\Controllers\Admin\EducationController; |
9 | use App\Http\Controllers\Admin\EmployersController; | 9 | use App\Http\Controllers\Admin\EmployersController; |
10 | use App\Http\Controllers\EmployerController as FrontEmployersController; | 10 | use App\Http\Controllers\EmployerController as FrontEmployersController; |
11 | use App\Http\Controllers\Admin\InfoBloksController; | 11 | use App\Http\Controllers\Admin\InfoBloksController; |
12 | use App\Http\Controllers\Admin\JobTitlesController; | 12 | use App\Http\Controllers\Admin\JobTitlesController; |
13 | use App\Http\Controllers\Admin\UsersController; | 13 | use App\Http\Controllers\Admin\UsersController; |
14 | use App\Http\Controllers\Admin\WorkersController; | 14 | use App\Http\Controllers\Admin\WorkersController; |
15 | use App\Http\Controllers\Auth\ForgotPasswordController; | 15 | use App\Http\Controllers\Auth\ForgotPasswordController; |
16 | use App\Http\Controllers\Auth\LoginController; | 16 | use App\Http\Controllers\Auth\LoginController; |
17 | use App\Http\Controllers\Auth\RegisterController; | 17 | use App\Http\Controllers\Auth\RegisterController; |
18 | use App\Http\Controllers\CKEditorController; | 18 | use App\Http\Controllers\CKEditorController; |
19 | use App\Http\Controllers\MediaController; | 19 | use App\Http\Controllers\MediaController; |
20 | use App\Http\Controllers\WorkerController; | 20 | use App\Http\Controllers\WorkerController; |
21 | use App\Models\Ad_jobs; | 21 | use App\Models\Ad_jobs; |
22 | use App\Models\User; | 22 | use App\Models\User; |
23 | use App\Http\Controllers\MainController; | 23 | use App\Http\Controllers\MainController; |
24 | use App\Http\Controllers\HomeController; | 24 | use App\Http\Controllers\HomeController; |
25 | use Illuminate\Support\Facades\Route; | 25 | use Illuminate\Support\Facades\Route; |
26 | use App\Http\Controllers\Admin\CompanyController; | 26 | use App\Http\Controllers\Admin\CompanyController; |
27 | use App\Http\Controllers\Admin\Ad_EmployersController; | 27 | use App\Http\Controllers\Admin\Ad_EmployersController; |
28 | use App\Http\Controllers\Admin\MsgAnswersController; | 28 | use App\Http\Controllers\Admin\MsgAnswersController; |
29 | use App\Http\Controllers\Admin\GroupsController; | 29 | use App\Http\Controllers\Admin\GroupsController; |
30 | use App\Http\Controllers\PagesController; | 30 | use App\Http\Controllers\PagesController; |
31 | use Illuminate\Support\Facades\Storage; | 31 | use Illuminate\Support\Facades\Storage; |
32 | use App\Http\Controllers\EmployerController; | 32 | use App\Http\Controllers\EmployerController; |
33 | use App\Http\Controllers\CompanyController as FrontCompanyController; | 33 | use App\Http\Controllers\CompanyController as FrontCompanyController; |
34 | 34 | ||
35 | 35 | ||
36 | /* | 36 | /* |
37 | |-------------------------------------------------------------------------- | 37 | |-------------------------------------------------------------------------- |
38 | | Web Routes | 38 | | Web Routes |
39 | |-------------------------------------------------------------------------- | 39 | |-------------------------------------------------------------------------- |
40 | | | 40 | | |
41 | | Here is where you can register web routes for your application. These | 41 | | Here is where you can register web routes for your application. These |
42 | | routes are loaded by the RouteServiceProvider within a group which | 42 | | routes are loaded by the RouteServiceProvider within a group which |
43 | | contains the "web" middleware group. Now create something great! | 43 | | contains the "web" middleware group. Now create something great! |
44 | | | 44 | | |
45 | */ | 45 | */ |
46 | /* | 46 | /* |
47 | Route::get('/', function () { | 47 | Route::get('/', function () { |
48 | return view('welcome'); | 48 | return view('welcome'); |
49 | })->name('index'); | 49 | })->name('index'); |
50 | */ | 50 | */ |
51 | 51 | ||
52 | Route::get('/', [MainController::class, 'index'])->name('index'); | 52 | Route::get('/', [MainController::class, 'index'])->name('index'); |
53 | 53 | ||
54 | //Роуты авторизации, регистрации, восстановления, аутентификации | 54 | //Роуты авторизации, регистрации, восстановления, аутентификации |
55 | Auth::routes(['verify' => true]); | 55 | Auth::routes(['verify' => true]); |
56 | 56 | ||
57 | // роуты регистрации, авторизации, восстановления пароля, верификации почты | 57 | // роуты регистрации, авторизации, восстановления пароля, верификации почты |
58 | /*Route::group([ | 58 | /*Route::group([ |
59 | 'as' => 'auth.', //имя маршрута, например auth.index | 59 | 'as' => 'auth.', //имя маршрута, например auth.index |
60 | 'prefix' => 'auth', // префикс маршрута, например, auth/index | 60 | 'prefix' => 'auth', // префикс маршрута, например, auth/index |
61 | ], function () { | 61 | ], function () { |
62 | //форма регистрации | 62 | //форма регистрации |
63 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 63 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
64 | 64 | ||
65 | //создание пользователя | 65 | //создание пользователя |
66 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 66 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
67 | 67 | ||
68 | //форма входа авторизации | 68 | //форма входа авторизации |
69 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 69 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
70 | 70 | ||
71 | //аутентификация | 71 | //аутентификация |
72 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); | 72 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); |
73 | 73 | ||
74 | //выход | 74 | //выход |
75 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 75 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
76 | 76 | ||
77 | //форма ввода адреса почты | 77 | //форма ввода адреса почты |
78 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); | 78 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); |
79 | 79 | ||
80 | //письмо на почту | 80 | //письмо на почту |
81 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); | 81 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); |
82 | 82 | ||
83 | //форма восстановления пароля | 83 | //форма восстановления пароля |
84 | Route::get('reset-password/token/{token}/email/{email}', | 84 | Route::get('reset-password/token/{token}/email/{email}', |
85 | [ResetPasswordController::class, 'form'] | 85 | [ResetPasswordController::class, 'form'] |
86 | )->name('reset-form'); | 86 | )->name('reset-form'); |
87 | 87 | ||
88 | //восстановление пароля | 88 | //восстановление пароля |
89 | Route::post('reset-password', | 89 | Route::post('reset-password', |
90 | [ResetPasswordController::class, 'reset'] | 90 | [ResetPasswordController::class, 'reset'] |
91 | )->name('reset-password'); | 91 | )->name('reset-password'); |
92 | 92 | ||
93 | //сообщение о необходимости проверки адреса почты | 93 | //сообщение о необходимости проверки адреса почты |
94 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); | 94 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); |
95 | 95 | ||
96 | //подтверждение адреса почты нового пользователя | 96 | //подтверждение адреса почты нового пользователя |
97 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) | 97 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) |
98 | ->where('token', '[a-f0-9]{32}') | 98 | ->where('token', '[a-f0-9]{32}') |
99 | ->where('id', '[0-9]+') | 99 | ->where('id', '[0-9]+') |
100 | ->name('verify-email'); | 100 | ->name('verify-email'); |
101 | });*/ | 101 | });*/ |
102 | 102 | ||
103 | //Личный кабинет пользователя | 103 | //Личный кабинет пользователя |
104 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 104 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 107 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
108 | $user = User::where('email',$request->input('email'))->first(); | 108 | $user = User::where('email',$request->input('email'))->first(); |
109 | 109 | ||
110 | $user->sendEmailVerificationNotification(); | 110 | $user->sendEmailVerificationNotification(); |
111 | 111 | ||
112 | return 'your response'; | 112 | return 'your response'; |
113 | })->middleware('throttle:6,1')->name('verification.resend'); | 113 | })->middleware('throttle:6,1')->name('verification.resend'); |
114 | */ | 114 | */ |
115 | 115 | ||
116 | // Авторизация, регистрация в админку | 116 | // Авторизация, регистрация в админку |
117 | Route::group([ | 117 | Route::group([ |
118 | 'as' => 'admin.', // имя маршрута, например auth.index | 118 | 'as' => 'admin.', // имя маршрута, например auth.index |
119 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 119 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
120 | 'middleware' => ['guest'], | 120 | 'middleware' => ['guest'], |
121 | ], function () { | 121 | ], function () { |
122 | // Форма регистрации | 122 | // Форма регистрации |
123 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 123 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
124 | // Создание пользователя | 124 | // Создание пользователя |
125 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 125 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
126 | 126 | ||
127 | //Форма входа | 127 | //Форма входа |
128 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 128 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
129 | 129 | ||
130 | // аутентификация | 130 | // аутентификация |
131 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 131 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
132 | 132 | ||
133 | }); | 133 | }); |
134 | 134 | ||
135 | // Личный кабинет админки | 135 | // Личный кабинет админки |
136 | Route::group([ | 136 | Route::group([ |
137 | 'as' => 'admin.', // имя маршрута, например auth.index | 137 | 'as' => 'admin.', // имя маршрута, например auth.index |
138 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 138 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
139 | 'middleware' => ['auth'], ['admin'], | 139 | 'middleware' => ['auth'], ['admin'], |
140 | ], function() { | 140 | ], function() { |
141 | 141 | ||
142 | // выход | 142 | // выход |
143 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 143 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
144 | 144 | ||
145 | // кабинет главная страница | 145 | // кабинет главная страница |
146 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 146 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
147 | 147 | ||
148 | // кабинет профиль админа - форма | 148 | // кабинет профиль админа - форма |
149 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 149 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
150 | // кабинет профиль админа - сохранение формы | 150 | // кабинет профиль админа - сохранение формы |
151 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 151 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
152 | 152 | ||
153 | //кабинет сообщения админа | 153 | //кабинет сообщения админа |
154 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); | 154 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); |
155 | 155 | ||
156 | 156 | ||
157 | // кабинет профиль - форма пароли | 157 | // кабинет профиль - форма пароли |
158 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 158 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
159 | // кабинет профиль - сохранение формы пароля | 159 | // кабинет профиль - сохранение формы пароля |
160 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 160 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
161 | 161 | ||
162 | 162 | ||
163 | // кабинет профиль пользователя - форма | 163 | // кабинет профиль пользователя - форма |
164 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 164 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
165 | // кабинет профиль пользователя - сохранение формы | 165 | // кабинет профиль пользователя - сохранение формы |
166 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 166 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
167 | 167 | ||
168 | // кабинет профиль работодатель - форма | 168 | // кабинет профиль работодатель - форма |
169 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 169 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
170 | // кабинет профиль работодатель - сохранение формы | 170 | // кабинет профиль работодатель - сохранение формы |
171 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 171 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
172 | // кабинет удаление профиль работодателя и юзера | 172 | // кабинет удаление профиль работодателя и юзера |
173 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); | 173 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); |
174 | 174 | ||
175 | // кабинет профиль работник - форма | 175 | // кабинет профиль работник - форма |
176 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); | 176 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); |
177 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); | 177 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); |
178 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); | 178 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); |
179 | // кабинет профиль работник - сохранение формы | 179 | // кабинет профиль работник - сохранение формы |
180 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); | 180 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); |
181 | 181 | ||
182 | // Медиа | 182 | // Медиа |
183 | Route::get('media', [MediaController::class, 'index'])->name('media'); | 183 | Route::get('media', [MediaController::class, 'index'])->name('media'); |
184 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); | 184 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); |
185 | 185 | ||
186 | // кабинет настройки сайта - форма | 186 | // кабинет настройки сайта - форма |
187 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 187 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
188 | // кабинет настройки сайта сохранение формы | 188 | // кабинет настройки сайта сохранение формы |
189 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 189 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
190 | 190 | ||
191 | // кабинет - новости | 191 | // кабинет - новости |
192 | Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); | 192 | Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); |
193 | Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); | 193 | Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); |
194 | Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); | 194 | Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); |
195 | Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); | 195 | Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); |
196 | Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); | 196 | Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); |
197 | Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); | 197 | Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); |
198 | 198 | ||
199 | // кабинет - пользователи | 199 | // кабинет - пользователи |
200 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 200 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
201 | 201 | ||
202 | // кабинет - пользователи | 202 | // кабинет - пользователи |
203 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 203 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
204 | 204 | ||
205 | // кабинет - работодатели | 205 | // кабинет - работодатели |
206 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 206 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
207 | 207 | ||
208 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); | 208 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); |
209 | 209 | ||
210 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); | 210 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); |
211 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); | 211 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); |
212 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); | 212 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); |
213 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); | 213 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); |
214 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); | 214 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); |
215 | 215 | ||
216 | // кабинет - соискатели | 216 | // кабинет - соискатели |
217 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 217 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
218 | 218 | ||
219 | // кабинет - база данных | 219 | // кабинет - база данных |
220 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); | 220 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); |
221 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); | 221 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); |
222 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); | 222 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); |
223 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); | 223 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); |
224 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); | 224 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); |
225 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); | 225 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); |
226 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); | 226 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); |
227 | 227 | ||
228 | // кабинет - вакансии | 228 | // кабинет - вакансии |
229 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 229 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
230 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); | 230 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); |
231 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); | 231 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); |
232 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); | 232 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); |
233 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); | 233 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); |
234 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); | 234 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); |
235 | 235 | ||
236 | // Редактирование должности в вакансии | 236 | // Редактирование должности в вакансии |
237 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); | 237 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); |
238 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); | 238 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); |
239 | 239 | ||
240 | 240 | ||
241 | // кабинет - категории | 241 | // кабинет - категории |
242 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 242 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
243 | 243 | ||
244 | // СRUD-операции над Справочником Категории | 244 | // СRUD-операции над Справочником Категории |
245 | 245 | ||
246 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 246 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
247 | 247 | ||
248 | // CRUD-операции над справочником Категории для работодателей | 248 | // CRUD-операции над справочником Категории для работодателей |
249 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); | 249 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); |
250 | 250 | ||
251 | // CRUD-операции над справочником Образование | 251 | // CRUD-операции над справочником Образование |
252 | Route::resource('education', EducationController::class, ['except' => ['show']]); | 252 | Route::resource('education', EducationController::class, ['except' => ['show']]); |
253 | 253 | ||
254 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); | 254 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); |
255 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); | 255 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); |
256 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); | 256 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); |
257 | 257 | ||
258 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); | 258 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); |
259 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); | 259 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); |
260 | 260 | ||
261 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); | 261 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); |
262 | 262 | ||
263 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 263 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
264 | /* | 264 | /* |
265 | * кабинет - CRUD-операции по справочнику должности | 265 | * кабинет - CRUD-операции по справочнику должности |
266 | * | 266 | * |
267 | */ | 267 | */ |
268 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 268 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
269 | 269 | ||
270 | // кабинет - сообщения (чтение чужих) | 270 | // кабинет - сообщения (чтение чужих) |
271 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 271 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
272 | // кабинет - просмотр сообщения чужого (чтение) | 272 | // кабинет - просмотр сообщения чужого (чтение) |
273 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); | 273 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); |
274 | 274 | ||
275 | // кабинет - сообщения (админские) | 275 | // кабинет - сообщения (админские) |
276 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); | 276 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); |
277 | // кабинет - сообщения (админские) | 277 | // кабинет - сообщения (админские) |
278 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); | 278 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); |
279 | // кабинет - sql - конструкция запросов | 279 | // кабинет - sql - конструкция запросов |
280 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); | 280 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); |
281 | 281 | ||
282 | /* | 282 | /* |
283 | * Расписанный подход в описании каждой директорий групп пользователей. | 283 | * Расписанный подход в описании каждой директорий групп пользователей. |
284 | */ | 284 | */ |
285 | // кабинет - группы пользователей | 285 | // кабинет - группы пользователей |
286 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 286 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
287 | // кабинет - добавление форма группы пользователей | 287 | // кабинет - добавление форма группы пользователей |
288 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 288 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
289 | // кабинет - сохранение формы группы пользователей | 289 | // кабинет - сохранение формы группы пользователей |
290 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 290 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
291 | // кабинет - редактирование форма группы пользователей | 291 | // кабинет - редактирование форма группы пользователей |
292 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 292 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
293 | // кабинет - сохранение редактированной формы группы пользователей | 293 | // кабинет - сохранение редактированной формы группы пользователей |
294 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 294 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
295 | // кабинет - удаление группы пользователей | 295 | // кабинет - удаление группы пользователей |
296 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 296 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
297 | 297 | ||
298 | 298 | ||
299 | // кабинет - список админов | 299 | // кабинет - список админов |
300 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 300 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
301 | 301 | ||
302 | // справочник Позиции | 302 | // справочник Позиции |
303 | Route::get('positions', [AdminController::class, 'position'])->name('position'); | 303 | Route::get('positions', [AdminController::class, 'position'])->name('position'); |
304 | Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); | 304 | Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); |
305 | Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); | 305 | Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); |
306 | Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); | 306 | Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); |
307 | Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); | 307 | Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); |
308 | Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); | 308 | Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); |
309 | 309 | ||
310 | /////редактор////// кабинет - редактор сайта//////////////////////// | 310 | /////редактор////// кабинет - редактор сайта//////////////////////// |
311 | Route::get('editor-site', function() { | 311 | Route::get('editor-site', function() { |
312 | return view('admin.editor.index'); | 312 | return view('admin.editor.index'); |
313 | })->name('editor-site'); | 313 | })->name('editor-site'); |
314 | 314 | ||
315 | 315 | ||
316 | // кабинет - редактор шапки-футера сайта | 316 | // кабинет - редактор шапки-футера сайта |
317 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 317 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
318 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); | 318 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); |
319 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); | 319 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); |
320 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); | 320 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); |
321 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); | 321 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); |
322 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); | 322 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); |
323 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); | 323 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); |
324 | 324 | ||
325 | 325 | ||
326 | // кабинет - редактор должности на главной | 326 | // кабинет - редактор должности на главной |
327 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 327 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
328 | 328 | ||
329 | // кабинет - редактор работодатели на главной | 329 | // кабинет - редактор работодатели на главной |
330 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 330 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
331 | 331 | ||
332 | 332 | ||
333 | // кабинет - редактор seo-сайта | 333 | // кабинет - редактор seo-сайта |
334 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 334 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
335 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); | 335 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); |
336 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); | 336 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); |
337 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); | 337 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); |
338 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); | 338 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); |
339 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); | 339 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); |
340 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); | 340 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); |
341 | 341 | ||
342 | 342 | ||
343 | // кабинет - редактор страниц | 343 | // кабинет - редактор страниц |
344 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 344 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
345 | // кабинет - добавление страницы | 345 | // кабинет - добавление страницы |
346 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | 346 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); |
347 | // кабинет - сохранение формы страницы | 347 | // кабинет - сохранение формы страницы |
348 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | 348 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); |
349 | // кабинет - редактирование форма страницы | 349 | // кабинет - редактирование форма страницы |
350 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | 350 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); |
351 | // кабинет - сохранение редактированной формы страницы | 351 | // кабинет - сохранение редактированной формы страницы |
352 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | 352 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); |
353 | // кабинет - удаление страницы | 353 | // кабинет - удаление страницы |
354 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | 354 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); |
355 | 355 | ||
356 | 356 | ||
357 | // кабинет - реклама сайта | 357 | // кабинет - реклама сайта |
358 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 358 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
359 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); | 359 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); |
360 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); | 360 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); |
361 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); | 361 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); |
362 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); | 362 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); |
363 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); | 363 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); |
364 | //////////////////////////////////////////////////////////////////////// | 364 | //////////////////////////////////////////////////////////////////////// |
365 | 365 | ||
366 | 366 | ||
367 | // кабинет - отзывы о работодателе для модерации | 367 | // кабинет - отзывы о работодателе для модерации |
368 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 368 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
369 | 369 | ||
370 | // Общая страница статистики | 370 | // Общая страница статистики |
371 | Route::get('statics', function () { | 371 | Route::get('statics', function () { |
372 | return view('admin.static.index'); | 372 | return view('admin.static.index'); |
373 | })->name('statics'); | 373 | })->name('statics'); |
374 | 374 | ||
375 | // кабинет - статистика работников | 375 | // кабинет - статистика работников |
376 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 376 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
377 | 377 | ||
378 | // кабинет - статистика вакансий работодателя | 378 | // кабинет - статистика вакансий работодателя |
379 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 379 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
380 | 380 | ||
381 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 381 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
382 | /* | 382 | /* |
383 | * CRUD-операции над справочником дипломы и документы | 383 | * CRUD-операции над справочником дипломы и документы |
384 | */ | 384 | */ |
385 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 385 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
386 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 386 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
387 | 387 | ||
388 | // кабинет - роли пользователя | 388 | // кабинет - роли пользователя |
389 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 389 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
390 | 390 | ||
391 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); | 391 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); |
392 | 392 | ||
393 | Route::get('logs', function() { | 393 | Route::get('logs', function() { |
394 | $files = Storage::files('logs/laravel.log'); | 394 | $files = Storage::files('logs/laravel.log'); |
395 | })->name('logs'); | 395 | })->name('logs'); |
396 | }); | 396 | }); |
397 | 397 | ||
398 | // Инструментальные страницы | 398 | // Инструментальные страницы |
399 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); | 399 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); |
400 | 400 | ||
401 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); | 401 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); |
402 | 402 | ||
403 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); | 403 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); |
404 | 404 | ||
405 | // Страницы с произвольным контентом | 405 | // Страницы с произвольным контентом |
406 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); | 406 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); |
407 | 407 | ||
408 | // Публичные страницы соискателя | 408 | // Публичные страницы соискателя |
409 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); | 409 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); |
410 | 410 | ||
411 | //Страница вакансии | 411 | //Страница вакансии |
412 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); | 412 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); |
413 | 413 | ||
414 | //Вакансии | 414 | //Вакансии |
415 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); | 415 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); |
416 | 416 | ||
417 | //Вакансии поиск на главной | 417 | //Вакансии поиск на главной |
418 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); | 418 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); |
419 | 419 | ||
420 | //Вакансии категория детальная | 420 | //Вакансии категория детальная |
421 | Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); | 421 | Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); |
422 | 422 | ||
423 | // Лайк вакансии | 423 | // Лайк вакансии |
424 | Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); | 424 | Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); |
425 | 425 | ||
426 | //Детальная страница вакансии - работодателя | 426 | //Детальная страница вакансии - работодателя |
427 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); | 427 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); |
428 | 428 | ||
429 | //Судоходные компании | 429 | //Судоходные компании |
430 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); | 430 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); |
431 | 431 | ||
432 | //Детальная инфа о компании | 432 | //Детальная инфа о компании |
433 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); | 433 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); |
434 | 434 | ||
435 | //Образование | 435 | //Образование |
436 | Route::get('education', [MainController::class, 'education'])->name('education'); | 436 | Route::get('education', [MainController::class, 'education'])->name('education'); |
437 | 437 | ||
438 | //Новости | 438 | //Новости |
439 | Route::get('news', [MainController::class, 'news'])->name('news'); | 439 | Route::get('news', [MainController::class, 'news'])->name('news'); |
440 | Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); | 440 | Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); |
441 | 441 | ||
442 | //Контакты | 442 | //Контакты |
443 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); | 443 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); |
444 | 444 | ||
445 | //База резюме | 445 | //База резюме |
446 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); | 446 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); |
447 | 447 | ||
448 | Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); | 448 | Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); |
449 | 449 | ||
450 | //Анкета соискателя | 450 | //Анкета соискателя |
451 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); | 451 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); |
452 | 452 | ||
453 | //Скачать резюме | 453 | //Скачать резюме |
454 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); | 454 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); |
455 | Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); | 455 | Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); |
456 | Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); | 456 | Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); |
457 | 457 | ||
458 | 458 | ||
459 | //Вход в кабинет | 459 | //Вход в кабинет |
460 | Route::get('login', [MainController::class, 'input_login'])->name('login'); | 460 | Route::get('login', [MainController::class, 'input_login'])->name('login'); |
461 | 461 | ||
462 | // Выход из кабинета | 462 | // Выход из кабинета |
463 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); | 463 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); |
464 | 464 | ||
465 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); | 465 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); |
466 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); | 466 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); |
467 | 467 | ||
468 | //восстановление пароля | 468 | //восстановление пароля |
469 | Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); | 469 | Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); |
470 | // Звезда сообщения | 470 | // Звезда сообщения |
471 | Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); | 471 | Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); |
472 | 472 | ||
473 | // Борьба | 473 | // Борьба |
474 | Route::get('clear_cookie', function() { | 474 | Route::get('clear_cookie', function() { |
475 | \App\Classes\Cookies_vacancy::clear_vacancy(); | 475 | \App\Classes\Cookies_vacancy::clear_vacancy(); |
476 | return redirect()->route('index'); | 476 | return redirect()->route('index'); |
477 | })->name('clear_cookie'); | 477 | })->name('clear_cookie'); |
478 | 478 | ||
479 | Route::get('cookies', function() { | 479 | Route::get('cookies', function() { |
480 | return view('cookies'); | 480 | return view('cookies'); |
481 | })->name('cookies'); | 481 | })->name('cookies'); |
482 | 482 | ||
483 | // Личный кабинет работник | 483 | // Личный кабинет работник |
484 | Route::group([ | 484 | Route::group([ |
485 | 'as' => 'worker.', // имя маршрута, например auth.index | 485 | 'as' => 'worker.', // имя маршрута, например auth.index |
486 | 'prefix' => 'worker', // префикс маршрута, например auth/index | 486 | 'prefix' => 'worker', // префикс маршрута, например auth/index |
487 | 'middleware' => ['auth'], ['is_worker'], | 487 | 'middleware' => ['auth'], ['is_worker'], |
488 | ], function() { | 488 | ], function() { |
489 | // 1 страница - Моя анкета | 489 | // 1 страница - Моя анкета |
490 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); | 490 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); |
491 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); | 491 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); |
492 | 492 | ||
493 | // 2 страница - Сообщения | 493 | // 2 страница - Сообщения |
494 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); | 494 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); |
495 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); | 495 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); |
496 | // 3 страница - Избранные вакансии | 496 | // 3 страница - Избранные вакансии |
497 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); | 497 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); |
498 | // Продолжение борьбы против колорадов - избранные вакансии | 498 | // Продолжение борьбы против колорадов - избранные вакансии |
499 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); | 499 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); |
500 | 500 | ||
501 | // 4 страница - Сменить пароль | 501 | // 4 страница - Сменить пароль |
502 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); | 502 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); |
503 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); | 503 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); |
504 | 504 | ||
505 | // 5 страница - Удалить профиль | 505 | // 5 страница - Удалить профиль |
506 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); | 506 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); |
507 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); | 507 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); |
508 | 508 | ||
509 | // Резюме -pdf | 509 | // Резюме -pdf |
510 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); | 510 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); |
511 | 511 | ||
512 | // Поднятие анкеты | 512 | // Поднятие анкеты |
513 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); | 513 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); |
514 | 514 | ||
515 | // Добавление сертификата | 515 | // Добавление сертификата |
516 | Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); | 516 | Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); |
517 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); | 517 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); |
518 | Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); | 518 | Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); |
519 | Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); | 519 | Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); |
520 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); | 520 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); |
521 | 521 | ||
522 | // Добавление предыдущих контактов компании | 522 | // Добавление предыдущих контактов компании |
523 | Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); | 523 | Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); |
524 | Route::get('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); | 524 | Route::get('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); |
525 | Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); | 525 | Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); |
526 | Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); | 526 | Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); |
527 | Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); | 527 | Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); |
528 | 528 | ||
529 | // Добавление документа-диплома | 529 | // Добавление документа-диплома |
530 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); | 530 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); |
531 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); | 531 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); |
532 | Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); | 532 | Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); |
533 | 533 | ||
534 | // Добавление стандартного диплома | 534 | // Добавление стандартного диплома |
535 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); | 535 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); |
536 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); | 536 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); |
537 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); | 537 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); |
538 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); | 538 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); |
539 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); | 539 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); |
540 | 540 | ||
541 | // Отправка сообщения работодателю от соискателя | 541 | // Отправка сообщения работодателю от соискателя |
542 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); | 542 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); |
543 | }); | 543 | }); |
544 | 544 | ||
545 | // Личный кабинет работодателя | 545 | // Личный кабинет работодателя |
546 | Route::group([ | 546 | Route::group([ |
547 | 'as' => 'employer.', // имя маршрута, например auth.index | 547 | 'as' => 'employer.', // имя маршрута, например auth.index |
548 | 'prefix' => 'employer', // префикс маршрута, например auth/index | 548 | 'prefix' => 'employer', // префикс маршрута, например auth/index |
549 | 'middleware' => ['auth'], !['is_worker'], | 549 | 'middleware' => ['auth'], !['is_worker'], |
550 | ], function() { | 550 | ], function() { |
551 | // 0 страница - Личные данные работодателя | 551 | // 0 страница - Личные данные работодателя |
552 | Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); | 552 | Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); |
553 | Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); | 553 | Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); |
554 | 554 | ||
555 | // 1 страница - Профиль | 555 | // 1 страница - Профиль |
556 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); | 556 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); |
557 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); | 557 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
558 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); | 558 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); |
559 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); | 559 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); |
560 | Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); | ||
561 | Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); | ||
560 | Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); | 562 | Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); |
561 | Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); | 563 | |
562 | Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); | 564 | // 2 страница - Добавление вакансий |
563 | 565 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | |
564 | // 2 страница - Добавление вакансий | 566 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); |
565 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | 567 | Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); |
566 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); | 568 | |
567 | Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); | 569 | |
568 | 570 | Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); | |
569 | 571 | ||
570 | Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); | 572 | // 3 страница - Мои вакансии |
571 | 573 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); | |
572 | // 3 страница - Мои вакансии | 574 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
573 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); | 575 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); |
574 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 576 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); |
575 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); | 577 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); |
576 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); | 578 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
577 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); | 579 | Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); |
578 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 580 | |
579 | Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); | 581 | // 4.1Ю. |
580 | 582 | Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); | |
581 | // 4.1Ю. | 583 | Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); |
582 | Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); | 584 | Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); |
583 | Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); | 585 | Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); |
584 | Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); | 586 | Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); |
585 | Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); | 587 | |
586 | Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); | 588 | // 4 страница - Отклики на вакансии |
587 | 589 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | |
588 | // 4 страница - Отклики на вакансии | 590 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); |
589 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | 591 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); |
590 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); | 592 | |
591 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); | 593 | // 5 страница - Сообщения |
592 | 594 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | |
593 | // 5 страница - Сообщения | 595 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); |
594 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | 596 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); |
595 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); | 597 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); |
596 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); | 598 | |
597 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); | 599 | // 6 страница - Избранный |
598 | 600 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | |
599 | // 6 страница - Избранный | 601 | |
600 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | 602 | //7 страница - База данных |
601 | 603 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | |
602 | //7 страница - База данных | 604 | |
603 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | 605 | //8 страница - База резюме |
604 | 606 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); | |
605 | //8 страница - База резюме | 607 | |
606 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); | 608 | // 9 рассылка сообщений |
607 | 609 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); | |
608 | // 9 рассылка сообщений | 610 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); |
609 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); | 611 | |
610 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); | 612 | // 10 страница FAQ вопросы |
611 | 613 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | |
612 | // 10 страница FAQ вопросы | 614 | |
613 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | 615 | // 11 страница - Настройка уведомлений |
614 | 616 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | |
615 | // 11 страница - Настройка уведомлений | 617 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); |
616 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | 618 | |
617 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); | 619 | // 12 страница - Сменить пароль |
618 | 620 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); | |
619 | // 12 страница - Сменить пароль | 621 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); |
620 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); | 622 | |
621 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); | 623 | // 13 страница - Удаление профиля |
622 | 624 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); | |
623 | // 13 страница - Удаление профиля | 625 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); |
624 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); | 626 | Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); |
625 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); | 627 | |
626 | Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); | 628 | // Отправил сообщение |
627 | 629 | Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); | |
628 | // Отправил сообщение | 630 | }); |
629 | Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); | 631 | |
630 | }); | 632 | Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); |
631 | 633 | ||
632 | Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); | 634 |