Commit b018ecae4771c8ef641dbe9e4659af2333ad32ac
Exists in
master
Сохранение резульатат
Showing 38 changed files Inline Diff
- app/Classes/StatusUser.php
- app/Http/Controllers/CompanyController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/DocumentsRequest.php
- app/Http/Requests/VacansiaRequiest.php
- app/Models/Dop_info.php
- app/Models/Title_worker.php
- app/Models/Worker.php
- app/Models/place_works.php
- app/Models/sertification.php
- app/Providers/MyServiceProvider.php
- database/migrations/2024_03_05_100903_create_title_workers_table.php
- resources/views/ajax/companies.blade.php
- resources/views/ajax/companies2.blade.php
- resources/views/ajax/documents.blade.php
- resources/views/ajax/dop_info.blade.php
- resources/views/ajax/education.blade.php
- resources/views/companies.blade.php
- resources/views/education.blade.php
- resources/views/employers/messages.blade.php
- resources/views/index.blade.php
- resources/views/info_company.blade.php
- resources/views/js/modals.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/list_vacancies.blade.php
- resources/views/modals/delete_profile.blade.php
- resources/views/modals/send_employer.blade.php
- resources/views/modals/send_message_noaut.blade.php
- resources/views/modals/send_worker.blade.php
- resources/views/modals/success_delete_profile.blade.php
- resources/views/modals/thank_you_send_for_employer.blade.php
- resources/views/modals/thank_you_send_for_worker.blade.php
- resources/views/workers/cabinet.blade.php
- resources/views/workers/docs-edit.blade.php
- resources/views/workers/docs.blade.php
- resources/views/workers/dop_info.blade.php
- routes/web.php
app/Classes/StatusUser.php
File was created | 1 | <?php | |
2 | |||
3 | |||
4 | namespace App\Classes; | ||
5 | |||
6 | |||
7 | class StatusUser | ||
8 | { | ||
9 | public static function Status() { | ||
10 | if (isset(Auth()->user()->id)) { | ||
11 | $is_worker = Auth()->user()->is_worker; | ||
12 | return $is_worker; | ||
13 | } else { | ||
14 | return false; | ||
15 | } | ||
16 | } | ||
17 | } | ||
18 |
app/Http/Controllers/CompanyController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Models\Employer; | 5 | use App\Models\Employer; |
6 | use Illuminate\Http\Request; | 6 | use Illuminate\Http\Request; |
7 | 7 | ||
8 | class CompanyController extends Controller | 8 | class CompanyController extends Controller |
9 | { | 9 | { |
10 | public function shipping_companies(Request $request) { | 10 | public function shipping_companies(Request $request) { |
11 | $emps = Employer::query()->with('ads'); | 11 | $emps = Employer::query()->with('ads'); |
12 | if ($request->get('search')) { | 12 | if (($request->has('search')) && (!empty($request->get('search')))) { |
13 | $search = $request->get('search'); | 13 | $search = $request->get('search'); |
14 | $emps = $emps->where('name_company', 'LIKE', "%$search%"); | 14 | $emps = $emps->where('name_company', 'LIKE', "%$search%"); |
15 | } | 15 | } |
16 | 16 | ||
17 | $count_emps = $emps->count(); | 17 | $count_emps = $emps->count(); |
18 | 18 | ||
19 | if ($request->get('sort')) { | 19 | if ($request->get('sort')) { |
20 | $sort = $request->get('sort'); | 20 | $sort = $request->get('sort'); |
21 | switch ($sort) { | 21 | switch ($sort) { |
22 | case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break; | 22 | case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break; |
23 | case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break; | 23 | case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break; |
24 | case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break; | 24 | case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break; |
25 | case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break; | 25 | case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break; |
26 | case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break; | 26 | case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break; |
27 | default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; | 27 | default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; |
28 | } | 28 | } |
29 | } | 29 | } |
30 | 30 | ||
31 | $emps = $emps->paginate(4); | 31 | $emps = $emps->paginate(4); |
32 | 32 | ||
33 | if ($request->ajax()) { | 33 | if ($request->ajax()) { |
34 | if ($request->get('block') == '1') | 34 | if ($request->get('block') == '1') |
35 | return view('ajax.companies', compact('emps', 'count_emps')); | 35 | return view('ajax.companies', compact('emps', 'count_emps')); |
36 | else | 36 | else |
37 | return view('ajax.companies2', compact('emps', 'count_emps')); | 37 | return view('ajax.companies2', compact('emps', 'count_emps')); |
38 | } else { | 38 | } else { |
39 | return view('companies', compact('emps', 'count_emps')); | 39 | return view('companies', compact('emps', 'count_emps')); |
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
43 | public function info_company(Employer $company) { | 43 | public function info_company(Employer $company) { |
44 | $company = Employer::with('ads')->with('flots') | 44 | $user_id = Auth()->user()->id; |
45 | $company = Employer::with('ads')->with('flots')->with('users') | ||
45 | ->where('id', '=', $company->id)->get(); | 46 | ->where('id', '=', $company->id)->get(); |
46 | $title = $company[0]->name_company; | 47 | $title = $company[0]->name_company; |
47 | return view('info_company', compact('company', 'title')); | 48 | return view('info_company', compact('company', 'user_id', 'title')); |
48 | } | 49 | } |
49 | } | 50 | } |
50 | 51 |
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\Models\Ad_employer; | 5 | use App\Models\Ad_employer; |
6 | use App\Models\Category; | 6 | use App\Models\Category; |
7 | use App\Models\Education; | 7 | use App\Models\Education; |
8 | use App\Models\Employer; | 8 | use App\Models\Employer; |
9 | use App\Models\Job_title; | 9 | use App\Models\Job_title; |
10 | use App\Models\News; | 10 | use App\Models\News; |
11 | use App\Models\reclame; | 11 | use App\Models\reclame; |
12 | use Illuminate\Http\Request; | 12 | use Illuminate\Http\Request; |
13 | use Illuminate\Support\Facades\Auth; | 13 | use Illuminate\Support\Facades\Auth; |
14 | use Illuminate\Support\Facades\Validator; | 14 | use Illuminate\Support\Facades\Validator; |
15 | use App\Classes\StatusUser; | ||
15 | 16 | ||
16 | class MainController extends Controller | 17 | class MainController extends Controller |
17 | { | 18 | { |
18 | // Главная страница публичной части | 19 | // Главная страница публичной части |
19 | public function index() { | 20 | public function index() { |
20 | $news = News::query()->orderBy('id')->limit(6)->get(); | 21 | $news = News::query()->orderBy('id')->limit(6)->get(); |
21 | 22 | ||
22 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') | 23 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
23 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') | 24 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') |
24 | ->OrderByDesc('created_at') | 25 | ->OrderByDesc('created_at') |
25 | ->GroupBy('categories.id') | 26 | ->GroupBy('categories.id') |
26 | ->get(); | 27 | ->get(); |
27 | 28 | ||
28 | $employers = Employer::query()->orderBy('id')->limit(20)->get(); | 29 | $employers = Employer::query()->orderBy('id')->limit(20)->get(); |
29 | 30 | ||
30 | return view('index', compact('news', 'categories', 'employers')); | 31 | return view('index', compact('news', 'categories', 'employers')); |
31 | } | 32 | } |
32 | 33 | ||
33 | public function search_vacancies(Request $request) { | 34 | public function search_vacancies(Request $request) { |
34 | if ($request->has('search')) { | 35 | if ($request->has('search')) { |
35 | $search = $request->get('search'); | 36 | $search = $request->get('search'); |
36 | $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); | 37 | $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); |
37 | if (isset($job_titles->id)) | 38 | if (isset($job_titles->id)) |
38 | if ($job_titles->id > 0) | 39 | if ($job_titles->id > 0) |
39 | return redirect()->route('vacancies', ['job' => $job_titles->id]); | 40 | return redirect()->route('vacancies', ['job' => $job_titles->id]); |
40 | } | 41 | } |
41 | } | 42 | } |
42 | 43 | ||
43 | public function vacancies(Request $request) { | 44 | public function vacancies(Request $request) { |
44 | //должности | 45 | //должности |
45 | $Job_title = Job_title::query()->orderBy('name')->get(); | 46 | $Job_title = Job_title::query()->orderBy('name')->get(); |
46 | 47 | ||
47 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') | 48 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
48 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') | 49 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') |
49 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') | 50 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') |
50 | ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); | 51 | ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); |
51 | 52 | ||
52 | //категории и вакансии | 53 | //категории и вакансии |
53 | if (($request->has('job')) && ($request->get('job') > 0)) { | 54 | if (($request->has('job')) && ($request->get('job') > 0)) { |
54 | $categories = $categories->Where('job_title_id', '=', $request->get('job')) | 55 | $categories = $categories->Where('job_title_id', '=', $request->get('job')) |
55 | ->OrderByDesc('created_at') | 56 | ->OrderByDesc('created_at') |
56 | ->GroupBy('categories.id') | 57 | ->GroupBy('categories.id') |
57 | ->get(); | 58 | ->get(); |
58 | } else { | 59 | } else { |
59 | $categories = $categories->OrderByDesc('created_at') | 60 | $categories = $categories->OrderByDesc('created_at') |
60 | ->GroupBy('categories.id') | 61 | ->GroupBy('categories.id') |
61 | ->get(); | 62 | ->get(); |
62 | } | 63 | } |
63 | 64 | ||
64 | if ($request->ajax()) { | 65 | if ($request->ajax()) { |
65 | return view('ajax.vacancies', compact('categories')); | 66 | return view('ajax.vacancies', compact('categories')); |
66 | } else { | 67 | } else { |
67 | return view('vacancies', compact('Job_title', 'categories')); | 68 | return view('vacancies', compact('Job_title', 'categories')); |
68 | } | 69 | } |
69 | } | 70 | } |
70 | 71 | ||
71 | //Вакансии категория детальная | 72 | //Вакансии категория детальная |
72 | public function list_vacancies(Category $categories, Request $request) { | 73 | public function list_vacancies(Category $categories, Request $request) { |
74 | if (isset(Auth()->user()->id)) | ||
75 | $uid = Auth()->user()->id; | ||
76 | else | ||
77 | $uid = 0; | ||
73 | 78 | ||
74 | $Query = Ad_employer::with('jobs')-> | 79 | $Query = Ad_employer::with('jobs')-> |
75 | with('cat')-> | 80 | with('cat')-> |
76 | with('employer')-> | 81 | with('employer')-> |
77 | whereHas('jobs_code', function ($query) use ($request) { | 82 | whereHas('jobs_code', function ($query) use ($request) { |
78 | if ($request->ajax()) { | 83 | if ($request->ajax()) { |
79 | if (null !== ($request->get('job'))) { | 84 | if (null !== ($request->get('job')) && ($request->get('job') !== 0)) { |
80 | $query->where('job_title_id', $request->get('job')); | 85 | $query->where('job_title_id', $request->get('job')); |
81 | } | 86 | } |
82 | } | 87 | } |
83 | }) | 88 | }) |
84 | ->select('ad_employers.*'); | 89 | ->select('ad_employers.*'); |
85 | 90 | ||
91 | |||
92 | |||
86 | if ($categories->id > 0) { | 93 | if ($categories->id > 0) { |
87 | $Query = $Query->where('category_id', '=', $categories->id); | 94 | $Query = $Query->where('category_id', '=', $categories->id); |
88 | $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); | 95 | $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); |
89 | } | 96 | } |
90 | 97 | ||
98 | if ($request->get('sort')) { | ||
99 | $sort = $request->get('sort'); | ||
100 | switch ($sort) { | ||
101 | case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; | ||
102 | case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; | ||
103 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; | ||
104 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; | ||
105 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; | ||
106 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; | ||
107 | } | ||
108 | } | ||
109 | |||
91 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 110 | $Job_title = Job_title::query()->OrderBy('name')->get(); |
92 | 111 | ||
93 | $Query_count = $Query->count(); | 112 | $Query_count = $Query->count(); |
94 | 113 | ||
95 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 114 | $Query = $Query->OrderBy('updated_at')->paginate(3); |
96 | 115 | ||
97 | $Reclama = reclame::query()->limit(3)->get(); | 116 | $Reclama = reclame::query()->limit(3)->get(); |
98 | 117 | ||
99 | 118 | ||
100 | 119 | ||
101 | if ($request->ajax()) { | 120 | if ($request->ajax()) { |
102 | return view('ajax.list_vacancies', compact('Query', 'Query_count', 'Name_categori', 'Reclama', 'categories')); | 121 | return view('ajax.list_vacancies', compact('Query', |
122 | 'Query_count', | ||
123 | 'Name_categori', | ||
124 | 'Reclama', | ||
125 | 'categories', | ||
126 | 'uid')); | ||
103 | } else { | 127 | } else { |
104 | //Вернуть все | 128 | //Вернуть все |
105 | return view('list_vacancies', compact('Query', | 129 | return view('list_vacancies', compact('Query', |
106 | 'Query_count', | 130 | 'Query_count', |
107 | 'Reclama', | 131 | 'Reclama', |
108 | 'Name_categori', | 132 | 'Name_categori', |
109 | 'categories', | 133 | 'categories', |
110 | 'Job_title')); | 134 | 'Job_title', |
135 | 'uid')); | ||
111 | } | 136 | } |
112 | } | 137 | } |
113 | 138 | ||
114 | // Образование | 139 | // Образование |
115 | public function education(Request $request) { | 140 | public function education(Request $request) { |
116 | $educations = Education::query(); | 141 | $educations = Education::query(); |
117 | if ($request->has('search')) { | 142 | if (($request->has('search')) && (!empty($request->get('search')))) { |
118 | $search = trim($request->has('search')); | 143 | $search = trim($request->get('search')); |
119 | $educations = $educations->where('name', 'LIKE', "%$search%"); | 144 | $educations = $educations->where('name', 'LIKE', "%$search%"); |
120 | } | 145 | } |
146 | |||
147 | if ($request->get('sort')) { | ||
148 | $sort = $request->get('sort'); | ||
149 | switch ($sort) { | ||
150 | case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break; | ||
151 | case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break; | ||
152 | case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break; | ||
153 | case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break; | ||
154 | case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break; | ||
155 | default: $educations = $educations->orderBy('id')->orderby('updated_at'); break; | ||
156 | } | ||
157 | } | ||
158 | |||
121 | $count_edu = $educations->count(); | 159 | $count_edu = $educations->count(); |
122 | $educations = $educations->paginate(6); | 160 | $educations = $educations->paginate(6); |
123 | return view('education', compact('educations', 'count_edu')); | 161 | if ($request->ajax()) { |
162 | return view('ajax.education', compact('educations')); | ||
163 | } else { | ||
164 | return view('education', compact('educations', 'count_edu')); | ||
165 | } | ||
124 | } | 166 | } |
125 | 167 | ||
126 | // Контакты | 168 | // Контакты |
127 | public function contacts() { | 169 | public function contacts() { |
128 | return view('contacts'); | 170 | return view('contacts'); |
129 | } | 171 | } |
130 | 172 | ||
131 | // Вход в личный кабинет | 173 | // Вход в личный кабинет |
132 | public function input_login(Request $request) | 174 | public function input_login(Request $request) |
133 | { | 175 | { |
134 | $rules = [ | 176 | $rules = [ |
135 | 'email' => 'required|string|email', | 177 | 'email' => 'required|string|email', |
136 | 'password' => 'required|string', | 178 | 'password' => 'required|string', |
137 | ]; | 179 | ]; |
138 | 180 | ||
139 | $messages = [ | 181 | $messages = [ |
140 | 'required' => 'Укажите обязательное поле «:attribute»', | 182 | 'required' => 'Укажите обязательное поле «:attribute»', |
141 | 'email' => 'Введите корректный email', | 183 | 'email' => 'Введите корректный email', |
142 | 'min' => [ | 184 | 'min' => [ |
143 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 185 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
144 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 186 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
145 | ], | 187 | ], |
146 | 'max' => [ | 188 | 'max' => [ |
147 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 189 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
148 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 190 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
149 | ], | 191 | ], |
150 | ]; | 192 | ]; |
151 | 193 | ||
152 | $validator = Validator::make($request->all(), $rules, $messages); | 194 | $validator = Validator::make($request->all(), $rules, $messages); |
153 | 195 | ||
154 | if ($validator->fails()) { | 196 | if ($validator->fails()) { |
155 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); | 197 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); |
156 | } else { | 198 | } else { |
157 | $credentials = $request->only('email', 'password'); | 199 | $credentials = $request->only('email', 'password'); |
158 | 200 | ||
159 | if (Auth::attempt($credentials, $request->has('remember'))) { | 201 | if (Auth::attempt($credentials, $request->has('remember'))) { |
160 | 202 | ||
161 | if (is_null(Auth::user()->email_verified_at)) { | 203 | if (is_null(Auth::user()->email_verified_at)) { |
162 | Auth::logout(); | 204 | Auth::logout(); |
163 | return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); | 205 | return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); |
164 | } | 206 | } |
165 | 207 | ||
166 | if (Auth::user()->is_worker) { | 208 | if (Auth::user()->is_worker) { |
167 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); | 209 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); |
168 | } else { | 210 | } else { |
169 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); | 211 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); |
170 | } | 212 | } |
171 | 213 | ||
172 | return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); | 214 | return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); |
173 | //->route('index') | 215 | //->route('index') |
174 | //->with('success', 'Вы вошли в личный кабинет.'); | 216 | //->with('success', 'Вы вошли в личный кабинет.'); |
175 | } else { | 217 | } else { |
176 | return json_encode(Array("ERROR" => "Неверный логин или пароль!")); | 218 | return json_encode(Array("ERROR" => "Неверный логин или пароль!")); |
177 | } | 219 | } |
178 | } | 220 | } |
179 | } | 221 | } |
180 | } | 222 | } |
181 | 223 |
app/Http/Controllers/WorkerController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\RusDate; | 5 | use App\Classes\RusDate; |
6 | use App\Http\Requests\DocumentsRequest; | ||
6 | use App\Models\Ad_employer; | 7 | use App\Models\Ad_employer; |
8 | use App\Models\ad_response; | ||
7 | use App\Models\Category; | 9 | use App\Models\Category; |
10 | use App\Models\Dop_info; | ||
8 | use App\Models\Employer; | 11 | use App\Models\Employer; |
12 | use App\Models\infobloks; | ||
9 | use App\Models\Job_title; | 13 | use App\Models\Job_title; |
10 | use App\Models\Message; | 14 | use App\Models\Message; |
15 | use App\Models\place_works; | ||
11 | use App\Models\reclame; | 16 | use App\Models\reclame; |
17 | use App\Models\sertification; | ||
12 | use App\Models\Static_worker; | 18 | use App\Models\Static_worker; |
13 | use App\Models\User; | 19 | use App\Models\User; |
14 | use App\Models\User as User_Model; | 20 | use App\Models\User as User_Model; |
15 | use App\Models\Worker; | 21 | use App\Models\Worker; |
16 | use Carbon\Carbon; | 22 | use Carbon\Carbon; |
17 | use Illuminate\Auth\Events\Registered; | 23 | use Illuminate\Auth\Events\Registered; |
18 | use Illuminate\Database\Eloquent\Builder; | 24 | use Illuminate\Database\Eloquent\Builder; |
19 | use Illuminate\Http\JsonResponse; | 25 | use Illuminate\Http\JsonResponse; |
20 | use Illuminate\Http\Request; | 26 | use Illuminate\Http\Request; |
21 | use Illuminate\Support\Facades\Auth; | 27 | use Illuminate\Support\Facades\Auth; |
22 | use Illuminate\Support\Facades\Hash; | 28 | use Illuminate\Support\Facades\Hash; |
29 | use Illuminate\Support\Facades\Storage; | ||
23 | use Illuminate\Support\Facades\Validator; | 30 | use Illuminate\Support\Facades\Validator; |
24 | 31 | ||
25 | class WorkerController extends Controller | 32 | class WorkerController extends Controller |
26 | { | 33 | { |
27 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); | 34 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); |
28 | 35 | ||
29 | //профиль | 36 | //профиль |
30 | public function profile(Worker $worker) | 37 | public function profile(Worker $worker) |
31 | { | 38 | { |
32 | $get_date = date('Y.m'); | 39 | $get_date = date('Y.m'); |
33 | 40 | ||
34 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 41 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
35 | ->where('user_id', '=', $worker->users->id) | 42 | ->where('user_id', '=', $worker->users->id) |
36 | ->get(); | 43 | ->get(); |
37 | 44 | ||
38 | if ($c->count() > 0) { | 45 | if ($c->count() > 0) { |
39 | $upd = Static_worker::find($c[0]->id); | 46 | $upd = Static_worker::find($c[0]->id); |
40 | $upd->lookin = $upd->lookin + 1; | 47 | $upd->lookin = $upd->lookin + 1; |
41 | $upd->save(); | 48 | $upd->save(); |
42 | } else { | 49 | } else { |
43 | $crt = new Static_worker(); | 50 | $crt = new Static_worker(); |
44 | $crt->lookin = 1; | 51 | $crt->lookin = 1; |
45 | $crt->year_month = $get_date; | 52 | $crt->year_month = $get_date; |
46 | $crt->user_id = $worker->user_id; | 53 | $crt->user_id = $worker->user_id; |
47 | $crt->save(); | 54 | $crt->save(); |
48 | } | 55 | } |
49 | 56 | ||
50 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 57 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
51 | ->where('user_id', '=', $worker->users->id) | 58 | ->where('user_id', '=', $worker->users->id) |
52 | ->get(); | 59 | ->get(); |
53 | 60 | ||
54 | return view('public.workers.profile', compact('worker', 'stat')); | 61 | return view('public.workers.profile', compact('worker', 'stat')); |
55 | } | 62 | } |
56 | 63 | ||
57 | // лист база резюме | 64 | // лист база резюме |
58 | public function bd_resume() | 65 | public function bd_resume() |
59 | { | 66 | { |
60 | $status_work = $this->status_work; | 67 | $status_work = $this->status_work; |
61 | $resumes = Worker::query()->with('users')->with('job_titles'); | 68 | $resumes = Worker::query()->with('users')->with('job_titles'); |
62 | 69 | ||
63 | $res_count = $resumes->count(); | 70 | $res_count = $resumes->count(); |
64 | $resumes = $resumes->paginate(5); | 71 | $resumes = $resumes->paginate(5); |
65 | 72 | ||
66 | return view('resume', compact('resumes', 'status_work', 'res_count')); | 73 | return view('resume', compact('resumes', 'status_work', 'res_count')); |
67 | } | 74 | } |
68 | 75 | ||
69 | // анкета соискателя | 76 | // анкета соискателя |
70 | public function resume_profile(Worker $worker) | 77 | public function resume_profile(Worker $worker) |
71 | { | 78 | { |
72 | $status_work = $this->status_work; | 79 | $status_work = $this->status_work; |
73 | $Query = Worker::query()->with('users')->with('job_titles') | 80 | $Query = Worker::query()->with('users')->with('job_titles') |
74 | ->with('place_worker')->with('sertificate')->with('prev_company') | 81 | ->with('place_worker')->with('sertificate')->with('prev_company') |
75 | ->with('infobloks'); | 82 | ->with('infobloks'); |
76 | $Query = $Query->where('id', '=', $worker->id); | 83 | $Query = $Query->where('id', '=', $worker->id); |
77 | $Query = $Query->get(); | 84 | $Query = $Query->get(); |
78 | return view('worker', compact('Query', 'status_work')); | 85 | return view('worker', compact('Query', 'status_work')); |
79 | } | 86 | } |
80 | 87 | ||
81 | // скачать анкету соискателя | 88 | // скачать анкету соискателя |
82 | public function resume_download(Worker $worker) | 89 | public function resume_download(Worker $worker) |
83 | { | 90 | { |
84 | print_r('Резюме для скачивания'); | 91 | print_r('Резюме для скачивания'); |
85 | } | 92 | } |
86 | 93 | ||
87 | // Кабинет работника | 94 | // Кабинет работника |
88 | public function cabinet() | 95 | public function cabinet() |
89 | { | 96 | { |
90 | $id = Auth()->user()->id; | 97 | $id = Auth()->user()->id; |
91 | $Worker = Worker::query()->with('sertificate')-> | 98 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> |
92 | with('infobloks')->with('place_worker')-> | 99 | with('infobloks')->with('place_worker')-> |
93 | WhereHas('users', | 100 | WhereHas('users', |
94 | function (Builder $query) use ($id) {$query->Where('id', $id); | 101 | function (Builder $query) use ($id) {$query->Where('id', $id); |
95 | })->get(); | 102 | })->get(); |
96 | dd($Worker); | 103 | |
97 | return view('workers.cabinet', compact('Worker')); | 104 | $Job_titles = Job_title::query()->OrderBy('name')->get(); |
105 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); | ||
106 | |||
107 | return view('workers.cabinet', compact('Worker', 'Job_titles', 'Infoblocks')); | ||
98 | } | 108 | } |
99 | 109 | ||
100 | // Сохранение данных | 110 | // Сохранение данных |
101 | public function cabinet_save(Worker $worker, Request $request) | 111 | public function cabinet_save(Worker $worker, Request $request) |
102 | { | 112 | { |
113 | $id = $worker->id; | ||
114 | $params = $request->all(); | ||
115 | |||
116 | $job_title_id = $request->get('job_title_id'); | ||
117 | |||
118 | unset($params['new_diplom']); | ||
119 | unset($params['new_data_begin']); | ||
120 | unset($params['new_data_end']); | ||
121 | unset($params['new_job_title']); | ||
122 | unset($params['new_teplohod']); | ||
123 | unset($params['new_GWT']); | ||
124 | unset($params['new_KBT']); | ||
125 | unset($params['new_Begin_work']); | ||
126 | unset($params['new_End_work']); | ||
127 | unset($params['new_name_company']); | ||
128 | |||
129 | $rules = [ | ||
130 | 'surname' => ['required', 'string', 'max:255'], | ||
131 | 'name_man' => ['required', 'string', 'max:255'], | ||
132 | 'email' => ['required', 'string', 'email', 'max:255'], | ||
133 | |||
134 | ]; | ||
103 | 135 | ||
136 | $messages = [ | ||
137 | 'required' => 'Укажите обязательное поле', | ||
138 | 'min' => [ | ||
139 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | ||
140 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | ||
141 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | ||
142 | ], | ||
143 | 'max' => [ | ||
144 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | ||
145 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | ||
146 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | ||
147 | ] | ||
148 | ]; | ||
149 | |||
150 | $validator = Validator::make($params, $rules, $messages); | ||
151 | |||
152 | if ($validator->fails()) { | ||
153 | return redirect()->route('worker.cabinet')->withErrors($validator); | ||
154 | } else { | ||
155 | |||
156 | if ($request->has('photo')) { | ||
157 | if (!empty($Worker->photo)) { | ||
158 | Storage::delete($Worker->photo); | ||
159 | } | ||
160 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); | ||
161 | } | ||
162 | |||
163 | if ($request->has('file')) { | ||
164 | if (!empty($Worker->file)) { | ||
165 | Storage::delete($Worker->file); | ||
166 | } | ||
167 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); | ||
168 | } | ||
169 | |||
170 | $id_wor = $worker->update($params); | ||
171 | |||
172 | $use = User_Model::find($id_wor); | ||
173 | $use->surname = $request->get('surname'); | ||
174 | $use->name_man = $request->get('name_man'); | ||
175 | $use->surname2 = $request->get('surname2'); | ||
176 | |||
177 | $use->save(); | ||
178 | $worker->job_titles()->sync($job_title_id); | ||
179 | |||
180 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); | ||
181 | } | ||
104 | } | 182 | } |
105 | 183 | ||
106 | // Сообщения данные | 184 | // Сообщения данные |
107 | public function messages($type_message) | 185 | public function messages($type_message) |
108 | { | 186 | { |
109 | $user_id = Auth()->user()->id; | 187 | $user_id = Auth()->user()->id; |
110 | 188 | ||
111 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 189 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
112 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 190 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
113 | 191 | ||
114 | $messages_output = Message::query()->with('vacancies')-> | 192 | $messages_output = Message::query()->with('vacancies')-> |
115 | with('user_to')->where('user_id', $user_id)-> | 193 | with('user_to')->where('user_id', $user_id)-> |
116 | OrderByDesc('created_at'); | 194 | OrderByDesc('created_at'); |
117 | 195 | ||
118 | 196 | ||
119 | $count_input = $messages_input->count(); | 197 | $count_input = $messages_input->count(); |
120 | $count_output = $messages_output->count(); | 198 | $count_output = $messages_output->count(); |
121 | 199 | ||
122 | if ($type_message == 'input') { | 200 | if ($type_message == 'input') { |
123 | $messages = $messages_input->paginate(15); | 201 | $messages = $messages_input->paginate(15); |
124 | } | 202 | } |
125 | 203 | ||
126 | if ($type_message == 'output') { | 204 | if ($type_message == 'output') { |
127 | $messages = $messages_output->paginate(15); | 205 | $messages = $messages_output->paginate(15); |
128 | } | 206 | } |
129 | // Вернуть все 100% | 207 | // Вернуть все 100% |
130 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 208 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
131 | } | 209 | } |
132 | 210 | ||
133 | // Избранный | 211 | // Избранный |
134 | public function favorite() | 212 | public function favorite() |
135 | { | 213 | { |
136 | dd('dgfghfghfgh'); | ||
137 | return view('workers.favorite'); | 214 | return view('workers.favorite'); |
138 | } | 215 | } |
139 | 216 | ||
140 | |||
141 | // Сменить пароль | 217 | // Сменить пароль |
142 | public function new_password() | 218 | public function new_password() |
143 | { | 219 | { |
144 | $email = Auth()->user()->email; | 220 | $email = Auth()->user()->email; |
145 | return view('workers.new_password', compact('email')); | 221 | return view('workers.new_password', compact('email')); |
146 | } | 222 | } |
147 | 223 | ||
148 | // Обновление пароля | 224 | // Обновление пароля |
149 | public function save_new_password(Request $request) { | 225 | public function save_new_password(Request $request) { |
150 | $use = Auth()->user(); | 226 | $use = Auth()->user(); |
151 | $request->validate([ | 227 | $request->validate([ |
152 | 'password' => 'required|string', | 228 | 'password' => 'required|string', |
153 | 'new_password' => 'required|string', | 229 | 'new_password' => 'required|string', |
154 | 'new_password2' => 'required|string' | 230 | 'new_password2' => 'required|string' |
155 | ]); | 231 | ]); |
156 | 232 | ||
157 | if ($request->get('new_password') == $request->get('new_password2')) | 233 | if ($request->get('new_password') == $request->get('new_password2')) |
158 | if ($request->get('password') !== $request->get('new_password')) { | 234 | if ($request->get('password') !== $request->get('new_password')) { |
159 | $credentials = $request->only('email', 'password'); | 235 | $credentials = $request->only('email', 'password'); |
160 | if (Auth::attempt($credentials)) { | 236 | if (Auth::attempt($credentials)) { |
161 | 237 | ||
162 | if (!is_null($use->email_verified_at)){ | 238 | if (!is_null($use->email_verified_at)){ |
163 | 239 | ||
164 | $user_data = User_Model::find($use->id); | 240 | $user_data = User_Model::find($use->id); |
165 | $user_data->update([ | 241 | $user_data->update([ |
166 | 'password' => Hash::make($request->get('new_password')), | 242 | 'password' => Hash::make($request->get('new_password')), |
167 | 'pubpassword' => base64_encode($request->get('new_password')), | 243 | 'pubpassword' => base64_encode($request->get('new_password')), |
168 | ]); | 244 | ]); |
169 | return redirect() | 245 | return redirect() |
170 | ->route('worker.new_password') | 246 | ->route('worker.new_password') |
171 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 247 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
172 | } | 248 | } |
173 | 249 | ||
174 | return redirect() | 250 | return redirect() |
175 | ->route('worker.new_password') | 251 | ->route('worker.new_password') |
176 | ->withError('Данная учетная запись не было верифицированна!'); | 252 | ->withError('Данная учетная запись не было верифицированна!'); |
177 | } | 253 | } |
178 | } | 254 | } |
179 | 255 | ||
180 | return redirect() | 256 | return redirect() |
181 | ->route('worker.new_password') | 257 | ->route('worker.new_password') |
182 | ->withErrors('Не совпадение данных, обновите пароли!'); | 258 | ->withErrors('Не совпадение данных, обновите пароли!'); |
183 | } | 259 | } |
184 | 260 | ||
185 | // Удаление профиля форма | 261 | // Удаление профиля форма |
186 | public function delete_profile() | 262 | public function delete_profile() |
187 | { | 263 | { |
188 | $login = Auth()->user()->email; | 264 | $login = Auth()->user()->email; |
189 | return view('workers.delete_profile', compact('login')); | 265 | return view('workers.delete_profile', compact('login')); |
190 | } | 266 | } |
191 | 267 | ||
192 | // Удаление профиля код | 268 | // Удаление профиля код |
193 | public function delete_profile_result(Request $request) { | 269 | public function delete_profile_result(Request $request) { |
194 | $Answer = $request->all(); | 270 | $Answer = $request->all(); |
195 | $user_id = Auth()->user()->id; | 271 | $user_id = Auth()->user()->id; |
196 | $request->validate([ | 272 | $request->validate([ |
197 | 'password' => 'required|string', | 273 | 'password' => 'required|string', |
198 | ]); | 274 | ]); |
199 | 275 | ||
200 | $credentials = $request->only('email', 'password'); | 276 | $credentials = $request->only('email', 'password'); |
201 | if (Auth::attempt($credentials)) { | 277 | if (Auth::attempt($credentials)) { |
202 | Auth::logout(); | 278 | Auth::logout(); |
203 | $it = User_Model::find($user_id); | 279 | $it = User_Model::find($user_id); |
204 | //$it->delete(); | 280 | //$it->delete(); |
205 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 281 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
206 | } else { | 282 | } else { |
207 | return redirect()->route('worker.delete_profile') | 283 | return redirect()->route('worker.delete_profile') |
208 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 284 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
209 | } | 285 | } |
210 | } | 286 | } |
211 | 287 | ||
212 | // Регистрация соискателя | 288 | // Регистрация соискателя |
213 | public function register_worker(Request $request) | 289 | public function register_worker(Request $request) |
214 | { | 290 | { |
215 | $params = $request->all(); | 291 | $params = $request->all(); |
216 | 292 | ||
217 | $rules = [ | 293 | $rules = [ |
218 | 'surname' => ['required', 'string', 'max:255'], | 294 | 'surname' => ['required', 'string', 'max:255'], |
219 | 'name_man' => ['required', 'string', 'max:255'], | 295 | 'name_man' => ['required', 'string', 'max:255'], |
220 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 296 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
221 | 'password' => ['required', 'string', 'min:8'], | 297 | 'password' => ['required', 'string', 'min:8'], |
222 | ]; | 298 | ]; |
223 | 299 | ||
224 | $messages = [ | 300 | $messages = [ |
225 | 'required' => 'Укажите обязательное поле', | 301 | 'required' => 'Укажите обязательное поле', |
226 | 'min' => [ | 302 | 'min' => [ |
227 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 303 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
228 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 304 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
229 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 305 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
230 | ], | 306 | ], |
231 | 'max' => [ | 307 | 'max' => [ |
232 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 308 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
233 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 309 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
234 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 310 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
235 | ] | 311 | ] |
236 | ]; | 312 | ]; |
237 | 313 | ||
238 | 314 | ||
239 | 315 | ||
240 | 316 | ||
241 | if ($request->get('password') !== $request->get('confirmed')){ | 317 | if ($request->get('password') !== $request->get('confirmed')){ |
242 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 318 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
243 | } | 319 | } |
244 | 320 | ||
245 | $validator = Validator::make($request->all(), $rules, $messages); | 321 | $validator = Validator::make($request->all(), $rules, $messages); |
246 | 322 | ||
247 | if ($validator->fails()) { | 323 | if ($validator->fails()) { |
248 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 324 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
249 | } else { | 325 | } else { |
250 | $user = $this->create($params); | 326 | $user = $this->create($params); |
251 | event(new Registered($user)); | 327 | event(new Registered($user)); |
252 | 328 | ||
253 | Auth::guard()->login($user); | 329 | Auth::guard()->login($user); |
254 | } | 330 | } |
255 | if ($user) { | 331 | if ($user) { |
256 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; | 332 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; |
257 | } else { | 333 | } else { |
258 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 334 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
259 | } | 335 | } |
260 | } | 336 | } |
261 | 337 | ||
262 | // Создание пользователя | 338 | // Создание пользователя |
263 | protected function create(array $data) | 339 | protected function create(array $data) |
264 | { | 340 | { |
265 | $Use = new User(); | 341 | $Use = new User(); |
266 | $Code_user = $Use->create([ | 342 | $Code_user = $Use->create([ |
267 | 'name' => $data['surname']." ".$data['name_man'], | 343 | 'name' => $data['surname']." ".$data['name_man'], |
268 | 'name_man' => $data['name_man'], | 344 | 'name_man' => $data['name_man'], |
269 | 'surname' => $data['surname'], | 345 | 'surname' => $data['surname'], |
270 | 'surname2' => $data['surname2'], | 346 | 'surname2' => $data['surname2'], |
271 | 'subscribe_email' => $data['email'], | 347 | 'subscribe_email' => $data['email'], |
272 | 'email' => $data['email'], | 348 | 'email' => $data['email'], |
273 | 'telephone' => $data['telephone'], | 349 | 'telephone' => $data['telephone'], |
274 | 'password' => Hash::make($data['password']), | 350 | 'password' => Hash::make($data['password']), |
275 | 'pubpassword' => base64_encode($data['password']), | 351 | 'pubpassword' => base64_encode($data['password']), |
276 | 'email_verified_at' => Carbon::now() | 352 | 'email_verified_at' => Carbon::now() |
277 | ]); | 353 | ]); |
278 | if ($Code_user->id > 0) { | 354 | if ($Code_user->id > 0) { |
279 | $Worker = new Worker(); | 355 | $Worker = new Worker(); |
280 | $Worker->user_id = $Code_user->id; | 356 | $Worker->user_id = $Code_user->id; |
281 | $Worker->position_work = $data['job_titles']; | 357 | $Worker->position_work = $data['job_titles']; |
282 | $Worker->email = $data['email']; | 358 | $Worker->email = $data['email']; |
283 | $Worker->telephone = $data['telephone']; | 359 | $Worker->telephone = $data['telephone']; |
284 | $Worker->save(); | 360 | $Worker->save(); |
285 | 361 | ||
286 | return $Code_user; | 362 | return $Code_user; |
287 | } | 363 | } |
288 | } | 364 | } |
289 | 365 | ||
290 | // Борьба против колорадских жуков, хотя жуков победил все таки 45. | 366 | // Борьба против колорадских жуков, хотя жуков победил все таки 45. |
291 | public function colorado(Request $request) { | 367 | public function colorado(Request $request) { |
292 | if (isset($_COOKIE['favorite_vac'])) { | 368 | if (isset($_COOKIE['favorite_vac'])) { |
293 | $items = RusDate::count_vacancy_fav(); | 369 | $items = RusDate::count_vacancy_fav(); |
294 | $it = $_COOKIE['favorite_vac']; | 370 | $it = $_COOKIE['favorite_vac']; |
295 | $it = str_replace('"', "", $it); | 371 | $it = str_replace('"', "", $it); |
296 | $it = str_replace('[', "", $it); | 372 | $it = str_replace('[', "", $it); |
297 | $it = str_replace(']', "", $it); | 373 | $it = str_replace(']', "", $it); |
298 | $Arr = explode(",", $it); | 374 | $Arr = explode(",", $it); |
299 | } else { | 375 | } else { |
300 | $Arr = Array(); | 376 | $Arr = Array(); |
301 | } | 377 | } |
302 | 378 | ||
303 | $Query = Ad_employer::Query(); | 379 | $Query = Ad_employer::Query(); |
304 | if (count($Arr) > 0) { | 380 | if (count($Arr) > 0) { |
305 | $Query = $Query->whereIn('id', $Arr); | 381 | $Query = $Query->whereIn('id', $Arr); |
306 | } | 382 | } |
307 | $Query = $Query->with('jobs')-> | 383 | $Query = $Query->with('jobs')-> |
308 | with('cat')-> | 384 | with('cat')-> |
309 | with('employer')-> | 385 | with('employer')-> |
310 | whereHas('jobs_code', function ($query) use ($request) { | 386 | whereHas('jobs_code', function ($query) use ($request) { |
311 | if ($request->ajax()) { | 387 | if ($request->ajax()) { |
312 | if (null !== ($request->get('job'))) { | 388 | if (null !== ($request->get('job'))) { |
313 | $query->where('job_title_id', $request->get('job')); | 389 | $query->where('job_title_id', $request->get('job')); |
314 | } | 390 | } |
315 | } | 391 | } |
316 | })->select('ad_employers.*'); | 392 | })->select('ad_employers.*'); |
317 | 393 | ||
318 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 394 | $Job_title = Job_title::query()->OrderBy('name')->get(); |
319 | 395 | ||
320 | $Query_count = $Query->count(); | 396 | $Query_count = $Query->count(); |
321 | 397 | ||
322 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 398 | $Query = $Query->OrderBy('updated_at')->paginate(3); |
323 | 399 | ||
324 | return view('workers.favorite', compact('Query', | 400 | return view('workers.favorite', compact('Query', |
325 | 'Query_count', | 401 | 'Query_count', |
326 | 'Job_title')); | 402 | 'Job_title')); |
327 | 403 | ||
328 | } | 404 | } |
329 | 405 | ||
330 | //Переписка пись-пись-пись | 406 | //Переписка пись-пись-пись |
331 | public function dialog(User_Model $user1, User_Model $user2) { | 407 | public function dialog(User_Model $user1, User_Model $user2) { |
332 | if (isset($user2->id)) { | 408 | if (isset($user2->id)) { |
333 | $companion = User_Model::query()->with('workers')-> | 409 | $companion = User_Model::query()->with('workers')-> |
334 | with('employers')-> | 410 | with('employers')-> |
335 | where('id', $user2->id)->first(); | 411 | where('id', $user2->id)->first(); |
336 | } | 412 | } |
337 | 413 | ||
338 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { | 414 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { |
339 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 415 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
340 | })->orWhere(function($query) use ($user1, $user2) { | 416 | })->orWhere(function($query) use ($user1, $user2) { |
341 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 417 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
342 | })->OrderBy('created_at')->get(); | 418 | })->OrderBy('created_at')->get(); |
343 | 419 | ||
344 | $id_vac = null; | 420 | $id_vac = null; |
345 | foreach ($Messages as $it) { | 421 | foreach ($Messages as $it) { |
346 | if (isset($it->response)) { | 422 | if (isset($it->response)) { |
347 | foreach ($it->response as $r) { | 423 | foreach ($it->response as $r) { |
348 | if (isset($r->ad_employer_id)) { | 424 | if (isset($r->ad_employer_id)) { |
349 | $id_vac = $r->ad_employer_id; | 425 | $id_vac = $r->ad_employer_id; |
350 | break; | 426 | break; |
351 | } | 427 | } |
352 | } | 428 | } |
353 | } | 429 | } |
354 | if (!is_null($id_vac)) break; | 430 | if (!is_null($id_vac)) break; |
355 | } | 431 | } |
356 | 432 | ||
357 | $ad_employer = null; | 433 | $ad_employer = null; |
358 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 434 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
359 | $sender = $user1; | 435 | $sender = $user1; |
360 | 436 | ||
361 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); | 437 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); |
362 | } | 438 | } |
439 | |||
440 | // Даунлоады | ||
441 | public function download(Worker $worker) { | ||
442 | |||
443 | } | ||
444 | |||
445 | // Поднятие анкеты | ||
446 | public function up(Worker $worker) { | ||
447 | $worker->updated_at = Carbon::now(); | ||
448 | $worker->save(); | ||
449 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); | ||
450 | } | ||
451 | |||
452 | // Добавление сертификата | ||
453 | public function add_serificate(Request $request) { | ||
454 | $params = $request->all(); | ||
455 | $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); | ||
456 | $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); | ||
457 | $Sertificate = new sertification(); | ||
458 | $Sertificate->create($params); | ||
459 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); | ||
460 | return view('ajax.documents', compact('Docs')); | ||
461 | } | ||
462 | |||
463 | |||
464 | // Удалить сертификат | ||
465 | public function delete_sertificate(sertification $doc) { | ||
466 | $doc->delete(); | ||
467 | |||
468 | return redirect()->route('worker.cabinet'); | ||
469 | } | ||
470 | |||
471 | // Добавление диплома | ||
472 | public function add_diplom_ajax(Request $request) { | ||
473 | // конец | ||
474 | $params = $request->all(); | ||
475 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | ||
476 | |||
477 | if ($count == 0) $dop_info = Dop_info::create($params); | ||
478 | $Infoblocks = infobloks::query()->get(); | ||
479 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); | ||
480 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); | ||
481 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); | ||
482 | } | ||
483 | |||
484 | // Добавление диплома без ajax | ||
485 | public function add_diplom(Worker $worker) { | ||
486 | $worker_id = $worker->id; | ||
487 | $Infoblocks = infobloks::query()->get(); | ||
488 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); | ||
489 | } | ||
490 | // Сохранить | ||
491 | // Сохраняю диплом | ||
492 | public function add_diplom_save(Request $request) { | ||
493 | $params = $request->all(); | ||
494 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | ||
495 | if ($count == 0) $dop_info = Dop_info::create($params); | ||
496 | return redirect()->route('worker.cabinet'); | ||
497 | } | ||
498 | |||
499 | // Добавление стандартного документа | ||
500 | public function add_document(Worker $worker) { | ||
501 | return view('workers.docs', compact('worker')); | ||
502 | } | ||
503 | |||
504 | //Сохранение стандартого документа | ||
505 | public function add_document_save(DocumentsRequest $request) { | ||
506 | $params = $request->all(); | ||
507 | $place_work = place_works::create($params); | ||
508 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); | ||
509 | } | ||
510 | |||
511 | // Редактирование документа | ||
512 | public function edit_document(place_works $doc, Worker $worker) { | ||
513 | return view('workers.docs-edit', compact('doc', 'worker')); | ||
514 | } | ||
515 | |||
516 | //Сохранение отредактированного документа | ||
517 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { | ||
518 | $params = $request->all(); | ||
519 | $doc->update($params); | ||
520 | |||
521 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | ||
522 | } | ||
523 | |||
524 | // Удаление документа | ||
525 | public function delete_document(place_works $doc) { | ||
526 | $doc->delete(); | ||
527 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | ||
528 | } | ||
529 | |||
530 | //Отправка нового сообщения | ||
531 | public function new_message(Request $request) { | ||
532 | $params = $request->all(); | ||
533 | |||
534 | $id = $params['send_user_id']; | ||
535 | $message = new Message(); | ||
536 | $message->user_id = $params['send_user_id']; | ||
537 | $message->to_user_id = $params['send_to_user_id']; | ||
538 | $message->title = $params['send_title']; | ||
539 | $message->text = $params['send_text']; | ||
540 | if ($request->has('send_file')) { | ||
541 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); | ||
542 | } | ||
543 | $message->flag_new = 1; | ||
544 | $id_message = $message->save(); | ||
545 | |||
546 | $data['message_id'] = $id_message; | ||
547 | $data['ad_employer_id'] = $params['send_vacancy']; | ||
548 | $data['job_title_id'] = $params['send_job_title_id']; | ||
549 | $data['flag'] = 1; | ||
550 | $ad_responce = ad_response::create($data); | ||
551 | return redirect()->route('worker.messages', ['type_message' => 'output']); | ||
552 | } | ||
363 | 553 | } |
app/Http/Requests/DocumentsRequest.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Requests; | ||
4 | |||
5 | use Illuminate\Foundation\Http\FormRequest; | ||
6 | |||
7 | class DocumentsRequest extends FormRequest | ||
8 | { | ||
9 | /** | ||
10 | * Determine if the user is authorized to make this request. | ||
11 | * | ||
12 | * @return bool | ||
13 | */ | ||
14 | public function authorize() | ||
15 | { | ||
16 | return true; | ||
17 | } | ||
18 | |||
19 | /** | ||
20 | * Get the validation rules that apply to the request. | ||
21 | * | ||
22 | * @return array<string, mixed> | ||
23 | */ | ||
24 | public function rules() | ||
25 | { | ||
26 | return [ | ||
27 | 'job_title' => ['required', 'string', 'max:255'], | ||
28 | 'teplohod' => ['required', 'string', 'max:255'], | ||
29 | 'name_company' => ['required', 'string', 'max:255'], | ||
30 | ]; | ||
31 | } | ||
32 | |||
33 | public function messages() { | ||
34 | return [ | ||
35 | 'required' => 'Укажите обязательное поле «:attribute»', | ||
36 | 'min' => [ | ||
37 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | ||
38 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | ||
39 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | ||
40 | ], | ||
41 | 'max' => [ | ||
42 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | ||
43 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | ||
44 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | ||
45 | ]]; | ||
46 | } | ||
47 | } | ||
48 |
app/Http/Requests/VacansiaRequiest.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 VacansiaRequiest extends FormRequest | 7 | class VacansiaRequiest 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 | 24 | ||
25 | public function rules() | 25 | public function rules() |
26 | { | 26 | { |
27 | return [ | 27 | return [ |
28 | 'name' => [ | 28 | 'name' => [ |
29 | 'required', | 29 | 'required', |
30 | 'min:3', | 30 | 'min:3', |
31 | 'max:255', | 31 | 'max:255', |
32 | ], | 32 | ], |
33 | 33 | ||
34 | 'category_id' => [ | 34 | 'category_id' => [ |
35 | 'numeric', | 35 | 'numeric', |
36 | 'min:0', | 36 | 'min:0', |
37 | 'max:9999999', | 37 | 'max:9999999', |
38 | ], | 38 | ], |
39 | 39 | ||
40 | 'telephone' => [ | 40 | 'telephone' => [ |
41 | 'min:3', | 41 | 'min:3', |
42 | 'max:255', | 42 | 'max:255', |
43 | ], | 43 | ], |
44 | 44 | ||
45 | 'email' => [ | 45 | 'email' => [ |
46 | 'min:3', | 46 | 'min:3', |
47 | 'max:255', | 47 | 'max:255', |
48 | ], | 48 | ], |
49 | 49 | ||
50 | 'salary' => [ | 50 | 'salary' => [ |
51 | 'numeric', | ||
51 | 'min:3', | 52 | 'min:3', |
52 | 'max:255', | 53 | 'max:255', |
53 | ], | 54 | ], |
54 | 55 | ||
56 | 'min_salary' => [ | ||
57 | 'numeric', | ||
58 | 'min:0', | ||
59 | 'max:9999999', | ||
60 | ], | ||
61 | |||
62 | 'max_salary' => [ | ||
63 | 'numeric', | ||
64 | 'min:0', | ||
65 | 'max:9999999', | ||
66 | ], | ||
67 | |||
55 | 'city' => [ | 68 | 'city' => [ |
56 | 'min:3', | 69 | 'min:3', |
57 | 'max:255', | 70 | 'max:255', |
58 | ], | 71 | ], |
72 | |||
73 | 'job_title_id' => [ | ||
74 | 'numeric', | ||
75 | 'min:1', | ||
76 | 'max:9999999' | ||
77 | ] | ||
59 | ]; | 78 | ]; |
60 | } | 79 | } |
61 | 80 | ||
62 | public function messages() { | 81 | public function messages() { |
63 | return [ | 82 | return [ |
64 | 'required' => 'Поле «:attribute» обязательно для заполнения', | 83 | 'required' => 'Поле «:attribute» обязательно для заполнения', |
65 | 'unique' => 'Такое значение поля «:attribute» уже используется', | 84 | 'unique' => 'Такое значение поля «:attribute» уже используется', |
66 | 'min' => [ | 85 | 'min' => [ |
67 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 86 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
68 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 87 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
69 | ], | 88 | ], |
70 | 'max' => [ | 89 | 'max' => [ |
71 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 90 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
72 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 91 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
73 | ], | 92 | ], |
74 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', | 93 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', |
75 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', | 94 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', |
76 | ]; | 95 | ]; |
77 | 96 | ||
78 | } | 97 | } |
79 | } | 98 | } |
80 | 99 |
app/Models/Dop_info.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Models; | ||
4 | |||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
6 | use Illuminate\Database\Eloquent\Model; | ||
7 | |||
8 | class Dop_info extends Model | ||
9 | { | ||
10 | use HasFactory; | ||
11 | |||
12 | public $table = 'dop_info'; | ||
13 | |||
14 | public $fillable = [ | ||
15 | 'worker_id', | ||
16 | 'infoblok_id', | ||
17 | 'text' | ||
18 | ]; | ||
19 | } | ||
20 |
app/Models/Title_worker.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Models; | ||
4 | |||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
6 | use Illuminate\Database\Eloquent\Model; | ||
7 | |||
8 | class Title_worker extends Model | ||
9 | { | ||
10 | use HasFactory; | ||
11 | } | ||
12 |
app/Models/Worker.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class Worker extends Model | 8 | class Worker extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | 11 | ||
12 | protected $table = 'Workers'; | 12 | protected $table = 'Workers'; |
13 | 13 | ||
14 | protected $fillable = [ | 14 | protected $fillable = [ |
15 | 'user_id', | 15 | 'user_id', |
16 | 'status_work', | 16 | 'status_work', |
17 | 'position_work', | 17 | 'position_work', |
18 | 'telephone', | 18 | 'telephone', |
19 | 'telephone2', | 19 | 'telephone2', |
20 | 'persent_anketa', | 20 | 'persent_anketa', |
21 | 'photo', | 21 | 'photo', |
22 | 'email_data', | 22 | 'email_data', |
23 | 'status_profile', | 23 | 'status_profile', |
24 | 'old_year', | 24 | 'old_year', |
25 | 'experience', | 25 | 'experience', |
26 | 'en_is', | 26 | 'en_is', |
27 | 'education', | 27 | 'education', |
28 | 'email', | 28 | 'email', |
29 | 'interpassport', | 29 | 'interpassport', |
30 | 'mk', | 30 | 'mk', |
31 | 'vvp', | 31 | 'vvp', |
32 | 'vlm', | 32 | 'vlm', |
33 | 'reka_diplom', | 33 | 'reka_diplom', |
34 | 'more_diplom', | 34 | 'more_diplom', |
35 | 'mpss', | 35 | 'mpss', |
36 | 'tanker', | 36 | 'tanker', |
37 | 'gmssb', | 37 | 'gmssb', |
38 | 'resume', | 38 | 'resume', |
39 | 'sort', | 39 | 'sort', |
40 | 'updated_at', | 40 | 'updated_at', |
41 | 'text', | 41 | 'text', |
42 | 'address', | 42 | 'address', |
43 | 'city', | 43 | 'city', |
44 | 'coord', | 44 | 'coord', |
45 | 'file', | 45 | 'file', |
46 | 'is_remove', | 46 | 'is_remove', |
47 | 'favorite_user', | 47 | 'favorite_user', |
48 | 'sroch_user' | 48 | 'sroch_user' |
49 | ]; | 49 | ]; |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Связь таблицы users с таблицей workers | 52 | * Связь таблицы users с таблицей workers |
53 | */ | 53 | */ |
54 | public function users() { | 54 | public function users() { |
55 | return $this->belongsTo(User::class, 'user_id'); | 55 | return $this->belongsTo(User::class, 'user_id'); |
56 | } | 56 | } |
57 | 57 | ||
58 | // Связь Работника с сертификами (0-0 - 1) | 58 | // Связь Работника с сертификами (0-0 - 1) |
59 | public function sertificate() { | 59 | public function sertificate() { |
60 | return $this->hasMany(sertification::class); | 60 | return $this->hasMany(sertification::class); |
61 | } | 61 | } |
62 | 62 | ||
63 | // Связь Работника с должностями (0-0 - 1) | 63 | // Связь Работника с должностями (0-0 - 1) |
64 | public function job_titles() { | 64 | public function job_titles() { |
65 | return $this->hasMany(Job_title::class, 'id'); | 65 | return $this->belongsToMany(Job_title::class, 'title_workers'); |
66 | } | 66 | } |
67 | 67 | ||
68 | //Связь Работника с опытом работы (1 - 0-0) | 68 | //Связь Работника с опытом работы (1 - 0-0) |
69 | public function place_worker() { | 69 | public function place_worker() { |
70 | return $this->hasMany(place_works::class); | 70 | return $this->hasMany(place_works::class); |
71 | } | 71 | } |
72 | 72 | ||
73 | public function scopeActive($query) { | 73 | public function scopeActive($query) { |
74 | return $query->where('is_remove', '=', '0'); | 74 | return $query->where('is_remove', '=', '0'); |
75 | } | 75 | } |
76 | 76 | ||
77 | //Связь Работника с предыдущими компаниями | 77 | //Связь Работника с предыдущими компаниями |
78 | public function prev_company() { | 78 | public function prev_company() { |
79 | return $this->hasMany(PrevCompany::class); | 79 | return $this->hasMany(PrevCompany::class); |
80 | } | 80 | } |
81 | 81 | ||
82 | //Связь Работника с инфоблоками (0-0 - 0-0) | 82 | //Связь Работника с инфоблоками (0-0 - 0-0) |
83 | public function infobloks() { | 83 | public function infobloks() { |
84 | return $this->belongsToMany(infobloks::class,'dop_info', 'worker_id', 'infoblok_id'); | 84 | return $this->belongsToMany(infobloks::class,'dop_info', 'worker_id', 'infoblok_id'); |
85 | } | 85 | } |
86 | 86 | ||
87 | } | 87 | } |
88 | 88 |
app/Models/place_works.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class place_works extends Model | 8 | class place_works extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | |||
12 | public $fillable = [ | ||
13 | 'job_title', | ||
14 | 'tanker', | ||
15 | 'teplohod', | ||
16 | 'GWT', | ||
17 | 'KBT', | ||
18 | 'Begin_work', | ||
19 | 'End_work', | ||
20 | 'name_company', | ||
21 | 'worker_id' | ||
22 | ]; | ||
11 | } | 23 | } |
12 | 24 |
app/Models/sertification.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Models; | 3 | namespace App\Models; |
4 | 4 | ||
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; | 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | ||
8 | class sertification extends Model | 8 | class sertification extends Model |
9 | { | 9 | { |
10 | use HasFactory; | 10 | use HasFactory; |
11 | |||
12 | protected $fillable = [ | ||
13 | 'date_begin', | ||
14 | 'end_begin', | ||
15 | 'worker_id', | ||
16 | 'name', | ||
17 | 'education' | ||
18 | ]; | ||
11 | } | 19 | } |
12 | 20 |
app/Providers/MyServiceProvider.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Providers; | 3 | namespace App\Providers; |
4 | 4 | ||
5 | use App\Models\Company; | 5 | use App\Models\Company; |
6 | use App\Models\ContentRoles; | 6 | use App\Models\ContentRoles; |
7 | use App\Models\Employer; | 7 | use App\Models\Employer; |
8 | use App\Models\Job_title; | 8 | use App\Models\Job_title; |
9 | use App\Models\Worker; | 9 | use App\Models\Worker; |
10 | use Illuminate\Support\Facades\Auth; | 10 | use Illuminate\Support\Facades\Auth; |
11 | use Illuminate\Support\Facades\DB; | 11 | use Illuminate\Support\Facades\DB; |
12 | use Illuminate\Support\Facades\View; | 12 | use Illuminate\Support\Facades\View; |
13 | use Illuminate\Support\ServiceProvider; | 13 | use Illuminate\Support\ServiceProvider; |
14 | 14 | ||
15 | class MyServiceProvider extends ServiceProvider | 15 | class MyServiceProvider extends ServiceProvider |
16 | { | 16 | { |
17 | /** | 17 | /** |
18 | * Register services. | 18 | * Register services. |
19 | * | 19 | * |
20 | * @return void | 20 | * @return void |
21 | */ | 21 | */ |
22 | public function register() | 22 | public function register() |
23 | { | 23 | { |
24 | // | 24 | // |
25 | } | 25 | } |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * Bootstrap services. | 28 | * Bootstrap services. |
29 | * | 29 | * |
30 | * @return void | 30 | * @return void |
31 | */ | 31 | */ |
32 | public function boot() | 32 | public function boot() |
33 | { | 33 | { |
34 | $views = ['admin.job_titles.parent_id']; | 34 | $views = ['admin.job_titles.parent_id']; |
35 | View::composer($views, | 35 | View::composer($views, |
36 | function($view) | 36 | function($view) |
37 | { | 37 | { |
38 | static $items = null; | 38 | static $items = null; |
39 | 39 | ||
40 | if (is_null($items)) { | 40 | if (is_null($items)) { |
41 | $items = Job_title::query()-> | 41 | $items = Job_title::query()-> |
42 | orderByDesc('sort')-> | 42 | orderByDesc('sort')-> |
43 | orderBy('name')-> | 43 | orderBy('name')-> |
44 | active()-> | 44 | active()-> |
45 | get(); | 45 | get(); |
46 | $parent = 0; | 46 | $parent = 0; |
47 | $view->with(['items' => $items, 'parent' => $parent]); | 47 | $view->with(['items' => $items, 'parent' => $parent]); |
48 | } else { | 48 | } else { |
49 | $view->with(['items' => $items]); | 49 | $view->with(['items' => $items]); |
50 | } | 50 | } |
51 | 51 | ||
52 | } | 52 | } |
53 | ); | 53 | ); |
54 | 54 | ||
55 | $views2 = ['layout.admin', 'admin.index']; | 55 | $views2 = ['layout.admin', 'admin.index']; |
56 | 56 | ||
57 | View::composer($views2, | 57 | View::composer($views2, |
58 | function($view){ | 58 | function($view){ |
59 | $id = Auth::user()->id; | 59 | $id = Auth::user()->id; |
60 | $is_manager = Auth::user()->is_manager; | 60 | $is_manager = Auth::user()->is_manager; |
61 | $admin = Auth::user()->admin; | 61 | $admin = Auth::user()->admin; |
62 | 62 | ||
63 | $contents = ContentRoles::query()->get(); | 63 | $contents = ContentRoles::query()->get(); |
64 | 64 | ||
65 | $query = DB::select(DB::raw('SELECT count(*) as MsgCount | 65 | $query = DB::select(DB::raw('SELECT count(*) as MsgCount |
66 | FROM messages m1 | 66 | FROM messages m1 |
67 | Where ((m1.flag_new = 1) and (m1.to_user_id = :uid)) | 67 | Where ((m1.flag_new = 1) and (m1.to_user_id = :uid)) |
68 | '), ['uid' => $id] | 68 | '), ['uid' => $id] |
69 | ); | 69 | ); |
70 | 70 | ||
71 | $view->with(['MsgCount' => $query[0]->MsgCount, | 71 | $view->with(['MsgCount' => $query[0]->MsgCount, |
72 | 'UserId' => $id, | 72 | 'UserId' => $id, |
73 | 'is_manager' => $is_manager, | 73 | 'is_manager' => $is_manager, |
74 | 'admin' => $admin, | 74 | 'admin' => $admin, |
75 | 'contents' => $contents]); | 75 | 'contents' => $contents]); |
76 | } | 76 | } |
77 | ); | 77 | ); |
78 | 78 | ||
79 | $views3 = ['layout.frontend']; | 79 | $views3 = ['layout.frontend', 'index']; |
80 | 80 | ||
81 | View::composer($views3, | 81 | View::composer($views3, |
82 | function($view){ | 82 | function($view){ |
83 | $id = Auth::user(); | 83 | $id = Auth::user(); |
84 | $companies = Company::query()->limit(1)->get(); | 84 | $companies = Company::query()->limit(1)->get(); |
85 | 85 | $jobs = Job_title::query()->get(); | |
86 | $view->with(['UserId' => $id, 'companies' => $companies]); | 86 | $view->with(['UserId' => $id, 'companies' => $companies, 'jobs' => $jobs]); |
87 | } | 87 | } |
88 | ); | 88 | ); |
89 | 89 | ||
90 | $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all']; | 90 | $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all']; |
91 | View::composer($view1, | 91 | View::composer($view1, |
92 | function($view){ | 92 | function($view){ |
93 | $user = Auth::user(); | 93 | $user = Auth::user(); |
94 | $id = $user->id; | 94 | $id = $user->id; |
95 | $employer = Employer::query()->where('user_id', $id)->get(); | 95 | $employer = Employer::query()->where('user_id', $id)->get(); |
96 | $id_employer = $employer[0]->id; | 96 | $id_employer = $employer[0]->id; |
97 | $view->with(['id_employer' => $id_employer, 'Employer' => $employer]); | 97 | $view->with(['id_employer' => $id_employer, 'Employer' => $employer]); |
98 | } | 98 | } |
99 | ); | 99 | ); |
100 | 100 | ||
101 | $view_worker = ['workers.emblema']; | 101 | $view_worker = ['workers.emblema']; |
102 | View::composer($view_worker, | 102 | View::composer($view_worker, |
103 | function($view_worker) { | 103 | function($view_worker) { |
104 | $user = Auth::user(); | 104 | $user = Auth::user(); |
105 | $id = $user->id; | 105 | $id = $user->id; |
106 | $Worker = Worker::query()->where('user_id', $id)->get(); | 106 | $Worker = Worker::query()->where('user_id', $id)->get(); |
107 | $id_worker = $Worker[0]->id; | 107 | $id_worker = $Worker[0]->id; |
108 | $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]); | 108 | $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]); |
109 | } | 109 | } |
110 | ); | 110 | ); |
111 | 111 | ||
112 | $view_job_title = ['modals.register']; | 112 | $view_job_title = ['modals.register']; |
113 | View::composer($view_job_title, | 113 | View::composer($view_job_title, |
114 | function($view_job_title) { | 114 | function($view_job_title) { |
115 | $Job_titles = Job_title::query()->get(); | 115 | $Job_titles = Job_title::query()->get(); |
116 | $view_job_title->with(['Job_titles' => $Job_titles]); | 116 | $view_job_title->with(['Job_titles' => $Job_titles]); |
117 | } | 117 | } |
118 | ); | 118 | ); |
119 | 119 | ||
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 |
database/migrations/2024_03_05_100903_create_title_workers_table.php
File was created | 1 | <?php | |
2 | |||
3 | use Illuminate\Database\Migrations\Migration; | ||
4 | use Illuminate\Database\Schema\Blueprint; | ||
5 | use Illuminate\Support\Facades\Schema; | ||
6 | |||
7 | return new class extends Migration | ||
8 | { | ||
9 | /** | ||
10 | * Run the migrations. | ||
11 | * | ||
12 | * @return void | ||
13 | */ | ||
14 | public function up() | ||
15 | { | ||
16 | Schema::create('title_workers', function (Blueprint $table) { | ||
17 | $table->id(); | ||
18 | $table->bigInteger('worker_id')->nullable(false); | ||
19 | $table->bigInteger('jib_title_id')->nullable(false); | ||
20 | $table->timestamps(); | ||
21 | }); | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * Reverse the migrations. | ||
26 | * | ||
27 | * @return void | ||
28 | */ | ||
29 | public function down() | ||
30 | { | ||
31 | Schema::dropIfExists('title_workers'); | ||
32 | } | ||
33 | }; | ||
34 |
resources/views/ajax/companies.blade.php
1 | <div class="main__employers-one"> | 1 | <div class="main__employers-one"> |
2 | @if ($emps->count()) | 2 | @if ($emps->count()) |
3 | @foreach($emps as $emp) | 3 | @foreach($emps as $emp) |
4 | <div class="main__employers-item"> | 4 | <div class="main__employers-item"> |
5 | <span class="main__employers-item-inner"> | 5 | <span class="main__employers-item-inner"> |
6 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 6 | @if (!empty($emp->logo)) |
7 | <span class="main__employers-item-body"> | 7 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> |
8 | @else | ||
9 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
10 | @endif | ||
11 | <span class="main__employers-item-body"> | ||
8 | <b>{{ $emp->name_company }}</b> | 12 | <b>{{ $emp->name_company }}</b> |
9 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> | 13 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> |
10 | </span> | 14 | </span> |
11 | </span> | 15 | </span> |
12 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> | 16 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> |
13 | 17 | ||
14 | @if ($emp->oficial_status == 1) | 18 | @if ($emp->oficial_status == 1) |
15 | <span class="main__employers-item-label"> | 19 | <span class="main__employers-item-label"> |
16 | <svg> | 20 | <svg> |
17 | <use xlink:href="images/sprite.svg#v"></use> | 21 | <use xlink:href="images/sprite.svg#v"></use> |
18 | </svg> | 22 | </svg> |
19 | <span>Компания одобрена сервисом rekamore.su</span> | 23 | <span>Компания одобрена сервисом rekamore.su</span> |
20 | </span> | 24 | </span> |
21 | @endif | 25 | @endif |
22 | </div> | 26 | </div> |
23 | @endforeach | 27 | @endforeach |
24 | </div> | 28 | </div> |
25 | 29 | ||
26 | {{ $emps->appends($_GET)->links('paginate') }} | 30 | {{ $emps->appends($_GET)->links('paginate') }} |
27 | @else | 31 | @else |
28 | <H2>Нет данных</H2> | 32 | <H2>Нет данных</H2> |
29 | @endif | 33 | @endif |
30 | 34 | ||
31 | 35 |
resources/views/ajax/companies2.blade.php
1 | @if ($emps->count()) | 1 | @if ($emps->count()) |
2 | <div class="main__employers-two"> | 2 | <div class="main__employers-two"> |
3 | @foreach($emps as $emp) | 3 | @foreach($emps as $emp) |
4 | <div class="main__employers-item"> | 4 | <div class="main__employers-item"> |
5 | <span class="main__employers-item-inner"> | 5 | <span class="main__employers-item-inner"> |
6 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 6 | @if (!empty($emp->logo)) |
7 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
8 | @else | ||
9 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
10 | @endif | ||
7 | <span class="main__employers-item-body"> | 11 | <span class="main__employers-item-body"> |
8 | <b>{{ $emp->name_company }}</b> | 12 | <b>{{ $emp->name_company }}</b> |
9 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> | 13 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> |
10 | </span> | 14 | </span> |
11 | </span> | 15 | </span> |
12 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> | 16 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> |
13 | @if ($emp->oficial_status == 1) | 17 | @if ($emp->oficial_status == 1) |
14 | <span class="main__employers-item-label"> | 18 | <span class="main__employers-item-label"> |
15 | <svg> | 19 | <svg> |
16 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 20 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
17 | </svg> | 21 | </svg> |
18 | <span>Компания одобрена сервисом rekamore.su</span> | 22 | <span>Компания одобрена сервисом rekamore.su</span> |
19 | </span> | 23 | </span> |
20 | @endif | 24 | @endif |
21 | </div> | 25 | </div> |
22 | @endforeach | 26 | @endforeach |
23 | </div> | 27 | </div> |
24 | {{ $emps->appends($_GET)->links('paginate') }} | 28 | {{ $emps->appends($_GET)->links('paginate') }} |
25 | @else | 29 | @else |
26 | <H2>Нет данных</H2> | 30 | <H2>Нет данных</H2> |
27 | @endif | 31 | @endif |
28 | 32 | ||
29 | 33 | ||
30 | 34 |
resources/views/ajax/documents.blade.php
File was created | 1 | @if ($Docs->count()) | |
2 | @php $i = 0; @endphp | ||
3 | @foreach($Docs as $it) | ||
4 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | ||
5 | @if ($i == 0) | ||
6 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | ||
7 | @endif | ||
8 | <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> | ||
9 | <div class="cabinet__inputs"> | ||
10 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
11 | <label class="form-group__label">Название сертификата</label> | ||
12 | <div class="form-group__item"> | ||
13 | <input type="text" class="input" value="{{ $it->name }}" disabled> | ||
14 | </div> | ||
15 | </div> | ||
16 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
17 | <label class="form-group__label">Название сертификата</label> | ||
18 | <div class="form-group__item"> | ||
19 | <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> | ||
20 | </div> | ||
21 | </div> | ||
22 | <button type="button" class="button button_light"> | ||
23 | <svg> | ||
24 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | ||
25 | </svg> | ||
26 | Удалить | ||
27 | </button> | ||
28 | </div> | ||
29 | </div> | ||
30 | @php $i++ @endphp | ||
31 | @endforeach | ||
32 | @else | ||
33 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | ||
34 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | ||
35 | Нет сертификатов | ||
36 | </div> | ||
37 | @endif | ||
38 |
resources/views/ajax/dop_info.blade.php
File was created | 1 | <h4 class="cabinet__h4">Дополнительная информация</h4> | |
2 | <div class="cabinet__inputs"> | ||
3 | <div class="cabinet__inputs-item form-group"> | ||
4 | <label class="form-group__label">Верю</label> | ||
5 | <div class="form-group__item"> | ||
6 | <div class="select"> | ||
7 | <select class="js-select2 sertificates_js"> | ||
8 | <option value="0">Нет</option> | ||
9 | <option value="1" selected>Да</option> | ||
10 | </select> | ||
11 | </div> | ||
12 | </div> | ||
13 | </div> | ||
14 | @if (isset($Worker[0]->infobloks)) | ||
15 | @if ($Worker[0]->infobloks->count()) | ||
16 | @php $i = 1; @endphp | ||
17 | @foreach ($Worker[0]->infobloks as $info) | ||
18 | <div class="cabinet__inputs-item form-group"> | ||
19 | <label class="form-group__label">{{ $info->name }}</label> | ||
20 | <div class="form-group__item"> | ||
21 | <div class="select"> | ||
22 | <select class="js-select2 sertificates_js"> | ||
23 | <option value="0">Нет</option> | ||
24 | <option value="1" selected>Да</option> | ||
25 | </select> | ||
26 | </div> | ||
27 | </div> | ||
28 | </div> | ||
29 | @php $i++; @endphp | ||
30 | @endforeach | ||
31 | @endif | ||
32 | @endif | ||
33 | |||
34 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
35 | <label class="form-group__label">Образцы дипломов и документов</label> | ||
36 | <div class="form-group__item"> | ||
37 | <div class="select"> | ||
38 | <select class="js-select2" id="documents" name="documents"> | ||
39 | @if ($Infoblocks->count()) | ||
40 | @foreach ($Infoblocks as $it) | ||
41 | <option value="{{ $it->id }}">{{ $it->name }}</option> | ||
42 | @endforeach | ||
43 | @endif | ||
44 | </select> | ||
45 | </div> | ||
46 | </div> | ||
47 | </div> | ||
48 | <div name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light"> | ||
49 | Добавить документ | ||
50 | </div> | ||
51 | </div> | ||
52 |
resources/views/ajax/education.blade.php
File was created | 1 | <div class="main__ads" id="block" name="block"> | |
2 | @if ($educations->count()) | ||
3 | @foreach($educations as $edu) | ||
4 | <div class="main__ads-item"> | ||
5 | <div class="main__ads-item-pic"> | ||
6 | <img src="@if (!empty($edu->image)) {{ asset(Storage::url($edu->image)) }} @else {{ asset('images/education.jpg') }} @endif" alt="{{ $edu->name }}"> | ||
7 | <span> | ||
8 | <svg> | ||
9 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | ||
10 | </svg> | ||
11 | </span> | ||
12 | </div> | ||
13 | <div class="main__ads-item-body"> | ||
14 | <b>{{ $edu->name }}</b> | ||
15 | <span>{{ $edu->program_education->count() }} учебных направлений</span> | ||
16 | <a href="" class="button button_light">Читать далее</a> | ||
17 | </div> | ||
18 | </div> | ||
19 | @endforeach | ||
20 | |||
21 | {{ $educations->appends($_GET)->links('paginate') }} | ||
22 | @else | ||
23 | <H2>Нет данных</H2> | ||
24 | @endif | ||
25 | </div> | ||
26 |
resources/views/companies.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 | 48 | ||
49 | $(document).ready(function(){ | 49 | $(document).ready(function(){ |
50 | var sel = $('#select2-sort_ajax-container'); | 50 | var sel = $('#select2-sort_ajax-container'); |
51 | var key = getUrlParameter('sort'); | 51 | var key = getUrlParameter('sort'); |
52 | 52 | ||
53 | if (key !=='') { | 53 | if (key !=='') { |
54 | console.log(key); | 54 | console.log(key); |
55 | switch (key) { | 55 | switch (key) { |
56 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 56 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
57 | case "name_up": sel.html('По имени (возрастание)'); break; | 57 | case "name_up": sel.html('По имени (возрастание)'); break; |
58 | case "name_down": sel.html('По дате (убывание)'); break; | 58 | case "name_down": sel.html('По дате (убывание)'); break; |
59 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 59 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
60 | case "created_at_down": sel.html('По дате (убывание)'); break; | 60 | case "created_at_down": sel.html('По дате (убывание)'); break; |
61 | } | 61 | } |
62 | 62 | ||
63 | } | 63 | } |
64 | }); | 64 | }); |
65 | </script> | 65 | </script> |
66 | @endsection | 66 | @endsection |
67 | 67 | ||
68 | @section('content') | 68 | @section('content') |
69 | <section class="thing"> | 69 | <section class="thing"> |
70 | <div class="container"> | 70 | <div class="container"> |
71 | <form class="thing__body"> | 71 | <form class="thing__body"> |
72 | @csrf | 72 | @csrf |
73 | <ul class="breadcrumbs thing__breadcrumbs"> | 73 | <ul class="breadcrumbs thing__breadcrumbs"> |
74 | <li><a href="{{ route('index') }}">Главная</a></li> | 74 | <li><a href="{{ route('index') }}">Главная</a></li> |
75 | <li><b>Работодатели</b></li> | 75 | <li><b>Работодатели</b></li> |
76 | </ul> | 76 | </ul> |
77 | <h1 class="thing__title">Работодатели</h1> | 77 | <h1 class="thing__title">Работодатели</h1> |
78 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | 78 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для |
79 | существующих финансовых и административных условий.</p> | 79 | существующих финансовых и административных условий.</p> |
80 | <div class="search thing__search"> | 80 | <div class="search thing__search"> |
81 | <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя" required> | 81 | <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя"> |
82 | <button type="submit" class="button">Найти</button> | 82 | <button type="submit" class="button">Найти</button> |
83 | <span> | 83 | <span> |
84 | <svg> | 84 | <svg> |
85 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 85 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
86 | </svg> | 86 | </svg> |
87 | </span> | 87 | </span> |
88 | </div> | 88 | </div> |
89 | </form> | 89 | </form> |
90 | </div> | 90 | </div> |
91 | </section> | 91 | </section> |
92 | <main class="main"> | 92 | <main class="main"> |
93 | <div class="container"> | 93 | <div class="container"> |
94 | <div class="main__employers"> | 94 | <div class="main__employers"> |
95 | <div class="filters"> | 95 | <div class="filters"> |
96 | <div class="filters__label">Показано @if ($count_emps < 4) 1 - {{ $count_emps }} @else 1 – 4 @endif из {{ $count_emps }} результатов поиска</div> | 96 | <div class="filters__label">Показано @if ($count_emps < 4) 1 - {{ $count_emps }} @else 1 – 4 @endif из {{ $count_emps }} результатов поиска</div> |
97 | <div class="filters__body"> | 97 | <div class="filters__body"> |
98 | <div class="select filters__select"> | 98 | <div class="select filters__select"> |
99 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 99 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
100 | <option value="default">Сортировка (по умолчанию)</option> | 100 | <option value="default">Сортировка (по умолчанию)</option> |
101 | <option value="name_up">По имени (возрастание)</option> | 101 | <option value="name_up">По имени (возрастание)</option> |
102 | <option value="name_down">По имени (убывание)</option> | 102 | <option value="name_down">По имени (убывание)</option> |
103 | <option value="created_at_up">По дате (возрастание)</option> | 103 | <option value="created_at_up">По дате (возрастание)</option> |
104 | <option value="created_at_down">По дате (убывание)</option> | 104 | <option value="created_at_down">По дате (убывание)</option> |
105 | </select> | 105 | </select> |
106 | </div> | 106 | </div> |
107 | <button type="button" class="filters__item active" data-tab="1"> | 107 | <button type="button" class="filters__item active" data-tab="1"> |
108 | <svg> | 108 | <svg> |
109 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | 109 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> |
110 | </svg> | 110 | </svg> |
111 | </button> | 111 | </button> |
112 | <button type="button" class="filters__item" data-tab="2"> | 112 | <button type="button" class="filters__item" data-tab="2"> |
113 | <svg> | 113 | <svg> |
114 | <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> | 114 | <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> |
115 | </svg> | 115 | </svg> |
116 | </button> | 116 | </button> |
117 | </div> | 117 | </div> |
118 | </div> | 118 | </div> |
119 | <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1"> | 119 | <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1"> |
120 | <div class="main__employers-one"> | 120 | <div class="main__employers-one"> |
121 | @if ($emps->count()) | 121 | @if ($emps->count()) |
122 | @foreach($emps as $emp) | 122 | @foreach($emps as $emp) |
123 | <div class="main__employers-item"> | 123 | <div class="main__employers-item"> |
124 | <span class="main__employers-item-inner"> | 124 | <span class="main__employers-item-inner"> |
125 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 125 | @if (!empty($emp->logo)) |
126 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
127 | @else | ||
128 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
129 | @endif | ||
126 | <span class="main__employers-item-body"> | 130 | <span class="main__employers-item-body"> |
127 | <b>{{ $emp->name_company }}</b> | 131 | <b>{{ $emp->name_company }}</b> |
128 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> | 132 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> |
129 | </span> | 133 | </span> |
130 | </span> | 134 | </span> |
131 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> | 135 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> |
132 | 136 | ||
133 | @if ($emp->oficial_status == 1) | 137 | @if ($emp->oficial_status == 1) |
134 | <span class="main__employers-item-label"> | 138 | <span class="main__employers-item-label"> |
135 | <svg> | 139 | <svg> |
136 | <use xlink:href="images/sprite.svg#v"></use> | 140 | <use xlink:href="images/sprite.svg#v"></use> |
137 | </svg> | 141 | </svg> |
138 | <span>Компания одобрена сервисом rekamore.su</span> | 142 | <span>Компания одобрена сервисом rekamore.su</span> |
139 | </span> | 143 | </span> |
140 | @endif | 144 | @endif |
141 | </div> | 145 | </div> |
142 | @endforeach | 146 | @endforeach |
143 | </div> | 147 | </div> |
144 | 148 | ||
145 | {{ $emps->appends($_GET)->links('paginate') }} | 149 | {{ $emps->appends($_GET)->links('paginate') }} |
146 | @else | 150 | @else |
147 | <H2>Нет данных</H2> | 151 | <H2>Нет данных</H2> |
148 | @endif | 152 | @endif |
149 | </div> | 153 | </div> |
150 | <div class="main__employers-body" data-body="2" id="block_2" name="block_2"> | 154 | <div class="main__employers-body" data-body="2" id="block_2" name="block_2"> |
151 | @if ($emps->count()) | 155 | @if ($emps->count()) |
152 | <div class="main__employers-two"> | 156 | <div class="main__employers-two"> |
153 | @foreach($emps as $emp) | 157 | @foreach($emps as $emp) |
154 | <div class="main__employers-item"> | 158 | <div class="main__employers-item"> |
155 | <span class="main__employers-item-inner"> | 159 | <span class="main__employers-item-inner"> |
156 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 160 | @if (!empty($emp->logo)) |
161 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
162 | @else | ||
163 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | ||
164 | @endif | ||
157 | <span class="main__employers-item-body"> | 165 | <span class="main__employers-item-body"> |
158 | <b>{{ $emp->name_company }}</b> | 166 | <b>{{ $emp->name_company }}</b> |
159 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> | 167 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> |
160 | </span> | 168 | </span> |
161 | </span> | 169 | </span> |
162 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> | 170 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> |
163 | @if ($emp->oficial_status == 1) | 171 | @if ($emp->oficial_status == 1) |
164 | <span class="main__employers-item-label"> | 172 | <span class="main__employers-item-label"> |
165 | <svg> | 173 | <svg> |
166 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 174 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
167 | </svg> | 175 | </svg> |
168 | <span>Компания одобрена сервисом rekamore.su</span> | 176 | <span>Компания одобрена сервисом rekamore.su</span> |
169 | </span> | 177 | </span> |
170 | @endif | 178 | @endif |
171 | </div> | 179 | </div> |
172 | @endforeach | 180 | @endforeach |
173 | </div> | 181 | </div> |
174 | {{ $emps->appends($_GET)->links('paginate') }} | 182 | {{ $emps->appends($_GET)->links('paginate') }} |
175 | @else | 183 | @else |
176 | <H2>Нет данных</H2> | 184 | <H2>Нет данных</H2> |
177 | @endif | 185 | @endif |
178 | </div> | 186 | </div> |
179 | </div> | 187 | </div> |
180 | </div> | 188 | </div> |
181 | </main> | 189 | </main> |
182 | @endsection | 190 | @endsection |
183 | 191 |
resources/views/education.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('education') }}", |
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').html(data); |
19 | }, | 19 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
20 | headers: { | ||
21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
22 | }, | ||
23 | error: function (data) { | ||
24 | data = JSON.stringify(data); | ||
25 | console.log('Error: ' + data); | ||
26 | } | ||
27 | }); | ||
28 | |||
29 | $.ajax({ | ||
30 | type: "GET", | ||
31 | url: "{{ route('shipping_companies') }}", | ||
32 | data: "sort="+val_+"&block=2", | ||
33 | success: function (data) { | ||
34 | console.log('Выбор сортировки2'); | ||
35 | console.log(data); | ||
36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | ||
37 | $('#block_2').html(data); | ||
38 | }, | 20 | }, |
39 | headers: { | 21 | headers: { |
40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
41 | }, | 23 | }, |
42 | error: function (data) { | 24 | error: function (data) { |
43 | data = JSON.stringify(data); | 25 | data = JSON.stringify(data); |
44 | console.log('Error: ' + data); | 26 | console.log('Error: ' + data); |
45 | } | 27 | } |
46 | }); | 28 | }); |
47 | }); | 29 | }); |
48 | 30 | ||
49 | $(document).ready(function(){ | 31 | $(document).ready(function(){ |
50 | var sel = $('#select2-sort_ajax-container'); | 32 | var sel = $('#select2-sort_ajax-container'); |
51 | var key = getUrlParameter('sort'); | 33 | var key = getUrlParameter('sort'); |
34 | console.log(sel); | ||
35 | console.log(key); | ||
52 | 36 | ||
53 | if (key !=='') { | 37 | if (key !=='') { |
54 | console.log(key); | 38 | console.log(key); |
55 | switch (key) { | 39 | switch (key) { |
56 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 40 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
57 | case "name_up": sel.html('По имени (возрастание)'); break; | 41 | case "name_up": sel.html('По имени (возрастание)'); break; |
58 | case "name_down": sel.html('По дате (убывание)'); break; | 42 | case "name_down": sel.html('По дате (убывание)'); break; |
59 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 43 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
60 | case "created_at_down": sel.html('По дате (убывание)'); break; | 44 | case "created_at_down": sel.html('По дате (убывание)'); break; |
61 | } | 45 | } |
62 | 46 | ||
63 | } | 47 | } |
64 | }); | 48 | }); |
65 | </script> | 49 | </script> |
66 | @endsection | 50 | @endsection |
67 | 51 | ||
68 | @section('content') | 52 | @section('content') |
69 | <section class="thing"> | 53 | <section class="thing"> |
70 | <div class="container"> | 54 | <div class="container"> |
71 | <form class="thing__body" active="{{ route('education') }}"> | 55 | <form class="thing__body" active="{{ route('education') }}"> |
72 | <ul class="breadcrumbs thing__breadcrumbs"> | 56 | <ul class="breadcrumbs thing__breadcrumbs"> |
73 | <li><a href="{{ route('index') }}">Главная</a></li> | 57 | <li><a href="{{ route('index') }}">Главная</a></li> |
74 | <li><b>Образование</b></li> | 58 | <li><b>Образование</b></li> |
75 | </ul> | 59 | </ul> |
76 | <h1 class="thing__title">Образование</h1> | 60 | <h1 class="thing__title">Образование</h1> |
77 | <p class="thing__text">Прежде всего, современная методология разработки представляет собой интересный эксперимент проверки направлений прогрессивного развития.</p> | 61 | <p class="thing__text">Прежде всего, современная методология разработки представляет собой интересный эксперимент проверки направлений прогрессивного развития.</p> |
78 | <div class="search thing__search"> | 62 | <div class="search thing__search"> |
79 | <input type="search" class="input" id="search" name="search" placeholder="Введите наименование работодателя" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif"> | 63 | <input type="search" class="input" id="search" name="search" placeholder="Введите наименование работодателя" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif"> |
80 | <button type="submit" class="button">Найти</button> | 64 | <button type="submit" class="button">Найти</button> |
81 | <span> | 65 | <span> |
82 | <svg> | 66 | <svg> |
83 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 67 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
84 | </svg> | 68 | </svg> |
85 | </span> | 69 | </span> |
86 | </div> | 70 | </div> |
87 | </form> | 71 | </form> |
88 | </div> | 72 | </div> |
89 | </section> | 73 | </section> |
90 | <main class="main"> | 74 | <main class="main"> |
91 | <div class="container"> | 75 | <div class="container"> |
92 | <div class="filters"> | 76 | <div class="filters"> |
93 | <div class="filters__label">Показано 1 – @if($count_edu < 6) {{ $count_edu }}@else 6 @endif из {{ $count_edu }} результатов поиска</div> | 77 | <div class="filters__label">Показано 1 – @if($count_edu < 6) {{ $count_edu }}@else 6 @endif из {{ $count_edu }} результатов поиска</div> |
94 | <div class="filters__body"> | 78 | <div class="filters__body"> |
95 | <div class="select filters__select"> | 79 | <div class="select filters__select"> |
96 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 80 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
97 | <option value="default">Сортировка (по умолчанию)</option> | 81 | <option value="default">Сортировка (по умолчанию)</option> |
98 | <option value="name_up">По имени (возрастание)</option> | 82 | <option value="name_up">По имени (возрастание)</option> |
99 | <option value="name_down">По имени (убывание)</option> | 83 | <option value="name_down">По имени (убывание)</option> |
100 | <option value="created_at_up">По дате (возрастание)</option> | 84 | <option value="created_at_up">По дате (возрастание)</option> |
101 | <option value="created_at_down">По дате (убывание)</option> | 85 | <option value="created_at_down">По дате (убывание)</option> |
102 | </select> | 86 | </select> |
103 | </div> | 87 | </div> |
104 | </div> | 88 | </div> |
105 | </div> | 89 | </div> |
106 | @if ($educations->count()) | 90 | |
107 | <div class="main__ads"> | 91 | |
92 | <div class="main__ads" id="block" name="block"> | ||
93 | @if ($educations->count()) | ||
108 | @foreach($educations as $edu) | 94 | @foreach($educations as $edu) |
109 | <div class="main__ads-item"> | 95 | <div class="main__ads-item"> |
110 | <div class="main__ads-item-pic"> | 96 | <div class="main__ads-item-pic"> |
111 | <img src="@if (!empty($edu->image)) {{ asset(Storage::url($edu->image)) }} @else {{ asset('images/education.jpg') }} @endif" alt="{{ $edu->name }}"> | 97 | <img src="@if (!empty($edu->image)) {{ asset(Storage::url($edu->image)) }} @else {{ asset('images/education.jpg') }} @endif" alt="{{ $edu->name }}"> |
112 | <span> | 98 | <span> |
113 | <svg> | 99 | <svg> |
114 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 100 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
115 | </svg> | 101 | </svg> |
116 | </span> | 102 | </span> |
117 | </div> | 103 | </div> |
118 | <div class="main__ads-item-body"> | 104 | <div class="main__ads-item-body"> |
119 | <b>{{ $edu->name }}</b> | 105 | <b>{{ $edu->name }}</b> |
120 | <span>{{ $edu->program_education->count() }} учебных направлений</span> | 106 | <span>{{ $edu->program_education->count() }} учебных направлений</span> |
121 | <a href="" class="button button_light">Читать далее</a> | 107 | <a href="" class="button button_light">Читать далее</a> |
122 | </div> | 108 | </div> |
123 | </div> | 109 | </div> |
124 | @endforeach | 110 | @endforeach |
125 | 111 | ||
112 | {{ $educations->appends($_GET)->links('paginate') }} | ||
113 | @else | ||
114 | <H2>Нет данных</H2> | ||
115 | @endif | ||
126 | </div> | 116 | </div> |
127 | {{ $educations->appends($_GET)->links('paginate') }} | 117 | |
128 | @else | ||
129 | <H2>Нет данных</H2> | ||
130 | @endif | ||
131 | <!--<div class="pagination"> | 118 | <!--<div class="pagination"> |
132 | <a href="#" class="pagination__nav pagination__nav_prev"> | 119 | <a href="#" class="pagination__nav pagination__nav_prev"> |
133 | <svg> | 120 | <svg> |
134 | <use xlink:href="images/sprite.svg#arrow-bold"></use> | 121 | <use xlink:href="images/sprite.svg#arrow-bold"></use> |
135 | </svg> | 122 | </svg> |
136 | </a> | 123 | </a> |
137 | <span class="pagination__item active">1</span> | 124 | <span class="pagination__item active">1</span> |
138 | <a href="#" class="pagination__item">2</a> | 125 | <a href="#" class="pagination__item">2</a> |
139 | <a href="#" class="pagination__item">3</a> | 126 | <a href="#" class="pagination__item">3</a> |
140 | <a href="#" class="pagination__item">4</a> | 127 | <a href="#" class="pagination__item">4</a> |
141 | <a href="#" class="pagination__item">5</a> | 128 | <a href="#" class="pagination__item">5</a> |
142 | <span class="pagination__dots"> | 129 | <span class="pagination__dots"> |
143 | <svg> | 130 | <svg> |
144 | <use xlink:href="images/sprite.svg#dots"></use> | 131 | <use xlink:href="images/sprite.svg#dots"></use> |
145 | </svg> | 132 | </svg> |
146 | </span> | 133 | </span> |
147 | <a href="#" class="pagination__item">25</a> | 134 | <a href="#" class="pagination__item">25</a> |
148 | <a href="#" class="pagination__nav pagination__nav_next"> | 135 | <a href="#" class="pagination__nav pagination__nav_next"> |
149 | <svg> | 136 | <svg> |
150 | <use xlink:href="images/sprite.svg#arrow-bold"></use> | 137 | <use xlink:href="images/sprite.svg#arrow-bold"></use> |
resources/views/employers/messages.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 | @endsection | 49 | @endsection |
50 | 50 | ||
51 | @section('content') | 51 | @section('content') |
52 | <section class="cabinet"> | 52 | <section class="cabinet"> |
53 | <div class="container"> | 53 | <div class="container"> |
54 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 54 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
55 | <li><a href="{{ route('index') }}">Главная</a></li> | 55 | <li><a href="{{ route('index') }}">Главная</a></li> |
56 | <li><b>Личный кабинет</b></li> | 56 | <li><b>Личный кабинет</b></li> |
57 | </ul> | 57 | </ul> |
58 | <div class="cabinet__wrapper"> | 58 | <div class="cabinet__wrapper"> |
59 | <div class="cabinet__side"> | 59 | <div class="cabinet__side"> |
60 | <div class="cabinet__side-toper"> | 60 | <div class="cabinet__side-toper"> |
61 | @include('employers.emblema') | 61 | @include('employers.emblema') |
62 | 62 | ||
63 | </div> | 63 | </div> |
64 | 64 | ||
65 | @include('employers.menu', ['item' => 5]) | 65 | @include('employers.menu', ['item' => 5]) |
66 | </div> | 66 | </div> |
67 | 67 | ||
68 | <div class="cabinet__body"> | 68 | <div class="cabinet__body"> |
69 | <div class="cabinet__body-item"> | 69 | <div class="cabinet__body-item"> |
70 | <h2 class="title cabinet__title">Сообщения123</h2> | 70 | <h2 class="title cabinet__title">Сообщения</h2> |
71 | </div> | 71 | </div> |
72 | <div class="cabinet__body-item"> | 72 | <div class="cabinet__body-item"> |
73 | <div class="cabinet__filters"> | 73 | <div class="cabinet__filters"> |
74 | <div class="cabinet__filters-item"> | 74 | <div class="cabinet__filters-item"> |
75 | <div class="cabinet__filters-buttons"> | 75 | <div class="cabinet__filters-buttons"> |
76 | <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a> | 76 | <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a> |
77 | <a href="{{ route('employer.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a> | 77 | <a href="{{ route('employer.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a> |
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | <div class="cabinet__filters-item"> | 80 | <div class="cabinet__filters-item"> |
81 | <div class="select"> | 81 | <div class="select"> |
82 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 82 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
83 | <option value="default">Сортировка (по умолчанию)</option> | 83 | <option value="default">Сортировка (по умолчанию)</option> |
84 | <option value="name (asc)">По имени (возрастание)</option> | 84 | <option value="name (asc)">По имени (возрастание)</option> |
85 | <option value="name (desc)">По имени (убывание)</option> | 85 | <option value="name (desc)">По имени (убывание)</option> |
86 | <option value="created_at (asc)">По дате (возрастание)</option> | 86 | <option value="created_at (asc)">По дате (возрастание)</option> |
87 | <option value="created_at (desc)">По дате (убывание)</option> | 87 | <option value="created_at (desc)">По дате (убывание)</option> |
88 | </select> | 88 | </select> |
89 | </div> | 89 | </div> |
90 | </div> | 90 | </div> |
91 | </div> | 91 | </div> |
92 | <div class="messages"> | 92 | <div class="messages"> |
93 | <!--<button type="button" class="messages__button js-toggle js-parent-toggle button button_light button_more"> | 93 | <!--<button type="button" class="messages__button js-toggle js-parent-toggle button button_light button_more"> |
94 | <span>Показать ещё</span> | 94 | <span>Показать ещё</span> |
95 | <span>Скрыть</span> | 95 | <span>Скрыть</span> |
96 | </button>--> | 96 | </button>--> |
97 | <div class="messages__body"> | 97 | <div class="messages__body"> |
98 | @if ($messages->count()) | 98 | @if ($messages->count()) |
99 | @foreach($messages as $it) | 99 | @foreach($messages as $it) |
100 | <div class="messages__item"> | 100 | <div class="messages__item"> |
101 | <div class="messages__item-info"> | 101 | <div class="messages__item-info"> |
102 | <div class="messages__item-photo"> | 102 | <div class="messages__item-photo"> |
103 | <svg> | 103 | <svg> |
104 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | 104 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
105 | </svg> | 105 | </svg> |
106 | 106 | ||
107 | @if ($type_message == 'input') | 107 | @if ($type_message == 'input') |
108 | @if ($it->user_to->is_worker) | 108 | @if ($it->user_to->is_worker) |
109 | @if (isset($it->user_to->workers->phote)) | 109 | @if (isset($it->user_to->workers->phote)) |
110 | <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> | 110 | <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> |
111 | @else | 111 | @else |
112 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 112 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
113 | @endif | 113 | @endif |
114 | @else | 114 | @else |
115 | @if (isset($it->user_to->employers->logo)) | 115 | @if (isset($it->user_to->employers->logo)) |
116 | <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> | 116 | <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> |
117 | @else | 117 | @else |
118 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 118 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
119 | @endif | 119 | @endif |
120 | @endif | 120 | @endif |
121 | @endif | 121 | @endif |
122 | 122 | ||
123 | @if ($type_message == 'output') | 123 | @if ($type_message == 'output') |
124 | @if ($it->user_from->is_worker) | 124 | @if ($it->user_from->is_worker) |
125 | @if (isset($it->user_from->workers->phote)) | 125 | @if (isset($it->user_from->workers->phote)) |
126 | <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> | 126 | <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> |
127 | @else | 127 | @else |
128 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 128 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
129 | @endif | 129 | @endif |
130 | @else | 130 | @else |
131 | @if (isset($it->user_from->employers->logo)) | 131 | @if (isset($it->user_from->employers->logo)) |
132 | <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | 132 | <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> |
133 | @else | 133 | @else |
134 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> | 134 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
135 | @endif | 135 | @endif |
136 | @endif | 136 | @endif |
137 | @endif | 137 | @endif |
138 | </div> | 138 | </div> |
139 | <div class="messages__item-text"> | 139 | <div class="messages__item-text"> |
140 | <div> | 140 | <div> |
141 | От: @if (isset($it->user_from)) | 141 | От: @if (isset($it->user_from)) |
142 | @if ($it->user_from->id !== $user_id) | 142 | @if ($it->user_from->id !== $user_id) |
143 | <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> | 143 | <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> |
144 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} | 144 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} |
145 | </a> | 145 | </a> |
146 | @else | 146 | @else |
147 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} | 147 | {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} |
148 | @endif | 148 | @endif |
149 | @else | 149 | @else |
150 | Удаленный пользователь | 150 | Удаленный пользователь |
151 | @endif | 151 | @endif |
152 | <br> | 152 | <br> |
153 | К: @if (isset($it->user_to)) | 153 | К: @if (isset($it->user_to)) |
154 | @if ($it->user_to->id !== $user_id) | 154 | @if ($it->user_to->id !== $user_id) |
155 | <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> | 155 | <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> |
156 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} | 156 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} |
157 | </a> | 157 | </a> |
158 | @else | 158 | @else |
159 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} | 159 | {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} |
160 | @endif | 160 | @endif |
161 | @else | 161 | @else |
162 | Удаленный пользователь | 162 | Удаленный пользователь |
163 | @endif | 163 | @endif |
164 | </div> | 164 | </div> |
165 | <div><span>Вакансия:</span>@if (isset($it->vacancies[0])) {{ $it->vacancies[0]->name." (".($it->vacancies[0]->id).")" }} @else Удалена @endif</div> | 165 | <div><span>Вакансия:</span>@if (isset($it->vacancies[0])) {{ $it->vacancies[0]->name." (".($it->vacancies[0]->id).")" }} @else Удалена @endif</div> |
166 | <div><span>Текст:</span>{{ $it->text }}</div> | 166 | <div><span>Текст:</span>{{ $it->text }}</div> |
167 | </div> | 167 | </div> |
168 | </div> | 168 | </div> |
169 | <div class="messages__item-date">{{ $it->created_at }}</div> | 169 | <div class="messages__item-date">{{ $it->created_at }}</div> |
170 | </div> | 170 | </div> |
171 | @endforeach | 171 | @endforeach |
172 | @endif | 172 | @endif |
173 | </div> | 173 | </div> |
174 | </div> | 174 | </div> |
175 | </div> | 175 | </div> |
176 | </div> | 176 | </div> |
177 | </div> | 177 | </div> |
178 | </div> | 178 | </div> |
179 | </section> | 179 | </section> |
180 | </div> | 180 | </div> |
181 | @endsection | 181 | @endsection |
182 | 182 |
resources/views/index.blade.php
1 | @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | ||
5 | console.log('Test system'); | ||
6 | $(document).on('click', '#button_send', function() { | ||
7 | var field_login = $('#email'); | ||
8 | var field_pwd = $('#password'); | ||
9 | var login_val = field_login.val(); | ||
10 | var pwd_val = field_pwd.val(); | ||
11 | 4 | ||
12 | console.log('login: '+login_val+' password: '+pwd_val); | ||
13 | |||
14 | $.ajax({ | ||
15 | type: "GET", | ||
16 | url: "{{ route('login') }}", | ||
17 | data: "email="+login_val+"&password="+pwd_val, | ||
18 | success: function (data) { | ||
19 | console.log('Вход в систему'); | ||
20 | let d = JSON.parse(data); | ||
21 | if(typeof d['REDIRECT'] !== "undefined") { | ||
22 | location.href = d['REDIRECT']; | ||
23 | } | ||
24 | if (typeof d['ERROR'] !== "undefined") { | ||
25 | $('#message_error').html(d['ERROR']); | ||
26 | } | ||
27 | console.log(d['REDIRECT']); | ||
28 | //$('#block_1').html(data); | ||
29 | }, | ||
30 | headers: { | ||
31 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
32 | }, | ||
33 | error: function (data) { | ||
34 | data = JSON.stringify(data); | ||
35 | console.log('Error: ' + data); | ||
36 | } | ||
37 | }); | ||
38 | }); | ||
39 | |||
40 | $(document).on('click', '#button_reg_worker', function() { | ||
41 | var field_login = $('#email_worker'); | ||
42 | var field_pwd = $('#password_worker'); | ||
43 | var field_confirm_pwd = $('#password_confirmation_worker'); | ||
44 | var field_politik_worker = $('#politik_worker'); | ||
45 | var field_telephone_worker = $('#telephone_worker'); | ||
46 | var field_job_titles_worker = $('#job_titles_worker'); | ||
47 | var field_surname_worker = $('#surname_worker'); | ||
48 | var field_name_man = $('#name_man_worker'); | ||
49 | var field_surname2_worker = $('#surname2_worker'); | ||
50 | |||
51 | var login = field_login.val(); | ||
52 | var pwd = field_pwd.val(); | ||
53 | var confirm_pwd = field_confirm_pwd.val(); | ||
54 | var politik = field_politik_worker.val(); | ||
55 | var telephone = field_telephone_worker.val(); | ||
56 | var job_titles = field_job_titles_worker.val(); | ||
57 | var surname = field_surname_worker.val(); | ||
58 | var name_man = field_name_man.val(); | ||
59 | var surname2 = field_surname2_worker.val(); | ||
60 | |||
61 | |||
62 | console.log('login: '+login+' password: '+pwd); | ||
63 | |||
64 | $.ajax({ | ||
65 | type: "GET", | ||
66 | url: "{{ route('register_worker') }}", | ||
67 | data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+ | ||
68 | "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+ | ||
69 | "&surname2="+surname2+"&subscribe_email="+login, | ||
70 | success: function (data) { | ||
71 | console.log('Вход в систему'); | ||
72 | let d = JSON.parse(data); | ||
73 | if(typeof d['REDIRECT'] !== "undefined") { | ||
74 | console.log(d['REDIRECT']); | ||
75 | location.href = d['REDIRECT']; | ||
76 | } | ||
77 | if (typeof d['ERROR'] !== "undefined") { | ||
78 | console.log(d['ERROR']); | ||
79 | $('#block-info').css({'display': 'block'}); | ||
80 | $('#messages_error_reg').html(d['ERROR']); | ||
81 | } | ||
82 | console.log(d['REDIRECT']); | ||
83 | |||
84 | }, | ||
85 | headers: { | ||
86 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
87 | }, | ||
88 | error: function (data) { | ||
89 | data = JSON.stringify(data); | ||
90 | console.log('Error: ' + data); | ||
91 | } | ||
92 | }); | ||
93 | |||
94 | return false; | ||
95 | }); | ||
96 | |||
97 | $(document).on('click', '#button_reg_employer', function() { | ||
98 | var field_login = $('#email_employer'); | ||
99 | var field_pwd = $('#password_employer'); | ||
100 | var field_confirm_pwd = $('#password_confirmation_employer'); | ||
101 | var field_politik_employer = $('#politik_employer'); | ||
102 | var field_telephone_employer = $('#telephone_employer'); | ||
103 | var field_company_employer = $('#company_employer'); | ||
104 | var field_surname_employer = $('#surname_employer'); | ||
105 | var field_name_man_employer = $('#name_man_employer'); | ||
106 | var field_surname2_employer = $('#surname2_employer'); | ||
107 | |||
108 | var login = field_login.val(); | ||
109 | var pwd = field_pwd.val(); | ||
110 | var confirm_pwd = field_confirm_pwd.val(); | ||
111 | var politik = field_politik_employer.val(); | ||
112 | var telephone = field_telephone_employer.val(); | ||
113 | var company_employer = field_company_employer.val(); | ||
114 | var surname = field_surname_employer.val(); | ||
115 | var name_man = field_name_man_employer.val(); | ||
116 | var surname2 = field_surname2_employer.val(); | ||
117 | |||
118 | |||
119 | console.log('login: '+login+' password: '+pwd); | ||
120 | |||
121 | |||
122 | $.ajax({ | ||
123 | type: "GET", | ||
124 | url: "{{ route('register_employer') }}", | ||
125 | data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+ | ||
126 | "&telephone="+telephone+"&name_company="+company_employer+"&surname="+surname+"&name_man="+name_man+ | ||
127 | "&surname2="+surname2+"&subscribe_email="+login, | ||
128 | success: function (data) { | ||
129 | console.log('Вход в систему'); | ||
130 | let d = JSON.parse(data); | ||
131 | if(typeof d['REDIRECT'] !== "undefined") { | ||
132 | console.log(d['REDIRECT']); | ||
133 | location.href = d['REDIRECT']; | ||
134 | } | ||
135 | if (typeof d['ERROR'] !== "undefined") { | ||
136 | console.log(d['ERROR']); | ||
137 | $('#block-info').css({'display': 'block'}); | ||
138 | $('#messages_error_reg').html(d['ERROR']); | ||
139 | } | ||
140 | console.log(d['REDIRECT']); | ||
141 | |||
142 | }, | ||
143 | headers: { | ||
144 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
145 | }, | ||
146 | error: function (data) { | ||
147 | data = JSON.stringify(data); | ||
148 | console.log('Error: ' + data); | ||
149 | } | ||
150 | }); | ||
151 | |||
152 | return false; | ||
153 | }); | ||
154 | </script> | ||
155 | @endsection | 5 | @endsection |
156 | 6 | ||
157 | @section('content') | 7 | @section('content') |
158 | <section class="work"> | 8 | <section class="work"> |
159 | <div class="container"> | 9 | <div class="container"> |
160 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> | 10 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> |
161 | <div class="work__body"> | 11 | <div class="work__body"> |
162 | <div class="work__title"> | 12 | <div class="work__title"> |
163 | Работа в море / | 13 | Работа в море / |
164 | <span class="br">Работа на реке</span> | 14 | <span class="br">Работа на реке</span> |
165 | </div> | 15 | </div> |
166 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — | 16 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — |
167 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в | 17 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в |
168 | сложных, но очень интересных условиях. </div> | 18 | сложных, но очень интересных условиях. </div> |
169 | <div class="work__list"> | 19 | <div class="work__list"> |
170 | <div>Тысячи соискателей увидят Ваше объявление</div> | 20 | <div>Тысячи соискателей увидят Ваше объявление</div> |
171 | <div>Десятки компаний выкладывают объявления каждый день</div> | 21 | <div>Десятки компаний выкладывают объявления каждый день</div> |
172 | </div> | 22 | </div> |
173 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> | 23 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> |
174 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> | 24 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> |
175 | <button type="submit" class="button button_light">Посмотреть вакансии</button> | 25 | <button type="submit" class="button button_light">Посмотреть вакансии</button> |
176 | <span> | 26 | <span> |
177 | <svg> | 27 | <svg> |
178 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 28 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
179 | </svg> | 29 | </svg> |
180 | </span> | 30 | </span> |
181 | </form> | 31 | </form> |
182 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> | 32 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> |
183 | <div class="work__get"> | 33 | <div class="work__get"> |
184 | <b>Скачать приложение</b> | 34 | <b>Скачать приложение</b> |
185 | <a href=""> | 35 | <a href=""> |
186 | <img src="{{ asset('images/google.svg') }}" alt=""> | 36 | <img src="{{ asset('images/google.svg') }}" alt=""> |
187 | </a> | 37 | </a> |
188 | <a href=""> | 38 | <a href=""> |
189 | <img src="{{ asset('images/apple.svg') }}" alt=""> | 39 | <img src="{{ asset('images/apple.svg') }}" alt=""> |
190 | </a> | 40 | </a> |
191 | </div> | 41 | </div> |
192 | </div> | 42 | </div> |
193 | </div> | 43 | </div> |
194 | </section> | 44 | </section> |
195 | <section class="numbers"> | 45 | <section class="numbers"> |
196 | <div class="container"> | 46 | <div class="container"> |
197 | <div class="numbers__body"> | 47 | <div class="numbers__body"> |
198 | <div class="numbers__item"> | 48 | <div class="numbers__item"> |
199 | <b>500+</b> | 49 | <b>500+</b> |
200 | <span>Резюме</span> | 50 | <span>Резюме</span> |
201 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют | 51 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют |
202 | фракционных разногласий и призваны к ответу. | 52 | фракционных разногласий и призваны к ответу. |
203 | </div> | 53 | </div> |
204 | <div class="numbers__item"> | 54 | <div class="numbers__item"> |
205 | <b>1 000+</b> | 55 | <b>1 000+</b> |
206 | <span>Вакансий</span> | 56 | <span>Вакансий</span> |
207 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих | 57 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих |
208 | собственных рациональных ограничений. | 58 | собственных рациональных ограничений. |
209 | </div> | 59 | </div> |
210 | <div class="numbers__item"> | 60 | <div class="numbers__item"> |
211 | <b>265</b> | 61 | <b>265</b> |
212 | <span>Компаний</span> | 62 | <span>Компаний</span> |
213 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных | 63 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных |
214 | ограничений. | 64 | ограничений. |
215 | </div> | 65 | </div> |
216 | </div> | 66 | </div> |
217 | </div> | 67 | </div> |
218 | </section> | 68 | </section> |
219 | <section class="vacancies"> | 69 | <section class="vacancies"> |
220 | <div class="container"> | 70 | <div class="container"> |
221 | <div class="title">Новые вакансии</div> | 71 | <div class="title">Новые вакансии</div> |
222 | <div class="vacancies__body"> | 72 | <div class="vacancies__body"> |
223 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> | 73 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> |
224 | <div class="vacancies__list"> | 74 | <div class="vacancies__list"> |
225 | @if ($categories->count()) | 75 | @if ($categories->count()) |
226 | @foreach ($categories as $cat) | 76 | @foreach ($categories as $cat) |
227 | <a href="#" class="vacancies__item"> | 77 | <a href="#" class="vacancies__item"> |
228 | <span style="border-color:#F4C4C2"> | 78 | <span style="border-color:#F4C4C2"> |
229 | <b>{{ $cat->name }}</b> | 79 | <b>{{ $cat->name }}</b> |
230 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> | 80 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> |
231 | </span> | 81 | </span> |
232 | </a> | 82 | </a> |
233 | @endforeach | 83 | @endforeach |
234 | @else | 84 | @else |
235 | Тут пока нет никаких вакансий | 85 | Тут пока нет никаких вакансий |
236 | @endif | 86 | @endif |
237 | </div> | 87 | </div> |
238 | </div> | 88 | </div> |
239 | </div> | 89 | </div> |
240 | </section> | 90 | </section> |
241 | <section class="employer"> | 91 | <section class="employer"> |
242 | <div class="container"> | 92 | <div class="container"> |
243 | <div class="title">Работодатели</div> | 93 | <div class="title">Работодатели</div> |
244 | <div class="swiper js-employer-swiper"> | 94 | <div class="swiper js-employer-swiper"> |
245 | <div class="swiper-wrapper"> | 95 | <div class="swiper-wrapper"> |
246 | 96 | ||
247 | @if ($employers->count()) | 97 | @if ($employers->count()) |
248 | @php | 98 | @php |
249 | $rec = 0; | 99 | $rec = 0; |
250 | $count = $employers->count(); | 100 | $count = $employers->count(); |
251 | @endphp | 101 | @endphp |
252 | @foreach($employers as $emp) | 102 | @foreach($employers as $emp) |
253 | @php $rec++ @endphp | 103 | @php $rec++ @endphp |
254 | @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) | 104 | @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) |
255 | <div class="swiper-slide"> | 105 | <div class="swiper-slide"> |
256 | <div class="employer__item"> | 106 | <div class="employer__item"> |
257 | @endif | 107 | @endif |
258 | @if (!empty($emp->logo)) | 108 | @if (!empty($emp->logo)) |
259 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> | 109 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> |
260 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> | 110 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> |
261 | </a> | 111 | </a> |
262 | @else | 112 | @else |
263 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> | 113 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> |
264 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> | 114 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> |
265 | </a> | 115 | </a> |
266 | @endif | 116 | @endif |
267 | @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) | 117 | @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) |
268 | </div> | 118 | </div> |
269 | </div> | 119 | </div> |
270 | @endif | 120 | @endif |
271 | @endforeach | 121 | @endforeach |
272 | @else | 122 | @else |
273 | <h5>Тут нет никаких записей</h5> | 123 | <h5>Тут нет никаких записей</h5> |
274 | @endif | 124 | @endif |
275 | </div> | 125 | </div> |
276 | <div class="swiper-pagination"></div> | 126 | <div class="swiper-pagination"></div> |
277 | </div> | 127 | </div> |
278 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> | 128 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> |
279 | </div> | 129 | </div> |
280 | </section> | 130 | </section> |
281 | <section class="about"> | 131 | <section class="about"> |
282 | <div class="container"> | 132 | <div class="container"> |
283 | <div class="about__wrapper"> | 133 | <div class="about__wrapper"> |
284 | <div class="title about__title">О нас</div> | 134 | <div class="title about__title">О нас</div> |
285 | <div class="about__body"> | 135 | <div class="about__body"> |
286 | <div class="about__line"></div> | 136 | <div class="about__line"></div> |
287 | <div class="about__item"> | 137 | <div class="about__item"> |
288 | <b>Для работодателей</b> | 138 | <b>Для работодателей</b> |
289 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие | 139 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие |
290 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> | 140 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> |
291 | <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a> | 141 | <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a> |
292 | </div> | 142 | </div> |
293 | <div class="about__item"> | 143 | <div class="about__item"> |
294 | <b>Для сотрудников</b> | 144 | <b>Для сотрудников</b> |
295 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и | 145 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и |
296 | СНГ ищут сотрудников через наши ресурсы</span> | 146 | СНГ ищут сотрудников через наши ресурсы</span> |
297 | <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a> | 147 | <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a> |
298 | </div> | 148 | </div> |
299 | </div> | 149 | </div> |
300 | </div> | 150 | </div> |
301 | </div> | 151 | </div> |
302 | </section> | 152 | </section> |
303 | <section class="news"> | 153 | <section class="news"> |
304 | <div class="container"> | 154 | <div class="container"> |
305 | <div class="news__toper"> | 155 | <div class="news__toper"> |
306 | <div class="title">Новости и статьи</div> | 156 | <div class="title">Новости и статьи</div> |
307 | <div class="navs"> | 157 | <div class="navs"> |
308 | <button class="js-news-swiper-button-prev"> | 158 | <button class="js-news-swiper-button-prev"> |
309 | <svg class="rotate180"> | 159 | <svg class="rotate180"> |
310 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 160 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
311 | </svg> | 161 | </svg> |
312 | </button> | 162 | </button> |
313 | <button class="js-news-swiper-button-next"> | 163 | <button class="js-news-swiper-button-next"> |
314 | <svg> | 164 | <svg> |
315 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 165 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
316 | </svg> | 166 | </svg> |
317 | </button> | 167 | </button> |
318 | </div> | 168 | </div> |
319 | </div> | 169 | </div> |
320 | <div class="swiper js-news-swiper"> | 170 | <div class="swiper js-news-swiper"> |
321 | <div class="swiper-wrapper"> | 171 | <div class="swiper-wrapper"> |
322 | @if ($news->count()) | 172 | @if ($news->count()) |
323 | @foreach ($news as $new) | 173 | @foreach ($news as $new) |
324 | <div class="swiper-slide"> | 174 | <div class="swiper-slide"> |
325 | <div class="news__item"> | 175 | <div class="news__item"> |
326 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> | 176 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> |
327 | <div class="news__item-body"> | 177 | <div class="news__item-body"> |
328 | <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time> | 178 | <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time> |
329 | <span class="news__item-title">{{ $new->title }}</span> | 179 | <span class="news__item-title">{{ $new->title }}</span> |
330 | <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> | 180 | <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> |
331 | <a href="#" class="news__item-more button button_light">Читать далее</a> | 181 | <a href="#" class="news__item-more button button_light">Читать далее</a> |
332 | </div> | 182 | </div> |
333 | </div> | 183 | </div> |
334 | </div> | 184 | </div> |
335 | @endforeach | 185 | @endforeach |
336 | @endif | 186 | @endif |
337 | </div> | 187 | </div> |
338 | <div class="swiper-pagination"></div> | 188 | <div class="swiper-pagination"></div> |
339 | </div> | 189 | </div> |
340 | <div class="news__all button button_light">Все новости</div> | 190 | <div class="news__all button button_light">Все новости</div> |
341 | </div> | 191 | </div> |
342 | </section> | 192 | </section> |
343 | <section class="info"> | 193 | <section class="info"> |
344 | <div class="container"> | 194 | <div class="container"> |
345 | <img src="images/5.png" alt="" class="info__pic"> | 195 | <img src="images/5.png" alt="" class="info__pic"> |
346 | <div class="info__body"> | 196 | <div class="info__body"> |
347 | <div class="title info__title">Мы в социальных сетях</div> | 197 | <div class="title info__title">Мы в социальных сетях</div> |
348 | <div class="info__item"> | 198 | <div class="info__item"> |
349 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о | 199 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о |
350 | новых вакансиях прямо на свой смартфон</div> | 200 | новых вакансиях прямо на свой смартфон</div> |
351 | <a href="#" class="info__link" style="background:#20A0E1"> | 201 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> |
352 | <svg> | 202 | <svg> |
353 | <use xlink:href="images/sprite.svg#tg"></use> | 203 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
354 | </svg> | 204 | </svg> |
355 | Телеграм | 205 | Телеграм |
356 | </a> | 206 | </a> |
357 | </div> | 207 | </div> |
358 | <div class="info__item"> | 208 | <div class="info__item"> |
359 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация | 209 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация |
360 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> | 210 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> |
361 | <a href="#" class="info__link" style="background:#2787F5"> | 211 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> |
362 | <svg> | 212 | <svg> |
363 | <use xlink:href="images/sprite.svg#vk"></use> | 213 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
364 | </svg> | 214 | </svg> |
365 | ВКонтакте | 215 | ВКонтакте |
366 | </a> | 216 | </a> |
367 | </div> | 217 | </div> |
368 | </div> | 218 | </div> |
369 | </div> | 219 | </div> |
370 | </section> | 220 | </section> |
371 | @endsection | 221 | @endsection |
372 | 222 |
resources/views/info_company.blade.php
1 | @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '#sort_ajax', function() { | 6 | $(document).on('change', '#sort_ajax', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.val(); | 8 | var val_ = this_.val(); |
9 | console.log('sort items '+val_); | 9 | console.log('sort items '+val_); |
10 | 10 | ||
11 | $.ajax({ | 11 | $.ajax({ |
12 | type: "GET", | 12 | type: "GET", |
13 | url: "{{ route('shipping_companies') }}", | 13 | url: "{{ route('shipping_companies') }}", |
14 | data: "sort="+val_+"&block=1", | 14 | data: "sort="+val_+"&block=1", |
15 | success: function (data) { | 15 | success: function (data) { |
16 | console.log('Выбор сортировки'); | 16 | console.log('Выбор сортировки'); |
17 | console.log(data); | 17 | console.log(data); |
18 | $('#block_1').html(data); | 18 | $('#block_1').html(data); |
19 | }, | 19 | }, |
20 | headers: { | 20 | headers: { |
21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
22 | }, | 22 | }, |
23 | error: function (data) { | 23 | error: function (data) { |
24 | data = JSON.stringify(data); | 24 | data = JSON.stringify(data); |
25 | console.log('Error: ' + data); | 25 | console.log('Error: ' + data); |
26 | } | 26 | } |
27 | }); | 27 | }); |
28 | 28 | ||
29 | $.ajax({ | 29 | $.ajax({ |
30 | type: "GET", | 30 | type: "GET", |
31 | url: "{{ route('shipping_companies') }}", | 31 | url: "{{ route('shipping_companies') }}", |
32 | data: "sort="+val_+"&block=2", | 32 | data: "sort="+val_+"&block=2", |
33 | success: function (data) { | 33 | success: function (data) { |
34 | console.log('Выбор сортировки2'); | 34 | console.log('Выбор сортировки2'); |
35 | console.log(data); | 35 | console.log(data); |
36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
37 | $('#block_2').html(data); | 37 | $('#block_2').html(data); |
38 | }, | 38 | }, |
39 | headers: { | 39 | headers: { |
40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
41 | }, | 41 | }, |
42 | error: function (data) { | 42 | error: function (data) { |
43 | data = JSON.stringify(data); | 43 | data = JSON.stringify(data); |
44 | console.log('Error: ' + data); | 44 | console.log('Error: ' + data); |
45 | } | 45 | } |
46 | }); | 46 | }); |
47 | }); | 47 | }); |
48 | 48 | ||
49 | $(document).ready(function(){ | 49 | $(document).ready(function(){ |
50 | var sel = $('#select2-sort_ajax-container'); | 50 | var sel = $('#select2-sort_ajax-container'); |
51 | var key = getUrlParameter('sort'); | 51 | var key = getUrlParameter('sort'); |
52 | 52 | ||
53 | if (key !=='') { | 53 | if (key !=='') { |
54 | console.log(key); | 54 | console.log(key); |
55 | switch (key) { | 55 | switch (key) { |
56 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 56 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
57 | case "name_up": sel.html('По имени (возрастание)'); break; | 57 | case "name_up": sel.html('По имени (возрастание)'); break; |
58 | case "name_down": sel.html('По дате (убывание)'); break; | 58 | case "name_down": sel.html('По дате (убывание)'); break; |
59 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 59 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
60 | case "created_at_down": sel.html('По дате (убывание)'); break; | 60 | case "created_at_down": sel.html('По дате (убывание)'); break; |
61 | } | 61 | } |
62 | 62 | ||
63 | } | 63 | } |
64 | }); | 64 | }); |
65 | |||
66 | //end | ||
67 | $(document).on('click', '.js_send_it_button', function() { | ||
68 | var this_ = $(this); | ||
69 | var code_user_id = this_.attr('data-uid'); | ||
70 | var code_to_user_id = this_.attr('data-tuid'); | ||
71 | var code_vacancy = this_.attr('data-vacancy'); | ||
72 | var user_id = $('#send_user_id'); | ||
73 | var to_user_id = $('#send_to_user_id'); | ||
74 | var vacancy = $('#send_vacancy'); | ||
75 | |||
76 | console.log('Клик на кнопки...'); | ||
77 | |||
78 | user_id.val(code_user_id); | ||
79 | to_user_id.val(code_to_user_id); | ||
80 | vacancy.val(code_vacancy); | ||
81 | }); | ||
65 | </script> | 82 | </script> |
66 | @endsection | 83 | @endsection |
67 | 84 | ||
68 | @section('content') | 85 | @section('content') |
69 | <section class="thing"> | 86 | <section class="thing"> |
70 | <div class="container"> | 87 | <div class="container"> |
71 | <div class="thing__body"> | 88 | <div class="thing__body"> |
72 | <ul class="breadcrumbs thing__breadcrumbs"> | 89 | <ul class="breadcrumbs thing__breadcrumbs"> |
73 | <li><a href="{{ route('index') }}">Главная</a></li> | 90 | <li><a href="{{ route('index') }}">Главная</a></li> |
74 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> | 91 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> |
75 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> | 92 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> |
76 | </ul> | 93 | </ul> |
77 | @if ($company[0]->oficial_status == 1) | 94 | @if ($company[0]->oficial_status == 1) |
78 | <div class="thing__badge"> | 95 | <div class="thing__badge"> |
79 | <svg> | 96 | <svg> |
80 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> | 97 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> |
81 | </svg> | 98 | </svg> |
82 | Компания проверена | 99 | Компания проверена |
83 | </div> | 100 | </div> |
84 | @endif | 101 | @endif |
85 | 102 | ||
86 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | 103 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> |
87 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> | 104 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> |
88 | <p class="thing__text">{{ $company[0]->text }}</p> | 105 | <p class="thing__text">{{ $company[0]->text }}</p> |
89 | <div class="thing__buttons"> | 106 | <div class="thing__buttons"> |
90 | <button type="button" class="button"> | 107 | <button type="button" class="button"> |
91 | <svg> | 108 | <svg> |
92 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | 109 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> |
93 | </svg> | 110 | </svg> |
94 | {{ $company[0]->ads->count() }} вакансии | 111 | {{ $company[0]->ads->count() }} вакансии |
95 | </button> | 112 | </button> |
96 | <a href="" class="button"> | 113 | <a data-fancybox data-src="#send" data-vacancy="0" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> |
97 | Написать сообщение | 114 | Написать сообщение |
98 | </a> | 115 | </a> |
99 | </div> | 116 | </div> |
100 | </div> | 117 | </div> |
101 | </div> | 118 | </div> |
102 | </section> | 119 | </section> |
103 | <main class="main"> | 120 | <main class="main"> |
104 | <div class="container"> | 121 | <div class="container"> |
105 | <div class="main__employer-page"> | 122 | <div class="main__employer-page"> |
106 | <h2 class="main__employer-page-title">О компании</h2> | 123 | <h2 class="main__employer-page-title">О компании</h2> |
107 | <div class="main__employer-page-info"> | 124 | <div class="main__employer-page-info"> |
108 | <div class="main__employer-page-item"> | 125 | <div class="main__employer-page-item"> |
109 | <b>Адрес компании</b> | 126 | <b>Адрес компании</b> |
110 | <span> | 127 | <span> |
111 | {{ $company[0]->address }} | 128 | {{ $company[0]->address }} |
112 | </span> | 129 | </span> |
113 | </div> | 130 | </div> |
114 | <div class="main__employer-page-item"> | 131 | <div class="main__employer-page-item"> |
115 | <b>Сайт</b> | 132 | <b>Сайт</b> |
116 | <span> | 133 | <span> |
117 | <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> | 134 | <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> |
118 | </span> | 135 | </span> |
119 | </div> | 136 | </div> |
120 | <div class="main__employer-page-item"> | 137 | <div class="main__employer-page-item"> |
121 | <b>Почта</b> | 138 | <b>Почта</b> |
122 | <span> | 139 | <span> |
123 | <a href="mailto:">{{ $company[0]->email }}</a> | 140 | <a href="mailto:">{{ $company[0]->email }}</a> |
124 | </span> | 141 | </span> |
125 | </div> | 142 | </div> |
126 | <div class="main__employer-page-item"> | 143 | <div class="main__employer-page-item"> |
127 | <b>Телефон</b> | 144 | <b>Телефон</b> |
128 | <span> | 145 | <span> |
129 | <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> | 146 | <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> |
130 | </span> | 147 | </span> |
131 | </div> | 148 | </div> |
132 | </div> | 149 | </div> |
133 | <div class="main__employer-page-item"> | 150 | <div class="main__employer-page-item"> |
134 | <b>Описание</b> | 151 | <b>Описание</b> |
135 | <span> | 152 | <span> |
136 | {{ $company[0]->text }} | 153 | {{ $company[0]->text }} |
137 | </span> | 154 | </span> |
138 | </div> | 155 | </div> |
139 | <div> | 156 | <div> |
140 | <div class="main__employer-page-tabs"> | 157 | <div class="main__employer-page-tabs"> |
141 | <button type="button" class="main__employer-page-tabs-item active" | 158 | <button type="button" class="main__employer-page-tabs-item active" |
142 | data-tab="1">Флот</button> | 159 | data-tab="1">Флот</button> |
143 | <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> | 160 | <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> |
144 | </div> | 161 | </div> |
145 | <div class="main__employer-page-body"> | 162 | <div class="main__employer-page-body"> |
146 | <div class="main__employer-page-body-item showed" data-body="1"> | 163 | <div class="main__employer-page-body-item showed" data-body="1"> |
147 | <div class="main__employer-page-one"> | 164 | <div class="main__employer-page-one"> |
148 | @if ($company[0]->flots->count()) | 165 | @if ($company[0]->flots->count()) |
149 | @foreach ($company[0]->flots as $flot) | 166 | @foreach ($company[0]->flots as $flot) |
150 | <a href="" class="main__employer-page-one-item"> | 167 | <a href="" class="main__employer-page-one-item"> |
151 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> | 168 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> |
152 | <b>{{ $flot->region }}</b> | 169 | <b>{{ $flot->region }}</b> |
153 | <span>{{ $flot->power }}</span> | 170 | <span>{{ $flot->power }}</span> |
154 | </a> | 171 | </a> |
155 | @endforeach | 172 | @endforeach |
156 | @endif | 173 | @endif |
157 | </div> | 174 | </div> |
158 | </div> | 175 | </div> |
159 | 176 | ||
160 | <div class="main__employer-page-body-item" data-body="2"> | 177 | <div class="main__employer-page-body-item" data-body="2"> |
161 | <div class="main__employer-page-two"> | 178 | <div class="main__employer-page-two"> |
162 | @foreach ($company[0]->ads as $job) | 179 | @foreach ($company[0]->ads as $job) |
163 | @foreach ($job->ad_job as $item) | 180 | @foreach ($job->ad_job as $item) |
164 | <div class="main__employer-page-two-item"> | 181 | <div class="main__employer-page-two-item"> |
165 | <div class="main__employer-page-two-item-toper"> | 182 | <div class="main__employer-page-two-item-toper"> |
166 | <!-- end --> | 183 | <!-- end --> |
167 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> | 184 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> |
168 | <span>{{ $job->name }}</span> | 185 | <span>{{ $job->name }}</span> |
169 | </div> | 186 | </div> |
170 | <div class="main__employer-page-two-item-title">{{ $item->flot }}</div> | 187 | <div class="main__employer-page-two-item-title">{{ $item->flot }}</div> |
171 | <div class="main__employer-page-two-item-text"> | 188 | <div class="main__employer-page-two-item-text"> |
172 | <div class="main__employer-page-two-item-text-name"> | 189 | <div class="main__employer-page-two-item-text-name"> |
173 | {{ $item->job_title->name }} | 190 | {{ $item->job_title->name }} |
174 | </div> | 191 | </div> |
175 | <div class="main__employer-page-two-item-text-body"> | 192 | <div class="main__employer-page-two-item-text-body"> |
176 | <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p> | 193 | <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p> |
177 | <p>Контракт: {{ $item->period }} мес.</p> | 194 | <p>Контракт: {{ $item->period }} мес.</p> |
178 | </div> | 195 | </div> |
179 | </div> | 196 | </div> |
180 | <div class="main__employer-page-two-item-text"> | 197 | <div class="main__employer-page-two-item-text"> |
181 | <div class="main__employer-page-two-item-text-name">Район работы</div> | 198 | <div class="main__employer-page-two-item-text-name">Район работы</div> |
182 | <div class="main__employer-page-two-item-text-body"> | 199 | <div class="main__employer-page-two-item-text-body"> |
183 | <p>{{ $item->region }}</p> | 200 | <p>{{ $item->region }}</p> |
184 | </div> | 201 | </div> |
185 | </div> | 202 | </div> |
186 | <div class="main__employer-page-two-item-text"> | 203 | <div class="main__employer-page-two-item-text"> |
187 | <div class="main__employer-page-two-item-text-name">Посадка</div> | 204 | <div class="main__employer-page-two-item-text-name">Посадка</div> |
188 | <div class="main__employer-page-two-item-text-body"> | 205 | <div class="main__employer-page-two-item-text-body"> |
189 | <p> {{ $item->start }}</p> | 206 | <p> {{ $item->start }}</p> |
190 | {!! $item->description !!} | 207 | {!! $item->description !!} |
191 | </div> | 208 | </div> |
192 | </div> | 209 | </div> |
193 | <div class="main__employer-page-two-item-text"> | 210 | <div class="main__employer-page-two-item-text"> |
194 | <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: | 211 | <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: |
195 | </div> | 212 | </div> |
196 | <div class="main__employer-page-two-item-text-body"> | 213 | <div class="main__employer-page-two-item-text-body"> |
197 | <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a> | 214 | <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a> |
198 | </div> | 215 | </div> |
199 | </div> | 216 | </div> |
200 | <div class="main__employer-page-two-item-text"> | 217 | <div class="main__employer-page-two-item-text"> |
201 | <div class="main__employer-page-two-item-text-name">Анкеты присылать на | 218 | <div class="main__employer-page-two-item-text-name">Анкеты присылать на |
202 | почту: | 219 | почту: |
203 | </div> | 220 | </div> |
204 | <div class="main__employer-page-two-item-text-body"> | 221 | <div class="main__employer-page-two-item-text-body"> |
205 | <a href="mailto: {{ $job->email }}">{{ $job->email }}</a> | 222 | <a href="mailto: {{ $job->email }}">{{ $job->email }}</a> |
206 | </div> | 223 | </div> |
207 | </div> | 224 | </div> |
208 | <div class="main__employer-page-two-item-tags"> | 225 | <div class="main__employer-page-two-item-tags"> |
209 | <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> | 226 | <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> |
210 | </div> | 227 | </div> |
211 | <div class="main__employer-page-two-item-buttons"> | 228 | <div class="main__employer-page-two-item-buttons"> |
212 | <button type="button" | 229 | <button type="button" |
213 | class="button main__employer-page-two-item-button">Оставить | 230 | class="button main__employer-page-two-item-button">Оставить |
214 | отклик</button> | 231 | отклик</button> |
215 | <a href="#" | 232 | <a href="#" |
216 | class="button button_light main__employer-page-two-item-button">Подробнее</a> | 233 | class="button button_light main__employer-page-two-item-button">Подробнее</a> |
217 | </div> | 234 | </div> |
218 | <div class="main__employer-page-two-item-bottom"> | 235 | <div class="main__employer-page-two-item-bottom"> |
219 | <div class="main__employer-page-two-item-bottom-date">{{ $job->updated_at }}</div> | 236 | <div class="main__employer-page-two-item-bottom-date">{{ $job->updated_at }}</div> |
220 | <button type="button" | 237 | <button type="button" |
221 | class="like main__employer-page-two-item-bottom-like js-toggle"> | 238 | class="like main__employer-page-two-item-bottom-like js-toggle"> |
222 | <svg> | 239 | <svg> |
223 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 240 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
224 | </svg> | 241 | </svg> |
225 | </button> | 242 | </button> |
226 | </div> | 243 | </div> |
227 | </div> | 244 | </div> |
228 | @endforeach | 245 | @endforeach |
229 | @endforeach | 246 | @endforeach |
230 | <button type="button" | 247 | <button type="button" |
231 | class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> | 248 | class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> |
232 | <span>Показать ещё</span> | 249 | <span>Показать ещё</span> |
233 | <span>Скрыть</span> | 250 | <span>Скрыть</span> |
234 | </button> | 251 | </button> |
235 | </div> | 252 | </div> |
236 | </div> | 253 | </div> |
237 | </div> | 254 | </div> |
238 | </div> | 255 | </div> |
239 | </div> | 256 | </div> |
240 | </div> | 257 | </div> |
241 | </main> | 258 | </main> |
242 | @endsection | 259 | @endsection |
243 | 260 |
resources/views/js/modals.blade.php
File was created | 1 | <script> | |
2 | console.log('Test system'); | ||
3 | $(document).on('click', '#button_send', function() { | ||
4 | var field_login = $('#email'); | ||
5 | var field_pwd = $('#password'); | ||
6 | var login_val = field_login.val(); | ||
7 | var pwd_val = field_pwd.val(); | ||
8 | |||
9 | console.log('login: '+login_val+' password: '+pwd_val); | ||
10 | |||
11 | $.ajax({ | ||
12 | type: "GET", | ||
13 | url: "{{ route('login') }}", | ||
14 | data: "email="+login_val+"&password="+pwd_val, | ||
15 | success: function (data) { | ||
16 | console.log('Вход в систему'); | ||
17 | let d = JSON.parse(data); | ||
18 | if(typeof d['REDIRECT'] !== "undefined") { | ||
19 | location.href = d['REDIRECT']; | ||
20 | console.log(d['REDIRECT']); | ||
21 | } | ||
22 | if (typeof d['ERROR'] !== "undefined") { | ||
23 | console.log(d['ERROR']); | ||
24 | $('#message_error').html(d['ERROR']); | ||
25 | } | ||
26 | console.log(d['REDIRECT']); | ||
27 | //$('#block_1').html(data); | ||
28 | }, | ||
29 | headers: { | ||
30 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
31 | }, | ||
32 | error: function (data) { | ||
33 | data = JSON.stringify(data); | ||
34 | console.log('Error: ' + data); | ||
35 | } | ||
36 | }); | ||
37 | }); | ||
38 | |||
39 | $(document).on('click', '#button_reg_worker', function() { | ||
40 | var field_login = $('#email_worker'); | ||
41 | var field_pwd = $('#password_worker'); | ||
42 | var field_confirm_pwd = $('#password_confirmation_worker'); | ||
43 | var field_politik_worker = $('#politik_worker'); | ||
44 | var field_telephone_worker = $('#telephone_worker'); | ||
45 | var field_job_titles_worker = $('#job_titles_worker'); | ||
46 | var field_surname_worker = $('#surname_worker'); | ||
47 | var field_name_man = $('#name_man_worker'); | ||
48 | var field_surname2_worker = $('#surname2_worker'); | ||
49 | |||
50 | var login = field_login.val(); | ||
51 | var pwd = field_pwd.val(); | ||
52 | var confirm_pwd = field_confirm_pwd.val(); | ||
53 | var politik = field_politik_worker.val(); | ||
54 | var telephone = field_telephone_worker.val(); | ||
55 | var job_titles = field_job_titles_worker.val(); | ||
56 | var surname = field_surname_worker.val(); | ||
57 | var name_man = field_name_man.val(); | ||
58 | var surname2 = field_surname2_worker.val(); | ||
59 | |||
60 | |||
61 | console.log('login: '+login+' password: '+pwd); | ||
62 | |||
63 | $.ajax({ | ||
64 | type: "GET", | ||
65 | url: "{{ route('register_worker') }}", | ||
66 | data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+ | ||
67 | "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+ | ||
68 | "&surname2="+surname2+"&subscribe_email="+login, | ||
69 | success: function (data) { | ||
70 | console.log('Вход в систему'); | ||
71 | let d = JSON.parse(data); | ||
72 | if(typeof d['REDIRECT'] !== "undefined") { | ||
73 | console.log(d['REDIRECT']); | ||
74 | location.href = d['REDIRECT']; | ||
75 | } | ||
76 | if (typeof d['ERROR'] !== "undefined") { | ||
77 | console.log(d['ERROR']); | ||
78 | $('#block-info').css({'display': 'block'}); | ||
79 | $('#messages_error_reg').html(d['ERROR']); | ||
80 | } | ||
81 | console.log(d['REDIRECT']); | ||
82 | |||
83 | }, | ||
84 | headers: { | ||
85 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
86 | }, | ||
87 | error: function (data) { | ||
88 | data = JSON.stringify(data); | ||
89 | console.log('Error: ' + data); | ||
90 | } | ||
91 | }); | ||
92 | |||
93 | return false; | ||
94 | }); | ||
95 | |||
96 | $(document).on('click', '#button_reg_employer', function() { | ||
97 | var field_login = $('#email_employer'); | ||
98 | var field_pwd = $('#password_employer'); | ||
99 | var field_confirm_pwd = $('#password_confirmation_employer'); | ||
100 | var field_politik_employer = $('#politik_employer'); | ||
101 | var field_telephone_employer = $('#telephone_employer'); | ||
102 | var field_company_employer = $('#company_employer'); | ||
103 | var field_surname_employer = $('#surname_employer'); | ||
104 | var field_name_man_employer = $('#name_man_employer'); | ||
105 | var field_surname2_employer = $('#surname2_employer'); | ||
106 | |||
107 | var login = field_login.val(); | ||
108 | var pwd = field_pwd.val(); | ||
109 | var confirm_pwd = field_confirm_pwd.val(); | ||
110 | var politik = field_politik_employer.val(); | ||
111 | var telephone = field_telephone_employer.val(); | ||
112 | var company_employer = field_company_employer.val(); | ||
113 | var surname = field_surname_employer.val(); | ||
114 | var name_man = field_name_man_employer.val(); | ||
115 | var surname2 = field_surname2_employer.val(); | ||
116 | |||
117 | |||
118 | console.log('login: '+login+' password: '+pwd); | ||
119 | |||
120 | |||
121 | $.ajax({ | ||
122 | type: "GET", | ||
123 | url: "{{ route('register_employer') }}", | ||
124 | data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+ | ||
125 | "&telephone="+telephone+"&name_company="+company_employer+"&surname="+surname+"&name_man="+name_man+ | ||
126 | "&surname2="+surname2+"&subscribe_email="+login, | ||
127 | success: function (data) { | ||
128 | console.log('Вход в систему'); | ||
129 | let d = JSON.parse(data); | ||
130 | if(typeof d['REDIRECT'] !== "undefined") { | ||
131 | console.log(d['REDIRECT']); | ||
132 | location.href = d['REDIRECT']; | ||
133 | } | ||
134 | if (typeof d['ERROR'] !== "undefined") { | ||
135 | console.log(d['ERROR']); | ||
136 | $('#block-info').css({'display': 'block'}); | ||
137 | $('#messages_error_reg').html(d['ERROR']); | ||
138 | } | ||
139 | console.log(d['REDIRECT']); | ||
140 | |||
141 | }, | ||
142 | headers: { | ||
143 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
144 | }, | ||
145 | error: function (data) { | ||
146 | data = JSON.stringify(data); | ||
147 | console.log('Error: ' + data); | ||
148 | } | ||
149 | }); | ||
150 | |||
151 | return false; | ||
152 | }); | ||
153 | |||
154 | </script> | ||
155 |
resources/views/layout/frontend.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | 2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>{{ $title }}</title> | 6 | <title>{{ $title }}</title> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
8 | <meta name="theme-color" content="#377D87"> | 8 | <meta name="theme-color" content="#377D87"> |
9 | <script src="{{ asset('js/jquery.js') }}"></script> | 9 | <script src="{{ asset('js/jquery.js') }}"></script> |
10 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> | 10 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> |
11 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> | 11 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> |
12 | <style> | ||
13 | .err_red { | ||
14 | border: red 2px solid; | ||
15 | } | ||
16 | </style> | ||
12 | </head> | 17 | </head> |
13 | 18 | ||
14 | <body id="body"> | 19 | <body id="body"> |
15 | <a href="#body" class="to-top js-scroll-to"> | 20 | <a href="#body" class="to-top js-scroll-to"> |
16 | <svg> | 21 | <svg> |
17 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 22 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
18 | </svg> | 23 | </svg> |
19 | </a> | 24 | </a> |
20 | 25 | ||
21 | <div> <!-- BEGIN TOP WRAPPER --> | 26 | <div> <!-- BEGIN TOP WRAPPER --> |
22 | <header class="header"> | 27 | <header class="header"> |
23 | <div class="container"> | 28 | <div class="container"> |
24 | <div class="header__body"> | 29 | <div class="header__body"> |
25 | <div class="header__left"> | 30 | <div class="header__left"> |
26 | <a href="{{ route('index') }}" class="header__logo"> | 31 | <a href="{{ route('index') }}" class="header__logo"> |
27 | <svg> | 32 | <svg> |
28 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 33 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
29 | </svg> | 34 | </svg> |
30 | </a> | 35 | </a> |
31 | <nav class="header__menu"> | 36 | <nav class="header__menu"> |
32 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> | 37 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> |
33 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> | 38 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> |
34 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> | 39 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> |
35 | </nav> | 40 | </nav> |
36 | </div> | 41 | </div> |
37 | <div class="header__right"> | 42 | <div class="header__right"> |
38 | @guest | 43 | @guest |
39 | 44 | ||
40 | @else | 45 | @else |
41 | <button class="header__notifs header__notifs_actived"> | 46 | <button class="header__notifs header__notifs_actived"> |
42 | <svg> | 47 | <svg> |
43 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> | 48 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> |
44 | </svg> | 49 | </svg> |
45 | <span>Уведомления</span> | 50 | <span>Уведомления</span> |
46 | </button> | 51 | </button> |
47 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs"> | 52 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs"> |
48 | Кабинет | 53 | Кабинет |
49 | </a> | 54 | </a> |
50 | @endguest | 55 | @endguest |
51 | <div class="header__right-line"></div> | 56 | <div class="header__right-line"></div> |
52 | <button class="header__burger"> | 57 | <button class="header__burger"> |
53 | <svg> | 58 | <svg> |
54 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> | 59 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> |
55 | </svg> | 60 | </svg> |
56 | </button> | 61 | </button> |
57 | @guest | 62 | @guest |
58 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> | 63 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> |
59 | @else | 64 | @else |
60 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> | 65 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> |
61 | @endguest | 66 | @endguest |
62 | </div> | 67 | </div> |
63 | </div> | 68 | </div> |
64 | </div> | 69 | </div> |
65 | </header> | 70 | </header> |
66 | @yield('content') | 71 | @yield('content') |
67 | </div> <!-- END TOP WRAPPER --> | 72 | </div> <!-- END TOP WRAPPER --> |
68 | 73 | ||
69 | <div> <!-- BEGIN BOTTOM WRAPPER --> | 74 | <div> <!-- BEGIN BOTTOM WRAPPER --> |
70 | <footer class="footer"> | 75 | <footer class="footer"> |
71 | <div class="container"> | 76 | <div class="container"> |
72 | <div class="footer__mobile"> | 77 | <div class="footer__mobile"> |
73 | 78 | ||
74 | <button class="footer__mobile-toper js-toggle active"> | 79 | <button class="footer__mobile-toper js-toggle active"> |
75 | <a href="{{ route('index') }}"> | 80 | <a href="{{ route('index') }}"> |
76 | <svg> | 81 | <svg> |
77 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 82 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
78 | </svg> | 83 | </svg> |
79 | </a> | 84 | </a> |
80 | <span> | 85 | <span> |
81 | <svg> | 86 | <svg> |
82 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 87 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
83 | </svg> | 88 | </svg> |
84 | </span> | 89 | </span> |
85 | </button> | 90 | </button> |
86 | <div class="footer__mobile-menu"> | 91 | <div class="footer__mobile-menu"> |
87 | <div class="footer__mobile-menu-item"> | 92 | <div class="footer__mobile-menu-item"> |
88 | <button class="js-toggle"> | 93 | <button class="js-toggle"> |
89 | <b>Соискателям</b> | 94 | <b>Соискателям</b> |
90 | <span><svg> | 95 | <span><svg> |
91 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 96 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
92 | </svg></span> | 97 | </svg></span> |
93 | </button> | 98 | </button> |
94 | <div> | 99 | <div> |
95 | <a href="{{ route('vacancies') }}">Вакансии</a> | 100 | <a href="{{ route('vacancies') }}">Вакансии</a> |
96 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 101 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
97 | <a href="{{ route('education') }}">Образование</a> | 102 | <a href="{{ route('education') }}">Образование</a> |
98 | <a href="{{ route('news') }}">Новости</a> | 103 | <a href="{{ route('news') }}">Новости</a> |
99 | <a href="{{ route('contacts') }}">Контакты</a> | 104 | <a href="{{ route('contacts') }}">Контакты</a> |
100 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 105 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
101 | </div> | 106 | </div> |
102 | </div> | 107 | </div> |
103 | <div class="footer__mobile-menu-item"> | 108 | <div class="footer__mobile-menu-item"> |
104 | <button class="js-toggle"> | 109 | <button class="js-toggle"> |
105 | <b>Работодателям</b> | 110 | <b>Работодателям</b> |
106 | <span><svg> | 111 | <span><svg> |
107 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> | 112 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> |
108 | </svg></span> | 113 | </svg></span> |
109 | </button> | 114 | </button> |
110 | <div> | 115 | <div> |
111 | <a href="{{ route('register') }}">Регистрация</a> | 116 | <a href="{{ route('register') }}">Регистрация</a> |
112 | <a href="{{ route('bd_resume') }}">База резюме</a> | 117 | <a href="{{ route('bd_resume') }}">База резюме</a> |
113 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 118 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
114 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 119 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
115 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 120 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
116 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 121 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
117 | </div> | 122 | </div> |
118 | </div> | 123 | </div> |
119 | </div> | 124 | </div> |
120 | <div class="footer__mobile-contacts"> | 125 | <div class="footer__mobile-contacts"> |
121 | <b>Контакты</b> | 126 | <b>Контакты</b> |
122 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 127 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
123 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 128 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
124 | </div> | 129 | </div> |
125 | <div class="footer__mobile-bottom"> | 130 | <div class="footer__mobile-bottom"> |
126 | <div class="socials"> | 131 | <div class="socials"> |
127 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 132 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
128 | <svg> | 133 | <svg> |
129 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 134 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
130 | </svg> | 135 | </svg> |
131 | </a> | 136 | </a> |
132 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 137 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
133 | <svg> | 138 | <svg> |
134 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 139 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
135 | </svg> | 140 | </svg> |
136 | </a> | 141 | </a> |
137 | </div> | 142 | </div> |
138 | <nav class="footer__mobile-links"> | 143 | <nav class="footer__mobile-links"> |
139 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 144 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
140 | <span></span> | 145 | <span></span> |
141 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 146 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
142 | </nav> | 147 | </nav> |
143 | © 2023 — RekaMore.su | 148 | © 2023 — RekaMore.su |
144 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 149 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
145 | <svg> | 150 | <svg> |
146 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 151 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
147 | </svg> | 152 | </svg> |
148 | <span> | 153 | <span> |
149 | Дизайн и разработка: | 154 | Дизайн и разработка: |
150 | <b>NoLogoStudio.ru</b> | 155 | <b>NoLogoStudio.ru</b> |
151 | </span> | 156 | </span> |
152 | </a> | 157 | </a> |
153 | </div> | 158 | </div> |
154 | </div> | 159 | </div> |
155 | <div class="footer__main"> | 160 | <div class="footer__main"> |
156 | <div class="footer__main-body"> | 161 | <div class="footer__main-body"> |
157 | 162 | ||
158 | <a href="" class="footer__main-logo"> | 163 | <a href="" class="footer__main-logo"> |
159 | <svg> | 164 | <svg> |
160 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 165 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
161 | </svg> | 166 | </svg> |
162 | </a> | 167 | </a> |
163 | <div class="footer__main-col"> | 168 | <div class="footer__main-col"> |
164 | <div class="footer__main-title">Соискателям</div> | 169 | <div class="footer__main-title">Соискателям</div> |
165 | <nav> | 170 | <nav> |
166 | <a href="{{ route('vacancies') }}">Вакансии</a> | 171 | <a href="{{ route('vacancies') }}">Вакансии</a> |
167 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 172 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
168 | <a href="{{ route('education') }}">Образование</a> | 173 | <a href="{{ route('education') }}">Образование</a> |
169 | <a href="{{ route('news') }}">Новости</a> | 174 | <a href="{{ route('news') }}">Новости</a> |
170 | <a href="{{ route('contacts') }}">Контакты</a> | 175 | <a href="{{ route('contacts') }}">Контакты</a> |
171 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 176 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
172 | </nav> | 177 | </nav> |
173 | </div> | 178 | </div> |
174 | <div class="footer__main-col"> | 179 | <div class="footer__main-col"> |
175 | <div class="footer__main-title">Работодателям</div> | 180 | <div class="footer__main-title">Работодателям</div> |
176 | <nav> | 181 | <nav> |
177 | <a href="{{ route('register') }}">Регистрация</a> | 182 | <a href="{{ route('register') }}">Регистрация</a> |
178 | <a href="{{ route('bd_resume') }}">База резюме</a> | 183 | <a href="{{ route('bd_resume') }}">База резюме</a> |
179 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 184 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
180 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 185 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
181 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 186 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
182 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 187 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
183 | </nav> | 188 | </nav> |
184 | </div> | 189 | </div> |
185 | 190 | ||
186 | <div class="footer__main-col"> | 191 | <div class="footer__main-col"> |
187 | <div class="footer__main-title">Контакты</div> | 192 | <div class="footer__main-title">Контакты</div> |
188 | <div class="footer__main-contacts"> | 193 | <div class="footer__main-contacts"> |
189 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 194 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
190 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 195 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
191 | </div> | 196 | </div> |
192 | <div class="socials"> | 197 | <div class="socials"> |
193 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 198 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
194 | <svg> | 199 | <svg> |
195 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 200 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
196 | </svg> | 201 | </svg> |
197 | </a> | 202 | </a> |
198 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 203 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
199 | <svg> | 204 | <svg> |
200 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 205 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
201 | </svg> | 206 | </svg> |
202 | </a> | 207 | </a> |
203 | </div> | 208 | </div> |
204 | </div> | 209 | </div> |
205 | </div> | 210 | </div> |
206 | <pre>{{ print_r($_COOKIE) }}</pre> | 211 | <pre>{{ print_r($_COOKIE) }}</pre> |
207 | <div class="footer__main-copy"> | 212 | <div class="footer__main-copy"> |
208 | <div>© 2023 — RekaMore.su</div> | 213 | <div>© 2023 — RekaMore.su</div> |
209 | <nav> | 214 | <nav> |
210 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 215 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
211 | <span></span> | 216 | <span></span> |
212 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 217 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
213 | </nav> | 218 | </nav> |
214 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 219 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
215 | <svg> | 220 | <svg> |
216 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 221 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
217 | </svg> | 222 | </svg> |
218 | <span> | 223 | <span> |
219 | Дизайн и разработка: | 224 | Дизайн и разработка: |
220 | <b>NoLogoStudio.ru</b> | 225 | <b>NoLogoStudio.ru</b> |
221 | </span> | 226 | </span> |
222 | </a> | 227 | </a> |
223 | </div> | 228 | </div> |
224 | </div> | 229 | </div> |
225 | </div> | 230 | </div> |
226 | </footer> | 231 | </footer> |
227 | </div> <!-- END BOTTOM WRAPPER --> | 232 | </div> <!-- END BOTTOM WRAPPER --> |
228 | 233 | ||
229 | <div hidden> <!-- BEGIN MODALS WRAPPER --> | 234 | <div hidden> <!-- BEGIN MODALS WRAPPER --> |
230 | <!-- Отправить сообщение соискателю --> | 235 | <!-- Соискатель отправляет сообщение работодателю --> |
231 | @include('modals.send_worker') | 236 | @include('modals.send_worker') |
232 | 237 | ||
238 | <!-- Работодатель отправляет сообщение соискателю --> | ||
239 | @include('modals.send_employer') | ||
240 | |||
233 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> | 241 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> |
234 | @include('modals.send_message_noaut') | 242 | @include('modals.send_message_noaut') |
235 | 243 | ||
236 | <!-- Форма авторизации --> | 244 | <!-- Форма авторизации --> |
237 | @include('modals.send_login') | 245 | @include('modals.send_login') |
238 | 246 | ||
239 | <!-- Сбросить пароль --> | 247 | <!-- Сбросить пароль --> |
240 | @include('modals.reset_password') | 248 | @include('modals.reset_password') |
241 | 249 | ||
242 | <!-- Регистрация --> | 250 | <!-- Регистрация --> |
243 | @include('modals.register') | 251 | @include('modals.register') |
244 | 252 | ||
245 | <!-- Благодарность по отправке сообщения работодателю --> | 253 | <!-- Благодарность по отправке сообщения работодателю --> |
246 | @include('modals.thank_you_send_employer') | 254 | @include('modals.thank_you_send_employer') |
247 | 255 | ||
248 | <!-- Благодарность по отправке сообщения менеджеру --> | 256 | <!-- Благодарность по отправке сообщения менеджеру --> |
249 | @include('modals.thank_you_send_manager') | 257 | @include('modals.thank_you_send_manager') |
250 | 258 | ||
259 | <!-- Благодарность после регистрации --> | ||
260 | @include('modals.thank_you_send_for_employer') | ||
251 | 261 | ||
252 | <div id="thanks-3" class="modal modal_bg"> | 262 | <!-- Благодарность после регистрации для работника --> |
253 | <div class="modal__body"> | 263 | @include('modals.thank_you_send_for_worker') |
254 | <div class="modal__title">Спасибо!</div> | 264 | |
255 | <div class="modal__text">Вы успешно зарегистрировались</div> | 265 | <!-- Подтверждение удаления профиля --> |
256 | <div class="modal__text left"><span>Ваш аккаунт требует подтверждение администратора сайта. Администратор сайта должен изменить статус работодателя, чтобы вы смогли авторизоваться в системе.</span></div> | 266 | @include('modals.delete_profile') |
257 | <div class="modal__text left"><span>После подтверждения администратором, вам прейдет сообщение на электронную почту, о подтверждении регистрации.</span></div> | 267 | |
258 | <a href="#" class="button button_light modal__button">Войти</a> | 268 | <!-- Подверждение об удалении профиля --> |
259 | </div> | 269 | @include('modals.success_delete_profile') |
260 | </div> | ||
261 | 270 | ||
262 | <div id="thanks-4" class="modal modal_bg"> | ||
263 | <div class="modal__body"> | ||
264 | <div class="modal__title">Спасибо!</div> | ||
265 | <div class="modal__text">Ваше сообщение успешно отправлено администратору сайта на подтверждение.</div> | ||
266 | <a href="#" class="button button_light modal__button">На главную</a> | ||
267 | </div> | ||
268 | </div> | ||
269 | <div id="delete" class="modal modal_bg"> | ||
270 | <div class="modal__body"> | ||
271 | <div class="modal__title">Удалить профиль?</div> | ||
272 | <div class="modal__text">Вы действительно хотите удалить свой профиль?</div> | ||
273 | <div class="modal__buttons"> | ||
274 | <button href="button" class="button">Да</button> | ||
275 | <button href="button" class="button button_light">Нет</button> | ||
276 | </div> | ||
277 | </div> | ||
278 | </div> | ||
279 | <div id="is-deleted" class="modal modal_bg"> | ||
280 | <div class="modal__body"> | ||
281 | <div class="modal__title">Профиль удален</div> | ||
282 | <div class="modal__text">Вы успешно удалили свой профиль.</div> | ||
283 | <a href="#" class="button button_light modal__button">На главную</a> | ||
284 | </div> | ||
285 | </div> | ||
286 | </div> <!-- END MODALS WRAPPER --> | 271 | </div> <!-- END MODALS WRAPPER --> |
287 | 272 | ||
288 | 273 | ||
289 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> | 274 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> |
290 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> | 275 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> |
291 | <script src="{{ asset('js/jquery.select2.js') }}"></script> | 276 | <script src="{{ asset('js/jquery.select2.js') }}"></script> |
292 | <script src="{{ asset('js/swiper.js') }}"></script> | 277 | <script src="{{ asset('js/swiper.js') }}"></script> |
293 | <script src="{{ asset('js/script.js') }}"></script> | 278 | <script src="{{ asset('js/script.js') }}"></script> |
294 | <script> | 279 | <script> |
295 | var getUrlParameter = function getUrlParameter(sParam) { | 280 | var getUrlParameter = function getUrlParameter(sParam) { |
296 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), | 281 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), |
297 | sURLVariables = sPageURL.split('&'), | 282 | sURLVariables = sPageURL.split('&'), |
298 | sParameterName, | 283 | sParameterName, |
299 | i; | 284 | i; |
300 | for (i = 0; i < sURLVariables.length; i++) { | 285 | for (i = 0; i < sURLVariables.length; i++) { |
301 | sParameterName = sURLVariables[i].split('='); | 286 | sParameterName = sURLVariables[i].split('='); |
resources/views/list_vacancies.blade.php
1 | @php | ||
2 | use App\Classes\StatusUser; | ||
3 | @endphp | ||
4 | |||
1 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) | 5 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) |
2 | 6 | ||
3 | @section('scripts') | 7 | @section('scripts') |
4 | <script> | 8 | <script> |
5 | console.log('Test system'); | 9 | console.log('Test system'); |
6 | $(document).on('change', '#jobs', function() { | 10 | $(document).on('change', '#jobs', function() { |
7 | var val = $(this).val(); | 11 | var val = $(this).val(); |
8 | var main_oskar = $('#main_ockar'); | 12 | var main_oskar = $('#main_ockar'); |
9 | 13 | ||
10 | console.log('Code='+val); | 14 | console.log('Code='+val); |
11 | console.log('Click change...'); | 15 | console.log('Click change...'); |
12 | $.ajax({ | 16 | $.ajax({ |
13 | type: "GET", | 17 | type: "GET", |
14 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | 18 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
15 | data: "job="+val, | 19 | data: "job="+val, |
16 | success: function (data) { | 20 | success: function (data) { |
17 | console.log('Выбор сделан!'); | 21 | console.log('Выбор сделан!'); |
18 | console.log(data); | 22 | console.log(data); |
19 | main_oskar.html(data); | 23 | main_oskar.html(data); |
24 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | ||
20 | }, | 25 | }, |
21 | headers: { | 26 | headers: { |
22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 27 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
23 | }, | 28 | }, |
24 | error: function (data) { | 29 | error: function (data) { |
25 | data = JSON.stringify(data); | 30 | data = JSON.stringify(data); |
26 | console.log('Error: ' + data); | 31 | console.log('Error: ' + data); |
27 | } | 32 | } |
28 | }); | 33 | }); |
29 | }); | 34 | }); |
35 | |||
36 | $(document).on('click', '.js_send_it_button', function() { | ||
37 | var this_ = $(this); | ||
38 | var code_user_id = this_.attr('data-uid'); | ||
39 | var code_to_user_id = this_.attr('data-tuid'); | ||
40 | var code_vacancy = this_.attr('data-vacancy'); | ||
41 | var user_id = $('#send_user_id'); | ||
42 | var to_user_id = $('#send_to_user_id'); | ||
43 | var vacancy = $('#send_vacancy'); | ||
44 | |||
45 | console.log('Клик на кнопки...'); | ||
46 | |||
47 | user_id.val(code_user_id); | ||
48 | to_user_id.val(code_to_user_id); | ||
49 | vacancy.val(code_vacancy); | ||
50 | }); | ||
51 | |||
52 | $(document).on('change', '#sort_ajax', function() { | ||
53 | var this_ = $(this); | ||
54 | var val_ = this_.val(); | ||
55 | console.log('sort items '+val_); | ||
56 | |||
57 | $.ajax({ | ||
58 | type: "GET", | ||
59 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | ||
60 | data: "sort="+val_+"&block=1", | ||
61 | success: function (data) { | ||
62 | console.log('Выбор сортировки'); | ||
63 | console.log(data); | ||
64 | $('#main_ockar').html(data); | ||
65 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | ||
66 | }, | ||
67 | headers: { | ||
68 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
69 | }, | ||
70 | error: function (data) { | ||
71 | data = JSON.stringify(data); | ||
72 | console.log('Error: ' + data); | ||
73 | } | ||
74 | }); | ||
75 | }); | ||
76 | |||
77 | |||
78 | |||
79 | $(document).ready(function(){ | ||
80 | var sel = $('#select2-sort_ajax-container'); | ||
81 | var key = getUrlParameter('sort'); | ||
82 | console.log(sel); | ||
83 | console.log(key); | ||
84 | |||
85 | if (key !=='') { | ||
86 | console.log(key); | ||
87 | switch (key) { | ||
88 | case "default": sel.html('Сортировка (по умолчанию)'); break; | ||
89 | case "name_up": sel.html('По имени (возрастание)'); break; | ||
90 | case "name_down": sel.html('По дате (убывание)'); break; | ||
91 | case "created_at_up": sel.html('По дате (возрастание)'); break; | ||
92 | case "created_at_down": sel.html('По дате (убывание)'); break; | ||
93 | } | ||
94 | |||
95 | } | ||
96 | }); | ||
30 | </script> | 97 | </script> |
31 | @include('js.favorite-vacancy') | 98 | @include('js.favorite-vacancy') |
32 | @endsection | 99 | @endsection |
33 | @section('content') | 100 | @section('content') |
34 | <section class="thing"> | 101 | <section class="thing"> |
35 | <div class="container"> | 102 | <div class="container"> |
36 | <form class="thing__body"> | 103 | <form class="thing__body" action="{{ route('list-vacancies', ['categories' => $Name_categori[0]->id]) }}" method="POST"> |
37 | <ul class="breadcrumbs thing__breadcrumbs"> | 104 | <ul class="breadcrumbs thing__breadcrumbs"> |
38 | <li><a href="{{ route('index') }}">Главная</a></li> | 105 | <li><a href="{{ route('index') }}">Главная</a></li> |
39 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> | 106 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> |
40 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> | 107 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> |
41 | </ul> | 108 | </ul> |
42 | <h1 class="thing__title">Вакансии</h1> | 109 | <h1 class="thing__title">Вакансии</h1> |
43 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | 110 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для |
44 | существующих финансовых и административных условий.</p> | 111 | существующих финансовых и административных условий.</p> |
45 | <div class="select select_search thing__select"> | 112 | <div class="select select_search thing__select"> |
46 | <div class="select__icon"> | 113 | <div class="select__icon"> |
47 | <svg> | 114 | <svg> |
48 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 115 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
49 | </svg> | 116 | </svg> |
50 | </div> | 117 | </div> |
51 | <select class="js-select2" id="jobs" name="jobs"> | 118 | <select class="js-select2" id="jobs" name="jobs"> |
52 | <option value="0" disabled selected>Выберите должность</option> | 119 | <option value="0" selected>Выберите должность</option> |
53 | @if ($Job_title->count()) | 120 | @if ($Job_title->count()) |
54 | @foreach($Job_title as $JT) | 121 | @foreach($Job_title as $JT) |
55 | <option value="{{ $JT->id }}">{{ $JT->name }}</option> | 122 | <option value="{{ $JT->id }}">{{ $JT->name }}</option> |
56 | @endforeach | 123 | @endforeach |
57 | @endif | 124 | @endif |
58 | </select> | 125 | </select> |
59 | </div> | 126 | </div> |
60 | </form> | 127 | </form> |
61 | </div> | 128 | </div> |
62 | </section> | 129 | </section> |
63 | <main class="main"> | 130 | <main class="main"> |
64 | <div class="container"> | 131 | <div class="container"> |
65 | <div class="main__vacancies"> | 132 | <div class="main__vacancies"> |
66 | @if (isset($job)) | 133 | @if (isset($job)) |
67 | <h2 class="main__vacancies-title">Категория вакансий {{ $job }}</h2> | 134 | <h2 class="main__vacancies-title">Категория вакансий {{ $job }}</h2> |
68 | @else | 135 | @else |
69 | <h2 class="main__vacancies-title">Все категории</h2> | 136 | <h2 class="main__vacancies-title">Все категории</h2> |
70 | @endif | 137 | @endif |
71 | <div class="filters main__vacancies-filters"> | 138 | <div class="filters main__vacancies-filters"> |
72 | <div class="filters__label" id="col-vo" name="col-vo">Показано @if ($Query_count < 3) {{$Query_count}} @else 3 @endif из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> | 139 | <div class="filters__label" id="col-vo" name="col-vo">Показано @if ($Query_count < 3) {{$Query_count}} @else 3 @endif из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> |
73 | <div class="filters__body"> | 140 | <div class="filters__body"> |
74 | <div class="select filters__select"> | 141 | <div class="select filters__select"> |
75 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 142 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
76 | <option value="default">Сортировка (по умолчанию)</option> | 143 | <option value="default">Сортировка (по умолчанию)</option> |
77 | <option value="name (asc)">По имени (возрастание)</option> | 144 | <option value="name_up">По имени (возрастание)</option> |
78 | <option value="name (desc)">По имени (убывание)</option> | 145 | <option value="name_down">По имени (убывание)</option> |
79 | <option value="created_at (asc)">По дате (возрастание)</option> | 146 | <option value="created_at_up">По дате (возрастание)</option> |
80 | <option value="created_at (desc)">По дате (убывание)</option> | 147 | <option value="created_at_down">По дате (убывание)</option> |
81 | </select> | 148 | </select> |
82 | </div> | 149 | </div> |
83 | </div> | 150 | </div> |
84 | </div> | 151 | </div> |
152 | |||
85 | <div id="main_ockar" class="main__vacancies" name="main_ockar" style="width:100%;"> | 153 | <div id="main_ockar" class="main__vacancies" name="main_ockar" style="width:100%;"> |
86 | @foreach ($Query as $Q) | 154 | @foreach ($Query as $Q) |
87 | <div class="main__vacancies-item main__employer-page-two-item"> | 155 | <div class="main__vacancies-item main__employer-page-two-item"> |
88 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | 156 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> |
89 | <svg> | 157 | <svg> |
90 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 158 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
91 | </svg> | 159 | </svg> |
92 | <span> | 160 | <span> |
93 | Вернуться к списку вакансий | 161 | Вернуться к списку вакансий |
94 | </span> | 162 | </span> |
95 | </a> | 163 | </a> |
96 | <div class="main__employer-page-two-item-toper"> | 164 | <div class="main__employer-page-two-item-toper"> |
97 | @if (isset($Q->employer)) | 165 | @if (isset($Q->employer)) |
98 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | 166 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> |
99 | @endif | 167 | @endif |
100 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> | 168 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> |
101 | </div> | 169 | </div> |
102 | <div class="main__employer-page-two-item-text"> | 170 | <div class="main__employer-page-two-item-text"> |
103 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 171 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор |
104 | специалистов на следующие должности:</div> | 172 | специалистов на следующие должности:</div> |
105 | <div class="main__employer-page-two-item-text-links"> | 173 | <div class="main__employer-page-two-item-text-links"> |
106 | @if (isset($Q->jobs)) | 174 | @if (isset($Q->jobs)) |
107 | @foreach ($Q->jobs as $key => $j) | 175 | @foreach ($Q->jobs as $key => $j) |
108 | <a>“{{ $j->name }}” – з/п от @if (isset($Q->jobs_code[$key]->min_salary)) {{ $Q->jobs_code[$key]->min_salary }} @endif - @if (isset($Q->jobs_code[$key]->max_salary)) {{ $Q->jobs_code[$key]->max_salary }} @endif рублей (на руки)</a> | 176 | <a>“{{ $j->name }}” – з/п от @if (isset($Q->jobs_code[$key]->min_salary)) {{ $Q->jobs_code[$key]->min_salary }} @endif - @if (isset($Q->jobs_code[$key]->max_salary)) {{ $Q->jobs_code[$key]->max_salary }} @endif рублей (на руки)</a> |
109 | @endforeach | 177 | @endforeach |
110 | @endif | 178 | @endif |
111 | </div> | 179 | </div> |
112 | </div> | 180 | </div> |
113 | <div class="main__employer-page-two-item-text"> | 181 | <div class="main__employer-page-two-item-text"> |
114 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 182 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
115 | <div class="main__employer-page-two-item-text-body"> | 183 | <div class="main__employer-page-two-item-text-body"> |
116 | {!! $Q->text !!} | 184 | {!! $Q->text !!} |
117 | </div> | 185 | </div> |
118 | </div> | 186 | </div> |
119 | <div class="main__employer-page-two-item-text"> | 187 | <div class="main__employer-page-two-item-text"> |
120 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 188 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
121 | <div class="main__employer-page-two-item-text-body"> | 189 | <div class="main__employer-page-two-item-text-body"> |
122 | {!! $Q->description !!} | 190 | {!! $Q->description !!} |
123 | </div> | 191 | </div> |
124 | </div> | 192 | </div> |
125 | <div class="main__employer-page-two-item-text"> | 193 | <div class="main__employer-page-two-item-text"> |
126 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 194 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
127 | <div class="main__employer-page-two-item-text-body"> | 195 | <div class="main__employer-page-two-item-text-body"> |
128 | {!! $Q->contacts_emails !!} | 196 | {!! $Q->contacts_emails !!} |
129 | </div> | 197 | </div> |
130 | </div> | 198 | </div> |
131 | <div class="main__employer-page-two-item-text"> | 199 | <div class="main__employer-page-two-item-text"> |
132 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 200 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
133 | <div class="main__employer-page-two-item-text-body"> | 201 | <div class="main__employer-page-two-item-text-body"> |
134 | {!! $Q->contacts_telephones !!} | 202 | {!! $Q->contacts_telephones !!} |
135 | </div> | 203 | </div> |
136 | </div> | 204 | </div> |
137 | <div class="main__employer-page-two-item-tags"> | 205 | <div class="main__employer-page-two-item-tags"> |
138 | @if (isset($Q->jobs)) | 206 | @if (isset($Q->jobs)) |
139 | @foreach ($Q->jobs as $key => $j) | 207 | @foreach ($Q->jobs as $key => $j) |
140 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 208 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
141 | @endforeach | 209 | @endforeach |
142 | @endif | 210 | @endif |
143 | </div> | 211 | </div> |
144 | <div class="main__employer-page-two-item-buttons"> | 212 | <div class="main__employer-page-two-item-buttons"> |
145 | <button type="button" | 213 | @guest |
146 | class="button main__employer-page-two-item-button">Откликнуться</button> | 214 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' |
215 | class="button main__employer-page-two-item-button">Откликнуться</button> | ||
216 | @else | ||
217 | @if (App\Classes\StatusUser::Status()==1) | ||
218 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | ||
219 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | ||
220 | @else | ||
221 | <button type="button" data-fancybox data-src="#send2" data-vacancy="{{ $Q->id }}" data-uid="{{ $uid }}" data-tuid="{{ $Q->employer->user_id }}" data-options='{"touch":false,"autoFocus":false}' | ||
222 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> | ||
223 | @endif | ||
224 | @endguest | ||
147 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | 225 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> |
148 | </div> | 226 | </div> |
149 | <div class="main__employer-page-two-item-bottom"> | 227 | <div class="main__employer-page-two-item-bottom"> |
150 | <div class="main__employer-page-two-item-bottom-date">{{ $Q->created_at }}</div> | 228 | <div class="main__employer-page-two-item-bottom-date">{{ $Q->created_at }}</div> |
151 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vacancy_favorites <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> | 229 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle js_vacancy_favorites <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> |
152 | <svg> | 230 | <svg> |
153 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 231 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
154 | </svg> | 232 | </svg> |
155 | </button> | 233 | </button> |
156 | </div> | 234 | </div> |
157 | </div> | 235 | </div> |
158 | @endforeach | 236 | @endforeach |
159 | <div style="margin-top: 20px"> | 237 | <div style="margin-top: 20px"> |
160 | {{ $Query->appends($_GET)->links('paginate') }} | 238 | {{ $Query->appends($_GET)->links('paginate') }} |
161 | </div> | 239 | </div> |
162 | |||
163 | </div><!-- конец --> | 240 | </div><!-- конец --> |
164 | </div> | 241 | </div> |
165 | </div> | 242 | </div> |
166 | </main> | 243 | </main> |
167 | @endsection | 244 | @endsection |
resources/views/modals/delete_profile.blade.php
File was created | 1 | <div id="delete" class="modal modal_bg"> | |
2 | <div class="modal__body"> | ||
3 | <div class="modal__title">Удалить профиль?</div> | ||
4 | <div class="modal__text">Вы действительно хотите удалить свой профиль?</div> | ||
5 | <div class="modal__buttons"> | ||
6 | <button href="button" class="button">Да</button> | ||
7 | <button href="button" class="button button_light">Нет</button> | ||
8 | </div> | ||
9 | </div> | ||
10 | </div> | ||
11 |
resources/views/modals/send_employer.blade.php
1 | <div id="send" class="modal"> | 1 | <div id="send2" class="modal"> |
2 | <div class="modal__body"> | 2 | <div class="modal__body"> |
3 | <div class="modal__title">Отправить сообщение "Наяда"</div> | 3 | <div class="modal__title">Отправить сообщение соискателю</div> |
4 | <div class="modal__text">Если у вас возникли вопросы насчет вакансии, вы можете задать их работодателю</div> | 4 | <div class="modal__text">Если у вас есть предложение для соискателя, вы можете сделать предложение</div> |
5 | <form class="modal__form"> | 5 | <form class="modal__form"> |
6 | <div class="modal__form-item error"> | 6 | <div class="modal__form-item error"> |
7 | <input id="i1" type="text" class="input" placeholder="Тема" required> | 7 | <input id="i1" type="text" class="input" placeholder="Тема" required> |
8 | <label for="i1">Не заполнено поле</label> | 8 | <label for="i1">Не заполнено поле</label> |
9 | </div> | 9 | </div> |
10 | <div class="modal__form-item"> | 10 | <div class="modal__form-item"> |
11 | <textarea id="i2" class="textarea" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации. ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea> | 11 | <textarea id="i2" class="textarea" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации. ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea> |
12 | <label for="i2">Не заполнено поле</label> | 12 | <label for="i2">Не заполнено поле</label> |
13 | </div> | 13 | </div> |
14 | <div class="modal__form-item"> | 14 | <div class="modal__form-item"> |
15 | <div class="file"> | 15 | <div class="file"> |
16 | <label class="file__input"> | 16 | <label class="file__input"> |
17 | <input type="file"> | 17 | <input type="file"> |
18 | <span class="button button_light"> | 18 | <span class="button button_light"> |
19 | <svg> | 19 | <svg> |
20 | <use xlink:href="images/sprite.svg#share"></use> | 20 | <use xlink:href="images/sprite.svg#share"></use> |
21 | </svg> | 21 | </svg> |
22 | Прикрепить резюме | 22 | Прикрепить резюме |
23 | </span> | 23 | </span> |
24 | </label> | 24 | </label> |
25 | <div class="file__list"> | 25 | <div class="file__list"> |
26 | <div class="file__list-item"> | 26 | <div class="file__list-item"> |
27 | <div class="file__list-item-left"> | 27 | <div class="file__list-item-left"> |
28 | <svg> | 28 | <svg> |
29 | <use xlink:href="images/sprite.svg#clip"></use> | 29 | <use xlink:href="images/sprite.svg#clip"></use> |
30 | </svg> | 30 | </svg> |
31 | <span>image1.png</span> | 31 | <span>image1.png</span> |
32 | </div> | 32 | </div> |
33 | <button type="button" class="file__list-item-right js-parent-remove"> | 33 | <button type="button" class="file__list-item-right js-parent-remove"> |
34 | <svg> | 34 | <svg> |
35 | <use xlink:href="images/sprite.svg#cross-bold"></use> | 35 | <use xlink:href="images/sprite.svg#cross-bold"></use> |
36 | </svg> | 36 | </svg> |
37 | </button> | 37 | </button> |
38 | </div> | 38 | </div> |
39 | <div class="file__list-item"> | 39 | <div class="file__list-item"> |
40 | <div class="file__list-item-left"> | 40 | <div class="file__list-item-left"> |
41 | <svg> | 41 | <svg> |
42 | <use xlink:href="images/sprite.svg#clip"></use> | 42 | <use xlink:href="images/sprite.svg#clip"></use> |
43 | </svg> | 43 | </svg> |
44 | <span>Резюме капитана корабля</span> | 44 | <span>Резюме капитана корабля</span> |
45 | </div> | 45 | </div> |
46 | <button type="button" class="file__list-item-right js-parent-remove"> | 46 | <button type="button" class="file__list-item-right js-parent-remove"> |
47 | <svg> | 47 | <svg> |
48 | <use xlink:href="images/sprite.svg#cross-bold"></use> | 48 | <use xlink:href="images/sprite.svg#cross-bold"></use> |
49 | </svg> | 49 | </svg> |
50 | </button> | 50 | </button> |
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | </div> | 54 | </div> |
55 | <div class="modal__form-item"> | 55 | <div class="modal__form-item"> |
56 | <button type="submit" class="button">Отправить</button> | 56 | <button type="submit" class="button">Отправить</button> |
57 | </div> | 57 | </div> |
58 | </form> | 58 | </form> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | 61 |
resources/views/modals/send_message_noaut.blade.php
1 | <div id="question" class="modal modal_bg"> | 1 | <div id="question" class="modal modal_bg"> |
2 | <div class="modal__body"> | 2 | <div class="modal__body"> |
3 | <div class="modal__title">Отправить сообщение "Наяда"</div> | 3 | <div class="modal__title">Отправить сообщение "Наяда"</div> |
4 | <div class="modal__text">Вы должны быть авторизованы, чтобы отправить личное сообщение</div> | 4 | <div class="modal__text">Вы должны быть авторизованы, чтобы отправить личное сообщение</div> |
5 | <div class="modal__buttons"> | 5 | <div class="modal__buttons"> |
6 | <a href="#" class="button">Войти</a> | 6 | <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}' class="button">Войти</a> |
7 | <a href="#" class="button button_light">Зарегистрироваться</a> | 7 | <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}' class="button button_light">Зарегистрироваться</a> |
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
10 | </div> | 10 | </div> |
11 | 11 |
resources/views/modals/send_worker.blade.php
1 | <script> | ||
2 | console.log('Сообщение работнику'); | ||
3 | $("#form_worker" ).submit(function(event) { | ||
4 | var val = $(this).val(); | ||
5 | var send_title = $('#send_title'); | ||
6 | var send_title_val = send_title.val(); | ||
7 | |||
8 | console.log('Click form.'); | ||
9 | }); | ||
10 | |||
11 | $(document).on('change', '#btn_send_file', function() { | ||
12 | |||
13 | var send_name = $('#send_name'); | ||
14 | var send_name_val = send_name.val(); | ||
15 | var send_name_file = $('#send_name_file'); | ||
16 | |||
17 | console.log(send_name_val); | ||
18 | send_name_file.html(send_name_val); | ||
19 | |||
20 | }); | ||
21 | </script> | ||
1 | <div id="send" class="modal"> | 22 | <div id="send" class="modal"> |
2 | <div class="modal__body"> | 23 | <div class="modal__body"> |
3 | <div class="modal__title">Отправить сообщение соискателю</div> | 24 | <div class="modal__title">Отправить сообщение работодателю</div> |
4 | <div class="modal__text">Если у вас есть предложение для данного работника, напишите ему письмо</div> | 25 | <div class="modal__text">Если вы готовы владеете компитентыми навыками, напишите данному работодателю письмо</div> |
5 | <form class="modal__form" id="form_worker" name="form_worker"> | 26 | <form class="modal__form" id="form_worker" name="form_worker" enctype="multipart/form-data" action="{{ route('worker.new_message') }}" method="POST"> |
6 | <div class="modal__form-item error"> | 27 | @csrf |
7 | <input id="title" name="title" type="text" class="input" placeholder="Тема" required> | 28 | <div class="modal__form-item"> |
29 | Отправитель сообщения: | ||
30 | <input type="text" id="send_user_id" name="send_user_id" class="input" placeholder="user_id" value=""> | ||
31 | Получатель сообщения: | ||
32 | <input type="text" id="send_to_user_id" name="send_to_user_id" class="input" placeholder="to_user_id" value=""> | ||
33 | Вакансия: | ||
34 | <input type="text" id="send_vacancy" name="send_vacancy" class="input" placeholder="vacancy" value=""> | ||
35 | </div> | ||
36 | <div class="modal__form-item send_title_div error_"> | ||
37 | <input id="send_title" name="send_title" type="text" class="input" placeholder="Тема" required> | ||
8 | <label for="title">Не заполнено поле</label> | 38 | <label for="title">Не заполнено поле</label> |
9 | </div> | 39 | </div> |
10 | <div class="modal__form-item"> | 40 | <div class="modal__form-item send_title_div error_"> |
11 | <textarea id="i2" class="textarea" id="text" name="text" placeholder="Напишите текст с предложением о работе" required></textarea> | 41 | <select class="js-select2" name="send_job_title_id" id="send_job_title_id"> |
42 | @if ($jobs->count()) | ||
43 | @foreach($jobs as $j) | ||
44 | <option value="{{ $j->id }}">{{ $j->name }} ({{ $j->id }})</option> | ||
45 | @endforeach | ||
46 | @endif | ||
47 | </select> | ||
48 | <label for="title">Не заполнено поле</label> | ||
49 | </div> | ||
50 | <div class="modal__form-item send_text_div"> | ||
51 | <textarea id="i2" class="textarea" id="send_text" name="send_text" placeholder="Напишите текст с предложением о работе" required></textarea> | ||
12 | <label for="i2">Не заполнено поле</label> | 52 | <label for="i2">Не заполнено поле</label> |
13 | </div> | 53 | </div> |
14 | <div class="modal__form-item"> | 54 | <div class="modal__form-item"> |
15 | <div class="file"> | 55 | <div class="file"> |
16 | <label class="file__input"> | 56 | <label class="file__input" id="btn_send_file" name="btn_send_file"> |
17 | <input type="file" name="file" id="name"> | 57 | <input type="file" name="send_file" id="send_name"> |
18 | <span class="button button_light"> | 58 | <span class="button button_light"> |
19 | <svg> | 59 | <svg> |
20 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> | 60 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> |
21 | </svg> | 61 | </svg> |
22 | Прикрепить файл-документ | 62 | Прикрепить файл-документ |
23 | </span> | 63 | </span> |
24 | </label> | 64 | </label> |
25 | 65 | ||
26 | <div class="file__list"> | 66 | <div class="file__list" id="div_file" name="div_file"> |
27 | <div class="file__list-item"> | 67 | <div class="file__list-item"> |
28 | <div class="file__list-item-left"> | 68 | <div class="file__list-item-left"> |
29 | <svg> | 69 | <svg> |
30 | <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> | 70 | <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> |
31 | </svg> | 71 | </svg> |
32 | <span id="name_file" name="name_file">123</span> | 72 | <span id="send_name_file" name="send_name_file"></span> |
33 | </div> | 73 | </div> |
34 | <button type="button" class="file__list-item-right js-parent-remove"> | 74 | <button type="button" class="file__list-item-right js-parent-remove"> |
35 | <svg> | 75 | <svg> |
36 | <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use> | 76 | <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use> |
37 | </svg> | 77 | </svg> |
38 | </button> | 78 | </button> |
39 | </div> | 79 | </div> |
40 | </div> | 80 | </div> |
41 | </div> | 81 | </div> |
42 | </div> | 82 | </div> |
43 | <div class="modal__form-item"> | 83 | <div class="modal__form-item"> |
44 | <button type="submit" class="button">Отправить</button> | 84 | <button type="submit" id="submit_form_worker" name="submit_form_worker" class="button">Отправить</button> |
45 | </div> | 85 | </div> |
46 | </form> | 86 | </form> |
47 | </div> | 87 | </div> |
48 | </div> | 88 | </div> |
49 | 89 |
resources/views/modals/success_delete_profile.blade.php
File was created | 1 | <div id="is-deleted" class="modal modal_bg"> | |
2 | <div class="modal__body"> | ||
3 | <div class="modal__title">Профиль удален</div> | ||
4 | <div class="modal__text">Вы успешно удалили свой профиль.</div> | ||
5 | <a href="#" class="button button_light modal__button">На главную</a> | ||
6 | </div> | ||
7 | </div> | ||
8 |
resources/views/modals/thank_you_send_for_employer.blade.php
File was created | 1 | <div id="thanks-3" class="modal modal_bg"> | |
2 | <div class="modal__body"> | ||
3 | <div class="modal__title">Спасибо!</div> | ||
4 | <div class="modal__text">Вы успешно зарегистрировались</div> | ||
5 | <div class="modal__text left"><span>Ваш аккаунт требует подтверждение администратора сайта. Администратор сайта должен изменить статус работодателя, чтобы вы смогли авторизоваться в системе.</span></div> | ||
6 | <div class="modal__text left"><span>После подтверждения администратором, вам прейдет сообщение на электронную почту, о подтверждении регистрации.</span></div> | ||
7 | <a href="#" class="button button_light modal__button">Войти</a> | ||
8 | </div> | ||
9 | </div> | ||
10 |
resources/views/modals/thank_you_send_for_worker.blade.php
File was created | 1 | <div id="thanks-4" class="modal modal_bg"> | |
2 | <div class="modal__body"> | ||
3 | <div class="modal__title">Спасибо!</div> | ||
4 | <div class="modal__text">Ваше сообщение успешно отправлено администратору сайта на подтверждение.</div> | ||
5 | <a href="#" class="button button_light modal__button">На главную</a> | ||
6 | </div> | ||
7 | </div> | ||
8 |
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> | ||
5 | console.log('Test system'); | ||
6 | $(document).on('click', '#button_new_doc', function() { | ||
7 | var this_ = $(this); | ||
8 | var val_ = this_.attr('data-val'); | ||
9 | var new_diplom = $('#new_diplom'); | ||
10 | var new_diplom_val = new_diplom.val(); | ||
11 | var new_data_begin = $('#new_data_begin'); | ||
12 | var new_data_begin_val = new_data_begin.val(); | ||
13 | var new_data_end = $('#new_data_end'); | ||
14 | var new_data_end_val = new_data_end.val(); | ||
15 | var education = $('#education'); | ||
16 | var education_val = education.val(); | ||
17 | var worker_id = $('#new_id'); | ||
18 | var worker_val = worker_id.val(); | ||
4 | 19 | ||
20 | console.log('sort items ' + val_); | ||
21 | |||
22 | if (new_diplom_val == '') { | ||
23 | new_diplom.addClass('err_red'); | ||
24 | console.log('Border Up'); | ||
25 | } else { | ||
26 | $.ajax({ | ||
27 | type: "GET", | ||
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, | ||
30 | success: function (data) { | ||
31 | console.log('Блокировка...'); | ||
32 | console.log(data); | ||
33 | $('#sertificate').html(data); | ||
34 | if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); | ||
35 | }, | ||
36 | headers: { | ||
37 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
38 | }, | ||
39 | error: function (data) { | ||
40 | data = JSON.stringify(data); | ||
41 | console.log('Error: ' + data); | ||
42 | } | ||
43 | }); | ||
44 | } | ||
45 | }); | ||
46 | |||
47 | $(document).on('click', '#btn_new_diplom123', function() { | ||
48 | var this_ = $(this); | ||
49 | var val_ = this_.attr('data-val'); | ||
50 | var documents = $('#documents'); | ||
51 | var doc_val = documents.val(); | ||
52 | var block = $('#ajax_dop_diplomi'); | ||
53 | |||
54 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); | ||
55 | |||
56 | $.ajax({ | ||
57 | type: "GET", | ||
58 | url: "", | ||
59 | data: "worker_id="+val_+"&infoblok_id="+doc_val, | ||
60 | success: function (data) { | ||
61 | location.url = data; | ||
62 | console.log('Добавление документа-диплома'); | ||
63 | console.log(data); | ||
64 | block.html(data); | ||
65 | }, | ||
66 | headers: { | ||
67 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
68 | }, | ||
69 | error: function (data) { | ||
70 | data = JSON.stringify(data); | ||
71 | console.log('Error: ' + data); | ||
72 | } | ||
73 | }); | ||
74 | }); | ||
75 | |||
76 | $(document).on('click', '#new_work', function() { | ||
77 | var this_ = $(this); | ||
78 | var val_ = this_.attr('data-val'); | ||
79 | var new_diplom = $('#new_diplom').val(); | ||
80 | var new_data_begin = $('#new_data_begin').val(); | ||
81 | var new_data_end = $('#new_data_end').val(); | ||
82 | var new_job_title = $('#new_job_title').val(); | ||
83 | var new_teplohod = $('#new_teplohod').val(); | ||
84 | var new_GWT = $('#new_GWT').val(); | ||
85 | var new_KBT = $('#new_KBT').val(); | ||
86 | var new_Begin_work = $('#new_Begin_work').val(); | ||
87 | var new_End_work = $('#new_End_work').val(); | ||
88 | var new_name_company = $('#new_name_company').val(); | ||
89 | |||
90 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); | ||
91 | |||
92 | $.ajax({ | ||
93 | type: "GET", | ||
94 | url: "", | ||
95 | data: "worker_id="+val_+"&infoblok_id="+doc_val, | ||
96 | success: function (data) { | ||
97 | location.url = data; | ||
98 | console.log('Добавление документа-диплома'); | ||
99 | console.log(data); | ||
100 | block.html(data); | ||
101 | }, | ||
102 | headers: { | ||
103 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
104 | }, | ||
105 | error: function (data) { | ||
106 | data = JSON.stringify(data); | ||
107 | console.log('Error: ' + data); | ||
108 | } | ||
109 | }); | ||
110 | }); | ||
111 | </script> | ||
5 | @endsection | 112 | @endsection |
6 | 113 | ||
7 | @section('content') | 114 | @section('content') |
8 | <section class="cabinet"> | 115 | <section class="cabinet"> |
9 | <div class="container"> | 116 | <div class="container"> |
10 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 117 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
11 | <li><a href="{{ route('index') }}">Главная</a></li> | 118 | <li><a href="{{ route('index') }}">Главная</a></li> |
12 | <li><b>Личный кабинет</b></li> | 119 | <li><b>Личный кабинет</b></li> |
13 | </ul> | 120 | </ul> |
14 | <div class="cabinet__wrapper"> | 121 | <div class="cabinet__wrapper"> |
15 | <div class="cabinet__side"> | 122 | <div class="cabinet__side"> |
16 | <div class="cabinet__side-toper"> | 123 | <div class="cabinet__side-toper"> |
17 | @include('workers.emblema') | 124 | @include('workers.emblema') |
18 | 125 | ||
19 | </div> | 126 | </div> |
20 | 127 | ||
21 | @include('workers.menu', ['item' => 1]) | 128 | @include('workers.menu', ['item' => 1]) |
22 | </div> | 129 | </div> |
23 | <form class="cabinet__body"> | 130 | <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> |
131 | @csrf | ||
132 | @include('messages_error') | ||
24 | <div class="cabinet__body-item"> | 133 | <div class="cabinet__body-item"> |
25 | <div class="cabinet__anketa"> | 134 | <div class="cabinet__anketa"> |
26 | <h2 class="title cabinet__title">Моя анкета</h2> | 135 | <h2 class="title cabinet__title">Моя анкета</h2> |
27 | <div class="cabinet__anketa-buttons"> | 136 | <div class="cabinet__anketa-buttons"> |
28 | <button type="button" class="button">Поднять резюме</button> | 137 | <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> |
29 | <a href="#" class="button"> | 138 | <a href="{{ route('worker.download', ['worker' => $Worker[0]->id]) }}" class="button"> |
30 | <svg> | 139 | <svg> |
31 | <use xlink:href="images/sprite.svg#share"></use> | 140 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> |
32 | </svg> | 141 | </svg> |
33 | Скачать резюме | 142 | Скачать резюме |
34 | </a> | 143 | </a> |
35 | </div> | 144 | </div> |
36 | </div> | 145 | </div> |
37 | </div> | 146 | </div> |
38 | <div class="cabinet__body-item"> | 147 | <div class="cabinet__body-item"> |
39 | <div class="cabinet__stats"> | 148 | <div class="cabinet__stats"> |
40 | <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> | 149 | <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> |
41 | <div class="cabinet__stats-body"> | 150 | <div class="cabinet__stats-body"> |
42 | <div class="cabinet__stats-item"> | 151 | <div class="cabinet__stats-item"> |
43 | <svg> | 152 | <svg> |
44 | <use xlink:href="images/sprite.svg#eye-3"></use> | 153 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> |
45 | </svg> | 154 | </svg> |
46 | <span>Просмотров:</span> | 155 | <span>Просмотров:</span> |
47 | <b>23</b> | 156 | <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b> |
48 | </div> | 157 | </div> |
49 | <div class="cabinet__stats-item"> | 158 | <div class="cabinet__stats-item"> |
50 | <svg> | 159 | <svg> |
51 | <use xlink:href="images/sprite.svg#warning"></use> | 160 | <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> |
52 | </svg> | 161 | </svg> |
53 | <span>Отзывов:</span> | 162 | <span>Отзывов:</span> |
54 | <b>12</b> | 163 | <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b> |
55 | </div> | 164 | </div> |
56 | </div> | 165 | </div> |
57 | <div class="cabinet__stats-subtitle">Анкета заполнена на 20%</div> | 166 | <div class="cabinet__stats-subtitle">Анкета заполнена на @if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif</div> |
58 | <div class="cabinet__stats-line"> | 167 | <div class="cabinet__stats-line"> |
59 | <span style="width:20%"></span> | 168 | <span style="width:@if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif"></span> |
60 | </div> | 169 | </div> |
61 | <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> | 170 | <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> |
62 | </div> | 171 | </div> |
63 | </div> | 172 | </div> |
64 | <div class="cabinet__body-item"> | 173 | <div class="cabinet__body-item"> |
65 | <h3 class="cabinet__subtitle">Профиль</h3> | 174 | <h3 class="cabinet__subtitle">Профиль</h3> |
66 | <div class="cabinet__avatar"> | 175 | <div class="cabinet__avatar"> |
67 | <div class="cabinet__avatar-pic"> | 176 | <div class="cabinet__avatar-pic"> |
177 | |||
178 | @if (!empty($Worker[0]->photo)) | ||
179 | <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> | ||
180 | @else | ||
68 | <svg> | 181 | <svg> |
69 | <use xlink:href="images/sprite.svg#pic"></use> | 182 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
70 | </svg> | 183 | </svg> |
184 | @endif | ||
71 | </div> | 185 | </div> |
72 | <div class="cabinet__avatar-form"> | 186 | <div class="cabinet__avatar-form"> |
73 | <label class="file"> | 187 | <label class="file"> |
74 | <span class="file__input"> | 188 | <span class="file__input"> |
75 | <input type="file"> | 189 | <input type="file" name="photo" id="photo"> |
190 | |||
76 | <span class="button"> | 191 | <span class="button"> |
77 | <svg> | 192 | <svg> |
78 | <use xlink:href="images/sprite.svg#plus"></use> | 193 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |
79 | </svg> | 194 | </svg> |
80 | Загрузить | 195 | Загрузить |
81 | </span> | 196 | </span> |
82 | </span> | 197 | </span> |
83 | </label> | 198 | </label> |
84 | <p class="cabinet__text">Загрузите фотографию в формате svg.</p> | 199 | <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> |
85 | </div> | 200 | </div> |
86 | </div> | 201 | </div> |
87 | </div> | 202 | </div> |
88 | <div class="cabinet__body-item"> | 203 | <div class="cabinet__body-item"> |
89 | <div class="cabinet__inputs"> | 204 | <div class="cabinet__inputs"> |
90 | <div class="cabinet__inputs-item form-group"> | 205 | <div class="cabinet__inputs-item form-group"> |
91 | <label class="form-group__label">Электронная почта *</label> | 206 | <label class="form-group__label">Электронная почта *</label> |
92 | <div class="form-group__item"> | 207 | <div class="form-group__item"> |
93 | <input type="email" class="input" placeholder="info@rekamore.su" required> | 208 | <input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required> |
94 | </div> | 209 | </div> |
95 | </div> | 210 | </div> |
96 | <div class="cabinet__inputs-item form-group"> | 211 | <div class="cabinet__inputs-item form-group"> |
212 | <label class="form-group__label">Статус</label> | ||
213 | <div class="form-group__item"> | ||
214 | <div class="select"> | ||
215 | <select class="js-select2" name="status_work" id="status_work"> | ||
216 | <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option> | ||
217 | <option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option> | ||
218 | <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option> | ||
219 | </select> | ||
220 | </div> | ||
221 | </div> | ||
222 | </div> | ||
223 | <!--<div class="cabinet__inputs-item form-group"> | ||
97 | <label class="form-group__label">Статус *</label> | 224 | <label class="form-group__label">Статус *</label> |
98 | <div class="form-group__item"> | 225 | <div class="form-group__item"> |
99 | <input type="text" class="input" required> | 226 | <input type="text" class="input" required> |
100 | </div> | 227 | </div> |
228 | </div>--> | ||
229 | @if (isset($Worker[0]->users)) | ||
230 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
231 | <label class="form-group__label">Фамилия *</label> | ||
232 | <div class="form-group__item"> | ||
233 | <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> | ||
234 | </div> | ||
101 | </div> | 235 | </div> |
102 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 236 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
103 | <label class="form-group__label">ФИО *</label> | 237 | <label class="form-group__label">Имя *</label> |
104 | <div class="form-group__item"> | 238 | <div class="form-group__item"> |
105 | <input type="text" class="input" placeholder="Филиппов Егор Алексеевич" required> | 239 | <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> |
106 | </div> | 240 | </div> |
107 | </div> | 241 | </div> |
242 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
243 | <label class="form-group__label">Отчество *</label> | ||
244 | <div class="form-group__item"> | ||
245 | <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> | ||
246 | </div> | ||
247 | </div> | ||
248 | @endif | ||
108 | </div> | 249 | </div> |
109 | </div> | 250 | </div> |
110 | <div class="cabinet__body-item"> | 251 | <div class="cabinet__body-item"> |
111 | <h3 class="cabinet__subtitle">Основная информация</h3> | 252 | <h3 class="cabinet__subtitle">Основная информация</h3> |
112 | <div class="cabinet__inputs"> | 253 | <div class="cabinet__inputs"> |
113 | <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> | 254 | <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> |
114 | <label class="form-group__label">Возраст</label> | 255 | <label class="form-group__label">Возраст</label> |
115 | <div class="form-group__item"> | 256 | <div class="form-group__item"> |
116 | <input type="number" class="input" placeholder="0" required> | 257 | <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required> |
117 | </div> | 258 | </div> |
118 | </div> | 259 | </div> |
119 | <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> | 260 | <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> |
120 | <label class="form-group__label">Возраст</label> | 261 | <label class="form-group__label">Желаемые вакансии</label> |
121 | <div class="form-group__item"> | 262 | <div class="form-group__item"> |
122 | <div class="select"> | 263 | <div class="select"> |
123 | <select class="js-select2" multiple="multiple"> | 264 | <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> |
124 | <option selected>Капитан</option> | 265 | @if ($Job_titles->count()) |
125 | <option selected>Старший помощник капитана</option> | 266 | @foreach($Job_titles as $it) |
126 | <option>Сортировка 1</option> | 267 | @if (isset($Worker[0]->job_titles)) |
127 | <option>Сортировка 2</option> | 268 | @if ($Worker[0]->job_titles->count()) |
128 | <option>Сортировка 3</option> | 269 | @foreach($Worker[0]->job_titles as $select) |
129 | <option>Сортировка 4</option> | 270 | <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option> |
130 | <option>Сортировка 5</option> | 271 | @endforeach |
131 | <option>Сортировка 6</option> | 272 | @else |
273 | <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> | ||
274 | @endif | ||
275 | @else | ||
276 | <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> | ||
277 | @endif | ||
278 | @endforeach | ||
279 | @endif | ||
132 | </select> | 280 | </select> |
133 | </div> | 281 | </div> |
134 | </div> | 282 | </div> |
135 | </div> | 283 | </div> |
136 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 284 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
137 | <label class="form-group__label">ФИО *</label> | 285 | <label class="form-group__label">Город</label> |
138 | <div class="form-group__item"> | 286 | <div class="form-group__item"> |
139 | <input type="text" class="input" placeholder="Челябинск" required> | 287 | <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> |
140 | </div> | 288 | </div> |
141 | </div> | 289 | </div> |
142 | <div class="cabinet__inputs-item form-group"> | 290 | <div class="cabinet__inputs-item form-group"> |
143 | <label class="form-group__label">Опыт работы</label> | 291 | <label class="form-group__label">Опыт работы</label> |
144 | <div class="form-group__item"> | 292 | <div class="form-group__item"> |
145 | <div class="select"> | 293 | <div class="select"> |
146 | <select class="js-select2"> | 294 | <select class="js-select2" id="experience" name="experience"> |
147 | <option>1 год</option> | 295 | <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> |
148 | <option>Сортировка 1</option> | 296 | <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> |
149 | <option>Сортировка 2</option> | 297 | <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> |
150 | <option>Сортировка 3</option> | 298 | <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> |
151 | <option>Сортировка 4</option> | 299 | <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> |
152 | <option>Сортировка 5</option> | 300 | <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> |
153 | <option>Сортировка 6</option> | ||
154 | </select> | ||
155 | </div> | ||
156 | </div> | ||
157 | </div> | ||
158 | <div class="cabinet__inputs-item form-group"> | ||
159 | <label class="form-group__label">Кому хотите отправить сообщение</label> | ||
160 | <div class="form-group__item"> | ||
161 | <div class="select"> | ||
162 | <select class="js-select2"> | ||
163 | <option>Не указано</option> | ||
164 | <option>Сортировка 1</option> | ||
165 | <option>Сортировка 2</option> | ||
166 | <option>Сортировка 3</option> | ||
167 | <option>Сортировка 4</option> | ||
168 | <option>Сортировка 5</option> | ||
169 | <option>Сортировка 6</option> | ||
170 | </select> | 301 | </select> |
171 | </div> | 302 | </div> |
172 | </div> | 303 | </div> |
173 | </div> | 304 | </div> |
305 | |||
174 | <div class="cabinet__inputs-item form-group"> | 306 | <div class="cabinet__inputs-item form-group"> |
175 | <label class="form-group__label">Электронная почта</label> | 307 | <label class="form-group__label">Номер телефона 1</label> |
176 | <div class="form-group__item"> | 308 | <div class="form-group__item"> |
177 | <input type="email" class="input" placeholder="info@rekamore.su" required> | 309 | <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> |
178 | </div> | 310 | </div> |
179 | </div> | 311 | </div> |
180 | <div class="cabinet__inputs-item form-group"> | 312 | <div class="cabinet__inputs-item form-group"> |
181 | <label class="form-group__label">Номер телефона</label> | 313 | <label class="form-group__label">Номер телефона 2</label> |
182 | <div class="form-group__item"> | 314 | <div class="form-group__item"> |
183 | <input type="tel" class="input" placeholder="+7 (___) ___-__-__" required> | 315 | <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> |
184 | </div> | 316 | </div> |
185 | </div> | 317 | </div> |
186 | </div> | 318 | </div> |
187 | </div> | 319 | </div> |
188 | <div class="cabinet__body-item"> | 320 | |
189 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | 321 | <div id="sertificate" name="sertificate"> |
190 | <h4 class="cabinet__h4">Сертификат 1</h4> | 322 | @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) |
191 | <div class="cabinet__inputs"> | 323 | @php $i = 0; @endphp |
192 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 324 | @foreach($Worker[0]->sertificate as $it) |
193 | <label class="form-group__label">Название сертификата</label> | 325 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
194 | <div class="form-group__item"> | 326 | @if ($i == 0) |
195 | <input type="text" class="input" value="Сертификат 1 - Филиппов Егор Алексеевич" disabled> | 327 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> |
328 | @endif | ||
329 | <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> | ||
330 | <div class="cabinet__inputs"> | ||
331 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
332 | <label class="form-group__label">Название сертификата</label> | ||
333 | <div class="form-group__item"> | ||
334 | <input type="text" class="input" value="{{ $it->name }}" disabled> | ||
335 | </div> | ||
336 | </div> | ||
337 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
338 | <label class="form-group__label">Название сертификата</label> | ||
339 | <div class="form-group__item"> | ||
340 | <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> | ||
341 | </div> | ||
342 | </div> | ||
343 | <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> | ||
344 | <svg> | ||
345 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | ||
346 | </svg> | ||
347 | Удалить | ||
348 | </a> | ||
196 | </div> | 349 | </div> |
197 | </div> | 350 | </div> |
198 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 351 | @php $i++ @endphp |
199 | <label class="form-group__label">Название сертификата</label> | 352 | @endforeach |
200 | <div class="form-group__item"> | 353 | @else |
201 | <input type="text" class="input" value="04.11.26" disabled> | 354 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
202 | </div> | 355 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> |
356 | Нет сертификатов | ||
203 | </div> | 357 | </div> |
204 | <button type="button" class="button button_light"> | 358 | @endif |
205 | <svg> | ||
206 | <use xlink:href="images/sprite.svg#del"></use> | ||
207 | </svg> | ||
208 | Удалить | ||
209 | </button> | ||
210 | </div> | ||
211 | </div> | 359 | </div> |
360 | |||
212 | <div class="cabinet__body-item"> | 361 | <div class="cabinet__body-item"> |
213 | <h4 class="cabinet__h4">Сертификат 2</h4> | 362 | <h4 class="cabinet__h4">Добавить сертификат</h4> |
214 | <div class="cabinet__inputs"> | 363 | <div class="cabinet__inputs"> |
215 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 364 | <input type="hidden" name="new_id" id="new_id" class="input" value="{{ $Worker[0]->id }}"> |
365 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
216 | <label class="form-group__label">Название сертификата</label> | 366 | <label class="form-group__label">Название сертификата</label> |
217 | <div class="form-group__item"> | 367 | <div class="form-group__item"> |
218 | <input type="text" class="input" value="Сертификат 1 - Филиппов Егор Алексеевич" disabled> | 368 | <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании"> |
219 | </div> | 369 | </div> |
220 | </div> | 370 | </div> |
221 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 371 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
222 | <label class="form-group__label">Название сертификата</label> | 372 | <label class="form-group__label">Дата поступления</label> |
223 | <div class="form-group__item"> | 373 | <div class="form-group__item"> |
224 | <input type="text" class="input" value="04.11.26" disabled> | 374 | <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23"> |
225 | </div> | 375 | </div> |
226 | </div> | 376 | </div> |
227 | <button type="button" class="button button_light"> | ||
228 | <svg> | ||
229 | <use xlink:href="images/sprite.svg#del"></use> | ||
230 | </svg> | ||
231 | Удалить | ||
232 | </button> | ||
233 | </div> | ||
234 | </div> | ||
235 | <div class="cabinet__body-item"> | ||
236 | <h4 class="cabinet__h4">Добавить сертификат</h4> | ||
237 | <div class="cabinet__inputs"> | ||
238 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 377 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
239 | <label class="form-group__label">Название сертификата</label> | 378 | <label class="form-group__label">Дата окончания</label> |
240 | <div class="form-group__item"> | 379 | <div class="form-group__item"> |
241 | <input type="text" class="input" value="Сертификат 1 - Филиппов Егор Алексеевич"> | 380 | <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26"> |
242 | </div> | 381 | </div> |
243 | </div> | 382 | </div> |
244 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 383 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
245 | <label class="form-group__label">Название сертификата</label> | 384 | <label class="form-group__label">Дата окончания</label> |
246 | <div class="form-group__item"> | 385 | <div class="form-group__item"> |
247 | <input type="text" class="input" value="04.11.26"> | 386 | <input type="text" name="education" id="education" class="input" value="Учебное заведение"> |
248 | </div> | 387 | </div> |
249 | </div> | 388 | </div> |
250 | <button type="button" class="button button_light"> | 389 | <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc"> |
251 | Добавить сертификат | 390 | Добавить сертификат |
252 | </button> | 391 | </div> |
253 | </div> | 392 | </div> |
254 | </div> | 393 | </div> |
255 | <div class="cabinet__body-item"> | 394 | |
395 | <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> | ||
256 | <h4 class="cabinet__h4">Дополнительная информация</h4> | 396 | <h4 class="cabinet__h4">Дополнительная информация</h4> |
257 | <div class="cabinet__inputs"> | 397 | <div class="cabinet__inputs" > |
258 | <div class="cabinet__inputs-item form-group"> | 398 | @if (isset($Worker[0]->infobloks)) |
259 | <label class="form-group__label">Загран паспорт</label> | 399 | @if ($Worker[0]->infobloks->count()) |
260 | <div class="form-group__item"> | 400 | @php $i = 1; @endphp |
261 | <div class="select"> | 401 | @foreach ($Worker[0]->infobloks as $info) |
262 | <select class="js-select2"> | 402 | <div class="cabinet__inputs-item form-group"> |
263 | <option>Не указано</option> | 403 | <label class="form-group__label">{{ $info->name }}</label> |
264 | <option>Сортировка 1</option> | 404 | <div class="form-group__item"> |
265 | <option>Сортировка 2</option> | 405 | <div class="select"> |
266 | <option>Сортировка 3</option> | 406 | <select class="js-select2 sertificates_js"> |
267 | <option>Сортировка 4</option> | 407 | <option value="0">Нет</option> |
268 | <option>Сортировка 5</option> | 408 | <option value="1" selected>Да</option> |
269 | <option>Сортировка 6</option> | 409 | </select> |
270 | </select> | 410 | </div> |
271 | </div> | 411 | </div> |
272 | </div> | ||
273 | </div> | ||
274 | <div class="cabinet__inputs-item form-group"> | ||
275 | <label class="form-group__label">МК</label> | ||
276 | <div class="form-group__item"> | ||
277 | <div class="select"> | ||
278 | <select class="js-select2"> | ||
279 | <option>Не указано</option> | ||
280 | <option>Сортировка 1</option> | ||
281 | <option>Сортировка 2</option> | ||
282 | <option>Сортировка 3</option> | ||
283 | <option>Сортировка 4</option> | ||
284 | <option>Сортировка 5</option> | ||
285 | <option>Сортировка 6</option> | ||
286 | </select> | ||
287 | </div> | ||
288 | </div> | ||
289 | </div> | ||
290 | <div class="cabinet__inputs-item form-group"> | ||
291 | <label class="form-group__label">ВВП</label> | ||
292 | <div class="form-group__item"> | ||
293 | <div class="select"> | ||
294 | <select class="js-select2"> | ||
295 | <option>Не указано</option> | ||
296 | <option>Сортировка 1</option> | ||
297 | <option>Сортировка 2</option> | ||
298 | <option>Сортировка 3</option> | ||
299 | <option>Сортировка 4</option> | ||
300 | <option>Сортировка 5</option> | ||
301 | <option>Сортировка 6</option> | ||
302 | </select> | ||
303 | </div> | ||
304 | </div> | ||
305 | </div> | ||
306 | <div class="cabinet__inputs-item form-group"> | ||
307 | <label class="form-group__label">УЛМ</label> | ||
308 | <div class="form-group__item"> | ||
309 | <div class="select"> | ||
310 | <select class="js-select2"> | ||
311 | <option>Не указано</option> | ||
312 | <option>Сортировка 1</option> | ||
313 | <option>Сортировка 2</option> | ||
314 | <option>Сортировка 3</option> | ||
315 | <option>Сортировка 4</option> | ||
316 | <option>Сортировка 5</option> | ||
317 | <option>Сортировка 6</option> | ||
318 | </select> | ||
319 | </div> | ||
320 | </div> | ||
321 | </div> | ||
322 | <div class="cabinet__inputs-item form-group"> | ||
323 | <label class="form-group__label">Речной диплом</label> | ||
324 | <div class="form-group__item"> | ||
325 | <div class="select"> | ||
326 | <select class="js-select2"> | ||
327 | <option>Не указано</option> | ||
328 | <option>Сортировка 1</option> | ||
329 | <option>Сортировка 2</option> | ||
330 | <option>Сортировка 3</option> | ||
331 | <option>Сортировка 4</option> | ||
332 | <option>Сортировка 5</option> | ||
333 | <option>Сортировка 6</option> | ||
334 | </select> | ||
335 | </div> | ||
336 | </div> | ||
337 | </div> | ||
338 | <div class="cabinet__inputs-item form-group"> | ||
339 | <label class="form-group__label">Морской диплом</label> | ||
340 | <div class="form-group__item"> | ||
341 | <div class="select"> | ||
342 | <select class="js-select2"> | ||
343 | <option>Не указано</option> | ||
344 | <option>Сортировка 1</option> | ||
345 | <option>Сортировка 2</option> | ||
346 | <option>Сортировка 3</option> | ||
347 | <option>Сортировка 4</option> | ||
348 | <option>Сортировка 5</option> | ||
349 | <option>Сортировка 6</option> | ||
350 | </select> | ||
351 | </div> | ||
352 | </div> | ||
353 | </div> | ||
354 | <div class="cabinet__inputs-item form-group"> | ||
355 | <label class="form-group__label">МПСС 72</label> | ||
356 | <div class="form-group__item"> | ||
357 | <div class="select"> | ||
358 | <select class="js-select2"> | ||
359 | <option>Не указано</option> | ||
360 | <option>Сортировка 1</option> | ||
361 | <option>Сортировка 2</option> | ||
362 | <option>Сортировка 3</option> | ||
363 | <option>Сортировка 4</option> | ||
364 | <option>Сортировка 5</option> | ||
365 | <option>Сортировка 6</option> | ||
366 | </select> | ||
367 | </div> | ||
368 | </div> | ||
369 | </div> | ||
370 | <div class="cabinet__inputs-item form-group"> | ||
371 | <label class="form-group__label">ГМССБ</label> | ||
372 | <div class="form-group__item"> | ||
373 | <div class="select"> | ||
374 | <select class="js-select2"> | ||
375 | <option>Не указано</option> | ||
376 | <option>Сортировка 1</option> | ||
377 | <option>Сортировка 2</option> | ||
378 | <option>Сортировка 3</option> | ||
379 | <option>Сортировка 4</option> | ||
380 | <option>Сортировка 5</option> | ||
381 | <option>Сортировка 6</option> | ||
382 | </select> | ||
383 | </div> | 412 | </div> |
384 | </div> | 413 | @php $i++; @endphp |
385 | </div> | 414 | @endforeach |
386 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 415 | @endif |
387 | <label class="form-group__label">Образование</label> | 416 | @endif |
417 | |||
418 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
419 | <label class="form-group__label">Образцы дипломов и документов</label> | ||
388 | <div class="form-group__item"> | 420 | <div class="form-group__item"> |
389 | <div class="select"> | 421 | <div class="select"> |
390 | <select class="js-select2"> | 422 | <select class="js-select2" id="documents" name="documents"> |
391 | <option>Не указано</option> | 423 | @if ($Infoblocks->count()) |
392 | <option>Сортировка 1</option> | 424 | @foreach ($Infoblocks as $it) |
393 | <option>Сортировка 2</option> | 425 | <option value="{{ $it->id }}">{{ $it->name }}</option> |
394 | <option>Сортировка 3</option> | 426 | @endforeach |
395 | <option>Сортировка 4</option> | 427 | @endif |
396 | <option>Сортировка 5</option> | ||
397 | <option>Сортировка 6</option> | ||
398 | </select> | 428 | </select> |
399 | </div> | 429 | </div> |
400 | </div> | 430 | </div> |
401 | </div> | 431 | </div> |
402 | <button type="button" class="button button_light"> | 432 | <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"> |
403 | Добавить сертификат | 433 | Добавить документ |
404 | </button> | 434 | </a> |
405 | </div> | 435 | </div> |
406 | </div> | 436 | </div> |
407 | <div class="cabinet__body-item"> | 437 | <div class="cabinet__body-item"> |
408 | <div class="cabinet__works"> | 438 | <div class="cabinet__works"> |
439 | @if (isset($Worker[0]->place_worker)) | ||
440 | @php $i = 1; @endphp | ||
441 | @foreach($Worker[0]->place_worker as $company) | ||
409 | <div class="cabinet__works-item"> | 442 | <div class="cabinet__works-item"> |
410 | <div class="cabinet__works-spoiler active"> | 443 | <div class="cabinet__works-spoiler active"> |
411 | <div class="cabinet__works-spoiler-left"> | 444 | <div class="cabinet__works-spoiler-left"> |
412 | <div class="cabinet__works-spoiler-buttons"> | 445 | <div class="cabinet__works-spoiler-buttons"> |
413 | <button type="button" class="button button_light js-works-remove"> | 446 | <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove"> |
414 | <svg> | 447 | <svg> |
415 | <use xlink:href="images/sprite.svg#del"></use> | 448 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
416 | </svg> | 449 | </svg> |
417 | </button> | 450 | </a> |
418 | <button type="button" class="button button_light js-works-edit"> | 451 | <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit"> |
419 | <svg> | 452 | <svg> |
420 | <use xlink:href="images/sprite.svg#pencil"></use> | 453 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> |
421 | </svg> | 454 | </svg> |
422 | </button> | 455 | </a> |
423 | </div> | 456 | </div> |
424 | <div class="cabinet__works-spoiler-text">Место работы 1</div> | 457 | <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> |
425 | </div> | 458 | </div> |
426 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | 459 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> |
427 | <svg> | 460 | <svg> |
428 | <use xlink:href="images/sprite.svg#arrow-bold"></use> | 461 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> |
429 | </svg> | 462 | </svg> |
430 | </button> | 463 | </button> |
431 | </div> | 464 | </div> |
432 | <div class="cabinet__works-body"> | 465 | <div class="cabinet__works-body"> |
433 | <div class="cabinet__inputs"> | 466 | <div class="cabinet__inputs"> |
resources/views/workers/docs-edit.blade.php
File was created | 1 | @extends('layout.frontend', ['title' => 'Редактирование стандартного документа - РекаМоре']) | |
2 | |||
3 | @section('scripts') | ||
4 | |||
5 | @endsection | ||
6 | |||
7 | @section('content') | ||
8 | <section class="cabinet"> | ||
9 | <div class="container"> | ||
10 | <ul class="breadcrumbs cabinet__breadcrumbs"> | ||
11 | <li><a href="{{ route('index') }}">Главная</a></li> | ||
12 | <li><b>Личный кабинет</b></li> | ||
13 | </ul> | ||
14 | <div class="cabinet__wrapper"> | ||
15 | <div class="cabinet__side"> | ||
16 | <div class="cabinet__side-toper"> | ||
17 | @include('workers.emblema') | ||
18 | |||
19 | </div> | ||
20 | |||
21 | @include('workers.menu', ['item' => 1]) | ||
22 | </div> | ||
23 | |||
24 | <form class="cabinet__body" action="{{ route('worker.edit_document_save', ['doc' => $doc->id]) }}" method="POST"> | ||
25 | @csrf | ||
26 | <div class="cabinet__works-item"> | ||
27 | @include('messages_error') | ||
28 | <div class="cabinet__works-spoiler active"> | ||
29 | <div class="cabinet__works-spoiler-left"> | ||
30 | <div class="cabinet__works-spoiler-text">Редактирование работы</div> | ||
31 | </div> | ||
32 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | ||
33 | <svg> | ||
34 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | ||
35 | </svg> | ||
36 | </button> | ||
37 | </div> | ||
38 | <div class="cabinet__works-body"> | ||
39 | <div class="cabinet__inputs"> | ||
40 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/> | ||
41 | <div class="cabinet__inputs-item form-group"> | ||
42 | <label class="form-group__label">Должность</label> | ||
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 ?? '' }}"> | ||
45 | </div> | ||
46 | </div> | ||
47 | <div class="cabinet__inputs-item form-group"> | ||
48 | <label class="form-group__label">Опыт работы в танкерном флоте</label> | ||
49 | <div class="form-group__item"> | ||
50 | <select class="js-select2" name="tanker" id="tanker"> | ||
51 | <option value="0" @if ($doc->tanker == 0) seleted @endif>Нет</option> | ||
52 | <option value="1" @if ($doc->tanker == 1) seleted @endif>Да</option> | ||
53 | </select> | ||
54 | </div> | ||
55 | </div> | ||
56 | <div class="cabinet__inputs-item form-group"> | ||
57 | <label class="form-group__label">Название теплохода</label> | ||
58 | <div class="form-group__item"> | ||
59 | <input type="text" name="teplohod" id="teplohod" class="input" value="{{ old('teplohod') ?? $doc->teplohod ?? '' }}"> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="cabinet__inputs-item form-group"> | ||
63 | <label class="form-group__label">Тип (GWT)</label> | ||
64 | <div class="form-group__item"> | ||
65 | <input type="text" name="GWT" id="GWT" class="input" value="{{ old('GWT') ?? $doc->GWT ?? '' }}"> | ||
66 | </div> | ||
67 | </div> | ||
68 | <div class="cabinet__inputs-item form-group"> | ||
69 | <label class="form-group__label">ГД (кВТ)</label> | ||
70 | <div class="form-group__item"> | ||
71 | <input type="text" name="KBT" id="KBT" class="input" value="{{ old('KBT') ?? $doc->KBT ?? '' }}"> | ||
72 | </div> | ||
73 | </div> | ||
74 | <div class="cabinet__inputs-item form-group"> | ||
75 | <label class="form-group__label">Начало контракта</label> | ||
76 | <div class="form-group__item"> | ||
77 | <input type="text" name="Begin_work" id="Begin_work" class="input" value="{{ old('begin_work') ?? $doc->begin_work ?? '' }}"> | ||
78 | </div> | ||
79 | </div> | ||
80 | <div class="cabinet__inputs-item form-group"> | ||
81 | <label class="form-group__label">Окончание контракта</label> | ||
82 | <div class="form-group__item"> | ||
83 | <input type="text" name="End_work" id="End_work" class="input" value="{{ old('end_work') ?? $doc->end_work ?? '' }}"> | ||
84 | </div> | ||
85 | </div> | ||
86 | <div class="cabinet__inputs-item form-group"> | ||
87 | <label class="form-group__label">Название компании</label> | ||
88 | <div class="form-group__item"> | ||
89 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}"> | ||
90 | </div> | ||
91 | </div> | ||
92 | <button type="submit" class="button">Сохранить</button> | ||
93 | </div> | ||
94 | </div> | ||
95 | </div> | ||
96 | </form> | ||
97 | </div> | ||
98 | </div> | ||
99 | </section> | ||
100 | </div> | ||
101 | @endsection | ||
102 |
resources/views/workers/docs.blade.php
File was created | 1 | @extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре']) | |
2 | |||
3 | @section('scripts') | ||
4 | |||
5 | @endsection | ||
6 | |||
7 | @section('content') | ||
8 | <section class="cabinet"> | ||
9 | <div class="container"> | ||
10 | <ul class="breadcrumbs cabinet__breadcrumbs"> | ||
11 | <li><a href="{{ route('index') }}">Главная</a></li> | ||
12 | <li><b>Личный кабинет</b></li> | ||
13 | </ul> | ||
14 | <div class="cabinet__wrapper"> | ||
15 | <div class="cabinet__side"> | ||
16 | <div class="cabinet__side-toper"> | ||
17 | @include('workers.emblema') | ||
18 | |||
19 | </div> | ||
20 | |||
21 | @include('workers.menu', ['item' => 1]) | ||
22 | </div> | ||
23 | |||
24 | <form class="cabinet__body" action="{{ route('worker.add_document_save') }}" method="POST"> | ||
25 | @csrf | ||
26 | <div class="cabinet__works-item"> | ||
27 | @include('messages_error') | ||
28 | <div class="cabinet__works-spoiler active"> | ||
29 | <div class="cabinet__works-spoiler-left"> | ||
30 | <div class="cabinet__works-spoiler-text">Новая работа</div> | ||
31 | </div> | ||
32 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | ||
33 | <svg> | ||
34 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | ||
35 | </svg> | ||
36 | </button> | ||
37 | </div> | ||
38 | <div class="cabinet__works-body"> | ||
39 | <div class="cabinet__inputs"> | ||
40 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/> | ||
41 | <div class="cabinet__inputs-item form-group"> | ||
42 | <label class="form-group__label">Должность</label> | ||
43 | <div class="form-group__item"> | ||
44 | <input type="text" name="job_title" id="job_title" class="input" value="Не указано"> | ||
45 | </div> | ||
46 | </div> | ||
47 | <div class="cabinet__inputs-item form-group"> | ||
48 | <label class="form-group__label">Опыт работы в танкерном флоте</label> | ||
49 | <div class="form-group__item"> | ||
50 | <select class="js-select2" name="tanker" id="tanker"> | ||
51 | <option value="0">Нет</option> | ||
52 | <option value="1">Да</option> | ||
53 | </select> | ||
54 | </div> | ||
55 | </div> | ||
56 | <div class="cabinet__inputs-item form-group"> | ||
57 | <label class="form-group__label">Название теплохода</label> | ||
58 | <div class="form-group__item"> | ||
59 | <input type="text" name="teplohod" id="teplohod" class="input" value="Не указано"> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="cabinet__inputs-item form-group"> | ||
63 | <label class="form-group__label">Тип (GWT)</label> | ||
64 | <div class="form-group__item"> | ||
65 | <input type="text" name="GWT" id="GWT" class="input" value="Не указано"> | ||
66 | </div> | ||
67 | </div> | ||
68 | <div class="cabinet__inputs-item form-group"> | ||
69 | <label class="form-group__label">ГД (кВТ)</label> | ||
70 | <div class="form-group__item"> | ||
71 | <input type="text" name="KBT" id="KBT" class="input" value="Не указано"> | ||
72 | </div> | ||
73 | </div> | ||
74 | <div class="cabinet__inputs-item form-group"> | ||
75 | <label class="form-group__label">Начало контракта</label> | ||
76 | <div class="form-group__item"> | ||
77 | <input type="text" name="Begin_work" id="Begin_work" class="input" value="Не указано"> | ||
78 | </div> | ||
79 | </div> | ||
80 | <div class="cabinet__inputs-item form-group"> | ||
81 | <label class="form-group__label">Окончание контракта</label> | ||
82 | <div class="form-group__item"> | ||
83 | <input type="text" name="End_work" id="End_work" class="input" value="Не указано"> | ||
84 | </div> | ||
85 | </div> | ||
86 | <div class="cabinet__inputs-item form-group"> | ||
87 | <label class="form-group__label">Название компании</label> | ||
88 | <div class="form-group__item"> | ||
89 | <input type="text" name="name_company" id="name_company" class="input" value="Не указано"> | ||
90 | </div> | ||
91 | </div> | ||
92 | <button type="submit" class="button">Сохранить</button> | ||
93 | <a href="{{ route('worker.cabinet') }}" class="button">Назад</a> | ||
94 | </div> | ||
95 | </div> | ||
96 | </div> | ||
97 | </form> | ||
98 | </div> | ||
99 | </div> | ||
100 | </section> | ||
101 | </div> | ||
102 | @endsection | ||
103 |
resources/views/workers/dop_info.blade.php
File was created | 1 | @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре']) | |
2 | |||
3 | @section('scripts') | ||
4 | |||
5 | @endsection | ||
6 | |||
7 | @section('content') | ||
8 | <section class="cabinet"> | ||
9 | <div class="container"> | ||
10 | <ul class="breadcrumbs cabinet__breadcrumbs"> | ||
11 | <li><a href="{{ route('index') }}">Главная</a></li> | ||
12 | <li><b>Личный кабинет</b></li> | ||
13 | </ul> | ||
14 | <div class="cabinet__wrapper"> | ||
15 | <div class="cabinet__side"> | ||
16 | <div class="cabinet__side-toper"> | ||
17 | @include('workers.emblema') | ||
18 | |||
19 | </div> | ||
20 | |||
21 | @include('workers.menu', ['item' => 1]) | ||
22 | </div> | ||
23 | <form class="cabinet__body" action="{{ route('worker.dop_info_save') }}" method="POST"> | ||
24 | @csrf | ||
25 | @include('messages_error') | ||
26 | <input type="hidden" id="worker_id" name="worker_id" value="{{ $worker_id }}"/> | ||
27 | <div class="cabinet__body-item"> | ||
28 | <div class="cabinet__anketa"> | ||
29 | <h2 class="title cabinet__title">Добавление диплома</h2> | ||
30 | </div> | ||
31 | </div> | ||
32 | <div class="form-group__item"> | ||
33 | <div class="select"> | ||
34 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
35 | <label class="form-group__label">Образцы дипломов и документов</label> | ||
36 | </div> | ||
37 | <select class="js-select2" id="infoblok_id" name="infoblok_id"> | ||
38 | @if ($Infoblocks->count()) | ||
39 | @foreach ($Infoblocks as $it) | ||
40 | <option value="{{ $it->id }}">{{ $it->name }}</option> | ||
41 | @endforeach | ||
42 | @endif | ||
43 | </select> | ||
44 | </div> | ||
45 | </div> | ||
46 | <div class="cabinet__body-item"> | ||
47 | <h4 class="cabinet__h4">Описание-комментарий</h4> | ||
48 | <textarea class="textarea" name="text" id="text" placeholder="Не указано"></textarea> | ||
49 | <div class="cabinet__buttons"> | ||
50 | <button type="submit" class="button">Сохранить</button> | ||
51 | </div> | ||
52 | </div> | ||
53 | </div> | ||
54 | </form> | ||
55 | </div> | ||
56 | </div> | ||
57 | </section> | ||
58 | </div> | ||
59 | @endsection | ||
60 |
routes/web.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use App\Http\Controllers\AdEmployerController; | 3 | use App\Http\Controllers\AdEmployerController; |
4 | use App\Http\Controllers\Admin\AdminController; | 4 | use App\Http\Controllers\Admin\AdminController; |
5 | use App\Http\Controllers\Admin\CategoryController; | 5 | use App\Http\Controllers\Admin\CategoryController; |
6 | use App\Http\Controllers\Admin\CategoryEmpController; | 6 | use App\Http\Controllers\Admin\CategoryEmpController; |
7 | use App\Http\Controllers\Admin\EducationController; | 7 | use App\Http\Controllers\Admin\EducationController; |
8 | use App\Http\Controllers\Admin\EmployersController; | 8 | use App\Http\Controllers\Admin\EmployersController; |
9 | use App\Http\Controllers\EmployerController as FrontEmployersController; | 9 | use App\Http\Controllers\EmployerController as FrontEmployersController; |
10 | use App\Http\Controllers\Admin\InfoBloksController; | 10 | use App\Http\Controllers\Admin\InfoBloksController; |
11 | use App\Http\Controllers\Admin\JobTitlesController; | 11 | use App\Http\Controllers\Admin\JobTitlesController; |
12 | use App\Http\Controllers\Admin\UsersController; | 12 | use App\Http\Controllers\Admin\UsersController; |
13 | use App\Http\Controllers\Admin\WorkersController; | 13 | use App\Http\Controllers\Admin\WorkersController; |
14 | use App\Http\Controllers\Auth\ForgotPasswordController; | 14 | use App\Http\Controllers\Auth\ForgotPasswordController; |
15 | use App\Http\Controllers\Auth\LoginController; | 15 | use App\Http\Controllers\Auth\LoginController; |
16 | use App\Http\Controllers\Auth\RegisterController; | 16 | use App\Http\Controllers\Auth\RegisterController; |
17 | use App\Http\Controllers\CKEditorController; | 17 | use App\Http\Controllers\CKEditorController; |
18 | use App\Http\Controllers\MediaController; | 18 | use App\Http\Controllers\MediaController; |
19 | use App\Http\Controllers\WorkerController; | 19 | use App\Http\Controllers\WorkerController; |
20 | use App\Models\User; | 20 | use App\Models\User; |
21 | use App\Http\Controllers\MainController; | 21 | use App\Http\Controllers\MainController; |
22 | use App\Http\Controllers\HomeController; | 22 | use App\Http\Controllers\HomeController; |
23 | use Illuminate\Support\Facades\Route; | 23 | use Illuminate\Support\Facades\Route; |
24 | use App\Http\Controllers\Admin\CompanyController; | 24 | use App\Http\Controllers\Admin\CompanyController; |
25 | use App\Http\Controllers\Admin\Ad_EmployersController; | 25 | use App\Http\Controllers\Admin\Ad_EmployersController; |
26 | use App\Http\Controllers\Admin\MsgAnswersController; | 26 | use App\Http\Controllers\Admin\MsgAnswersController; |
27 | use App\Http\Controllers\Admin\GroupsController; | 27 | use App\Http\Controllers\Admin\GroupsController; |
28 | use App\Http\Controllers\PagesController; | 28 | use App\Http\Controllers\PagesController; |
29 | use Illuminate\Support\Facades\Storage; | 29 | use Illuminate\Support\Facades\Storage; |
30 | use App\Http\Controllers\EmployerController; | 30 | use App\Http\Controllers\EmployerController; |
31 | use App\Http\Controllers\CompanyController as FrontCompanyController; | 31 | use App\Http\Controllers\CompanyController as FrontCompanyController; |
32 | 32 | ||
33 | 33 | ||
34 | /* | 34 | /* |
35 | |-------------------------------------------------------------------------- | 35 | |-------------------------------------------------------------------------- |
36 | | Web Routes | 36 | | Web Routes |
37 | |-------------------------------------------------------------------------- | 37 | |-------------------------------------------------------------------------- |
38 | | | 38 | | |
39 | | Here is where you can register web routes for your application. These | 39 | | Here is where you can register web routes for your application. These |
40 | | routes are loaded by the RouteServiceProvider within a group which | 40 | | routes are loaded by the RouteServiceProvider within a group which |
41 | | contains the "web" middleware group. Now create something great! | 41 | | contains the "web" middleware group. Now create something great! |
42 | | | 42 | | |
43 | */ | 43 | */ |
44 | /* | 44 | /* |
45 | Route::get('/', function () { | 45 | Route::get('/', function () { |
46 | return view('welcome'); | 46 | return view('welcome'); |
47 | })->name('index'); | 47 | })->name('index'); |
48 | */ | 48 | */ |
49 | Route::get('/', [MainController::class, 'index'])->name('index'); | 49 | Route::get('/', [MainController::class, 'index'])->name('index'); |
50 | 50 | ||
51 | //Роуты авторизации, регистрации, восстановления, аутентификации | 51 | //Роуты авторизации, регистрации, восстановления, аутентификации |
52 | Auth::routes(['verify' => true]); | 52 | Auth::routes(['verify' => true]); |
53 | 53 | ||
54 | // роуты регистрации, авторизации, восстановления пароля, верификации почты | 54 | // роуты регистрации, авторизации, восстановления пароля, верификации почты |
55 | /*Route::group([ | 55 | /*Route::group([ |
56 | 'as' => 'auth.', //имя маршрута, например auth.index | 56 | 'as' => 'auth.', //имя маршрута, например auth.index |
57 | 'prefix' => 'auth', // префикс маршрута, например, auth/index | 57 | 'prefix' => 'auth', // префикс маршрута, например, auth/index |
58 | ], function () { | 58 | ], function () { |
59 | //форма регистрации | 59 | //форма регистрации |
60 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 60 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
61 | 61 | ||
62 | //создание пользователя | 62 | //создание пользователя |
63 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 63 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
64 | 64 | ||
65 | //форма входа авторизации | 65 | //форма входа авторизации |
66 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 66 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
67 | 67 | ||
68 | //аутентификация | 68 | //аутентификация |
69 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); | 69 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); |
70 | 70 | ||
71 | //выход | 71 | //выход |
72 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 72 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
73 | 73 | ||
74 | //форма ввода адреса почты | 74 | //форма ввода адреса почты |
75 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); | 75 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); |
76 | 76 | ||
77 | //письмо на почту | 77 | //письмо на почту |
78 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); | 78 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); |
79 | 79 | ||
80 | //форма восстановления пароля | 80 | //форма восстановления пароля |
81 | Route::get('reset-password/token/{token}/email/{email}', | 81 | Route::get('reset-password/token/{token}/email/{email}', |
82 | [ResetPasswordController::class, 'form'] | 82 | [ResetPasswordController::class, 'form'] |
83 | )->name('reset-form'); | 83 | )->name('reset-form'); |
84 | 84 | ||
85 | //восстановление пароля | 85 | //восстановление пароля |
86 | Route::post('reset-password', | 86 | Route::post('reset-password', |
87 | [ResetPasswordController::class, 'reset'] | 87 | [ResetPasswordController::class, 'reset'] |
88 | )->name('reset-password'); | 88 | )->name('reset-password'); |
89 | 89 | ||
90 | //сообщение о необходимости проверки адреса почты | 90 | //сообщение о необходимости проверки адреса почты |
91 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); | 91 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); |
92 | 92 | ||
93 | //подтверждение адреса почты нового пользователя | 93 | //подтверждение адреса почты нового пользователя |
94 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) | 94 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) |
95 | ->where('token', '[a-f0-9]{32}') | 95 | ->where('token', '[a-f0-9]{32}') |
96 | ->where('id', '[0-9]+') | 96 | ->where('id', '[0-9]+') |
97 | ->name('verify-email'); | 97 | ->name('verify-email'); |
98 | });*/ | 98 | });*/ |
99 | 99 | ||
100 | //Личный кабинет пользователя | 100 | //Личный кабинет пользователя |
101 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 101 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
102 | 102 | ||
103 | /* | 103 | /* |
104 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 104 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
105 | $user = User::where('email',$request->input('email'))->first(); | 105 | $user = User::where('email',$request->input('email'))->first(); |
106 | 106 | ||
107 | $user->sendEmailVerificationNotification(); | 107 | $user->sendEmailVerificationNotification(); |
108 | 108 | ||
109 | return 'your response'; | 109 | return 'your response'; |
110 | })->middleware('throttle:6,1')->name('verification.resend'); | 110 | })->middleware('throttle:6,1')->name('verification.resend'); |
111 | */ | 111 | */ |
112 | 112 | ||
113 | // Авторизация, регистрация в админку | 113 | // Авторизация, регистрация в админку |
114 | Route::group([ | 114 | Route::group([ |
115 | 'as' => 'admin.', // имя маршрута, например auth.index | 115 | 'as' => 'admin.', // имя маршрута, например auth.index |
116 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 116 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
117 | 'middleware' => ['guest'], | 117 | 'middleware' => ['guest'], |
118 | ], function () { | 118 | ], function () { |
119 | // Форма регистрации | 119 | // Форма регистрации |
120 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 120 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
121 | // Создание пользователя | 121 | // Создание пользователя |
122 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 122 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
123 | 123 | ||
124 | //Форма входа | 124 | //Форма входа |
125 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 125 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
126 | 126 | ||
127 | // аутентификация | 127 | // аутентификация |
128 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 128 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
129 | 129 | ||
130 | }); | 130 | }); |
131 | 131 | ||
132 | // Личный кабинет админки | 132 | // Личный кабинет админки |
133 | Route::group([ | 133 | Route::group([ |
134 | 'as' => 'admin.', // имя маршрута, например auth.index | 134 | 'as' => 'admin.', // имя маршрута, например auth.index |
135 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 135 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
136 | 'middleware' => ['auth'], ['admin'], | 136 | 'middleware' => ['auth'], ['admin'], |
137 | ], function() { | 137 | ], function() { |
138 | 138 | ||
139 | // выход | 139 | // выход |
140 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 140 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
141 | 141 | ||
142 | // кабинет главная страница | 142 | // кабинет главная страница |
143 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 143 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
144 | 144 | ||
145 | // кабинет профиль админа - форма | 145 | // кабинет профиль админа - форма |
146 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 146 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
147 | // кабинет профиль админа - сохранение формы | 147 | // кабинет профиль админа - сохранение формы |
148 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 148 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
149 | 149 | ||
150 | //кабинет сообщения админа | 150 | //кабинет сообщения админа |
151 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); | 151 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); |
152 | 152 | ||
153 | 153 | ||
154 | // кабинет профиль - форма пароли | 154 | // кабинет профиль - форма пароли |
155 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 155 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
156 | // кабинет профиль - сохранение формы пароля | 156 | // кабинет профиль - сохранение формы пароля |
157 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 157 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
158 | 158 | ||
159 | 159 | ||
160 | // кабинет профиль пользователя - форма | 160 | // кабинет профиль пользователя - форма |
161 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 161 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
162 | // кабинет профиль пользователя - сохранение формы | 162 | // кабинет профиль пользователя - сохранение формы |
163 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 163 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
164 | 164 | ||
165 | // кабинет профиль работодатель - форма | 165 | // кабинет профиль работодатель - форма |
166 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 166 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
167 | // кабинет профиль работодатель - сохранение формы | 167 | // кабинет профиль работодатель - сохранение формы |
168 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 168 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
169 | // кабинет удаление профиль работодателя и юзера | 169 | // кабинет удаление профиль работодателя и юзера |
170 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); | 170 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); |
171 | 171 | ||
172 | // кабинет профиль работник - форма | 172 | // кабинет профиль работник - форма |
173 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); | 173 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); |
174 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); | 174 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); |
175 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); | 175 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); |
176 | // кабинет профиль работник - сохранение формы | 176 | // кабинет профиль работник - сохранение формы |
177 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); | 177 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); |
178 | 178 | ||
179 | // Медиа | 179 | // Медиа |
180 | Route::get('media', [MediaController::class, 'index'])->name('media'); | 180 | Route::get('media', [MediaController::class, 'index'])->name('media'); |
181 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); | 181 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); |
182 | 182 | ||
183 | // кабинет настройки сайта - форма | 183 | // кабинет настройки сайта - форма |
184 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 184 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
185 | // кабинет настройки сайта сохранение формы | 185 | // кабинет настройки сайта сохранение формы |
186 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 186 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
187 | 187 | ||
188 | // кабинет - пользователи | 188 | // кабинет - пользователи |
189 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 189 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
190 | 190 | ||
191 | // кабинет - пользователи | 191 | // кабинет - пользователи |
192 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 192 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
193 | 193 | ||
194 | // кабинет - работодатели | 194 | // кабинет - работодатели |
195 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 195 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
196 | 196 | ||
197 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); | 197 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); |
198 | 198 | ||
199 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); | 199 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); |
200 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); | 200 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); |
201 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); | 201 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); |
202 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); | 202 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); |
203 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); | 203 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); |
204 | 204 | ||
205 | // кабинет - соискатели | 205 | // кабинет - соискатели |
206 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 206 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
207 | 207 | ||
208 | // кабинет - база данных | 208 | // кабинет - база данных |
209 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); | 209 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); |
210 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); | 210 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); |
211 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); | 211 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); |
212 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); | 212 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); |
213 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); | 213 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); |
214 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); | 214 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); |
215 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); | 215 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); |
216 | 216 | ||
217 | // кабинет - вакансии | 217 | // кабинет - вакансии |
218 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 218 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
219 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); | 219 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); |
220 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); | 220 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); |
221 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); | 221 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); |
222 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); | 222 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); |
223 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); | 223 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); |
224 | 224 | ||
225 | // Редактирование должности в вакансии | 225 | // Редактирование должности в вакансии |
226 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); | 226 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); |
227 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); | 227 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); |
228 | 228 | ||
229 | 229 | ||
230 | // кабинет - категории | 230 | // кабинет - категории |
231 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 231 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
232 | /* | 232 | /* |
233 | * CRUD-операции над Справочником Категории | 233 | * CRUD-операции над Справочником Категории |
234 | */ | 234 | */ |
235 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 235 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
236 | 236 | ||
237 | // CRUD-операции над справочником Категории для работодателей | 237 | // CRUD-операции над справочником Категории для работодателей |
238 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); | 238 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); |
239 | 239 | ||
240 | // CRUD-операции над справочником Образование | 240 | // CRUD-операции над справочником Образование |
241 | Route::resource('education', EducationController::class, ['except' => ['show']]); | 241 | Route::resource('education', EducationController::class, ['except' => ['show']]); |
242 | 242 | ||
243 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); | 243 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); |
244 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); | 244 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); |
245 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); | 245 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); |
246 | 246 | ||
247 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); | 247 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); |
248 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); | 248 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); |
249 | 249 | ||
250 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); | 250 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); |
251 | 251 | ||
252 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 252 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
253 | /* | 253 | /* |
254 | * кабинет - CRUD-операции по справочнику должности | 254 | * кабинет - CRUD-операции по справочнику должности |
255 | * | 255 | * |
256 | */ | 256 | */ |
257 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 257 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
258 | 258 | ||
259 | // кабинет - сообщения (чтение чужих) | 259 | // кабинет - сообщения (чтение чужих) |
260 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 260 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
261 | // кабинет - просмотр сообщения чужого (чтение) | 261 | // кабинет - просмотр сообщения чужого (чтение) |
262 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); | 262 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); |
263 | 263 | ||
264 | // кабинет - сообщения (админские) | 264 | // кабинет - сообщения (админские) |
265 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); | 265 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); |
266 | // кабинет - сообщения (админские) | 266 | // кабинет - сообщения (админские) |
267 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); | 267 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); |
268 | // кабинет - sql - конструкция запросов | 268 | // кабинет - sql - конструкция запросов |
269 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); | 269 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); |
270 | 270 | ||
271 | /* | 271 | /* |
272 | * Расписанный подход в описании каждой директорий групп пользователей. | 272 | * Расписанный подход в описании каждой директорий групп пользователей. |
273 | */ | 273 | */ |
274 | // кабинет - группы пользователей | 274 | // кабинет - группы пользователей |
275 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 275 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
276 | // кабинет - добавление форма группы пользователей | 276 | // кабинет - добавление форма группы пользователей |
277 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 277 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
278 | // кабинет - сохранение формы группы пользователей | 278 | // кабинет - сохранение формы группы пользователей |
279 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 279 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
280 | // кабинет - редактирование форма группы пользователей | 280 | // кабинет - редактирование форма группы пользователей |
281 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 281 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
282 | // кабинет - сохранение редактированной формы группы пользователей | 282 | // кабинет - сохранение редактированной формы группы пользователей |
283 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 283 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
284 | // кабинет - удаление группы пользователей | 284 | // кабинет - удаление группы пользователей |
285 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 285 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
286 | 286 | ||
287 | 287 | ||
288 | // кабинет - список админов | 288 | // кабинет - список админов |
289 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 289 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
290 | 290 | ||
291 | 291 | ||
292 | /////редактор////// кабинет - редактор сайта//////////////////////// | 292 | /////редактор////// кабинет - редактор сайта//////////////////////// |
293 | Route::get('editor-site', function() { | 293 | Route::get('editor-site', function() { |
294 | return view('admin.editor.index'); | 294 | return view('admin.editor.index'); |
295 | })->name('editor-site'); | 295 | })->name('editor-site'); |
296 | 296 | ||
297 | 297 | ||
298 | // кабинет - редактор шапки-футера сайта | 298 | // кабинет - редактор шапки-футера сайта |
299 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 299 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
300 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); | 300 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); |
301 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); | 301 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); |
302 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); | 302 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); |
303 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); | 303 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); |
304 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); | 304 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); |
305 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); | 305 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); |
306 | 306 | ||
307 | 307 | ||
308 | // кабинет - редактор должности на главной | 308 | // кабинет - редактор должности на главной |
309 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 309 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
310 | 310 | ||
311 | // кабинет - редактор работодатели на главной | 311 | // кабинет - редактор работодатели на главной |
312 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 312 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
313 | 313 | ||
314 | 314 | ||
315 | // кабинет - редактор seo-сайта | 315 | // кабинет - редактор seo-сайта |
316 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 316 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
317 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); | 317 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); |
318 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); | 318 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); |
319 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); | 319 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); |
320 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); | 320 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); |
321 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); | 321 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); |
322 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); | 322 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); |
323 | 323 | ||
324 | 324 | ||
325 | // кабинет - редактор страниц | 325 | // кабинет - редактор страниц |
326 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 326 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
327 | // кабинет - добавление страницы | 327 | // кабинет - добавление страницы |
328 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | 328 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); |
329 | // кабинет - сохранение формы страницы | 329 | // кабинет - сохранение формы страницы |
330 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | 330 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); |
331 | // кабинет - редактирование форма страницы | 331 | // кабинет - редактирование форма страницы |
332 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | 332 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); |
333 | // кабинет - сохранение редактированной формы страницы | 333 | // кабинет - сохранение редактированной формы страницы |
334 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | 334 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); |
335 | // кабинет - удаление страницы | 335 | // кабинет - удаление страницы |
336 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | 336 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); |
337 | 337 | ||
338 | 338 | ||
339 | // кабинет - реклама сайта | 339 | // кабинет - реклама сайта |
340 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 340 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
341 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); | 341 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); |
342 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); | 342 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); |
343 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); | 343 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); |
344 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); | 344 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); |
345 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); | 345 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); |
346 | //////////////////////////////////////////////////////////////////////// | 346 | //////////////////////////////////////////////////////////////////////// |
347 | 347 | ||
348 | 348 | ||
349 | // кабинет - отзывы о работодателе для модерации | 349 | // кабинет - отзывы о работодателе для модерации |
350 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 350 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
351 | 351 | ||
352 | // Общая страница статистики | 352 | // Общая страница статистики |
353 | Route::get('statics', function () { | 353 | Route::get('statics', function () { |
354 | return view('admin.static.index'); | 354 | return view('admin.static.index'); |
355 | })->name('statics'); | 355 | })->name('statics'); |
356 | 356 | ||
357 | // кабинет - статистика работников | 357 | // кабинет - статистика работников |
358 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 358 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
359 | 359 | ||
360 | // кабинет - статистика вакансий работодателя | 360 | // кабинет - статистика вакансий работодателя |
361 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 361 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
362 | 362 | ||
363 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 363 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
364 | /* | 364 | /* |
365 | * CRUD-операции над справочником дипломы и документы | 365 | * CRUD-операции над справочником дипломы и документы |
366 | */ | 366 | */ |
367 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 367 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
368 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 368 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
369 | 369 | ||
370 | // кабинет - роли пользователя | 370 | // кабинет - роли пользователя |
371 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 371 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
372 | 372 | ||
373 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); | 373 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); |
374 | 374 | ||
375 | Route::get('logs', function() { | 375 | Route::get('logs', function() { |
376 | $files = Storage::files('logs/laravel.log'); | 376 | $files = Storage::files('logs/laravel.log'); |
377 | })->name('logs'); | 377 | })->name('logs'); |
378 | }); | 378 | }); |
379 | 379 | ||
380 | // Инструментальные страницы | 380 | // Инструментальные страницы |
381 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); | 381 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); |
382 | 382 | ||
383 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); | 383 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); |
384 | 384 | ||
385 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); | 385 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); |
386 | 386 | ||
387 | // Страницы с произвольным контентом | 387 | // Страницы с произвольным контентом |
388 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); | 388 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); |
389 | 389 | ||
390 | // Публичные страницы соискателя | 390 | // Публичные страницы соискателя |
391 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); | 391 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); |
392 | 392 | ||
393 | //Страница вакансии | 393 | //Страница вакансии |
394 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); | 394 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); |
395 | 395 | ||
396 | //Вакансии | 396 | //Вакансии |
397 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); | 397 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); |
398 | 398 | ||
399 | //Вакансии поиск на главной | 399 | //Вакансии поиск на главной |
400 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); | 400 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); |
401 | 401 | ||
402 | //Вакансии категория детальная | 402 | //Вакансии категория детальная |
403 | Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); | 403 | Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); |
404 | 404 | ||
405 | //Детальная страница вакансии - работодателя | 405 | //Детальная страница вакансии - работодателя |
406 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); | 406 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); |
407 | 407 | ||
408 | //Судоходные компании | 408 | //Судоходные компании |
409 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); | 409 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); |
410 | 410 | ||
411 | //Детальная инфа о компании | 411 | //Детальная инфа о компании |
412 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); | 412 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); |
413 | 413 | ||
414 | //Образование | 414 | //Образование |
415 | Route::get('education', [MainController::class, 'education'])->name('education'); | 415 | Route::get('education', [MainController::class, 'education'])->name('education'); |
416 | 416 | ||
417 | //Новости | 417 | //Новости |
418 | Route::get('news', [MainController::class, 'news'])->name('news'); | 418 | Route::get('news', [MainController::class, 'news'])->name('news'); |
419 | 419 | ||
420 | //Контакты | 420 | //Контакты |
421 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); | 421 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); |
422 | 422 | ||
423 | //База резюме | 423 | //База резюме |
424 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); | 424 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); |
425 | 425 | ||
426 | //Анкета соискателя | 426 | //Анкета соискателя |
427 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); | 427 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); |
428 | 428 | ||
429 | //Скачать резюме | 429 | //Скачать резюме |
430 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); | 430 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); |
431 | 431 | ||
432 | //Вход в кабинет | 432 | //Вход в кабинет |
433 | Route::get('login', [MainController::class, 'input_login'])->name('login'); | 433 | Route::get('login', [MainController::class, 'input_login'])->name('login'); |
434 | 434 | ||
435 | // Выход из кабинета | 435 | // Выход из кабинета |
436 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); | 436 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); |
437 | 437 | ||
438 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); | 438 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); |
439 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); | 439 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); |
440 | 440 | ||
441 | // Борьба против колорадских жуков и их геориевской ленточки | 441 | // Борьба против колорадских жуков |
442 | Route::get('clear_cookie', function() { | 442 | Route::get('clear_cookie', function() { |
443 | \App\Classes\Cookies_vacancy::clear_vacancy(); | 443 | \App\Classes\Cookies_vacancy::clear_vacancy(); |
444 | return redirect()->route('index'); | 444 | return redirect()->route('index'); |
445 | })->name('clear_cookie'); | 445 | })->name('clear_cookie'); |
446 | 446 | ||
447 | // Личный кабинет работника | 447 | // Личный кабинет работника |
448 | Route::group([ | 448 | Route::group([ |
449 | 'as' => 'worker.', // имя маршрута, например auth.index | 449 | 'as' => 'worker.', // имя маршрута, например auth.index |
450 | 'prefix' => 'worker', // префикс маршрута, например auth/index | 450 | 'prefix' => 'worker', // префикс маршрута, например auth/index |
451 | 'middleware' => ['auth'], ['is_worker'], | 451 | 'middleware' => ['auth'], ['is_worker'], |
452 | ], function() { | 452 | ], function() { |
453 | // 1 страница - Моя анкета | 453 | // 1 страница - Моя анкета |
454 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); | 454 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); |
455 | Route::get('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); | 455 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); |
456 | 456 | ||
457 | // 2 страница - Сообщения | 457 | // 2 страница - Сообщения |
458 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); | 458 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); |
459 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); | 459 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); |
460 | // 3 страница - Избранные вакансии | 460 | // 3 страница - Избранные вакансии |
461 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); | 461 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); |
462 | // Продолжение борьбы против колорадов - избранные вакансии | 462 | // Продолжение борьбы против колорадов - избранные вакансии |
463 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); | 463 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); |
464 | 464 | ||
465 | // 4 страница - Сменить пароль | 465 | // 4 страница - Сменить пароль |
466 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); | 466 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); |
467 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); | 467 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); |
468 | 468 | ||
469 | // 5 страница - Удалить профиль | 469 | // 5 страница - Удалить профиль |
470 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); | 470 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); |
471 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); | 471 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); |
472 | 472 | ||
473 | // 6 страница - Выход | 473 | // Резюме -pdf |
474 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); | ||
474 | 475 | ||
476 | // Поднятие анкеты | ||
477 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); | ||
478 | |||
479 | // Добавление сертификата | ||
480 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); | ||
481 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); | ||
482 | |||
483 | // Добавление документа-диплома | ||
484 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); | ||
485 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); | ||
486 | |||
487 | // Добавление стандартного диплома | ||
488 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); | ||
489 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); | ||
490 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); | ||
491 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); | ||
492 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); | ||
493 | |||
494 | // Отправка сообщения работодателю от соискателя | ||
495 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); | ||
475 | }); | 496 | }); |
476 | 497 | ||
477 | // Личный кабинет работодателя | 498 | // Личный кабинет работодателя |
478 | Route::group([ | 499 | Route::group([ |
479 | 'as' => 'employer.', // имя маршрута, например auth.index | 500 | 'as' => 'employer.', // имя маршрута, например auth.index |
480 | 'prefix' => 'employer', // префикс маршрута, например auth/index | 501 | 'prefix' => 'employer', // префикс маршрута, например auth/index |
481 | 'middleware' => ['auth'], !['is_worker'], | 502 | 'middleware' => ['auth'], !['is_worker'], |
482 | ], function() { | 503 | ], function() { |
483 | // 1 страница - Профиль | 504 | // 1 страница - Профиль |
484 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); | 505 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); |
485 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); | 506 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
486 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); | 507 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); |
487 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); | 508 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); |
488 | 509 | ||
489 | // 2 страница - Добавление вакансий | 510 | // 2 страница - Добавление вакансий |
490 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | 511 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); |
491 | Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save'); | 512 | Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save'); |
492 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); | 513 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); |
493 | 514 | ||
494 | // 3 страница - Мои вакансии | 515 | // 3 страница - Мои вакансии |
495 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); | 516 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); |
496 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 517 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
497 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); | 518 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); |
498 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); | 519 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); |
499 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); | 520 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); |
500 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 521 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
501 | 522 | ||
502 | // 4 страница - Отклики на вакансии | 523 | // 4 страница - Отклики на вакансии |
503 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | 524 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); |
504 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); | 525 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); |
505 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); | 526 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); |
506 | 527 | ||
507 | // 5 страница - Сообщения | 528 | // 5 страница - Сообщения |
508 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | 529 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); |
509 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); | 530 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); |
510 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); | 531 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); |
511 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); | 532 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); |
512 | 533 | ||
513 | // 6 страница - Избранный | 534 | // 6 страница - Избранный |
514 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | 535 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); |
515 | 536 | ||
516 | //7 страница - База данных | 537 | //7 страница - База данных |
517 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | 538 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); |
518 | 539 | ||
519 | //8 страница - База резюме | 540 | //8 страница - База резюме |
520 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); | 541 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); |
521 | 542 | ||
522 | // 9 рассылка сообщений | 543 | // 9 рассылка сообщений |
523 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); | 544 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); |
524 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); | 545 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); |
525 | 546 | ||
526 | // 10 страница FAQ вопросы | 547 | // 10 страница FAQ вопросы |
527 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | 548 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); |
528 | 549 | ||
529 | // 11 страница - Настройка уведомлений | 550 | // 11 страница - Настройка уведомлений |
530 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | 551 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); |
531 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); | 552 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); |
532 | 553 | ||
533 | // 12 страница - Сменить пароль | 554 | // 12 страница - Сменить пароль |
534 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); | 555 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); |
535 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); | 556 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); |
536 | 557 | ||
537 | // 13 страница - Удаление профиля | 558 | // 13 страница - Удаление профиля |
538 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); | 559 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); |
539 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); | 560 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); |
540 | }); | 561 | }); |
541 | 562 |