Commit f46e3cd1e4bc62fadc9ca3dd4b156b61f5ab7314
Exists in
master
Коммит четверг
Showing 37 changed files Inline Diff
- app/Http/Controllers/Admin/Ad_EmployersController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/VacancyRequestEdit.php
- app/Http/Requests/VacansiaRequiest.php
- app/Models/ResponseWork.php
- database/migrations/2024_03_11_141704_create_response_works_table.php
- resources/views/admin/ad_employers/add.blade.php
- resources/views/admin/ad_employers/edit.blade.php
- resources/views/admin/reclames/index.blade.php
- resources/views/ajax/list_category.blade.php
- resources/views/ajax/list_vacancies.blade.php
- resources/views/detail_new.blade.php
- resources/views/employers/add_vacancy.blade.php
- resources/views/employers/edit_vacancy.blade.php
- resources/views/employers/list_vacancy.blade.php
- resources/views/employers/menu.blade.php
- resources/views/errors/404.blade.php
- resources/views/index.blade.php
- resources/views/info_company_new.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/layout/pdf.blade.php
- resources/views/list_vacancies.blade.php
- resources/views/modals/send_admin.blade.php
- resources/views/modals/send_employer_new.blade.php
- resources/views/modals/send_login.blade.php
- resources/views/modals/send_message_noaut.blade.php
- resources/views/modals/send_message_noaut2.blade.php
- resources/views/modals/send_worker_new.blade.php
- resources/views/news-list.blade.php
- resources/views/paginate.blade.php
- resources/views/vacance-item.blade.php
- resources/views/vacancies.blade.php
- resources/views/worker.blade.php
- resources/views/workers/cabinet.blade.php
- routes/web.php
app/Http/Controllers/Admin/Ad_EmployersController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Models\Ad_employer; | 6 | use App\Models\Ad_employer; |
7 | use App\Models\Ad_jobs; | 7 | use App\Models\Ad_jobs; |
8 | use App\Models\Category; | ||
8 | use App\Models\Employer; | 9 | use App\Models\Employer; |
9 | use App\Models\Job_title; | 10 | use App\Models\Job_title; |
10 | use App\Models\User; | 11 | use App\Models\User; |
11 | use Carbon\Carbon; | 12 | use Carbon\Carbon; |
12 | use Illuminate\Http\Request; | 13 | use Illuminate\Http\Request; |
13 | use Illuminate\Support\Facades\Auth; | 14 | use Illuminate\Support\Facades\Auth; |
14 | use Illuminate\Support\Facades\Validator; | 15 | use Illuminate\Support\Facades\Validator; |
15 | 16 | ||
16 | class Ad_EmployersController extends Controller | 17 | class Ad_EmployersController extends Controller |
17 | { | 18 | { |
18 | /** | 19 | /** |
19 | * Display a listing of the resource. | 20 | * Display a listing of the resource. |
20 | * | 21 | * |
21 | * @return \Illuminate\Http\Response | 22 | * @return \Illuminate\Http\Response |
22 | */ | 23 | */ |
23 | public function index(Request $request) | 24 | public function index(Request $request) |
24 | { | 25 | { |
25 | $title = 'Админка - Вакансии работодателей'; | 26 | $title = 'Админка - Вакансии работодателей'; |
26 | if ($request->ajax()) { | 27 | if ($request->ajax()) { |
27 | $params = $request->all(); | 28 | $params = $request->all(); |
28 | foreach ($params['data'] as $item) { | 29 | foreach ($params['data'] as $item) { |
29 | $emp = Ad_employer::find($item); | 30 | $emp = Ad_employer::find($item); |
30 | $emp->updated_at = Carbon::now(); | 31 | $emp->updated_at = Carbon::now(); |
31 | $emp->save(); | 32 | $emp->save(); |
32 | } | 33 | } |
33 | } | 34 | } |
34 | 35 | ||
35 | $select_job = Job_title::query()->active()->get(); | 36 | $select_job = Job_title::query()->active()->get(); |
36 | $all_ad = Ad_employer::with('employer')->with('jobs') | 37 | $all_ad = Ad_employer::with('employer')->with('jobs') |
37 | ->where('is_remove', '0')->get()->count(); | 38 | ->where('is_remove', '0')->get()->count(); |
38 | 39 | ||
39 | $ad_employers = Ad_employer::where('is_remove', '0'); | 40 | $ad_employers = Ad_employer::where('is_remove', '0'); |
40 | 41 | ||
41 | $find_job = ""; | 42 | $find_job = ""; |
42 | if (isset($request->category_job)) { | 43 | if (isset($request->category_job)) { |
43 | if ($request->category_job != 'Все вакансии') { | 44 | if ($request->category_job != 'Все вакансии') { |
44 | $find_job = $request->category_job; | 45 | $find_job = $request->category_job; |
45 | $ad_employers = $ad_employers->WhereHas('jobs', function($query) use ($find_job){ | 46 | $ad_employers = $ad_employers->WhereHas('jobs', function($query) use ($find_job){ |
46 | return $query->where('name', 'LIKE', '%'.$find_job.'%'); | 47 | return $query->where('name', 'LIKE', '%'.$find_job.'%'); |
47 | }); | 48 | }); |
48 | } | 49 | } |
49 | } else { | 50 | } else { |
50 | $ad_employers = $ad_employers->with('jobs'); | 51 | $ad_employers = $ad_employers->with('jobs'); |
51 | } | 52 | } |
52 | 53 | ||
53 | $find_key = ""; | 54 | $find_key = ""; |
54 | if (isset($request->find)) { | 55 | if (isset($request->find)) { |
55 | $find_key = $request->find; | 56 | $find_key = $request->find; |
56 | $ad_employers = $ad_employers->whereHas('employer', function($query) use($find_key) { | 57 | $ad_employers = $ad_employers->whereHas('employer', function($query) use($find_key) { |
57 | $query->Where('name_company', 'LIKE', "%$find_key%"); | 58 | $query->Where('name_company', 'LIKE', "%$find_key%"); |
58 | $query->orWhere('name', 'LIKE', "%$find_key%"); | 59 | $query->orWhere('name', 'LIKE', "%$find_key%"); |
59 | }); | 60 | }); |
60 | 61 | ||
61 | } else { | 62 | } else { |
62 | $ad_employers = $ad_employers->with('employer'); | 63 | $ad_employers = $ad_employers->with('employer'); |
63 | } | 64 | } |
64 | 65 | ||
65 | $ad_employers = $ad_employers->OrderBy('updated_at', 'desc')->paginate(15); | 66 | $ad_employers = $ad_employers->OrderBy('updated_at', 'desc')->paginate(15); |
66 | 67 | ||
67 | if ($request->ajax()) { | 68 | if ($request->ajax()) { |
68 | return view('admin.ad_employers.index_ajax', compact('ad_employers', 'params')); | 69 | return view('admin.ad_employers.index_ajax', compact('ad_employers', 'params')); |
69 | } else { | 70 | } else { |
70 | // конец | 71 | // конец |
71 | return view('admin.ad_employers.index', compact('ad_employers', | 72 | return view('admin.ad_employers.index', compact('ad_employers', |
72 | 'title', | 73 | 'title', |
73 | 'all_ad', | 74 | 'all_ad', |
74 | 'find_job', | 75 | 'find_job', |
75 | 'find_key', | 76 | 'find_key', |
76 | 'select_job')); | 77 | 'select_job')); |
77 | } | 78 | } |
78 | } | 79 | } |
79 | 80 | ||
80 | /** | ||
81 | * Show the form for creating a new resource | ||
82 | * @return \Illuminate\Http\Response | ||
83 | */ | ||
84 | public function create() | 81 | public function create() |
85 | { | 82 | { |
86 | $job_titles = Job_title::query()->active()->get(); | 83 | $job_titles = Job_title::query()->active()->get(); |
87 | return view('admin.ad_employers.add', compact('job_titles')); | 84 | $categories = Category::query()->get(); |
85 | return view('admin.ad_employers.add', compact('job_titles', 'categories')); | ||
88 | } | 86 | } |
89 | 87 | ||
90 | /** | 88 | /** |
91 | * Store a newly created resource in storage. | 89 | * Store a newly created resource in storage. |
92 | * | 90 | * |
93 | * @param \Illuminate\Http\Request $request | 91 | * @param \Illuminate\Http\Request $request |
94 | * @return \Illuminate\Http\Response | 92 | * @return \Illuminate\Http\Response |
95 | */ | 93 | */ |
96 | public function store(Request $request) | 94 | public function store(Request $request) |
97 | { | 95 | { |
98 | $params = $request->all(); | 96 | $params = $request->all(); |
99 | unset($params->position_work); | 97 | unset($params->position_work); |
100 | $rules = [ | 98 | $rules = [ |
101 | 'name' => 'required|min:3', | 99 | 'name' => 'required|min:3', |
102 | ]; | 100 | ]; |
103 | $messages = [ | 101 | $messages = [ |
104 | 'required' => 'Укажите обязательное поле', | 102 | 'required' => 'Укажите обязательное поле', |
105 | ]; | 103 | ]; |
106 | $validator = Validator::make($params, $rules, $messages); | 104 | $validator = Validator::make($params, $rules, $messages); |
107 | 105 | ||
108 | if ($validator->fails()) { | 106 | if ($validator->fails()) { |
109 | return redirect()->route('admin.add-ad-employers') | 107 | return redirect()->route('admin.add-ad-employers') |
110 | ->withErrors($validator); | 108 | ->withErrors($validator); |
111 | } else { | 109 | } else { |
112 | $ad_employer = new Ad_employer(); | 110 | $ad_employer = new Ad_employer(); |
113 | $params['employer_id'] = 1; | 111 | $params['employer_id'] = 1; |
114 | $data_ad = $ad_employer->create($params); | 112 | $data_ad = $ad_employer->create($params); |
115 | $data_ad->jobs()->sync($request->position_work); | 113 | $data_ad->jobs()->sync($request->position_work); |
116 | //$ad_employer->jobs()->sync($request->position_work); | 114 | //$ad_employer->jobs()->sync($request->position_work); |
117 | 115 | ||
118 | 116 | ||
119 | return redirect()->route('admin.ad-employers') | 117 | return redirect()->route('admin.ad-employers') |
120 | ->with('success', 'Данные были успешно сохранены'); | 118 | ->with('success', 'Данные были успешно сохранены'); |
121 | } | 119 | } |
122 | return redirect()->route('admin.ad-employers'); | 120 | return redirect()->route('admin.ad-employers'); |
123 | } | 121 | } |
124 | 122 | ||
125 | /** | 123 | /** |
126 | * Display the specified resource. | 124 | * Display the specified resource. |
127 | * | 125 | * |
128 | * @param \App\Models\Ad_employer $ad_employer | 126 | * @param \App\Models\Ad_employer $ad_employer |
129 | * @return \Illuminate\Http\Response | 127 | * @return \Illuminate\Http\Response |
130 | */ | 128 | */ |
131 | public function show(Ad_employer $ad_employer) | 129 | public function show(Ad_employer $ad_employer) |
132 | { | 130 | { |
133 | // | 131 | // |
134 | } | 132 | } |
135 | 133 | ||
136 | /** | 134 | /** |
137 | * Show the form for editing the specified resource. | 135 | * Show the form for editing the specified resource. |
138 | * | 136 | * |
139 | * @param \App\Models\Ad_employer $ad_employer | 137 | * @param \App\Models\Ad_employer $ad_employer |
140 | * @return \Illuminate\Http\Response | 138 | * @return \Illuminate\Http\Response |
141 | */ | 139 | */ |
142 | public function edit(Ad_employer $ad_employer) | 140 | public function edit(Ad_employer $ad_employer) |
143 | { | 141 | { |
144 | $sel = Array(); | 142 | $sel = Array(); |
145 | $job_titles = Job_title::active()->get(); | 143 | $job_titles = Job_title::active()->get(); |
146 | 144 | $categories = Category::query()->get(); | |
147 | foreach ($ad_employer->jobs as $j) { | 145 | foreach ($ad_employer->jobs as $j) { |
148 | $sel[] = $j->id; | 146 | $sel[] = $j->id; |
149 | } | 147 | } |
150 | 148 | ||
151 | return view('admin.ad_employers.edit', compact('ad_employer', 'job_titles', 'sel')); | 149 | return view('admin.ad_employers.edit', compact('ad_employer', 'categories', 'job_titles', 'sel')); |
152 | } | 150 | } |
153 | 151 | ||
154 | /** | 152 | /** |
155 | * Update the specified resource in storage. | 153 | * Update the specified resource in storage. |
156 | * | 154 | * |
157 | * @param \Illuminate\Http\Request $request | 155 | * @param \Illuminate\Http\Request $request |
158 | * @param \App\Models\Ad_employer $ad_employer | 156 | * @param \App\Models\Ad_employer $ad_employer |
159 | * @return \Illuminate\Http\Response | 157 | * @return \Illuminate\Http\Response |
160 | */ | 158 | */ |
161 | public function update(Request $request, Ad_employer $ad_employer) | 159 | public function update(Request $request, Ad_employer $ad_employer) |
162 | { | 160 | { |
163 | $params = $request->all(); | 161 | $params = $request->all(); |
164 | unset($params->position_work); | 162 | unset($params->position_work); |
165 | $rules = [ | 163 | $rules = [ |
166 | 'name' => 'required|min:3', | 164 | 'name' => 'required|min:3', |
167 | ]; | 165 | ]; |
168 | $messages = [ | 166 | $messages = [ |
169 | 'required' => 'Укажите обязательное поле', | 167 | 'required' => 'Укажите обязательное поле', |
170 | ]; | 168 | ]; |
171 | $validator = Validator::make($params, $rules, $messages); | 169 | $validator = Validator::make($params, $rules, $messages); |
172 | 170 | ||
173 | if ($validator->fails()) { | 171 | if ($validator->fails()) { |
174 | return redirect()->route('admin.edit-ad-employers', ['ad_employer' => $ad_employer->id]) | 172 | return redirect()->route('admin.edit-ad-employers', ['ad_employer' => $ad_employer->id]) |
175 | ->withErrors($validator); | 173 | ->withErrors($validator); |
176 | } else { | 174 | } else { |
177 | $ad_employer->update($params); | 175 | $ad_employer->update($params); |
178 | $ad_employer->jobs()->sync($request->position_work); | 176 | $ad_employer->jobs()->sync($request->position_work); |
179 | 177 | ||
180 | return redirect()->route('admin.ad-employers') | 178 | return redirect()->route('admin.ad-employers') |
181 | ->with('success', 'Данные были успешно сохранены'); | 179 | ->with('success', 'Данные были успешно сохранены'); |
182 | } | 180 | } |
183 | 181 | ||
184 | return redirect()->route('admin.ad-employers'); | 182 | return redirect()->route('admin.ad-employers'); |
185 | } | 183 | } |
186 | 184 | ||
187 | public function destroy(Ad_employer $ad_employer) | 185 | public function destroy(Ad_employer $ad_employer) |
188 | { | 186 | { |
189 | $ad_employer->is_remove = 1; | 187 | $ad_employer->is_remove = 1; |
190 | $ad_employer->save(); | 188 | $ad_employer->save(); |
191 | 189 | ||
192 | return redirect()->route('admin.ad-employers'); | 190 | return redirect()->route('admin.ad-employers'); |
193 | } | 191 | } |
194 | 192 | ||
195 | 193 | ||
196 | public function update_ad_jobs(Ad_jobs $ad_jobs, Request $request) { | 194 | public function update_ad_jobs(Ad_jobs $ad_jobs, Request $request) { |
197 | $params = $request->all(); | 195 | $params = $request->all(); |
198 | 196 | ||
199 | $rules = [ | 197 | $rules = [ |
200 | 'min_salary' => 'required|integer|min:0|max:99999999', | 198 | 'min_salary' => 'required|integer|min:0|max:99999999', |
201 | 'max_salary' => 'required|integer|min:0|max:99999999', | 199 | 'max_salary' => 'required|integer|min:0|max:99999999', |
202 | 200 | ||
203 | ]; | 201 | ]; |
204 | $messages = [ | 202 | $messages = [ |
205 | 'required' => 'Укажите обязательное поле', | 203 | 'required' => 'Укажите обязательное поле', |
206 | 'min' => 'Минимальное значение 0', | 204 | 'min' => 'Минимальное значение 0', |
207 | 'max' => 'Превышено максимальное значение', | 205 | 'max' => 'Превышено максимальное значение', |
208 | 'integer' => 'Это должно быть числом' | 206 | 'integer' => 'Это должно быть числом' |
209 | ]; | 207 | ]; |
210 | 208 | ||
211 | $validator = Validator::make($params, $rules, $messages); | 209 | $validator = Validator::make($params, $rules, $messages); |
212 | 210 | ||
213 | if ($validator->fails()) { | 211 | if ($validator->fails()) { |
214 | return redirect()->route('admin.edit_jobs', ['ad_jobs' => $ad_jobs->id]) | 212 | return redirect()->route('admin.edit_jobs', ['ad_jobs' => $ad_jobs->id]) |
215 | ->withErrors($validator); | 213 | ->withErrors($validator); |
216 | } else { | 214 | } else { |
217 | $ad_jobs->update($params); | 215 | $ad_jobs->update($params); |
218 | return redirect()->route('admin.ad-employers') | 216 | return redirect()->route('admin.ad-employers') |
219 | ->with('success', 'Данные были успешно сохранены'); | 217 | ->with('success', 'Данные были успешно сохранены'); |
220 | } | 218 | } |
221 | 219 | ||
222 | return redirect()->route('admin.ad-employers'); | 220 | return redirect()->route('admin.ad-employers'); |
223 | } | 221 | } |
224 | 222 | ||
225 | public function edit_jobs(Ad_jobs $ad_jobs) { | 223 | public function edit_jobs(Ad_jobs $ad_jobs) { |
226 | return view('admin.ad_jobs.edit', compact('ad_jobs')); | 224 | return view('admin.ad_jobs.edit', compact('ad_jobs')); |
227 | } | 225 | } |
app/Http/Controllers/EmployerController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\RusDate; | 5 | use App\Classes\RusDate; |
6 | use App\Classes\Tools; | 6 | use App\Classes\Tools; |
7 | use App\Http\Requests\FlotRequest; | 7 | use App\Http\Requests\FlotRequest; |
8 | use App\Http\Requests\MessagesRequiest; | 8 | use App\Http\Requests\MessagesRequiest; |
9 | use App\Http\Requests\VacancyRequestEdit; | ||
9 | use App\Http\Requests\VacansiaRequiest; | 10 | use App\Http\Requests\VacansiaRequiest; |
10 | use App\Mail\MailSotrudnichestvo; | 11 | use App\Mail\MailSotrudnichestvo; |
11 | use App\Mail\SendAllMessages; | 12 | use App\Mail\SendAllMessages; |
12 | use App\Models\Ad_employer; | 13 | use App\Models\Ad_employer; |
13 | use App\Models\Ad_jobs; | 14 | use App\Models\Ad_jobs; |
14 | use App\Models\ad_response; | 15 | use App\Models\ad_response; |
15 | use App\Models\Category; | 16 | use App\Models\Category; |
16 | use App\Models\Education; | 17 | use App\Models\Education; |
17 | use App\Models\Employer; | 18 | use App\Models\Employer; |
18 | use App\Models\employers_main; | 19 | use App\Models\employers_main; |
19 | use App\Models\Flot; | 20 | use App\Models\Flot; |
20 | use App\Models\Job_title; | 21 | use App\Models\Job_title; |
21 | use App\Models\Message; | 22 | use App\Models\Message; |
22 | use App\Models\Worker; | 23 | use App\Models\Worker; |
23 | use Carbon\Carbon; | 24 | use Carbon\Carbon; |
24 | use Illuminate\Auth\Events\Registered; | 25 | use Illuminate\Auth\Events\Registered; |
25 | use Illuminate\Database\Eloquent\Builder; | 26 | use Illuminate\Database\Eloquent\Builder; |
26 | use Illuminate\Database\Eloquent\Model; | 27 | use Illuminate\Database\Eloquent\Model; |
27 | use Illuminate\Foundation\Auth\User; | 28 | use Illuminate\Foundation\Auth\User; |
28 | use Illuminate\Http\Request; | 29 | use Illuminate\Http\Request; |
29 | use Illuminate\Support\Facades\Auth; | 30 | use Illuminate\Support\Facades\Auth; |
30 | use Illuminate\Support\Facades\Hash; | 31 | use Illuminate\Support\Facades\Hash; |
31 | use Illuminate\Support\Facades\Mail; | 32 | use Illuminate\Support\Facades\Mail; |
32 | use Illuminate\Support\Facades\Storage; | 33 | use Illuminate\Support\Facades\Storage; |
33 | use App\Models\User as User_Model; | 34 | use App\Models\User as User_Model; |
34 | use Illuminate\Support\Facades\Validator; | 35 | use Illuminate\Support\Facades\Validator; |
35 | 36 | ||
36 | class EmployerController extends Controller | 37 | class EmployerController extends Controller |
37 | { | 38 | { |
38 | public function vacancie($vacancy, Request $request) { | 39 | public function vacancie($vacancy, Request $request) { |
39 | $title = 'Заголовок вакансии'; | 40 | $title = 'Заголовок вакансии'; |
40 | 41 | ||
41 | $Query = Ad_employer::with('jobs')-> | 42 | $Query = Ad_employer::with('jobs')-> |
42 | with('cat')-> | 43 | with('cat')-> |
43 | with('employer')-> | 44 | with('employer')-> |
44 | with('jobs_code')-> | 45 | with('jobs_code')-> |
45 | select('ad_employers.*')-> | 46 | select('ad_employers.*')-> |
46 | where('id', '=', $vacancy)->get(); | 47 | where('id', '=', $vacancy)->get(); |
47 | 48 | ||
48 | $title = $Query[0]->name; | 49 | $title = $Query[0]->name; |
49 | if ($request->ajax()) { | 50 | if ($request->ajax()) { |
50 | return view('ajax.vacance-item', compact('Query')); | 51 | return view('ajax.vacance-item', compact('Query')); |
51 | } else { | 52 | } else { |
52 | return view('vacance-item', compact('title', 'Query')); | 53 | return view('vacance-item', compact('title', 'Query')); |
53 | } | 54 | } |
54 | } | 55 | } |
55 | 56 | ||
56 | public function logout() { | 57 | public function logout() { |
57 | Auth::logout(); | 58 | Auth::logout(); |
58 | return redirect()->route('index') | 59 | return redirect()->route('index') |
59 | ->with('success', 'Вы вышли из личного кабинета'); | 60 | ->with('success', 'Вы вышли из личного кабинета'); |
60 | } | 61 | } |
61 | 62 | ||
62 | public function cabinet() { | 63 | public function cabinet() { |
63 | $id = Auth()->user()->id; | 64 | $id = Auth()->user()->id; |
64 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 65 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
65 | WhereHas('users', | 66 | WhereHas('users', |
66 | function (Builder $query) use ($id) {$query->Where('id', $id); | 67 | function (Builder $query) use ($id) {$query->Where('id', $id); |
67 | })->get(); | 68 | })->get(); |
68 | return view('employers.cabinet45', compact('Employer')); | 69 | return view('employers.cabinet45', compact('Employer')); |
69 | } | 70 | } |
70 | 71 | ||
71 | public function cabinet_save(Employer $Employer, Request $request) { | 72 | public function cabinet_save(Employer $Employer, Request $request) { |
72 | $params = $request->all(); | 73 | $params = $request->all(); |
73 | $params['user_id'] = Auth()->user()->id; | 74 | $params['user_id'] = Auth()->user()->id; |
74 | $id = $Employer->id; | 75 | $id = $Employer->id; |
75 | 76 | ||
76 | if ($request->has('logo')) { | 77 | if ($request->has('logo')) { |
77 | if (!empty($Employer->logo)) { | 78 | if (!empty($Employer->logo)) { |
78 | Storage::delete($Employer->logo); | 79 | Storage::delete($Employer->logo); |
79 | } | 80 | } |
80 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); | 81 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); |
81 | } | 82 | } |
82 | 83 | ||
83 | $Employer->update($params); | 84 | $Employer->update($params); |
84 | 85 | ||
85 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); | 86 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); |
86 | } | 87 | } |
87 | 88 | ||
88 | public function save_add_flot(FlotRequest $request) { | 89 | public function save_add_flot(FlotRequest $request) { |
89 | // отмена | 90 | // отмена |
90 | $params = $request->all(); | 91 | $params = $request->all(); |
91 | 92 | ||
92 | if ($request->has('image')) { | 93 | if ($request->has('image')) { |
93 | $params['image'] = $request->file('image')->store("flot", 'public'); | 94 | $params['image'] = $request->file('image')->store("flot", 'public'); |
94 | } | 95 | } |
95 | Flot::create($params); | 96 | Flot::create($params); |
96 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); | 97 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); |
97 | return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен'); | 98 | return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен'); |
98 | } | 99 | } |
99 | 100 | ||
100 | public function delete_flot(Flot $Flot) { | 101 | public function delete_flot(Flot $Flot) { |
101 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); | 102 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); |
102 | 103 | ||
103 | if (isset($Flot->id)) $Flot->delete(); | 104 | if (isset($Flot->id)) $Flot->delete(); |
104 | return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален'); | 105 | return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален'); |
105 | } | 106 | } |
106 | 107 | ||
107 | // Форма добавления вакансий | 108 | // Форма добавления вакансий |
108 | public function cabinet_vacancie() { | 109 | public function cabinet_vacancie() { |
109 | $id = Auth()->user()->id; | 110 | $id = Auth()->user()->id; |
110 | $jobs = Job_title::query()->OrderBy('name')->get(); | 111 | $jobs = Job_title::query()->OrderBy('name')->get(); |
111 | 112 | $categories = Category::query()->get(); | |
112 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 113 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
113 | WhereHas('users', | 114 | WhereHas('users', |
114 | function (Builder $query) use ($id) {$query->Where('id', $id); | 115 | function (Builder $query) use ($id) {$query->Where('id', $id); |
115 | })->get(); | 116 | })->get(); |
116 | 117 | ||
117 | return view('employers.add_vacancy', compact('Employer', 'jobs')); | 118 | return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories')); |
118 | } | 119 | } |
119 | 120 | ||
120 | // Сохранение вакансии | 121 | // Сохранение вакансии |
121 | public function cabinet_vacancy_save1(VacansiaRequiest $request) { | 122 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { |
122 | $params = $request->all(); | 123 | $params = $request->all(); |
123 | $jobs['min_salary'] = $params['min_salary']; | 124 | $jobs['min_salary'] = $params['min_salary']; |
124 | $jobs['max_salary'] = $params['max_salary']; | 125 | $jobs['max_salary'] = $params['max_salary']; |
125 | $jobs['flot'] = $params['flot']; | 126 | $jobs['flot'] = $params['flot']; |
126 | $jobs['power'] = $params['power']; | 127 | $jobs['power'] = $params['power']; |
127 | $jobs['sytki'] = $params['sytki']; | 128 | $jobs['sytki'] = $params['sytki']; |
128 | $jobs['start'] = $params['start']; | 129 | $jobs['start'] = $params['start']; |
129 | $jobs['job_title_id'] = $params['job_title_id']; | 130 | $jobs['job_title_id'] = $params['job_title_id']; |
130 | $jobs['description'] = $params['description']; | 131 | $jobs['description'] = $params['description']; |
131 | $jobs['region'] = $params['city']; | 132 | $jobs['region'] = $params['city']; |
132 | unset($params['min_salary']); | 133 | unset($params['min_salary']); |
133 | unset($params['max_salary']); | 134 | unset($params['max_salary']); |
134 | unset($params['flot']); | 135 | unset($params['flot']); |
135 | unset($params['sytki']); | 136 | unset($params['sytki']); |
136 | unset($params['start']); | 137 | unset($params['start']); |
137 | unset($params['job_title_id']); | 138 | unset($params['job_title_id']); |
138 | unset($params['description']); | 139 | unset($params['description']); |
139 | 140 | ||
140 | $id = Ad_employer::create($params)->id; | 141 | $id = Ad_employer::create($params)->id; |
141 | $jobs['ad_employer_id'] = $id; | 142 | $jobs['ad_employer_id'] = $id; |
142 | Ad_jobs::create($jobs); | 143 | Ad_jobs::create($jobs); |
143 | 144 | ||
144 | return redirect()->route('employer.cabinet_vacancie'); | 145 | return redirect()->route('employer.cabinet_vacancie'); |
145 | } | 146 | } |
146 | 147 | ||
147 | // Список вакансий | 148 | // Список вакансий |
148 | public function vacancy_list(Request $request) { | 149 | public function vacancy_list(Request $request) { |
149 | $id = Auth()->user()->id; | 150 | $id = Auth()->user()->id; |
150 | $Employer = Employer::query()->where('user_id', $id)->first(); | 151 | $Employer = Employer::query()->where('user_id', $id)->first(); |
151 | $vacancy_list = Ad_employer::query()->where('employer_id', $Employer->id)->OrderByDESC('updated_at')->get(); | 152 | $vacancy_list = Ad_employer::query()->where('employer_id', $Employer->id)->OrderByDESC('updated_at')->get(); |
152 | 153 | ||
153 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); | 154 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); |
154 | } | 155 | } |
155 | 156 | ||
156 | // Карточка вакансии | 157 | // Карточка вакансии |
157 | public function vacancy_edit(Ad_employer $ad_employer) { | 158 | public function vacancy_edit(Ad_employer $ad_employer) { |
158 | $id = Auth()->user()->id; | 159 | $id = Auth()->user()->id; |
159 | $jobs = Job_title::query()->OrderBy('name')->get(); | 160 | $jobs = Job_title::query()->OrderBy('name')->get(); |
160 | $Employer = Employer::query()->where('user_id', $id)->first(); | 161 | $categories = Category::query()->get(); |
162 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | ||
163 | where('user_id', $id)->first(); | ||
164 | |||
165 | return view('employers.edit_vacancy', compact('ad_employer', 'categories','Employer', 'jobs')); | ||
166 | } | ||
161 | 167 | ||
162 | return view('employers.edit_vacancy', compact('ad_employer', 'Employer', 'jobs')); | 168 | // Сохранение-редактирование записи |
169 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { | ||
170 | $all = $request->all(); | ||
171 | |||
172 | $ad_employer->update($all); | ||
173 | |||
174 | return redirect()->route('employer.vacancy_list'); | ||
163 | } | 175 | } |
164 | 176 | ||
165 | // Сохранение карточки вакансии | 177 | // Сохранение карточки вакансии |
166 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { | 178 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { |
167 | $all = $request->all(); | 179 | $all = $request->all(); |
168 | $ad_employer->update($all); | 180 | $ad_employer->update($all); |
169 | return redirect()->route('employer.cabinet_vacancie'); | 181 | return redirect()->route('employer.cabinet_vacancie'); |
170 | } | 182 | } |
171 | 183 | ||
172 | // Удаление карточки вакансии | 184 | // Удаление карточки вакансии |
173 | public function vacancy_delete(Ad_employer $ad_employer) { | 185 | public function vacancy_delete(Ad_employer $ad_employer) { |
174 | $ad_employer->delete(); | 186 | $ad_employer->delete(); |
175 | 187 | ||
176 | return redirect()->route('employer.vacancy_list') | 188 | return redirect()->route('employer.vacancy_list') |
177 | ->with('success', 'Данные были успешно сохранены'); | 189 | ->with('success', 'Данные были успешно сохранены'); |
178 | } | 190 | } |
179 | 191 | ||
180 | // Обновление даты | 192 | // Обновление даты |
181 | public function vacancy_up(Ad_employer $ad_employer) { | 193 | public function vacancy_up(Ad_employer $ad_employer) { |
182 | $up = date('m/d/Y h:i:s', time());; | 194 | $up = date('m/d/Y h:i:s', time());; |
183 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 195 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
184 | $vac_emp->updated_at = $up; | 196 | $vac_emp->updated_at = $up; |
185 | $vac_emp->save(); | 197 | $vac_emp->save(); |
186 | 198 | ||
187 | return redirect()->route('employer.vacancy_list'); | 199 | return redirect()->route('employer.vacancy_list'); |
188 | // начало конца | 200 | // начало конца |
189 | } | 201 | } |
190 | 202 | ||
191 | //Видимость вакансии | 203 | //Видимость вакансии |
192 | public function vacancy_eye(Ad_employer $ad_employer, $status) { | 204 | public function vacancy_eye(Ad_employer $ad_employer, $status) { |
193 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 205 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
194 | $vac_emp->active_is = $status; | 206 | $vac_emp->active_is = $status; |
195 | $vac_emp->save(); | 207 | $vac_emp->save(); |
196 | 208 | ||
197 | return redirect()->route('employer.vacancy_list'); | 209 | return redirect()->route('employer.vacancy_list'); |
198 | } | 210 | } |
199 | 211 | ||
200 | //Вакансия редактирования (шаблон) | 212 | //Вакансия редактирования (шаблон) |
201 | public function vacancy_update(Ad_employer $id) { | 213 | public function vacancy_update(Ad_employer $id) { |
202 | 214 | ||
203 | } | 215 | } |
204 | 216 | ||
205 | //Отклики на вакансию - лист | 217 | //Отклики на вакансию - лист |
206 | public function answers(Employer $employer, Request $request) { | 218 | public function answers(Employer $employer, Request $request) { |
207 | $user_id = Auth()->user()->id; | 219 | $user_id = Auth()->user()->id; |
208 | $answer = Ad_employer::query()->where('employer_id', $employer->id); | 220 | $answer = Ad_employer::query()->where('employer_id', $employer->id); |
209 | if ($request->has('search')) { | 221 | if ($request->has('search')) { |
210 | $search = trim($request->get('search')); | 222 | $search = trim($request->get('search')); |
211 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); | 223 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); |
212 | } | 224 | } |
213 | 225 | ||
214 | $answer = $answer->with('response')->get(); | 226 | $answer = $answer->with('response')->get(); |
215 | 227 | ||
216 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); | 228 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); |
217 | } | 229 | } |
218 | 230 | ||
219 | //Обновление статуса | 231 | //Обновление статуса |
220 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { | 232 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { |
221 | $ad_response->update(Array('flag' => $flag)); | 233 | $ad_response->update(Array('flag' => $flag)); |
222 | return redirect()->route('employer.answers', ['employer' => $employer->id]); | 234 | return redirect()->route('employer.answers', ['employer' => $employer->id]); |
223 | } | 235 | } |
224 | 236 | ||
225 | //Страницы сообщений список | 237 | //Страницы сообщений список |
226 | public function messages($type_message) { | 238 | public function messages($type_message) { |
227 | $user_id = Auth()->user()->id; | 239 | $user_id = Auth()->user()->id; |
228 | 240 | ||
229 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 241 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
230 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 242 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
231 | 243 | ||
232 | $messages_output = Message::query()->with('vacancies')-> | 244 | $messages_output = Message::query()->with('vacancies')-> |
233 | with('user_to')->where('user_id', $user_id)-> | 245 | with('user_to')->where('user_id', $user_id)-> |
234 | OrderByDesc('created_at'); | 246 | OrderByDesc('created_at'); |
235 | 247 | ||
236 | 248 | ||
237 | $count_input = $messages_input->count(); | 249 | $count_input = $messages_input->count(); |
238 | $count_output = $messages_output->count(); | 250 | $count_output = $messages_output->count(); |
239 | 251 | ||
240 | if ($type_message == 'input') { | 252 | if ($type_message == 'input') { |
241 | $messages = $messages_input->paginate(15); | 253 | $messages = $messages_input->paginate(15); |
242 | } | 254 | } |
243 | 255 | ||
244 | if ($type_message == 'output') { | 256 | if ($type_message == 'output') { |
245 | $messages = $messages_output->paginate(15); | 257 | $messages = $messages_output->paginate(15); |
246 | } | 258 | } |
247 | 259 | ||
248 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 260 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
249 | } | 261 | } |
250 | 262 | ||
251 | // Диалог между пользователями | 263 | // Диалог между пользователями |
252 | public function dialog(User_Model $user1, User_Model $user2) { | 264 | public function dialog(User_Model $user1, User_Model $user2) { |
253 | if (isset($user2->id)) { | 265 | if (isset($user2->id)) { |
254 | $companion = User_Model::query()->with('workers')-> | 266 | $companion = User_Model::query()->with('workers')-> |
255 | with('employers')-> | 267 | with('employers')-> |
256 | where('id', $user2->id)->first(); | 268 | where('id', $user2->id)->first(); |
257 | } | 269 | } |
258 | 270 | ||
259 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { | 271 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { |
260 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 272 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
261 | })->orWhere(function($query) use ($user1, $user2) { | 273 | })->orWhere(function($query) use ($user1, $user2) { |
262 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 274 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
263 | })->OrderBy('created_at')->get(); | 275 | })->OrderBy('created_at')->get(); |
264 | 276 | ||
265 | $id_vac = null; | 277 | $id_vac = null; |
266 | foreach ($Messages as $it) { | 278 | foreach ($Messages as $it) { |
267 | if (isset($it->response)) { | 279 | if (isset($it->response)) { |
268 | foreach ($it->response as $r) { | 280 | foreach ($it->response as $r) { |
269 | if (isset($r->ad_employer_id)) { | 281 | if (isset($r->ad_employer_id)) { |
270 | $id_vac = $r->ad_employer_id; | 282 | $id_vac = $r->ad_employer_id; |
271 | break; | 283 | break; |
272 | } | 284 | } |
273 | } | 285 | } |
274 | } | 286 | } |
275 | if (!is_null($id_vac)) break; | 287 | if (!is_null($id_vac)) break; |
276 | } | 288 | } |
277 | 289 | ||
278 | $ad_employer = null; | 290 | $ad_employer = null; |
279 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 291 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
280 | $sender = $user1; | 292 | $sender = $user1; |
281 | 293 | ||
282 | return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); | 294 | return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); |
283 | } | 295 | } |
284 | 296 | ||
285 | // Регистрация работодателя | 297 | // Регистрация работодателя |
286 | public function register_employer(Request $request) { | 298 | public function register_employer(Request $request) { |
287 | $params = $request->all(); | 299 | $params = $request->all(); |
288 | 300 | ||
289 | $rules = [ | 301 | $rules = [ |
290 | 'surname' => ['required', 'string', 'max:255'], | 302 | 'surname' => ['required', 'string', 'max:255'], |
291 | 'name_man' => ['required', 'string', 'max:255'], | 303 | 'name_man' => ['required', 'string', 'max:255'], |
292 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 304 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
293 | 'name_company' => ['required', 'string', 'max:255'], | 305 | 'name_company' => ['required', 'string', 'max:255'], |
294 | 'password' => ['required', 'string', 'min:8'], | 306 | 'password' => ['required', 'string', 'min:8'], |
295 | ]; | 307 | ]; |
296 | 308 | ||
297 | 309 | ||
298 | $messages = [ | 310 | $messages = [ |
299 | 'required' => 'Укажите обязательное поле', | 311 | 'required' => 'Укажите обязательное поле', |
300 | 'min' => [ | 312 | 'min' => [ |
301 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 313 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
302 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 314 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
303 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 315 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
304 | ], | 316 | ], |
305 | 'max' => [ | 317 | 'max' => [ |
306 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 318 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
307 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 319 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
308 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 320 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
309 | ] | 321 | ] |
310 | ]; | 322 | ]; |
311 | 323 | ||
312 | if ($request->get('password') !== $request->get('confirmed')){ | 324 | if ($request->get('password') !== $request->get('confirmed')){ |
313 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 325 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
314 | } | 326 | } |
315 | 327 | ||
316 | $validator = Validator::make($request->all(), $rules, $messages); | 328 | $validator = Validator::make($request->all(), $rules, $messages); |
317 | 329 | ||
318 | if ($validator->fails()) { | 330 | if ($validator->fails()) { |
319 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 331 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
320 | } else { | 332 | } else { |
321 | $user = $this->create($params); | 333 | $user = $this->create($params); |
322 | event(new Registered($user)); | 334 | event(new Registered($user)); |
323 | 335 | ||
324 | Auth::guard()->login($user); | 336 | Auth::guard()->login($user); |
325 | } | 337 | } |
326 | if ($user) { | 338 | if ($user) { |
327 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; | 339 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; |
328 | } else { | 340 | } else { |
329 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 341 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
330 | } | 342 | } |
331 | } | 343 | } |
332 | 344 | ||
333 | // Создание пользователя | 345 | // Создание пользователя |
334 | protected function create(array $data) | 346 | protected function create(array $data) |
335 | { | 347 | { |
336 | $Use = new User_Model(); | 348 | $Use = new User_Model(); |
337 | $Code_user = $Use->create([ | 349 | $Code_user = $Use->create([ |
338 | 'name' => $data['surname']." ".$data['name_man'], | 350 | 'name' => $data['surname']." ".$data['name_man'], |
339 | 'name_man' => $data['name_man'], | 351 | 'name_man' => $data['name_man'], |
340 | 'surname' => $data['surname'], | 352 | 'surname' => $data['surname'], |
341 | 'surname2' => $data['surname2'], | 353 | 'surname2' => $data['surname2'], |
342 | 'subscribe_email' => $data['email'], | 354 | 'subscribe_email' => $data['email'], |
343 | 'email' => $data['email'], | 355 | 'email' => $data['email'], |
344 | 'telephone' => $data['telephone'], | 356 | 'telephone' => $data['telephone'], |
345 | 'is_worker' => 0, | 357 | 'is_worker' => 0, |
346 | 'password' => Hash::make($data['password']), | 358 | 'password' => Hash::make($data['password']), |
347 | 'pubpassword' => base64_encode($data['password']), | 359 | 'pubpassword' => base64_encode($data['password']), |
348 | 'email_verified_at' => Carbon::now() | 360 | 'email_verified_at' => Carbon::now() |
349 | ]); | 361 | ]); |
350 | 362 | ||
351 | if ($Code_user->id > 0) { | 363 | if ($Code_user->id > 0) { |
352 | $Employer = new Employer(); | 364 | $Employer = new Employer(); |
353 | $Employer->user_id = $Code_user->id; | 365 | $Employer->user_id = $Code_user->id; |
354 | $Employer->name_company = $data['name_company']; | 366 | $Employer->name_company = $data['name_company']; |
355 | $Employer->email = $data['email']; | 367 | $Employer->email = $data['email']; |
356 | $Employer->telephone = $data['telephone']; | 368 | $Employer->telephone = $data['telephone']; |
357 | $Employer->code = Tools::generator_id(10); | 369 | $Employer->code = Tools::generator_id(10); |
358 | $Employer->save(); | 370 | $Employer->save(); |
359 | 371 | ||
360 | return $Code_user; | 372 | return $Code_user; |
361 | } | 373 | } |
362 | } | 374 | } |
363 | 375 | ||
364 | // Отправка сообщения от работодателя | 376 | // Отправка сообщения от работодателя |
365 | public function send_message(MessagesRequiest $request) { | 377 | public function send_message(MessagesRequiest $request) { |
366 | $params = $request->all(); | 378 | $params = $request->all(); |
367 | dd($params); | 379 | dd($params); |
368 | $user1 = $params['user_id']; | 380 | $user1 = $params['user_id']; |
369 | $user2 = $params['to_user_id']; | 381 | $user2 = $params['to_user_id']; |
370 | 382 | ||
371 | if ($request->has('file')) { | 383 | if ($request->has('file')) { |
372 | $params['file'] = $request->file('file')->store("messages", 'public'); | 384 | $params['file'] = $request->file('file')->store("messages", 'public'); |
373 | } | 385 | } |
374 | Message::create($params); | 386 | Message::create($params); |
375 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 387 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
376 | } | 388 | } |
377 | 389 | ||
378 | public function test123(Request $request) { | 390 | public function test123(Request $request) { |
379 | $params = $request->all(); | 391 | $params = $request->all(); |
380 | $user1 = $params['user_id']; | 392 | $user1 = $params['user_id']; |
381 | $user2 = $params['to_user_id']; | 393 | $user2 = $params['to_user_id']; |
382 | 394 | ||
383 | $rules = [ | 395 | $rules = [ |
384 | 'text' => 'required|min:1|max:150000', | 396 | 'text' => 'required|min:1|max:150000', |
385 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' | 397 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' |
386 | ]; | 398 | ]; |
387 | $messages = [ | 399 | $messages = [ |
388 | 'required' => 'Укажите обязательное поле', | 400 | 'required' => 'Укажите обязательное поле', |
389 | 'min' => [ | 401 | 'min' => [ |
390 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 402 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
391 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 403 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
392 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 404 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
393 | ], | 405 | ], |
394 | 'max' => [ | 406 | 'max' => [ |
395 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 407 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
396 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 408 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
397 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 409 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
398 | ] | 410 | ] |
399 | ]; | 411 | ]; |
400 | 412 | ||
401 | $validator = Validator::make($request->all(), $rules, $messages); | 413 | $validator = Validator::make($request->all(), $rules, $messages); |
402 | 414 | ||
403 | if ($validator->fails()) { | 415 | if ($validator->fails()) { |
404 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) | 416 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) |
405 | ->withErrors($validator); | 417 | ->withErrors($validator); |
406 | } else { | 418 | } else { |
407 | if ($request->has('file')) { | 419 | if ($request->has('file')) { |
408 | $params['file'] = $request->file('file')->store("messages", 'public'); | 420 | $params['file'] = $request->file('file')->store("messages", 'public'); |
409 | } | 421 | } |
410 | Message::create($params); | 422 | Message::create($params); |
411 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 423 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
412 | 424 | ||
413 | } | 425 | } |
414 | } | 426 | } |
415 | 427 | ||
416 | //Избранные люди | 428 | //Избранные люди |
417 | public function favorites(Request $request) { | 429 | public function favorites(Request $request) { |
418 | if (isset($_COOKIE['favorite_worker'])) { | 430 | if (isset($_COOKIE['favorite_worker'])) { |
419 | $items = RusDate::count_item_fav(); | 431 | $items = RusDate::count_item_fav(); |
420 | $it = $_COOKIE['favorite_worker']; | 432 | $it = $_COOKIE['favorite_worker']; |
421 | $it = str_replace('"', "", $it); | 433 | $it = str_replace('"', "", $it); |
422 | $it = str_replace('[', "", $it); | 434 | $it = str_replace('[', "", $it); |
423 | $it = str_replace(']', "", $it); | 435 | $it = str_replace(']', "", $it); |
424 | $Arr = explode(",", $it); | 436 | $Arr = explode(",", $it); |
425 | } else { | 437 | } else { |
426 | $Arr = Array(); | 438 | $Arr = Array(); |
427 | } | 439 | } |
428 | 440 | ||
429 | $Workers = Worker::query(); | 441 | $Workers = Worker::query(); |
430 | $Workers = $Workers->whereIn('id', $Arr); | 442 | $Workers = $Workers->whereIn('id', $Arr); |
431 | 443 | ||
432 | if (($request->has('search')) && (!empty($request->get('search')))) { | 444 | if (($request->has('search')) && (!empty($request->get('search')))) { |
433 | $search = $request->get('search'); | 445 | $search = $request->get('search'); |
434 | 446 | ||
435 | $Workers = $Workers->WhereHas('users', | 447 | $Workers = $Workers->WhereHas('users', |
436 | function (Builder $query) use ($search) { | 448 | function (Builder $query) use ($search) { |
437 | $query->Where('surname', 'LIKE', "%$search%") | 449 | $query->Where('surname', 'LIKE', "%$search%") |
438 | ->orWhere('name_man', 'LIKE', "%$search%") | 450 | ->orWhere('name_man', 'LIKE', "%$search%") |
439 | ->orWhere('surname2', 'LIKE', "%$search%"); | 451 | ->orWhere('surname2', 'LIKE', "%$search%"); |
440 | }); | 452 | }); |
441 | } else { | 453 | } else { |
442 | $Workers = $Workers->with('users'); | 454 | $Workers = $Workers->with('users'); |
443 | } | 455 | } |
444 | 456 | ||
445 | $Workers = $Workers->get(); | 457 | $Workers = $Workers->get(); |
446 | return view('employers.favorite', compact('Workers')); | 458 | return view('employers.favorite', compact('Workers')); |
447 | } | 459 | } |
448 | 460 | ||
449 | // База данных | 461 | // База данных |
450 | public function bd(Request $request) { | 462 | public function bd(Request $request) { |
451 | // для типа BelongsTo | 463 | // для типа BelongsTo |
452 | //$documents = Document::query()->orderBy(Location::select('name') | 464 | //$documents = Document::query()->orderBy(Location::select('name') |
453 | // ->whereColumn('locations.id', 'documents.location_id') | 465 | // ->whereColumn('locations.id', 'documents.location_id') |
454 | //); | 466 | //); |
455 | 467 | ||
456 | // для типа HasOne/Many | 468 | // для типа HasOne/Many |
457 | // $documents = Document::::query()->orderBy(Location::select('name') | 469 | // $documents = Document::::query()->orderBy(Location::select('name') |
458 | // ->whereColumn('locations.document_id', 'documents.id') | 470 | // ->whereColumn('locations.document_id', 'documents.id') |
459 | //); | 471 | //); |
460 | 472 | ||
461 | $users = User_Model::query()->with('workers'); | 473 | $users = User_Model::query()->with('workers'); |
462 | if (isset($request->find)) { | 474 | if (isset($request->find)) { |
463 | $find_key = $request->find; | 475 | $find_key = $request->find; |
464 | $users = $users->where('name', 'LIKE', "%$find_key%") | 476 | $users = $users->where('name', 'LIKE', "%$find_key%") |
465 | ->orWhere('email', 'LIKE', "%$find_key%") | 477 | ->orWhere('email', 'LIKE', "%$find_key%") |
466 | ->orWhere('telephone', 'LIKE', "%$find_key%"); | 478 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
467 | } | 479 | } |
468 | 480 | ||
469 | // Данные | 481 | // Данные |
470 | $users = $users->Baseuser()-> | 482 | $users = $users->Baseuser()-> |
471 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> | 483 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> |
472 | paginate(5); | 484 | paginate(5); |
473 | 485 | ||
474 | return view('employers.bd', compact('users')); | 486 | return view('employers.bd', compact('users')); |
475 | } | 487 | } |
476 | 488 | ||
477 | //Настройка уведомлений | 489 | //Настройка уведомлений |
478 | public function subscribe() { | 490 | public function subscribe() { |
479 | return view('employers.subcribe'); | 491 | return view('employers.subcribe'); |
480 | } | 492 | } |
481 | 493 | ||
482 | //Установка уведомлений сохранение | 494 | //Установка уведомлений сохранение |
483 | public function save_subscribe(Request $request) { | 495 | public function save_subscribe(Request $request) { |
484 | dd($request->all()); | 496 | dd($request->all()); |
485 | $msg = $request->validate([ | 497 | $msg = $request->validate([ |
486 | 'subscribe_email' => 'required|email|min:5|max:255', | 498 | 'subscribe_email' => 'required|email|min:5|max:255', |
487 | ]); | 499 | ]); |
488 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); | 500 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); |
489 | } | 501 | } |
490 | 502 | ||
491 | //Сбросить форму с паролем | 503 | //Сбросить форму с паролем |
492 | public function password_reset() { | 504 | public function password_reset() { |
493 | $email = Auth()->user()->email; | 505 | $email = Auth()->user()->email; |
494 | return view('employers.password-reset', compact('email')); | 506 | return view('employers.password-reset', compact('email')); |
495 | } | 507 | } |
496 | 508 | ||
497 | //Обновление пароля | 509 | //Обновление пароля |
498 | public function new_password(Request $request) { | 510 | public function new_password(Request $request) { |
499 | $use = Auth()->user(); | 511 | $use = Auth()->user(); |
500 | $request->validate([ | 512 | $request->validate([ |
501 | 'password' => 'required|string', | 513 | 'password' => 'required|string', |
502 | 'new_password' => 'required|string', | 514 | 'new_password' => 'required|string', |
503 | 'new_password2' => 'required|string' | 515 | 'new_password2' => 'required|string' |
504 | ]); | 516 | ]); |
505 | 517 | ||
506 | if ($request->get('new_password') == $request->get('new_password2')) | 518 | if ($request->get('new_password') == $request->get('new_password2')) |
507 | if ($request->get('password') !== $request->get('new_password')) { | 519 | if ($request->get('password') !== $request->get('new_password')) { |
508 | $credentials = $request->only('email', 'password'); | 520 | $credentials = $request->only('email', 'password'); |
509 | if (Auth::attempt($credentials)) { | 521 | if (Auth::attempt($credentials)) { |
510 | 522 | ||
511 | if (!is_null($use->email_verified_at)){ | 523 | if (!is_null($use->email_verified_at)){ |
512 | 524 | ||
513 | $user_data = User_Model::find($use->id); | 525 | $user_data = User_Model::find($use->id); |
514 | $user_data->update([ | 526 | $user_data->update([ |
515 | 'password' => Hash::make($request->get('new_password')), | 527 | 'password' => Hash::make($request->get('new_password')), |
516 | 'pubpassword' => base64_encode($request->get('new_password')), | 528 | 'pubpassword' => base64_encode($request->get('new_password')), |
517 | ]); | 529 | ]); |
518 | return redirect() | 530 | return redirect() |
519 | ->route('employer.password_reset') | 531 | ->route('employer.password_reset') |
520 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 532 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
521 | } | 533 | } |
522 | 534 | ||
523 | return redirect() | 535 | return redirect() |
524 | ->route('employer.password_reset') | 536 | ->route('employer.password_reset') |
525 | ->withError('Данная учетная запись не было верифицированна!'); | 537 | ->withError('Данная учетная запись не было верифицированна!'); |
526 | } | 538 | } |
527 | } | 539 | } |
528 | 540 | ||
529 | return redirect() | 541 | return redirect() |
530 | ->route('employer.password_reset') | 542 | ->route('employer.password_reset') |
531 | ->withErrors('Не совпадение данных, обновите пароли!'); | 543 | ->withErrors('Не совпадение данных, обновите пароли!'); |
532 | } | 544 | } |
533 | 545 | ||
534 | 546 | ||
535 | 547 | ||
536 | // Форма Удаление пипла | 548 | // Форма Удаление пипла |
537 | public function delete_people() { | 549 | public function delete_people() { |
538 | $login = Auth()->user()->email; | 550 | $login = Auth()->user()->email; |
539 | return view('employers.delete_people', compact('login')); | 551 | return view('employers.delete_people', compact('login')); |
540 | } | 552 | } |
541 | 553 | ||
542 | // Удаление аккаунта | 554 | // Удаление аккаунта |
543 | public function action_delete_user(Request $request) { | 555 | public function action_delete_user(Request $request) { |
544 | $Answer = $request->all(); | 556 | $Answer = $request->all(); |
545 | $user_id = Auth()->user()->id; | 557 | $user_id = Auth()->user()->id; |
546 | $request->validate([ | 558 | $request->validate([ |
547 | 'password' => 'required|string', | 559 | 'password' => 'required|string', |
548 | ]); | 560 | ]); |
549 | 561 | ||
550 | $credentials = $request->only('email', 'password'); | 562 | $credentials = $request->only('email', 'password'); |
551 | if (Auth::attempt($credentials)) { | 563 | if (Auth::attempt($credentials)) { |
552 | Auth::logout(); | 564 | Auth::logout(); |
553 | $it = User_Model::find($user_id); | 565 | $it = User_Model::find($user_id); |
554 | //$it->delete(); | 566 | //$it->delete(); |
555 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 567 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
556 | } else { | 568 | } else { |
557 | return redirect()->route('employer.delete_people') | 569 | return redirect()->route('employer.delete_people') |
558 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 570 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
559 | } | 571 | } |
560 | } | 572 | } |
561 | 573 | ||
562 | // FAQ - Вопросы/ответы для работодателей и соискателей | 574 | // FAQ - Вопросы/ответы для работодателей и соискателей |
563 | public function faq() { | 575 | public function faq() { |
564 | return view('employers.faq'); | 576 | return view('employers.faq'); |
565 | } | 577 | } |
566 | 578 | ||
567 | // Рассылка сообщений | 579 | // Рассылка сообщений |
568 | public function send_all_messages() { | 580 | public function send_all_messages() { |
569 | return view('employers.send_all'); | 581 | return view('employers.send_all'); |
570 | } | 582 | } |
571 | 583 | ||
572 | // Отправка сообщений для информации | 584 | // Отправка сообщений для информации |
573 | public function send_all_post(Request $request) { | 585 | public function send_all_post(Request $request) { |
574 | $data = $request->all(); | 586 | $data = $request->all(); |
575 | 587 | ||
576 | $emails = User_Model::query()->where('is_worker', '1')->get(); | 588 | $emails = User_Model::query()->where('is_worker', '1')->get(); |
577 | 589 | ||
578 | foreach ($emails as $e) { | 590 | foreach ($emails as $e) { |
579 | Mail::to($e->email)->send(new SendAllMessages($data)); | 591 | Mail::to($e->email)->send(new SendAllMessages($data)); |
580 | } | 592 | } |
581 | 593 | ||
582 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); | 594 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); |
583 | } | 595 | } |
584 | 596 | ||
585 | // База резюме | 597 | // База резюме |
586 | public function bd_tupe(Request $request) { | 598 | public function bd_tupe(Request $request) { |
587 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); | 599 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); |
588 | 600 | ||
589 | return view('employers.bd_tupe', compact('Resume')); | 601 | return view('employers.bd_tupe', compact('Resume')); |
590 | } | 602 | } |
591 | 603 | ||
592 | ////////////////////////////////////////////////////////////////// | 604 | ////////////////////////////////////////////////////////////////// |
593 | // | 605 | // |
594 | // | 606 | // |
595 | // Отправил сообщение | 607 | // Отправил сообщение |
596 | // | 608 | // |
597 | // | 609 | // |
598 | // | 610 | // |
599 | // | 611 | // |
600 | ////////////////////////////////////////////////////////////////// | 612 | ////////////////////////////////////////////////////////////////// |
601 | public function new_message(Request $request) { | 613 | public function new_message(Request $request) { |
602 | $params = $request->all(); | 614 | $params = $request->all(); |
603 | 615 | ||
604 | $id = $params['_user_id']; | 616 | $id = $params['_user_id']; |
605 | $message = new Message(); | 617 | $message = new Message(); |
606 | $message->user_id = $params['_user_id']; | 618 | $message->user_id = $params['_user_id']; |
607 | $message->to_user_id = $params['_to_user_id']; | 619 | $message->to_user_id = $params['_to_user_id']; |
608 | $message->title = $params['title']; | 620 | $message->title = $params['title']; |
609 | $message->text = $params['text']; | 621 | $message->text = $params['text']; |
610 | if ($request->has('_file')) { | 622 | if ($request->has('_file')) { |
611 | $message->file = $request->file('_file')->store("worker/$id", 'public'); | 623 | $message->file = $request->file('_file')->store("worker/$id", 'public'); |
612 | } | 624 | } |
613 | $message->flag_new = 1; | 625 | $message->flag_new = 1; |
614 | $id_message = $message->save(); | 626 | $id_message = $message->save(); |
615 | 627 | ||
616 | $data['message_id'] = $id_message; | 628 | $data['message_id'] = $id_message; |
617 | $data['ad_employer_id'] = $params['_vacancy']; | 629 | $data['ad_employer_id'] = $params['_vacancy']; |
618 | $data['job_title_id'] = 0; | 630 | $data['job_title_id'] = 0; |
619 | 631 | ||
620 | $data['flag'] = 1; | 632 | $data['flag'] = 1; |
621 | $ad_responce = ad_response::create($data); | 633 | $ad_responce = ad_response::create($data); |
622 | return redirect()->route('employer.messages', ['type_message' => 'output']); | 634 | return redirect()->route('employer.messages', ['type_message' => 'output']); |
623 | } | 635 | } |
624 | 636 | ||
625 | // Восстановление пароля | 637 | // Восстановление пароля |
626 | public function repair_password(Request $request) { | 638 | public function repair_password(Request $request) { |
627 | $params = $request->get('email'); | 639 | $params = $request->get('email'); |
628 | 640 | ||
629 | 641 | ||
630 | } | 642 | } |
631 | } | 643 | } |
632 | 644 |
app/Http/Controllers/MainController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\Tools; | 5 | use App\Classes\Tools; |
6 | use App\Mail\MailRegistration; | 6 | use App\Mail\MailRegistration; |
7 | use App\Mail\MailRepair; | 7 | use App\Mail\MailRepair; |
8 | use App\Models\Ad_employer; | 8 | use App\Models\Ad_employer; |
9 | use App\Models\Category; | 9 | use App\Models\Category; |
10 | use App\Models\Education; | 10 | use App\Models\Education; |
11 | use App\Models\Employer; | 11 | use App\Models\Employer; |
12 | use App\Models\Job_title; | 12 | use App\Models\Job_title; |
13 | use App\Models\News; | 13 | use App\Models\News; |
14 | use App\Models\reclame; | 14 | use App\Models\reclame; |
15 | use App\Models\User; | 15 | use App\Models\User; |
16 | use Illuminate\Http\Request; | 16 | use Illuminate\Http\Request; |
17 | use Illuminate\Support\Facades\Auth; | 17 | use Illuminate\Support\Facades\Auth; |
18 | use Illuminate\Support\Facades\Hash; | 18 | use Illuminate\Support\Facades\Hash; |
19 | use Illuminate\Support\Facades\Mail; | 19 | use Illuminate\Support\Facades\Mail; |
20 | use Illuminate\Support\Facades\Validator; | 20 | use Illuminate\Support\Facades\Validator; |
21 | use App\Classes\StatusUser; | 21 | use App\Classes\StatusUser; |
22 | 22 | ||
23 | class MainController extends Controller | 23 | class MainController extends Controller |
24 | { | 24 | { |
25 | // Главная страница публичной части | 25 | // Главная страница публичной части |
26 | public function index() { | 26 | public function index() { |
27 | $news = News::query()->orderBy('id')->limit(6)->get(); | 27 | $news = News::query()->orderBy('id')->limit(6)->get(); |
28 | 28 | ||
29 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') | 29 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
30 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') | 30 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') |
31 | ->OrderByDesc('created_at') | 31 | ->OrderByDesc('created_at') |
32 | ->GroupBy('categories.id') | 32 | ->GroupBy('categories.id') |
33 | ->get(); | 33 | ->get(); |
34 | 34 | ||
35 | $employers = Employer::query()->orderBy('id')->limit(20)->get(); | 35 | $employers = Employer::query()->orderBy('id')->limit(20)->get(); |
36 | 36 | ||
37 | return view('index', compact('news', 'categories', 'employers')); | 37 | return view('index', compact('news', 'categories', 'employers')); |
38 | } | 38 | } |
39 | 39 | ||
40 | public function search_vacancies(Request $request) { | 40 | public function search_vacancies(Request $request) { |
41 | if ($request->has('search')) { | 41 | if ($request->has('search')) { |
42 | $search = $request->get('search'); | 42 | $search = $request->get('search'); |
43 | $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); | 43 | $job_titles = Job_title::query()->where('name', 'LIKE', "%$search%")->first(); |
44 | if (isset($job_titles->id)) | 44 | if (isset($job_titles->id)) |
45 | if ($job_titles->id > 0) | 45 | if ($job_titles->id > 0) |
46 | return redirect()->route('vacancies', ['job' => $job_titles->id]); | 46 | return redirect()->route('vacancies', ['job' => $job_titles->id]); |
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | public function vacancies(Request $request) { | 50 | public function vacancies(Request $request) { |
51 | //должности | 51 | //должности |
52 | $Job_title = Job_title::query()->orderBy('name')->get(); | 52 | $Job_title = Job_title::query()->orderBy('name')->get(); |
53 | 53 | ||
54 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') | 54 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
55 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') | 55 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') |
56 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') | 56 | ->join('ad_employers', 'ad_employers.category_id', '=', 'categories.id') |
57 | ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); | 57 | ->join('ad_jobs', 'ad_jobs.ad_employer_id', '=', 'ad_employers.id'); |
58 | 58 | ||
59 | //категории и вакансии | 59 | //категории и вакансии |
60 | if (($request->has('job')) && ($request->get('job') > 0)) { | 60 | if (($request->has('job')) && ($request->get('job') > 0)) { |
61 | $categories = $categories->Where('job_title_id', '=', $request->get('job')); | 61 | $categories = $categories->Where('job_title_id', '=', $request->get('job')); |
62 | } | ||
63 | |||
64 | $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); | ||
65 | |||
66 | if ($request->ajax()) { | ||
67 | return view('ajax.vacancies', compact('categories')); | ||
68 | } else { | ||
69 | return view('vacancies', compact('Job_title', 'categories')); | 62 | } |
70 | } | 63 | |
64 | $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); | ||
65 | |||
71 | } | 66 | if ($request->ajax()) { |
72 | 67 | return view('ajax.vacancies', compact('categories')); | |
73 | //Вакансии категория детальная | 68 | } else { |
74 | public function list_vacancies(Category $categories, Request $request) { | 69 | return view('vacancies', compact('Job_title', 'categories')); |
75 | if (isset(Auth()->user()->id)) | 70 | } |
76 | $uid = Auth()->user()->id; | 71 | } |
77 | else | 72 | |
78 | $uid = 0; | 73 | //Вакансии категория детальная |
79 | 74 | public function list_vacancies(Category $categories, Request $request) { | |
80 | $Query = Ad_employer::with('jobs')-> | 75 | if (isset(Auth()->user()->id)) |
81 | with('cat')-> | 76 | $uid = Auth()->user()->id; |
82 | with('employer')-> | 77 | else |
83 | whereHas('jobs_code', function ($query) use ($request) { | 78 | $uid = 0; |
84 | if ($request->ajax()) { | 79 | |
85 | if (null !== ($request->get('job')) && ($request->get('job') !== 0)) { | 80 | $Query = Ad_employer::with('jobs')-> |
86 | $query->where('job_title_id', $request->get('job')); | 81 | with('cat')-> |
87 | } | 82 | with('employer')-> |
88 | } | 83 | whereHas('jobs_code', function ($query) use ($request) { |
89 | }) | 84 | if ($request->ajax()) { |
90 | ->select('ad_employers.*'); | 85 | if (null !== ($request->get('job')) && ($request->get('job') !== 0)) { |
91 | 86 | $query->where('job_title_id', $request->get('job')); | |
92 | 87 | } | |
93 | 88 | } | |
94 | if ($categories->id > 0) { | 89 | }) |
95 | $Query = $Query->where('category_id', '=', $categories->id); | 90 | ->select('ad_employers.*'); |
96 | $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); | 91 | |
97 | } | 92 | |
98 | 93 | ||
99 | if ($request->get('sort')) { | 94 | if ($categories->id > 0) { |
100 | $sort = $request->get('sort'); | 95 | $Query = $Query->where('category_id', '=', $categories->id); |
101 | switch ($sort) { | 96 | $Name_categori = Category::query()->where('id', '=', $categories->id)->get(); |
102 | case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; | 97 | } |
103 | case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; | 98 | |
104 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; | 99 | if ($request->get('sort')) { |
105 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; | 100 | $sort = $request->get('sort'); |
106 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 101 | switch ($sort) { |
107 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 102 | case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; |
108 | } | 103 | case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; |
109 | } | 104 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; |
110 | 105 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; | |
111 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 106 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
112 | 107 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; | |
113 | $Query_count = $Query->count(); | 108 | } |
114 | 109 | } | |
115 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 110 | |
116 | 111 | $Job_title = Job_title::query()->OrderBy('name')->get(); | |
117 | $Reclama = reclame::query()->limit(3)->get(); | 112 | |
118 | 113 | $Query_count = $Query->count(); | |
119 | 114 | ||
120 | 115 | $Query = $Query->OrderBy('updated_at')->paginate(3); | |
121 | if ($request->ajax()) { | 116 | |
122 | return view('ajax.list_vacancies', compact('Query', | 117 | $Reclama = reclame::query()->get(); |
123 | 'Query_count', | 118 | |
124 | 'Name_categori', | 119 | |
125 | 'Reclama', | 120 | |
126 | 'categories', | 121 | if ($request->ajax()) { |
127 | 'uid')); | 122 | if ($request->has('title')) { |
128 | } else { | 123 | return view('ajax.list_category', compact( |
129 | //Вернуть все | 124 | 'Name_categori' |
130 | return view('list_vacancies', compact('Query', | 125 | )); |
131 | 'Query_count', | 126 | } else { |
132 | 'Reclama', | 127 | return view('ajax.list_vacancies', compact('Query', |
128 | 'Query_count', | ||
129 | 'Name_categori', | ||
130 | 'Reclama', | ||
131 | 'categories', | ||
132 | 'Job_title', | ||
133 | 'uid')); | ||
134 | } | ||
133 | 'Name_categori', | 135 | } else { |
134 | 'categories', | 136 | //Вернуть все |
135 | 'Job_title', | 137 | return view('list_vacancies', compact('Query', |
136 | 'uid')); | 138 | 'Query_count', |
137 | } | 139 | 'Reclama', |
138 | } | 140 | 'Name_categori', |
139 | 141 | 'categories', | |
140 | // Образование | 142 | 'Job_title', |
141 | public function education(Request $request) { | 143 | 'uid')); |
142 | $educations = Education::query(); | 144 | } |
143 | if (($request->has('search')) && (!empty($request->get('search')))) { | 145 | } |
144 | $search = trim($request->get('search')); | 146 | |
145 | $educations = $educations->where('name', 'LIKE', "%$search%"); | 147 | // Образование |
146 | } | 148 | public function education(Request $request) { |
147 | 149 | $educations = Education::query(); | |
148 | if ($request->get('sort')) { | 150 | if (($request->has('search')) && (!empty($request->get('search')))) { |
149 | $sort = $request->get('sort'); | 151 | $search = trim($request->get('search')); |
150 | switch ($sort) { | 152 | $educations = $educations->where('name', 'LIKE', "%$search%"); |
151 | case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break; | 153 | } |
152 | case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break; | 154 | |
153 | case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break; | 155 | if ($request->get('sort')) { |
154 | case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break; | 156 | $sort = $request->get('sort'); |
155 | case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break; | 157 | switch ($sort) { |
156 | default: $educations = $educations->orderBy('id')->orderby('updated_at'); break; | 158 | case 'name_up': $educations = $educations->orderBy('name')->orderBy('id'); break; |
157 | } | 159 | case 'name_down': $educations = $educations->orderByDesc('name')->orderby('id'); break; |
158 | } | 160 | case 'created_at_up': $educations = $educations->OrderBy('created_at')->orderBy('id'); break; |
159 | 161 | case 'created_at_down': $educations = $educations->orderByDesc('created_at')->orderBy('id'); break; | |
160 | $count_edu = $educations->count(); | 162 | case 'default': $educations = $educations->orderBy('id')->orderby('updated_at'); break; |
161 | $educations = $educations->paginate(6); | 163 | default: $educations = $educations->orderBy('id')->orderby('updated_at'); break; |
162 | if ($request->ajax()) { | 164 | } |
163 | return view('ajax.education', compact('educations')); | 165 | } |
164 | } else { | 166 | |
165 | return view('education', compact('educations', 'count_edu')); | 167 | $count_edu = $educations->count(); |
166 | } | 168 | $educations = $educations->paginate(6); |
167 | } | 169 | if ($request->ajax()) { |
168 | 170 | return view('ajax.education', compact('educations')); | |
169 | // Контакты | 171 | } else { |
170 | public function contacts() { | 172 | return view('education', compact('educations', 'count_edu')); |
171 | return view('contacts'); | 173 | } |
172 | } | 174 | } |
173 | 175 | ||
174 | // Вход в личный кабинет | 176 | // Контакты |
175 | public function input_login(Request $request) | 177 | public function contacts() { |
176 | { | 178 | return view('contacts'); |
177 | $params = $request->all(); | 179 | } |
178 | 180 | ||
179 | 181 | // Вход в личный кабинет | |
180 | $rules = [ | 182 | public function input_login(Request $request) |
181 | 'email' => 'required|string|email', | 183 | { |
182 | 'password' => 'required|string', | 184 | $params = $request->all(); |
183 | ]; | 185 | |
184 | 186 | ||
185 | $messages = [ | 187 | $rules = [ |
186 | 'required' => 'Укажите обязательное поле «:attribute»', | 188 | 'email' => 'required|string|email', |
187 | 'email' => 'Введите корректный email', | 189 | 'password' => 'required|string|min:3|max:25', |
188 | 'min' => [ | 190 | ]; |
189 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 191 | |
190 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 192 | $messages = [ |
191 | ], | 193 | 'required' => 'Укажите обязательное поле «:attribute»', |
192 | 'max' => [ | 194 | 'email' => 'Введите корректный email', |
193 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 195 | 'min' => [ |
194 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 196 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
195 | ], | 197 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
196 | ]; | 198 | ], |
197 | 199 | 'max' => [ | |
198 | $validator = Validator::make($request->all(), $rules, $messages); | 200 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
199 | 201 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | |
200 | 202 | ], | |
201 | if ($validator->fails()) { | 203 | ]; |
202 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); | 204 | |
203 | } else { | 205 | $validator = Validator::make($request->all(), $rules, $messages); |
204 | $credentials = $request->only('email', 'password'); | 206 | |
205 | 207 | ||
206 | if (Auth::attempt($credentials, $request->has('remember'))) { | 208 | if ($validator->fails()) { |
207 | 209 | return redirect()->route('index')->with('Error', "Email или пароль невалидный"); | |
208 | if (is_null(Auth::user()->email_verified_at)) { | 210 | } else { |
209 | Auth::logout(); | 211 | $credentials = $request->only('email', 'password'); |
210 | return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); | 212 | |
211 | } | 213 | if (Auth::attempt($credentials, $request->has('remember'))) { |
212 | 214 | ||
213 | if (Auth::user()->is_worker) { | 215 | if (is_null(Auth::user()->email_verified_at)) { |
214 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); | 216 | Auth::logout(); |
215 | } else { | 217 | return json_encode(Array("ERROR" => "Адрес почты не подтвержден")); |
216 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); | 218 | } |
217 | } | 219 | |
218 | 220 | if (Auth::user()->is_worker) { | |
219 | return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); | 221 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl())); |
220 | //->route('index') | 222 | } else { |
221 | //->with('success', 'Вы вошли в личный кабинет.'); | 223 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl())); |
222 | } else { | 224 | } |
223 | return json_encode(Array("ERROR" => "Неверный логин или пароль!")); | 225 | |
224 | } | 226 | return json_encode(Array("SUCCESS" => "Вы успешно вошли в личный кабинет")); |
225 | } | 227 | //->route('index') |
226 | } | 228 | //->with('success', 'Вы вошли в личный кабинет.'); |
227 | 229 | } else { | |
228 | // Восстановление пароля | 230 | return json_encode(Array("ERROR" => "Неверный логин или пароль!")); |
229 | public function repair_password(Request $request) { | 231 | } |
230 | $rules = [ | 232 | } |
231 | 'email' => 'required|string|email', | 233 | } |
232 | ]; | 234 | |
233 | 235 | // Восстановление пароля | |
234 | $messages = [ | 236 | public function repair_password(Request $request) { |
235 | 'required' => 'Укажите обязательное поле «:attribute»', | 237 | $rules = [ |
236 | 'email' => 'Введите корректный email', | 238 | 'email' => 'required|string|email', |
237 | 'min' => [ | 239 | ]; |
238 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 240 | |
239 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 241 | $messages = [ |
240 | ], | 242 | 'required' => 'Укажите обязательное поле «:attribute»', |
241 | 'max' => [ | 243 | 'email' => 'Введите корректный email', |
242 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 244 | 'min' => [ |
243 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 245 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
244 | ], | 246 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
245 | ]; | 247 | ], |
246 | 248 | 'max' => [ | |
247 | $validator = Validator::make($request->all(), $rules, $messages); | 249 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
248 | 250 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | |
249 | if ($validator->fails()) { | 251 | ], |
250 | return redirect()->back()->with('Error', "Email невалидный"); | 252 | ]; |
251 | } else { | 253 | |
252 | $new_password = Tools::generator_id(10); | 254 | $validator = Validator::make($request->all(), $rules, $messages); |
253 | $hash_password = Hash::make($new_password); | 255 | |
254 | $user = User::query()->where('email', $request->get('email'))->first(); | 256 | if ($validator->fails()) { |
255 | $EditRec = User::find($user->id); | 257 | return redirect()->back()->with('Error', "Email невалидный"); |
256 | $EditRec->password = $hash_password; | 258 | } else { |
257 | $EditRec->save(); | 259 | $new_password = Tools::generator_id(10); |
258 | 260 | $hash_password = Hash::make($new_password); | |
259 | foreach ([$request->get('email')] as $recipient) { | 261 | $user = User::query()->where('email', $request->get('email'))->first(); |
260 | Mail::to($recipient)->send(new MailRepair($new_password)); | 262 | $EditRec = User::find($user->id); |
261 | } | 263 | $EditRec->password = $hash_password; |
262 | return redirect()->route('index'); | 264 | $EditRec->save(); |
263 | 265 | ||
264 | } | 266 | foreach ([$request->get('email')] as $recipient) { |
265 | 267 | Mail::to($recipient)->send(new MailRepair($new_password)); | |
266 | } | 268 | } |
267 | 269 | return redirect()->route('index'); | |
268 | // Вывод новостей | 270 | |
269 | public function news(Request $request) { | 271 | } |
270 | $Query = News::query(); | 272 | |
271 | if ($request->has('search')) { | 273 | } |
272 | $search = $request->get('search'); | 274 | |
273 | $Query = $Query->where('title', 'LIKE', "%$search%")-> | 275 | // Вывод новостей |
274 | orWhere('text', 'LIKE', "%$search%"); | 276 | public function news(Request $request) { |
275 | } | 277 | $Query = News::query(); |
276 | 278 | if ($request->has('search')) { | |
277 | if ($request->ajax()) { | 279 | $search = $request->get('search'); |
278 | if ($request->get('sort')) { | 280 | $Query = $Query->where('title', 'LIKE', "%$search%")-> |
279 | $sort = $request->get('sort'); | 281 | orWhere('text', 'LIKE', "%$search%"); |
280 | switch ($sort) { | 282 | } |
281 | case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; | 283 | |
282 | case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; | 284 | if ($request->ajax()) { |
283 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; | 285 | if ($request->get('sort')) { |
284 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; | 286 | $sort = $request->get('sort'); |
285 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 287 | switch ($sort) { |
286 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; | 288 | case 'name_up': $Query = $Query->orderBy('title')->orderBy('id'); break; |
287 | } | 289 | case 'name_down': $Query = $Query->orderByDesc('title')->orderby('id'); break; |
288 | } | 290 | case 'created_at_up': $Query = $Query->OrderBy('created_at')->orderBy('id'); break; |
289 | } | 291 | case 'created_at_down': $Query = $Query->orderByDesc('created_at')->orderBy('id'); break; |
290 | $Query_count = $Query->count(); | 292 | case 'default': $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
291 | $Query = $Query->paginate(6); | 293 | default: $Query = $Query->orderBy('id')->orderby('updated_at'); break; |
292 | 294 | } | |
293 | if ($request->ajax()) { | 295 | } |
294 | return view('ajax.news-list', compact('Query', 'Query_count')); | 296 | } |
295 | } else { | 297 | $Query_count = $Query->count(); |
296 | return view('news-list', compact('Query', 'Query_count')); | 298 | $Query = $Query->paginate(6); |
297 | } | 299 | |
298 | } | 300 | if ($request->ajax()) { |
299 | 301 | return view('ajax.news-list', compact('Query', 'Query_count')); | |
300 | //Детальная новость | 302 | } else { |
301 | public function detail_new(News $new) { | 303 | return view('news-list', compact('Query', 'Query_count')); |
302 | // Выборка | 304 | } |
303 | $Query = News::query()->where('id', $new->id)->get(); | 305 | } |
304 | $title = $Query[0]->title; | 306 | |
305 | $All_Query = News::query()->paginate(8); | 307 | //Детальная новость |
306 | return view('detail_new', compact('Query', 'All_Query', 'title')); | 308 | public function detail_new(News $new) { |
307 | } | 309 | // Выборка |
app/Http/Controllers/WorkerController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\RusDate; | 5 | use App\Classes\RusDate; |
6 | use App\Http\Requests\DocumentsRequest; | 6 | use App\Http\Requests\DocumentsRequest; |
7 | use App\Models\Ad_employer; | 7 | use App\Models\Ad_employer; |
8 | use App\Models\ad_response; | 8 | use App\Models\ad_response; |
9 | use App\Models\Category; | 9 | use App\Models\Category; |
10 | use App\Models\Dop_info; | 10 | use App\Models\Dop_info; |
11 | use App\Models\Employer; | 11 | use App\Models\Employer; |
12 | use App\Models\infobloks; | 12 | use App\Models\infobloks; |
13 | use App\Models\Job_title; | 13 | use App\Models\Job_title; |
14 | use App\Models\Message; | 14 | use App\Models\Message; |
15 | use App\Models\place_works; | 15 | use App\Models\place_works; |
16 | use App\Models\reclame; | 16 | use App\Models\reclame; |
17 | use App\Models\ResponseWork; | ||
17 | use App\Models\ResponseWork; | 18 | use App\Models\sertification; |
18 | use App\Models\sertification; | 19 | use App\Models\Static_worker; |
19 | use App\Models\Static_worker; | 20 | use App\Models\User; |
20 | use App\Models\User; | 21 | use App\Models\User as User_Model; |
21 | use App\Models\User as User_Model; | 22 | use App\Models\Worker; |
22 | use App\Models\Worker; | 23 | use Barryvdh\DomPDF\Facade\Pdf; |
23 | use Barryvdh\DomPDF\Facade\Pdf; | 24 | use Carbon\Carbon; |
24 | use Carbon\Carbon; | 25 | use Illuminate\Auth\Events\Registered; |
25 | use Illuminate\Auth\Events\Registered; | 26 | use Illuminate\Database\Eloquent\Builder; |
27 | use Illuminate\Database\Eloquent\Model; | ||
26 | use Illuminate\Database\Eloquent\Builder; | 28 | use Illuminate\Http\JsonResponse; |
27 | use Illuminate\Http\JsonResponse; | 29 | use Illuminate\Http\Request; |
28 | use Illuminate\Http\Request; | 30 | use Illuminate\Support\Facades\Auth; |
29 | use Illuminate\Support\Facades\Auth; | 31 | use Illuminate\Support\Facades\Hash; |
30 | use Illuminate\Support\Facades\Hash; | 32 | use Illuminate\Support\Facades\Storage; |
31 | use Illuminate\Support\Facades\Storage; | 33 | use Illuminate\Support\Facades\Validator; |
32 | use Illuminate\Support\Facades\Validator; | 34 | |
33 | 35 | class WorkerController extends Controller | |
34 | class WorkerController extends Controller | 36 | { |
35 | { | 37 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); |
36 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); | 38 | |
37 | 39 | //профиль | |
38 | //профиль | 40 | public function profile(Worker $worker) |
39 | public function profile(Worker $worker) | 41 | { |
40 | { | 42 | $get_date = date('Y.m'); |
41 | $get_date = date('Y.m'); | 43 | |
42 | 44 | $c = Static_worker::query()->where('year_month', '=', $get_date) | |
43 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 45 | ->where('user_id', '=', $worker->users->id) |
44 | ->where('user_id', '=', $worker->users->id) | 46 | ->get(); |
45 | ->get(); | 47 | |
46 | 48 | if ($c->count() > 0) { | |
47 | if ($c->count() > 0) { | 49 | $upd = Static_worker::find($c[0]->id); |
48 | $upd = Static_worker::find($c[0]->id); | 50 | $upd->lookin = $upd->lookin + 1; |
49 | $upd->lookin = $upd->lookin + 1; | 51 | $upd->save(); |
50 | $upd->save(); | 52 | } else { |
51 | } else { | 53 | $crt = new Static_worker(); |
52 | $crt = new Static_worker(); | 54 | $crt->lookin = 1; |
53 | $crt->lookin = 1; | 55 | $crt->year_month = $get_date; |
54 | $crt->year_month = $get_date; | 56 | $crt->user_id = $worker->user_id; |
55 | $crt->user_id = $worker->user_id; | 57 | $crt->save(); |
56 | $crt->save(); | 58 | } |
57 | } | 59 | |
58 | 60 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | |
59 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 61 | ->where('user_id', '=', $worker->users->id) |
60 | ->where('user_id', '=', $worker->users->id) | 62 | ->get(); |
61 | ->get(); | 63 | |
62 | 64 | return view('public.workers.profile', compact('worker', 'stat')); | |
63 | return view('public.workers.profile', compact('worker', 'stat')); | 65 | } |
64 | } | 66 | |
65 | 67 | // лист база резюме | |
66 | // лист база резюме | 68 | public function bd_resume(Request $request) |
67 | public function bd_resume(Request $request) | 69 | { |
68 | { | 70 | if (isset(Auth()->user()->id)) { |
69 | if (isset(Auth()->user()->id)) { | 71 | $idiot = Auth()->user()->id; |
70 | $idiot = Auth()->user()->id; | 72 | } else { |
71 | } else { | 73 | $idiot = 0; |
72 | $idiot = 0; | 74 | } |
73 | } | 75 | |
74 | 76 | $status_work = $this->status_work; | |
75 | $status_work = $this->status_work; | 77 | $resumes = Worker::query()->with('users')->with('job_titles'); |
76 | $resumes = Worker::query()->with('users')->with('job_titles'); | 78 | $resumes = $resumes->whereHas('users', function (Builder $query) { |
77 | $resumes = $resumes->whereHas('users', function (Builder $query) { | 79 | $query->Where('is_worker', '=', '1') |
78 | $query->Where('is_worker', '=', '1') | 80 | ->Where('is_bd', '=', '0'); |
79 | ->Where('is_bd', '=', '0'); | 81 | }); |
80 | }); | 82 | |
81 | 83 | if ($request->get('sort')) { | |
82 | if ($request->get('sort')) { | 84 | $sort = $request->get('sort'); |
83 | $sort = $request->get('sort'); | 85 | switch ($sort) { |
84 | switch ($sort) { | 86 | case 'name_up': |
85 | case 'name_up': | 87 | $resumes = $resumes->orderBy(User::select('surname') |
86 | $resumes = $resumes->orderBy(User::select('surname') | 88 | ->whereColumn('Workers.user_id', 'users.id') |
87 | ->whereColumn('Workers.user_id', 'users.id') | 89 | ); |
88 | ); | 90 | break; |
89 | break; | 91 | case 'name_down': |
90 | case 'name_down': | 92 | $resumes = $resumes->orderByDesc(User::select('surname') |
91 | $resumes = $resumes->orderByDesc(User::select('surname') | 93 | ->whereColumn('Workers.user_id', 'users.id') |
92 | ->whereColumn('Workers.user_id', 'users.id') | 94 | ); |
93 | ); | 95 | break; |
94 | break; | 96 | case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; |
95 | case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break; | 97 | case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; |
96 | case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break; | 98 | case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; |
97 | case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; | 99 | default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; |
98 | default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break; | 100 | } |
99 | } | 101 | } |
100 | } | 102 | |
101 | 103 | $res_count = $resumes->count(); | |
102 | $res_count = $resumes->count(); | 104 | $resumes = $resumes->paginate(6); |
103 | $resumes = $resumes->paginate(6); | 105 | if ($request->ajax()) { |
104 | if ($request->ajax()) { | 106 | // Условия обставлены |
105 | // Условия обставлены | 107 | if ($request->has('block') && ($request->get('block') == 1)) { |
106 | if ($request->has('block') && ($request->get('block') == 1)) { | 108 | return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); |
107 | return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); | 109 | } |
108 | } | 110 | |
109 | 111 | if ($request->has('block') && ($request->get('block') == 2)) { | |
110 | if ($request->has('block') && ($request->get('block') == 2)) { | 112 | return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); |
111 | return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); | 113 | } |
112 | } | 114 | } else { |
113 | } else { | 115 | return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); |
114 | return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); | 116 | } |
115 | } | 117 | } |
116 | } | 118 | |
117 | 119 | // анкета соискателя | |
118 | // анкета соискателя | 120 | public function resume_profile(Worker $worker) |
119 | public function resume_profile(Worker $worker) | 121 | { |
120 | { | 122 | $status_work = $this->status_work; |
121 | $status_work = $this->status_work; | 123 | $Query = Worker::query()->with('users')->with('job_titles') |
122 | $Query = Worker::query()->with('users')->with('job_titles') | 124 | ->with('place_worker')->with('sertificate')->with('prev_company') |
123 | ->with('place_worker')->with('sertificate')->with('prev_company') | 125 | ->with('infobloks'); |
124 | ->with('infobloks'); | 126 | $Query = $Query->where('id', '=', $worker->id); |
125 | $Query = $Query->where('id', '=', $worker->id); | 127 | $Query = $Query->get(); |
128 | |||
129 | $get_date = date('Y.m'); | ||
130 | $c = Static_worker::query()->where('year_month', '=', $get_date) | ||
131 | ->where('user_id', '=', $worker->id) | ||
132 | ->get(); | ||
133 | |||
134 | if ($c->count() > 0) { | ||
135 | $upd = Static_worker::find($c[0]->id); | ||
136 | $upd->lookin = $upd->lookin + 1; | ||
137 | $upd->save(); | ||
138 | } else { | ||
139 | $crt = new Static_worker(); | ||
140 | $crt->lookin = 1; | ||
141 | $crt->year_month = $get_date; | ||
142 | $crt->user_id = $worker->user_id; | ||
143 | $crt->save(); | ||
144 | } | ||
145 | |||
146 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | ||
147 | ->where('user_id', '=', $worker->id) | ||
148 | ->get(); | ||
149 | |||
126 | $Query = $Query->get(); | 150 | return view('worker', compact('Query', 'status_work')); |
127 | return view('worker', compact('Query', 'status_work')); | 151 | } |
128 | } | 152 | |
129 | 153 | // скачать анкету соискателя | |
130 | // скачать анкету соискателя | 154 | public function resume_download(Worker $worker) |
131 | public function resume_download(Worker $worker) | 155 | { |
132 | { | 156 | $status_work = $this->status_work; |
157 | $Query = Worker::query()->with('users')->with('job_titles') | ||
158 | ->with('place_worker')->with('sertificate')->with('prev_company') | ||
159 | ->with('infobloks'); | ||
160 | $Query = $Query->where('id', '=', $worker->id); | ||
161 | $Query = $Query->get()->toArray(); | ||
133 | $arr_house = ['0' => '$1000000000000000000']; | 162 | |
134 | 163 | view()->share('Query',$Query); | |
135 | view()->share('house',$arr_house); | 164 | |
136 | 165 | $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); | |
137 | $pdf = PDF::loadView('layout.pdf', $arr_house); //->setPaper('a4', 'landscape'); | 166 | |
138 | 167 | return $pdf->stream(); | |
139 | return $pdf->stream(); | 168 | } |
140 | } | 169 | |
141 | 170 | // Кабинет работника | |
142 | // Кабинет работника | 171 | public function cabinet(Request $request) |
143 | public function cabinet() | 172 | { |
173 | $get_date = date('Y.m'); | ||
174 | |||
144 | { | 175 | $id = Auth()->user()->id; |
145 | $id = Auth()->user()->id; | 176 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> |
146 | $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> | 177 | with('infobloks')->with('place_worker')-> |
147 | with('infobloks')->with('place_worker')-> | 178 | WhereHas('users', |
148 | WhereHas('users', | 179 | function (Builder $query) use ($id) {$query->Where('id', $id); |
149 | function (Builder $query) use ($id) {$query->Where('id', $id); | 180 | })->get(); |
150 | })->get(); | 181 | |
151 | 182 | $Job_titles = Job_title::query()->OrderBy('name')->get(); | |
152 | $Job_titles = Job_title::query()->OrderBy('name')->get(); | 183 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); |
153 | $Infoblocks = infobloks::query()->OrderBy('name')->get(); | 184 | |
154 | 185 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | |
186 | ->where('user_id', '=', $Worker[0]->id) | ||
187 | ->get(); | ||
188 | |||
189 | $persent = 10; | ||
190 | if ((!empty($Worker[0]->status_work)) && (!empty($Worker[0]->telephone)) && | ||
191 | (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && | ||
192 | (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { | ||
193 | $persent = $persent + 40; | ||
194 | } | ||
195 | |||
196 | if ($Worker[0]->sertificate->count() > 0) { | ||
197 | $persent = $persent + 15; | ||
198 | } | ||
199 | |||
200 | if ($Worker[0]->infobloks->count() > 0) { | ||
201 | $persent = $persent + 20; | ||
202 | } | ||
203 | |||
204 | if ($Worker[0]->prev_company->count() > 0) { | ||
205 | $persent = $persent + 10; | ||
206 | } | ||
207 | |||
208 | if (!empty($Worker[0]->photo)) { | ||
209 | // 5% | ||
210 | $persent = $persent + 5; | ||
211 | } | ||
212 | |||
213 | if ($request->has('print')) { | ||
214 | dd($Worker); | ||
215 | } else { | ||
216 | return view('workers.cabinet', compact('Worker', 'persent', 'Job_titles', 'Infoblocks', 'stat')); | ||
217 | } | ||
155 | return view('workers.cabinet', compact('Worker', 'Job_titles', 'Infoblocks')); | 218 | } |
156 | } | 219 | |
157 | 220 | // Сохранение данных | |
158 | // Сохранение данных | 221 | public function cabinet_save(Worker $worker, Request $request) |
159 | public function cabinet_save(Worker $worker, Request $request) | 222 | { |
160 | { | 223 | $id = $worker->id; |
161 | $id = $worker->id; | 224 | $params = $request->all(); |
162 | $params = $request->all(); | 225 | |
163 | 226 | $job_title_id = $request->get('job_title_id'); | |
164 | $job_title_id = $request->get('job_title_id'); | 227 | |
165 | 228 | unset($params['new_diplom']); | |
166 | unset($params['new_diplom']); | 229 | unset($params['new_data_begin']); |
167 | unset($params['new_data_begin']); | 230 | unset($params['new_data_end']); |
168 | unset($params['new_data_end']); | 231 | unset($params['new_job_title']); |
169 | unset($params['new_job_title']); | 232 | unset($params['new_teplohod']); |
170 | unset($params['new_teplohod']); | 233 | unset($params['new_GWT']); |
171 | unset($params['new_GWT']); | 234 | unset($params['new_KBT']); |
172 | unset($params['new_KBT']); | 235 | unset($params['new_Begin_work']); |
173 | unset($params['new_Begin_work']); | 236 | unset($params['new_End_work']); |
174 | unset($params['new_End_work']); | 237 | unset($params['new_name_company']); |
175 | unset($params['new_name_company']); | 238 | |
176 | 239 | $rules = [ | |
177 | $rules = [ | 240 | 'surname' => ['required', 'string', 'max:255'], |
178 | 'surname' => ['required', 'string', 'max:255'], | 241 | 'name_man' => ['required', 'string', 'max:255'], |
179 | 'name_man' => ['required', 'string', 'max:255'], | 242 | 'email' => ['required', 'string', 'email', 'max:255'], |
180 | 'email' => ['required', 'string', 'email', 'max:255'], | 243 | |
181 | 244 | ]; | |
182 | ]; | 245 | |
183 | 246 | $messages = [ | |
184 | $messages = [ | 247 | 'required' => 'Укажите обязательное поле', |
185 | 'required' => 'Укажите обязательное поле', | 248 | 'min' => [ |
186 | 'min' => [ | 249 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
187 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 250 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
188 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 251 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
189 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 252 | ], |
190 | ], | 253 | 'max' => [ |
191 | 'max' => [ | 254 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
192 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 255 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
193 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 256 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
194 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 257 | ] |
195 | ] | 258 | ]; |
196 | ]; | 259 | |
197 | 260 | $validator = Validator::make($params, $rules, $messages); | |
198 | $validator = Validator::make($params, $rules, $messages); | 261 | |
199 | 262 | if ($validator->fails()) { | |
200 | if ($validator->fails()) { | 263 | return redirect()->route('worker.cabinet')->withErrors($validator); |
201 | return redirect()->route('worker.cabinet')->withErrors($validator); | 264 | } else { |
202 | } else { | 265 | |
203 | 266 | if ($request->has('photo')) { | |
204 | if ($request->has('photo')) { | 267 | if (!empty($Worker->photo)) { |
205 | if (!empty($Worker->photo)) { | 268 | Storage::delete($Worker->photo); |
206 | Storage::delete($Worker->photo); | 269 | } |
207 | } | 270 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); |
208 | $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); | 271 | } |
209 | } | 272 | |
210 | 273 | if ($request->has('file')) { | |
211 | if ($request->has('file')) { | 274 | if (!empty($Worker->file)) { |
212 | if (!empty($Worker->file)) { | 275 | Storage::delete($Worker->file); |
213 | Storage::delete($Worker->file); | 276 | } |
214 | } | 277 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); |
215 | $params['file'] = $request->file('file')->store("worker/$id", 'public'); | 278 | } |
216 | } | 279 | |
217 | 280 | $id_wor = $worker->update($params); | |
218 | $id_wor = $worker->update($params); | 281 | |
219 | 282 | $use = User_Model::find($id_wor); | |
220 | $use = User_Model::find($id_wor); | 283 | $use->surname = $request->get('surname'); |
221 | $use->surname = $request->get('surname'); | 284 | $use->name_man = $request->get('name_man'); |
222 | $use->name_man = $request->get('name_man'); | 285 | $use->surname2 = $request->get('surname2'); |
223 | $use->surname2 = $request->get('surname2'); | 286 | |
224 | 287 | $use->save(); | |
225 | $use->save(); | 288 | $worker->job_titles()->sync($job_title_id); |
226 | $worker->job_titles()->sync($job_title_id); | 289 | |
227 | 290 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); | |
228 | return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); | 291 | } |
229 | } | 292 | } |
230 | } | 293 | |
231 | 294 | // Сообщения данные | |
232 | // Сообщения данные | 295 | public function messages($type_message) |
233 | public function messages($type_message) | 296 | { |
234 | { | 297 | $user_id = Auth()->user()->id; |
235 | $user_id = Auth()->user()->id; | 298 | |
236 | 299 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | |
237 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 300 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
238 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 301 | |
239 | 302 | $messages_output = Message::query()->with('vacancies')-> | |
240 | $messages_output = Message::query()->with('vacancies')-> | 303 | with('user_to')->where('user_id', $user_id)-> |
241 | with('user_to')->where('user_id', $user_id)-> | 304 | OrderByDesc('created_at'); |
242 | OrderByDesc('created_at'); | 305 | |
243 | 306 | ||
244 | 307 | $count_input = $messages_input->count(); | |
245 | $count_input = $messages_input->count(); | 308 | $count_output = $messages_output->count(); |
246 | $count_output = $messages_output->count(); | 309 | |
247 | 310 | if ($type_message == 'input') { | |
248 | if ($type_message == 'input') { | 311 | $messages = $messages_input->paginate(15); |
249 | $messages = $messages_input->paginate(15); | 312 | } |
250 | } | 313 | |
251 | 314 | if ($type_message == 'output') { | |
252 | if ($type_message == 'output') { | 315 | $messages = $messages_output->paginate(15); |
253 | $messages = $messages_output->paginate(15); | 316 | } |
254 | } | 317 | // Вернуть все 100% |
255 | // Вернуть все 100% | 318 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
256 | return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 319 | } |
257 | } | 320 | |
258 | 321 | // Избранный | |
259 | // Избранный | 322 | public function favorite() |
260 | public function favorite() | 323 | { |
261 | { | 324 | return view('workers.favorite'); |
262 | return view('workers.favorite'); | 325 | } |
263 | } | 326 | |
264 | 327 | // Сменить пароль | |
265 | // Сменить пароль | 328 | public function new_password() |
266 | public function new_password() | 329 | { |
267 | { | 330 | $email = Auth()->user()->email; |
268 | $email = Auth()->user()->email; | 331 | return view('workers.new_password', compact('email')); |
269 | return view('workers.new_password', compact('email')); | 332 | } |
270 | } | 333 | |
271 | 334 | // Обновление пароля | |
272 | // Обновление пароля | 335 | public function save_new_password(Request $request) { |
273 | public function save_new_password(Request $request) { | 336 | $use = Auth()->user(); |
274 | $use = Auth()->user(); | 337 | $request->validate([ |
275 | $request->validate([ | 338 | 'password' => 'required|string', |
276 | 'password' => 'required|string', | 339 | 'new_password' => 'required|string', |
277 | 'new_password' => 'required|string', | 340 | 'new_password2' => 'required|string' |
278 | 'new_password2' => 'required|string' | 341 | ]); |
279 | ]); | 342 | |
280 | 343 | if ($request->get('new_password') == $request->get('new_password2')) | |
281 | if ($request->get('new_password') == $request->get('new_password2')) | 344 | if ($request->get('password') !== $request->get('new_password')) { |
282 | if ($request->get('password') !== $request->get('new_password')) { | 345 | $credentials = $request->only('email', 'password'); |
283 | $credentials = $request->only('email', 'password'); | 346 | if (Auth::attempt($credentials, $request->has('save_me'))) { |
284 | if (Auth::attempt($credentials, $request->has('save_me'))) { | 347 | |
285 | 348 | if (!is_null($use->email_verified_at)){ | |
286 | if (!is_null($use->email_verified_at)){ | 349 | |
287 | 350 | $user_data = User_Model::find($use->id); | |
288 | $user_data = User_Model::find($use->id); | 351 | $user_data->update([ |
289 | $user_data->update([ | 352 | 'password' => Hash::make($request->get('new_password')), |
290 | 'password' => Hash::make($request->get('new_password')), | 353 | 'pubpassword' => base64_encode($request->get('new_password')), |
291 | 'pubpassword' => base64_encode($request->get('new_password')), | 354 | ]); |
292 | ]); | 355 | return redirect() |
293 | return redirect() | 356 | ->route('worker.new_password') |
294 | ->route('worker.new_password') | 357 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
295 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 358 | } |
296 | } | 359 | |
297 | 360 | return redirect() | |
298 | return redirect() | 361 | ->route('worker.new_password') |
299 | ->route('worker.new_password') | 362 | ->withError('Данная учетная запись не было верифицированна!'); |
300 | ->withError('Данная учетная запись не было верифицированна!'); | 363 | } |
301 | } | 364 | } |
302 | } | 365 | |
303 | 366 | return redirect() | |
304 | return redirect() | 367 | ->route('worker.new_password') |
305 | ->route('worker.new_password') | 368 | ->withErrors('Не совпадение данных, обновите пароли!'); |
306 | ->withErrors('Не совпадение данных, обновите пароли!'); | 369 | } |
307 | } | 370 | |
308 | 371 | // Удаление профиля форма | |
309 | // Удаление профиля форма | 372 | public function delete_profile() |
310 | public function delete_profile() | 373 | { |
311 | { | 374 | $login = Auth()->user()->email; |
312 | $login = Auth()->user()->email; | 375 | return view('workers.delete_profile', compact('login')); |
313 | return view('workers.delete_profile', compact('login')); | 376 | } |
314 | } | 377 | |
315 | 378 | // Удаление профиля код | |
316 | // Удаление профиля код | 379 | public function delete_profile_result(Request $request) { |
317 | public function delete_profile_result(Request $request) { | 380 | $Answer = $request->all(); |
318 | $Answer = $request->all(); | 381 | $user_id = Auth()->user()->id; |
319 | $user_id = Auth()->user()->id; | 382 | $request->validate([ |
320 | $request->validate([ | 383 | 'password' => 'required|string', |
321 | 'password' => 'required|string', | 384 | ]); |
322 | ]); | 385 | |
323 | 386 | $credentials = $request->only('email', 'password'); | |
324 | $credentials = $request->only('email', 'password'); | 387 | if (Auth::attempt($credentials)) { |
325 | if (Auth::attempt($credentials)) { | 388 | Auth::logout(); |
326 | Auth::logout(); | 389 | $it = User_Model::find($user_id); |
327 | $it = User_Model::find($user_id); | 390 | //$it->delete(); |
328 | //$it->delete(); | 391 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
329 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 392 | } else { |
330 | } else { | 393 | return redirect()->route('worker.delete_profile') |
331 | return redirect()->route('worker.delete_profile') | 394 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
332 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 395 | } |
333 | } | 396 | } |
334 | } | 397 | |
335 | 398 | // Регистрация соискателя | |
336 | // Регистрация соискателя | 399 | public function register_worker(Request $request) |
337 | public function register_worker(Request $request) | 400 | { |
338 | { | 401 | $params = $request->all(); |
339 | $params = $request->all(); | 402 | |
340 | 403 | $rules = [ | |
341 | $rules = [ | 404 | 'surname' => ['required', 'string', 'max:255'], |
342 | 'surname' => ['required', 'string', 'max:255'], | 405 | 'name_man' => ['required', 'string', 'max:255'], |
343 | 'name_man' => ['required', 'string', 'max:255'], | 406 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
344 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 407 | 'password' => ['required', 'string', 'min:8'], |
345 | 'password' => ['required', 'string', 'min:8'], | 408 | ]; |
346 | ]; | 409 | |
347 | 410 | $messages = [ | |
348 | $messages = [ | 411 | 'required' => 'Укажите обязательное поле', |
349 | 'required' => 'Укажите обязательное поле', | 412 | 'min' => [ |
350 | 'min' => [ | 413 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
351 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 414 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
352 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 415 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
353 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 416 | ], |
354 | ], | 417 | 'max' => [ |
355 | 'max' => [ | 418 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
356 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 419 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
357 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 420 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
358 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 421 | ] |
359 | ] | 422 | ]; |
360 | ]; | 423 | |
361 | 424 | if ($request->get('password') !== $request->get('confirmed')){ | |
362 | if ($request->get('password') !== $request->get('confirmed')){ | 425 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
363 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 426 | } |
364 | } | 427 | |
365 | 428 | $validator = Validator::make($request->all(), $rules, $messages); | |
366 | $validator = Validator::make($request->all(), $rules, $messages); | 429 | |
367 | 430 | if ($validator->fails()) { | |
368 | if ($validator->fails()) { | 431 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
369 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 432 | } else { |
370 | } else { | 433 | $user = $this->create($params); |
371 | $user = $this->create($params); | 434 | event(new Registered($user)); |
372 | event(new Registered($user)); | 435 | |
373 | 436 | Auth::guard()->login($user); | |
374 | Auth::guard()->login($user); | 437 | } |
375 | } | 438 | if ($user) { |
376 | if ($user) { | 439 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; |
377 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; | 440 | } else { |
378 | } else { | 441 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
379 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 442 | } |
380 | } | 443 | } |
381 | } | 444 | |
445 | |||
446 | // Звездная оценка и ответ | ||
447 | public function stars_answer(Request $request) { | ||
448 | $params = $request->all(); | ||
449 | $rules = [ | ||
450 | 'message' => ['required', 'string', 'max:255'], | ||
451 | ]; | ||
452 | |||
453 | $messages = [ | ||
454 | 'required' => 'Укажите обязательное поле', | ||
455 | 'min' => [ | ||
456 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | ||
457 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | ||
458 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | ||
459 | ], | ||
460 | 'max' => [ | ||
461 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | ||
462 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | ||
463 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | ||
464 | ] | ||
465 | ]; | ||
466 | $response_worker = ResponseWork::create($params); | ||
467 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); | ||
468 | } | ||
469 | |||
382 | 470 | // Создание пользователя | |
383 | 471 | protected function create(array $data) | |
384 | // Звездная оценка и ответ | 472 | { |
385 | public function stars_answer(Request $request) { | 473 | $Use = new User(); |
386 | $params = $request->all(); | 474 | $Code_user = $Use->create([ |
387 | $rules = [ | 475 | 'name' => $data['surname']." ".$data['name_man'], |
388 | 'message' => ['required', 'string', 'max:255'], | 476 | 'name_man' => $data['name_man'], |
389 | ]; | 477 | 'surname' => $data['surname'], |
390 | 478 | 'surname2' => $data['surname2'], | |
391 | $messages = [ | 479 | 'subscribe_email' => $data['email'], |
392 | 'required' => 'Укажите обязательное поле', | 480 | 'email' => $data['email'], |
393 | 'min' => [ | 481 | 'telephone' => $data['telephone'], |
394 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 482 | 'password' => Hash::make($data['password']), |
395 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 483 | 'pubpassword' => base64_encode($data['password']), |
396 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 484 | 'email_verified_at' => Carbon::now() |
397 | ], | 485 | ]); |
398 | 'max' => [ | 486 | if ($Code_user->id > 0) { |
399 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 487 | $Worker = new Worker(); |
400 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 488 | $Worker->user_id = $Code_user->id; |
401 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 489 | $Worker->position_work = $data['job_titles']; |
402 | ] | 490 | $Worker->email = $data['email']; |
403 | ]; | 491 | $Worker->telephone = $data['telephone']; |
404 | $response_worker = ResponseWork::create($params); | 492 | $Worker->save(); |
405 | return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); | 493 | |
406 | } | 494 | return $Code_user; |
407 | 495 | } | |
408 | // Создание пользователя | 496 | } |
409 | protected function create(array $data) | 497 | |
410 | { | 498 | // Борьба против колорадских жуков, хотя жуков победил все таки 45. |
411 | $Use = new User(); | 499 | public function colorado(Request $request) { |
412 | $Code_user = $Use->create([ | 500 | if (isset($_COOKIE['favorite_vac'])) { |
413 | 'name' => $data['surname']." ".$data['name_man'], | 501 | $items = RusDate::count_vacancy_fav(); |
414 | 'name_man' => $data['name_man'], | 502 | $it = $_COOKIE['favorite_vac']; |
415 | 'surname' => $data['surname'], | 503 | $it = str_replace('"', "", $it); |
416 | 'surname2' => $data['surname2'], | 504 | $it = str_replace('[', "", $it); |
417 | 'subscribe_email' => $data['email'], | 505 | $it = str_replace(']', "", $it); |
418 | 'email' => $data['email'], | 506 | $Arr = explode(",", $it); |
419 | 'telephone' => $data['telephone'], | 507 | } else { |
420 | 'password' => Hash::make($data['password']), | 508 | $Arr = Array(); |
421 | 'pubpassword' => base64_encode($data['password']), | 509 | } |
422 | 'email_verified_at' => Carbon::now() | 510 | |
423 | ]); | 511 | $Query = Ad_employer::Query(); |
424 | if ($Code_user->id > 0) { | 512 | if (count($Arr) > 0) { |
425 | $Worker = new Worker(); | 513 | $Query = $Query->whereIn('id', $Arr); |
426 | $Worker->user_id = $Code_user->id; | 514 | } |
427 | $Worker->position_work = $data['job_titles']; | 515 | $Query = $Query->with('jobs')-> |
428 | $Worker->email = $data['email']; | 516 | with('cat')-> |
429 | $Worker->telephone = $data['telephone']; | 517 | with('employer')-> |
430 | $Worker->save(); | 518 | whereHas('jobs_code', function ($query) use ($request) { |
431 | 519 | if ($request->ajax()) { | |
432 | return $Code_user; | 520 | if (null !== ($request->get('job'))) { |
433 | } | 521 | $query->where('job_title_id', $request->get('job')); |
434 | } | 522 | } |
435 | 523 | } | |
436 | // Борьба против колорадских жуков, хотя жуков победил все таки 45. | 524 | })->select('ad_employers.*'); |
437 | public function colorado(Request $request) { | 525 | |
438 | if (isset($_COOKIE['favorite_vac'])) { | 526 | $Job_title = Job_title::query()->OrderBy('name')->get(); |
439 | $items = RusDate::count_vacancy_fav(); | 527 | |
440 | $it = $_COOKIE['favorite_vac']; | 528 | $Query_count = $Query->count(); |
441 | $it = str_replace('"', "", $it); | 529 | |
442 | $it = str_replace('[', "", $it); | 530 | $Query = $Query->OrderBy('updated_at')->paginate(3); |
443 | $it = str_replace(']', "", $it); | 531 | |
444 | $Arr = explode(",", $it); | 532 | return view('workers.favorite', compact('Query', |
445 | } else { | 533 | 'Query_count', |
446 | $Arr = Array(); | 534 | 'Job_title')); |
447 | } | 535 | |
448 | 536 | } | |
449 | $Query = Ad_employer::Query(); | 537 | |
450 | if (count($Arr) > 0) { | 538 | //Переписка |
451 | $Query = $Query->whereIn('id', $Arr); | 539 | public function dialog(User_Model $user1, User_Model $user2) { |
452 | } | 540 | if (isset($user2->id)) { |
453 | $Query = $Query->with('jobs')-> | 541 | $companion = User_Model::query()->with('workers')-> |
454 | with('cat')-> | 542 | with('employers')-> |
455 | with('employer')-> | 543 | where('id', $user2->id)->first(); |
456 | whereHas('jobs_code', function ($query) use ($request) { | 544 | } |
457 | if ($request->ajax()) { | 545 | |
458 | if (null !== ($request->get('job'))) { | 546 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { |
459 | $query->where('job_title_id', $request->get('job')); | 547 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
460 | } | 548 | })->orWhere(function($query) use ($user1, $user2) { |
461 | } | 549 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
462 | })->select('ad_employers.*'); | 550 | })->OrderBy('created_at')->get(); |
463 | 551 | ||
464 | $Job_title = Job_title::query()->OrderBy('name')->get(); | 552 | $id_vac = null; |
465 | 553 | foreach ($Messages as $it) { | |
466 | $Query_count = $Query->count(); | 554 | if (isset($it->response)) { |
467 | 555 | foreach ($it->response as $r) { | |
468 | $Query = $Query->OrderBy('updated_at')->paginate(3); | 556 | if (isset($r->ad_employer_id)) { |
469 | 557 | $id_vac = $r->ad_employer_id; | |
470 | return view('workers.favorite', compact('Query', | 558 | break; |
471 | 'Query_count', | 559 | } |
472 | 'Job_title')); | 560 | } |
473 | 561 | } | |
474 | } | 562 | if (!is_null($id_vac)) break; |
475 | 563 | } | |
476 | //Переписка | 564 | |
477 | public function dialog(User_Model $user1, User_Model $user2) { | 565 | $ad_employer = null; |
478 | if (isset($user2->id)) { | 566 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
479 | $companion = User_Model::query()->with('workers')-> | 567 | $sender = $user1; |
480 | with('employers')-> | 568 | |
481 | where('id', $user2->id)->first(); | 569 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); |
482 | } | 570 | } |
483 | 571 | ||
484 | $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { | 572 | // Даунылоады |
485 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 573 | public function download(Worker $worker) { |
486 | })->orWhere(function($query) use ($user1, $user2) { | 574 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; |
487 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 575 | view()->share('house',$arr_house); |
488 | })->OrderBy('created_at')->get(); | 576 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); |
489 | 577 | return $pdf->stream(); | |
490 | $id_vac = null; | 578 | } |
491 | foreach ($Messages as $it) { | 579 | |
492 | if (isset($it->response)) { | 580 | // Поднятие анкеты |
493 | foreach ($it->response as $r) { | 581 | public function up(Worker $worker) { |
494 | if (isset($r->ad_employer_id)) { | 582 | $worker->updated_at = Carbon::now(); |
495 | $id_vac = $r->ad_employer_id; | 583 | $worker->save(); |
496 | break; | 584 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); |
497 | } | 585 | } |
498 | } | 586 | |
499 | } | 587 | // Добавление сертификата |
500 | if (!is_null($id_vac)) break; | 588 | public function add_serificate(Request $request) { |
501 | } | 589 | $params = $request->all(); |
502 | 590 | $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); | |
503 | $ad_employer = null; | 591 | $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); |
504 | if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 592 | $Sertificate = new sertification(); |
505 | $sender = $user1; | 593 | $Sertificate->create($params); |
506 | 594 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); | |
507 | return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); | 595 | return view('ajax.documents', compact('Docs')); |
508 | } | 596 | } |
509 | 597 | ||
510 | // Даунылоады | 598 | |
511 | public function download(Worker $worker) { | 599 | // Удалить сертификат |
512 | $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; | 600 | public function delete_sertificate(sertification $doc) { |
513 | view()->share('house',$arr_house); | 601 | $doc->delete(); |
514 | $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); | 602 | |
515 | return $pdf->stream(); | 603 | return redirect()->route('worker.cabinet'); |
516 | } | 604 | } |
517 | 605 | ||
518 | // Поднятие анкеты | 606 | // Добавление диплома |
519 | public function up(Worker $worker) { | 607 | public function add_diplom_ajax(Request $request) { |
520 | $worker->updated_at = Carbon::now(); | 608 | // конец |
521 | $worker->save(); | 609 | $params = $request->all(); |
522 | return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); | 610 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
523 | } | 611 | |
524 | 612 | if ($count == 0) $dop_info = Dop_info::create($params); | |
525 | // Добавление сертификата | 613 | $Infoblocks = infobloks::query()->get(); |
526 | public function add_serificate(Request $request) { | 614 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); |
527 | $params = $request->all(); | 615 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); |
528 | $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); | 616 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); |
529 | $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); | 617 | } |
530 | $Sertificate = new sertification(); | 618 | |
531 | $Sertificate->create($params); | 619 | // Добавление диплома без ajax |
532 | $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); | 620 | public function add_diplom(Worker $worker) { |
533 | return view('ajax.documents', compact('Docs')); | 621 | $worker_id = $worker->id; |
534 | } | 622 | $Infoblocks = infobloks::query()->get(); |
535 | 623 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); | |
536 | 624 | } | |
537 | // Удалить сертификат | 625 | // Сохранить |
538 | public function delete_sertificate(sertification $doc) { | 626 | // Сохраняю диплом |
539 | $doc->delete(); | 627 | public function add_diplom_save(Request $request) { |
540 | 628 | $params = $request->all(); | |
541 | return redirect()->route('worker.cabinet'); | 629 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); |
542 | } | 630 | if ($count == 0) $dop_info = Dop_info::create($params); |
543 | 631 | return redirect()->route('worker.cabinet'); | |
544 | // Добавление диплома | 632 | } |
545 | public function add_diplom_ajax(Request $request) { | 633 | |
546 | // конец | 634 | // Добавление стандартного документа |
547 | $params = $request->all(); | 635 | public function add_document(Worker $worker) { |
548 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 636 | return view('workers.docs', compact('worker')); |
549 | 637 | } | |
550 | if ($count == 0) $dop_info = Dop_info::create($params); | 638 | |
551 | $Infoblocks = infobloks::query()->get(); | 639 | //Сохранение стандартого документа |
552 | $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); | 640 | public function add_document_save(DocumentsRequest $request) { |
553 | $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); | 641 | $params = $request->all(); |
554 | return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); | 642 | $place_work = place_works::create($params); |
555 | } | 643 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); |
556 | 644 | } | |
557 | // Добавление диплома без ajax | 645 | |
558 | public function add_diplom(Worker $worker) { | 646 | // Редактирование документа |
559 | $worker_id = $worker->id; | 647 | public function edit_document(place_works $doc, Worker $worker) { |
560 | $Infoblocks = infobloks::query()->get(); | 648 | return view('workers.docs-edit', compact('doc', 'worker')); |
561 | return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); | 649 | } |
562 | } | 650 | |
563 | // Сохранить | 651 | //Сохранение отредактированного документа |
564 | // Сохраняю диплом | 652 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { |
565 | public function add_diplom_save(Request $request) { | 653 | $params = $request->all(); |
566 | $params = $request->all(); | 654 | $doc->update($params); |
567 | $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); | 655 | |
568 | if ($count == 0) $dop_info = Dop_info::create($params); | 656 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); |
569 | return redirect()->route('worker.cabinet'); | 657 | } |
570 | } | 658 | |
571 | 659 | // Удаление документа | |
572 | // Добавление стандартного документа | 660 | public function delete_document(place_works $doc) { |
573 | public function add_document(Worker $worker) { | 661 | $doc->delete(); |
574 | return view('workers.docs', compact('worker')); | 662 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); |
575 | } | 663 | } |
576 | 664 | ||
577 | //Сохранение стандартого документа | 665 | //Отправка нового сообщения |
578 | public function add_document_save(DocumentsRequest $request) { | 666 | public function new_message(Request $request) { |
579 | $params = $request->all(); | 667 | $params = $request->all(); |
580 | $place_work = place_works::create($params); | 668 | |
581 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); | 669 | $id = $params['send_user_id']; |
582 | } | 670 | $message = new Message(); |
583 | 671 | $message->user_id = $params['send_user_id']; | |
584 | // Редактирование документа | 672 | $message->to_user_id = $params['send_to_user_id']; |
585 | public function edit_document(place_works $doc, Worker $worker) { | 673 | $message->title = $params['send_title']; |
586 | return view('workers.docs-edit', compact('doc', 'worker')); | 674 | $message->text = $params['send_text']; |
587 | } | 675 | if ($request->has('send_file')) { |
588 | 676 | $message->file = $request->file('send_file')->store("worker/$id", 'public'); | |
589 | //Сохранение отредактированного документа | 677 | } |
590 | public function edit_document_save(DocumentsRequest $request, place_works $doc) { | 678 | $message->flag_new = 1; |
591 | $params = $request->all(); | 679 | $id_message = $message->save(); |
592 | $doc->update($params); | 680 | |
593 | 681 | $data['message_id'] = $id_message; | |
594 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); | 682 | $data['ad_employer_id'] = $params['send_vacancy']; |
595 | } | 683 | $data['job_title_id'] = $params['send_job_title_id']; |
596 | 684 | $data['flag'] = 1; | |
597 | // Удаление документа | 685 | $ad_responce = ad_response::create($data); |
598 | public function delete_document(place_works $doc) { | 686 | return redirect()->route('worker.messages', ['type_message' => 'output']); |
599 | $doc->delete(); | 687 | } |
688 | |||
600 | return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); | 689 | } |
601 | } | 690 | |
602 | 691 |
app/Http/Requests/VacancyRequestEdit.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Requests; | ||
4 | |||
5 | use Illuminate\Foundation\Http\FormRequest; | ||
6 | |||
7 | class VacancyRequestEdit extends FormRequest | ||
8 | { | ||
9 | public function authorize() | ||
10 | { | ||
11 | return true; | ||
12 | } | ||
13 | |||
14 | /** | ||
15 | * Get the validation rules that apply to the request. | ||
16 | * | ||
17 | * @return array<string, mixed> | ||
18 | */ | ||
19 | |||
20 | public function rules() | ||
21 | { | ||
22 | $Arr = [ | ||
23 | 'name' => [ | ||
24 | 'required', | ||
25 | 'min:3', | ||
26 | 'max:255', | ||
27 | ], | ||
28 | |||
29 | 'category_id' => [ | ||
30 | 'numeric', | ||
31 | 'min:0', | ||
32 | 'max:9999999', | ||
33 | ], | ||
34 | |||
35 | 'telephone' => [ | ||
36 | 'min:3', | ||
37 | 'max:255', | ||
38 | ], | ||
39 | |||
40 | 'email' => [ | ||
41 | 'min:3', | ||
42 | 'max:255', | ||
43 | ], | ||
44 | |||
45 | 'salary' => [ | ||
46 | 'numeric', | ||
47 | 'min:3', | ||
48 | 'max:255', | ||
49 | ], | ||
50 | |||
51 | 'min_salary' => [ | ||
52 | 'numeric', | ||
53 | 'min:0', | ||
54 | 'max:9999999', | ||
55 | ], | ||
56 | |||
57 | 'max_salary' => [ | ||
58 | 'numeric', | ||
59 | 'min:0', | ||
60 | 'max:9999999', | ||
61 | ], | ||
62 | |||
63 | 'city' => [ | ||
64 | 'min:3', | ||
65 | 'max:255', | ||
66 | ], | ||
67 | |||
68 | 'job_title_id' => [ | ||
69 | 'numeric', | ||
70 | 'min:1', | ||
71 | 'max:9999999' | ||
72 | ] | ||
73 | ]; | ||
74 | |||
75 | return [ | ||
76 | 'name' => [ | ||
77 | 'required', | ||
78 | 'min:3', | ||
79 | 'max:255', | ||
80 | ], | ||
81 | |||
82 | 'category_id' => [ | ||
83 | 'numeric', | ||
84 | 'min:0', | ||
85 | 'max:9999999', | ||
86 | ], | ||
87 | |||
88 | 'telephone' => [ | ||
89 | 'min:3', | ||
90 | 'max:255', | ||
91 | ], | ||
92 | |||
93 | 'email' => [ | ||
94 | 'min:3', | ||
95 | 'max:255', | ||
96 | ],]; | ||
97 | } | ||
98 | |||
99 | public function messages() { | ||
100 | return [ | ||
101 | 'required' => 'Поле «:attribute» обязательно для заполнения', | ||
102 | 'unique' => 'Такое значение поля «:attribute» уже используется', | ||
103 | 'min' => [ | ||
104 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | ||
105 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | ||
106 | ], | ||
107 | 'max' => [ | ||
108 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | ||
109 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | ||
110 | ], | ||
111 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', | ||
112 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', | ||
113 | ]; | ||
114 | |||
115 | } | ||
116 | } | ||
117 |
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 | $Arr = [ |
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 | 'numeric', |
52 | 'min:3', | 52 | 'min:3', |
53 | 'max:255', | 53 | 'max:255', |
54 | ], | 54 | ], |
55 | 55 | ||
56 | 'min_salary' => [ | 56 | 'min_salary' => [ |
57 | 'numeric', | 57 | 'numeric', |
58 | 'min:0', | 58 | 'min:0', |
59 | 'max:9999999', | 59 | 'max:9999999', |
60 | ], | 60 | ], |
61 | 61 | ||
62 | 'max_salary' => [ | 62 | 'max_salary' => [ |
63 | 'numeric', | 63 | 'numeric', |
64 | 'min:0', | 64 | 'min:0', |
65 | 'max:9999999', | 65 | 'max:9999999', |
66 | ], | 66 | ], |
67 | 67 | ||
68 | 'city' => [ | 68 | 'city' => [ |
69 | 'min:3', | 69 | 'min:3', |
70 | 'max:255', | 70 | 'max:255', |
71 | ], | 71 | ], |
72 | 72 | ||
73 | 'job_title_id' => [ | 73 | 'job_title_id' => [ |
74 | 'numeric', | 74 | 'numeric', |
75 | 'min:1', | 75 | 'min:1', |
76 | 'max:9999999' | 76 | 'max:9999999' |
77 | ] | 77 | ] |
78 | ]; | 78 | ]; |
79 | |||
80 | return [ | ||
81 | 'name' => [ | ||
82 | 'required', | ||
83 | 'min:3', | ||
84 | 'max:255', | ||
85 | ], | ||
86 | |||
87 | 'category_id' => [ | ||
88 | 'numeric', | ||
89 | 'min:0', | ||
90 | 'max:9999999', | ||
91 | ], | ||
92 | |||
93 | 'telephone' => [ | ||
94 | 'min:3', | ||
95 | 'max:255', | ||
96 | ], | ||
97 | |||
98 | 'email' => [ | ||
99 | 'min:3', | ||
100 | 'max:255', | ||
101 | ],]; | ||
79 | } | 102 | } |
80 | 103 | ||
81 | public function messages() { | 104 | public function messages() { |
82 | return [ | 105 | return [ |
83 | 'required' => 'Поле «:attribute» обязательно для заполнения', | 106 | 'required' => 'Поле «:attribute» обязательно для заполнения', |
84 | 'unique' => 'Такое значение поля «:attribute» уже используется', | 107 | 'unique' => 'Такое значение поля «:attribute» уже используется', |
85 | 'min' => [ | 108 | 'min' => [ |
86 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 109 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
87 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 110 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
88 | ], | 111 | ], |
89 | 'max' => [ | 112 | 'max' => [ |
90 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 113 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
91 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 114 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
92 | ], | 115 | ], |
93 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', | 116 | 'mimes' => 'Файл «:attribute» должен иметь формат :values', |
94 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', | 117 | 'numeric' => 'В поле «:attribute» должно быть указано целое число от 0 до 9999999', |
95 | ]; | 118 | ]; |
96 | 119 | ||
97 | } | 120 | } |
98 | } | 121 | } |
99 | 122 |
app/Models/ResponseWork.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 ResponseWork extends Model | ||
9 | { | ||
10 | use HasFactory; | ||
11 | |||
12 | public $fillable = [ | ||
13 | 'worker_id', | ||
14 | 'stars', | ||
15 | 'message' | ||
16 | ]; | ||
17 | } | ||
1 | <?php | 18 |
database/migrations/2024_03_11_141704_create_response_works_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('response_works', function (Blueprint $table) { | ||
17 | $table->id(); | ||
18 | $table->bigInteger('worker_id')->nullable(false); | ||
19 | $table->integer('stars')->nullable(true); | ||
20 | $table->string('message', 255)->default('Без комментариев'); | ||
21 | $table->timestamps(); | ||
22 | }); | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * Reverse the migrations. | ||
27 | * | ||
28 | * @return void | ||
29 | */ | ||
30 | public function down() | ||
31 | { | ||
32 | Schema::dropIfExists('response_works'); | ||
33 | } | ||
34 | }; | ||
1 | <?php | 35 |
resources/views/admin/ad_employers/add.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Добавление вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Добавление вакансии']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | 8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> |
9 | Добавление вакансии | 9 | Добавление вакансии |
10 | </h4> | 10 | </h4> |
11 | <form method="POST" action="{{ route('admin.store-ad-employers')}}"> | 11 | <form method="POST" action="{{ route('admin.store-ad-employers')}}"> |
12 | @csrf | 12 | @csrf |
13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
14 | <label class="block text-sm"> | 14 | <label class="block text-sm"> |
15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> | 15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> |
16 | <input name="name" id="name" | 16 | <input name="name" id="name" |
17 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | 17 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" |
18 | placeholder="Название вакансии" value="{{ old('name') ?? '' }}" | 18 | placeholder="Название вакансии" value="{{ old('name') ?? '' }}" |
19 | /> | 19 | /> |
20 | @error('name') | 20 | @error('name') |
21 | <span class="text-xs text-red-600 dark:text-red-400"> | 21 | <span class="text-xs text-red-600"> |
22 | {{ $message }} | 22 | {{ $message }} |
23 | </span> | 23 | </span> |
24 | @enderror | 24 | @enderror |
25 | </label> | 25 | </label> |
26 | 26 | ||
27 | <label class="block mt-4 text-sm"> | 27 | <label class="block mt-4 text-sm"> |
28 | <span class="text-gray-700 dark:text-gray-400"> | 28 | <span class="text-gray-700 dark:text-gray-400"> |
29 | Категории должности | 29 | Категории должности |
30 | </span> | 30 | </span> |
31 | <select | 31 | <select |
32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
33 | multiple | 33 | multiple |
34 | name="position_work[]" id="position_work" | 34 | name="position_work[]" id="position_work" |
35 | > | 35 | > |
36 | @foreach($job_titles as $job) | 36 | @foreach($job_titles as $job) |
37 | <option value="{{$job->id}}" @if (old('position_work') == $job->id) selected @endif > | 37 | <option value="{{$job->id}}" @if (old('position_work') == $job->id) selected @endif > |
38 | {{ $job->name }} ({{$job->id}}) | 38 | {{ $job->name }} ({{$job->id}}) |
39 | </option> | 39 | </option> |
40 | @endforeach | 40 | @endforeach |
41 | </select> | 41 | </select> |
42 | </label><br> | 42 | </label><br> |
43 | 43 | ||
44 | <label class="block mt-4 text-sm"> | ||
45 | <span class="text-gray-700 dark:text-gray-400"> | ||
46 | Категории локации | ||
47 | </span> | ||
48 | <select | ||
49 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | ||
50 | name="category_id" id="category_id" | ||
51 | > | ||
52 | @foreach($categories as $it) | ||
53 | <option value="{{$it->id}}" @if (old('category_id') == $it->id) selected @endif > | ||
54 | {{ $it->name }} ({{$it->id}}) | ||
55 | </option> | ||
56 | @endforeach | ||
57 | </select> | ||
58 | </label><br> | ||
59 | |||
44 | <label class="block text-sm"> | 60 | <label class="block text-sm"> |
45 | <span class="text-gray-700 dark:text-gray-400">Текст-описание вакансии</span> | 61 | <span class="text-gray-700 dark:text-gray-400">Текст-описание вакансии</span> |
46 | <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Описание вакансии (text/html)" | 62 | <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Описание вакансии (text/html)" |
47 | rows="10">{{ old('text') ?? '' }}</textarea> | 63 | rows="10">{{ old('text') ?? '' }}</textarea> |
48 | @error('text') | 64 | @error('text') |
49 | <span class="text-xs text-red-600 dark:text-red-400"> | 65 | <span class="text-xs text-red-600 dark:text-red-400"> |
50 | {{ $message }} | 66 | {{ $message }} |
51 | </span> | 67 | </span> |
52 | @enderror | 68 | @enderror |
53 | </label> | 69 | </label> |
54 | 70 | ||
55 | <label class="block mt-4 text-sm"> | 71 | <label class="block mt-4 text-sm"> |
56 | <span class="text-gray-700 dark:text-gray-400"> | 72 | <span class="text-gray-700 dark:text-gray-400"> |
57 | Статус вакансии | 73 | Статус вакансии |
58 | </span> | 74 | </span> |
59 | <select | 75 | <select |
60 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 76 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
61 | name="status" id="status" | 77 | name="status" id="status" |
62 | > | 78 | > |
63 | <option value="Не задан" @if (old('status') == "Не задан") selected @endif > | 79 | <option value="Не задан" @if (old('status') == "Не задан") selected @endif > |
64 | Не задан | 80 | Не задан |
65 | </option> | 81 | </option> |
66 | <option value="Открыта" @if (old('status') == "Открыта") selected @endif > | 82 | <option value="Открыта" @if (old('status') == "Открыта") selected @endif > |
67 | Открыта | 83 | Открыта |
68 | </option> | 84 | </option> |
69 | <option value="Закрыта" @if (old('status') == "Закрыта") selected @endif > | 85 | <option value="Закрыта" @if (old('status') == "Закрыта") selected @endif > |
70 | Закрыта | 86 | Закрыта |
71 | </option> | 87 | </option> |
72 | </select> | 88 | </select> |
73 | </label><br> | 89 | </label><br> |
74 | 90 | ||
75 | <label class="block text-sm"> | 91 | <label class="block text-sm"> |
76 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> | 92 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> |
77 | <input type="hidden" name="sroch_vacancy" value="0" /> | 93 | <input type="hidden" name="sroch_vacancy" value="0" /> |
78 | <input name="sroch_vacancy" | 94 | <input name="sroch_vacancy" |
79 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 95 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
80 | placeholder="" type="checkbox" value="1" | 96 | placeholder="" type="checkbox" value="1" |
81 | /><br> | 97 | /><br> |
82 | 98 | ||
83 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> | 99 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> |
84 | <input type="hidden" name="favorite_vacancy" value="0" /> | 100 | <input type="hidden" name="favorite_vacancy" value="0" /> |
85 | <input name="favorite_vacancy" id="favorite_vacancy" | 101 | <input name="favorite_vacancy" id="favorite_vacancy" |
86 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 102 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
87 | placeholder="" type="checkbox" value="1" | 103 | placeholder="" type="checkbox" value="1" |
88 | /><br> | 104 | /><br> |
89 | </label> | 105 | </label> |
90 | 106 | ||
91 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 107 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
92 | <div> | 108 | <div> |
93 | <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 109 | <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
94 | Сохранить | 110 | Сохранить |
95 | </button> | 111 | </button> |
96 | <a href="{{ route('admin.ad-employers') }}" | 112 | <a href="{{ route('admin.ad-employers') }}" |
97 | class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" | 113 | class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" |
98 | style="display: -webkit-inline-box; height: 30px!important;" | 114 | style="display: -webkit-inline-box; height: 30px!important;" |
99 | >Назад</a> | 115 | >Назад</a> |
100 | </div> | 116 | </div> |
101 | </div> | 117 | </div> |
102 | </div> | 118 | </div> |
103 | </form> | 119 | </form> |
104 | @endsection | 120 | @endsection |
105 | 121 |
resources/views/admin/ad_employers/edit.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Редактирование вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Редактирование вакансии']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> | 8 | <h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"> |
9 | Редактирование вакансии | 9 | Редактирование вакансии |
10 | </h4> | 10 | </h4> |
11 | <form method="POST" action="{{ route('admin.update-ad-employers', ['ad_employer' => $ad_employer->id]) }}"> | 11 | <form method="POST" action="{{ route('admin.update-ad-employers', ['ad_employer' => $ad_employer->id]) }}"> |
12 | @csrf | 12 | @csrf |
13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> | 13 | <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> |
14 | <label class="block text-sm"> | 14 | <label class="block text-sm"> |
15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> | 15 | <span class="text-gray-700 dark:text-gray-400">Название вакансии</span> |
16 | <input name="name" id="name" | 16 | <input name="name" id="name" |
17 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | 17 | class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" |
18 | placeholder="Название вакансии" value="{{ old('name') ?? $ad_employer->name ?? '' }}" | 18 | placeholder="Название вакансии" value="{{ old('name') ?? $ad_employer->name ?? '' }}" |
19 | /> | 19 | /> |
20 | @error('name') | 20 | @error('name') |
21 | <span class="text-xs text-red-600 dark:text-red-400"> | 21 | <span class="text-xs text-red-600 dark:text-red-400"> |
22 | {{ $message }} | 22 | {{ $message }} |
23 | </span> | 23 | </span> |
24 | @enderror | 24 | @enderror |
25 | </label> | 25 | </label> |
26 | 26 | ||
27 | <label class="block mt-4 text-sm"> | 27 | <label class="block mt-4 text-sm"> |
28 | <span class="text-gray-700 dark:text-gray-400"> | 28 | <span class="text-gray-700 dark:text-gray-400"> |
29 | Категории должности | 29 | Категории должности |
30 | </span> | 30 | </span> |
31 | <select | 31 | <select |
32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 32 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
33 | multiple | 33 | multiple |
34 | name="position_work[]" id="position_work" | 34 | name="position_work[]" id="position_work" |
35 | > | 35 | > |
36 | @foreach($job_titles as $job) | 36 | @foreach($job_titles as $job) |
37 | <option value="{{$job->id}}" @if (in_array($job->id, $sel)) selected @endif > | 37 | <option value="{{$job->id}}" @if (in_array($job->id, $sel)) selected @endif > |
38 | {{ $job->name }} ({{$job->id}}) | 38 | {{ $job->name }} ({{$job->id}}) |
39 | </option> | 39 | </option> |
40 | @endforeach | 40 | @endforeach |
41 | </select> | 41 | </select> |
42 | </label><br> | 42 | </label><br> |
43 | 43 | ||
44 | <label class="block mt-4 text-sm"> | ||
45 | <span class="text-gray-700 dark:text-gray-400"> | ||
46 | Категории локации | ||
47 | </span> | ||
48 | <select | ||
49 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | ||
50 | name="category_id" id="category_id" | ||
51 | > | ||
52 | @foreach($categories as $it) | ||
53 | <option value="{{$it->id}}" @if (old('category_id') == $it->id) selected @endif > | ||
54 | {{ $it->name }} ({{$it->id}}) | ||
55 | </option> | ||
56 | @endforeach | ||
57 | </select> | ||
58 | </label><br> | ||
59 | |||
44 | <label class="block text-sm"> | 60 | <label class="block text-sm"> |
45 | <span class="text-gray-700 dark:text-gray-400">Текст-описание вакансии</span> | 61 | <span class="text-gray-700 dark:text-gray-400">Текст-описание вакансии</span> |
46 | <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Описание вакансии (text/html)" | 62 | <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Описание вакансии (text/html)" |
47 | rows="10">{{ old('text') ?? $ad_employer->text ?? '' }}</textarea> | 63 | rows="10">{{ old('text') ?? $ad_employer->text ?? '' }}</textarea> |
48 | @error('text') | 64 | @error('text') |
49 | <span class="text-xs text-red-600 dark:text-red-400"> | 65 | <span class="text-xs text-red-600 dark:text-red-400"> |
50 | {{ $message }} | 66 | {{ $message }} |
51 | </span> | 67 | </span> |
52 | @enderror | 68 | @enderror |
53 | </label> | 69 | </label> |
54 | 70 | ||
55 | <label class="block mt-4 text-sm"> | 71 | <label class="block mt-4 text-sm"> |
56 | <span class="text-gray-700 dark:text-gray-400"> | 72 | <span class="text-gray-700 dark:text-gray-400"> |
57 | Статус вакансии | 73 | Статус вакансии |
58 | </span> | 74 | </span> |
59 | <select | 75 | <select |
60 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" | 76 | class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" |
61 | name="status" id="status" | 77 | name="status" id="status" |
62 | > | 78 | > |
63 | <option value="Не задан" @if ($ad_employer->status == "Не задан") selected @endif > | 79 | <option value="Не задан" @if ($ad_employer->status == "Не задан") selected @endif > |
64 | Не задан | 80 | Не задан |
65 | </option> | 81 | </option> |
66 | <option value="Открыта" @if ($ad_employer->status == "Открыта") selected @endif > | 82 | <option value="Открыта" @if ($ad_employer->status == "Открыта") selected @endif > |
67 | Открыта | 83 | Открыта |
68 | </option> | 84 | </option> |
69 | <option value="Закрыта" @if ($ad_employer->status == "Закрыта") selected @endif > | 85 | <option value="Закрыта" @if ($ad_employer->status == "Закрыта") selected @endif > |
70 | Закрыта | 86 | Закрыта |
71 | </option> | 87 | </option> |
72 | </select> | 88 | </select> |
73 | </label><br> | 89 | </label><br> |
74 | 90 | ||
75 | <label class="block text-sm"> | 91 | <label class="block text-sm"> |
76 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> | 92 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Срочная вакансия</p> |
77 | <input type="hidden" name="sroch_vacancy" value="0" /> | 93 | <input type="hidden" name="sroch_vacancy" value="0" /> |
78 | <input name="sroch_vacancy" @if ($ad_employer->sroch_vacancy) checked @endif | 94 | <input name="sroch_vacancy" @if ($ad_employer->sroch_vacancy) checked @endif |
79 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 95 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
80 | placeholder="" type="checkbox" value="1" | 96 | placeholder="" type="checkbox" value="1" |
81 | /><br> | 97 | /><br> |
82 | 98 | ||
83 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> | 99 | <p class="text-gray-700 dark:text-gray-400" style="float:left; margin-right: 10px">Избранная вакансия</p> |
84 | <input type="hidden" name="favorite_vacancy" value="0" /> | 100 | <input type="hidden" name="favorite_vacancy" value="0" /> |
85 | <input name="favorite_vacancy" id="favorite_vacancy" @if ($ad_employer->favorite_vacancy)checked @endif | 101 | <input name="favorite_vacancy" id="favorite_vacancy" @if ($ad_employer->favorite_vacancy)checked @endif |
86 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " | 102 | class="block mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray " |
87 | placeholder="" type="checkbox" value="1" | 103 | placeholder="" type="checkbox" value="1" |
88 | /><br> | 104 | /><br> |
89 | </label> | 105 | </label> |
90 | 106 | ||
91 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> | 107 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
92 | <div> | 108 | <div> |
93 | <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 109 | <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
94 | Сохранить | 110 | Сохранить |
95 | </button> | 111 | </button> |
96 | <a href="{{ route('admin.ad-employers') }}" | 112 | <a href="{{ route('admin.ad-employers') }}" |
97 | class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" | 113 | class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" |
98 | style="display: -webkit-inline-box; height: 30px!important;" | 114 | style="display: -webkit-inline-box; height: 30px!important;" |
99 | >Назад</a> | 115 | >Назад</a> |
100 | </div> | 116 | </div> |
101 | </div> | 117 | </div> |
102 | </div> | 118 | </div> |
103 | </form> | 119 | </form> |
104 | @endsection | 120 | @endsection |
105 | 121 |
resources/views/admin/reclames/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Реклама сайта']) | 1 | @extends('layout.admin', ['title' => 'Админка - Реклама сайта']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.btn-eye', function () { | 6 | $(document).on('click', '.btn-eye', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var status_ = this_.attr('data-status'); | 8 | var status_ = this_.attr('data-status'); |
9 | var id_ = this_.attr('data-id'); | 9 | var id_ = this_.attr('data-id'); |
10 | var ajax_block = $('#ajax_block'); | 10 | var ajax_block = $('#ajax_block'); |
11 | 11 | ||
12 | $.ajax({ | 12 | $.ajax({ |
13 | type: "GET", | 13 | type: "GET", |
14 | url: "{{ url()->full()}}", | 14 | url: "{{ url()->full()}}", |
15 | data: "id=" + id_ + "&status=" + status_, | 15 | data: "id=" + id_ + "&status=" + status_, |
16 | success: function (data) { | 16 | success: function (data) { |
17 | console.log('Обновление таблицы '); | 17 | console.log('Обновление таблицы '); |
18 | //data = JSON.parse(data); | 18 | //data = JSON.parse(data); |
19 | //console.log(data); | 19 | //console.log(data); |
20 | ajax_block.html(data); | 20 | ajax_block.html(data); |
21 | }, | 21 | }, |
22 | headers: { | 22 | headers: { |
23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
24 | }, | 24 | }, |
25 | error: function (data) { | 25 | error: function (data) { |
26 | console.log('Error: ' + data); | 26 | console.log('Error: ' + data); |
27 | } | 27 | } |
28 | }); | 28 | }); |
29 | }); | 29 | }); |
30 | }); | 30 | }); |
31 | </script> | 31 | </script> |
32 | 32 | ||
33 | <script> | 33 | <script> |
34 | const btns = document.querySelectorAll('.btn_del'); | 34 | const btns = document.querySelectorAll('.btn_del'); |
35 | btns.forEach(btn => { | 35 | btns.forEach(btn => { |
36 | btn.addEventListener('click', (e) => { | 36 | btn.addEventListener('click', (e) => { |
37 | console.log('click button'); | 37 | console.log('click button'); |
38 | //let id = e.target.id; | 38 | //let id = e.target.id; |
39 | let form = document.getElementById("form_modal_del"); | 39 | let form = document.getElementById("form_modal_del"); |
40 | form.action = "<?=$_SERVER['APP_URL'];?>admin/reclames/delete/"+e.target.getAttribute('data-reclame'); | 40 | form.action = "{{ env('APP_URL') }}admin/reclames/delete/"+e.target.getAttribute('data-reclame'); |
41 | //document.getElementById("title_modal").innerHTML = id; | 41 | document.getElementById("title_modal").innerHTML = id; |
42 | console.log(e.target.getAttribute('data-employer')); | 42 | console.log(e.target.getAttribute('data-employer')); |
43 | console.log(e.target.getAttribute('data-user')); | 43 | console.log(e.target.getAttribute('data-user')); |
44 | 44 | ||
45 | }); | 45 | }); |
46 | }); | 46 | }); |
47 | </script> | 47 | </script> |
48 | @endsection | 48 | @endsection |
49 | 49 | ||
50 | @section('modal') | 50 | @section('modal') |
51 | @include('admin.reclames.modal') | 51 | @include('admin.reclames.modal') |
52 | @endsection | 52 | @endsection |
53 | 53 | ||
54 | @section('search') | 54 | @section('search') |
55 | 55 | ||
56 | @endsection | 56 | @endsection |
57 | 57 | ||
58 | @section('content') | 58 | @section('content') |
59 | 59 | ||
60 | <a href="{{ route('admin.add-reclames') }}" style="width: 160px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 60 | <a href="{{ route('admin.add-reclames') }}" style="width: 160px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
61 | Добавить рекламу | 61 | Добавить рекламу |
62 | </a> | 62 | </a> |
63 | <br> | 63 | <br> |
64 | <pre><? //print_r($_SERVER);?></pre> | 64 | |
65 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 65 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
66 | 66 | ||
67 | |||
67 | <div class="w-full overflow-x-auto"> | 68 | <div class="w-full overflow-x-auto"> |
68 | <table class="w-full whitespace-no-wrap"> | 69 | <table class="w-full whitespace-no-wrap"> |
69 | <thead> | 70 | <thead> |
70 | <tr | 71 | <tr |
71 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 72 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
72 | > | 73 | > |
73 | <th class="px-4 py-3">№</th> | 74 | <th class="px-4 py-3">№</th> |
74 | <th class="px-4 py-3">Имя в админке/Заголовок</th> | 75 | <th class="px-4 py-3">Имя в админке/Заголовок</th> |
75 | <th class="px-4 py-3">Позиция</th> | 76 | <th class="px-4 py-3">Позиция</th> |
76 | <th class="px-4 py-3">Клики</th> | 77 | <th class="px-4 py-3">Клики</th> |
77 | <th class="px-4 py-3">Редактировать</th> | 78 | <th class="px-4 py-3">Редактировать</th> |
78 | </tr> | 79 | </tr> |
79 | </thead> | 80 | </thead> |
80 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 81 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
81 | @foreach($reclames as $reclame) | 82 | @foreach($reclames as $reclame) |
82 | <tr class="text-gray-700 dark:text-gray-400"> | 83 | <tr class="text-gray-700 dark:text-gray-400"> |
83 | <td class="px-4 py-3"> | 84 | <td class="px-4 py-3"> |
84 | {{$reclame->id}} | 85 | {{$reclame->id}} |
85 | </td> | 86 | </td> |
86 | <td class="px-4 py-3"> | 87 | <td class="px-4 py-3"> |
87 | <div class="flex items-center text-sm"> | 88 | <div class="flex items-center text-sm"> |
88 | <div> | 89 | <div> |
89 | <p class="font-semibold"> | 90 | <p class="font-semibold"> |
90 | {{$reclame->name}} | 91 | {{$reclame->name}} |
91 | </p> | 92 | </p> |
92 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 93 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
93 | {{$reclame->title}} | 94 | {{$reclame->title}} |
94 | </p> | 95 | </p> |
95 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 96 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
96 | {{$reclame->link}} | 97 | {{$reclame->link}} |
97 | </p> | 98 | </p> |
98 | </div> | 99 | </div> |
99 | </div> | 100 | </div> |
100 | </td> | 101 | </td> |
101 | <td class="px-4 py-3"> | 102 | <td class="px-4 py-3"> |
102 | {{$reclame->position}} | 103 | {{$reclame->position}} |
103 | </td> | 104 | </td> |
104 | 105 | ||
105 | <td class="px-4 py-3"> | 106 | <td class="px-4 py-3"> |
106 | {{$reclame->col_vo_click}} | 107 | {{$reclame->col_vo_click}} |
107 | </td> | 108 | </td> |
108 | <td class="px-4 py-3 text-sm_"> | 109 | <td class="px-4 py-3 text-sm_"> |
109 | <form action="{{ route('admin.delete-reclames', ['reclame' => $reclame->id]) }}" method="POST"> | 110 | <form action="{{ route('admin.delete-reclames', ['reclame' => $reclame->id]) }}" method="POST"> |
110 | <a href="{{ route('admin.edit-reclames', ['reclame' => $reclame->id]) }}" style="float:left">Изменить |</a> | 111 | <a href="{{ route('admin.edit-reclames', ['reclame' => $reclame->id]) }}" style="float:left">Изменить |</a> |
111 | @csrf | 112 | @csrf |
112 | @method('DELETE') | 113 | @method('DELETE') |
113 | @if ($reclame->is_hidden) | 114 | @if ($reclame->is_hidden) |
114 | <img class="btn-eye" name="btn_close_{{$reclame->id}}" data-status="close" data-id="{{$reclame->id}}" src="{{asset('/assets/img/close-eye.png')}}" style="width:25px; float:left; margin: 0px 5px 0px 5px; cursor: pointer;" /> | 115 | <img class="btn-eye" name="btn_close_{{$reclame->id}}" data-status="close" data-id="{{$reclame->id}}" src="{{asset('/assets/img/close-eye.png')}}" style="width:25px; float:left; margin: 0px 5px 0px 5px; cursor: pointer;" /> |
115 | @else | 116 | @else |
116 | <img class="btn-eye" name="btn_open_{{$reclame->id}}" data-status="open" data-id="{{$reclame->id}}" src="{{asset('/assets/img/open-eye.png')}}" style="width:25px; float: left; margin: 0px 5px 0px 5px; cursor: pointer;"/> | 117 | <img class="btn-eye" name="btn_open_{{$reclame->id}}" data-status="open" data-id="{{$reclame->id}}" src="{{asset('/assets/img/open-eye.png')}}" style="width:25px; float: left; margin: 0px 5px 0px 5px; cursor: pointer;"/> |
117 | @endif | 118 | @endif |
118 | 119 | ||
119 | <a @click="openModal" style="cursor: pointer;" data-reclame="{{$reclame->id}}" class="btn_del btn btn-danger">| Удалить</a> | 120 | <a @click="openModal" style="cursor: pointer;" data-reclame="{{$reclame->id}}" class="btn_del btn btn-danger">| Удалить</a> |
120 | <!--<input class="btn btn-danger" type="submit" style="float:left" value="Удалить"/>--> | 121 | <!--<input class="btn btn-danger" type="submit" style="float:left" value="Удалить"/>--> |
121 | </form> | 122 | </form> |
122 | </td> | 123 | </td> |
123 | </tr> | 124 | </tr> |
124 | @endforeach | 125 | @endforeach |
125 | </tbody> | 126 | </tbody> |
126 | </table> | 127 | </table> |
127 | </div> | 128 | </div> |
128 | 129 | ||
129 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 130 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
130 | <?=$reclames->appends($_GET)->links('admin.pagginate'); ?> | 131 | <?=$reclames->appends($_GET)->links('admin.pagginate'); ?> |
131 | </div> | 132 | </div> |
132 | </div> | 133 | </div> |
133 | @endsection | 134 | @endsection |
134 | 135 |
resources/views/ajax/list_category.blade.php
File was created | 1 | Категория: {{ $Name_categori[0]->name }} | |
2 |
resources/views/ajax/list_vacancies.blade.php
1 | @if ($Query->count()) | 1 | @if ($Query->count()) |
2 | @foreach ($Query as $Q) | 2 | @foreach ($Query as $Q) |
3 | <div class="main__vacancies-item main__employer-page-two-item"> | 3 | <div class="main__vacancies-item main__employer-page-two-item"> |
4 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | 4 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> |
5 | <svg> | 5 | <svg> |
6 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 6 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
7 | </svg> | 7 | </svg> |
8 | <span> | 8 | <span> |
9 | Вернуться к списку вакансий | 9 | Вернуться к списку вакансий |
10 | </span> | 10 | </span> |
11 | </a> | 11 | </a> |
12 | <div class="main__employer-page-two-item-toper"> | 12 | <div class="main__employer-page-two-item-toper"> |
13 | @if (isset($Q->employer)) | 13 | @if (isset($Q->employer)) |
14 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | 14 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> |
15 | @endif | 15 | @endif |
16 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> | 16 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> |
17 | </div> | 17 | </div> |
18 | <div class="main__employer-page-two-item-text"> | 18 | <div class="main__employer-page-two-item-text"> |
19 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 19 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор |
20 | специалистов на следующие должности:</div> | 20 | специалистов на следующие должности:</div> |
21 | <div class="main__employer-page-two-item-text-links"> | 21 | <div class="main__employer-page-two-item-text-links"> |
22 | @if (isset($Q->jobs)) | 22 | @if (isset($Q->jobs)) |
23 | @foreach ($Q->jobs as $key => $j) | 23 | @foreach ($Q->jobs as $key => $j) |
24 | <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> | 24 | <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> |
25 | @endforeach | 25 | @endforeach |
26 | @endif | 26 | @endif |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
29 | <div class="main__employer-page-two-item-text"> | 29 | <div class="main__employer-page-two-item-text"> |
30 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 30 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
31 | <div class="main__employer-page-two-item-text-body"> | 31 | <div class="main__employer-page-two-item-text-body"> |
32 | {!! $Q->text !!} | 32 | {!! $Q->text !!} |
33 | </div> | 33 | </div> |
34 | </div> | 34 | </div> |
35 | <div class="main__employer-page-two-item-text"> | 35 | <div class="main__employer-page-two-item-text"> |
36 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 36 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
37 | <div class="main__employer-page-two-item-text-body"> | 37 | <div class="main__employer-page-two-item-text-body"> |
38 | {!! $Q->description !!} | 38 | {!! $Q->description !!} |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
41 | <div class="main__employer-page-two-item-text"> | 41 | <div class="main__employer-page-two-item-text"> |
42 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 42 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
43 | <div class="main__employer-page-two-item-text-body"> | 43 | <div class="main__employer-page-two-item-text-body"> |
44 | {!! $Q->contacts_emails !!} | 44 | {!! $Q->contacts_emails !!} |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
47 | <div class="main__employer-page-two-item-text"> | 47 | <div class="main__employer-page-two-item-text"> |
48 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 48 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
49 | <div class="main__employer-page-two-item-text-body"> | 49 | <div class="main__employer-page-two-item-text-body"> |
50 | {!! $Q->contacts_telephones !!} | 50 | {!! $Q->contacts_telephones !!} |
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
53 | <div class="main__employer-page-two-item-tags"> | 53 | <div class="main__employer-page-two-item-tags"> |
54 | @if (isset($Q->jobs)) | 54 | @if (isset($Q->jobs)) |
55 | @foreach ($Q->jobs as $key => $j) | 55 | @foreach ($Q->jobs as $key => $j) |
56 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 56 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
57 | @endforeach | 57 | @endforeach |
58 | @endif | 58 | @endif |
59 | </div> | 59 | </div> |
60 | <div class="main__employer-page-two-item-buttons"> | 60 | <div class="main__employer-page-two-item-buttons"> |
61 | <button type="button" | 61 | <button type="button" |
62 | class="button main__employer-page-two-item-button">Откликнуться</button> | 62 | class="button main__employer-page-two-item-button">Откликнуться</button> |
63 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | 63 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> |
64 | </div> | 64 | </div> |
65 | <div class="main__employer-page-two-item-bottom"> | 65 | <div class="main__employer-page-two-item-bottom"> |
66 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> | 66 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> |
67 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> | 67 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js-toggle <?=App\Classes\Cookies_vacancy::selected_vacancy($Q->id);?>"> |
68 | <svg> | 68 | <svg> |
69 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 69 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
70 | </svg> | 70 | </svg> |
71 | </button> | 71 | </button> |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | @endforeach | 74 | @endforeach |
75 | <div style="margin-top: 20px"> | 75 | <div style="margin-top: 20px"> |
76 | {{ $Query->appends($_GET)->links('paginate') }} | 76 | {{ $Query->appends($_GET)->links('paginate') }} |
77 | </div> | 77 | </div> |
78 | @else | 78 | @else |
79 | <div class="main__vacancies-item main__employer-page-two-item"> | 79 | <div class="main__vacancies-item main__employer-page-two-item"> |
80 | Нет вакансий по данному запросу | 80 | Нет вакансий по данному запросу |
81 | </div> | 81 | </div> |
82 | @endif | 82 | @endif |
83 | 83 |
resources/views/detail_new.blade.php
1 | @extends('layout.frontend', ['title' => $title.' - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => $title.' - РекаМоре']) |
2 | @section('scripts') | 2 | @section('scripts') |
3 | <script> | 3 | <script> |
4 | console.log('Test system'); | 4 | console.log('Test system'); |
5 | $(document).on('change', '#sort_ajax', function() { | 5 | $(document).on('change', '#sort_ajax', function() { |
6 | var this_ = $(this); | 6 | var this_ = $(this); |
7 | var val_ = this_.val(); | 7 | var val_ = this_.val(); |
8 | console.log('sort items '+val_); | 8 | console.log('sort items '+val_); |
9 | 9 | ||
10 | $.ajax({ | 10 | $.ajax({ |
11 | type: "GET", | 11 | type: "GET", |
12 | url: "{{ route('education') }}", | 12 | url: "{{ route('education') }}", |
13 | data: "sort="+val_+"&block=1", | 13 | data: "sort="+val_+"&block=1", |
14 | success: function (data) { | 14 | success: function (data) { |
15 | console.log('Выбор сортировки'); | 15 | console.log('Выбор сортировки'); |
16 | console.log(data); | 16 | console.log(data); |
17 | $('#block').html(data); | 17 | $('#block').html(data); |
18 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 18 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
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 | 29 | ||
30 | $(document).ready(function(){ | 30 | $(document).ready(function(){ |
31 | var sel = $('#select2-sort_ajax-container'); | 31 | var sel = $('#select2-sort_ajax-container'); |
32 | var key = getUrlParameter('sort'); | 32 | var key = getUrlParameter('sort'); |
33 | console.log(sel); | 33 | console.log(sel); |
34 | console.log(key); | 34 | console.log(key); |
35 | 35 | ||
36 | if (key !=='') { | 36 | if (key !=='') { |
37 | console.log(key); | 37 | console.log(key); |
38 | switch (key) { | 38 | switch (key) { |
39 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 39 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
40 | case "name_up": sel.html('По имени (возрастание)'); break; | 40 | case "name_up": sel.html('По имени (возрастание)'); break; |
41 | case "name_down": sel.html('По дате (убывание)'); break; | 41 | case "name_down": sel.html('По дате (убывание)'); break; |
42 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 42 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
43 | case "created_at_down": sel.html('По дате (убывание)'); break; | 43 | case "created_at_down": sel.html('По дате (убывание)'); break; |
44 | } | 44 | } |
45 | 45 | ||
46 | } | 46 | } |
47 | }); | 47 | }); |
48 | </script> | 48 | </script> |
49 | @endsection | 49 | @endsection |
50 | @section('content') | 50 | @section('content') |
51 | <section class="thing"> | 51 | <section class="thing"> |
52 | <div class="container"> | 52 | <div class="container"> |
53 | <div class="thing__body"> | 53 | <div class="thing__body"> |
54 | <ul class="breadcrumbs thing__breadcrumbs"> | 54 | <ul class="breadcrumbs thing__breadcrumbs"> |
55 | <li><a href="{{ route('index') }}">Главная</a></li> | 55 | <li><a href="{{ route('index') }}">Главная</a></li> |
56 | <li><a href="{{ route('news') }}">Новости и статьи</a></li> | 56 | <li><a href="{{ route('news') }}">Новости и статьи</a></li> |
57 | <li><b>{{ $title }}</b></li> | 57 | <li><b>{{ $title }}</b></li> |
58 | </ul> | 58 | </ul> |
59 | <img src="{{ asset(Storage::url($Query[0]->image)) }}" alt="{{ $title }}" class="thing__pic thing__pic_two"> | 59 | <img src="{{ asset(Storage::url($Query[0]->image)) }}" alt="{{ $title }}" class="thing__pic thing__pic_two"> |
60 | <time class="thing__date">{{ date('d.m.Y H:i:s', strtotime($Query[0]->created_at)) }}</time> | 60 | <time class="thing__date">{{ date('d.m.Y H:i:s', strtotime($Query[0]->created_at)) }}</time> |
61 | <h1 class="thing__title">{{ $title }}</h1> | 61 | <h1 class="thing__title">{{ $title }}</h1> |
62 | <p class="thing__text">{{ mb_strimwidth($Query[0]->text, 0, 100, "...") }}</p> | 62 | <p class="thing__text">{{ mb_strimwidth($Query[0]->text, 0, 100, "...") }}</p> |
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | </section> | 65 | </section> |
66 | 66 | ||
67 | 67 | ||
68 | <main class="main"> | 68 | <main class="main"> |
69 | <div class="container"> | 69 | <div class="container"> |
70 | <div class="main__content"> | 70 | <div class="main__content"> |
71 | <div class="main__content-item"> | 71 | <div class="main__content-item"> |
72 | <h2>{{ $Query[0]->title }}</h2> | 72 | <h2>{{ $Query[0]->title }}</h2> |
73 | <p>{!! $Query[0]->text !!}</p> | 73 | <p>{!! $Query[0]->text !!}</p> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | </main> | ||
78 | <section class="news"> | 77 | </main> |
79 | <div class="container"> | 78 | <section class="news"> |
80 | <div class="news__toper"> | 79 | <div class="container"> |
81 | <div class="title">Новости и статьи</div> | 80 | <div class="news__toper"> |
82 | <div class="navs"> | 81 | <div class="title">Новости и статьи</div> |
83 | <button class="js-news-swiper-button-prev"> | 82 | <div class="navs"> |
84 | <svg class="rotate180"> | 83 | <button class="js-news-swiper-button-prev"> |
85 | <use xlink:href="images/sprite.svg#arrow"></use> | 84 | <svg class="rotate180"> |
86 | </svg> | 85 | <use xlink:href="images/sprite.svg#arrow"></use> |
87 | </button> | 86 | </svg> |
88 | <button class="js-news-swiper-button-next"> | 87 | </button> |
89 | <svg> | 88 | <button class="js-news-swiper-button-next"> |
90 | <use xlink:href="images/sprite.svg#arrow"></use> | 89 | <svg> |
91 | </svg> | 90 | <use xlink:href="images/sprite.svg#arrow"></use> |
92 | </button> | 91 | </svg> |
93 | </div> | 92 | </button> |
94 | </div> | 93 | </div> |
95 | <div class="swiper js-news-swiper"> | 94 | </div> |
96 | <div class="swiper-wrapper"> | 95 | <div class="swiper js-news-swiper"> |
97 | @if ($All_Query->count()) | 96 | <div class="swiper-wrapper"> |
98 | @foreach($All_Query as $Q_item) | 97 | @if ($All_Query->count()) |
99 | <div class="swiper-slide"> | 98 | @foreach($All_Query as $Q_item) |
100 | <div class="news__item"> | 99 | <div class="swiper-slide"> |
101 | <img src="{{ asset(Storage::url($Q_item->image)) }}" alt="{{ $Q_item->title }}" class="news__item-pic"> | 100 | <div class="news__item"> |
102 | <div class="news__item-body"> | 101 | <img src="{{ asset(Storage::url($Q_item->image)) }}" alt="{{ $Q_item->title }}" class="news__item-pic"> |
103 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}</time> | 102 | <div class="news__item-body"> |
104 | <span class="news__item-title">{{ $Q_item->title }}</span> | 103 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}</time> |
105 | <span class="news__item-text">{!! $Q_item->text !!}</span> | 104 | <span class="news__item-title">{{ $Q_item->title }}</span> |
106 | <a href="{{ route('detail_new', ['new' => $Q_item->id]) }}" class="news__item-more button button_light">Читать далее</a> | 105 | <span class="news__item-text">{!! $Q_item->text !!}</span> |
107 | </div> | 106 | <a href="{{ route('detail_new', ['new' => $Q_item->id]) }}" class="news__item-more button button_light">Читать далее</a> |
108 | </div> | 107 | </div> |
109 | </div> | 108 | </div> |
110 | @endforeach | 109 | </div> |
111 | @endif | 110 | @endforeach |
112 | </div> | 111 | @endif |
113 | <div class="swiper-pagination"></div> | 112 | </div> |
114 | </div> | 113 | <div class="swiper-pagination"></div> |
115 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> | 114 | </div> |
116 | </div> | 115 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> |
117 | </section> | 116 | </div> |
118 | </div> | 117 | </section> |
119 | @endsection | 118 | </div> |
120 | 119 | @endsection |
resources/views/employers/add_vacancy.blade.php
1 | @extends('layout.frontend', ['title' => 'Добавление вакансии РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Добавление вакансии РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | @endsection | 4 | @endsection |
5 | @section('content') | 5 | @section('content') |
6 | <section class="cabinet"> | 6 | <section class="cabinet"> |
7 | <div class="container"> | 7 | <div class="container"> |
8 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 8 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
9 | <li><a href="{{ route('index') }}">Главная</a></li> | 9 | <li><a href="{{ route('index') }}">Главная</a></li> |
10 | <li><b>Личный кабинет</b></li> | 10 | <li><b>Личный кабинет</b></li> |
11 | </ul> | 11 | </ul> |
12 | <div class="cabinet__wrapper"> | 12 | <div class="cabinet__wrapper"> |
13 | <div class="cabinet__side"> | 13 | <div class="cabinet__side"> |
14 | <div class="cabinet__side-toper"> | 14 | <div class="cabinet__side-toper"> |
15 | <div class="cabinet__side-toper-pic"> | 15 | <div class="cabinet__side-toper-pic"> |
16 | @if (isset($Employer[0]->logo)) | 16 | @if (isset($Employer[0]->logo)) |
17 | <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> | 17 | <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> |
18 | @else | 18 | @else |
19 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> | 19 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> |
20 | @endif | 20 | @endif |
21 | </div> | 21 | </div> |
22 | <b>{{ $Employer[0]->name_company }}</b> | 22 | <b>{{ $Employer[0]->name_company }}</b> |
23 | </div> | 23 | </div> |
24 | 24 | ||
25 | @include('employers.menu', ['item' => 2]) | 25 | @include('employers.menu', ['item' => 2]) |
26 | 26 | ||
27 | </div> | 27 | </div> |
28 | 28 | ||
29 | <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> | 29 | <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> |
30 | @csrf | 30 | @csrf |
31 | <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/> | 31 | <input type="hidden" name="employer_id" value="{{ $Employer[0]->id }}"/> |
32 | <div class="cabinet__body-item"> | 32 | <div class="cabinet__body-item"> |
33 | <div class="cabinet__descr"> | 33 | <div class="cabinet__descr"> |
34 | <h2 class="title cabinet__title">Разместить вакансию</h2> | 34 | <h2 class="title cabinet__title">Разместить вакансию</h2> |
35 | <p class="cabinet__text"><b>Данные по вакансии</b></p> | 35 | <p class="cabinet__text"><b>Данные по вакансии</b></p> |
36 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> | 36 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | <div class="cabinet__body-item"> | 39 | <div class="cabinet__body-item"> |
40 | <div class="cabinet__inputs"> | 40 | <div class="cabinet__inputs"> |
41 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 41 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
42 | <label class="form-group__label">Название вакансии</label> | 42 | <label class="form-group__label">Название вакансии</label> |
43 | <div class="form-group__item"> | 43 | <div class="form-group__item"> |
44 | <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required> | 44 | <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $Employer[0]->name ?? '' }}" required> |
45 | @error('name') | 45 | @error('name') |
46 | <span class="text-xs text-red-600 dark:text-red-400"> | 46 | <span class="text-xs text-red-600 dark:text-red-400"> |
47 | {{ $message }} | 47 | {{ $message }} |
48 | </span> | 48 | </span> |
49 | @enderror | 49 | @enderror |
50 | </div> | 50 | </div> |
51 | </div> | 51 | </div> |
52 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 52 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
53 | <label class="form-group__label">Должность соискателя</label> | 53 | <label class="form-group__label">Должность соискателя</label> |
54 | <div class="form-group__item"> | 54 | <div class="form-group__item"> |
55 | <div class="select"> | 55 | <div class="select"> |
56 | <select class="js-select2" name="job_title_id" id="job_title_id"> | 56 | <select class="js-select2" name="job_title_id" id="job_title_id"> |
57 | @php $i = 1 @endphp | 57 | @php $i = 1 @endphp |
58 | @if ($jobs->count()) | 58 | @if ($jobs->count()) |
59 | @foreach($jobs as $j) | 59 | @foreach($jobs as $j) |
60 | @if ($i == 1) <option selected> Выберите должность из списка</option> | 60 | @if ($i == 1) <option selected> Выберите должность из списка</option> |
61 | @else | 61 | @else |
62 | <option value="{{ $j->id }}">{{ $j->name }}</option> | 62 | <option value="{{ $j->id }}">{{ $j->name }}</option> |
63 | @endif | 63 | @endif |
64 | @php $i++ @endphp | 64 | @php $i++ @endphp |
65 | @endforeach | 65 | @endforeach |
66 | @endif | 66 | @endif |
67 | </select> | 67 | </select> |
68 | @error('job_title_id') | ||
69 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
70 | {{ $message }} | ||
71 | </span> | ||
72 | @enderror | ||
73 | </div> | ||
74 | </div> | ||
75 | </div> | ||
76 | |||
77 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
78 | <label class="form-group__label">Категория (локация)</label> | ||
79 | <div class="form-group__item"> | ||
80 | <div class="select"> | ||
81 | <select class="js-select2" name="category_id" id="category_id"> | ||
82 | @php $i = 1 @endphp | ||
83 | @if ($categories->count()) | ||
84 | @foreach($categories as $j) | ||
85 | @if ($i == 1) <option selected> Выберите категорию из списка</option> | ||
86 | @else | ||
87 | <option value="{{ $j->id }}">{{ $j->name }}</option> | ||
88 | @endif | ||
89 | @php $i++ @endphp | ||
90 | @endforeach | ||
91 | @endif | ||
92 | </select> | ||
68 | @error('category_id') | 93 | @error('category_id') |
69 | <span class="text-xs text-red-600 dark:text-red-400"> | 94 | <span class="text-xs text-red-600 dark:text-red-400"> |
70 | {{ $message }} | 95 | {{ $message }} |
71 | </span> | 96 | </span> |
72 | @enderror | 97 | @enderror |
73 | </div> | 98 | </div> |
74 | </div> | 99 | </div> |
75 | </div> | 100 | </div> |
101 | |||
76 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 102 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
77 | <label class="form-group__label">Телефон</label> | 103 | <label class="form-group__label">Телефон</label> |
78 | <div class="form-group__item"> | 104 | <div class="form-group__item"> |
79 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> | 105 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> |
80 | @error('telephone') | 106 | @error('telephone') |
81 | <span class="text-xs text-red-600 dark:text-red-400"> | 107 | <span class="text-xs text-red-600 dark:text-red-400"> |
82 | {{ $message }} | 108 | {{ $message }} |
83 | </span> | 109 | </span> |
84 | @enderror | 110 | @enderror |
85 | </div> | 111 | </div> |
86 | </div> | 112 | </div> |
87 | 113 | ||
88 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 114 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
89 | <label class="form-group__label">Емайл</label> | 115 | <label class="form-group__label">Емайл</label> |
90 | <div class="form-group__item"> | 116 | <div class="form-group__item"> |
91 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> | 117 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> |
92 | @error('email') | 118 | @error('email') |
93 | <span class="text-xs text-red-600 dark:text-red-400"> | 119 | <span class="text-xs text-red-600 dark:text-red-400"> |
94 | {{ $message }} | 120 | {{ $message }} |
95 | </span> | 121 | </span> |
96 | @enderror | 122 | @enderror |
97 | </div> | 123 | </div> |
98 | </div> | 124 | </div> |
99 | 125 | ||
100 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 126 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
101 | <label class="form-group__label">Зарплата среднестатистическая</label> | 127 | <label class="form-group__label">Зарплата среднестатистическая</label> |
102 | <div class="form-group__item"> | 128 | <div class="form-group__item"> |
103 | <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? '' }}" placeholder="Среднестатистическая зарплата"> | 129 | <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? '' }}" placeholder="Среднестатистическая зарплата"> |
104 | @error('salary') | 130 | @error('salary') |
105 | <span class="text-xs text-red-600 dark:text-red-400"> | 131 | <span class="text-xs text-red-600 dark:text-red-400"> |
106 | {{ $message }} | 132 | {{ $message }} |
107 | </span> | 133 | </span> |
108 | @enderror | 134 | @enderror |
109 | </div> | 135 | </div> |
110 | </div> | 136 | </div> |
111 | 137 | ||
112 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 138 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
113 | <label class="form-group__label">Минимальная зарплата</label> | 139 | <label class="form-group__label">Минимальная зарплата</label> |
114 | <div class="form-group__item"> | 140 | <div class="form-group__item"> |
115 | <input type="text" class="input" name="min_salary" id="min_salary" value="{{ old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> | 141 | <input type="text" class="input" name="min_salary" id="min_salary" value="{{ old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> |
116 | @error('min_salary') | 142 | @error('min_salary') |
117 | <span class="text-xs text-red-600"> | 143 | <span class="text-xs text-red-600"> |
118 | {{ $message }} | 144 | {{ $message }} |
119 | </span> | 145 | </span> |
120 | @enderror | 146 | @enderror |
121 | </div> | 147 | </div> |
122 | </div> | 148 | </div> |
123 | 149 | ||
124 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 150 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
125 | <label class="form-group__label">Максимальная зарплата</label> | 151 | <label class="form-group__label">Максимальная зарплата</label> |
126 | <div class="form-group__item"> | 152 | <div class="form-group__item"> |
127 | <input type="text" class="input" name="max_salary" id="max_salary" value="{{ old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> | 153 | <input type="text" class="input" name="max_salary" id="max_salary" value="{{ old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> |
128 | @error('salary') | 154 | @error('salary') |
129 | <span class="text-xs text-red-600 dark:text-red-400"> | 155 | <span class="text-xs text-red-600 dark:text-red-400"> |
130 | {{ $message }} | 156 | {{ $message }} |
131 | </span> | 157 | </span> |
132 | @enderror | 158 | @enderror |
133 | </div> | 159 | </div> |
134 | </div> | 160 | </div> |
135 | 161 | ||
136 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 162 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
137 | <label class="form-group__label">Город-регион</label> | 163 | <label class="form-group__label">Город-регион</label> |
138 | <div class="form-group__item"> | 164 | <div class="form-group__item"> |
139 | <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> | 165 | <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> |
140 | @error('city') | 166 | @error('city') |
141 | <span class="text-xs text-red-600"> | 167 | <span class="text-xs text-red-600"> |
142 | {{ $message }} | 168 | {{ $message }} |
143 | </span> | 169 | </span> |
144 | @enderror | 170 | @enderror |
145 | </div> | 171 | </div> |
146 | </div> | 172 | </div> |
147 | 173 | ||
148 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 174 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
149 | <label class="form-group__label">Мощность</label> | 175 | <label class="form-group__label">Мощность</label> |
150 | <div class="form-group__item"> | 176 | <div class="form-group__item"> |
151 | <input type="text" class="input" name="power" id="power" value="{{ old('power') ?? '' }}" placeholder="POWER-45"> | 177 | <input type="text" class="input" name="power" id="power" value="{{ old('power') ?? '' }}" placeholder="POWER-45"> |
152 | @error('power') | 178 | @error('power') |
153 | <span class="text-xs text-red-600"> | 179 | <span class="text-xs text-red-600"> |
154 | {{ $message }} | 180 | {{ $message }} |
155 | </span> | 181 | </span> |
156 | @enderror | 182 | @enderror |
157 | </div> | 183 | </div> |
158 | </div> | 184 | </div> |
159 | 185 | ||
160 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 186 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
161 | <label class="form-group__label">Суточные выплаты</label> | 187 | <label class="form-group__label">Суточные выплаты</label> |
162 | <div class="form-group__item"> | 188 | <div class="form-group__item"> |
163 | <input type="text" class="input" name="sytki" id="sytki" value="{{ old('sytki') ?? '' }}" placeholder="2000"> | 189 | <input type="text" class="input" name="sytki" id="sytki" value="{{ old('sytki') ?? '' }}" placeholder="2000"> |
164 | @error('power') | 190 | @error('power') |
165 | <span class="text-xs text-red-600"> | 191 | <span class="text-xs text-red-600"> |
166 | {{ $message }} | 192 | {{ $message }} |
167 | </span> | 193 | </span> |
168 | @enderror | 194 | @enderror |
169 | </div> | 195 | </div> |
170 | </div> | 196 | </div> |
171 | 197 | ||
172 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 198 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
173 | <label class="form-group__label">Начало отплытия</label> | 199 | <label class="form-group__label">Начало отплытия</label> |
174 | <div class="form-group__item"> | 200 | <div class="form-group__item"> |
175 | <input type="text" class="input" name="start" id="start" value="{{ old('start') ?? '' }}" placeholder="20 сентября 2024"> | 201 | <input type="text" class="input" name="start" id="start" value="{{ old('start') ?? '' }}" placeholder="20 сентября 2024"> |
176 | @error('power') | 202 | @error('power') |
177 | <span class="text-xs text-red-600"> | 203 | <span class="text-xs text-red-600"> |
178 | {{ $message }} | 204 | {{ $message }} |
179 | </span> | 205 | </span> |
180 | @enderror | 206 | @enderror |
181 | </div> | 207 | </div> |
182 | </div> | 208 | </div> |
183 | 209 | ||
184 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 210 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
185 | <label class="form-group__label">Корабль для посадки</label> | 211 | <label class="form-group__label">Корабль для посадки</label> |
186 | <div class="form-group__item"> | 212 | <div class="form-group__item"> |
187 | <div class="select"> | 213 | <div class="select"> |
188 | <select class="js-select2" name="flot" id="flot"> | 214 | <select class="js-select2" name="flot" id="flot"> |
189 | <option value="" selected> Не указан корабль</option> | 215 | <option value="" selected> Не указан корабль</option> |
190 | @if ($Employer[0]->flots->count()) | 216 | @if ($Employer[0]->flots->count()) |
191 | @foreach($Employer[0]->flots as $j) | 217 | @foreach($Employer[0]->flots as $j) |
192 | <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> | 218 | <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> |
193 | @endforeach | 219 | @endforeach |
194 | @endif | 220 | @endif |
195 | </select> | 221 | </select> |
196 | @error('flot') | 222 | @error('flot') |
197 | <span class="text-xs text-red-600"> | 223 | <span class="text-xs text-red-600"> |
198 | {{ $message }} | 224 | {{ $message }} |
199 | </span> | 225 | </span> |
200 | @enderror | 226 | @enderror |
201 | </div> | 227 | </div> |
202 | </div> | 228 | </div> |
203 | </div> | 229 | </div> |
204 | 230 | ||
205 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 231 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
206 | <label class="form-group__label">Описание вакансии</label> | 232 | <label class="form-group__label">Описание вакансии</label> |
207 | <div class="form-group__item"> | 233 | <div class="form-group__item"> |
208 | <textarea class="textarea" name="text" id="text">{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> | 234 | <textarea class="textarea" name="text" id="text">{{ $Employer[0]->text ?? '' }}</textarea> |
209 | @error('text') | 235 | @error('text') |
210 | <span class="text-xs text-red-600"> | 236 | <span class="text-xs text-red-600"> |
211 | {{ $message }} | 237 | {{ $message }} |
212 | </span> | 238 | </span> |
213 | @enderror | 239 | @enderror |
214 | </div> | 240 | </div> |
215 | </div> | 241 | </div> |
216 | 242 | ||
217 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 243 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
218 | <label class="form-group__label">Дополнительная информация</label> | 244 | <label class="form-group__label">Дополнительная информация</label> |
219 | <div class="form-group__item"> | 245 | <div class="form-group__item"> |
220 | <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> | 246 | <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> |
221 | @error('text') | 247 | @error('description') |
222 | <span class="text-xs text-red-600"> | 248 | <span class="text-xs text-red-600"> |
223 | {{ $message }} | 249 | {{ $message }} |
224 | </span> | 250 | </span> |
225 | @enderror | 251 | @enderror |
226 | </div> | 252 | </div> |
227 | </div> | 253 | </div> |
228 | </div> | 254 | </div> |
229 | <button type="submit" class="button cabinet__submit">Опубликовать</button> | 255 | <button type="submit" class="button cabinet__submit">Опубликовать</button> |
230 | </div> | 256 | </div> |
231 | </form> | 257 | </form> |
232 | </div> | 258 | </div> |
233 | </div> | 259 | </div> |
234 | </section> | 260 | </section> |
235 | </div> | 261 | </div> |
236 | @endsection | 262 | @endsection |
237 | 263 |
resources/views/employers/edit_vacancy.blade.php
1 | @extends('layout.frontend', ['title' => 'Редактирование вакансии РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Редактирование вакансии РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | @section('content') | 6 | @section('content') |
7 | <section class="cabinet"> | 7 | <section class="cabinet"> |
8 | <div class="container"> | 8 | <div class="container"> |
9 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 9 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
10 | <li><a href="{{ route('index') }}">Главная</a></li> | 10 | <li><a href="{{ route('index') }}">Главная</a></li> |
11 | <li><b>Личный кабинет</b></li> | 11 | <li><b>Личный кабинет</b></li> |
12 | </ul> | 12 | </ul> |
13 | <div class="cabinet__wrapper"> | 13 | <div class="cabinet__wrapper"> |
14 | <div class="cabinet__side"> | 14 | <div class="cabinet__side"> |
15 | <div class="cabinet__side-toper"> | 15 | <div class="cabinet__side-toper"> |
16 | <div class="cabinet__side-toper-pic"> | 16 | <div class="cabinet__side-toper-pic"> |
17 | @if (isset($Employer->logo)) | 17 | @if (isset($Employer->logo)) |
18 | <img src="{{ asset(Storage::url($Employer->logo)) }}" width="150" alt="{{ $Employer->name_company }}"> | 18 | <img src="{{ asset(Storage::url($Employer->logo)) }}" width="150" alt="{{ $Employer->name_company }}"> |
19 | @else | 19 | @else |
20 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer->name_company }}"/> | 20 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer->name_company }}"/> |
21 | @endif | 21 | @endif |
22 | </div> | 22 | </div> |
23 | <b>{{ $Employer->name_company }}</b> | 23 | <b>{{ $Employer->name_company }}</b> |
24 | </div> | 24 | </div> |
25 | 25 | ||
26 | @include('employers.menu', ['item' => 0]) | 26 | @include('employers.menu', ['item' => 0]) |
27 | 27 | ||
28 | </div> | 28 | </div> |
29 | 29 | ||
30 | <form class="cabinet__body" action="{{ route('employer.vac_save') }}" method="POST"> | 30 | <form class="cabinet__body" action="{{ route('employer.vacancy_save_me', ['ad_employer' => $ad_employer]) }}" method="POST"> |
31 | @csrf | 31 | @csrf |
32 | <input type="hidden" name="employer_id" value="{{ $Employer->id }}"/> | 32 | <input type="hidden" name="employer_id" value="{{ $Employer->id }}"/> |
33 | <div class="cabinet__body-item"> | 33 | <div class="cabinet__body-item"> |
34 | <div class="cabinet__descr"> | 34 | <div class="cabinet__descr"> |
35 | <h2 class="title cabinet__title">Редактировать вакансию</h2> | 35 | <h2 class="title cabinet__title">Редактировать вакансию</h2> |
36 | <p class="cabinet__text"><b>Данные по вакансии</b></p> | 36 | <p class="cabinet__text"><b>Данные по вакансии</b></p> |
37 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> | 37 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | <div class="cabinet__body-item"> | 40 | <div class="cabinet__body-item"> |
41 | <div class="cabinet__inputs"> | 41 | <div class="cabinet__inputs"> |
42 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 42 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
43 | <label class="form-group__label">Название вакансии</label> | 43 | <label class="form-group__label">Название вакансии</label> |
44 | <div class="form-group__item"> | 44 | <div class="form-group__item"> |
45 | <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $ad_employer->name ?? '' }}" required> | 45 | <input type="text" class="input" name="name" id="name" placeholder="Работа в море" value="{{ old('name') ?? $ad_employer->name ?? '' }}" required> |
46 | @error('name') | 46 | @error('name') |
47 | <span class="text-xs text-red-600"> | 47 | <span class="text-xs text-red-600"> |
48 | {{ $message }} | 48 | {{ $message }} |
49 | </span> | 49 | </span> |
50 | @enderror | 50 | @enderror |
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
53 | 53 | ||
54 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 54 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
55 | <label class="form-group__label">Должность соискателя</label> | 55 | <label class="form-group__label">Должность соискателя</label> |
56 | <div class="form-group__item"> | 56 | <div class="form-group__item"> |
57 | <div class="select"> | 57 | <div class="select"> |
58 | <select class="js-select2" name="job_title_id" id="job_title_id"> | 58 | <select class="js-select2" name="job_title_id" id="job_title_id"> |
59 | <option value="0"> Выберите должность из списка</option> | 59 | <option value="0"> Выберите должность из списка</option> |
60 | 60 | ||
61 | @if ($jobs->count()) | 61 | @if ($jobs->count()) |
62 | @foreach($jobs as $j) | 62 | @foreach($jobs as $j) |
63 | <option value="{{ $j->id }}" @if ($j->id == $ad_employer->id) selected @endif>{{ $j->name }}</option> | 63 | <option value="{{ $j->id }}" @if ($j->id == $ad_employer->id) selected @endif>{{ $j->name }}</option> |
64 | @endforeach | 64 | @endforeach |
65 | @endif | 65 | @endif |
66 | </select> | 66 | </select> |
67 | @error('job_title_id') | 67 | @error('job_title_id') |
68 | <span class="text-xs text-red-600"> | 68 | <span class="text-xs text-red-600"> |
69 | {{ $message }} | 69 | {{ $message }} |
70 | </span> | 70 | </span> |
71 | @enderror | 71 | @enderror |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | </div> | 74 | </div> |
75 | 75 | ||
76 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 76 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
77 | <label class="form-group__label">Категория (локация)</label> | ||
78 | <div class="form-group__item"> | ||
79 | <div class="select"> | ||
80 | <select class="js-select2" name="category_id" id="category_id"> | ||
81 | @php $i = 1 @endphp | ||
82 | @if ($categories->count()) | ||
83 | @foreach($categories as $j) | ||
84 | @if ($i == 1) <option selected> Выберите категорию из списка</option> | ||
85 | @else | ||
86 | <option value="{{ $j->id }}">{{ $j->name }}</option> | ||
87 | @endif | ||
88 | @php $i++ @endphp | ||
89 | @endforeach | ||
90 | @endif | ||
91 | </select> | ||
92 | @error('category_id') | ||
93 | <span class="text-xs text-red-600 dark:text-red-400"> | ||
94 | {{ $message }} | ||
95 | </span> | ||
96 | @enderror | ||
97 | </div> | ||
98 | </div> | ||
99 | </div> | ||
100 | |||
101 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | ||
77 | <label class="form-group__label">Телефон</label> | 102 | <label class="form-group__label">Телефон</label> |
78 | <div class="form-group__item"> | 103 | <div class="form-group__item"> |
79 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer->telephone ?? '' }}" placeholder="Свой телефон"> | 104 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer->telephone ?? '' }}" placeholder="Свой телефон"> |
80 | @error('telephone') | 105 | @error('telephone') |
81 | <span class="text-xs text-red-600"> | 106 | <span class="text-xs text-red-600"> |
82 | {{ $message }} | 107 | {{ $message }} |
83 | </span> | 108 | </span> |
84 | @enderror | 109 | @enderror |
85 | </div> | 110 | </div> |
86 | </div> | 111 | </div> |
87 | 112 | ||
88 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 113 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
89 | <label class="form-group__label">Емайл</label> | 114 | <label class="form-group__label">Емайл</label> |
90 | <div class="form-group__item"> | 115 | <div class="form-group__item"> |
91 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer->email ?? '' }}" placeholder="Своя почту"> | 116 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer->email ?? '' }}" placeholder="Своя почту"> |
92 | @error('email') | 117 | @error('email') |
93 | <span class="text-xs text-red-600"> | 118 | <span class="text-xs text-red-600"> |
94 | {{ $message }} | 119 | {{ $message }} |
95 | </span> | 120 | </span> |
96 | @enderror | 121 | @enderror |
97 | </div> | 122 | </div> |
98 | </div> | 123 | </div> |
99 | 124 | ||
100 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 125 | <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
101 | <label class="form-group__label">Зарплата среднестатистическая</label> | 126 | <label class="form-group__label">Зарплата среднестатистическая</label> |
102 | <div class="form-group__item"> | 127 | <div class="form-group__item"> |
103 | <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? '' }}" placeholder="Среднестатистическая зарплата"> | 128 | <input type="text" class="input" name="salary" id="salary" value="old('salary') ?? '' }}" placeholder="Среднестатистическая зарплата"> |
104 | @error('salary') | 129 | @error('salary') |
105 | <span class="text-xs text-red-600"> | 130 | <span class="text-xs text-red-600"> |
106 | {{ $message }} | 131 | {{ $message }} |
107 | </span> | 132 | </span> |
108 | @enderror | 133 | @enderror |
109 | </div> | 134 | </div> |
110 | </div> | 135 | </div> |
111 | 136 | ||
112 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 137 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
113 | <label class="form-group__label">Минимальная зарплата</label> | 138 | <label class="form-group__label">Минимальная зарплата</label> |
114 | <div class="form-group__item"> | 139 | <div class="form-group__item"> |
115 | <input type="text" class="input" name="min_salary" id="min_salary" value="{{ old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> | 140 | <input type="text" class="input" name="min_salary" id="min_salary" value=" old('min_salary') ?? '' }}" placeholder="Минимальная зарплата"> |
116 | @error('min_salary') | 141 | @error('min_salary') |
117 | <span class="text-xs text-red-600"> | 142 | <span class="text-xs text-red-600"> |
118 | {{ $message }} | 143 | {{ $message }} |
119 | </span> | 144 | </span> |
120 | @enderror | 145 | @enderror |
121 | </div> | 146 | </div> |
122 | </div> | 147 | </div> |
123 | 148 | ||
124 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 149 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
125 | <label class="form-group__label">Максимальная зарплата</label> | 150 | <label class="form-group__label">Максимальная зарплата</label> |
126 | <div class="form-group__item"> | 151 | <div class="form-group__item"> |
127 | <input type="text" class="input" name="max_salary" id="max_salary" value="{{ old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> | 152 | <input type="text" class="input" name="max_salary" id="max_salary" value=" old('max_salary') ?? '' }}" placeholder="Максимальная зарплата"> |
128 | @error('salary') | 153 | @error('salary') |
129 | <span class="text-xs text-red-600 dark:text-red-400"> | 154 | <span class="text-xs text-red-600 dark:text-red-400"> |
130 | {{ $message }} | 155 | {{ $message }} |
131 | </span> | 156 | </span> |
132 | @enderror | 157 | @enderror |
133 | </div> | 158 | </div> |
134 | </div> | 159 | </div> |
135 | 160 | ||
136 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 161 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
137 | <label class="form-group__label">Город-регион</label> | 162 | <label class="form-group__label">Город-регион</label> |
138 | <div class="form-group__item"> | 163 | <div class="form-group__item"> |
139 | <input type="text" class="input" name="city" id="city" value="{{ old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> | 164 | <input type="text" class="input" name="city" id="city" value=" old('city') ?? $Employer[0]->city ?? '' }}" placeholder="Севастополь"> |
140 | @error('city') | 165 | @error('city') |
141 | <span class="text-xs text-red-600"> | 166 | <span class="text-xs text-red-600"> |
142 | {{ $message }} | 167 | {{ $message }} |
143 | </span> | 168 | </span> |
144 | @enderror | 169 | @enderror |
145 | </div> | 170 | </div> |
146 | </div> | 171 | </div> |
147 | 172 | ||
148 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 173 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
149 | <label class="form-group__label">Мощность</label> | 174 | <label class="form-group__label">Мощность</label> |
150 | <div class="form-group__item"> | 175 | <div class="form-group__item"> |
151 | <input type="text" class="input" name="power" id="power" value="{{ old('power') ?? '' }}" placeholder="POWER-45"> | 176 | <input type="text" class="input" name="power" id="power" value=" old('power') ?? '' }}" placeholder="POWER-45"> |
152 | @error('power') | 177 | @error('power') |
153 | <span class="text-xs text-red-600"> | 178 | <span class="text-xs text-red-600"> |
154 | {{ $message }} | 179 | {{ $message }} |
155 | </span> | 180 | </span> |
156 | @enderror | 181 | @enderror |
157 | </div> | 182 | </div> |
158 | </div> | 183 | </div> |
159 | 184 | ||
160 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 185 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
161 | <label class="form-group__label">Суточные выплаты</label> | 186 | <label class="form-group__label">Суточные выплаты</label> |
162 | <div class="form-group__item"> | 187 | <div class="form-group__item"> |
163 | <input type="text" class="input" name="sytki" id="sytki" value="{{ old('sytki') ?? '' }}" placeholder="2000"> | 188 | <input type="text" class="input" name="sytki" id="sytki" value=" old('sytki') ?? '' }}" placeholder="2000"> |
164 | @error('power') | 189 | @error('power') |
165 | <span class="text-xs text-red-600"> | 190 | <span class="text-xs text-red-600"> |
166 | {{ $message }} | 191 | {{ $message }} |
167 | </span> | 192 | </span> |
168 | @enderror | 193 | @enderror |
169 | </div> | 194 | </div> |
170 | </div> | 195 | </div> |
171 | 196 | ||
172 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 197 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
173 | <label class="form-group__label">Начало отплытия</label> | 198 | <label class="form-group__label">Начало отплытия</label> |
174 | <div class="form-group__item"> | 199 | <div class="form-group__item"> |
175 | <input type="text" class="input" name="start" id="start" value="{{ old('start') ?? '' }}" placeholder="20 сентября 2024"> | 200 | <input type="text" class="input" name="start" id="start" value=" old('start') ?? $Employer->ads->start ?? '' }}" placeholder="20 сентября 2024"> |
176 | @error('power') | 201 | @error('power') |
177 | <span class="text-xs text-red-600"> | 202 | <span class="text-xs text-red-600"> |
178 | {{ $message }} | 203 | {{ $message }} |
179 | </span> | 204 | </span> |
180 | @enderror | 205 | @enderror |
181 | </div> | 206 | </div> |
182 | </div> | 207 | </div>--> |
183 | 208 | ||
184 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 209 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
185 | <label class="form-group__label">Корабль для посадки</label> | 210 | <label class="form-group__label">Корабль для посадки</label> |
186 | <div class="form-group__item"> | 211 | <div class="form-group__item"> |
187 | <div class="select"> | 212 | <div class="select"> |
188 | <select class="js-select2" name="flot" id="flot"> | 213 | <select class="js-select2" name="flot" id="flot"> |
189 | <option value="" selected> Не указан корабль</option> | 214 | |
190 | @if ($Employer->flots->count()) | 215 | @if ($Employer->flots->count()) |
191 | @foreach($Employer->flots as $j) | 216 | @foreach($Employer->flots as $j) |
192 | <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> | 217 | <option value="{{ $j->name }}">{{ $j->name }} ({{ $j->id }})</option> |
193 | @endforeach | 218 | @endforeach |
194 | @endif | 219 | @endif |
195 | </select> | 220 | </select> |
196 | @error('flot') | 221 | @error('flot') |
197 | <span class="text-xs text-red-600"> | 222 | <span class="text-xs text-red-600"> |
198 | {{ $message }} | 223 | {{ $message }} |
199 | </span> | 224 | </span> |
200 | @enderror | 225 | @enderror |
201 | </div> | 226 | </div> |
202 | </div> | 227 | </div> |
203 | </div> | 228 | </div> |
204 | 229 | ||
205 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 230 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
206 | <label class="form-group__label">Описание вакансии</label> | 231 | <label class="form-group__label">Описание вакансии</label> |
207 | <div class="form-group__item"> | 232 | <div class="form-group__item"> |
208 | <textarea class="textarea" name="text" id="text">{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> | 233 | <textarea class="textarea" name="text" id="text">{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> |
209 | @error('text') | 234 | @error('text') |
210 | <span class="text-xs text-red-600"> | 235 | <span class="text-xs text-red-600"> |
211 | {{ $message }} | 236 | {{ $message }} |
212 | </span> | 237 | </span> |
213 | @enderror | 238 | @enderror |
214 | </div> | 239 | </div> |
215 | </div> | 240 | </div> |
216 | 241 | ||
217 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 242 | <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
218 | <label class="form-group__label">Дополнительная информация</label> | 243 | <label class="form-group__label">Дополнительная информация</label> |
219 | <div class="form-group__item"> | 244 | <div class="form-group__item"> |
220 | <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> | 245 | <textarea class="textarea" name="description" id="description"> old('description') ?? '' }}</textarea> |
221 | @error('text') | 246 | @error('description') |
222 | <span class="text-xs text-red-600"> | 247 | <span class="text-xs text-red-600"> |
223 | {{ $message }} | 248 | {{ $message }} |
224 | </span> | 249 | </span> |
225 | @enderror | 250 | @enderror |
226 | </div> | 251 | </div> |
227 | </div> | 252 | </div>--> |
228 | </div> | 253 | </div> |
229 | <a class="button cabinet__submit" href="{{ route('employer.vacancy_list') }}">Назад</a> | 254 | <a class="button cabinet__submit" href="{{ route('employer.vacancy_list') }}">Назад</a> |
230 | <button type="submit" class="button cabinet__submit">Опубликовать</button> | 255 | <button type="submit" class="button cabinet__submit">Опубликовать</button> |
231 | </div> | 256 | </div> |
232 | </form> | 257 | </form> |
233 | </div> | 258 | </div> |
234 | </div> | 259 | </div> |
235 | </section> | 260 | </section> |
236 | </div> | 261 | </div> |
237 | @endsection | 262 | @endsection |
238 | 263 |
resources/views/employers/list_vacancy.blade.php
1 | @extends('layout.frontend', ['title' => 'Список вакансий - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Список вакансий - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('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 | <div class="cabinet__side-toper-pic"> | 61 | <div class="cabinet__side-toper-pic"> |
62 | @if (isset($Employer->logo)) | 62 | @if (isset($Employer->logo)) |
63 | <img src="{{ asset(Storage::url($Employer->logo)) }}" width="150" alt="{{ $Employer->name_company }}"> | 63 | <img src="{{ asset(Storage::url($Employer->logo)) }}" width="150" alt="{{ $Employer->name_company }}"> |
64 | @else | 64 | @else |
65 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer->name_company }}"/> | 65 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer->name_company }}"/> |
66 | @endif | 66 | @endif |
67 | </div> | 67 | </div> |
68 | <b>{{ $Employer->name_company }}</b> | 68 | <b>{{ $Employer->name_company }}</b> |
69 | </div> | 69 | </div> |
70 | 70 | ||
71 | @include('employers.menu', ['item' => 3]) | 71 | @include('employers.menu', ['item' => 3]) |
72 | </div> | 72 | </div> |
73 | <div class="cabinet__body"> | 73 | <div class="cabinet__body"> |
74 | <div class="cabinet__body-item"> | 74 | <div class="cabinet__body-item"> |
75 | <h2 class="title cabinet__title">Мои вакансии</h2> | 75 | <h2 class="title cabinet__title">Мои вакансии</h2> |
76 | </div> | 76 | </div> |
77 | <div class="cabinet__body-item"> | 77 | <div class="cabinet__body-item"> |
78 | <div class="cabinet__filters"> | 78 | <div class="cabinet__filters"> |
79 | <div class="cabinet__filters-item"> | 79 | <div class="cabinet__filters-item"> |
80 | <form class="search"> | 80 | <form class="search"> |
81 | <input type="search" class="input" placeholder="Поиск…" required> | 81 | <input type="search" class="input" placeholder="Поиск…" required> |
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 | </form> | 88 | </form> |
89 | </div> | 89 | </div> |
90 | <div class="cabinet__filters-item"> | 90 | <div class="cabinet__filters-item"> |
91 | <div class="select"> | 91 | <div class="select"> |
92 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 92 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
93 | <option value="default">Сортировка (по умолчанию)</option> | 93 | <option value="default">Сортировка (по умолчанию)</option> |
94 | <option value="name (asc)">По имени (возрастание)</option> | 94 | <option value="name (asc)">По имени (возрастание)</option> |
95 | <option value="name (desc)">По имени (убывание)</option> | 95 | <option value="name (desc)">По имени (убывание)</option> |
96 | <option value="created_at (asc)">По дате (возрастание)</option> | 96 | <option value="created_at (asc)">По дате (возрастание)</option> |
97 | <option value="created_at (desc)">По дате (убывание)</option> | 97 | <option value="created_at (desc)">По дате (убывание)</option> |
98 | </select> | 98 | </select> |
99 | </div> | 99 | </div> |
100 | </div> | 100 | </div> |
101 | </div> | 101 | </div> |
102 | @if ($vacancy_list->count()) | 102 | @if ($vacancy_list->count()) |
103 | <div class="table table_spoiler"> | 103 | <div class="table table_spoiler"> |
104 | <button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more"> | 104 | <!--<button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more"> |
105 | <span>Показать ещё</span> | 105 | <span>Показать ещё</span> |
106 | <span>Свернуть</span> | 106 | <span>Свернуть</span> |
107 | </button> | 107 | </button>--> |
108 | <div class="table__scroll"> | 108 | <div class="table__scroll"> |
109 | <div class="table__body table__body_min-width"> | 109 | <div class="table__body table__body_min-width"> |
110 | <table> | 110 | <table> |
111 | <thead> | 111 | <thead> |
112 | <tr> | 112 | <tr> |
113 | <th>Название</th> | 113 | <th>Название</th> |
114 | <th>Дата добавления<br>/ обновления</th> | 114 | <th>Дата добавления<br>/ обновления</th> |
115 | <th>Статус</th> | 115 | <th>Статус</th> |
116 | <th>Действия</th> | 116 | <th>Действия</th> |
117 | </tr> | 117 | </tr> |
118 | </thead> | 118 | </thead> |
119 | <tbody> | 119 | <tbody> |
120 | @foreach($vacancy_list as $it) | 120 | @foreach($vacancy_list as $it) |
121 | <tr> | 121 | <tr> |
122 | <td>{{ $it->name }}</td> | 122 | <td>{{ $it->name }}</td> |
123 | <td>{{ $it->created_at }} / {{ $it->updated_at }}</td> | 123 | <td>{{ $it->created_at }} / {{ $it->updated_at }}</td> |
124 | <td> | 124 | <td> |
125 | @if ($it->active_is) | 125 | @if ($it->active_is) |
126 | <span class="table__status green"><i></i>Опубликовано</span> | 126 | <span class="table__status green"><i></i>Опубликовано</span> |
127 | @else | 127 | @else |
128 | <span class="table__status"><i></i>Не опубликовано</span> | 128 | <span class="table__status"><i></i>Не опубликовано</span> |
129 | @endif | 129 | @endif |
130 | </td> | 130 | </td> |
131 | <td> | 131 | <td> |
132 | <span class="table__controls"> | 132 | <span class="table__controls"> |
133 | <a class="table__controls-item up-it" href="{{ route('employer.vacancy_up', ['ad_employer' => $it->id]) }}"> | 133 | <a class="table__controls-item up-it" href="{{ route('employer.vacancy_up', ['ad_employer' => $it->id]) }}"> |
134 | <svg> | 134 | <svg> |
135 | <use xlink:href="{{ asset('images/sprite.svg#arrow-radius') }}"></use> | 135 | <use xlink:href="{{ asset('images/sprite.svg#arrow-radius') }}"></use> |
136 | </svg> | 136 | </svg> |
137 | </a> | 137 | </a> |
138 | <a href="{{ route('employer.vacancy_edit', ['ad_employer' => $it->id]) }}" class="table__controls-item"> | 138 | <a href="{{ route('employer.vacancy_edit', ['ad_employer' => $it->id]) }}" class="table__controls-item"> |
139 | <svg> | 139 | <svg> |
140 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | 140 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> |
141 | </svg> | 141 | </svg> |
142 | </a> | 142 | </a> |
143 | <a class="table__controls-item" href="{{ route('employer.vacancy_delete', ['ad_employer' => $it->id]) }}"> | 143 | <a class="table__controls-item" href="{{ route('employer.vacancy_delete', ['ad_employer' => $it->id]) }}"> |
144 | <svg> | 144 | <svg> |
145 | <use xlink:href="{{ asset('images/sprite.svg#cross') }}"></use> | 145 | <use xlink:href="{{ asset('images/sprite.svg#cross') }}"></use> |
146 | </svg> | 146 | </svg> |
147 | </a> | 147 | </a> |
148 | @if ($it->active_is) | 148 | @if ($it->active_is) |
149 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 0]) }}" class="table__controls-item"> | 149 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 0]) }}" class="table__controls-item"> |
150 | <svg> | 150 | <svg> |
151 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> | 151 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> |
152 | </svg> | 152 | </svg> |
153 | </a> | 153 | </a> |
154 | @else | 154 | @else |
155 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 1]) }}" class="table__controls-item"> | 155 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 1]) }}" class="table__controls-item"> |
156 | <svg> | 156 | <svg> |
157 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> | 157 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> |
158 | </svg> | 158 | </svg> |
159 | </a> | 159 | </a> |
160 | @endif | 160 | @endif |
161 | 161 | ||
162 | <!--<button type="button" class="table__controls-item"> | 162 | <!--<button type="button" class="table__controls-item"> |
163 | <svg> | 163 | <svg> |
164 | <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> | 164 | <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> |
165 | </svg> | 165 | </svg> |
166 | </button> | 166 | </button> |
167 | --> | 167 | --> |
168 | </span> | 168 | </span> |
169 | </td> | 169 | </td> |
170 | </tr> | 170 | </tr> |
171 | @endforeach | 171 | @endforeach |
172 | </tbody> | 172 | </tbody> |
173 | </table> | 173 | </table> |
174 | </div> | 174 | </div> |
175 | </div> | 175 | </div> |
176 | </div> | 176 | </div> |
177 | @else | 177 | @else |
178 | <div class="notify"> | 178 | <div class="notify"> |
179 | <svg> | 179 | <svg> |
180 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> | 180 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> |
181 | </svg> | 181 | </svg> |
182 | <span>Вы ещё не разместили ни одной вакансии</span> | 182 | <span>Вы ещё не разместили ни одной вакансии</span> |
183 | </div> | 183 | </div> |
184 | @endif | 184 | @endif |
185 | </div> | 185 | </div> |
186 | </div> | 186 | </div> |
187 | </div> | 187 | </div> |
188 | </div> | 188 | </div> |
189 | </section> | 189 | </section> |
190 | </div> | 190 | </div> |
191 | @endsection | 191 | @endsection |
192 | 192 |
resources/views/employers/menu.blade.php
1 | <div class="cabinet__side-item"> | 1 | <div class="cabinet__side-item"> |
2 | <div class="cabinet__menu"> | 2 | <div class="cabinet__menu"> |
3 | <button type="button" class="cabinet__menu-toper js-toggle"> | 3 | <button type="button" class="cabinet__menu-toper js-toggle"> |
4 | <span class="cabinet__menu-toper-text"> | 4 | <span class="cabinet__menu-toper-text"> |
5 | <i> | 5 | <i> |
6 | <svg> | 6 | <svg> |
7 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> | 7 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> |
8 | </svg> | 8 | </svg> |
9 | </i> | 9 | </i> |
10 | <span>Профиль</span> | 10 | <span>Профиль</span> |
11 | </span> | 11 | </span> |
12 | <i class="cabinet__menu-toper-arrow"> | 12 | <i class="cabinet__menu-toper-arrow"> |
13 | <svg> | 13 | <svg> |
14 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 14 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
15 | </svg> | 15 | </svg> |
16 | </i> | 16 | </i> |
17 | </button> | 17 | </button> |
18 | <div class="cabinet__menu-body"> | 18 | <div class="cabinet__menu-body"> |
19 | <div class="cabinet__menu-items"> | 19 | <div class="cabinet__menu-items"> |
20 | <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif"> | 20 | <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif"> |
21 | <i> | 21 | <i> |
22 | <svg> | 22 | <svg> |
23 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> | 23 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> |
24 | </svg> | 24 | </svg> |
25 | </i> | 25 | </i> |
26 | <span>Профиль</span> | 26 | <span>Профиль</span> |
27 | </a> | 27 | </a> |
28 | <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif"> | 28 | <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif"> |
29 | <i> | 29 | <i> |
30 | <svg> | 30 | <svg> |
31 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use> | 31 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use> |
32 | </svg> | 32 | </svg> |
33 | </i> | 33 | </i> |
34 | <span>Разместить вакансию</span> | 34 | <span>Разместить вакансию</span> |
35 | </a> | 35 | </a> |
36 | <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif"> | 36 | <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif"> |
37 | <i> | 37 | <i> |
38 | <svg> | 38 | <svg> |
39 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use> | 39 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use> |
40 | </svg> | 40 | </svg> |
41 | </i> | 41 | </i> |
42 | <span>Мои вакансии</span> | 42 | <span>Мои вакансии</span> |
43 | </a> | 43 | </a> |
44 | <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif"> | 44 | <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif"> |
45 | <i> | 45 | <i> |
46 | <svg> | 46 | <svg> |
47 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use> | 47 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use> |
48 | </svg> | 48 | </svg> |
49 | </i> | 49 | </i> |
50 | <span>Отклики на вакансию</span> | 50 | <span>Отклики на вакансию</span> |
51 | </a> | 51 | </a> |
52 | <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif"> | 52 | <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif"> |
53 | <i> | 53 | <i> |
54 | <svg> | 54 | <svg> |
55 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use> | 55 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use> |
56 | </svg> | 56 | </svg> |
57 | </i> | 57 | </i> |
58 | <span>Сообщения</span> | 58 | <span>Сообщения</span> |
59 | </a> | 59 | </a> |
60 | <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif"> | 60 | <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif"> |
61 | <i> | 61 | <i> |
62 | <svg> | 62 | <svg> |
63 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use> | 63 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use> |
64 | </svg> | 64 | </svg> |
65 | </i> | 65 | </i> |
66 | <span>Избранные кандидаты</span> | 66 | <span>Избранные кандидаты</span> |
67 | </a> | 67 | </a> |
68 | <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif"> | 68 | <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif"> |
69 | <i> | 69 | <i> |
70 | <svg> | 70 | <svg> |
71 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use> | 71 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use> |
72 | </svg> | 72 | </svg> |
73 | </i> | 73 | </i> |
74 | <span>База данных</span> | 74 | <span>База данных</span> |
75 | </a> | 75 | </a> |
76 | <a href="{{ route('employer.bd-tupe') }}" class="cabinet__menu-item @if ($item==8) active @endif"> | 76 | <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif"> |
77 | <i> | 77 | <i> |
78 | <svg> | 78 | <svg> |
79 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use> | 79 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use> |
80 | </svg> | 80 | </svg> |
81 | </i> | 81 | </i> |
82 | <span>База резюме</span> | 82 | <span>База резюме</span> |
83 | </a> | 83 | </a> |
84 | <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif"> | 84 | <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif"> |
85 | <i> | 85 | <i> |
86 | <svg> | 86 | <svg> |
87 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use> | 87 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use> |
88 | </svg> | 88 | </svg> |
89 | </i> | 89 | </i> |
90 | <span>Рассылка сообщений</span> | 90 | <span>Рассылка сообщений</span> |
91 | </a> | 91 | </a> |
92 | <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif"> | 92 | <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif"> |
93 | <i> | 93 | <i> |
94 | <svg> | 94 | <svg> |
95 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use> | 95 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use> |
96 | </svg> | 96 | </svg> |
97 | </i> | 97 | </i> |
98 | <span>FAQ</span> | 98 | <span>FAQ</span> |
99 | </a> | 99 | </a> |
100 | <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif"> | 100 | <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif"> |
101 | <i> | 101 | <i> |
102 | <svg> | 102 | <svg> |
103 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use> | 103 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use> |
104 | </svg> | 104 | </svg> |
105 | </i> | 105 | </i> |
106 | <span>Настройки уведомлений</span> | 106 | <span>Настройки уведомлений</span> |
107 | </a> | 107 | </a> |
108 | <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==12) active @endif"> | 108 | <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==12) active @endif"> |
109 | <i></i> | 109 | <i></i> |
110 | <span>Сменить пароль</span> | 110 | <span>Сменить пароль</span> |
111 | </a> | 111 | </a> |
112 | <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==13) active @endif"> | 112 | <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==13) active @endif"> |
113 | <i></i> | 113 | <i></i> |
114 | <span>Удалить профиль</span> | 114 | <span>Удалить профиль</span> |
115 | </a> | 115 | </a> |
116 | </div> | 116 | </div> |
117 | <div class="cabinet__menu-bottom"> | 117 | <div class="cabinet__menu-bottom"> |
118 | <a href="{{ route('logout') }}" class="button cabinet__menu-leave"> | 118 | <a href="{{ route('logout') }}" class="button cabinet__menu-leave"> |
119 | <svg> | 119 | <svg> |
120 | <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use> | 120 | <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use> |
121 | </svg> | 121 | </svg> |
122 | Выход | 122 | Выход |
123 | </a> | 123 | </a> |
124 | <span class="cabinet__menu-copy"> | 124 | <span class="cabinet__menu-copy"> |
125 | © 2020 – Rekamore.su | 125 | © 2020 – Rekamore.su |
126 | </span> | 126 | </span> |
127 | </div> | 127 | </div> |
128 | </div> | 128 | </div> |
129 | </div> | 129 | </div> |
130 | </div> | 130 | </div> |
131 | 131 |
resources/views/errors/404.blade.php
File was created | 1 | @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) | |
2 | |||
3 | @section('scripts') | ||
4 | |||
5 | @endsection | ||
6 | |||
7 | @section('content') | ||
8 | <section class="page-404"> | ||
9 | <div class="container"> | ||
10 | <div class="page-404__body"> | ||
11 | <div class="page-404__numb">404</div> | ||
12 | <div class="page-404__title">Упс! Страница не найдена</div> | ||
13 | <div class="page-404__subtitle">Такой страницы не существует. Воспользуйтесь меню или перейдите на главную.</div> | ||
14 | <a href="{{ route('index') }}" class="button page-404__button">Перейти на главную</a> | ||
15 | </div> | ||
16 | </div> | ||
17 | </section> | ||
18 | @endsection | ||
19 | |||
1 | @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) | 20 |
resources/views/index.blade.php
1 | @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <section class="work"> | 8 | <section class="work"> |
9 | <div class="container"> | 9 | <div class="container"> |
10 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> | 10 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> |
11 | <div class="work__body"> | 11 | <div class="work__body"> |
12 | <div class="work__title"> | 12 | <div class="work__title"> |
13 | <h4>Работа в море / | 13 | <h4>Работа в море / |
14 | <span class="br">Работа на реке</span></h4> | 14 | <span class="br">Работа на реке</span></h4> |
15 | </div> | 15 | </div> |
16 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — | 16 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — |
17 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в | 17 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в |
18 | сложных, но очень интересных условиях. </div> | 18 | сложных, но очень интересных условиях. </div> |
19 | <div class="work__list"> | 19 | <div class="work__list"> |
20 | <div>Тысячи соискателей увидят Ваше объявление</div> | 20 | <div>Тысячи соискателей увидят Ваше объявление</div> |
21 | <div>Десятки компаний выкладывают объявления каждый день</div> | 21 | <div>Десятки компаний выкладывают объявления каждый день</div> |
22 | </div> | 22 | </div> |
23 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> | 23 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> |
24 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> | 24 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> |
25 | <button type="submit" class="button button_light">Посмотреть вакансии</button> | 25 | <button type="submit" class="button button_light">Посмотреть вакансии</button> |
26 | <span> | 26 | <span> |
27 | <svg> | 27 | <svg> |
28 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 28 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
29 | </svg> | 29 | </svg> |
30 | </span> | 30 | </span> |
31 | </form> | 31 | </form> |
32 | @guest | ||
33 | <a data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a> | ||
34 | @else | ||
32 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> | 35 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> |
36 | @endguest | ||
33 | <div class="work__get"> | 37 | <div class="work__get"> |
34 | <b>Скачать приложение</b> | 38 | <b>Скачать приложение</b> |
35 | <a href=""> | 39 | <a href=""> |
36 | <img src="{{ asset('images/google.svg') }}" alt=""> | 40 | <img src="{{ asset('images/google.svg') }}" alt=""> |
37 | </a> | 41 | </a> |
38 | <a href=""> | 42 | <a href=""> |
39 | <img src="{{ asset('images/apple.svg') }}" alt=""> | 43 | <img src="{{ asset('images/apple.svg') }}" alt=""> |
40 | </a> | 44 | </a> |
41 | </div> | 45 | </div> |
42 | </div> | 46 | </div> |
43 | </div> | 47 | </div> |
44 | </section> | 48 | </section> |
45 | <section class="numbers"> | 49 | <section class="numbers"> |
46 | <div class="container"> | 50 | <div class="container"> |
47 | <div class="numbers__body"> | 51 | <div class="numbers__body"> |
48 | <div class="numbers__item"> | 52 | <div class="numbers__item"> |
49 | <b>500+</b> | 53 | <b>500+</b> |
50 | <span>Резюме</span> | 54 | <span>Резюме</span> |
51 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют | 55 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют |
52 | фракционных разногласий и призваны к ответу. | 56 | фракционных разногласий и призваны к ответу. |
53 | </div> | 57 | </div> |
54 | <div class="numbers__item"> | 58 | <div class="numbers__item"> |
55 | <b>1 000+</b> | 59 | <b>1 000+</b> |
56 | <span>Вакансий</span> | 60 | <span>Вакансий</span> |
57 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих | 61 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих |
58 | собственных рациональных ограничений. | 62 | собственных рациональных ограничений. |
59 | </div> | 63 | </div> |
60 | <div class="numbers__item"> | 64 | <div class="numbers__item"> |
61 | <b>265</b> | 65 | <b>265</b> |
62 | <span>Компаний</span> | 66 | <span>Компаний</span> |
63 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных | 67 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных |
64 | ограничений. | 68 | ограничений. |
65 | </div> | 69 | </div> |
66 | </div> | 70 | </div> |
67 | </div> | 71 | </div> |
68 | </section> | 72 | </section> |
69 | <section class="vacancies"> | 73 | <section class="vacancies"> |
70 | <div class="container"> | 74 | <div class="container"> |
71 | <div class="title"><h4>Новые вакансии</h4></div> | 75 | <div class="title"><h4>Новые вакансии</h4></div> |
72 | <div class="vacancies__body"> | 76 | <div class="vacancies__body"> |
73 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> | 77 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> |
74 | <div class="vacancies__list"> | 78 | <div class="vacancies__list"> |
75 | @if ($categories->count()) | 79 | @if ($categories->count()) |
76 | @foreach ($categories as $cat) | 80 | @foreach ($categories as $cat) |
77 | <a href="#" class="vacancies__item"> | 81 | <a href="{{ route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item"> |
78 | <span style="border-color:#F4C4C2"> | 82 | <span style="border-color:#F4C4C2"> |
79 | <b>{{ $cat->name }}</b> | 83 | <b>{{ $cat->name }}</b> |
80 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> | 84 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> |
81 | </span> | 85 | </span> |
82 | </a> | 86 | </a> |
83 | @endforeach | 87 | @endforeach |
84 | @else | 88 | @else |
85 | Тут пока нет никаких вакансий | 89 | Тут пока нет никаких вакансий |
86 | @endif | 90 | @endif |
87 | </div> | 91 | </div> |
88 | </div> | 92 | </div> |
89 | </div> | 93 | </div> |
90 | </section> | 94 | </section> |
91 | <section class="employer"> | 95 | <section class="employer"> |
92 | <div class="container"> | 96 | <div class="container"> |
93 | <div class="title"><h4>Работодатели</h4></div> | 97 | <div class="title"><h4>Работодатели</h4></div> |
94 | <div class="swiper js-employer-swiper"> | 98 | <div class="swiper js-employer-swiper"> |
95 | <div class="swiper-wrapper"> | 99 | <div class="swiper-wrapper"> |
96 | 100 | ||
97 | @if ($employers->count()) | 101 | @if ($employers->count()) |
98 | @php | 102 | @php |
99 | $rec = 0; | 103 | $rec = 0; |
100 | $count = $employers->count(); | 104 | $count = $employers->count(); |
101 | @endphp | 105 | @endphp |
102 | @foreach($employers as $emp) | 106 | @foreach($employers as $emp) |
103 | @php $rec++ @endphp | 107 | @php $rec++ @endphp |
104 | @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) | 108 | @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) |
105 | <div class="swiper-slide"> | 109 | <div class="swiper-slide"> |
106 | <div class="employer__item"> | 110 | <div class="employer__item"> |
107 | @endif | 111 | @endif |
108 | @if (!empty($emp->logo)) | 112 | @if (!empty($emp->logo)) |
109 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> | 113 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> |
110 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> | 114 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> |
111 | </a> | 115 | </a> |
112 | @else | 116 | @else |
113 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> | 117 | <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> |
114 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> | 118 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> |
115 | </a> | 119 | </a> |
116 | @endif | 120 | @endif |
117 | @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) | 121 | @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) |
118 | </div> | 122 | </div> |
119 | </div> | 123 | </div> |
120 | @endif | 124 | @endif |
121 | @endforeach | 125 | @endforeach |
122 | @else | 126 | @else |
123 | <h5>Тут нет никаких записей</h5> | 127 | <h5>Тут нет никаких записей</h5> |
124 | @endif | 128 | @endif |
125 | </div> | 129 | </div> |
126 | <div class="swiper-pagination"></div> | 130 | <div class="swiper-pagination"></div> |
127 | </div> | 131 | </div> |
128 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> | 132 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> |
129 | </div> | 133 | </div> |
130 | </section> | 134 | </section> |
131 | <section class="about"> | 135 | <section class="about"> |
132 | <div class="container"> | 136 | <div class="container"> |
133 | <div class="about__wrapper"> | 137 | <div class="about__wrapper"> |
134 | <div class="title about__title"><h4>О нас</h4></div> | 138 | <div class="title about__title"><h4>О нас</h4></div> |
135 | <div class="about__body"> | 139 | <div class="about__body"> |
136 | <div class="about__line"></div> | 140 | <div class="about__line"></div> |
137 | <div class="about__item"> | 141 | <div class="about__item"> |
138 | <b>Для работодателей</b> | 142 | <b>Для работодателей</b> |
139 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие | 143 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие |
140 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> | 144 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> |
141 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> | 145 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> |
142 | </div> | 146 | </div> |
143 | <div class="about__item"> | 147 | <div class="about__item"> |
144 | <b>Для сотрудников</b> | 148 | <b>Для сотрудников</b> |
145 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и | 149 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и |
146 | СНГ ищут сотрудников через наши ресурсы</span> | 150 | СНГ ищут сотрудников через наши ресурсы</span> |
147 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> | 151 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> |
148 | </div> | 152 | </div> |
149 | </div> | 153 | </div> |
150 | </div> | 154 | </div> |
151 | </div> | 155 | </div> |
152 | </section> | 156 | </section> |
153 | 157 | ||
154 | @if ($news->count()) | 158 | @if ($news->count()) |
155 | <section class="news"> | 159 | <section class="news"> |
156 | <div class="container"> | 160 | <div class="container"> |
157 | <div class="news__toper"> | 161 | <div class="news__toper"> |
158 | <div class="title"><h4>Новости и статьи</h4></div> | 162 | <div class="title"><h4>Новости и статьи</h4></div> |
159 | <div class="navs"> | 163 | <div class="navs"> |
160 | <button class="js-news-swiper-button-prev"> | 164 | <button class="js-news-swiper-button-prev"> |
161 | <svg class="rotate180"> | 165 | <svg class="rotate180"> |
162 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 166 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
163 | </svg> | 167 | </svg> |
164 | </button> | 168 | </button> |
165 | <button class="js-news-swiper-button-next"> | 169 | <button class="js-news-swiper-button-next"> |
166 | <svg> | 170 | <svg> |
167 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 171 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
168 | </svg> | 172 | </svg> |
169 | </button> | 173 | </button> |
170 | </div> | 174 | </div> |
171 | </div> | 175 | </div> |
172 | 176 | ||
173 | <div class="swiper js-news-swiper"> | 177 | <div class="swiper js-news-swiper"> |
174 | <div class="swiper-wrapper"> | 178 | <div class="swiper-wrapper"> |
175 | 179 | ||
176 | @foreach ($news as $new) | 180 | @foreach ($news as $new) |
177 | <div class="swiper-slide"> | 181 | <div class="swiper-slide"> |
178 | <div class="news__item"> | 182 | <div class="news__item"> |
179 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> | 183 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> |
180 | <div class="news__item-body"> | 184 | <div class="news__item-body"> |
181 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}</time> | 185 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}</time> |
182 | <span class="news__item-title">{{ $new->title }}</span> | 186 | <span class="news__item-title">{{ $new->title }}</span> |
183 | <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> | 187 | <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> |
184 | <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> | 188 | <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> |
185 | </div> | 189 | </div> |
186 | </div> | 190 | </div> |
187 | </div> | 191 | </div> |
188 | @endforeach | 192 | @endforeach |
189 | 193 | ||
190 | </div> | 194 | </div> |
191 | <div class="swiper-pagination"></div> | 195 | <div class="swiper-pagination"></div> |
192 | </div> | 196 | </div> |
193 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> | 197 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> |
194 | 198 | ||
195 | </div> | 199 | </div> |
196 | </section> | 200 | </section> |
197 | @endif | 201 | @endif |
198 | 202 | ||
199 | <section class="info"> | 203 | <section class="info"> |
200 | <div class="container"> | 204 | <div class="container"> |
201 | <img src="images/5.png" alt="" class="info__pic"> | 205 | <img src="images/5.png" alt="" class="info__pic"> |
202 | <div class="info__body"> | 206 | <div class="info__body"> |
203 | <div class="title info__title"><h4>Мы в социальных сетях</h4></div> | 207 | <div class="title info__title"><h4>Мы в социальных сетях</h4></div> |
204 | <div class="info__item"> | 208 | <div class="info__item"> |
205 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о | 209 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о |
206 | новых вакансиях прямо на свой смартфон</div> | 210 | новых вакансиях прямо на свой смартфон</div> |
207 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> | 211 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> |
208 | <svg> | 212 | <svg> |
209 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 213 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
210 | </svg> | 214 | </svg> |
211 | Телеграм | 215 | Телеграм |
212 | </a> | 216 | </a> |
213 | </div> | 217 | </div> |
214 | <div class="info__item"> | 218 | <div class="info__item"> |
215 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация | 219 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация |
216 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> | 220 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> |
217 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> | 221 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> |
218 | <svg> | 222 | <svg> |
219 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 223 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
220 | </svg> | 224 | </svg> |
221 | ВКонтакте | 225 | ВКонтакте |
222 | </a> | 226 | </a> |
223 | </div> | 227 | </div> |
224 | </div> | 228 | </div> |
225 | </div> | 229 | </div> |
226 | </section> | 230 | </section> |
227 | @endsection | 231 | @endsection |
228 | 232 |
resources/views/info_company_new.blade.php
1 | @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '#sort_ajax', function() { | 6 | $(document).on('change', '#sort_ajax', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.val(); | 8 | var val_ = this_.val(); |
9 | console.log('sort items '+val_); | 9 | console.log('sort items '+val_); |
10 | 10 | ||
11 | $.ajax({ | 11 | $.ajax({ |
12 | type: "GET", | 12 | type: "GET", |
13 | url: "{{ route('shipping_companies') }}", | 13 | url: "{{ route('shipping_companies') }}", |
14 | data: "sort="+val_+"&block=1", | 14 | data: "sort="+val_+"&block=1", |
15 | success: function (data) { | 15 | success: function (data) { |
16 | console.log('Выбор сортировки'); | 16 | console.log('Выбор сортировки'); |
17 | console.log(data); | 17 | console.log(data); |
18 | $('#block_1').html(data); | 18 | $('#block_1').html(data); |
19 | }, | 19 | }, |
20 | headers: { | 20 | headers: { |
21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
22 | }, | 22 | }, |
23 | error: function (data) { | 23 | error: function (data) { |
24 | data = JSON.stringify(data); | 24 | data = JSON.stringify(data); |
25 | console.log('Error: ' + data); | 25 | console.log('Error: ' + data); |
26 | } | 26 | } |
27 | }); | 27 | }); |
28 | 28 | ||
29 | $.ajax({ | 29 | $.ajax({ |
30 | type: "GET", | 30 | type: "GET", |
31 | url: "{{ route('shipping_companies') }}", | 31 | url: "{{ route('shipping_companies') }}", |
32 | data: "sort="+val_+"&block=2", | 32 | data: "sort="+val_+"&block=2", |
33 | success: function (data) { | 33 | success: function (data) { |
34 | console.log('Выбор сортировки2'); | 34 | console.log('Выбор сортировки2'); |
35 | console.log(data); | 35 | console.log(data); |
36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 36 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
37 | $('#block_2').html(data); | 37 | $('#block_2').html(data); |
38 | }, | 38 | }, |
39 | headers: { | 39 | headers: { |
40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 40 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
41 | }, | 41 | }, |
42 | error: function (data) { | 42 | error: function (data) { |
43 | data = JSON.stringify(data); | 43 | data = JSON.stringify(data); |
44 | console.log('Error: ' + data); | 44 | console.log('Error: ' + data); |
45 | } | 45 | } |
46 | }); | 46 | }); |
47 | }); | 47 | }); |
48 | 48 | ||
49 | $(document).ready(function(){ | 49 | $(document).ready(function(){ |
50 | var sel = $('#select2-sort_ajax-container'); | 50 | var sel = $('#select2-sort_ajax-container'); |
51 | var key = getUrlParameter('sort'); | 51 | var key = getUrlParameter('sort'); |
52 | |||
53 | if (key !=='') { | 52 | if (key !=='') { |
54 | console.log(key); | 53 | console.log(key); |
55 | switch (key) { | 54 | switch (key) { |
56 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 55 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
57 | case "name_up": sel.html('По имени (возрастание)'); break; | 56 | case "name_up": sel.html('По имени (возрастание)'); break; |
58 | case "name_down": sel.html('По дате (убывание)'); break; | 57 | case "name_down": sel.html('По дате (убывание)'); break; |
59 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 58 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
60 | case "created_at_down": sel.html('По дате (убывание)'); break; | 59 | case "created_at_down": sel.html('По дате (убывание)'); break; |
61 | } | 60 | } |
62 | 61 | ||
63 | } | 62 | } |
64 | }); | 63 | }); |
65 | 64 | ||
66 | //end | 65 | //end |
67 | $(document).on('click', '.js_send_it_button', function() { | 66 | $(document).on('click', '.js_send_it_button', function() { |
68 | var this_ = $(this); | 67 | var this_ = $(this); |
69 | var code_user_id = this_.attr('data-uid'); | 68 | var code_user_id = this_.attr('data-uid'); |
70 | var code_to_user_id = this_.attr('data-tuid'); | 69 | var code_to_user_id = this_.attr('data-tuid'); |
71 | var code_vacancy = this_.attr('data-vacancy'); | 70 | var code_vacancy = this_.attr('data-vacancy'); |
72 | var user_id = $('#send_user_id'); | 71 | var user_id = $('#send_user_id'); |
73 | var to_user_id = $('#send_to_user_id'); | 72 | var to_user_id = $('#send_to_user_id'); |
74 | var vacancy = $('#send_vacancy'); | 73 | var vacancy = $('#send_vacancy'); |
75 | 74 | ||
76 | console.log('Клик на кнопки...'); | 75 | console.log('Клик на кнопки...'); |
77 | 76 | ||
78 | user_id.val(code_user_id); | 77 | user_id.val(code_user_id); |
79 | to_user_id.val(code_to_user_id); | 78 | to_user_id.val(code_to_user_id); |
80 | vacancy.val(code_vacancy); | 79 | vacancy.val(code_vacancy); |
81 | }); | 80 | }); |
82 | </script> | 81 | </script> |
83 | @endsection | 82 | @endsection |
84 | 83 | ||
85 | @section('content') | 84 | @section('content') |
86 | <section class="thing"> | 85 | <section class="thing"> |
87 | <div class="container"> | 86 | <div class="container"> |
88 | <div class="thing__body"> | 87 | <div class="thing__body"> |
89 | <ul class="breadcrumbs thing__breadcrumbs"> | 88 | <ul class="breadcrumbs thing__breadcrumbs"> |
90 | <li><a href="{{ route('index') }}">Главная</a></li> | 89 | <li><a href="{{ route('index') }}">Главная</a></li> |
91 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> | 90 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> |
92 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> | 91 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> |
93 | </ul> | 92 | </ul> |
94 | @if ($company[0]->oficial_status == 1) | 93 | @if ($company[0]->oficial_status == 1) |
95 | <div class="thing__badge"> | 94 | <div class="thing__badge"> |
96 | <svg> | 95 | <svg> |
97 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> | 96 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> |
98 | </svg> | 97 | </svg> |
99 | Компания проверена | 98 | Компания проверена |
100 | </div> | 99 | </div> |
101 | @endif | 100 | @endif |
102 | 101 | ||
103 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | 102 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> |
104 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> | 103 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> |
105 | <p class="thing__text">{{ $company[0]->text }}</p> | 104 | <p class="thing__text">{{ $company[0]->text }}</p> |
106 | <div class="thing__buttons"> | 105 | <div class="thing__buttons"> |
107 | <button type="button" class="button"> | 106 | <button type="button" class="button"> |
108 | <svg> | 107 | <svg> |
109 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | 108 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> |
110 | </svg> | 109 | </svg> |
111 | {{ $company[0]->ads->count() }} вакансии | 110 | {{ $company[0]->ads->count() }} вакансии |
112 | </button> | 111 | </button> |
113 | @if ($user_id == 0) | 112 | @if ($user_id == 0) |
114 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> | 113 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> |
115 | Написать сообщение | 114 | Написать сообщение |
116 | </a> | 115 | </a> |
117 | @else | 116 | @else |
118 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> | 117 | <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> |
119 | Написать сообщение | 118 | Написать сообщение |
120 | </a> | 119 | </a> |
121 | @endif | 120 | @endif |
122 | </div> | 121 | </div> |
123 | </div> | 122 | </div> |
124 | </div> | 123 | </div> |
125 | </section> | 124 | </section> |
126 | <main class="main"> | 125 | <main class="main"> |
127 | <div class="container"> | 126 | <div class="container"> |
128 | <div class="main__employer-page"> | 127 | <div class="main__employer-page"> |
129 | <h2 class="main__employer-page-title">О компании</h2> | 128 | <h2 class="main__employer-page-title">О компании</h2> |
130 | <div class="main__employer-page-info"> | 129 | <div class="main__employer-page-info"> |
131 | <div class="main__employer-page-item"> | 130 | <div class="main__employer-page-item"> |
132 | <b>Адрес компании</b> | 131 | <b>Адрес компании</b> |
133 | <span> | 132 | <span> |
134 | {{ $company[0]->address }} | 133 | {{ $company[0]->address }} |
135 | </span> | 134 | </span> |
136 | </div> | 135 | </div> |
137 | <div class="main__employer-page-item"> | 136 | <div class="main__employer-page-item"> |
138 | <b>Сайт</b> | 137 | <b>Сайт</b> |
139 | <span> | 138 | <span> |
140 | <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> | 139 | <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> |
141 | </span> | 140 | </span> |
142 | </div> | 141 | </div> |
143 | <div class="main__employer-page-item"> | 142 | <div class="main__employer-page-item"> |
144 | <b>Почта</b> | 143 | <b>Почта</b> |
145 | <span> | 144 | <span> |
146 | <a href="mailto:">{{ $company[0]->email }}</a> | 145 | <a href="mailto:">{{ $company[0]->email }}</a> |
147 | </span> | 146 | </span> |
148 | </div> | 147 | </div> |
149 | <div class="main__employer-page-item"> | 148 | <div class="main__employer-page-item"> |
150 | <b>Телефон</b> | 149 | <b>Телефон</b> |
151 | <span> | 150 | <span> |
152 | <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> | 151 | <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> |
153 | </span> | 152 | </span> |
154 | </div> | 153 | </div> |
155 | </div> | 154 | </div> |
155 | |||
156 | <div class="main__employer-page-item"> | 156 | <div class="main__employer-page-item"> |
157 | <b>Описание</b> | 157 | <b>Описание</b> |
158 | <span> | 158 | <span> |
159 | {{ $company[0]->text }} | 159 | {!! $company[0]->text !!} |
160 | </span> | 160 | </span> |
161 | </div> | 161 | </div> |
162 | |||
162 | <div> | 163 | <div> |
164 | |||
163 | <div class="main__employer-page-tabs"> | 165 | <div class="main__employer-page-tabs"> |
164 | <button type="button" class="main__employer-page-tabs-item active" | 166 | <button type="button" class="main__employer-page-tabs-item active" |
165 | data-tab="1">Флот</button> | 167 | data-tab="1">Флот</button> |
166 | <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> | 168 | <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> |
167 | </div> | 169 | </div> |
170 | |||
168 | <div class="main__employer-page-body"> | 171 | <div class="main__employer-page-body"> |
169 | <div class="main__employer-page-body-item showed" data-body="1"> | 172 | <div class="main__employer-page-body-item showed" data-body="1"> |
170 | <div class="main__employer-page-one"> | 173 | <div class="main__employer-page-one"> |
171 | @if ($company[0]->flots->count()) | 174 | @if ($company[0]->flots->count()) |
172 | @foreach ($company[0]->flots as $flot) | 175 | @foreach ($company[0]->flots as $flot) |
173 | <a href="" class="main__employer-page-one-item"> | 176 | <a href="" class="main__employer-page-one-item"> |
174 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> | 177 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> |
175 | <b>{{ $flot->region }}</b> | 178 | <b>{{ $flot->region }}</b> |
176 | <span>{{ $flot->power }}</span> | 179 | <span>{{ $flot->power }}</span> |
177 | </a> | 180 | </a> |
178 | @endforeach | 181 | @endforeach |
179 | @endif | 182 | @endif |
180 | </div> | 183 | </div> |
181 | </div> | 184 | </div> |
182 | 185 | ||
186 | |||
183 | <div class="main__employer-page-body-item" data-body="2"> | 187 | <div class="main__employer-page-body-item" data-body="2"> |
184 | <div class="main__employer-page-two"> | 188 | <div class="main__employer-page-two"> |
185 | @foreach ($company[0]->ads as $job) | 189 | @foreach ($company[0]->ads as $job) |
186 | @foreach ($job->ad_job as $item) | 190 | @foreach ($job->ad_job as $item) |
187 | <div class="main__employer-page-two-item"> | 191 | <div class="main__employer-page-two-item"> |
188 | <div class="main__employer-page-two-item-toper"> | 192 | <div class="main__employer-page-two-item-toper"> |
189 | <!-- end --> | 193 | <!-- end --> |
190 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> | 194 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> |
191 | <span>{{ $job->name }}</span> | 195 | <span>{{ $job->name }}</span> |
192 | </div> | 196 | </div> |
193 | <div class="main__employer-page-two-item-title">{{ $item->flot }}</div> | 197 | <div class="main__employer-page-two-item-title">{{ $item->flot }}</div> |
194 | <div class="main__employer-page-two-item-text"> | 198 | <div class="main__employer-page-two-item-text"> |
195 | <div class="main__employer-page-two-item-text-name"> | 199 | <div class="main__employer-page-two-item-text-name"> |
196 | {{ $item->job_title->name }} | 200 | {{ $item->job_title->name }} |
197 | </div> | 201 | </div> |
198 | <div class="main__employer-page-two-item-text-body"> | 202 | <div class="main__employer-page-two-item-text-body"> |
199 | <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p> | 203 | <p>Зарплата:{{ $item->min_salary }} - {{ $item->max_salary }}р + {{ $item->sytki }} суточные.</p> |
200 | <p>Контракт: {{ $item->period }} мес.</p> | 204 | <p>Контракт: {{ $item->period }} мес.</p> |
201 | </div> | 205 | </div> |
202 | </div> | 206 | </div> |
203 | <div class="main__employer-page-two-item-text"> | 207 | <div class="main__employer-page-two-item-text"> |
204 | <div class="main__employer-page-two-item-text-name">Район работы</div> | 208 | <div class="main__employer-page-two-item-text-name">Район работы</div> |
205 | <div class="main__employer-page-two-item-text-body"> | 209 | <div class="main__employer-page-two-item-text-body"> |
206 | <p>{{ $item->region }}</p> | 210 | <p>{{ $item->region }}</p> |
207 | </div> | 211 | </div> |
208 | </div> | 212 | </div> |
209 | <div class="main__employer-page-two-item-text"> | 213 | <div class="main__employer-page-two-item-text"> |
210 | <div class="main__employer-page-two-item-text-name">Посадка</div> | 214 | <div class="main__employer-page-two-item-text-name">Посадка</div> |
211 | <div class="main__employer-page-two-item-text-body"> | 215 | <div class="main__employer-page-two-item-text-body"> |
212 | <p> {{ $item->start }}</p> | 216 | <p> {{ $item->start }}</p> |
213 | {!! $item->description !!} | 217 | {!! $item->description !!} |
214 | </div> | 218 | </div> |
215 | </div> | 219 | </div> |
216 | <div class="main__employer-page-two-item-text"> | 220 | <div class="main__employer-page-two-item-text"> |
217 | <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: | 221 | <div class="main__employer-page-two-item-text-name">Звонить по вопросам на: |
218 | </div> | 222 | </div> |
219 | <div class="main__employer-page-two-item-text-body"> | 223 | <div class="main__employer-page-two-item-text-body"> |
220 | <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a> | 224 | <a href="tel:{{ $job->telephone }}">{{ $job->telephone }}</a> |
221 | </div> | 225 | </div> |
222 | </div> | 226 | </div> |
223 | <div class="main__employer-page-two-item-text"> | 227 | <div class="main__employer-page-two-item-text"> |
224 | <div class="main__employer-page-two-item-text-name">Анкеты присылать на | 228 | <div class="main__employer-page-two-item-text-name">Анкеты присылать на |
225 | почту: | 229 | почту: |
226 | </div> | 230 | </div> |
227 | <div class="main__employer-page-two-item-text-body"> | 231 | <div class="main__employer-page-two-item-text-body"> |
228 | <a href="mailto: {{ $job->email }}">{{ $job->email }}</a> | 232 | <a href="mailto: {{ $job->email }}">{{ $job->email }}</a> |
229 | </div> | 233 | </div> |
230 | </div> | 234 | </div> |
231 | <div class="main__employer-page-two-item-tags"> | 235 | <div class="main__employer-page-two-item-tags"> |
232 | <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> | 236 | <span class="main__employer-page-two-item-tag">#{{ $item->job_title->name }}</span> |
233 | </div> | 237 | </div> |
234 | <div class="main__employer-page-two-item-buttons"> | 238 | <div class="main__employer-page-two-item-buttons"> |
235 | 239 | ||
236 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $item->job_title->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' | 240 | <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $item->job_title->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' |
237 | class="button main__employer-page-two-item-button js_send_it_button">Оставить | 241 | class="button main__employer-page-two-item-button js_send_it_button">Оставить |
238 | отклик...</button> | 242 | отклик...</button> |
239 | 243 | ||
240 | <!--<a href="#" | 244 | <!--<a href="#" |
241 | class="button button_light main__employer-page-two-item-button">Подробнее</a>--> | 245 | class="button button_light main__employer-page-two-item-button">Подробнее</a>--> |
242 | </div> | 246 | </div> |
243 | <div class="main__employer-page-two-item-bottom"> | 247 | <div class="main__employer-page-two-item-bottom"> |
244 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> | 248 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> |
245 | <button type="button" | 249 | <button type="button" |
246 | class="like main__employer-page-two-item-bottom-like js-toggle"> | 250 | class="like main__employer-page-two-item-bottom-like js-toggle"> |
247 | <svg> | 251 | <svg> |
248 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 252 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
249 | </svg> | 253 | </svg> |
250 | </button> | 254 | </button> |
251 | </div> | 255 | </div> |
252 | </div> | 256 | </div> |
253 | @endforeach | 257 | @endforeach |
254 | @endforeach | 258 | @endforeach |
255 | <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> | 259 | <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> |
256 | <span>Показать ещё</span> | 260 | <span>Показать ещё</span> |
257 | <span>Скрыть</span> | 261 | <span>Скрыть</span> |
258 | </button>--> | 262 | </button>--> |
259 | </div> | 263 | </div> |
260 | </div> | 264 | </div> |
261 | </div> | 265 | </div> |
262 | </div> | 266 | </div> |
263 | </div> | 267 | </div> |
264 | </div> | 268 | </div> |
265 | </main> | 269 | </main> |
266 | @endsection | 270 | @endsection |
resources/views/layout/frontend.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | 2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>{{ $title }}</title> | 6 | <title>{{ $title }}</title> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
8 | <meta name="theme-color" content="#377D87"> | 8 | <meta name="theme-color" content="#377D87"> |
9 | <script src="{{ asset('js/jquery.js') }}"></script> | 9 | <script src="{{ asset('js/jquery.js') }}"></script> |
10 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> | 10 | <script type="text/javascript" src="{{ asset('js/jquery.cookie.js') }}"></script> |
11 | <link rel="stylesheet" href="{{ asset('css/style_new.css') }}"> | 11 | <link rel="stylesheet" href="{{ asset('css/style_new.css') }}"> |
12 | <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> | ||
12 | <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> | 13 | <style> |
13 | <style> | 14 | .err_red { |
14 | .err_red { | 15 | border: red 2px solid; |
15 | border: red 2px solid; | 16 | } |
16 | } | 17 | </style> |
17 | </style> | 18 | </head> |
18 | </head> | 19 | |
19 | 20 | <body id="body"> | |
20 | <body id="body"> | 21 | <a href="#body" class="to-top js-scroll-to"> |
21 | <a href="#body" class="to-top js-scroll-to"> | 22 | <svg> |
22 | <svg> | 23 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
23 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 24 | </svg> |
24 | </svg> | 25 | </a> |
25 | </a> | 26 | |
26 | 27 | <div> <!-- BEGIN TOP WRAPPER --> | |
27 | <div> <!-- BEGIN TOP WRAPPER --> | 28 | <header class="header"> |
28 | <header class="header"> | 29 | <div class="container"> |
29 | <div class="container"> | 30 | <div class="header__body"> |
30 | <div class="header__body"> | 31 | <div class="header__left"> |
31 | <div class="header__left"> | 32 | <a href="{{ route('index') }}" class="header__logo"> |
32 | <a href="{{ route('index') }}" class="header__logo"> | 33 | <svg> |
33 | <svg> | 34 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
34 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 35 | </svg> |
35 | </svg> | 36 | </a> |
36 | </a> | 37 | <nav class="header__menu"> |
37 | <nav class="header__menu"> | 38 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> |
38 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> | 39 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> |
39 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> | 40 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> |
40 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> | 41 | </nav> |
41 | </nav> | 42 | </div> |
42 | </div> | 43 | <div class="header__right"> |
43 | <div class="header__right"> | 44 | @guest |
44 | @guest | 45 | |
45 | 46 | @else | |
46 | @else | 47 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> |
47 | <button class="header__notifs header__notifs_actived"> | 48 | <svg> |
48 | <svg> | 49 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> |
49 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> | 50 | </svg> |
50 | </svg> | 51 | <span>Уведомления</span> |
51 | <span>Уведомления</span> | ||
52 | </button> | ||
53 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs"> | ||
54 | Кабинет | 52 | </a> |
53 | |||
55 | </a> | 54 | @endguest |
56 | @endguest | 55 | <div class="header__right-line"></div> |
57 | <div class="header__right-line"></div> | 56 | <button class="header__burger"> |
58 | <button class="header__burger"> | 57 | <svg> |
59 | <svg> | 58 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> |
60 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> | 59 | </svg> |
61 | </svg> | 60 | </button> |
62 | </button> | 61 | @guest |
63 | @guest | 62 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> |
64 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> | 63 | @else |
65 | @else | 64 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> |
66 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> | 65 | @endguest |
67 | @endguest | 66 | </div> |
68 | </div> | 67 | </div> |
69 | </div> | 68 | </div> |
70 | </div> | 69 | </header> |
71 | </header> | 70 | @yield('content') |
72 | @yield('content') | 71 | </div> <!-- END TOP WRAPPER --> |
73 | </div> <!-- END TOP WRAPPER --> | 72 | |
74 | 73 | <div> <!-- BEGIN BOTTOM WRAPPER --> | |
75 | <div> <!-- BEGIN BOTTOM WRAPPER --> | 74 | <footer class="footer"> |
76 | <footer class="footer"> | 75 | <div class="container"> |
77 | <div class="container"> | 76 | <div class="footer__mobile"> |
78 | <div class="footer__mobile"> | 77 | |
79 | 78 | <button class="footer__mobile-toper js-toggle active"> | |
80 | <button class="footer__mobile-toper js-toggle active"> | 79 | <a href="{{ route('index') }}"> |
81 | <a href="{{ route('index') }}"> | 80 | <svg> |
82 | <svg> | 81 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
83 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 82 | </svg> |
84 | </svg> | 83 | </a> |
85 | </a> | 84 | <span> |
86 | <span> | 85 | <svg> |
87 | <svg> | 86 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
88 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 87 | </svg> |
89 | </svg> | 88 | </span> |
90 | </span> | 89 | </button> |
91 | </button> | 90 | <div class="footer__mobile-menu"> |
92 | <div class="footer__mobile-menu"> | 91 | <div class="footer__mobile-menu-item"> |
93 | <div class="footer__mobile-menu-item"> | 92 | <button class="js-toggle"> |
94 | <button class="js-toggle"> | 93 | <b>Соискателям</b> |
95 | <b>Соискателям</b> | 94 | <span><svg> |
96 | <span><svg> | 95 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
97 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 96 | </svg></span> |
98 | </svg></span> | 97 | </button> |
99 | </button> | 98 | <div> |
100 | <div> | 99 | <a href="{{ route('vacancies') }}">Вакансии</a> |
101 | <a href="{{ route('vacancies') }}">Вакансии</a> | 100 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
102 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 101 | <a href="{{ route('education') }}">Образование</a> |
103 | <a href="{{ route('education') }}">Образование</a> | 102 | <a href="{{ route('news') }}">Новости</a> |
104 | <a href="{{ route('news') }}">Новости</a> | 103 | <a href="{{ route('contacts') }}">Контакты</a> |
105 | <a href="{{ route('contacts') }}">Контакты</a> | 104 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
106 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 105 | </div> |
107 | </div> | 106 | </div> |
108 | </div> | 107 | <div class="footer__mobile-menu-item"> |
109 | <div class="footer__mobile-menu-item"> | 108 | <button class="js-toggle"> |
110 | <button class="js-toggle"> | 109 | <b>Работодателям</b> |
111 | <b>Работодателям</b> | 110 | <span><svg> |
112 | <span><svg> | 111 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> |
113 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> | 112 | </svg></span> |
114 | </svg></span> | 113 | </button> |
115 | </button> | 114 | <div> |
116 | <div> | 115 | <a href="{{ route('register') }}">Регистрация</a> |
117 | <a href="{{ route('register') }}">Регистрация</a> | 116 | <a href="{{ route('bd_resume') }}">База резюме</a> |
118 | <a href="{{ route('bd_resume') }}">База резюме</a> | 117 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
119 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 118 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
120 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 119 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
121 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 120 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
122 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 121 | </div> |
123 | </div> | 122 | </div> |
124 | </div> | 123 | </div> |
125 | </div> | 124 | <div class="footer__mobile-contacts"> |
126 | <div class="footer__mobile-contacts"> | 125 | <b>Контакты</b> |
127 | <b>Контакты</b> | 126 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
128 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 127 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
129 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 128 | </div> |
130 | </div> | 129 | <div class="footer__mobile-bottom"> |
131 | <div class="footer__mobile-bottom"> | 130 | <div class="socials"> |
132 | <div class="socials"> | 131 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
133 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 132 | <svg> |
134 | <svg> | 133 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
135 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 134 | </svg> |
136 | </svg> | 135 | </a> |
137 | </a> | 136 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
138 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 137 | <svg> |
139 | <svg> | 138 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
140 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 139 | </svg> |
141 | </svg> | 140 | </a> |
142 | </a> | 141 | </div> |
143 | </div> | 142 | <nav class="footer__mobile-links"> |
144 | <nav class="footer__mobile-links"> | 143 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
145 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 144 | <span></span> |
146 | <span></span> | 145 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
147 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 146 | </nav> |
148 | </nav> | 147 | © 2023 — RekaMore.su |
149 | © 2023 — RekaMore.su | 148 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
150 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 149 | <svg> |
151 | <svg> | 150 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
152 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 151 | </svg> |
153 | </svg> | 152 | <span> |
154 | <span> | 153 | Дизайн и разработка: |
155 | Дизайн и разработка: | 154 | <b>NoLogoStudio.ru</b> |
156 | <b>NoLogoStudio.ru</b> | 155 | </span> |
157 | </span> | 156 | </a> |
158 | </a> | 157 | </div> |
159 | </div> | 158 | </div> |
160 | </div> | 159 | <div class="footer__main"> |
161 | <div class="footer__main"> | 160 | <div class="footer__main-body"> |
162 | <div class="footer__main-body"> | 161 | |
163 | 162 | <a href="" class="footer__main-logo"> | |
164 | <a href="" class="footer__main-logo"> | 163 | <svg> |
165 | <svg> | 164 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
166 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 165 | </svg> |
167 | </svg> | 166 | </a> |
168 | </a> | 167 | <div class="footer__main-col"> |
169 | <div class="footer__main-col"> | 168 | <div class="footer__main-title">Соискателям</div> |
170 | <div class="footer__main-title">Соискателям</div> | 169 | <nav> |
171 | <nav> | 170 | <a href="{{ route('vacancies') }}">Вакансии</a> |
172 | <a href="{{ route('vacancies') }}">Вакансии</a> | 171 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
173 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 172 | <a href="{{ route('education') }}">Образование</a> |
174 | <a href="{{ route('education') }}">Образование</a> | 173 | <a href="{{ route('news') }}">Новости</a> |
175 | <a href="{{ route('news') }}">Новости</a> | 174 | <a href="{{ route('contacts') }}">Контакты</a> |
176 | <a href="{{ route('contacts') }}">Контакты</a> | 175 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
177 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 176 | </nav> |
178 | </nav> | 177 | </div> |
179 | </div> | 178 | <div class="footer__main-col"> |
180 | <div class="footer__main-col"> | 179 | <div class="footer__main-title">Работодателям</div> |
181 | <div class="footer__main-title">Работодателям</div> | 180 | <nav> |
182 | <nav> | 181 | <a href="{{ route('register') }}">Регистрация</a> |
183 | <a href="{{ route('register') }}">Регистрация</a> | 182 | <a href="{{ route('bd_resume') }}">База резюме</a> |
184 | <a href="{{ route('bd_resume') }}">База резюме</a> | 183 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
185 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 184 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
186 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 185 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
187 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 186 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
188 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 187 | </nav> |
189 | </nav> | 188 | </div> |
190 | </div> | 189 | |
191 | 190 | <div class="footer__main-col"> | |
192 | <div class="footer__main-col"> | 191 | <div class="footer__main-title">Контакты</div> |
193 | <div class="footer__main-title">Контакты</div> | 192 | <div class="footer__main-contacts"> |
194 | <div class="footer__main-contacts"> | 193 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
195 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 194 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
196 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 195 | </div> |
197 | </div> | 196 | <div class="socials"> |
198 | <div class="socials"> | 197 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
199 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 198 | <svg> |
200 | <svg> | 199 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
201 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 200 | </svg> |
202 | </svg> | 201 | </a> |
203 | </a> | 202 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
204 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 203 | <svg> |
205 | <svg> | 204 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
206 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 205 | </svg> |
207 | </svg> | 206 | </a> |
208 | </a> | 207 | </div> |
209 | </div> | 208 | </div> |
210 | </div> | 209 | </div> |
211 | </div> | 210 | |
212 | 211 | <div class="footer__main-copy"> | |
213 | <div class="footer__main-copy"> | 212 | <div>© 2023 — RekaMore.su</div> |
214 | <div>© 2023 — RekaMore.su</div> | 213 | <nav> |
215 | <nav> | 214 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
216 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 215 | <span></span> |
217 | <span></span> | 216 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
218 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 217 | </nav> |
219 | </nav> | 218 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
220 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 219 | <svg> |
221 | <svg> | 220 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
222 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 221 | </svg> |
223 | </svg> | 222 | <span> |
224 | <span> | 223 | Дизайн и разработка: |
225 | Дизайн и разработка: | 224 | <b>NoLogoStudio.ru</b> |
226 | <b>NoLogoStudio.ru</b> | 225 | </span> |
227 | </span> | 226 | </a> |
228 | </a> | 227 | </div> |
229 | </div> | 228 | </div> |
230 | </div> | 229 | </div> |
231 | </div> | 230 | </footer> |
232 | </footer> | 231 | </div> <!-- END BOTTOM WRAPPER --> |
233 | </div> <!-- END BOTTOM WRAPPER --> | 232 | |
234 | 233 | <div hidden> <!-- BEGIN MODALS WRAPPER --> | |
235 | <div hidden> <!-- BEGIN MODALS WRAPPER --> | 234 | <!-- Соискатель отправляет сообщение работодателю --> |
236 | <!-- Соискатель отправляет сообщение работодателю --> | 235 | @include('modals.send_worker_new') |
237 | @include('modals.send_worker') | 236 | |
238 | 237 | <!-- Работодатель отправляет сообщение соискателю --> | |
239 | <!-- Работодатель отправляет сообщение соискателю --> | 238 | @include('modals.send_employer_new') |
240 | @include('modals.send_employer') | 239 | |
241 | 240 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> | |
242 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> | 241 | @include('modals.send_message_noaut') |
243 | @include('modals.send_message_noaut') | 242 | |
243 | @include('modals.send_message_noaut2') | ||
244 | |||
244 | 245 | <!-- Форма авторизации --> | |
245 | <!-- Форма авторизации --> | 246 | @include('modals.send_login') |
246 | @include('modals.send_login') | 247 | |
247 | 248 | <!-- Сбросить пароль --> | |
248 | <!-- Сбросить пароль --> | 249 | @include('modals.reset_password') |
249 | @include('modals.reset_password') | 250 | |
250 | 251 | <!-- Регистрация --> | |
251 | <!-- Регистрация --> | 252 | @include('modals.register') |
252 | @include('modals.register') | 253 | |
253 | 254 | <!-- Благодарность по отправке сообщения работодателю --> | |
254 | <!-- Благодарность по отправке сообщения работодателю --> | 255 | @include('modals.thank_you_send_employer') |
255 | @include('modals.thank_you_send_employer') | 256 | |
256 | 257 | <!-- Благодарность по отправке сообщения менеджеру --> | |
257 | <!-- Благодарность по отправке сообщения менеджеру --> | 258 | @include('modals.thank_you_send_manager') |
258 | @include('modals.thank_you_send_manager') | 259 | |
259 | 260 | <!-- Благодарность после регистрации --> | |
260 | <!-- Благодарность после регистрации --> | 261 | @include('modals.thank_you_send_for_employer') |
261 | @include('modals.thank_you_send_for_employer') | 262 | |
262 | 263 | <!-- Благодарность после регистрации для работника --> | |
263 | <!-- Благодарность после регистрации для работника --> | 264 | @include('modals.thank_you_send_for_worker') |
264 | @include('modals.thank_you_send_for_worker') | 265 | |
265 | 266 | <!-- Подтверждение удаления профиля --> | |
266 | <!-- Подтверждение удаления профиля --> | 267 | @include('modals.delete_profile') |
267 | @include('modals.delete_profile') | 268 | |
268 | 269 | <!-- Подверждение об удалении профиля --> | |
269 | <!-- Подверждение об удалении профиля --> | 270 | @include('modals.success_delete_profile') |
270 | @include('modals.success_delete_profile') | 271 | |
271 | 272 | </div> <!-- END MODALS WRAPPER --> | |
272 | </div> <!-- END MODALS WRAPPER --> | 273 | |
273 | 274 | ||
274 | 275 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> | |
275 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> | 276 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> |
276 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> | 277 | <script src="{{ asset('js/jquery.select2.js') }}"></script> |
277 | <script src="{{ asset('js/jquery.select2.js') }}"></script> | 278 | <script src="{{ asset('js/swiper.js') }}"></script> |
278 | <script src="{{ asset('js/swiper.js') }}"></script> | 279 | <script src="{{ asset('js/script.js') }}"></script> |
280 | <script src="{{ asset('js/star-rating.min.js') }}"></script> | ||
279 | <script src="{{ asset('js/script.js') }}"></script> | 281 | <script> |
280 | <script src="{{ asset('js/star-rating.min.js') }}"></script> | 282 | var getUrlParameter = function getUrlParameter(sParam) { |
281 | <script> | 283 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), |
282 | var getUrlParameter = function getUrlParameter(sParam) { | 284 | sURLVariables = sPageURL.split('&'), |
283 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), | 285 | sParameterName, |
284 | sURLVariables = sPageURL.split('&'), | 286 | i; |
285 | sParameterName, | 287 | for (i = 0; i < sURLVariables.length; i++) { |
286 | i; | 288 | sParameterName = sURLVariables[i].split('='); |
287 | for (i = 0; i < sURLVariables.length; i++) { | 289 | if (sParameterName[0] === sParam) { |
288 | sParameterName = sURLVariables[i].split('='); | 290 | return sParameterName[1] === undefined ? true : sParameterName[1]; |
289 | if (sParameterName[0] === sParam) { | 291 | } |
290 | return sParameterName[1] === undefined ? true : sParameterName[1]; | 292 | } |
291 | } | 293 | }; |
292 | } | 294 | </script> |
293 | }; | 295 | @yield('scripts') |
294 | </script> | 296 | |
295 | @yield('scripts') | 297 | @include('js.modals') |
resources/views/layout/pdf.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="ru"> | 2 | <html lang="ru"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>Резюме соискателя</title> | 6 | <title>Резюме соискателя</title> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
8 | <meta name="theme-color" content="#377D87"> | 8 | <meta name="theme-color" content="#377D87"> |
9 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> | 9 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> |
10 | <style> | ||
11 | body { | ||
12 | font-family:'DejaVu Sans',sans-serif; | ||
13 | background:#fff; | ||
14 | font-size:1.6rem; | ||
15 | font-weight:400; | ||
16 | color:#363A3F; | ||
17 | } | ||
18 | |||
19 | .main { | ||
20 | padding: 30px 0; | ||
21 | } | ||
22 | |||
23 | .thing { | ||
24 | color: #3a3b3c; | ||
25 | /* background-color: #f2f5fc; */ | ||
26 | } | ||
27 | |||
28 | .thing__profile { | ||
29 | |||
30 | } | ||
31 | |||
32 | .thing__profile-photo { | ||
33 | width: 200px; | ||
34 | border-radius: 8px; | ||
35 | float: left; | ||
36 | margin-right: 20px; | ||
37 | } | ||
38 | |||
39 | .thing__profile-body { | ||
40 | |||
41 | } | ||
42 | |||
43 | .thing__title { | ||
44 | width: 100%; | ||
45 | font-size: 32px; | ||
46 | font-weight: 700; | ||
47 | line-height: 1.1; | ||
48 | margin: 0; | ||
49 | } | ||
50 | |||
51 | .thing__text { | ||
52 | font-size: 14px; | ||
53 | line-height: 1.4; | ||
54 | margin: 15px 0 0 0; | ||
55 | } | ||
56 | |||
57 | .main__spoiler { | ||
58 | margin: 0px 0px 32px 0px; | ||
59 | } | ||
60 | |||
61 | .main__spoiler-body { | ||
62 | |||
63 | } | ||
64 | |||
65 | .main__table { | ||
66 | border-collapse: collapse; | ||
67 | table-layout: fixed; | ||
68 | font-size: 14px; | ||
69 | width: 100%; | ||
70 | background: #ffffff; | ||
71 | } | ||
72 | |||
73 | .main__table thead { | ||
74 | color: #ffffff; | ||
75 | font-size: 16px; | ||
76 | background-color: #377d87; | ||
77 | } | ||
78 | |||
79 | .main__table th { | ||
80 | padding: 8px 16px; | ||
81 | } | ||
82 | |||
83 | .main__table td { | ||
84 | width: 40%; | ||
85 | padding: 8px 16px; | ||
86 | border: 1px solid #cecece; | ||
87 | } | ||
88 | |||
89 | .main__table td b { | ||
90 | font-weight: 700; | ||
91 | } | ||
92 | |||
93 | .main__table b { | ||
94 | display: block; | ||
95 | } | ||
96 | |||
97 | .main__table a { | ||
98 | color: #377d87; | ||
99 | text-decoration: underline; | ||
100 | } | ||
101 | |||
102 | .main__table td + td { | ||
103 | width: 60%; | ||
104 | } | ||
105 | |||
106 | .main__table_three td { | ||
107 | width: 25% !important; | ||
108 | } | ||
109 | |||
110 | .main__table_three td:last-child { | ||
111 | width: 50% !important; | ||
112 | } | ||
113 | |||
114 | .main h2 { | ||
115 | margin: 0; | ||
116 | font-weight: 700; | ||
117 | font-size: 30px; | ||
118 | } | ||
119 | |||
120 | .main p { | ||
121 | margin: 0; | ||
122 | font-size: 14px; | ||
123 | line-height: 1.4; | ||
124 | margin: 15px 0 0 0; | ||
125 | } | ||
126 | |||
127 | .main__resume-profile-info { | ||
128 | margin: 30px 0px 0px 0px; | ||
129 | } | ||
130 | |||
131 | .main__resume-profile-info-title { | ||
132 | margin-bottom: 20px !important; | ||
133 | color: #3a3b3c; | ||
134 | } | ||
135 | |||
136 | .main__resume-profile-info-body-item { | ||
137 | margin: 0px 0px 20px 0px; | ||
138 | } | ||
139 | |||
140 | .main__resume-profile-info-body-subtitle { | ||
141 | color: #4d88d9; | ||
142 | margin: 0px 0px 10px 0px; | ||
143 | font-weight: 700; | ||
144 | font-size: 22px; | ||
145 | } | ||
146 | |||
147 | .main__resume-profile-info-body-inner { | ||
148 | margin: 0; | ||
149 | padding: 0; | ||
150 | font-size: 12px; | ||
151 | } | ||
152 | |||
153 | .main__resume-profile-info-body-inner li { | ||
154 | list-style-type: none; | ||
155 | margin: 0px 0px 20px 0px; | ||
156 | } | ||
157 | |||
158 | .main__resume-profile-info-body-inner b { | ||
159 | display: block; | ||
160 | margin: 0px 0px 6px 0px; | ||
161 | color: #377d87; | ||
162 | font-size: 14px; | ||
163 | } | ||
164 | |||
165 | .main__resume-profile-info-body-inner span { | ||
166 | display: block; | ||
167 | } | ||
168 | |||
169 | .main__resume-profile-info-body-inner a { | ||
170 | display: block; | ||
171 | text-decoration: none; | ||
172 | color: inherit; | ||
173 | } | ||
174 | |||
175 | </style> | ||
10 | <style> | 176 | </head> |
11 | body { | 177 | |
12 | font-family:'DejaVu Sans',sans-serif; | 178 | <body id="body" class="pdf"> |
13 | background:#fff; | 179 | <section class="thing thing_pdf"> |
14 | font-size:1.6rem; | 180 | <div class="container"> |
15 | font-weight:400; | 181 | <div class="thing__profile"> |
16 | color:#363A3F; | 182 | <img src="{{ asset(Storage::url($Query[0]['photo'])) }}" alt="" class="thing__profile-photo"> |
17 | } | 183 | <div class="thing__profile-body"> |
18 | 184 | <<<<<<< HEAD | |
19 | .main { | 185 | <h1 class="thing__title">Назаров Платон Фёдорович</h1> |
20 | padding: 30px 0; | 186 | <div style="clear:both;"></div> |
21 | } | 187 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены |
22 | 188 | исключительно в разрезе маркетинговых и финансовых предпосылок.</p> | |
23 | .thing { | 189 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены |
24 | color: #3a3b3c; | 190 | исключительно в разрезе маркетинговых и финансовых предпосылок.</p> |
25 | /* background-color: #f2f5fc; */ | 191 | ======= |
26 | } | 192 | <h1 class="thing__title">{{ $Query[0]['users']['surname']." ".$Query[0]['users']['name_man']." ".$Query[0]['users']['surname2'] }}</h1> |
27 | 193 | <div style="clear:both;"></div> | |
28 | .thing__profile { | 194 | <p class="thing__text">{{ $Query[0]['text'] }}</p> |
29 | 195 | >>>>>>> 7571b20fd5c13ed6f79784db64504d6f9f64f2de | |
30 | } | 196 | </div> |
31 | 197 | </div> | |
32 | .thing__profile-photo { | 198 | </div> |
33 | width: 200px; | 199 | </section> |
200 | <main class="main"> | ||
201 | <div class="container"> | ||
202 | <div class="main__resume-profile"> | ||
203 | <div class="main__content"> | ||
204 | <div class="main__spoiler"> | ||
34 | border-radius: 8px; | 205 | <!-- <button type="button" class="main__spoiler-toper js-toggle active">Основная |
35 | float: left; | 206 | информация</button> --> |
36 | margin-right: 20px; | 207 | <div class="main__spoiler-body"> |
37 | } | 208 | <table class="main__table"> |
38 | 209 | <thead> | |
39 | .thing__profile-body { | 210 | <tr> |
40 | 211 | <th colspan="2">Основная информация</th> | |
41 | } | 212 | </tr> |
213 | </thead> | ||
214 | <tbody> | ||
215 | <tr> | ||
216 | <td>Имя:</td> | ||
42 | 217 | <td><b>{{ $Query[0]['users']['name_man'] }}</b></td> | |
43 | .thing__title { | 218 | </tr> |
44 | width: 100%; | 219 | <tr> |
45 | font-size: 32px; | 220 | <td>Должность:</td> |
221 | <td> | ||
222 | @foreach ($Query[0]['job_titles'] as $it) | ||
46 | font-weight: 700; | 223 | <b>{{ $it['name'] }}</b><br> |
47 | line-height: 1.1; | 224 | @endforeach |
48 | margin: 0; | 225 | </td> |
49 | } | 226 | </tr> |
50 | 227 | <tr> | |
51 | .thing__text { | 228 | <td>Телефон:</td> |
52 | font-size: 14px; | 229 | <td><b><a>{{ $Query[0]['telephone'] }}</a></b> |
53 | line-height: 1.4; | 230 | <b><a>{{ $Query[0]['telephone2'] }}</a></b> |
54 | margin: 15px 0 0 0; | 231 | </td> |
55 | } | 232 | </tr> |
56 | 233 | <tr> | |
57 | .main__spoiler { | 234 | <td>E-mail:</td> |
235 | <td><b><a>{{ $Query[0]['email'] }}</a></b></td> | ||
236 | </tr> | ||
58 | margin: 0px 0px 32px 0px; | 237 | <tr> |
59 | } | 238 | <td>Возраст:</td> |
60 | 239 | <td><b>{{ $Query[0]['old_year'] }}</b></td> | |
61 | .main__spoiler-body { | 240 | </tr> |
62 | 241 | <tr> | |
63 | } | 242 | <td>Статус:</td> |
64 | 243 | <td> | |
65 | .main__table { | 244 | @php $code = $Query[0]['status_work']; @endphp |
66 | border-collapse: collapse; | 245 | <b>@if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif</b></td> |
67 | table-layout: fixed; | 246 | </tr> |
68 | font-size: 14px; | 247 | <tr> |
69 | width: 100%; | 248 | <td>Город проживания:</td> |
70 | background: #ffffff; | 249 | <td><b>{{ $Query[0]['city'] }}</b></td> |
71 | } | 250 | </tr> |
72 | 251 | <tr> | |
73 | .main__table thead { | 252 | <td>Уровень английского:</td> |
74 | color: #ffffff; | 253 | <td><b>{{ $Query[0]['en_is'] }}</b></td> |
75 | font-size: 16px; | 254 | </tr> |
76 | background-color: #377d87; | ||
77 | } | 255 | <tr> |
78 | 256 | <td>Опыт работы:</td> | |
79 | .main__table th { | 257 | <td><b>{{ $Query[0]['old_year'] }}</b></td> |
80 | padding: 8px 16px; | ||
81 | } | ||
82 | |||
83 | .main__table td { | ||
84 | width: 40%; | 258 | </tr> |
85 | padding: 8px 16px; | 259 | </tbody> |
86 | border: 1px solid #cecece; | ||
87 | } | ||
88 | |||
89 | .main__table td b { | ||
90 | font-weight: 700; | ||
91 | } | 260 | </table> |
261 | </div> | ||
262 | </div> | ||
263 | <div class="main__spoiler"> | ||
264 | |||
265 | <div class="main__spoiler-body"> | ||
266 | <table class="main__table"> | ||
267 | <thead> | ||
268 | <tr> | ||
269 | <th colspan="2">Сертификаты / документы</th> | ||
270 | </tr> | ||
271 | </thead> | ||
272 | <tbody> | ||
273 | @if (count($Query[0]['sertificate'])) | ||
274 | @foreach($Query[0]['sertificate'] as $it) | ||
275 | <tr> | ||
92 | 276 | <td>{{ $it['name']." ".$it['education'] }}</td> | |
93 | .main__table b { | 277 | <td><a>{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}</a></td> |
94 | display: block; | 278 | </tr> |
95 | } | 279 | @endforeach |
96 | 280 | @else | |
97 | .main__table a { | ||
98 | color: #377d87; | 281 | <tr> |
99 | text-decoration: underline; | 282 | <td> - </td> |
100 | } | 283 | <td> - </td> |
101 | 284 | </tr> | |
102 | .main__table td + td { | 285 | @endif |
103 | width: 60%; | ||
104 | } | ||
105 | |||
106 | .main__table_three td { | ||
107 | width: 25% !important; | ||
108 | } | ||
109 | |||
110 | .main__table_three td:last-child { | ||
111 | width: 50% !important; | ||
112 | } | ||
113 | |||
114 | .main h2 { | ||
115 | margin: 0; | ||
116 | font-weight: 700; | ||
117 | font-size: 30px; | ||
118 | } | ||
119 | |||
120 | .main p { | ||
121 | margin: 0; | ||
122 | font-size: 14px; | ||
123 | line-height: 1.4; | ||
124 | margin: 15px 0 0 0; | 286 | </tbody> |
287 | </table> | ||
288 | </div> | ||
289 | </div> | ||
290 | <div class="main__spoiler"> | ||
291 | |||
292 | <div class="main__spoiler-body"> | ||
293 | <table class="main__table main__table_three"> | ||
294 | <thead> | ||
295 | <tr> | ||
296 | <th colspan="3">Опыт работы</th> | ||
297 | </tr> | ||
298 | </thead> | ||
299 | <tbody> | ||
300 | @if (count($Query[0]['place_worker']) > 0) | ||
301 | @foreach($Query[0]['place_worker'] as $it) | ||
125 | } | 302 | <tr> |
126 | 303 | <td>{{ $it['begin_work']." - ".$it['end_work'] }} | |
127 | .main__resume-profile-info { | 304 | </td> |
128 | margin: 30px 0px 0px 0px; | 305 | <td><b>{{ $it['name_company'] }}</b> |
129 | } | 306 | </td> |
130 | 307 | <td><b>{{ $it['job_title'] }}</b> | |
131 | .main__resume-profile-info-title { | 308 | Судно: {{ $it['teplohod'] }} |
132 | margin-bottom: 20px !important; | 309 | </td> |
133 | color: #3a3b3c; | 310 | </tr> |
134 | } | ||
135 | |||
136 | .main__resume-profile-info-body-item { | ||
137 | margin: 0px 0px 20px 0px; | ||
138 | } | 311 | @endforeach |
139 | 312 | @endif | |
140 | .main__resume-profile-info-body-subtitle { | 313 | </tbody> |
141 | color: #4d88d9; | 314 | </table> |
142 | margin: 0px 0px 10px 0px; | 315 | </div> |
143 | font-weight: 700; | 316 | </div> |
144 | font-size: 22px; | 317 | </div> |
145 | } | 318 | <div class="main__resume-profile-about"> |
146 | 319 | <h2 class="main__resume-profile-about-title">О себе</h2> | |
147 | .main__resume-profile-info-body-inner { | 320 | <p class="main__resume-profile-about-text">{{ $Query[0]['text'] }}</p> |
148 | margin: 0; | 321 | </div> |
149 | padding: 0; | 322 | <div class="main__resume-profile-info"> |
150 | font-size: 12px; | 323 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> |
151 | } | 324 | <div class="main__resume-profile-info-body"> |
152 | 325 | @if ((isset($Query[0]['prev_company'])) && (count($Query[0]['prev_company']) > 0)) | |
153 | .main__resume-profile-info-body-inner li { | 326 | @foreach ($Query[0]['prev_company'] as $it) |
154 | list-style-type: none; | 327 | <div class="main__resume-profile-info-body-item"> |
155 | margin: 0px 0px 20px 0px; | 328 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it['name_company'] }}</h3> |
156 | } | 329 | <ul class="main__resume-profile-info-body-inner"> |
157 | 330 | <li> | |
158 | .main__resume-profile-info-body-inner b { | 331 | <b>Руководитель</b> |
159 | display: block; | 332 | <span>{{ $it['direct'] }}</span> |
160 | margin: 0px 0px 6px 0px; | 333 | </li> |
161 | color: #377d87; | 334 | <li> |
162 | font-size: 14px; |
resources/views/list_vacancies.blade.php
1 | @php | 1 | @php |
2 | use App\Classes\StatusUser; | 2 | use App\Classes\StatusUser; |
3 | @endphp | 3 | @endphp |
4 | 4 | ||
5 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) | 5 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) |
6 | 6 | ||
7 | @section('scripts') | 7 | @section('scripts') |
8 | <script> | 8 | <script> |
9 | console.log('Test system'); | 9 | console.log('Test system'); |
10 | $(document).on('change', '#jobs', function() { | 10 | $(document).on('change', '#jobs', function() { |
11 | var val = $(this).val(); | 11 | var val = $(this).val(); |
12 | var main_oskar = $('#main_ockar'); | 12 | var main_oskar = $('#main_ockar'); |
13 | var ti_head = $('#title_head'); | ||
13 | 14 | ||
14 | console.log('Code='+val); | 15 | console.log('Code='+val); |
15 | console.log('Click change...'); | 16 | console.log('Click change...'); |
16 | $.ajax({ | 17 | $.ajax({ |
17 | type: "GET", | 18 | type: "GET", |
18 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | 19 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
19 | data: "job="+val, | 20 | data: "job="+val, |
20 | success: function (data) { | 21 | success: function (data) { |
21 | console.log('Выбор сделан!'); | 22 | console.log('Выбор сделан!'); |
22 | console.log(data); | 23 | |
23 | main_oskar.html(data); | 24 | main_oskar.html(data); |
24 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 25 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
25 | }, | 26 | }, |
26 | headers: { | 27 | headers: { |
27 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 28 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
28 | }, | 29 | }, |
29 | error: function (data) { | 30 | error: function (data) { |
30 | data = JSON.stringify(data); | 31 | data = JSON.stringify(data); |
31 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
32 | } | 33 | } |
33 | }); | 34 | }); |
35 | |||
36 | if ((val == '') || (val == '0')) { | ||
37 | title_head.html('Все категории'); | ||
38 | } else { | ||
39 | $.ajax({ | ||
40 | type: "GET", | ||
41 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | ||
42 | data: "job=" + val +"&title=1", | ||
43 | success: function (data) { | ||
44 | |||
45 | console.log(data); | ||
46 | }, | ||
47 | |||
48 | headers: { | ||
49 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
50 | }, | ||
51 | |||
52 | error: function (data) { | ||
53 | data = JSON.stringify(data); | ||
54 | console.log('Error: ' + data); | ||
55 | } | ||
56 | }); | ||
57 | |||
58 | } | ||
34 | }); | 59 | }); |
35 | 60 | ||
36 | $(document).on('click', '.js_send_it_button', function() { | 61 | $(document).on('click', '.js_send_it_button', function() { |
37 | var this_ = $(this); | 62 | var this_ = $(this); |
38 | var code_user_id = this_.attr('data-uid'); | 63 | var code_user_id = this_.attr('data-uid'); |
39 | var code_to_user_id = this_.attr('data-tuid'); | 64 | var code_to_user_id = this_.attr('data-tuid'); |
40 | var code_vacancy = this_.attr('data-vacancy'); | 65 | var code_vacancy = this_.attr('data-vacancy'); |
41 | var user_id = $('#_user_id'); | 66 | var user_id = $('#_user_id'); |
42 | var to_user_id = $('#_to_user_id'); | 67 | var to_user_id = $('#_to_user_id'); |
43 | var vacancy = $('#_vacancy'); | 68 | var vacancy = $('#_vacancy'); |
44 | 69 | ||
45 | console.log('Клик на кнопки...'); | 70 | console.log('Клик на кнопки...'); |
46 | 71 | ||
47 | user_id.val(code_user_id); | 72 | user_id.val(code_user_id); |
48 | to_user_id.val(code_to_user_id); | 73 | to_user_id.val(code_to_user_id); |
49 | vacancy.val(code_vacancy); | 74 | vacancy.val(code_vacancy); |
50 | }); | 75 | }); |
51 | 76 | ||
52 | $(document).on('change', '#sort_ajax', function() { | 77 | $(document).on('change', '#sort_ajax', function() { |
53 | var this_ = $(this); | 78 | var this_ = $(this); |
54 | var val_ = this_.val(); | 79 | var val_ = this_.val(); |
55 | console.log('sort items '+val_); | 80 | console.log('sort items '+val_); |
56 | 81 | ||
57 | $.ajax({ | 82 | $.ajax({ |
58 | type: "GET", | 83 | type: "GET", |
59 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", | 84 | url: "{{ route('list-vacancies', ['categories' => $categories->id]) }}", |
60 | data: "sort="+val_+"&block=1", | 85 | data: "sort="+val_+"&block=1", |
61 | success: function (data) { | 86 | success: function (data) { |
62 | console.log('Выбор сортировки'); | 87 | console.log('Выбор сортировки'); |
63 | console.log(data); | 88 | console.log(data); |
64 | $('#main_ockar').html(data); | 89 | $('#main_ockar').html(data); |
65 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 90 | history.pushState({}, '', "{{ route('list-vacancies', ['categories' => $categories->id]) }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
66 | }, | 91 | }, |
67 | headers: { | 92 | headers: { |
68 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 93 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
69 | }, | 94 | }, |
70 | error: function (data) { | 95 | error: function (data) { |
71 | data = JSON.stringify(data); | 96 | data = JSON.stringify(data); |
72 | console.log('Error: ' + data); | 97 | console.log('Error: ' + data); |
73 | } | 98 | } |
74 | }); | 99 | }); |
75 | }); | 100 | }); |
76 | 101 | ||
77 | 102 | ||
78 | 103 | ||
79 | $(document).ready(function(){ | 104 | $(document).ready(function(){ |
80 | var sel = $('#select2-sort_ajax-container'); | 105 | var sel = $('#select2-sort_ajax-container'); |
81 | var key = getUrlParameter('sort'); | 106 | var key = getUrlParameter('sort'); |
82 | console.log(sel); | 107 | console.log(sel); |
83 | console.log(key); | 108 | console.log(key); |
84 | 109 | ||
85 | if (key !=='') { | 110 | if (key !=='') { |
86 | console.log(key); | 111 | console.log(key); |
87 | switch (key) { | 112 | switch (key) { |
88 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 113 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
89 | case "name_up": sel.html('По имени (возрастание)'); break; | 114 | case "name_up": sel.html('По имени (возрастание)'); break; |
90 | case "name_down": sel.html('По дате (убывание)'); break; | 115 | case "name_down": sel.html('По дате (убывание)'); break; |
91 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 116 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
92 | case "created_at_down": sel.html('По дате (убывание)'); break; | 117 | case "created_at_down": sel.html('По дате (убывание)'); break; |
93 | } | 118 | } |
94 | 119 | ||
95 | } | 120 | } |
96 | }); | 121 | }); |
97 | </script> | 122 | </script> |
98 | @include('js.favorite-vacancy') | 123 | @include('js.favorite-vacancy') |
99 | @endsection | 124 | @endsection |
100 | @section('content') | 125 | @section('content') |
101 | <section class="thing"> | 126 | <section class="thing"> |
102 | <div class="container"> | 127 | <div class="container"> |
103 | <form class="thing__body" action="{{ route('list-vacancies', ['categories' => $Name_categori[0]->id]) }}" method="POST"> | 128 | <form class="thing__body" action="{{ route('list-vacancies', ['categories' => $Name_categori[0]->id]) }}" method="POST"> |
104 | <ul class="breadcrumbs thing__breadcrumbs"> | 129 | <ul class="breadcrumbs thing__breadcrumbs"> |
105 | <li><a href="{{ route('index') }}">Главная</a></li> | 130 | <li><a href="{{ route('index') }}">Главная</a></li> |
106 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> | 131 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> |
107 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> | 132 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> |
108 | </ul> | 133 | </ul> |
109 | <h1 class="thing__title">Вакансии</h1> | 134 | <h1 class="thing__title">Вакансии</h1> |
110 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | 135 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для |
111 | существующих финансовых и административных условий.</p> | 136 | существующих финансовых и административных условий.</p> |
112 | <div class="select select_search thing__select"> | 137 | <div class="select select_search thing__select"> |
113 | <div class="select__icon"> | 138 | <div class="select__icon"> |
114 | <svg> | 139 | <svg> |
115 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 140 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
116 | </svg> | 141 | </svg> |
117 | </div> | 142 | </div> |
118 | <select class="js-select2" id="jobs" name="jobs"> | 143 | <select class="js-select2" id="jobs" name="jobs"> |
119 | <option value="0" selected>Выберите должность</option> | 144 | <option value="0" selected>Выберите должность</option> |
120 | @if ($Job_title->count()) | 145 | @if ($Job_title->count()) |
121 | @foreach($Job_title as $JT) | 146 | @foreach($Job_title as $JT) |
122 | <option value="{{ $JT->id }}">{{ $JT->name }}</option> | 147 | <option value="{{ $JT->id }}">{{ $JT->name }}</option> |
123 | @endforeach | 148 | @endforeach |
124 | @endif | 149 | @endif |
125 | </select> | 150 | </select> |
126 | </div> | 151 | </div> |
127 | </form> | 152 | </form> |
128 | </div> | 153 | </div> |
129 | </section> | 154 | </section> |
130 | <main class="main"> | 155 | <main class="main"> |
131 | <div class="container"> | 156 | <div class="container"> |
132 | <div class="main__vacancies"> | 157 | <div class="main__vacancies" > |
133 | @if (isset($job)) | 158 | @if (isset($Name_categori[0]->name)) |
134 | <h2 class="main__vacancies-title">Категория вакансий {{ $job }}</h2> | 159 | <h2 class="main__vacancies-title">Категория вакансий {{ $Name_categori[0]->name }}</h2> |
135 | @else | 160 | @else |
136 | <h2 class="main__vacancies-title">Все категории</h2> | 161 | <h2 class="main__vacancies-title" id="title_head" name="title_head">Все категории</h2> |
137 | @endif | 162 | @endif |
138 | <div class="filters main__vacancies-filters"> | 163 | <div class="filters main__vacancies-filters"> |
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> | 164 | <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> |
140 | <div class="filters__body"> | 165 | <div class="filters__body"> |
141 | <div class="select filters__select"> | 166 | <div class="select filters__select"> |
142 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 167 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
143 | <option value="default">Сортировка (по умолчанию)</option> | 168 | <option value="default">Сортировка (по умолчанию)</option> |
144 | <option value="name_up">По имени (возрастание)</option> | 169 | <option value="name_up">По имени (возрастание)</option> |
145 | <option value="name_down">По имени (убывание)</option> | 170 | <option value="name_down">По имени (убывание)</option> |
146 | <option value="created_at_up">По дате (возрастание)</option> | 171 | <option value="created_at_up">По дате (возрастание)</option> |
147 | <option value="created_at_down">По дате (убывание)</option> | 172 | <option value="created_at_down">По дате (убывание)</option> |
148 | </select> | 173 | </select> |
149 | </div> | 174 | </div> |
150 | </div> | 175 | </div> |
151 | </div> | 176 | </div> |
152 | 177 | ||
153 | <div id="main_ockar" class="main__vacancies" name="main_ockar" style="width:100%;"> | 178 | <div class="main__vacancies" style="width:100%;" id="main_ockar" name="main_oskar"> |
179 | @php $i = ($Query->currentPage() * $Query->perPage() - $Query->count() - 1) @endphp | ||
180 | |||
154 | @foreach ($Query as $Q) | 181 | @foreach ($Query as $Q) |
182 | @foreach ($Reclama as $Rec) | ||
183 | @if ($Rec->position == $i) | ||
184 | <div class="main__vacancies-thing"> | ||
185 | <img src="{{ asset(Storage::url($Rec->image)) }}" alt="{{ $Rec->title }}" class="main__vacancies-thing-pic"> | ||
186 | <div class="main__vacancies-thing-body"> | ||
187 | <h2>{{ $Rec->title }}</h2> | ||
188 | <div> | ||
189 | {!! $Rec->text !!} | ||
190 | </div> | ||
191 | <a href="{{ $Rec->link }}" class="button">Узнать больше</a> | ||
192 | </div> | ||
193 | </div> | ||
194 | @endif | ||
195 | @endforeach | ||
155 | <div class="main__vacancies-item main__employer-page-two-item"> | 196 | <div class="main__vacancies-item main__employer-page-two-item"> |
197 | |||
156 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> | 198 | <a href="{{ route('list-vacancies', ['categories' => $categories->id]) }}" class="back main__employer-page-two-item-back"> |
157 | <svg> | 199 | <svg> |
158 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 200 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
159 | </svg> | 201 | </svg> |
160 | <span> | 202 | <span> |
161 | Вернуться к списку вакансий | 203 | Вернуться к списку вакансий |
162 | </span> | 204 | </span> |
163 | </a> | 205 | </a> |
206 | |||
164 | <div class="main__employer-page-two-item-toper"> | 207 | <div class="main__employer-page-two-item-toper"> |
165 | @if (isset($Q->employer)) | 208 | @if (isset($Q->employer)) |
166 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> | 209 | <img src="{{ asset(Storage::url($Q->employer->logo)) }}" alt="{{ $Q->employer->name }}"> |
167 | @endif | 210 | @endif |
168 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> | 211 | <span>@if (!empty($Q->name)) {{ $Q->name }} @endif</span> |
169 | </div> | 212 | </div> |
213 | |||
170 | <div class="main__employer-page-two-item-text"> | 214 | <div class="main__employer-page-two-item-text"> |
171 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 215 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор |
172 | специалистов на следующие должности:</div> | 216 | специалистов на следующие должности:</div> |
173 | <div class="main__employer-page-two-item-text-links"> | 217 | <div class="main__employer-page-two-item-text-links"> |
174 | @if (isset($Q->jobs)) | 218 | @if (isset($Q->jobs)) |
175 | @foreach ($Q->jobs as $key => $j) | 219 | @foreach ($Q->jobs as $key => $j) |
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> | 220 | <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> |
177 | @endforeach | 221 | @endforeach |
178 | @endif | 222 | @endif |
179 | </div> | 223 | </div> |
180 | </div> | 224 | </div> |
225 | |||
181 | <div class="main__employer-page-two-item-text"> | 226 | <div class="main__employer-page-two-item-text"> |
182 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 227 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
183 | <div class="main__employer-page-two-item-text-body"> | 228 | <div class="main__employer-page-two-item-text-body"> |
184 | {!! $Q->text !!} | 229 | {!! $Q->text !!} |
185 | </div> | 230 | </div> |
186 | </div> | 231 | </div> |
187 | <div class="main__employer-page-two-item-text"> | 232 | <div class="main__employer-page-two-item-text"> |
188 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 233 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
189 | <div class="main__employer-page-two-item-text-body"> | 234 | <div class="main__employer-page-two-item-text-body"> |
190 | {!! $Q->description !!} | 235 | {!! $Q->description !!} |
191 | </div> | 236 | </div> |
192 | </div> | 237 | </div> |
193 | <div class="main__employer-page-two-item-text"> | 238 | <div class="main__employer-page-two-item-text"> |
194 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 239 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
195 | <div class="main__employer-page-two-item-text-body"> | 240 | <div class="main__employer-page-two-item-text-body"> |
196 | {!! $Q->contacts_emails !!} | 241 | {!! $Q->contacts_emails !!} |
197 | </div> | 242 | </div> |
198 | </div> | 243 | </div> |
199 | <div class="main__employer-page-two-item-text"> | 244 | <div class="main__employer-page-two-item-text"> |
200 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 245 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
201 | <div class="main__employer-page-two-item-text-body"> | 246 | <div class="main__employer-page-two-item-text-body"> |
202 | {!! $Q->contacts_telephones !!} | 247 | {!! $Q->contacts_telephones !!} |
203 | </div> | 248 | </div> |
204 | </div> | 249 | </div> |
205 | <div class="main__employer-page-two-item-tags"> | 250 | <div class="main__employer-page-two-item-tags"> |
206 | @if (isset($Q->jobs)) | 251 | @if (isset($Q->jobs)) |
207 | @foreach ($Q->jobs as $key => $j) | 252 | @foreach ($Q->jobs as $key => $j) |
208 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 253 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
209 | @endforeach | 254 | @endforeach |
210 | @endif | 255 | @endif |
211 | </div> | 256 | </div> |
212 | <div class="main__employer-page-two-item-buttons"> | 257 | <div class="main__employer-page-two-item-buttons"> |
213 | @guest | 258 | @guest |
214 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' | 259 | <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' |
215 | class="button main__employer-page-two-item-button">Откликнуться</button> | 260 | class="button main__employer-page-two-item-button">Откликнуться</button> |
216 | @else | 261 | @else |
217 | @if (App\Classes\StatusUser::Status()==1) | 262 | @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}' | 263 | <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> | 264 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> |
220 | @else | 265 | @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}' | 266 | <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> | 267 | class="button main__employer-page-two-item-button js_send_it_button">Откликнуться</button> |
223 | @endif | 268 | @endif |
224 | @endguest | 269 | @endguest |
225 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> | 270 | <a href="{{ route('vacancie', ['vacancy' => $Q->id]) }}" class="button button_light main__employer-page-two-item-button">Подробнее</a> |
226 | </div> | 271 | </div> |
227 | <div class="main__employer-page-two-item-bottom"> | 272 | <div class="main__employer-page-two-item-bottom"> |
228 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> | 273 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> |
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);?>"> | 274 | <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);?>"> |
230 | <svg> | 275 | <svg> |
231 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 276 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
232 | </svg> | 277 | </svg> |
233 | </button> | 278 | </button> |
234 | </div> | 279 | </div> |
235 | </div> | 280 | </div> |
281 | @php $i++ @endphp | ||
236 | @endforeach | 282 | @endforeach |
237 | <div style="margin-top: 20px"> | 283 | <div style="margin-top: 20px"> |
238 | {{ $Query->appends($_GET)->links('paginate') }} | 284 | {{ $Query->appends($_GET)->links('paginate') }} |
239 | </div> | 285 | </div><!-- конец --> |
240 | </div><!-- конец --> | 286 | </div> |
241 | </div> | 287 | </div> |
242 | </div> | 288 | </div> |
243 | </main> | 289 | </main> |
244 | @endsection | 290 | @endsection |
245 | 291 |
resources/views/modals/send_admin.blade.php
1 | <div id="send" class="modal"> | 1 | <div id="send" 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_employer_new.blade.php
File was created | 1 | <script> | |
2 | console.log('Сообщение работнику'); | ||
3 | $(document).on('change', '#btn_send_file', function() { | ||
4 | var send_name = $('#send_name'); | ||
5 | var send_name_val = send_name.val(); | ||
6 | var this_final_name = $('#this_final_name'); | ||
7 | |||
8 | console.log(send_name_val); | ||
9 | this_final_name.html(send_name_val); | ||
10 | |||
11 | }); | ||
12 | </script> | ||
13 | <div id="send2" class="modal"> | ||
14 | <div class="modal__body"> | ||
15 | fghfghfghfghfgh | ||
16 | </div> | ||
17 | </div> | ||
18 |
resources/views/modals/send_login.blade.php
1 | <div id="sign" class="modal"> | 1 | <div id="sign" class="modal"> |
2 | <div class="modal__body"> | 2 | <div class="modal__body"> |
3 | <div class="modal__title left">Войти</div> | 3 | <div class="modal__title left">Войти</div> |
4 | <form class="modal__sign"> | 4 | <form class="modal__sign"> |
5 | <div id="message_error" name="message_error"> | 5 | <div id="message_error" name="message_error" style="color: red"> |
6 | </div> | 6 | </div> |
7 | <div class="modal__sign-item"> | 7 | <div class="modal__sign-item"> |
8 | <input type="email" class="input" id="email_input" name="email" placeholder="E-mail" required> | 8 | <input type="email" class="input" id="email_input" name="email" placeholder="E-mail" required> |
9 | </div> | 9 | </div> |
10 | <div class="modal__sign-item"> | 10 | <div class="modal__sign-item"> |
11 | <input type="password" class="input" id="password" name="password" placeholder="Пароль" required> | 11 | <input type="password" class="input" id="password" name="password" placeholder="Пароль" required> |
12 | <button type="button" class="eye"> | 12 | <button type="button" class="eye"> |
13 | <svg class="js-password-show"> | 13 | <svg class="js-password-show"> |
14 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> | 14 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> |
15 | </svg> | 15 | </svg> |
16 | <svg class="js-password-hide"> | 16 | <svg class="js-password-hide"> |
17 | <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> | 17 | <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> |
18 | </svg> | 18 | </svg> |
19 | </button> | 19 | </button> |
20 | </div> | 20 | </div> |
21 | <div class="modal__sign-item"> | 21 | <div class="modal__sign-item"> |
22 | <div class="modal__sign-bottom"> | 22 | <div class="modal__sign-bottom"> |
23 | <div> | 23 | <div> |
24 | <label class="checkbox"> | 24 | <label class="checkbox"> |
25 | <input type="checkbox" id="save_me" name="save_me" class="checkbox__input" required> | 25 | <input type="checkbox" id="save_me" name="save_me" class="checkbox__input" required> |
26 | <span class="checkbox__icon"> | 26 | <span class="checkbox__icon"> |
27 | <svg> | 27 | <svg> |
28 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 28 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
29 | </svg> | 29 | </svg> |
30 | </span> | 30 | </span> |
31 | <span class="checkbox__text"> | 31 | <span class="checkbox__text"> |
32 | <span> | 32 | <span> |
33 | Запомнить меня | 33 | Запомнить меня |
34 | </span> | 34 | </span> |
35 | </span> | 35 | </span> |
36 | </label> | 36 | </label> |
37 | </div> | 37 | </div> |
38 | <div> | 38 | <div> |
39 | <a data-fancybox data-src="#reset" data-options='{"touch":false,"autoFocus":false}' class="modal__sign-bottom-link">Забыли пароль?</a> | 39 | <a data-fancybox data-src="#reset" data-options='{"touch":false,"autoFocus":false}' class="modal__sign-bottom-link">Забыли пароль?</a> |
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | <div class="modal__sign-item"> | 43 | <div class="modal__sign-item"> |
44 | <a id="button_send" name="button_send" class="button">Войти</a> | 44 | <a id="button_send" name="button_send" class="button">Войти</a> |
45 | </div> | 45 | </div> |
46 | </form> | 46 | </form> |
47 | <div class="modal__text"> | 47 | <div class="modal__text"> |
48 | <span>У Вас ещё нет аккаунта?</span> | 48 | <span>У Вас ещё нет аккаунта?</span> |
49 | | 49 | |
50 | <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Создать аккаунт</a> | 50 | <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Создать аккаунт</a> |
51 | </div> | 51 | </div> |
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | 54 |
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 data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}' class="button">Войти</a> | 6 | <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}' class="button">Войти</a> |
7 | <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}' 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_message_noaut2.blade.php
File was created | 1 | <div id="question2" 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 | <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}' class="button">Войти</a> | ||
7 | <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}' class="button button_light">Зарегистрироваться</a> | ||
8 | </div> | ||
9 | </div> | ||
10 | </div> | ||
11 |
resources/views/modals/send_worker_new.blade.php
File was created | 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> | ||
22 | <div id="send" class="modal"> | ||
23 | <div class="modal__body"> | ||
24 | <div class="modal__title">fghfghfghfgh</div> | ||
25 | </div> | ||
26 | </div> | ||
27 |
resources/views/news-list.blade.php
1 | @extends('layout.frontend', ['title' => 'Список новостей - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Список новостей - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '#jobs', function() { | 6 | $(document).on('change', '#jobs', function() { |
7 | var val = $(this).val(); | 7 | var val = $(this).val(); |
8 | var main_oskar = $('#Main_Ajax'); | 8 | var main_oskar = $('#Main_Ajax'); |
9 | 9 | ||
10 | console.log('Code='+val); | 10 | console.log('Code='+val); |
11 | console.log('Click change...'); | 11 | console.log('Click change...'); |
12 | $.ajax({ | 12 | $.ajax({ |
13 | type: "GET", | 13 | type: "GET", |
14 | url: "{{ route('news') }}", | 14 | url: "{{ route('news') }}", |
15 | data: "job="+val, | 15 | data: "job="+val, |
16 | success: function (data) { | 16 | success: function (data) { |
17 | console.log('Выбор сделан!'); | 17 | console.log('Выбор сделан!'); |
18 | console.log(data); | 18 | console.log(data); |
19 | main_oskar.html(data); | 19 | main_oskar.html(data); |
20 | history.pushState({}, '', "{{ route('news') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 20 | history.pushState({}, '', "{{ route('news') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
21 | }, | 21 | }, |
22 | headers: { | 22 | headers: { |
23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
24 | }, | 24 | }, |
25 | error: function (data) { | 25 | error: function (data) { |
26 | data = JSON.stringify(data); | 26 | data = JSON.stringify(data); |
27 | console.log('Error: ' + data); | 27 | console.log('Error: ' + data); |
28 | } | 28 | } |
29 | }); | 29 | }); |
30 | }); | 30 | }); |
31 | 31 | ||
32 | $(document).on('click', '.js_send_it_button', function() { | 32 | $(document).on('click', '.js_send_it_button', function() { |
33 | var this_ = $(this); | 33 | var this_ = $(this); |
34 | var code_user_id = this_.attr('data-uid'); | 34 | var code_user_id = this_.attr('data-uid'); |
35 | var code_to_user_id = this_.attr('data-tuid'); | 35 | var code_to_user_id = this_.attr('data-tuid'); |
36 | var code_vacancy = this_.attr('data-vacancy'); | 36 | var code_vacancy = this_.attr('data-vacancy'); |
37 | var user_id = $('#_user_id'); | 37 | var user_id = $('#_user_id'); |
38 | var to_user_id = $('#_to_user_id'); | 38 | var to_user_id = $('#_to_user_id'); |
39 | var vacancy = $('#_vacancy'); | 39 | var vacancy = $('#_vacancy'); |
40 | 40 | ||
41 | console.log('Клик на кнопки...'); | 41 | console.log('Клик на кнопки...'); |
42 | 42 | ||
43 | user_id.val(code_user_id); | 43 | user_id.val(code_user_id); |
44 | to_user_id.val(code_to_user_id); | 44 | to_user_id.val(code_to_user_id); |
45 | vacancy.val(code_vacancy); | 45 | vacancy.val(code_vacancy); |
46 | }); | 46 | }); |
47 | 47 | ||
48 | $(document).on('change', '#sort_ajax', function() { | 48 | $(document).on('change', '#sort_ajax', function() { |
49 | var this_ = $(this); | 49 | var this_ = $(this); |
50 | var val_ = this_.val(); | 50 | var val_ = this_.val(); |
51 | console.log('sort items '+val_); | 51 | console.log('sort items '+val_); |
52 | 52 | ||
53 | $.ajax({ | 53 | $.ajax({ |
54 | type: "GET", | 54 | type: "GET", |
55 | url: "{{ route('news') }}", | 55 | url: "{{ route('news') }}", |
56 | data: "sort="+val_+"&block=1", | 56 | data: "sort="+val_+"&block=1", |
57 | success: function (data) { | 57 | success: function (data) { |
58 | console.log('Выбор сортировки'); | 58 | console.log('Выбор сортировки'); |
59 | console.log(data); | 59 | console.log(data); |
60 | $('#main_ockar').html(data); | 60 | $('#main_ockar').html(data); |
61 | history.pushState({}, '', "{{ route('news') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 61 | history.pushState({}, '', "{{ route('news') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
62 | }, | 62 | }, |
63 | headers: { | 63 | headers: { |
64 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 64 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
65 | }, | 65 | }, |
66 | error: function (data) { | 66 | error: function (data) { |
67 | data = JSON.stringify(data); | 67 | data = JSON.stringify(data); |
68 | console.log('Error: ' + data); | 68 | console.log('Error: ' + data); |
69 | } | 69 | } |
70 | }); | 70 | }); |
71 | }); | 71 | }); |
72 | 72 | ||
73 | $(document).ready(function(){ | 73 | $(document).ready(function(){ |
74 | var sel = $('#select2-sort_ajax-container'); | 74 | var sel = $('#select2-sort_ajax-container'); |
75 | var key = getUrlParameter('sort'); | 75 | var key = getUrlParameter('sort'); |
76 | console.log(sel); | 76 | console.log(sel); |
77 | console.log(key); | 77 | console.log(key); |
78 | 78 | ||
79 | if (key !=='') { | 79 | if (key !=='') { |
80 | console.log(key); | 80 | console.log(key); |
81 | switch (key) { | 81 | switch (key) { |
82 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 82 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
83 | case "name_up": sel.html('По имени (возрастание)'); break; | 83 | case "name_up": sel.html('По имени (возрастание)'); break; |
84 | case "name_down": sel.html('По дате (убывание)'); break; | 84 | case "name_down": sel.html('По дате (убывание)'); break; |
85 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 85 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
86 | case "created_at_down": sel.html('По дате (убывание)'); break; | 86 | case "created_at_down": sel.html('По дате (убывание)'); break; |
87 | } | 87 | } |
88 | 88 | ||
89 | } | 89 | } |
90 | }); | 90 | }); |
91 | </script> | 91 | </script> |
92 | @include('js.favorite-vacancy') | 92 | @include('js.favorite-vacancy') |
93 | @endsection | 93 | @endsection |
94 | @section('content') | 94 | @section('content') |
95 | <section class="thing"> | 95 | <section class="thing"> |
96 | <div class="container"> | 96 | <div class="container"> |
97 | <form class="thing__body" action="{{ route('news') }}" method="GET"> | 97 | <form class="thing__body" action="{{ route('news') }}" method="GET"> |
98 | <ul class="breadcrumbs thing__breadcrumbs"> | 98 | <ul class="breadcrumbs thing__breadcrumbs"> |
99 | <li><a href="{{ route('index') }}">Главная</a></li> | 99 | <li><a href="{{ route('index') }}">Главная</a></li> |
100 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> | 100 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> |
101 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> | 101 | <li><b>{{ isset($Name_categori[0]) ? $Name_categori[0]->name : 'Все категории' }}</b></li> |
102 | </ul> | 102 | </ul> |
103 | <h1 class="thing__title">Вакансии</h1> | 103 | <h1 class="thing__title">Вакансии</h1> |
104 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | 104 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для |
105 | существующих финансовых и административных условий.</p> | 105 | существующих финансовых и административных условий.</p> |
106 | <div class="search thing__search"> | 106 | <div class="search thing__search"> |
107 | <input type="search" id="search" name="search" class="input" placeholder="Введите наименование статьи" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif"> | 107 | <input type="search" id="search" name="search" class="input" placeholder="Введите наименование статьи" value="@if (!empty($_GET['search'])) {{ $_GET['search'] }} @endif"> |
108 | <button type="submit" class="button">Найти</button> | 108 | <button type="submit" class="button">Найти</button> |
109 | <span> | 109 | <span> |
110 | <svg> | 110 | <svg> |
111 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 111 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
112 | </svg> | 112 | </svg> |
113 | </span> | 113 | </span> |
114 | </div> | 114 | </div> |
115 | </form> | 115 | </form> |
116 | </div> | 116 | </div> |
117 | </section> | 117 | </section> |
118 | <main class="main"> | 118 | <main class="main"> |
119 | <div class="container"> | 119 | <div class="container"> |
120 | <div class="main__employers"> | 120 | <div class="main__employers"> |
121 | <div class="filters"> | 121 | <div class="filters"> |
122 | <div class="filters__label" id="col-vo" name="col-vo">Показано @if ($Query_count < 3) {{$Query_count}} @else 6 @endif из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> | 122 | <div class="filters__label" id="col-vo" name="col-vo">Показано @if ($Query_count < 3) {{$Query_count}} @else 6 @endif из @isset($Query_count) {{ $Query_count }} @else 0 @endisset результатов поиска</div> |
123 | <div class="filters__body"> | 123 | <div class="filters__body"> |
124 | <div class="select filters__select"> | 124 | <div class="select filters__select"> |
125 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 125 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
126 | <option value="default">Сортировка (по умолчанию)</option> | 126 | <option value="default">Сортировка (по умолчанию)</option> |
127 | <option value="name_up">По имени (возрастание)</option> | 127 | <option value="name_up">По имени (возрастание)</option> |
128 | <option value="name_down">По имени (убывание)</option> | 128 | <option value="name_down">По имени (убывание)</option> |
129 | <option value="created_at_up">По дате (возрастание)</option> | 129 | <option value="created_at_up">По дате (возрастание)</option> |
130 | <option value="created_at_down">По дате (убывание)</option> | 130 | <option value="created_at_down">По дате (убывание)</option> |
131 | </select> | 131 | </select> |
132 | </div> | 132 | </div> |
133 | </div> | 133 | </div> |
134 | </div> | 134 | </div> |
135 | <div id="Main_Ajax" name="Main_Ajax"> | 135 | <div id="Main_Ajax" name="Main_Ajax"> |
136 | 136 | ||
137 | @if ($Query->count()) | 137 | @if ($Query->count()) |
138 | <div class="news__items"> | 138 | <div class="news__items"> |
139 | @foreach ($Query as $Q) | 139 | @foreach ($Query as $Q) |
140 | <div class="news__item"> | 140 | <div class="news__item"> |
141 | @if (!empty(asset(Storage::url($Q->image)))) | 141 | @if (!empty(asset(Storage::url($Q->image)))) |
142 | <img src="{{ asset(Storage::url($Q->image)) }}" alt="{{ $Q->title }}" class="news__item-pic"> | 142 | <img src="{{ asset(Storage::url($Q->image)) }}" alt="{{ $Q->title }}" class="news__item-pic"> |
143 | @else | 143 | @else |
144 | <img src="{{ asset('images/8.jpg') }}" alt="{{ $Q->title }}" class="news__item-pic"> | 144 | <img src="{{ asset('images/8.jpg') }}" alt="{{ $Q->title }}" class="news__item-pic"> |
145 | @endif | 145 | @endif |
146 | <div class="news__item-body"> | 146 | <div class="news__item-body"> |
147 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</time> | 147 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</time> |
148 | <span class="news__item-title">{{ $Q->title }}</span> | 148 | <span class="news__item-title">{{ $Q->title }}</span> |
149 | <span class="news__item-text">{!! $Q->text !!}</span> | 149 | <span class="news__item-text">{!! $Q->text !!}</span> |
150 | <a href="{{ route('detail_new', ['new' => $Q->id]) }}" class="news__item-more button button_light">Читать далее</a> | 150 | <a href="{{ route('detail_new', ['new' => $Q->id]) }}" class="news__item-more button button_light">Читать далее</a> |
151 | </div> | 151 | </div> |
152 | </div> | 152 | </div> |
153 | @endforeach | 153 | @endforeach |
154 | </div> | ||
155 | {{ $Query->appends($_GET)->links('paginate') }} | 154 | </div> |
156 | @else | ||
157 | <div class="news__items"> | 155 | {{ $Query->appends($_GET)->links('paginate') }} |
158 | 156 | @else | |
159 | </div> | 157 | <div class="news__items"> |
160 | @endif | 158 | |
161 | </div> | 159 | </div> |
162 | 160 | @endif | |
163 | </div> | 161 | </div> |
164 | </div> | 162 | |
165 | </main> | 163 | </div> |
166 | </div> | 164 | </div> |
167 | @endsection | 165 | </main> |
168 | 166 | </div> |
resources/views/paginate.blade.php
1 | @if ($paginator->hasPages()) | 1 | @if ($paginator->hasPages()) |
2 | <div class="pagination"> | 2 | <div class="pagination"> |
3 | @if ($paginator->onFirstPage()) | 3 | @if ($paginator->onFirstPage()) |
4 | <a href="{{ $paginator->previousPageUrl() }}" class="pagination__nav pagination__nav_prev"> | 4 | <a href="{{ $paginator->previousPageUrl() }}" class="pagination__nav pagination__nav_prev"> |
5 | <svg> | ||
6 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | ||
7 | </svg> | ||
8 | </a> | ||
5 | <svg> | 9 | @else |
6 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 10 | <a href="{{ $paginator->previousPageUrl() }}" class="pagination__nav pagination__nav_prev"> |
7 | </svg> | 11 | <svg> |
8 | </a> | 12 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> |
9 | @else | 13 | </svg> |
10 | <a href="{{ $paginator->previousPageUrl() }}" class="pagination__nav pagination__nav_prev"> | 14 | </a> |
11 | <svg> | 15 | @endif |
12 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 16 | |
13 | </svg> | 17 | @foreach ($elements as $element) |
14 | </a> | 18 | @if (is_string($element)) |
15 | @endif | 19 | <span>{{ $element }}</span> |
16 | 20 | @endif | |
17 | @foreach ($elements as $element) | 21 | |
18 | @if (is_string($element)) | 22 | @if (is_array($element)) |
19 | <span>{{ $element }}</span> | 23 | @php $count_element = count($element); |
20 | @endif | 24 | $i = 0; |
21 | 25 | @endphp | |
22 | @if (is_array($element)) | 26 | @foreach ($element as $page => $url) |
23 | @php $count_element = count($element); | 27 | @if ($page == $paginator->currentPage()) |
24 | $i = 0; | 28 | <span class="pagination__item active">{{ $page }}</span> |
25 | @endphp | 29 | @else |
26 | @foreach ($element as $page => $url) | 30 | @if (($i == $count_element - 1) && ($count_element > 5)) |
27 | @if ($page == $paginator->currentPage()) | 31 | <span class="pagination__dots"> |
28 | <span class="pagination__item active">{{ $page }}</span> | 32 | <svg> |
29 | @else | 33 | <use xlink:href="{{ asset('images/sprite.svg#dots') }}"></use> |
30 | @if (($i == $count_element - 1) && ($count_element > 5)) | 34 | </svg> |
31 | <span class="pagination__dots"> | 35 | </span> |
32 | <svg> | 36 | @endif |
33 | <use xlink:href="{{ asset('images/sprite.svg#dots') }}"></use> | 37 | |
34 | </svg> | 38 | <a href="{{ $url }}" class="pagination__item">{{ $page }}</a> |
35 | </span> | 39 | @endif |
36 | @endif | 40 | @php $i++; @endphp |
37 | 41 | @endforeach | |
38 | <a href="{{ $url }}" class="pagination__item">{{ $page }}</a> | 42 | @endif |
39 | @endif | 43 | @endforeach |
40 | @php $i++; @endphp | 44 | |
41 | @endforeach | 45 | @if ($paginator->hasMorePages()) |
42 | @endif | 46 | <a href="{{ $paginator->nextPageUrl() }}" class="pagination__nav pagination__nav_next"> |
43 | @endforeach | 47 | <svg> |
44 | 48 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | |
45 | @if ($paginator->hasMorePages()) | 49 | </svg> |
46 | <a href="{{ $paginator->nextPageUrl() }}" class="pagination__nav pagination__nav_next"> | 50 | </a> |
47 | <svg> | 51 | @else |
48 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 52 | <a href="{{ $paginator->nextPageUrl() }}" class="pagination__nav pagination__nav_next"> |
53 | <svg> | ||
54 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | ||
55 | </svg> | ||
56 | </a> | ||
49 | </svg> | 57 | @endif |
50 | </a> | 58 | </div> |
51 | @else | 59 | @endif |
52 | <a href="{{ $paginator->nextPageUrl() }}" class="pagination__nav pagination__nav_next"> | 60 | |
53 | <svg> | 61 |
resources/views/vacance-item.blade.php
1 | @extends('layout.frontend', ['title' => $title]) | 1 | @extends('layout.frontend', ['title' => $title]) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | @include('js.favorite-vacancy') | 4 | @include('js.favorite-vacancy') |
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <main class="main"> | 8 | <main class="main"> |
9 | <div class="container"> | 9 | <div class="container"> |
10 | <ul class="breadcrumbs main__breadcrumbs"> | 10 | <ul class="breadcrumbs main__breadcrumbs"> |
11 | <li><a href="{{ route('index') }}">Главная</a></li> | 11 | <li><a href="{{ route('index') }}">Главная</a></li> |
12 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> | 12 | <li><a href="{{ route('vacancies') }}">Вакансии</a></li> |
13 | <li><b>{{ $title }}</b></li> | 13 | <li><b>{{ $title }}</b></li> |
14 | </ul> | 14 | </ul> |
15 | <div class="main__employer-page"> | 15 | <div class="main__employer-page"> |
16 | 16 | ||
17 | @if (isset($Query[0]->employer)) | 17 | @if (isset($Query[0]->employer)) |
18 | <h2 class="main__employer-page-title">О компании</h2> | 18 | <h2 class="main__employer-page-title">О компании</h2> |
19 | <div class="main__employer-page-two-item-toper"> | 19 | <div class="main__employer-page-two-item-toper"> |
20 | <img src="{{ asset(Storage::url($Query[0]->employer->logo)) }}" alt="{{ $Query[0]->employer->name }}"> | 20 | <img src="{{ asset(Storage::url($Query[0]->employer->logo)) }}" alt="{{ $Query[0]->employer->name }}"> |
21 | <span>{{ $Query[0]->employer->name_company }}</span> | 21 | <span>{{ $Query[0]->employer->name_company }}</span> |
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | <div class="main__employer-page-info"> | 24 | <div class="main__employer-page-info"> |
25 | <div class="main__employer-page-item"> | 25 | <div class="main__employer-page-item"> |
26 | <b> Адрес компании</b> | 26 | <b> Адрес компании</b> |
27 | <span> | 27 | <span> |
28 | {{ $Query[0]->employer->address }} | 28 | {{ $Query[0]->employer->address }} |
29 | </span> | 29 | </span> |
30 | </div> | 30 | </div> |
31 | <div class="main__employer-page-item"> | 31 | <div class="main__employer-page-item"> |
32 | <b>Сайт</b> | 32 | <b>Сайт</b> |
33 | <span> | 33 | <span> |
34 | <a href="{{ $Query[0]->employer->site }}">{{ $Query[0]->employer->site }}</a> | 34 | <a href="{{ $Query[0]->employer->site }}">{{ $Query[0]->employer->site }}</a> |
35 | </span> | 35 | </span> |
36 | </div> | 36 | </div> |
37 | <div class="main__employer-page-item"> | 37 | <div class="main__employer-page-item"> |
38 | <b>Почта</b> | 38 | <b>Почта</b> |
39 | <span> | 39 | <span> |
40 | <a href="{{ $Query[0]->employer->email }}">{{ $Query[0]->employer->email }}</a> | 40 | <a href="{{ $Query[0]->employer->email }}">{{ $Query[0]->employer->email }}</a> |
41 | </span> | 41 | </span> |
42 | </div> | 42 | </div> |
43 | <div class="main__employer-page-item"> | 43 | <div class="main__employer-page-item"> |
44 | <b>Телефон</b> | 44 | <b>Телефон</b> |
45 | <span> | 45 | <span> |
46 | <a href="tel:{{ $Query[0]->employer->telephone }}">{{ $Query[0]->employer->telephone }}</a> | 46 | <a href="tel:{{ $Query[0]->employer->telephone }}">{{ $Query[0]->employer->telephone }}</a> |
47 | </span> | 47 | </span> |
48 | </div> | 48 | </div> |
49 | </div> | 49 | </div> |
50 | @else | 50 | @else |
51 | <div class="main__employer-page-info"> | 51 | <div class="main__employer-page-info"> |
52 | <div class="main__employer-page-item"> | 52 | <div class="main__employer-page-item"> |
53 | <b>Ничего не найдено</b> | 53 | <b>Ничего не найдено</b> |
54 | <span> | 54 | <span> |
55 | Нет данных о компании | 55 | Нет данных о компании |
56 | </span> | 56 | </span> |
57 | </div> | 57 | </div> |
58 | </div> | 58 | </div> |
59 | @endif | 59 | @endif |
60 | <h2 class="main__employer-page-title">Описание вакансии</h2> | 60 | <h2 class="main__employer-page-title">Описание вакансии</h2> |
61 | 61 | ||
62 | </div> | 62 | </div> |
63 | 63 | ||
64 | @foreach ($Query as $Q) | 64 | @foreach ($Query as $Q) |
65 | <div class="main__vacancies-item-page main__employer-page-two-item"> | 65 | <div class="main__vacancies-item-page main__employer-page-two-item"> |
66 | <div class="main__employer-page-two-item-text"> | 66 | <div class="main__employer-page-two-item-text"> |
67 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор | 67 | <div class="main__employer-page-two-item-text-name">Судоходная компания ведет набор |
68 | специалистов на следующие должности:</div> | 68 | специалистов на следующие должности:</div> |
69 | <div class="main__employer-page-two-item-text-links"> | 69 | <div class="main__employer-page-two-item-text-links"> |
70 | @if (isset($Q->jobs)) | 70 | @if (isset($Q->jobs)) |
71 | @foreach ($Q->jobs as $key => $j) | 71 | @foreach ($Q->jobs as $key => $j) |
72 | <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> | 72 | <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> |
73 | @endforeach | 73 | @endforeach |
74 | @endif | 74 | @endif |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | <div class="main__employer-page-two-item-text"> | 77 | <div class="main__employer-page-two-item-text"> |
78 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> | 78 | <div class="main__employer-page-two-item-text-name">Мы предлагаем:</div> |
79 | <div class="main__employer-page-two-item-text-body"> | 79 | <div class="main__employer-page-two-item-text-body"> |
80 | {!! $Q->text !!} | 80 | {!! $Q->text !!} |
81 | </div> | 81 | </div> |
82 | </div> | 82 | </div> |
83 | <div class="main__employer-page-two-item-text"> | 83 | <div class="main__employer-page-two-item-text"> |
84 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> | 84 | <div class="main__employer-page-two-item-text-name">Наши ожидания:</div> |
85 | <div class="main__employer-page-two-item-text-body"> | 85 | <div class="main__employer-page-two-item-text-body"> |
86 | {!! $Q->description !!} | 86 | {!! $Q->description !!} |
87 | </div> | 87 | </div> |
88 | </div> | 88 | </div> |
89 | <div class="main__employer-page-two-item-text"> | 89 | <div class="main__employer-page-two-item-text"> |
90 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> | 90 | <div class="main__employer-page-two-item-text-name">Резюме направляйте на почту:</div> |
91 | <div class="main__employer-page-two-item-text-body"> | 91 | <div class="main__employer-page-two-item-text-body"> |
92 | {!! $Q->contacts_emails !!} | 92 | {!! $Q->contacts_emails !!} |
93 | </div> | 93 | </div> |
94 | <div class="main__employer-page-two-item-text"> | 94 | <div class="main__employer-page-two-item-text"> |
95 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> | 95 | <div class="main__employer-page-two-item-text-name">Или звоните:</div> |
96 | <div class="main__employer-page-two-item-text-body"> | 96 | <div class="main__employer-page-two-item-text-body"> |
97 | {!! $Q->contacts_telephones !!} | 97 | {!! $Q->contacts_telephones !!} |
98 | </div> | 98 | </div> |
99 | </div> | 99 | </div> |
100 | <div class="main__employer-page-two-item-tags"> | 100 | <div class="main__employer-page-two-item-tags"> |
101 | @if (isset($Q->jobs)) | 101 | @if (isset($Q->jobs)) |
102 | @foreach ($Q->jobs as $key => $j) | 102 | @foreach ($Q->jobs as $key => $j) |
103 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> | 103 | <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> |
104 | @endforeach | 104 | @endforeach |
105 | @endif | 105 | @endif |
106 | </div> | 106 | </div> |
107 | <br> | 107 | <br> |
108 | <div class="main__employer-page-two-item-buttons"> | 108 | <div class="main__employer-page-two-item-buttons"> |
109 | <button type="button" class="button main__employer-page-two-item-button">Откликнуться</button> | 109 | <button type="button" class="button main__employer-page-two-item-button">Откликнуться</button> |
110 | </div> | 110 | </div> |
111 | <div class="main__employer-page-two-item-bottom"> | 111 | <div class="main__employer-page-two-item-bottom"> |
112 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> | 112 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}</div> |
113 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js_vacancy_favorites js-toggle <?=\App\Classes\RusDate::selected_vacancy($Q->id);?>"> | 113 | <button type="button" data-val="{{ $Q->id }}" class="like main__employer-page-two-item-bottom-like js_vacancy_favorites js-toggle <?=\App\Classes\RusDate::selected_vacancy($Q->id);?>"> |
114 | <svg> | 114 | <svg> |
115 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 115 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
116 | </svg> | 116 | </svg> |
117 | </button> | 117 | </button> |
118 | </div> | 118 | </div> |
119 | 119 | ||
120 | </div> | 120 | </div> |
121 | 121 | ||
122 | @endforeach | 122 | @endforeach |
123 | 123 | ||
124 | </div> <a href="{{ redirect()->back()->getTargetUrl() }}" class="back"> | 124 | </div> <a href="{{ redirect()->back()->getTargetUrl() }}" class="back"> |
125 | <svg> | 125 | <svg> |
126 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> | 126 | <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> |
127 | </svg> | 127 | </svg> |
128 | <span> | 128 | <span> |
129 | Вернуться к списку вакансий | 129 | Вернуться к списку вакансий |
130 | </span> | 130 | </span> |
131 | </a> | 131 | </a> |
132 | </main> | 132 | </main> |
133 | </div> | 133 | </div> |
134 | @endsection | 134 | @endsection |
135 | 135 |
resources/views/vacancies.blade.php
1 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Вакансии РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '.jobs', function() { | 6 | $(document).on('change', '.jobs', function() { |
7 | var val = $(this).val(); | 7 | var val = $(this).val(); |
8 | 8 | ||
9 | console.log('Click change...'); | 9 | console.log('Click change...'); |
10 | $.ajax({ | 10 | $.ajax({ |
11 | type: "GET", | 11 | type: "GET", |
12 | url: "{{ route('vacancies') }}", | 12 | url: "{{ route('vacancies') }}", |
13 | data: "job="+val, | 13 | data: "job="+val, |
14 | success: function (data) { | 14 | success: function (data) { |
15 | console.log('Выбор должности'); | 15 | console.log('Выбор должности'); |
16 | console.log(data); | 16 | console.log(data); |
17 | $('#block_ajax').html(data); | 17 | $('#block_ajax').html(data); |
18 | }, | 18 | }, |
19 | headers: { | 19 | headers: { |
20 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 20 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
21 | }, | 21 | }, |
22 | error: function (data) { | 22 | error: function (data) { |
23 | data = JSON.stringify(data); | 23 | data = JSON.stringify(data); |
24 | console.log('Error: ' + data); | 24 | console.log('Error: ' + data); |
25 | } | 25 | } |
26 | }); | 26 | }); |
27 | }); | 27 | }); |
28 | </script> | 28 | </script> |
29 | @endsection | 29 | @endsection |
30 | 30 | ||
31 | @section('content') | 31 | @section('content') |
32 | <section class="thing"> | 32 | <section class="thing"> |
33 | <div class="container"> | 33 | <div class="container"> |
34 | <form class="thing__body"> | 34 | <form class="thing__body"> |
35 | <ul class="breadcrumbs thing__breadcrumbs"> | 35 | <ul class="breadcrumbs thing__breadcrumbs"> |
36 | <li><a href="{{ route('index') }}">Главная</a></li> | 36 | <li><a href="{{ route('index') }}">Главная</a></li> |
37 | <li><b>Вакансии</b></li> | 37 | <li><b>Вакансии</b></li> |
38 | </ul> | 38 | </ul> |
39 | <h1 class="thing__title">Вакансии</h1> | 39 | <h1 class="thing__title">Вакансии</h1> |
40 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для | 40 | <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для |
41 | существующих финансовых и административных условий.</p> | 41 | существующих финансовых и административных условий.</p> |
42 | <div class="select select_search thing__select"> | 42 | <div class="select select_search thing__select"> |
43 | <div class="select__icon"> | 43 | <div class="select__icon"> |
44 | <svg> | 44 | <svg> |
45 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 45 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
46 | </svg> | 46 | </svg> |
47 | </div> | 47 | </div> |
48 | <select class="js-select2 jobs" id="jobs" name="jobs"> | 48 | <select class="js-select2 jobs" id="jobs" name="jobs"> |
49 | <option value="0">Выберите должность</option> | 49 | <option value="0">Выберите должность</option> |
50 | @if ($Job_title->count()) | 50 | @if ($Job_title->count()) |
51 | @foreach($Job_title as $JT) | 51 | @foreach($Job_title as $JT) |
52 | <option value="{{ $JT->id }}" @if ((isset($_GET['job'])) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option> | 52 | <option value="{{ $JT->id }}" @if ((isset($_GET['job'])) && ($_GET['job'] == $JT->id)) selected @endif>{{ $JT->name }}</option> |
53 | @endforeach | 53 | @endforeach |
54 | @endif | 54 | @endif |
55 | </select> | 55 | </select> |
56 | </div> | 56 | </div> |
57 | </form> | 57 | </form> |
58 | </div> | 58 | </div> |
59 | </section> | 59 | </section> |
60 | <main class="main"> | 60 | <main class="main"> |
61 | <div class="container"> | 61 | <div class="container"> |
62 | <div class="main__vacancies"> | 62 | <div class="main__vacancies"> |
63 | <h2 class="main__vacancies-title">Категории вакансий</h2> | 63 | <h2 class="main__vacancies-title">Категории вакансий</h2> |
64 | <div class="vacancies__body"> | 64 | <div class="vacancies__body"> |
65 | <!--<button class="vacancies__more button button_more button_light js-toggle js-parent-toggle"> | 65 | <!--<button class="vacancies__more button button_more button_light js-toggle js-parent-toggle"> |
66 | <span>Показать ещё</span> | 66 | <span>Показать ещё</span> |
67 | <span>Скрыть</span> | 67 | <span>Скрыть</span> |
68 | </button>--> | 68 | </button>--> |
69 | <div class="vacancies__list" id="block_ajax" name="block_ajax"> | 69 | <div class="vacancies__list" id="block_ajax" name="block_ajax"> |
70 | @php $colors = Array('#F4C4C2', '#FBF1C8', '#ECFDEF', '#F3ECF6', '#ECFDEF'); | 70 | @php $colors = Array('#F4C4C2', '#FBF1C8', '#ECFDEF', '#F3ECF6', '#ECFDEF'); |
71 | $i = 0; | 71 | $i = 0; |
72 | @endphp | 72 | @endphp |
73 | @if ($categories->count()) | 73 | @if ($categories->count()) |
74 | @foreach ($categories as $cat) | 74 | @foreach ($categories as $cat) |
75 | <a href="{{ route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item"> | 75 | <a href="{{ route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item"> |
76 | <span style="border-color:{{$colors[$i]}}"> | 76 | <span style="border-color:{{$colors[$i]}}"> |
77 | <b>{{ $cat->name }}</b> | 77 | <b>{{ $cat->name }}</b> |
78 | <u>{{ $cat->min_salary }} — {{ $cat->max_salary }} ₽</u> | 78 | <u>@if (!empty($cat->min_salary)) {{ $cat->min_salary }} @else 0 @endif — |
79 | @if (!empty($cat->max_salary)) {{ $cat->max_salary }} @else 0 @endif ₽</u> | ||
79 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> | 80 | <i>Вакансий: <span>{{ $cat->cnt }}</span></i> |
80 | </span> | 81 | </span> |
81 | </a> | 82 | </a> |
82 | @php $i++; | 83 | @php $i++; |
83 | if ($i > 4) {$i = 0;} | 84 | if ($i > 4) {$i = 0;} |
84 | @endphp | 85 | @endphp |
85 | @endforeach | 86 | @endforeach |
86 | @else | 87 | @else |
87 | Тут пока нет никаких вакансий | 88 | Тут пока нет никаких вакансий |
88 | @endif | 89 | @endif |
89 | </div> | 90 | </div> |
90 | </div> | 91 | </div> |
91 | </div> | 92 | </div> |
92 | </div> | 93 | </div> |
93 | </main> | 94 | </main> |
94 | </div> | 95 | </div> |
95 | @endsection | 96 | @endsection |
96 | 97 |
resources/views/worker.blade.php
1 | @extends('layout.frontend', ['title' => 'Карточка соискателя - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Карточка соискателя - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '#jobs', function() { | 6 | $(document).on('change', '#jobs', function() { |
7 | var val = $(this).val(); | 7 | var val = $(this).val(); |
8 | var main_oskar = $('#main_ockar'); | 8 | var main_oskar = $('#main_ockar'); |
9 | 9 | ||
10 | console.log('Code='+val); | 10 | console.log('Code='+val); |
11 | console.log('Click change...'); | 11 | console.log('Click change...'); |
12 | $.ajax({ | 12 | $.ajax({ |
13 | type: "GET", | 13 | type: "GET", |
14 | url: "", | 14 | url: "", |
15 | data: "job="+val, | 15 | data: "job="+val, |
16 | success: function (data) { | 16 | success: function (data) { |
17 | console.log('Выбор сделан!'); | 17 | console.log('Выбор сделан!'); |
18 | console.log(data); | 18 | console.log(data); |
19 | main_oskar.html(data); | 19 | main_oskar.html(data); |
20 | }, | 20 | }, |
21 | headers: { | 21 | headers: { |
22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
23 | }, | 23 | }, |
24 | error: function (data) { | 24 | error: function (data) { |
25 | data = JSON.stringify(data); | 25 | data = JSON.stringify(data); |
26 | console.log('Error: ' + data); | 26 | console.log('Error: ' + data); |
27 | } | 27 | } |
28 | }); | 28 | }); |
29 | }); | 29 | }); |
30 | </script> | 30 | </script> |
31 | @endsection | 31 | @endsection |
32 | 32 | ||
33 | @section('content') | 33 | @section('content') |
34 | <section class="thing"> | 34 | <section class="thing"> |
35 | <div class="container"> | 35 | <div class="container"> |
36 | <ul class="breadcrumbs thing__breadcrumbs"> | 36 | <ul class="breadcrumbs thing__breadcrumbs"> |
37 | <li><a href="{{ route('index') }}">Главная</a></li> | 37 | <li><a href="{{ route('index') }}">Главная</a></li> |
38 | <li><a href="{{ route('bd_resume') }}">База резюме</a></li> | 38 | <li><a href="{{ route('bd_resume') }}">База резюме</a></li> |
39 | <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> | 39 | <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> |
40 | </ul> | 40 | </ul> |
41 | <div class="thing__profile"> | 41 | <div class="thing__profile"> |
42 | <img src="@isset($Query->photo) {{ asset(Storage::url($Query->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="thing__profile-photo"> | 42 | <img src="@isset($Query->photo) {{ asset(Storage::url($Query->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="thing__profile-photo"> |
43 | <div class="thing__profile-body"> | 43 | <div class="thing__profile-body"> |
44 | <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> | 44 | <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> |
45 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены | 45 | <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены |
46 | исключительно в разрезе маркетинговых и финансовых предпосылок.</p> | 46 | исключительно в разрезе маркетинговых и финансовых предпосылок.</p> |
47 | <div class="thing__bottom"> | 47 | <div class="thing__bottom"> |
48 | <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}"> | 48 | <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}"> |
49 | Скачать резюме | 49 | Скачать резюме |
50 | <svg> | 50 | <svg> |
51 | <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> | 51 | <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> |
52 | </svg> | 52 | </svg> |
53 | </a> | 53 | </a> |
54 | <button type="button" class="like js-toggle"> | 54 | <button type="button" class="like js-toggle"> |
55 | <svg> | 55 | <svg> |
56 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 56 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
57 | </svg> | 57 | </svg> |
58 | </button> | 58 | </button> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | </section> | 63 | </section> |
64 | <main class="main"> | 64 | <main class="main"> |
65 | <div class="container"> | 65 | <div class="container"> |
66 | <div class="main__resume-profile"> | 66 | <div class="main__resume-profile"> |
67 | <div class="main__content"> | 67 | <div class="main__content"> |
68 | <div class="main__spoiler"> | 68 | <div class="main__spoiler"> |
69 | <button type="button" class="main__spoiler-toper js-toggle active"> | 69 | <button type="button" class="main__spoiler-toper js-toggle active"> |
70 | Основная информация</button> | 70 | Основная информация</button> |
71 | 71 | ||
72 | <div class="main__spoiler-body"> | 72 | <div class="main__spoiler-body"> |
73 | <table class="main__table"> | 73 | <table class="main__table"> |
74 | <tbody> | 74 | <tbody> |
75 | <tr> | 75 | <tr> |
76 | <td>Имя:</td> | 76 | <td>Имя:</td> |
77 | <td><b>{{ $Query[0]->users->name_man }}</b></td> | 77 | <td><b>{{ $Query[0]->users->name_man }}</b></td> |
78 | </tr> | 78 | </tr> |
79 | <tr> | 79 | <tr> |
80 | <td>Должность:</td> | 80 | <td>Должность:</td> |
81 | <td><b>@if (isset($Query[0]->job_titles[0]->name)) {{ $Query[0]->job_titles[0]->name }} @else Не указано @endif</b></td> | 81 | <td><b>@if (isset($Query[0]->job_titles[0]->name)) {{ $Query[0]->job_titles[0]->name }} @else Не указано @endif</b></td> |
82 | </tr> | 82 | </tr> |
83 | <tr> | 83 | <tr> |
84 | <td>Телефон:</td> | 84 | <td>Телефон:</td> |
85 | <td><b><a href="tel:{{ $Query[0]->telephone }}">{{ $Query[0]->telephone }}</a></b></td> | 85 | <td><b><a href="tel:{{ $Query[0]->telephone }}">{{ $Query[0]->telephone }}</a></b></td> |
86 | </tr> | 86 | </tr> |
87 | <tr> | 87 | <tr> |
88 | <td>E-mail:</td> | 88 | <td>E-mail:</td> |
89 | <td><b><a href="emailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> | 89 | <td><b><a href="emailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> |
90 | </tr> | 90 | </tr> |
91 | <tr> | 91 | <tr> |
92 | <td>Возраст:</td> | 92 | <td>Возраст:</td> |
93 | <td><b>{{ $Query[0]->old_year }}</b></td> | 93 | <td><b>{{ $Query[0]->old_year }}</b></td> |
94 | </tr> | 94 | </tr> |
95 | <tr> | 95 | <tr> |
96 | <td>Статус:</td> | 96 | <td>Статус:</td> |
97 | <td><b>{{ $status_work[$Query[0]->status_work] }}</b></td> | 97 | <td><b>{{ $status_work[$Query[0]->status_work] }}</b></td> |
98 | </tr> | 98 | </tr> |
99 | <tr> | 99 | <tr> |
100 | <td>Город проживания:</td> | 100 | <td>Город проживания:</td> |
101 | <td><b>{{ $Query[0]->city }}</b></td> | 101 | <td><b>{{ $Query[0]->city }}</b></td> |
102 | </tr> | 102 | </tr> |
103 | <tr> | 103 | <tr> |
104 | <td>Уровень английского:</td> | 104 | <td>Уровень английского:</td> |
105 | <td><b>{{ $Query[0]->en_is }}</b></td> | 105 | <td><b>{{ $Query[0]->en_is }}</b></td> |
106 | </tr> | 106 | </tr> |
107 | <tr> | 107 | <tr> |
108 | <td>Опыт работы:</td> | 108 | <td>Опыт работы:</td> |
109 | <td><b>{{ $Query[0]->experience }}</b></td> | 109 | <td><b>{{ $Query[0]->experience }}</b></td> |
110 | </tr> | 110 | </tr> |
111 | </tbody> | 111 | </tbody> |
112 | </table> | 112 | </table> |
113 | </div> | 113 | </div> |
114 | </div> | 114 | </div> |
115 | <div class="main__spoiler"> | 115 | <div class="main__spoiler"> |
116 | <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button> | 116 | <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button> |
117 | <div class="main__spoiler-body"> | 117 | <div class="main__spoiler-body"> |
118 | 118 | ||
119 | @if (isset($Query[0]->sertificate)) | 119 | @if (isset($Query[0]->sertificate)) |
120 | @if ($Query[0]->sertificate->count()) | 120 | @if ($Query[0]->sertificate->count()) |
121 | @foreach($Query[0]->sertificate as $it) | 121 | @foreach($Query[0]->sertificate as $it) |
122 | <table class="main__table"> | 122 | <table class="main__table"> |
123 | <tbody> | 123 | <tbody> |
124 | <tr> | 124 | <tr> |
125 | <td>Название сертификата:</td> | 125 | <td>Название сертификата:</td> |
126 | <td><b>{{ $it->name }}</b></td> | 126 | <td><b>{{ $it->name }}</b></td> |
127 | </tr> | 127 | </tr> |
128 | <tr> | 128 | <tr> |
129 | <td>Организация выдавшая документ:</td> | 129 | <td>Организация выдавшая документ:</td> |
130 | <td><b>{{ $it->education }}</b></td> | 130 | <td><b>{{ $it->education }}</b></td> |
131 | </tr> | 131 | </tr> |
132 | <tr> | 132 | <tr> |
133 | <td>Дата начала обучения:</td> | 133 | <td>Дата начала обучения:</td> |
134 | <td><b>{{ $it->date_begin }}</b></td> | 134 | <td><b>{{ $it->date_begin }}</b></td> |
135 | </tr> | 135 | </tr> |
136 | <tr> | 136 | <tr> |
137 | <td>Дата конца обучения:</td> | 137 | <td>Дата конца обучения:</td> |
138 | <td><b>{{ $it->end_begin }}</b></td> | 138 | <td><b>{{ $it->end_begin }}</b></td> |
139 | </tr> | 139 | </tr> |
140 | </tbody> | 140 | </tbody> |
141 | </table> | 141 | </table> |
142 | <br> | 142 | <br> |
143 | @endforeach | 143 | @endforeach |
144 | @endif | 144 | @endif |
145 | @endif | 145 | @endif |
146 | </div> | 146 | </div> |
147 | </div> | 147 | </div> |
148 | 148 | ||
149 | <div class="main__spoiler"> | 149 | <div class="main__spoiler"> |
150 | <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button> | 150 | <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button> |
151 | <div class="main__spoiler-body"> | 151 | <div class="main__spoiler-body"> |
152 | 152 | ||
153 | @if (isset($Query[0]->place_worker)) | 153 | @if (isset($Query[0]->place_worker)) |
154 | @if ($Query[0]->place_worker->count()) | 154 | @if ($Query[0]->place_worker->count()) |
155 | @foreach($Query[0]->place_worker as $it) | 155 | @foreach($Query[0]->place_worker as $it) |
156 | 156 | ||
157 | <table class="main__table"> | 157 | <table class="main__table"> |
158 | <tbody> | 158 | <tbody> |
159 | <tr> | 159 | <tr> |
160 | <td>Должность:</td> | 160 | <td>Должность:</td> |
161 | <td><b>{{ $it->job_title }}</b></td> | 161 | <td><b>{{ $it->job_title }}</b></td> |
162 | </tr> | 162 | </tr> |
163 | <tr> | 163 | <tr> |
164 | <td>Опыт работы в танкерном флоте:</td> | 164 | <td>Опыт работы в танкерном флоте:</td> |
165 | <td><b>@if($it->tanker==1) Есть @else Нет @endif</b></td> | 165 | <td><b>@if($it->tanker==1) Есть @else Нет @endif</b></td> |
166 | </tr> | 166 | </tr> |
167 | <tr> | 167 | <tr> |
168 | <td>Дата начала работы:</td> | 168 | <td>Дата начала работы:</td> |
169 | <td><b>{{ $it->begin_work }}</b></td> | 169 | <td><b>{{ $it->begin_work }}</b></td> |
170 | </tr> | 170 | </tr> |
171 | <tr> | 171 | <tr> |
172 | <td>Дата конца работы:</td> | 172 | <td>Дата конца работы:</td> |
173 | <td><b>{{ $it->end_work }}</b></td> | 173 | <td><b>{{ $it->end_work }}</b></td> |
174 | </tr> | 174 | </tr> |
175 | <tr> | 175 | <tr> |
176 | <td>Название компании:</td> | 176 | <td>Название компании:</td> |
177 | <td><b>{{ $it->name_company }}</b></td> | 177 | <td><b>{{ $it->name_company }}</b></td> |
178 | </tr> | 178 | </tr> |
179 | <tr> | 179 | <tr> |
180 | <td>GWT тип</td> | 180 | <td>GWT тип</td> |
181 | <td><b>{{ $it->GWT }}</b></td> | 181 | <td><b>{{ $it->GWT }}</b></td> |
182 | </tr> | 182 | </tr> |
183 | <tr> | 183 | <tr> |
184 | <td>ГД:</td> | 184 | <td>ГД:</td> |
185 | <td><b>{{ $it->KBT }}</b></td> | 185 | <td><b>{{ $it->KBT }}</b></td> |
186 | </tr> | 186 | </tr> |
187 | </tbody> | 187 | </tbody> |
188 | </table> | 188 | </table> |
189 | <br> | 189 | <br> |
190 | @endforeach | 190 | @endforeach |
191 | @endif | 191 | @endif |
192 | @endif | 192 | @endif |
193 | </div> | 193 | </div> |
194 | </div> | 194 | </div> |
195 | 195 | ||
196 | <div class="main__spoiler"> | 196 | <div class="main__spoiler"> |
197 | <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button> | 197 | <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button> |
198 | <div class="main__spoiler-body"> | 198 | <div class="main__spoiler-body"> |
199 | 199 | ||
200 | @if (isset($Query[0]->infobloks)) | 200 | @if (isset($Query[0]->infobloks)) |
201 | @if ($Query[0]->infobloks->count()) | 201 | @if ($Query[0]->infobloks->count()) |
202 | <table class="main__table"> | 202 | <table class="main__table"> |
203 | <tbody> | 203 | <tbody> |
204 | @foreach($Query[0]->infobloks as $it) | 204 | @foreach($Query[0]->infobloks as $it) |
205 | <tr> | 205 | <tr> |
206 | <td>Документ:</td> | 206 | <td>Документ:</td> |
207 | <td><b>{{ $it->name }}</b></td> | 207 | <td><b>{{ $it->name }}</b></td> |
208 | </tr> | 208 | </tr> |
209 | @endforeach | 209 | @endforeach |
210 | </tbody> | 210 | </tbody> |
211 | </table> | 211 | </table> |
212 | @endif | 212 | @endif |
213 | @endif | 213 | @endif |
214 | </div> | 214 | </div> |
215 | </div> | 215 | </div> |
216 | </div> | 216 | </div> |
217 | <div class="main__resume-profile-about"> | 217 | <div class="main__resume-profile-about"> |
218 | <h2 class="main__resume-profile-about-title">О себе</h2> | 218 | <h2 class="main__resume-profile-about-title">О себе</h2> |
219 | <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p> | 219 | <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p> |
220 | <div class="button main__resume-profile-about-button" data-fancybox data-src="#send" data-options='{"touch":false,"autoFocus":false}'>Написать сообщение</div> | 220 | <div class="button main__resume-profile-about-button" data-fancybox data-src="#send" data-options='{"touch":false,"autoFocus":false}'>Написать сообщение</div> |
221 | </div> | 221 | </div> |
222 | <div class="main__resume-profile-info"> | 222 | <div class="main__resume-profile-info"> |
223 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> | 223 | <h2 class="main__resume-profile-info-title">Данные о прошлых компаниях</h2> |
224 | <div class="main__resume-profile-info-body"> | 224 | <div class="main__resume-profile-info-body"> |
225 | @if ((isset($Query[0]->prev_company)) && ($Query[0]->prev_company->count())) | 225 | @if ((isset($Query[0]->prev_company)) && ($Query[0]->prev_company->count())) |
226 | @foreach ($Query[0]->prev_company as $it) | ||
227 | <div class="main__resume-profile-info-body-item"> | ||
228 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it->name_company }}</h3> | 226 | @foreach ($Query[0]->prev_company as $it) |
229 | <ul class="main__resume-profile-info-body-inner"> | 227 | <div class="main__resume-profile-info-body-item"> |
230 | <li> | 228 | <h3 class="main__resume-profile-info-body-subtitle">{{ $it->name_company }}</h3> |
231 | <b>Руководитель</b> | 229 | <ul class="main__resume-profile-info-body-inner"> |
232 | <span>{{ $it->direct }}</span> | 230 | <li> |
233 | </li> | 231 | <b>Руководитель</b> |
234 | <li> | 232 | <span>{{ $it->direct }}</span> |
235 | <b>Телефон того, кто может дать рекомендацию</b> | 233 | </li> |
236 | <span> | 234 | <li> |
237 | @if (!empty($it->telephone)) | 235 | <b>Телефон того, кто может дать рекомендацию</b> |
238 | <a href="tel:{{$it->telephone }}">{{ $it->telephone }}</a> | 236 | <span> |
239 | @endif | 237 | @if (!empty($it->telephone)) |
240 | @if (!empty($it->telephone2)) | 238 | <a href="tel:{{$it->telephone }}">{{ $it->telephone }}</a> |
241 | <a href="tel:{{$it->telephone2 }}">{{ $it->telephone2 }}</a> | 239 | @endif |
242 | @endif | 240 | @if (!empty($it->telephone2)) |
243 | </span> | 241 | <a href="tel:{{$it->telephone2 }}">{{ $it->telephone2 }}</a> |
244 | </li> | 242 | @endif |
245 | </ul> | 243 | </span> |
246 | </div> | 244 | </li> |
247 | @endforeach | 245 | </ul> |
248 | @else | 246 | </div> |
249 | <div class="main__resume-profile-info-body-item"> | 247 | @endforeach |
250 | <h3 class="main__resume-profile-info-body-subtitle">Нету данных о компании</h3> | 248 | @else |
249 | <div class="main__resume-profile-info-body-item"> | ||
250 | <h3 class="main__resume-profile-info-body-subtitle">Нету данных о компании</h3> | ||
251 | </div> | ||
251 | </div> | 252 | @endif |
252 | @endif | 253 | </div> |
253 | </div> | 254 | </div> |
255 | |||
254 | </div> | 256 | <div class="main__resume-profile-review"> |
257 | <form action="{{ route('stars_answer') }}" method="POST"> | ||
258 | @csrf | ||
255 | 259 | <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2> | |
256 | 260 | <div class="rate"> | |
257 | 261 | <div class="rate__label">Ваша оценка:</div> | |
258 | 262 | <div class="rate__stars"> | |
259 | 263 | <select name="stars" id="stars" class="star-rating js-stars"> | |
264 | <option value="5">5</option> | ||
265 | <option value="4">4</option> | ||
266 | <option value="3">3</option> | ||
267 | <option value="2">2</option> | ||
268 | <option value="1" selected>1</option> | ||
269 | </select> | ||
260 | 270 | </div> | |
261 | 271 | </div> | |
272 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/> | ||
262 | 273 | <div class="main__resume-profile-review-body"> | |
263 | <div class="main__resume-profile-review"> | 274 | <h3>Ваш отзыв</h3> |
264 | <form action="{{ route('stars_answer') }}" method="POST"> | 275 | <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва…" required></textarea> |
265 | @csrf | 276 | <button type="submit" class="button">Оставить отзыв</button> |
266 | <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2> | 277 | </div> |
278 | </form> | ||
267 | <div class="rate"> | 279 | </div> |
268 | <div class="rate__label">Ваша оценка:</div> | 280 | </div> |
269 | <div class="rate__stars"> | 281 | </div> |
270 | <select name="stars" id="stars" class="star-rating js-stars"> | 282 | </main> |
271 | <option value="5">5</option> | 283 | </div> |
272 | <option value="4">4</option> | 284 | @endsection |
273 | <option value="3">3</option> | 285 | |
274 | <option value="2">2</option> | ||
275 | <option value="1" selected>1</option> | ||
276 | </select> | ||
277 | </div> | ||
278 | </div> |
resources/views/workers/cabinet.blade.php
1 | @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('click', '#button_new_doc', function() { | 6 | $(document).on('click', '#button_new_doc', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.attr('data-val'); | 8 | var val_ = this_.attr('data-val'); |
9 | var new_diplom = $('#new_diplom'); | 9 | var new_diplom = $('#new_diplom'); |
10 | var new_diplom_val = new_diplom.val(); | 10 | var new_diplom_val = new_diplom.val(); |
11 | var new_data_begin = $('#new_data_begin'); | 11 | var new_data_begin = $('#new_data_begin'); |
12 | var new_data_begin_val = new_data_begin.val(); | 12 | var new_data_begin_val = new_data_begin.val(); |
13 | var new_data_end = $('#new_data_end'); | 13 | var new_data_end = $('#new_data_end'); |
14 | var new_data_end_val = new_data_end.val(); | 14 | var new_data_end_val = new_data_end.val(); |
15 | var education = $('#education'); | 15 | var education = $('#education'); |
16 | var education_val = education.val(); | 16 | var education_val = education.val(); |
17 | var worker_id = $('#new_id'); | 17 | var worker_id = $('#new_id'); |
18 | var worker_val = worker_id.val(); | 18 | var worker_val = worker_id.val(); |
19 | 19 | ||
20 | console.log('sort items ' + val_); | 20 | console.log('sort items ' + val_); |
21 | 21 | ||
22 | if (new_diplom_val == '') { | 22 | if (new_diplom_val == '') { |
23 | new_diplom.addClass('err_red'); | 23 | new_diplom.addClass('err_red'); |
24 | console.log('Border Up'); | 24 | console.log('Border Up'); |
25 | } else { | 25 | } else { |
26 | $.ajax({ | 26 | $.ajax({ |
27 | type: "GET", | 27 | type: "GET", |
28 | url: "{{ route('worker.add_serificate') }}", | 28 | url: "{{ route('worker.add_serificate') }}", |
29 | data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val, | 29 | data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val, |
30 | success: function (data) { | 30 | success: function (data) { |
31 | console.log('Блокировка...'); | 31 | console.log('Блокировка...'); |
32 | console.log(data); | 32 | console.log(data); |
33 | $('#sertificate').html(data); | 33 | $('#sertificate').html(data); |
34 | if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); | 34 | if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red'); |
35 | }, | 35 | }, |
36 | headers: { | 36 | headers: { |
37 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 37 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
38 | }, | 38 | }, |
39 | error: function (data) { | 39 | error: function (data) { |
40 | data = JSON.stringify(data); | 40 | data = JSON.stringify(data); |
41 | console.log('Error: ' + data); | 41 | console.log('Error: ' + data); |
42 | } | 42 | } |
43 | }); | 43 | }); |
44 | } | 44 | } |
45 | }); | 45 | }); |
46 | 46 | ||
47 | $(document).on('click', '#btn_new_diplom123', function() { | 47 | $(document).on('click', '#btn_new_diplom123', function() { |
48 | var this_ = $(this); | 48 | var this_ = $(this); |
49 | var val_ = this_.attr('data-val'); | 49 | var val_ = this_.attr('data-val'); |
50 | var documents = $('#documents'); | 50 | var documents = $('#documents'); |
51 | var doc_val = documents.val(); | 51 | var doc_val = documents.val(); |
52 | var block = $('#ajax_dop_diplomi'); | 52 | var block = $('#ajax_dop_diplomi'); |
53 | 53 | ||
54 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); | 54 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); |
55 | 55 | ||
56 | $.ajax({ | 56 | $.ajax({ |
57 | type: "GET", | 57 | type: "GET", |
58 | url: "", | 58 | url: "", |
59 | data: "worker_id="+val_+"&infoblok_id="+doc_val, | 59 | data: "worker_id="+val_+"&infoblok_id="+doc_val, |
60 | success: function (data) { | 60 | success: function (data) { |
61 | location.url = data; | 61 | location.url = data; |
62 | console.log('Добавление документа-диплома'); | 62 | console.log('Добавление документа-диплома'); |
63 | console.log(data); | 63 | console.log(data); |
64 | block.html(data); | 64 | block.html(data); |
65 | }, | 65 | }, |
66 | headers: { | 66 | headers: { |
67 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 67 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
68 | }, | 68 | }, |
69 | error: function (data) { | 69 | error: function (data) { |
70 | data = JSON.stringify(data); | 70 | data = JSON.stringify(data); |
71 | console.log('Error: ' + data); | 71 | console.log('Error: ' + data); |
72 | } | 72 | } |
73 | }); | 73 | }); |
74 | }); | 74 | }); |
75 | 75 | ||
76 | $(document).on('click', '#new_work', function() { | 76 | $(document).on('click', '#new_work', function() { |
77 | var this_ = $(this); | 77 | var this_ = $(this); |
78 | var val_ = this_.attr('data-val'); | 78 | var val_ = this_.attr('data-val'); |
79 | var new_diplom = $('#new_diplom').val(); | 79 | var new_diplom = $('#new_diplom').val(); |
80 | var new_data_begin = $('#new_data_begin').val(); | 80 | var new_data_begin = $('#new_data_begin').val(); |
81 | var new_data_end = $('#new_data_end').val(); | 81 | var new_data_end = $('#new_data_end').val(); |
82 | var new_job_title = $('#new_job_title').val(); | 82 | var new_job_title = $('#new_job_title').val(); |
83 | var new_teplohod = $('#new_teplohod').val(); | 83 | var new_teplohod = $('#new_teplohod').val(); |
84 | var new_GWT = $('#new_GWT').val(); | 84 | var new_GWT = $('#new_GWT').val(); |
85 | var new_KBT = $('#new_KBT').val(); | 85 | var new_KBT = $('#new_KBT').val(); |
86 | var new_Begin_work = $('#new_Begin_work').val(); | 86 | var new_Begin_work = $('#new_Begin_work').val(); |
87 | var new_End_work = $('#new_End_work').val(); | 87 | var new_End_work = $('#new_End_work').val(); |
88 | var new_name_company = $('#new_name_company').val(); | 88 | var new_name_company = $('#new_name_company').val(); |
89 | 89 | ||
90 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); | 90 | console.log('worker_id='+val_+'it_infoblock='+ doc_val); |
91 | 91 | ||
92 | $.ajax({ | 92 | $.ajax({ |
93 | type: "GET", | 93 | type: "GET", |
94 | url: "", | 94 | url: "", |
95 | data: "worker_id="+val_+"&infoblok_id="+doc_val, | 95 | data: "worker_id="+val_+"&infoblok_id="+doc_val, |
96 | success: function (data) { | 96 | success: function (data) { |
97 | location.url = data; | 97 | location.url = data; |
98 | console.log('Добавление документа-диплома'); | 98 | console.log('Добавление документа-диплома'); |
99 | console.log(data); | 99 | console.log(data); |
100 | block.html(data); | 100 | block.html(data); |
101 | }, | 101 | }, |
102 | headers: { | 102 | headers: { |
103 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 103 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
104 | }, | 104 | }, |
105 | error: function (data) { | 105 | error: function (data) { |
106 | data = JSON.stringify(data); | 106 | data = JSON.stringify(data); |
107 | console.log('Error: ' + data); | 107 | console.log('Error: ' + data); |
108 | } | 108 | } |
109 | }); | 109 | }); |
110 | }); | 110 | }); |
111 | </script> | 111 | </script> |
112 | @endsection | 112 | @endsection |
113 | 113 | ||
114 | @section('content') | 114 | @section('content') |
115 | <section class="cabinet"> | 115 | <section class="cabinet"> |
116 | <div class="container"> | 116 | <div class="container"> |
117 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 117 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
118 | <li><a href="{{ route('index') }}">Главная</a></li> | 118 | <li><a href="{{ route('index') }}">Главная</a></li> |
119 | <li><b>Личный кабинет</b></li> | 119 | <li><b>Личный кабинет</b></li> |
120 | </ul> | 120 | </ul> |
121 | <div class="cabinet__wrapper"> | 121 | <div class="cabinet__wrapper"> |
122 | <div class="cabinet__side"> | 122 | <div class="cabinet__side"> |
123 | <div class="cabinet__side-toper"> | 123 | <div class="cabinet__side-toper"> |
124 | @include('workers.emblema') | 124 | @include('workers.emblema') |
125 | 125 | ||
126 | </div> | 126 | </div> |
127 | 127 | ||
128 | @include('workers.menu', ['item' => 1]) | 128 | @include('workers.menu', ['item' => 1]) |
129 | </div> | 129 | </div> |
130 | <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> | 130 | <form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST"> |
131 | @csrf | 131 | @csrf |
132 | @include('messages_error') | 132 | @include('messages_error') |
133 | <div class="cabinet__body-item"> | 133 | <div class="cabinet__body-item"> |
134 | <div class="cabinet__anketa"> | 134 | <div class="cabinet__anketa"> |
135 | <h2 class="title cabinet__title">Моя анкета</h2> | 135 | <h2 class="title cabinet__title">Моя анкета</h2> |
136 | <div class="cabinet__anketa-buttons"> | 136 | <div class="cabinet__anketa-buttons"> |
137 | <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> | 137 | <a href="{{ route('worker.up', ['worker' => $Worker[0]->id]) }}" class="button">Поднять резюме</a> |
138 | <a href="{{ route('worker.download', ['worker' => $Worker[0]->id]) }}" class="button"> | 138 | <a href="{{ route('resume_download', ['worker' => $Worker[0]->id]) }}" target="_blank" class="button"> |
139 | <svg> | 139 | <svg> |
140 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> | 140 | <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> |
141 | </svg> | 141 | </svg> |
142 | Скачать резюме | 142 | Скачать резюме |
143 | </a> | 143 | </a> |
144 | </div> | 144 | </div> |
145 | </div> | 145 | </div> |
146 | </div> | 146 | </div> |
147 | <div class="cabinet__body-item"> | 147 | <div class="cabinet__body-item"> |
148 | <div class="cabinet__stats"> | 148 | <div class="cabinet__stats"> |
149 | <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> | 149 | <h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3> |
150 | <div class="cabinet__stats-body"> | 150 | <div class="cabinet__stats-body"> |
151 | <div class="cabinet__stats-item"> | 151 | <div class="cabinet__stats-item"> |
152 | <svg> | 152 | <svg> |
153 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> | 153 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> |
154 | </svg> | 154 | </svg> |
155 | <span>Просмотров:</span> | 155 | <span>Просмотров:</span> |
156 | <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b> | 156 | <b>@if (isset($stat[0]->lookin)) {{ $stat[0]->lookin }} @else 0 @endif</b> |
157 | </div> | 157 | </div> |
158 | <div class="cabinet__stats-item"> | 158 | <div class="cabinet__stats-item"> |
159 | <svg> | 159 | <svg> |
160 | <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> | 160 | <use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use> |
161 | </svg> | 161 | </svg> |
162 | <span>Отзывов:</span> | 162 | <span>Отзывов:</span> |
163 | <b>@if (isset($Worker[0]->users->static_user)) 1 @else 0 @endif</b> | 163 | <b>@if (isset($stat[0]->message)) {{ $stat[0]->message }} @else 0 @endif</b> |
164 | </div> | 164 | </div> |
165 | </div> | 165 | </div> |
166 | <div class="cabinet__stats-subtitle">Анкета заполнена на @if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif</div> | 166 | <div class="cabinet__stats-subtitle">Анкета заполнена на {{ $persent }}%</div> |
167 | <div class="cabinet__stats-line"> | 167 | <div class="cabinet__stats-line"> |
168 | <span style="width:@if (!empty($Worker[0]->persent_anketa)) {{ $Worker[0]->persent_anketa }}% @else 0% @endif"></span> | 168 | <span style="width:{{ $persent }}%"></span> |
169 | </div> | 169 | </div> |
170 | <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> | 170 | <div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div> |
171 | </div> | 171 | </div> |
172 | </div> | 172 | </div> |
173 | <div class="cabinet__body-item"> | 173 | <div class="cabinet__body-item"> |
174 | <h3 class="cabinet__subtitle">Профиль</h3> | 174 | <h3 class="cabinet__subtitle">Профиль</h3> |
175 | <div class="cabinet__avatar"> | 175 | <div class="cabinet__avatar"> |
176 | <div class="cabinet__avatar-pic"> | 176 | <div class="cabinet__avatar-pic"> |
177 | 177 | ||
178 | @if (!empty($Worker[0]->photo)) | 178 | @if (!empty($Worker[0]->photo)) |
179 | <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> | 179 | <img src="{{ asset(Storage::url($Worker[0]->photo)) }}"/> |
180 | @else | 180 | @else |
181 | <svg> | 181 | <svg> |
182 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | 182 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
183 | </svg> | 183 | </svg> |
184 | @endif | 184 | @endif |
185 | </div> | 185 | </div> |
186 | <div class="cabinet__avatar-form"> | 186 | <div class="cabinet__avatar-form"> |
187 | <label class="file"> | 187 | <label class="file"> |
188 | <span class="file__input"> | 188 | <span class="file__input"> |
189 | <input type="file" name="photo" id="photo"> | 189 | <input type="file" name="photo" id="photo"> |
190 | 190 | ||
191 | <span class="button"> | 191 | <span class="button"> |
192 | <svg> | 192 | <svg> |
193 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | 193 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |
194 | </svg> | 194 | </svg> |
195 | Загрузить | 195 | Загрузить |
196 | </span> | 196 | </span> |
197 | </span> | 197 | </span> |
198 | </label> | 198 | </label> |
199 | <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> | 199 | <p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p> |
200 | </div> | 200 | </div> |
201 | </div> | 201 | </div> |
202 | </div> | 202 | </div> |
203 | <div class="cabinet__body-item"> | 203 | <div class="cabinet__body-item"> |
204 | <div class="cabinet__inputs"> | 204 | <div class="cabinet__inputs"> |
205 | <div class="cabinet__inputs-item form-group"> | 205 | <div class="cabinet__inputs-item form-group"> |
206 | <label class="form-group__label">Электронная почта *</label> | 206 | <label class="form-group__label">Электронная почта *</label> |
207 | <div class="form-group__item"> | 207 | <div class="form-group__item"> |
208 | <input type="email" name="email" id="email" value="{{ $Worker[0]->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> |
209 | </div> | 209 | </div> |
210 | </div> | 210 | </div> |
211 | <div class="cabinet__inputs-item form-group"> | 211 | <div class="cabinet__inputs-item form-group"> |
212 | <label class="form-group__label">Статус</label> | 212 | <label class="form-group__label">Статус</label> |
213 | <div class="form-group__item"> | 213 | <div class="form-group__item"> |
214 | <div class="select"> | 214 | <div class="select"> |
215 | <select class="js-select2" name="status_work" id="status_work"> | 215 | <select class="js-select2" name="status_work" id="status_work"> |
216 | <option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option> | 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> | 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> | 218 | <option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option> |
219 | </select> | 219 | </select> |
220 | </div> | 220 | </div> |
221 | </div> | 221 | </div> |
222 | </div> | 222 | </div> |
223 | <!--<div class="cabinet__inputs-item form-group"> | 223 | <!--<div class="cabinet__inputs-item form-group"> |
224 | <label class="form-group__label">Статус *</label> | 224 | <label class="form-group__label">Статус *</label> |
225 | <div class="form-group__item"> | 225 | <div class="form-group__item"> |
226 | <input type="text" class="input" required> | 226 | <input type="text" class="input" required> |
227 | </div> | 227 | </div> |
228 | </div>--> | 228 | </div>--> |
229 | @if (isset($Worker[0]->users)) | 229 | @if (isset($Worker[0]->users)) |
230 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 230 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
231 | <label class="form-group__label">Фамилия *</label> | 231 | <label class="form-group__label">Фамилия *</label> |
232 | <div class="form-group__item"> | 232 | <div class="form-group__item"> |
233 | <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> | 233 | <input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required> |
234 | </div> | 234 | </div> |
235 | </div> | 235 | </div> |
236 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 236 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
237 | <label class="form-group__label">Имя *</label> | 237 | <label class="form-group__label">Имя *</label> |
238 | <div class="form-group__item"> | 238 | <div class="form-group__item"> |
239 | <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> | 239 | <input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required> |
240 | </div> | 240 | </div> |
241 | </div> | 241 | </div> |
242 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 242 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
243 | <label class="form-group__label">Отчество *</label> | 243 | <label class="form-group__label">Отчество *</label> |
244 | <div class="form-group__item"> | 244 | <div class="form-group__item"> |
245 | <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> | 245 | <input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич"> |
246 | </div> | 246 | </div> |
247 | </div> | 247 | </div> |
248 | @endif | 248 | @endif |
249 | </div> | 249 | </div> |
250 | </div> | 250 | </div> |
251 | <div class="cabinet__body-item"> | 251 | <div class="cabinet__body-item"> |
252 | <h3 class="cabinet__subtitle">Основная информация</h3> | 252 | <h3 class="cabinet__subtitle">Основная информация</h3> |
253 | <div class="cabinet__inputs"> | 253 | <div class="cabinet__inputs"> |
254 | <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> | 254 | <div class="cabinet__inputs-item cabinet__inputs-item_min form-group"> |
255 | <label class="form-group__label">Возраст</label> | 255 | <label class="form-group__label">Возраст</label> |
256 | <div class="form-group__item"> | 256 | <div class="form-group__item"> |
257 | <input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" 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> |
258 | </div> | 258 | </div> |
259 | </div> | 259 | </div> |
260 | <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> | 260 | <div class="cabinet__inputs-item cabinet__inputs-item_max form-group"> |
261 | <label class="form-group__label">Желаемые вакансии</label> | 261 | <label class="form-group__label">Желаемые вакансии</label> |
262 | <div class="form-group__item"> | 262 | <div class="form-group__item"> |
263 | <div class="select"> | 263 | <div class="select"> |
264 | <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> | 264 | <select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple"> |
265 | @if ($Job_titles->count()) | 265 | @if ($Job_titles->count()) |
266 | @foreach($Job_titles as $it) | 266 | @foreach($Job_titles as $it) |
267 | @if (isset($Worker[0]->job_titles)) | 267 | @if (isset($Worker[0]->job_titles)) |
268 | @if ($Worker[0]->job_titles->count()) | 268 | @if ($Worker[0]->job_titles->count()) |
269 | @foreach($Worker[0]->job_titles as $select) | 269 | @foreach($Worker[0]->job_titles as $select) |
270 | <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option> | 270 | <option value="{{ $it->id }}" @if ($it->id == $select->id) selected @endif>{{ $it->name }}</option> |
271 | @endforeach | 271 | @endforeach |
272 | @else | 272 | @else |
273 | <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> | 273 | <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> |
274 | @endif | 274 | @endif |
275 | @else | 275 | @else |
276 | <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> | 276 | <option value="{{ $it->id }}">{{ $it->name }} ({{ $it->id }})</option> |
277 | @endif | 277 | @endif |
278 | @endforeach | 278 | @endforeach |
279 | @endif | 279 | @endif |
280 | </select> | 280 | </select> |
281 | </div> | 281 | </div> |
282 | </div> | 282 | </div> |
283 | </div> | 283 | </div> |
284 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 284 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
285 | <label class="form-group__label">Город</label> | 285 | <label class="form-group__label">Город</label> |
286 | <div class="form-group__item"> | 286 | <div class="form-group__item"> |
287 | <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> | 287 | <input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required> |
288 | </div> | 288 | </div> |
289 | </div> | 289 | </div> |
290 | <div class="cabinet__inputs-item form-group"> | 290 | <div class="cabinet__inputs-item form-group"> |
291 | <label class="form-group__label">Опыт работы</label> | 291 | <label class="form-group__label">Опыт работы</label> |
292 | <div class="form-group__item"> | 292 | <div class="form-group__item"> |
293 | <div class="select"> | 293 | <div class="select"> |
294 | <select class="js-select2" id="experience" name="experience"> | 294 | <select class="js-select2" id="experience" name="experience"> |
295 | <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> | 295 | <option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option> |
296 | <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> | 296 | <option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option> |
297 | <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> | 297 | <option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option> |
298 | <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> | 298 | <option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option> |
299 | <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> | 299 | <option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option> |
300 | <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> | 300 | <option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option> |
301 | </select> | 301 | </select> |
302 | </div> | 302 | </div> |
303 | </div> | 303 | </div> |
304 | </div> | 304 | </div> |
305 | 305 | ||
306 | <div class="cabinet__inputs-item form-group"> | 306 | <div class="cabinet__inputs-item form-group"> |
307 | <label class="form-group__label">Номер телефона 1</label> | 307 | <label class="form-group__label">Номер телефона 1</label> |
308 | <div class="form-group__item"> | 308 | <div class="form-group__item"> |
309 | <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> | 309 | <input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required> |
310 | </div> | 310 | </div> |
311 | </div> | 311 | </div> |
312 | <div class="cabinet__inputs-item form-group"> | 312 | <div class="cabinet__inputs-item form-group"> |
313 | <label class="form-group__label">Номер телефона 2</label> | 313 | <label class="form-group__label">Номер телефона 2</label> |
314 | <div class="form-group__item"> | 314 | <div class="form-group__item"> |
315 | <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> | 315 | <input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__"> |
316 | </div> | 316 | </div> |
317 | </div> | 317 | </div> |
318 | </div> | 318 | </div> |
319 | </div> | 319 | </div> |
320 | 320 | ||
321 | <div id="sertificate" name="sertificate"> | 321 | <div id="sertificate" name="sertificate"> |
322 | @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) | 322 | @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) |
323 | @php $i = 0; @endphp | 323 | @php $i = 0; @endphp |
324 | @foreach($Worker[0]->sertificate as $it) | 324 | @foreach($Worker[0]->sertificate as $it) |
325 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | 325 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
326 | @if ($i == 0) | 326 | @if ($i == 0) |
327 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | 327 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> |
328 | @endif | 328 | @endif |
329 | <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> | 329 | <h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4> |
330 | <div class="cabinet__inputs"> | 330 | <div class="cabinet__inputs"> |
331 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 331 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
332 | <label class="form-group__label">Название сертификата</label> | 332 | <label class="form-group__label">Название сертификата</label> |
333 | <div class="form-group__item"> | 333 | <div class="form-group__item"> |
334 | <input type="text" class="input" value="{{ $it->name }}" disabled> | 334 | <input type="text" class="input" value="{{ $it->name }}" disabled> |
335 | </div> | 335 | </div> |
336 | </div> | 336 | </div> |
337 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 337 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
338 | <label class="form-group__label">Название сертификата</label> | 338 | <label class="form-group__label">Название сертификата</label> |
339 | <div class="form-group__item"> | 339 | <div class="form-group__item"> |
340 | <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> | 340 | <input type="text" class="input" value="{{ $it->date_begin }} - {{ $it->end_begin }}" disabled> |
341 | </div> | 341 | </div> |
342 | </div> | 342 | </div> |
343 | <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> | 343 | <a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light"> |
344 | <svg> | 344 | <svg> |
345 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 345 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
346 | </svg> | 346 | </svg> |
347 | Удалить | 347 | Удалить |
348 | </a> | 348 | </a> |
349 | </div> | 349 | </div> |
350 | </div> | 350 | </div> |
351 | @php $i++ @endphp | 351 | @php $i++ @endphp |
352 | @endforeach | 352 | @endforeach |
353 | @else | 353 | @else |
354 | <div style="margin-bottom: 20px" class="cabinet__body-item"> | 354 | <div style="margin-bottom: 20px" class="cabinet__body-item"> |
355 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> | 355 | <h3 class="cabinet__subtitle">Сертификаты / документы</h3> |
356 | Нет сертификатов | 356 | Нет сертификатов |
357 | </div> | 357 | </div> |
358 | @endif | 358 | @endif |
359 | </div> | 359 | </div> |
360 | 360 | ||
361 | <div class="cabinet__body-item"> | 361 | <div class="cabinet__body-item"> |
362 | <h4 class="cabinet__h4">Добавить сертификат</h4> | 362 | <h4 class="cabinet__h4">Добавить сертификат</h4> |
363 | <div class="cabinet__inputs"> | 363 | <div class="cabinet__inputs"> |
364 | <input type="hidden" name="new_id" id="new_id" class="input" value="{{ $Worker[0]->id }}"> | 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"> | 365 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
366 | <label class="form-group__label">Название сертификата</label> | 366 | <label class="form-group__label">Название сертификата</label> |
367 | <div class="form-group__item"> | 367 | <div class="form-group__item"> |
368 | <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании"> | 368 | <input type="text" name="new_diplom" id="new_diplom" class="input" value="Диплом о дополнительном образовании"> |
369 | </div> | 369 | </div> |
370 | </div> | 370 | </div> |
371 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 371 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
372 | <label class="form-group__label">Дата поступления</label> | 372 | <label class="form-group__label">Дата поступления</label> |
373 | <div class="form-group__item"> | 373 | <div class="form-group__item"> |
374 | <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23"> | 374 | <input type="text" name="new_data_begin" id="new_data_begin" class="input" value="01.09.23"> |
375 | </div> | 375 | </div> |
376 | </div> | 376 | </div> |
377 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 377 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
378 | <label class="form-group__label">Дата окончания</label> | 378 | <label class="form-group__label">Дата окончания</label> |
379 | <div class="form-group__item"> | 379 | <div class="form-group__item"> |
380 | <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26"> | 380 | <input type="text" name="new_data_end" id="new_data_end" class="input" value="04.11.26"> |
381 | </div> | 381 | </div> |
382 | </div> | 382 | </div> |
383 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 383 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
384 | <label class="form-group__label">Дата окончания</label> | 384 | <label class="form-group__label">Дата окончания</label> |
385 | <div class="form-group__item"> | 385 | <div class="form-group__item"> |
386 | <input type="text" name="education" id="education" class="input" value="Учебное заведение"> | 386 | <input type="text" name="education" id="education" class="input" value="Учебное заведение"> |
387 | </div> | 387 | </div> |
388 | </div> | 388 | </div> |
389 | <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc"> | 389 | <div class="button button_light" data-val="{{ $Worker[0]->id }}" id="button_new_doc" name="button_new_doc"> |
390 | Добавить сертификат | 390 | Добавить сертификат |
391 | </div> | 391 | </div> |
392 | </div> | 392 | </div> |
393 | </div> | 393 | </div> |
394 | 394 | ||
395 | <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> | 395 | <div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi"> |
396 | <h4 class="cabinet__h4">Дополнительная информация</h4> | 396 | <h4 class="cabinet__h4">Дополнительная информация</h4> |
397 | <div class="cabinet__inputs" > | 397 | <div class="cabinet__inputs" > |
398 | @if (isset($Worker[0]->infobloks)) | 398 | @if (isset($Worker[0]->infobloks)) |
399 | @if ($Worker[0]->infobloks->count()) | 399 | @if ($Worker[0]->infobloks->count()) |
400 | @php $i = 1; @endphp | 400 | @php $i = 1; @endphp |
401 | @foreach ($Worker[0]->infobloks as $info) | 401 | @foreach ($Worker[0]->infobloks as $info) |
402 | <div class="cabinet__inputs-item form-group"> | 402 | <div class="cabinet__inputs-item form-group"> |
403 | <label class="form-group__label">{{ $info->name }}</label> | 403 | <label class="form-group__label">{{ $info->name }}</label> |
404 | <div class="form-group__item"> | 404 | <div class="form-group__item"> |
405 | <div class="select"> | 405 | <div class="select"> |
406 | <select class="js-select2 sertificates_js"> | 406 | <select class="js-select2 sertificates_js"> |
407 | <option value="0">Нет</option> | 407 | <option value="0">Нет</option> |
408 | <option value="1" selected>Да</option> | 408 | <option value="1" selected>Да</option> |
409 | </select> | 409 | </select> |
410 | </div> | 410 | </div> |
411 | </div> | 411 | </div> |
412 | </div> | 412 | </div> |
413 | @php $i++; @endphp | 413 | @php $i++; @endphp |
414 | @endforeach | 414 | @endforeach |
415 | @endif | 415 | @endif |
416 | @endif | 416 | @endif |
417 | 417 | ||
418 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 418 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
419 | <label class="form-group__label">Образцы дипломов и документов</label> | 419 | <label class="form-group__label">Образцы дипломов и документов</label> |
420 | <div class="form-group__item"> | 420 | <div class="form-group__item"> |
421 | <div class="select"> | 421 | <div class="select"> |
422 | <select class="js-select2" id="documents" name="documents"> | 422 | <select class="js-select2" id="documents" name="documents"> |
423 | @if ($Infoblocks->count()) | 423 | @if ($Infoblocks->count()) |
424 | @foreach ($Infoblocks as $it) | 424 | @foreach ($Infoblocks as $it) |
425 | <option value="{{ $it->id }}">{{ $it->name }}</option> | 425 | <option value="{{ $it->id }}">{{ $it->name }}</option> |
426 | @endforeach | 426 | @endforeach |
427 | @endif | 427 | @endif |
428 | </select> | 428 | </select> |
429 | </div> | 429 | </div> |
430 | </div> | 430 | </div> |
431 | </div> | 431 | </div> |
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"> | 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"> |
433 | Добавить документ | 433 | Добавить документ |
434 | </a> | 434 | </a> |
435 | </div> | 435 | </div> |
436 | </div> | 436 | </div> |
437 | <div class="cabinet__body-item"> | 437 | <div class="cabinet__body-item"> |
438 | <div class="cabinet__works"> | 438 | <div class="cabinet__works"> |
439 | @if (isset($Worker[0]->place_worker)) | 439 | @if (isset($Worker[0]->place_worker)) |
440 | @php $i = 1; @endphp | 440 | @php $i = 1; @endphp |
441 | @foreach($Worker[0]->place_worker as $company) | 441 | @foreach($Worker[0]->place_worker as $company) |
442 | <div class="cabinet__works-item"> | 442 | <div class="cabinet__works-item"> |
443 | <div class="cabinet__works-spoiler active"> | 443 | <div class="cabinet__works-spoiler active"> |
444 | <div class="cabinet__works-spoiler-left"> | 444 | <div class="cabinet__works-spoiler-left"> |
445 | <div class="cabinet__works-spoiler-buttons"> | 445 | <div class="cabinet__works-spoiler-buttons"> |
446 | <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove"> | 446 | <a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove"> |
447 | <svg> | 447 | <svg> |
448 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 448 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
449 | </svg> | 449 | </svg> |
450 | </a> | 450 | </a> |
451 | <a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" 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"> |
452 | <svg> | 452 | <svg> |
453 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | 453 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> |
454 | </svg> | 454 | </svg> |
455 | </a> | 455 | </a> |
456 | </div> | 456 | </div> |
457 | <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> | 457 | <div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div> |
458 | </div> | 458 | </div> |
459 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | 459 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> |
460 | <svg> | 460 | <svg> |
461 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 461 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> |
462 | </svg> | 462 | </svg> |
463 | </button> | 463 | </button> |
464 | </div> | 464 | </div> |
465 | <div class="cabinet__works-body"> | 465 | <div class="cabinet__works-body"> |
466 | <div class="cabinet__inputs"> | 466 | <div class="cabinet__inputs"> |
467 | <div class="cabinet__inputs-item form-group"> | 467 | <div class="cabinet__inputs-item form-group"> |
468 | <label class="form-group__label">Должность</label> | 468 | <label class="form-group__label">Должность</label> |
469 | <div class="form-group__item"> | 469 | <div class="form-group__item"> |
470 | <input type="text" class="input" value="{{ $company->job_title }}"> | 470 | <input type="text" class="input" value="{{ $company->job_title }}"> |
471 | </div> | 471 | </div> |
472 | </div> | 472 | </div> |
473 | <div class="cabinet__inputs-item form-group"> | 473 | <div class="cabinet__inputs-item form-group"> |
474 | <label class="form-group__label">Опыт работы в танкерном флоте</label> | 474 | <label class="form-group__label">Опыт работы в танкерном флоте</label> |
475 | <div class="form-group__item"> | 475 | <div class="form-group__item"> |
476 | <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif"> | 476 | <input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif"> |
477 | </div> | 477 | </div> |
478 | </div> | 478 | </div> |
479 | <div class="cabinet__inputs-item form-group"> | 479 | <div class="cabinet__inputs-item form-group"> |
480 | <label class="form-group__label">Название теплохода</label> | 480 | <label class="form-group__label">Название теплохода</label> |
481 | <div class="form-group__item"> | 481 | <div class="form-group__item"> |
482 | <input type="text" class="input" value="{{ $company->teplohod }}"> | 482 | <input type="text" class="input" value="{{ $company->teplohod }}"> |
483 | </div> | 483 | </div> |
484 | </div> | 484 | </div> |
485 | <div class="cabinet__inputs-item form-group"> | 485 | <div class="cabinet__inputs-item form-group"> |
486 | <label class="form-group__label">Тип (GWT)</label> | 486 | <label class="form-group__label">Тип (GWT)</label> |
487 | <div class="form-group__item"> | 487 | <div class="form-group__item"> |
488 | <input type="text" class="input" value="{{ $company->GWT }}"> | 488 | <input type="text" class="input" value="{{ $company->GWT }}"> |
489 | </div> | 489 | </div> |
490 | </div> | 490 | </div> |
491 | <div class="cabinet__inputs-item form-group"> | 491 | <div class="cabinet__inputs-item form-group"> |
492 | <label class="form-group__label">ГД (кВТ)</label> | 492 | <label class="form-group__label">ГД (кВТ)</label> |
493 | <div class="form-group__item"> | 493 | <div class="form-group__item"> |
494 | <input type="text" class="input" value="{{ $company->KBT }}"> | 494 | <input type="text" class="input" value="{{ $company->KBT }}"> |
495 | </div> | 495 | </div> |
496 | </div> | 496 | </div> |
497 | <div class="cabinet__inputs-item form-group"> | 497 | <div class="cabinet__inputs-item form-group"> |
498 | <label class="form-group__label">Начало контракта</label> | 498 | <label class="form-group__label">Начало контракта</label> |
499 | <div class="form-group__item"> | 499 | <div class="form-group__item"> |
500 | <input type="text" class="input" value="{{ $company->begin_work }}"> | 500 | <input type="text" class="input" value="{{ $company->begin_work }}"> |
501 | </div> | 501 | </div> |
502 | </div> | 502 | </div> |
503 | <div class="cabinet__inputs-item form-group"> | 503 | <div class="cabinet__inputs-item form-group"> |
504 | <label class="form-group__label">Окончание контракта</label> | 504 | <label class="form-group__label">Окончание контракта</label> |
505 | <div class="form-group__item"> | 505 | <div class="form-group__item"> |
506 | <input type="text" class="input" value="{{ $company->end_work }}"> | 506 | <input type="text" class="input" value="{{ $company->end_work }}"> |
507 | </div> | 507 | </div> |
508 | </div> | 508 | </div> |
509 | <div class="cabinet__inputs-item form-group"> | 509 | <div class="cabinet__inputs-item form-group"> |
510 | <label class="form-group__label">Название компании</label> | 510 | <label class="form-group__label">Название компании</label> |
511 | <div class="form-group__item"> | 511 | <div class="form-group__item"> |
512 | <input type="text" class="input" value="{{ $company->name_company }}"> | 512 | <input type="text" class="input" value="{{ $company->name_company }}"> |
513 | </div> | 513 | </div> |
514 | </div> | 514 | </div> |
515 | </div> | 515 | </div> |
516 | </div> | 516 | </div> |
517 | </div> | 517 | </div> |
518 | @php $i++ @endphp | 518 | @php $i++ @endphp |
519 | @endforeach | 519 | @endforeach |
520 | @endif | 520 | @endif |
521 | 521 | ||
522 | <!--<div class="cabinet__works-item"> | 522 | <!--<div class="cabinet__works-item"> |
523 | <div class="cabinet__works-spoiler"> | 523 | <div class="cabinet__works-spoiler"> |
524 | <div class="cabinet__works-spoiler-left"> | 524 | <div class="cabinet__works-spoiler-left"> |
525 | <div class="cabinet__works-spoiler-text">Новая работа</div> | 525 | <div class="cabinet__works-spoiler-text">Новая работа</div> |
526 | </div> | 526 | </div> |
527 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> | 527 | <button type="button" class="cabinet__works-spoiler-right js-parent-toggle"> |
528 | <svg> | 528 | <svg> |
529 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> | 529 | <use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use> |
530 | </svg> | 530 | </svg> |
531 | </button> | 531 | </button> |
532 | </div> | 532 | </div> |
533 | <div class="cabinet__works-body"> | 533 | <div class="cabinet__works-body"> |
534 | <div class="cabinet__inputs"> | 534 | <div class="cabinet__inputs"> |
535 | <div class="cabinet__inputs-item form-group"> | 535 | <div class="cabinet__inputs-item form-group"> |
536 | <label class="form-group__label">Должность</label> | 536 | <label class="form-group__label">Должность</label> |
537 | <div class="form-group__item"> | 537 | <div class="form-group__item"> |
538 | <input type="text" name="new_job_title" id="new_job_title" class="input" value="Не указано"> | 538 | <input type="text" name="new_job_title" id="new_job_title" class="input" value="Не указано"> |
539 | </div> | 539 | </div> |
540 | </div> | 540 | </div> |
541 | <div class="cabinet__inputs-item form-group"> | 541 | <div class="cabinet__inputs-item form-group"> |
542 | <label class="form-group__label">Опыт работы в танкерном флоте</label> | 542 | <label class="form-group__label">Опыт работы в танкерном флоте</label> |
543 | <div class="form-group__item"> | 543 | <div class="form-group__item"> |
544 | <select class="js-select2" name="new_job_title" id="new_job_title"> | 544 | <select class="js-select2" name="new_job_title" id="new_job_title"> |
545 | <option value="0">Нет</option> | 545 | <option value="0">Нет</option> |
546 | <option value="1">Да</option> | 546 | <option value="1">Да</option> |
547 | </select> | 547 | </select> |
548 | </div> | 548 | </div> |
549 | </div> | 549 | </div> |
550 | <div class="cabinet__inputs-item form-group"> | 550 | <div class="cabinet__inputs-item form-group"> |
551 | <label class="form-group__label">Название теплохода</label> | 551 | <label class="form-group__label">Название теплохода</label> |
552 | <div class="form-group__item"> | 552 | <div class="form-group__item"> |
553 | <input type="text" name="new_teplohod" id="new_teplohod" class="input" value="Не указано"> | 553 | <input type="text" name="new_teplohod" id="new_teplohod" class="input" value="Не указано"> |
554 | </div> | 554 | </div> |
555 | </div> | 555 | </div> |
556 | <div class="cabinet__inputs-item form-group"> | 556 | <div class="cabinet__inputs-item form-group"> |
557 | <label class="form-group__label">Тип (GWT)</label> | 557 | <label class="form-group__label">Тип (GWT)</label> |
558 | <div class="form-group__item"> | 558 | <div class="form-group__item"> |
559 | <input type="text" name="new_GWT" id="new_GWT" class="input" value="Не указано"> | 559 | <input type="text" name="new_GWT" id="new_GWT" class="input" value="Не указано"> |
560 | </div> | 560 | </div> |
561 | </div> | 561 | </div> |
562 | <div class="cabinet__inputs-item form-group"> | 562 | <div class="cabinet__inputs-item form-group"> |
563 | <label class="form-group__label">ГД (кВТ)</label> | 563 | <label class="form-group__label">ГД (кВТ)</label> |
564 | <div class="form-group__item"> | 564 | <div class="form-group__item"> |
565 | <input type="text" name="new_KBT" id="new_KBT" class="input" value="Не указано"> | 565 | <input type="text" name="new_KBT" id="new_KBT" class="input" value="Не указано"> |
566 | </div> | 566 | </div> |
567 | </div> | 567 | </div> |
568 | <div class="cabinet__inputs-item form-group"> | 568 | <div class="cabinet__inputs-item form-group"> |
569 | <label class="form-group__label">Начало контракта</label> | 569 | <label class="form-group__label">Начало контракта</label> |
570 | <div class="form-group__item"> | 570 | <div class="form-group__item"> |
571 | <input type="text" name="new_Begin_work" id="new_Begin_work" class="input" value="Не указано"> | 571 | <input type="text" name="new_Begin_work" id="new_Begin_work" class="input" value="Не указано"> |
572 | </div> | 572 | </div> |
573 | </div> | 573 | </div> |
574 | <div class="cabinet__inputs-item form-group"> | 574 | <div class="cabinet__inputs-item form-group"> |
575 | <label class="form-group__label">Окончание контракта</label> | 575 | <label class="form-group__label">Окончание контракта</label> |
576 | <div class="form-group__item"> | 576 | <div class="form-group__item"> |
577 | <input type="text" name="new_End_work" id="new_End_work" class="input" value="Не указано"> | 577 | <input type="text" name="new_End_work" id="new_End_work" class="input" value="Не указано"> |
578 | </div> | 578 | </div> |
579 | </div> | 579 | </div> |
580 | <div class="cabinet__inputs-item form-group"> | 580 | <div class="cabinet__inputs-item form-group"> |
581 | <label class="form-group__label">Название компании</label> | 581 | <label class="form-group__label">Название компании</label> |
582 | <div class="form-group__item"> | 582 | <div class="form-group__item"> |
583 | <input type="text" name="new_name_company" id="new_name_company" class="input" value="Не указано"> | 583 | <input type="text" name="new_name_company" id="new_name_company" class="input" value="Не указано"> |
584 | </div> | 584 | </div> |
585 | </div> | 585 | </div> |
586 | </div> | 586 | </div> |
587 | </div> | 587 | </div> |
588 | </div>--> | 588 | </div>--> |
589 | <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add">Новое место работы</a> | 589 | <a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add">Новое место работы</a> |
590 | </div> | 590 | </div> |
591 | </div> | 591 | </div> |
592 | 592 | ||
593 | <div class="cabinet__body-item"> | 593 | <div class="cabinet__body-item"> |
594 | <h4 class="cabinet__h4">О себе</h4> | 594 | <h4 class="cabinet__h4">О себе</h4> |
595 | <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> | 595 | <textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea> |
596 | <div class="cabinet__buttons"> | 596 | <div class="cabinet__buttons"> |
597 | <button type="submit" class="button">Сохранить</button> | 597 | <button type="submit" class="button">Сохранить</button> |
598 | <label class="file"> | 598 | <label class="file"> |
599 | <span class="file__input"> | 599 | <span class="file__input"> |
600 | <input type="file" name="file" id="file"> | 600 | <input type="file" name="file" id="file"> |
601 | <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else {{ $Worker[0]->file }}@endif</span> | 601 | <span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else {{ $Worker[0]->file }}@endif</span> |
602 | </span> | 602 | </span> |
603 | </label> | 603 | </label> |
604 | </div> | 604 | </div> |
605 | </div> | 605 | </div> |
606 | </form> | 606 | </form> |
607 | </div> | 607 | </div> |
608 | </div> | 608 | </div> |
609 | </section> | 609 | </section> |
610 | </div> | 610 | </div> |
611 | <div> | 611 | <div> |
612 | @endsection | 612 | @endsection |
613 | 613 |
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 | 49 | ||
50 | Route::get('/', [MainController::class, 'index'])->name('index'); | 50 | Route::get('/', [MainController::class, 'index'])->name('index'); |
51 | 51 | ||
52 | //Роуты авторизации, регистрации, восстановления, аутентификации | 52 | //Роуты авторизации, регистрации, восстановления, аутентификации |
53 | Auth::routes(['verify' => true]); | 53 | Auth::routes(['verify' => true]); |
54 | 54 | ||
55 | // роуты регистрации, авторизации, восстановления пароля, верификации почты | 55 | // роуты регистрации, авторизации, восстановления пароля, верификации почты |
56 | /*Route::group([ | 56 | /*Route::group([ |
57 | 'as' => 'auth.', //имя маршрута, например auth.index | 57 | 'as' => 'auth.', //имя маршрута, например auth.index |
58 | 'prefix' => 'auth', // префикс маршрута, например, auth/index | 58 | 'prefix' => 'auth', // префикс маршрута, например, auth/index |
59 | ], function () { | 59 | ], function () { |
60 | //форма регистрации | 60 | //форма регистрации |
61 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 61 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
62 | 62 | ||
63 | //создание пользователя | 63 | //создание пользователя |
64 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 64 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
65 | 65 | ||
66 | //форма входа авторизации | 66 | //форма входа авторизации |
67 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 67 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
68 | 68 | ||
69 | //аутентификация | 69 | //аутентификация |
70 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); | 70 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); |
71 | 71 | ||
72 | //выход | 72 | //выход |
73 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 73 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
74 | 74 | ||
75 | //форма ввода адреса почты | 75 | //форма ввода адреса почты |
76 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); | 76 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); |
77 | 77 | ||
78 | //письмо на почту | 78 | //письмо на почту |
79 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); | 79 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); |
80 | 80 | ||
81 | //форма восстановления пароля | 81 | //форма восстановления пароля |
82 | Route::get('reset-password/token/{token}/email/{email}', | 82 | Route::get('reset-password/token/{token}/email/{email}', |
83 | [ResetPasswordController::class, 'form'] | 83 | [ResetPasswordController::class, 'form'] |
84 | )->name('reset-form'); | 84 | )->name('reset-form'); |
85 | 85 | ||
86 | //восстановление пароля | 86 | //восстановление пароля |
87 | Route::post('reset-password', | 87 | Route::post('reset-password', |
88 | [ResetPasswordController::class, 'reset'] | 88 | [ResetPasswordController::class, 'reset'] |
89 | )->name('reset-password'); | 89 | )->name('reset-password'); |
90 | 90 | ||
91 | //сообщение о необходимости проверки адреса почты | 91 | //сообщение о необходимости проверки адреса почты |
92 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); | 92 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); |
93 | 93 | ||
94 | //подтверждение адреса почты нового пользователя | 94 | //подтверждение адреса почты нового пользователя |
95 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) | 95 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) |
96 | ->where('token', '[a-f0-9]{32}') | 96 | ->where('token', '[a-f0-9]{32}') |
97 | ->where('id', '[0-9]+') | 97 | ->where('id', '[0-9]+') |
98 | ->name('verify-email'); | 98 | ->name('verify-email'); |
99 | });*/ | 99 | });*/ |
100 | 100 | ||
101 | //Личный кабинет пользователя | 101 | //Личный кабинет пользователя |
102 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 102 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
103 | 103 | ||
104 | /* | 104 | /* |
105 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 105 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
106 | $user = User::where('email',$request->input('email'))->first(); | 106 | $user = User::where('email',$request->input('email'))->first(); |
107 | 107 | ||
108 | $user->sendEmailVerificationNotification(); | 108 | $user->sendEmailVerificationNotification(); |
109 | 109 | ||
110 | return 'your response'; | 110 | return 'your response'; |
111 | })->middleware('throttle:6,1')->name('verification.resend'); | 111 | })->middleware('throttle:6,1')->name('verification.resend'); |
112 | */ | 112 | */ |
113 | 113 | ||
114 | // Авторизация, регистрация в админку | 114 | // Авторизация, регистрация в админку |
115 | Route::group([ | 115 | Route::group([ |
116 | 'as' => 'admin.', // имя маршрута, например auth.index | 116 | 'as' => 'admin.', // имя маршрута, например auth.index |
117 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 117 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
118 | 'middleware' => ['guest'], | 118 | 'middleware' => ['guest'], |
119 | ], function () { | 119 | ], function () { |
120 | // Форма регистрации | 120 | // Форма регистрации |
121 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 121 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
122 | // Создание пользователя | 122 | // Создание пользователя |
123 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 123 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
124 | 124 | ||
125 | //Форма входа | 125 | //Форма входа |
126 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 126 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
127 | 127 | ||
128 | // аутентификация | 128 | // аутентификация |
129 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 129 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
130 | 130 | ||
131 | }); | 131 | }); |
132 | 132 | ||
133 | // Личный кабинет админки | 133 | // Личный кабинет админки |
134 | Route::group([ | 134 | Route::group([ |
135 | 'as' => 'admin.', // имя маршрута, например auth.index | 135 | 'as' => 'admin.', // имя маршрута, например auth.index |
136 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 136 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
137 | 'middleware' => ['auth'], ['admin'], | 137 | 'middleware' => ['auth'], ['admin'], |
138 | ], function() { | 138 | ], function() { |
139 | 139 | ||
140 | // выход | 140 | // выход |
141 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 141 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
142 | 142 | ||
143 | // кабинет главная страница | 143 | // кабинет главная страница |
144 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 144 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
145 | 145 | ||
146 | // кабинет профиль админа - форма | 146 | // кабинет профиль админа - форма |
147 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 147 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
148 | // кабинет профиль админа - сохранение формы | 148 | // кабинет профиль админа - сохранение формы |
149 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 149 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
150 | 150 | ||
151 | //кабинет сообщения админа | 151 | //кабинет сообщения админа |
152 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); | 152 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); |
153 | 153 | ||
154 | 154 | ||
155 | // кабинет профиль - форма пароли | 155 | // кабинет профиль - форма пароли |
156 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 156 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
157 | // кабинет профиль - сохранение формы пароля | 157 | // кабинет профиль - сохранение формы пароля |
158 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 158 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
159 | 159 | ||
160 | 160 | ||
161 | // кабинет профиль пользователя - форма | 161 | // кабинет профиль пользователя - форма |
162 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 162 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
163 | // кабинет профиль пользователя - сохранение формы | 163 | // кабинет профиль пользователя - сохранение формы |
164 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 164 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
165 | 165 | ||
166 | // кабинет профиль работодатель - форма | 166 | // кабинет профиль работодатель - форма |
167 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 167 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
168 | // кабинет профиль работодатель - сохранение формы | 168 | // кабинет профиль работодатель - сохранение формы |
169 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 169 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
170 | // кабинет удаление профиль работодателя и юзера | 170 | // кабинет удаление профиль работодателя и юзера |
171 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); | 171 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); |
172 | 172 | ||
173 | // кабинет профиль работник - форма | 173 | // кабинет профиль работник - форма |
174 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); | 174 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); |
175 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); | 175 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); |
176 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); | 176 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); |
177 | // кабинет профиль работник - сохранение формы | 177 | // кабинет профиль работник - сохранение формы |
178 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); | 178 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); |
179 | 179 | ||
180 | // Медиа | 180 | // Медиа |
181 | Route::get('media', [MediaController::class, 'index'])->name('media'); | 181 | Route::get('media', [MediaController::class, 'index'])->name('media'); |
182 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); | 182 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); |
183 | 183 | ||
184 | // кабинет настройки сайта - форма | 184 | // кабинет настройки сайта - форма |
185 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 185 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
186 | // кабинет настройки сайта сохранение формы | 186 | // кабинет настройки сайта сохранение формы |
187 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 187 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
188 | 188 | ||
189 | // кабинет - пользователи | 189 | // кабинет - пользователи |
190 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 190 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
191 | 191 | ||
192 | // кабинет - пользователи | 192 | // кабинет - пользователи |
193 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 193 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
194 | 194 | ||
195 | // кабинет - работодатели | 195 | // кабинет - работодатели |
196 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 196 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
197 | 197 | ||
198 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); | 198 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); |
199 | 199 | ||
200 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); | 200 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); |
201 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); | 201 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); |
202 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); | 202 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); |
203 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); | 203 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); |
204 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); | 204 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); |
205 | 205 | ||
206 | // кабинет - соискатели | 206 | // кабинет - соискатели |
207 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 207 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
208 | 208 | ||
209 | // кабинет - база данных | 209 | // кабинет - база данных |
210 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); | 210 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); |
211 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); | 211 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); |
212 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); | 212 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); |
213 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); | 213 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); |
214 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); | 214 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); |
215 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); | 215 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); |
216 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); | 216 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); |
217 | 217 | ||
218 | // кабинет - вакансии | 218 | // кабинет - вакансии |
219 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 219 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
220 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); | 220 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); |
221 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); | 221 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); |
222 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); | 222 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); |
223 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); | 223 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); |
224 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); | 224 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); |
225 | 225 | ||
226 | // Редактирование должности в вакансии | 226 | // Редактирование должности в вакансии |
227 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); | 227 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); |
228 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); | 228 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); |
229 | 229 | ||
230 | 230 | ||
231 | // кабинет - категории | 231 | // кабинет - категории |
232 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 232 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
233 | /* | 233 | /* |
234 | * CRUD-операции над Справочником Категории | 234 | * CRUD-операции над Справочником Категории |
235 | */ | 235 | */ |
236 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 236 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
237 | 237 | ||
238 | // CRUD-операции над справочником Категории для работодателей | 238 | // CRUD-операции над справочником Категории для работодателей |
239 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); | 239 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); |
240 | 240 | ||
241 | // CRUD-операции над справочником Образование | 241 | // CRUD-операции над справочником Образование |
242 | Route::resource('education', EducationController::class, ['except' => ['show']]); | 242 | Route::resource('education', EducationController::class, ['except' => ['show']]); |
243 | 243 | ||
244 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); | 244 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); |
245 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); | 245 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); |
246 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); | 246 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); |
247 | 247 | ||
248 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); | 248 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); |
249 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); | 249 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); |
250 | 250 | ||
251 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); | 251 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); |
252 | 252 | ||
253 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 253 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
254 | /* | 254 | /* |
255 | * кабинет - CRUD-операции по справочнику должности | 255 | * кабинет - CRUD-операции по справочнику должности |
256 | * | 256 | * |
257 | */ | 257 | */ |
258 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 258 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
259 | 259 | ||
260 | // кабинет - сообщения (чтение чужих) | 260 | // кабинет - сообщения (чтение чужих) |
261 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 261 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
262 | // кабинет - просмотр сообщения чужого (чтение) | 262 | // кабинет - просмотр сообщения чужого (чтение) |
263 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); | 263 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); |
264 | 264 | ||
265 | // кабинет - сообщения (админские) | 265 | // кабинет - сообщения (админские) |
266 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); | 266 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); |
267 | // кабинет - сообщения (админские) | 267 | // кабинет - сообщения (админские) |
268 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); | 268 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); |
269 | // кабинет - sql - конструкция запросов | 269 | // кабинет - sql - конструкция запросов |
270 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); | 270 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); |
271 | 271 | ||
272 | /* | 272 | /* |
273 | * Расписанный подход в описании каждой директорий групп пользователей. | 273 | * Расписанный подход в описании каждой директорий групп пользователей. |
274 | */ | 274 | */ |
275 | // кабинет - группы пользователей | 275 | // кабинет - группы пользователей |
276 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 276 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
277 | // кабинет - добавление форма группы пользователей | 277 | // кабинет - добавление форма группы пользователей |
278 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 278 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
279 | // кабинет - сохранение формы группы пользователей | 279 | // кабинет - сохранение формы группы пользователей |
280 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 280 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
281 | // кабинет - редактирование форма группы пользователей | 281 | // кабинет - редактирование форма группы пользователей |
282 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 282 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
283 | // кабинет - сохранение редактированной формы группы пользователей | 283 | // кабинет - сохранение редактированной формы группы пользователей |
284 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 284 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
285 | // кабинет - удаление группы пользователей | 285 | // кабинет - удаление группы пользователей |
286 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 286 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
287 | 287 | ||
288 | 288 | ||
289 | // кабинет - список админов | 289 | // кабинет - список админов |
290 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 290 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
291 | 291 | ||
292 | 292 | ||
293 | /////редактор////// кабинет - редактор сайта//////////////////////// | 293 | /////редактор////// кабинет - редактор сайта//////////////////////// |
294 | Route::get('editor-site', function() { | 294 | Route::get('editor-site', function() { |
295 | return view('admin.editor.index'); | 295 | return view('admin.editor.index'); |
296 | })->name('editor-site'); | 296 | })->name('editor-site'); |
297 | 297 | ||
298 | 298 | ||
299 | // кабинет - редактор шапки-футера сайта | 299 | // кабинет - редактор шапки-футера сайта |
300 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 300 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
301 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); | 301 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); |
302 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); | 302 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); |
303 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); | 303 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); |
304 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); | 304 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); |
305 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); | 305 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); |
306 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); | 306 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); |
307 | 307 | ||
308 | 308 | ||
309 | // кабинет - редактор должности на главной | 309 | // кабинет - редактор должности на главной |
310 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 310 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
311 | 311 | ||
312 | // кабинет - редактор работодатели на главной | 312 | // кабинет - редактор работодатели на главной |
313 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 313 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
314 | 314 | ||
315 | 315 | ||
316 | // кабинет - редактор seo-сайта | 316 | // кабинет - редактор seo-сайта |
317 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 317 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
318 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); | 318 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); |
319 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); | 319 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); |
320 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); | 320 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); |
321 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); | 321 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); |
322 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); | 322 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); |
323 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); | 323 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); |
324 | 324 | ||
325 | 325 | ||
326 | // кабинет - редактор страниц | 326 | // кабинет - редактор страниц |
327 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 327 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
328 | // кабинет - добавление страницы | 328 | // кабинет - добавление страницы |
329 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | 329 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); |
330 | // кабинет - сохранение формы страницы | 330 | // кабинет - сохранение формы страницы |
331 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | 331 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); |
332 | // кабинет - редактирование форма страницы | 332 | // кабинет - редактирование форма страницы |
333 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | 333 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); |
334 | // кабинет - сохранение редактированной формы страницы | 334 | // кабинет - сохранение редактированной формы страницы |
335 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | 335 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); |
336 | // кабинет - удаление страницы | 336 | // кабинет - удаление страницы |
337 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | 337 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); |
338 | 338 | ||
339 | 339 | ||
340 | // кабинет - реклама сайта | 340 | // кабинет - реклама сайта |
341 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 341 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
342 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); | 342 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); |
343 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); | 343 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); |
344 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); | 344 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); |
345 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); | 345 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); |
346 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); | 346 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); |
347 | //////////////////////////////////////////////////////////////////////// | 347 | //////////////////////////////////////////////////////////////////////// |
348 | 348 | ||
349 | 349 | ||
350 | // кабинет - отзывы о работодателе для модерации | 350 | // кабинет - отзывы о работодателе для модерации |
351 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 351 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
352 | 352 | ||
353 | // Общая страница статистики | 353 | // Общая страница статистики |
354 | Route::get('statics', function () { | 354 | Route::get('statics', function () { |
355 | return view('admin.static.index'); | 355 | return view('admin.static.index'); |
356 | })->name('statics'); | 356 | })->name('statics'); |
357 | 357 | ||
358 | // кабинет - статистика работников | 358 | // кабинет - статистика работников |
359 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 359 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
360 | 360 | ||
361 | // кабинет - статистика вакансий работодателя | 361 | // кабинет - статистика вакансий работодателя |
362 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 362 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
363 | 363 | ||
364 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 364 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
365 | /* | 365 | /* |
366 | * CRUD-операции над справочником дипломы и документы | 366 | * CRUD-операции над справочником дипломы и документы |
367 | */ | 367 | */ |
368 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 368 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
369 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 369 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
370 | 370 | ||
371 | // кабинет - роли пользователя | 371 | // кабинет - роли пользователя |
372 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 372 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
373 | 373 | ||
374 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); | 374 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); |
375 | 375 | ||
376 | Route::get('logs', function() { | 376 | Route::get('logs', function() { |
377 | $files = Storage::files('logs/laravel.log'); | 377 | $files = Storage::files('logs/laravel.log'); |
378 | })->name('logs'); | 378 | })->name('logs'); |
379 | }); | 379 | }); |
380 | 380 | ||
381 | // Инструментальные страницы | 381 | // Инструментальные страницы |
382 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); | 382 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); |
383 | 383 | ||
384 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); | 384 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); |
385 | 385 | ||
386 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); | 386 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); |
387 | 387 | ||
388 | // Страницы с произвольным контентом | 388 | // Страницы с произвольным контентом |
389 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); | 389 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); |
390 | 390 | ||
391 | // Публичные страницы соискателя | 391 | // Публичные страницы соискателя |
392 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); | 392 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); |
393 | 393 | ||
394 | //Страница вакансии | 394 | //Страница вакансии |
395 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); | 395 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); |
396 | 396 | ||
397 | //Вакансии | 397 | //Вакансии |
398 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); | 398 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); |
399 | 399 | ||
400 | //Вакансии поиск на главной | 400 | //Вакансии поиск на главной |
401 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); | 401 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); |
402 | 402 | ||
403 | //Вакансии категория детальная | 403 | //Вакансии категория детальная |
404 | Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); | 404 | Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); |
405 | 405 | ||
406 | //Детальная страница вакансии - работодателя | 406 | //Детальная страница вакансии - работодателя |
407 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); | 407 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); |
408 | 408 | ||
409 | //Судоходные компании | 409 | //Судоходные компании |
410 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); | 410 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); |
411 | 411 | ||
412 | //Детальная инфа о компании | 412 | //Детальная инфа о компании |
413 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); | 413 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); |
414 | 414 | ||
415 | //Образование | 415 | //Образование |
416 | Route::get('education', [MainController::class, 'education'])->name('education'); | 416 | Route::get('education', [MainController::class, 'education'])->name('education'); |
417 | 417 | ||
418 | //Новости | 418 | //Новости |
419 | Route::get('news', [MainController::class, 'news'])->name('news'); | 419 | Route::get('news', [MainController::class, 'news'])->name('news'); |
420 | Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); | 420 | Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); |
421 | 421 | ||
422 | //Контакты | 422 | //Контакты |
423 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); | 423 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); |
424 | 424 | ||
425 | //База резюме | 425 | //База резюме |
426 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); | 426 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); |
427 | 427 | ||
428 | //Анкета соискателя | 428 | //Анкета соискателя |
429 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); | 429 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); |
430 | 430 | ||
431 | //Скачать резюме | 431 | //Скачать резюме |
432 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); | 432 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); |
433 | 433 | ||
434 | //Вход в кабинет | 434 | //Вход в кабинет |
435 | Route::get('login', [MainController::class, 'input_login'])->name('login'); | 435 | Route::get('login', [MainController::class, 'input_login'])->name('login'); |
436 | 436 | ||
437 | // Выход из кабинета | 437 | // Выход из кабинета |
438 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); | 438 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); |
439 | 439 | ||
440 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); | 440 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); |
441 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); | 441 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); |
442 | 442 | ||
443 | //восстановление пароля | 443 | //восстановление пароля |
444 | Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); | 444 | Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); |
445 | // Звезда сообщения | ||
446 | Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); | ||
445 | // Звезда сообщения | 447 | |
446 | Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); | 448 | // Борьба |
447 | 449 | Route::get('clear_cookie', function() { | |
448 | // Борьба | 450 | \App\Classes\Cookies_vacancy::clear_vacancy(); |
449 | Route::get('clear_cookie', function() { | 451 | return redirect()->route('index'); |
450 | \App\Classes\Cookies_vacancy::clear_vacancy(); | 452 | })->name('clear_cookie'); |
451 | return redirect()->route('index'); | 453 | |
452 | })->name('clear_cookie'); | 454 | // Личный кабинет работника |
453 | 455 | Route::group([ | |
454 | // Личный кабинет работника | 456 | 'as' => 'worker.', // имя маршрута, например auth.index |
455 | Route::group([ | 457 | 'prefix' => 'worker', // префикс маршрута, например auth/index |
456 | 'as' => 'worker.', // имя маршрута, например auth.index | 458 | 'middleware' => ['auth'], ['is_worker'], |
457 | 'prefix' => 'worker', // префикс маршрута, например auth/index | 459 | ], function() { |
458 | 'middleware' => ['auth'], ['is_worker'], | 460 | // 1 страница - Моя анкета |
459 | ], function() { | 461 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); |
460 | // 1 страница - Моя анкета | 462 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); |
461 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); | 463 | |
462 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); | 464 | // 2 страница - Сообщения |
463 | 465 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); | |
464 | // 2 страница - Сообщения | 466 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); |
465 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); | 467 | // 3 страница - Избранные вакансии |
466 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); | 468 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); |
467 | // 3 страница - Избранные вакансии | 469 | // Продолжение борьбы против колорадов - избранные вакансии |
468 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); | 470 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); |
469 | // Продолжение борьбы против колорадов - избранные вакансии | 471 | |
470 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); | 472 | // 4 страница - Сменить пароль |
471 | 473 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); | |
472 | // 4 страница - Сменить пароль | 474 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); |
473 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); | 475 | |
474 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); | 476 | // 5 страница - Удалить профиль |
475 | 477 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); | |
476 | // 5 страница - Удалить профиль | 478 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); |
477 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); | 479 | |
478 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); | 480 | // Резюме -pdf |
479 | 481 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); | |
480 | // Резюме -pdf | 482 | |
481 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); | 483 | // Поднятие анкеты |
482 | 484 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); | |
483 | // Поднятие анкеты | 485 | |
484 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); | 486 | // Добавление сертификата |
485 | 487 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); | |
486 | // Добавление сертификата | 488 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); |
487 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); | 489 | |
488 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); | 490 | // Добавление документа-диплома |
489 | 491 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); | |
490 | // Добавление документа-диплома | 492 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); |
491 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); | 493 | |
492 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); | 494 | // Добавление стандартного диплома |
493 | 495 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); | |
494 | // Добавление стандартного диплома | 496 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); |
495 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); | 497 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); |
496 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); | 498 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); |
497 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); | 499 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); |
498 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); | 500 | |
499 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); | 501 | // Отправка сообщения работодателю от соискателя |
500 | 502 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); | |
501 | // Отправка сообщения работодателю от соискателя | 503 | }); |
502 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); | 504 | |
503 | }); | 505 | // Личный кабинет работодателя |
504 | 506 | Route::group([ | |
505 | // Личный кабинет работодателя | 507 | 'as' => 'employer.', // имя маршрута, например auth.index |
506 | Route::group([ | 508 | 'prefix' => 'employer', // префикс маршрута, например auth/index |
507 | 'as' => 'employer.', // имя маршрута, например auth.index | 509 | 'middleware' => ['auth'], !['is_worker'], |
508 | 'prefix' => 'employer', // префикс маршрута, например auth/index | 510 | ], function() { |
509 | 'middleware' => ['auth'], !['is_worker'], | 511 | // 1 страница - Профиль |
510 | ], function() { | 512 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); |
511 | // 1 страница - Профиль | 513 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
512 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); | 514 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); |
513 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); | 515 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); |
514 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); | 516 | |
515 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); | 517 | // 2 страница - Добавление вакансий |
516 | 518 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | |
517 | // 2 страница - Добавление вакансий | 519 | Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save'); |
518 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | 520 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); |
519 | Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save'); | 521 | |
520 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); | 522 | // 3 страница - Мои вакансии |
521 | 523 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); | |
522 | // 3 страница - Мои вакансии | 524 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
523 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); | 525 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); |
524 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 526 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); |
525 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); | 527 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); |
526 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); | 528 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
529 | Route::post('cabinet/vacancy-edit/{ad_employer}/', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); | ||
527 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); | 530 | |
528 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 531 | // 4 страница - Отклики на вакансии |
529 | 532 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | |
530 | // 4 страница - Отклики на вакансии | 533 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); |
531 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | 534 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); |
532 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); | 535 | |
533 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); | 536 | // 5 страница - Сообщения |
534 | 537 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | |
535 | // 5 страница - Сообщения | 538 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); |
536 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | 539 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); |
537 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); | 540 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); |
538 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); | 541 | |
539 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); | 542 | // 6 страница - Избранный |
540 | 543 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | |
541 | // 6 страница - Избранный | 544 | |
542 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | 545 | //7 страница - База данных |
543 | 546 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | |
544 | //7 страница - База данных | 547 | |
545 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | 548 | //8 страница - База резюме |
546 | 549 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); | |
547 | //8 страница - База резюме | 550 | |
548 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); | 551 | // 9 рассылка сообщений |
549 | 552 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); | |
550 | // 9 рассылка сообщений | 553 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); |
551 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); | 554 | |
552 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); | 555 | // 10 страница FAQ вопросы |
553 | 556 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | |
554 | // 10 страница FAQ вопросы | 557 | |
555 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | 558 | // 11 страница - Настройка уведомлений |
556 | 559 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | |
557 | // 11 страница - Настройка уведомлений | 560 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); |
558 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | 561 | |
559 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); | 562 | // 12 страница - Сменить пароль |
560 | 563 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); | |
561 | // 12 страница - Сменить пароль | 564 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); |
562 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); | 565 | |
563 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); | 566 | // 13 страница - Удаление профиля |
564 | 567 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); | |
565 | // 13 страница - Удаление профиля | 568 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); |
566 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); | 569 | |
567 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); | 570 | // Отправил сообщение |
568 | 571 | Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); | |
569 | // Отправил сообщение | 572 | }); |
570 | Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); | 573 |