Commit 4a6e91624fbd93276f2de6fe53c4568378de32be
1 parent
7947f416aa
Exists in
master
Коммит по кабинету
Showing 12 changed files with 51 additions and 19 deletions Side-by-side Diff
- app/Http/Controllers/MainController.php
- app/Http/Controllers/WorkerController.php
- app/Http/Requests/DocumentsRequest.php
- app/Http/Requests/PrevCompanyRequest.php
- resources/views/ajax/resume_1.blade.php
- resources/views/employers/list_vacancy.blade.php
- resources/views/js/favorite-worker.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/vacance-item.blade.php
- resources/views/worker.blade.php
- resources/views/workers/docs.blade.php
- resources/views/workers/prev_company_form.blade.php
app/Http/Controllers/MainController.php
... | ... | @@ -90,7 +90,11 @@ class MainController extends Controller |
90 | 90 | $Main_Job[$name_cat][] = $it_arr; |
91 | 91 | } |
92 | 92 | |
93 | - $employers = employers_main::query()->with('employer')->orderBy('id')->limit(8)->get(); | |
93 | + $employers = employers_main::query()->with('employer')-> | |
94 | + whereHas('employer', function ($query) { | |
95 | + $query->where('status_hidden', '=', '0'); | |
96 | + })-> | |
97 | + orderBy('id')->limit(8)->get(); | |
94 | 98 | $vacancy = Ad_jobs::query()->with('job_title')->orderBy('position_ship')->get(); |
95 | 99 | return view('index', compact('news', 'Job_title', 'categories', 'employers', 'vacancy', 'Main_Job')); |
96 | 100 | } |
app/Http/Controllers/WorkerController.php
... | ... | @@ -96,7 +96,10 @@ class WorkerController extends Controller |
96 | 96 | }); |
97 | 97 | } |
98 | 98 | |
99 | - $Job_title = Job_title::query()->get(); | |
99 | + $Job_title = Job_title::query()-> | |
100 | + where('is_remove', '=', '0')-> | |
101 | + where('is_bd', '=' , '1')-> | |
102 | + get(); | |
100 | 103 | |
101 | 104 | if ($request->get('sort')) { |
102 | 105 | $sort = $request->get('sort'); |
... | ... | @@ -169,7 +172,7 @@ class WorkerController extends Controller |
169 | 172 | |
170 | 173 | $get_date = date('Y.m'); |
171 | 174 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
172 | - ->where('user_id', '=', $worker->id) | |
175 | + ->where('user_id', '=', $worker->user_id) | |
173 | 176 | ->get(); |
174 | 177 | |
175 | 178 | if ($c->count() > 0) { |
... | ... | @@ -181,7 +184,7 @@ class WorkerController extends Controller |
181 | 184 | $crt->lookin = 1; |
182 | 185 | $crt->year_month = $get_date; |
183 | 186 | $crt->user_id = $worker->user_id; |
184 | - $crt->save(); | |
187 | + $status = $crt->save(); | |
185 | 188 | } |
186 | 189 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
187 | 190 | ->where('user_id', '=', $worker->id) |
app/Http/Requests/DocumentsRequest.php
... | ... | @@ -27,12 +27,20 @@ class DocumentsRequest extends FormRequest |
27 | 27 | 'job_title' => ['required', 'string', 'max:255'], |
28 | 28 | 'teplohod' => ['required', 'string', 'max:255'], |
29 | 29 | 'name_company' => ['required', 'string', 'max:255'], |
30 | + 'GWT' => ['required', 'string', 'max:255'], | |
31 | + 'GRT' => ['required', 'string', 'max:255'], | |
30 | 32 | ]; |
31 | 33 | } |
32 | 34 | |
33 | 35 | public function messages() { |
34 | 36 | return [ |
35 | - 'required' => 'Укажите обязательное поле «:attribute»', | |
37 | + 'job_title.required' => 'Укажите обязательное поле "Должность"', | |
38 | + 'teplohod.required' => 'Укажите обязательное поле "Название т/х"', | |
39 | + 'name_company.required' => 'Укажите обязательное поле "Название компании"', | |
40 | + 'GWT.required' => 'Укажите обязательное поле "Тип судна"', | |
41 | + 'GRT.required' => 'Укажите обязательное поле "Водоизмещение"', | |
42 | + | |
43 | + //'required' => 'Укажите обязательное поле «:attribute»', | |
36 | 44 | 'min' => [ |
37 | 45 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
38 | 46 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
app/Http/Requests/PrevCompanyRequest.php
... | ... | @@ -27,13 +27,11 @@ class PrevCompanyRequest extends FormRequest |
27 | 27 | 'name_company' => [ |
28 | 28 | 'required', |
29 | 29 | 'string', |
30 | - 'min:3', | |
31 | 30 | 'max:255', |
32 | 31 | ], |
33 | 32 | 'direct' => [ |
34 | 33 | 'required', |
35 | 34 | 'string', |
36 | - 'min:3', | |
37 | 35 | 'max:255' |
38 | 36 | ], |
39 | 37 | ]; |
... | ... | @@ -41,7 +39,9 @@ class PrevCompanyRequest extends FormRequest |
41 | 39 | |
42 | 40 | public function messages() { |
43 | 41 | return [ |
44 | - 'required' => 'Поле :attribute обязательно для ввода', | |
42 | + //'required' => 'Поле :attribute обязательно для ввода', | |
43 | + 'name_company.required' => 'Укажите обязательное поле "Название компании"', | |
44 | + 'direct.required' => 'Укажите обязательное поле "ФИО сотрудника"', | |
45 | 45 | 'unique' => 'Поле :attribute должно быть уникальным', |
46 | 46 | 'mimes' => 'Допускаются файлы только с расширением jpeg,jpg,png', |
47 | 47 | 'numeric' => 'Поле :attribute должно быть числом', |
resources/views/ajax/resume_1.blade.php
1 | - | |
1 | +@if ($resumes->count()) | |
2 | + @foreach ($resumes as $res) | |
2 | 3 | <div class="main__resume-base-body-item"> |
3 | 4 | <div class="main__resume-base-body-item-buttons"> |
4 | 5 | <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> |
resources/views/employers/list_vacancy.blade.php
... | ... | @@ -149,6 +149,13 @@ |
149 | 149 | </svg> |
150 | 150 | </a> |
151 | 151 | @endif |
152 | + @if ($Employer->social_is == 1) | |
153 | + <a href="https://telegram.me/share/url?url={{ route('vacancie', ['vacancy' => $it->id]) }}&text={{ $it->text }}" class="table__controls-item"> | |
154 | + <svg> | |
155 | + <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | |
156 | + </svg> | |
157 | + </a> | |
158 | + @endif | |
152 | 159 | <!--<a class="btn_telegram_share table__controls-item" href="https://telegram.me/share/url?url=ВАШ_URL&text={{ $it->name }}"> |
153 | 160 | <svg> |
154 | 161 | <use xlink:href=" asset('images/sprite.svg#arrow-radius') }}"></use> |
resources/views/js/favorite-worker.blade.php
resources/views/layout/frontend.blade.php
resources/views/vacance-item.blade.php
... | ... | @@ -103,7 +103,8 @@ |
103 | 103 | </div> |
104 | 104 | </div> |
105 | 105 | @endif |
106 | - <h2 class="main__employer-page-title">Описание вакансии</h2> | |
106 | + <h2 class="main__employer-page-title">{{ $Query[0]->name }}</h2> | |
107 | + <h3 class="main__employer-page-title_">Описание вакансии</h3> | |
107 | 108 | |
108 | 109 | </div> |
109 | 110 |
resources/views/worker.blade.php
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> |
74 | 74 | </svg> |
75 | 75 | </a> |
76 | - <button type="button" class="like js-toggle"> | |
76 | + <button type="button" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($Query[0]) }}" data-val="{{ $Query[0]->id }}" id="elem{{ $Query[0]->id }}"> | |
77 | 77 | <svg> |
78 | 78 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
79 | 79 | </svg> |
... | ... | @@ -103,7 +103,9 @@ |
103 | 103 | <td> |
104 | 104 | @if ($Query[0]->job_titles->count()) |
105 | 105 | @foreach ($Query[0]->job_titles as $it) |
106 | + @if ($it->is_remove == 0) | |
106 | 107 | <b>{{ $it->name }}</b> |
108 | + @endif | |
107 | 109 | @endforeach |
108 | 110 | @endif |
109 | 111 | </td> |
... | ... | @@ -114,7 +116,7 @@ |
114 | 116 | </tr> |
115 | 117 | <tr> |
116 | 118 | <td>E-mail:</td> |
117 | - <td><b><a href="emailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> | |
119 | + <td><b><a href="mailto:{{ $Query[0]->email }}">{{ $Query[0]->email }}</a></b></td> | |
118 | 120 | </tr> |
119 | 121 | <tr> |
120 | 122 | <td>Возраст:</td> |
resources/views/workers/docs.blade.php
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | <div class="cabinet__inputs"> |
40 | 40 | <input type="hidden" name="worker_id" id="worker_id" value="{{ $worker->id }}"/> |
41 | 41 | <div class="cabinet__inputs-item form-group"> |
42 | - <label class="form-group__label">Должность</label> | |
42 | + <label class="form-group__label">Должность*</label> | |
43 | 43 | <div class="form-group__item"> |
44 | 44 | <input type="text" name="job_title" id="job_title" class="input" value="{{ old('job_title') ?? $doc->job_title ?? '' }}"> |
45 | 45 | </div> |
... | ... | @@ -54,13 +54,13 @@ |
54 | 54 | </div> |
55 | 55 | </div>--> |
56 | 56 | <div class="cabinet__inputs-item form-group"> |
57 | - <label class="form-group__label">Название т/х</label> | |
57 | + <label class="form-group__label">Название т/х*</label> | |
58 | 58 | <div class="form-group__item"> |
59 | 59 | <input type="text" name="teplohod" id="teplohod" class="input" value="{{ old('teplohod') ?? $doc->teplohod ?? '' }}"> |
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | <div class="cabinet__inputs-item form-group"> |
63 | - <label class="form-group__label">Тип судна</label> | |
63 | + <label class="form-group__label">Тип судна*</label> | |
64 | 64 | <div class="form-group__item"> |
65 | 65 | <input type="text" name="GWT" id="GWT" class="input" value="{{ old('GWT') ?? $doc->GWT ?? '' }}"> |
66 | 66 | </div> |
... | ... | @@ -81,14 +81,14 @@ |
81 | 81 | </div> |
82 | 82 | |
83 | 83 | <div class="cabinet__inputs-item form-group"> |
84 | - <label class="form-group__label">Водоизмещение (GRT)</label> | |
84 | + <label class="form-group__label">Водоизмещение (GRT)*</label> | |
85 | 85 | <div class="form-group__item"> |
86 | 86 | <input type="text" name="GRT" id="GRT" class="input" value="{{ old('GRT') ?? $doc->GRT ?? '' }}"> |
87 | 87 | </div> |
88 | 88 | </div> |
89 | 89 | |
90 | 90 | <div class="cabinet__inputs-item form-group"> |
91 | - <label class="form-group__label">Название компании</label> | |
91 | + <label class="form-group__label">Название компании*</label> | |
92 | 92 | <div class="form-group__item"> |
93 | 93 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? $doc->name_company ?? '' }}"> |
94 | 94 | </div> |
resources/views/workers/prev_company_form.blade.php
... | ... | @@ -53,13 +53,13 @@ |
53 | 53 | @csrf |
54 | 54 | <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}"> |
55 | 55 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
56 | - <label class="form-group__label">Название компании</label> | |
56 | + <label class="form-group__label">Название компании*</label> | |
57 | 57 | <div class="form-group__item"> |
58 | 58 | <input type="text" name="name_company" id="name_company" class="input" value="{{ old('name_company') ?? '' }}"> |
59 | 59 | </div> |
60 | 60 | </div> |
61 | 61 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
62 | - <label class="form-group__label">ФИО сотрудника</label> | |
62 | + <label class="form-group__label">ФИО сотрудника*</label> | |
63 | 63 | <div class="form-group__item"> |
64 | 64 | <input type="text" name="direct" id="direct" class="input" value="{{ old('direct') ?? '' }}"> |
65 | 65 | </div> |