Commit 9580525f512264699d4bf52d5b3be5de3311ec5d
1 parent
612fa61037
Exists in
master
Комиит по кабинету
Showing 3 changed files with 52 additions and 76 deletions Side-by-side Diff
app/Http/Controllers/EmployerController.php
... | ... | @@ -190,7 +190,7 @@ class EmployerController extends Controller |
190 | 190 | //$params_job["sytki"] = $params_emp['sytki']; |
191 | 191 | //$params_job["start"] = $params_emp['start']; |
192 | 192 | //$params_job["flot"] = $params_emp['flot']; |
193 | - $params_job["description"] = $params_emp['description']; | |
193 | + //$params_job["description"] = $params_emp['description']; | |
194 | 194 | |
195 | 195 | $ad_jobs = Ad_employer::create($params_emp); |
196 | 196 | //$params_job['ad_employer_id'] = $ad_jobs->id; |
... | ... | @@ -234,11 +234,12 @@ class EmployerController extends Controller |
234 | 234 | $id = Auth()->user()->id; |
235 | 235 | |
236 | 236 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); |
237 | - if ($Positions->count()) { | |
238 | - $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); | |
239 | - } else { | |
240 | - $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); | |
241 | - } | |
237 | + //if ($Positions->count()) { | |
238 | + // $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); | |
239 | + //} else { | |
240 | + // $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); | |
241 | + //} | |
242 | + $jobs = Job_title::query()->OrderBy('name')->where('is_remove', 0)->get(); | |
242 | 243 | |
243 | 244 | |
244 | 245 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
resources/views/employers/add_vacancy.blade.php
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | </div> |
76 | 76 | </div> |
77 | 77 | |
78 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
78 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
79 | 79 | <label class="form-group__label">Телефон</label> |
80 | 80 | <div class="form-group__item"> |
81 | 81 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" placeholder="Свой телефон"> |
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | </div> |
88 | 88 | </div> |
89 | 89 | |
90 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
90 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
91 | 91 | <label class="form-group__label">Емайл</label> |
92 | 92 | <div class="form-group__item"> |
93 | 93 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" placeholder="Своя почту"> |
... | ... | @@ -310,17 +310,17 @@ |
310 | 310 | </div> |
311 | 311 | </div>--> |
312 | 312 | |
313 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
313 | + <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
314 | 314 | <label class="form-group__label">Дополнительная информация</label> |
315 | 315 | <div class="form-group__item"> |
316 | - <textarea class="textarea" name="description" id="description">{{ old('description') ?? '' }}</textarea> | |
317 | - @error('description') | |
316 | + <textarea class="textarea" name="description" id="description"> old('description') ?? '' }}</textarea> | |
317 | + error('description') | |
318 | 318 | <span class="text-xs text-red-600"> |
319 | - {{ $message }} | |
319 | + $message }} | |
320 | 320 | </span> |
321 | - @enderror | |
321 | + enderror | |
322 | 322 | </div> |
323 | - </div> | |
323 | + </div>--> | |
324 | 324 | |
325 | 325 | </div> |
326 | 326 | <button type="submit" class="button cabinet__submit">Опубликовать</button> |
resources/views/employers/edit_vacancy.blade.php
... | ... | @@ -70,53 +70,11 @@ |
70 | 70 | <span class="text-xs text-red-600 dark:text-red-400"> |
71 | 71 | {{ $message }} |
72 | 72 | </span> |
73 | -<<<<<<< HEAD | |
74 | - @enderror | |
75 | - </div> | |
76 | - </div> | |
77 | - | |
78 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
79 | - <label class="form-group__label">Позиция на корабле</label> | |
80 | - <div class="form-group__item"> | |
81 | - <div class="select"> | |
82 | - <select class="js-select2" name="position_id" id="position_id"> | |
83 | - @foreach ($Positions as $it) | |
84 | - <option value="{{ $it->id }}">{{ $it->name }}</option> | |
85 | - @endforeach | |
86 | - </select> | |
87 | - @error('postion_id') | |
88 | - <span class="text-xs text-red-600 dark:text-red-400"> | |
89 | - {{ $message }} | |
90 | - </span> | |
91 | - @enderror | |
92 | - </div> | |
93 | - </div> | |
94 | - </div> | |
95 | - | |
96 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
97 | - <label class="form-group__label">Должность соискателя</label> | |
98 | - <div class="form-group__item"> | |
99 | - <div class="select"> | |
100 | - <select class="js-select2" name="job_title_id" id="job_title_id"> | |
101 | - <option value="0"> Выберите должность из списка</option> | |
102 | - | |
103 | - @if ($jobs->count()) | |
104 | - @foreach($jobs as $j) | |
105 | - <option value="{{ $j->id }}" @if ($j->id == $ad_employer->id) selected @endif>{{ $j->name }}</option> | |
106 | - @endforeach | |
107 | - @endif | |
108 | - </select> | |
109 | - @error('job_title_id') | |
110 | - <span class="text-xs text-red-600"> | |
111 | - {{ $message }} | |
112 | - </span> | |
113 | -======= | |
114 | ->>>>>>> 9f5b1d0112e53e85197df30673ccf1f2f4923df1 | |
115 | 73 | @enderror |
116 | 74 | </div> |
117 | 75 | </div> |
118 | 76 | |
119 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
77 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
120 | 78 | <label class="form-group__label">Телефон</label> |
121 | 79 | <div class="form-group__item"> |
122 | 80 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $ad_employer->telephone ?? '' }}" placeholder="Свой телефон"> |
... | ... | @@ -128,7 +86,7 @@ |
128 | 86 | </div> |
129 | 87 | </div> |
130 | 88 | |
131 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
89 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
132 | 90 | <label class="form-group__label">Емайл</label> |
133 | 91 | <div class="form-group__item"> |
134 | 92 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $ad_employer->email ?? '' }}" placeholder="Своя почту"> |
... | ... | @@ -140,7 +98,7 @@ |
140 | 98 | </div> |
141 | 99 | </div> |
142 | 100 | |
143 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
101 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style="display:none"> | |
144 | 102 | <label class="form-group__label">Зарплата среднестатистическая для вакансии</label> |
145 | 103 | <div class="form-group__item"> |
146 | 104 | <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? $ad_employer->salary ??'' }}" placeholder="Среднестатистическая зарплата"> |
... | ... | @@ -163,32 +121,30 @@ |
163 | 121 | @enderror |
164 | 122 | </div> |
165 | 123 | </div> |
166 | - | |
167 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
124 | + <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style=""> | |
168 | 125 | <label class="form-group__label">Категория (локация)</label> |
169 | 126 | <div class="form-group__item"> |
170 | 127 | <div class="select"> |
171 | 128 | <select class="js-select2" name="category_id" id="category_id"> |
172 | - @php $i = 1 @endphp | |
173 | - @if ($Positions->count()) | |
174 | - @foreach($Positions as $j) | |
175 | - @if ($i == 1) <option> Выберите категорию из списка</option> | |
176 | - @else | |
177 | - <option value="{{ $j->id }}" @if ($ad_employer->category_id == $j->id) selected @endif>{{ $j->name }}</option> | |
178 | - @endif | |
179 | - @php $i++ @endphp | |
180 | - @endforeach | |
181 | - @endif | |
129 | + php $i = 1 endphp | |
130 | + if ($Positions->count()) | |
131 | + foreach($Positions as $j) | |
132 | + if ($i == 1) <option> Выберите категорию из списка</option> | |
133 | + else | |
134 | + <option value=" $j->id }}" if ($ad_employer->category_id == $j->id) selected endif>$j->name }}</option> | |
135 | + endif | |
136 | + php $i++ endphp | |
137 | + endforeach | |
138 | + endif | |
182 | 139 | </select> |
183 | - @error('category_id') | |
140 | + error('category_id') | |
184 | 141 | <span class="text-xs text-red-600 dark:text-red-400"> |
185 | - {{ $message }} | |
142 | + $message }} | |
186 | 143 | </span> |
187 | - @enderror | |
144 | + enderror | |
188 | 145 | </div> |
189 | 146 | </div> |
190 | - </div> | |
191 | - | |
147 | + </div>--> | |
192 | 148 | |
193 | 149 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
194 | 150 | <label class="form-group__label">Описание вакансии</label> |
... | ... | @@ -201,6 +157,25 @@ |
201 | 157 | @enderror |
202 | 158 | </div> |
203 | 159 | </div> |
160 | + | |
161 | + <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
162 | + <h4 class="form-group__label">Редактирование должностей</h4> | |
163 | + <div class="form-group__item"> | |
164 | + <a href="{{ route('employer.add_job_in_vac', ['ad_employer' => $ad_employer->id]) }}" class="button">Добавить</a> | |
165 | + | |
166 | + @if ($ad_employer->jobs->count()) | |
167 | + @foreach ($ad_employer->jobs as $key => $it_um) | |
168 | + <p>@if (isset($ad_employer->jobs_code[$key])) | |
169 | + <a href="{{ route('employer.edit_job_in_vac', ['ad_job' => $ad_employer->jobs_code[$key]->id, 'ad_employer' => $ad_employer->id, 'job_title_id' => $it_um->id]) }}" style="text-decoration: underline">{{$it_um->name}}</a> | |
170 | + <a href="{{ route('employer.delete_job_in_vac', ['ad_job' => $ad_employer->jobs_code[$key]->id]) }}" style="text-decoration: underline">(Del)</a> | |
171 | + @endif | |
172 | + </p> | |
173 | + @endforeach | |
174 | + @else | |
175 | + Нет связанных <br> с вакансией должностей | |
176 | + @endif | |
177 | + </div> | |
178 | + </div> | |
204 | 179 | </div> |
205 | 180 | |
206 | 181 | <a class="button cabinet__submit" href="{{ route('employer.vacancy_list') }}">Назад</a> |