Commit 5104f48b211cbebdc5eef9ef60330c3e49f9639e
1 parent
468369903b
Exists in
master
and in
1 other branch
Изменение структуры вакансий
Showing 3 changed files with 52 additions and 34 deletions Side-by-side Diff
app/Http/Controllers/EmployerController.php
... | ... | @@ -188,7 +188,7 @@ class EmployerController extends Controller |
188 | 188 | //$params_job["sytki"] = $params_emp['sytki']; |
189 | 189 | //$params_job["start"] = $params_emp['start']; |
190 | 190 | //$params_job["flot"] = $params_emp['flot']; |
191 | - $params_job["description"] = $params_emp['description']; | |
191 | + //$params_job["description"] = $params_emp['description']; | |
192 | 192 | |
193 | 193 | $ad_jobs = Ad_employer::create($params_emp); |
194 | 194 | //$params_job['ad_employer_id'] = $ad_jobs->id; |
... | ... | @@ -232,11 +232,12 @@ class EmployerController extends Controller |
232 | 232 | $id = Auth()->user()->id; |
233 | 233 | |
234 | 234 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); |
235 | - if ($Positions->count()) { | |
236 | - $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); | |
237 | - } else { | |
238 | - $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); | |
239 | - } | |
235 | + //if ($Positions->count()) { | |
236 | + // $jobs = Job_title::query()->OrderBy('name')->where('position_id', $Positions[0]->id)->get(); | |
237 | + //} else { | |
238 | + // $jobs = Job_title::query()->OrderBy('name')->where('position_id', 0)->get(); | |
239 | + //} | |
240 | + $jobs = Job_title::query()->OrderBy('name')->where('is_remove', 0)->get(); | |
240 | 241 | |
241 | 242 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
242 | 243 | where('user_id', $id)->first(); |
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
... | ... | @@ -74,7 +74,7 @@ |
74 | 74 | </div> |
75 | 75 | </div> |
76 | 76 | |
77 | - <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"> | |
78 | 78 | <label class="form-group__label">Телефон</label> |
79 | 79 | <div class="form-group__item"> |
80 | 80 | <input type="text" class="input" name="telephone" id="telephone" value="{{ old('telephone') ?? $ad_employer->telephone ?? '' }}" placeholder="Свой телефон"> |
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | </div> |
87 | 87 | </div> |
88 | 88 | |
89 | - <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"> | |
90 | 90 | <label class="form-group__label">Емайл</label> |
91 | 91 | <div class="form-group__item"> |
92 | 92 | <input type="text" class="input" name="email" id="email" value="{{ old('email') ?? $ad_employer->email ?? '' }}" placeholder="Своя почту"> |
... | ... | @@ -98,7 +98,7 @@ |
98 | 98 | </div> |
99 | 99 | </div> |
100 | 100 | |
101 | - <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"> | |
102 | 102 | <label class="form-group__label">Зарплата среднестатистическая для вакансии</label> |
103 | 103 | <div class="form-group__item"> |
104 | 104 | <input type="text" class="input" name="salary" id="salary" value="{{ old('salary') ?? $ad_employer->salary ??'' }}" placeholder="Среднестатистическая зарплата"> |
... | ... | @@ -121,32 +121,30 @@ |
121 | 121 | @enderror |
122 | 122 | </div> |
123 | 123 | </div> |
124 | - | |
125 | - <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | |
124 | + <!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group" style=""> | |
126 | 125 | <label class="form-group__label">Категория (локация)</label> |
127 | 126 | <div class="form-group__item"> |
128 | 127 | <div class="select"> |
129 | 128 | <select class="js-select2" name="category_id" id="category_id"> |
130 | - @php $i = 1 @endphp | |
131 | - @if ($Positions->count()) | |
132 | - @foreach($Positions as $j) | |
133 | - @if ($i == 1) <option> Выберите категорию из списка</option> | |
134 | - @else | |
135 | - <option value="{{ $j->id }}" @if ($ad_employer->category_id == $j->id) selected @endif>{{ $j->name }}</option> | |
136 | - @endif | |
137 | - @php $i++ @endphp | |
138 | - @endforeach | |
139 | - @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 | |
140 | 139 | </select> |
141 | - @error('category_id') | |
140 | + error('category_id') | |
142 | 141 | <span class="text-xs text-red-600 dark:text-red-400"> |
143 | - {{ $message }} | |
142 | + $message }} | |
144 | 143 | </span> |
145 | - @enderror | |
144 | + enderror | |
146 | 145 | </div> |
147 | 146 | </div> |
148 | - </div> | |
149 | - | |
147 | + </div>--> | |
150 | 148 | |
151 | 149 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
152 | 150 | <label class="form-group__label">Описание вакансии</label> |
... | ... | @@ -159,6 +157,25 @@ |
159 | 157 | @enderror |
160 | 158 | </div> |
161 | 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> | |
162 | 179 | </div> |
163 | 180 | |
164 | 181 | <a class="button cabinet__submit" href="{{ route('employer.vacancy_list') }}">Назад</a> |