This commit is contained in:
zenggang
2021-07-14 09:32:48 +08:00
parent 73394d0435
commit 86a0e7d8bf
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -307,8 +307,18 @@ class stakeholder extends control
}
else
{
$stakeholder = $this->stakeholder->getByID($userID);
$this->stakeholder->delete(TABLE_STAKEHOLDER, $userID);
$this->loadModel('user')->updateUserView($this->session->project, 'project');
/* Update linked products view. */
if($stakeholder->objectType == 'project' and $stakeholder->objectID)
{
$products = $this->loadModel('product')->getProductPairsByProject($stakeholder->objectID);
if(!empty($products))
{
foreach($products as $productID => $productName) $this->user->updateUserView($productID, 'product',$stakeholder->user);
}
}
die(js::reload('parent'));
}
}
+1
View File
@@ -1697,6 +1697,7 @@ class userModel extends model
$stmt = $this->dao->select('objectID,user')->from(TABLE_STAKEHOLDER)
->where('objectType')->eq('project')
->andWhere('objectID')->in(array_keys($projectProducts))
->andWhere('deleted')->eq(0)
->query();
$stakeholderGroups = array();