Commit 644a3847a824bd40267eb6c41f8653a8f930c589

Authored by Андрей Ларионов
1 parent 13522b2d9c
Exists in master

Обновление по должностям 3

Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff

app/Http/Controllers/Admin/UsersController.php
... ... @@ -67,7 +67,7 @@ class UsersController extends Controller
67 67 }
68 68  
69 69 public function add_bd() {
70   - $list_job_titles = Job_title::query()->active()->bdif()->orderBy('name', 'asc')->get();
  70 + $list_job_titles = Job_title::query()->active()->where('is_bd', '=' , '2')->orderBy('name', 'asc')->get();
71 71 return view('admin.users.add', compact('list_job_titles'));
72 72 }
73 73  
... ... @@ -94,7 +94,7 @@ class UsersController extends Controller
94 94 }
95 95  
96 96 public function edit_bd(User $user) {
97   - $list_job_titles = Job_title::query()->active()->bdif()->orderBy('name', 'asc')->get();
  97 + $list_job_titles = Job_title::query()->active()->where('is_bd', '=' , '2')->orderBy('name', 'asc')->get();
98 98 return view('admin.users.edit', compact('user', 'list_job_titles'));
99 99 }
100 100  
app/Providers/MyServiceProvider.php
... ... @@ -116,7 +116,7 @@ class MyServiceProvider extends ServiceProvider
116 116 $view_job_title = ['modals.register'];
117 117 View::composer($view_job_title,
118 118 function($view_job_title) {
119   - $Job_titles = Job_title::query()->where('is_remove', '=', '0')->get();
  119 + $Job_titles = Job_title::query()->where('is_remove', '=', '0')->where('is_bd', '=' , '0')->get();
120 120 $view_job_title->with(['Job_titles' => $Job_titles]);
121 121 }
122 122 );