* Code for muliple task.
This commit is contained in:
@@ -1338,7 +1338,7 @@ class task extends control
|
||||
{
|
||||
$teams = array_keys($task->team);
|
||||
|
||||
$task->nextBy = $this->task->getNextUser($teams, $this->app->user->account);
|
||||
$task->nextBy = $this->task->getAssignedTo4Multi($members, $task);
|
||||
$task->myConsumed = isset($task->team[$this->app->user->account]) ? $task->team[$this->app->user->account]->consumed : 0;
|
||||
|
||||
$lastAccount = end($teams);
|
||||
|
||||
@@ -1647,6 +1647,7 @@ class taskModel extends model
|
||||
$data = new stdclass();
|
||||
$data->consumed = $this->post->consumed;
|
||||
$data->left = $this->post->left;
|
||||
$data->status = 'doing';
|
||||
|
||||
$this->dao->update(TABLE_TASKTEAM)->data($data)
|
||||
->where('task')->eq($taskID)
|
||||
@@ -1919,7 +1920,10 @@ class taskModel extends model
|
||||
|
||||
if(!empty($oldTask->team))
|
||||
{
|
||||
$this->dao->update(TABLE_TASKTEAM)->set('left')->eq(0)->set('consumed')->eq($task->consumed)
|
||||
$this->dao->update(TABLE_TASKTEAM)
|
||||
->set('left')->eq(0)
|
||||
->set('consumed')->eq($task->consumed)
|
||||
->set('status')->eq('done')
|
||||
->where('task')->eq((int)$taskID)
|
||||
->andWhere('account')->eq($this->app->user->account)->exec();
|
||||
|
||||
|
||||
@@ -350,6 +350,7 @@
|
||||
<th class='text-center'><?php echo $lang->task->estimate?></th>
|
||||
<th class='text-center'><?php echo $lang->task->consumed?></th>
|
||||
<th class='text-center'><?php echo $lang->task->left?></th>
|
||||
<th class='text-center'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($task->team as $member):?>
|
||||
@@ -358,6 +359,7 @@
|
||||
<td><?php echo (float)$member->estimate?></td>
|
||||
<td><?php echo (float)$member->consumed?></td>
|
||||
<td><?php echo (float)$member->left?></td>
|
||||
<td class="status-<?php echo $member->status;?>"><?php echo zget($lang->task->statusList, $member->status);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
|
||||
@@ -1452,7 +1452,7 @@ class treeModel extends model
|
||||
$module = $this->getById((int)$moduleID);
|
||||
if(empty($module)) return array();
|
||||
|
||||
return $this->dao->select('id')->from(TABLE_MODULE)->where('path')->like($module->path . '%')->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
return $this->dao->select('id')->from(TABLE_MODULE)->where("CONCAT(',', path, ',')")->like("%,$module->path,%")->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user