| xqd
@@ -36,9 +36,9 @@ class ProjectController extends BaseController
|
|
|
|
|
|
public function index()
|
|
|
{
|
|
|
- $user = ProjectUser::getProjectManagerUser();
|
|
|
+ $manager_user_id = ProjectUser::getProjectManagerUser();
|
|
|
list($model, $model_name, $pre_uri) = array($this->model, $this->model_name, $this->pre_uri);
|
|
|
- return view($this->view_path . 'index', compact('model', 'model_name','pre_uri','user'));
|
|
|
+ return view($this->view_path . 'index', compact('model', 'model_name','pre_uri','manager_user_id'));
|
|
|
}
|
|
|
|
|
|
public function applyIndex()
|
| xqd
@@ -73,15 +73,15 @@ class ProjectController extends BaseController
|
|
|
if($request->input('type') == 'apply') {
|
|
|
$items = $items->whereNotNull('user_id');
|
|
|
}
|
|
|
- $user_id = request('user_id');
|
|
|
- if(empty($user_id)){
|
|
|
- $user_id = 0;
|
|
|
+ $manager_user_id = request('manager_user_id');
|
|
|
+ if(empty($manager_user_id)){
|
|
|
+ $manager_user_id = 0;
|
|
|
}
|
|
|
- if($user_id){
|
|
|
+ if($manager_user_id){
|
|
|
$items->whereHas('project_user',function ($query){
|
|
|
$query->where('project_role_id','=','4');
|
|
|
$query->whereHas('user',function ($query){
|
|
|
- $query->where('id','=',request('user_id'));
|
|
|
+ $query->where('id','=',request('manager_user_id'));
|
|
|
});
|
|
|
});
|
|
|
}
|