* Rename function.
This commit is contained in:
@@ -26,7 +26,7 @@ class personnel extends control
|
||||
*/
|
||||
public function accessible($programID = 0, $deptID = 0, $browseType='browse', $param = 0, $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$this->setProgramNavMenu($programID);
|
||||
$this->setProgramMenu($programID);
|
||||
$this->app->loadLang('user');
|
||||
|
||||
$program = $this->loadModel('program')->getByID($programID);
|
||||
@@ -72,11 +72,11 @@ class personnel extends control
|
||||
*/
|
||||
public function invest($programID = 0)
|
||||
{
|
||||
$this->setProgramNavMenu($programID);
|
||||
$this->setProgramMenu($programID);
|
||||
|
||||
$this->view->title = $this->lang->personnel->invest;
|
||||
$this->view->position[] = $this->lang->personnel->invest;
|
||||
$this->view->inputPersonnel = $this->personnel->getInputPersonnel($programID);
|
||||
$this->view->title = $this->lang->personnel->invest;
|
||||
$this->view->position[] = $this->lang->personnel->invest;
|
||||
$this->view->invest = $this->personnel->getInvest($programID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class personnel extends control
|
||||
*/
|
||||
public function whitelist($objectID = 0, $module = 'personnel', $objectType = 'program', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $programID = 0, $from = '')
|
||||
{
|
||||
if($module == 'personnel') $this->setProgramNavMenu($objectID);
|
||||
if($module == 'personnel') $this->setProgramMenu($objectID);
|
||||
|
||||
if($module == 'product')
|
||||
{
|
||||
@@ -148,7 +148,7 @@ class personnel extends control
|
||||
*/
|
||||
public function addWhitelist($objectID = 0, $deptID = 0, $objectType = 'program', $module = 'personnel', $programID = 0, $from = '')
|
||||
{
|
||||
if($module == 'personnel') $this->setProgramNavMenu($objectID);
|
||||
if($module == 'personnel') $this->setProgramMenu($objectID);
|
||||
$this->app->loadLang('execution');
|
||||
|
||||
if($_POST)
|
||||
@@ -215,13 +215,13 @@ class personnel extends control
|
||||
}
|
||||
|
||||
/*
|
||||
* Setting up the program's navigation menu.
|
||||
* Setting up the program menu.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setProgramNavMenu($programID = 0)
|
||||
public function setProgramMenu($programID = 0)
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->lang->navGroup->program = 'program';
|
||||
|
||||
+22
-22
@@ -12,7 +12,7 @@
|
||||
class personnelModel extends model
|
||||
{
|
||||
/**
|
||||
* Access to program set input staff.
|
||||
* Access to program set invest staff.
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $deptID
|
||||
@@ -56,13 +56,13 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to program set input staff.
|
||||
* Get invest person list.
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getInputPersonnel($programID = 0)
|
||||
public function getInvest($programID = 0)
|
||||
{
|
||||
$personnelList = array();
|
||||
|
||||
@@ -79,14 +79,14 @@ class personnelModel extends model
|
||||
if(empty($accountPairs)) return $personnelList;
|
||||
|
||||
$executionPairs = $this->getInvolvedExecutions($projects);
|
||||
$taskInput = $this->getProjectTaskInput($projects, $accountPairs);
|
||||
$bugAndStoryInput = $this->getBugAndStoryInput($accountPairs, $programID);
|
||||
$taskInvest = $this->getProjectTaskInvest($projects, $accountPairs);
|
||||
$bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID);
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
$issueInput = $this->getIssueInput($accountPairs, $projects);
|
||||
$riskInput = $this->getRiskInput($accountPairs, $projects);
|
||||
$issueInvest = $this->getIssueInvest($accountPairs, $projects);
|
||||
$riskInvest = $this->getRiskInvest($accountPairs, $projects);
|
||||
}
|
||||
$userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account');
|
||||
$userPairs = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account');
|
||||
foreach($userPairs as $user) $user->role = zget($this->lang->user->roleList, $user->role, $user->role);
|
||||
|
||||
foreach($accountPairs as $account => $projects)
|
||||
@@ -97,12 +97,12 @@ class personnelModel extends model
|
||||
$personnelList[$account]['projects'] = $projects;
|
||||
$personnelList[$account]['executions'] = zget($executionPairs, $account, 0);
|
||||
|
||||
$personnelList[$account] += $taskInput[$account];
|
||||
$personnelList[$account] += $bugAndStoryInput[$account];
|
||||
$personnelList[$account] += $taskInvest[$account];
|
||||
$personnelList[$account] += $bugAndStoryInvest[$account];
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
$personnelList[$account] += $issueInput[$account];
|
||||
$personnelList[$account] += $riskInput[$account];
|
||||
$personnelList[$account] += $issueInvest[$account];
|
||||
$personnelList[$account] += $riskInvest[$account];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,14 +110,14 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user project risk input.
|
||||
* Get user project risk invest.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param object $projects
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getRiskInput($accounts, $projects)
|
||||
public function getRiskInvest($accounts, $projects)
|
||||
{
|
||||
$risks = $this->dao->select('id,createdBy,resolvedBy,status,assignedTo')->from(TABLE_RISK)
|
||||
->where('project')->in(array_keys($projects))
|
||||
@@ -144,14 +144,14 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user project issue input.
|
||||
* Get user project issue invest.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param object $projects
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getIssueInput($accounts, $projects)
|
||||
public function getIssueInvest($accounts, $projects)
|
||||
{
|
||||
$issues = $this->dao->select('id,createdBy,resolvedBy,status,assignedTo')->from(TABLE_ISSUE)
|
||||
->where('project')->in(array_keys($projects))
|
||||
@@ -178,14 +178,14 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user bug and story input.
|
||||
* Get user bug and story invest.
|
||||
*
|
||||
* @param array $accounts
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBugAndStoryInput($accounts, $programID)
|
||||
public function getBugAndStoryInvest($accounts, $programID)
|
||||
{
|
||||
$productPairs = $this->loadModel('product')->getPairs('', $programID);
|
||||
$productKeys = array_keys($productPairs);
|
||||
@@ -273,14 +273,14 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project task inputs.
|
||||
* Get project task invest.
|
||||
*
|
||||
* @param object $projects
|
||||
* @param array $accounts
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectTaskInput($projects, $accounts)
|
||||
public function getProjectTaskInvest($projects, $accounts)
|
||||
{
|
||||
$tasks = $this->dao->select('id,status,openedBy,finishedBy,assignedTo,project')->from(TABLE_TASK)
|
||||
->where('project')->in(array_keys($projects))
|
||||
@@ -409,7 +409,7 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to program set input staff.
|
||||
* Access to program set invest staff.
|
||||
*
|
||||
* @param int $objectID
|
||||
* @param string $objectType program|project|product|sprint
|
||||
|
||||
@@ -22,16 +22,16 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan='2' class="w-80px"> <?php echo $lang->personnel->name;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->role;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->projects;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->executions;?></th>
|
||||
<th colspan="2"> <?php echo $lang->personnel->workingHours;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->bug;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->role;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->projects;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->executions;?></th>
|
||||
<th colspan="2"><?php echo $lang->personnel->workingHours;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->bug;?></th>
|
||||
<th colspan="2" class="w-150px"><?php echo $lang->personnel->createStories;?></th>
|
||||
<?php if(isset($this->config->maxVersion)): ?>
|
||||
<th colspan="3"> <?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->risk;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->risk;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -56,7 +56,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sortable">
|
||||
<?php foreach($inputPersonnel as $personnel):?>
|
||||
<?php foreach($invest as $personnel):?>
|
||||
<tr>
|
||||
<td title='<?php echo $personnel['realname'];?>'><?php echo $personnel['realname'];?></td>
|
||||
<td title='<?php echo $personnel['role'];?>'><?php echo $personnel['role'];?></td>
|
||||
|
||||
Reference in New Issue
Block a user