diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index 7867b80..babb6ed 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -48,6 +48,7 @@ class CompanyController extends Controller } else { $user_id = 0; } + $company = Employer::with('ads')->with('flots')->with('users') ->where('id', '=', $company->id)->get(); diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 55e8bd3..90ad08b 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -264,7 +264,7 @@ class EmployerController extends Controller //$jobs['job_title_id'] = $params['job_title_id']; //$titles['position_id'] = $params['position_id']; //unset($params['job_title_id']); - + //dd($params); $ad_employer->update($params); $ad_employer->jobs()->sync($request->get('job_title_id')); diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 2ed65ba..a147692 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -153,7 +153,7 @@ class MainController extends Controller public function vacancies(Request $request) { //должности $Job_title = Job_title::query()->where('is_remove', '=', '0')-> - where('is_bd', '=', '0')->orderBy('name')->get(); + where('is_bd', '=', '0')->orderByDesc('sort')->orderBy('name')->get(); $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') @@ -241,7 +241,6 @@ class MainController extends Controller $Query = Ad_employer::with('jobs')-> with('cat')-> with('employer')-> - whereHas('jobs_code', function ($query) use ($job_search) { if (!empty($job_search)) { $query->where('job_title_id', $job_search); diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index d9194d7..927a21b 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -172,6 +172,8 @@ class WorkerController extends Controller $get_date = date('Y.m'); + $infoblocks = infobloks::query()->get(); + $c = Static_worker::query()->where('year_month', '=', $get_date) ->where('user_id', '=', $worker->user_id) ->get(); @@ -187,11 +189,12 @@ class WorkerController extends Controller $crt->user_id = $worker->user_id; $status = $crt->save(); } + $stat = Static_worker::query()->where('year_month', '=', $get_date) ->where('user_id', '=', $worker->user_id) ->get(); - return view('worker', compact('Query', 'status_work', 'idiot', 'stat')); + return view('worker', compact('Query', 'infoblocks', 'status_work', 'idiot', 'stat')); } // скачать анкету соискателя diff --git a/app/Http/Requests/VacancyRequestEdit.php b/app/Http/Requests/VacancyRequestEdit.php index 6cb4e21..605ecf4 100644 --- a/app/Http/Requests/VacancyRequestEdit.php +++ b/app/Http/Requests/VacancyRequestEdit.php @@ -26,7 +26,7 @@ class VacancyRequestEdit extends FormRequest 'max:255', ], - 'category_id' => [ + /* 'category_id' => [ 'numeric', 'min:0', 'max:9999999', @@ -63,9 +63,9 @@ class VacancyRequestEdit extends FormRequest 'city' => [ 'min:3', 'max:255', - ], + ],*/ - 'job_title_id' => [ + 'job_title_id[]' => [ 'numeric', 'min:1', 'max:9999999' @@ -78,7 +78,7 @@ class VacancyRequestEdit extends FormRequest 'min:3', 'max:255', ], - + /* 'category_id' => [ 'numeric', 'min:0', @@ -93,7 +93,8 @@ class VacancyRequestEdit extends FormRequest 'email' => [ 'min:3', 'max:255', - ],]; + ],*/ + ]; } public function messages() { diff --git a/resources/views/employers/edit_vacancy.blade.php b/resources/views/employers/edit_vacancy.blade.php index 4a4a228..1f61dff 100644 --- a/resources/views/employers/edit_vacancy.blade.php +++ b/resources/views/employers/edit_vacancy.blade.php @@ -49,7 +49,7 @@ -