user card search fix 3
This commit is contained in:
parent
48463110bd
commit
c5850bda46
@ -52,8 +52,9 @@ class UserCardSearch extends UserCard
|
||||
} else {
|
||||
$manager = Manager::findOne(Yii::$app->user->id);
|
||||
if (!$manager){
|
||||
return false;
|
||||
$query = UserCard::find()->where(['id' => 0]);
|
||||
}
|
||||
else {
|
||||
$employeeIdList = ManagerEmployee::find()
|
||||
->where(['manager_id' => $manager->id])
|
||||
->select('employee_id')
|
||||
@ -61,6 +62,7 @@ class UserCardSearch extends UserCard
|
||||
|
||||
$query = UserCard::find()->where(['in', 'user_card.id', $employeeIdList]);
|
||||
}
|
||||
}
|
||||
|
||||
$query->distinct()
|
||||
->leftJoin('card_skill', 'card_skill.card_id=user_card.id')
|
||||
|
Loading…
Reference in New Issue
Block a user