* Adjust the code.

This commit is contained in:
hufangzhou
2021-01-03 15:46:13 +08:00
parent d58b81a0c2
commit 72666ee3c6
9 changed files with 17 additions and 9 deletions
+1
View File
@@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept';
$lang->my->noTodo = 'Keine toDos. ';
$lang->my->noData = 'No %s yet. ';
$lang->my->storyChanged = "Story Changed";
$lang->my->hours = 'Stunde/Tag';
$lang->my->myExecutions = 'My Stage/Sprint/Iteration';
$lang->my->name = 'Name';
+1
View File
@@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept';
$lang->my->noTodo = 'No todos yet. ';
$lang->my->noData = 'No %s yet. ';
$lang->my->storyChanged = "Story Changed";
$lang->my->hours = "Hours/day";
$lang->my->myExecutions = "My Stage/Sprint/Iteration";
$lang->my->name = 'Name';
+1
View File
@@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept';
$lang->my->noTodo = "Je n'ai rien à faire pour l'instant.";
$lang->my->noData = 'No %s yet. ';
$lang->my->storyChanged = "Story Changed";
$lang->my->hours = 'Heure/jour';
$lang->my->myExecutions = 'My Stage/Sprint/Iteration';
$lang->my->name = 'Name';
+1
View File
@@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept';
$lang->my->noTodo = 'Chưa có việc nào.';
$lang->my->noData = 'No %s yet. ';
$lang->my->storyChanged = "Story Changed";
$lang->my->hours = "Giờ/ngày";
$lang->my->myExecutions = "My Stage/Sprint/Iteration";
$lang->my->name = 'Name';
+1
View File
@@ -33,6 +33,7 @@ $lang->my->scoreRule = '积分规则';
$lang->my->noTodo = '暂时没有待办。';
$lang->my->noData = "暂时没有%s。";
$lang->my->storyChanged = "需求变更";
$lang->my->hours = '工时/天';
$lang->my->myExecutions = "我参与的阶段/冲刺/迭代";
$lang->my->name = '名称';
+1
View File
@@ -33,6 +33,7 @@ $lang->my->scoreRule = '積分規則';
$lang->my->noTodo = '暫時沒有待辦。';
$lang->my->noData = "暫時沒有%s。";
$lang->my->storyChanged = "需求變更";
$lang->my->hours = '工時/天';
$lang->my->myExecutions = "我參與的階段/衝刺/迭代";
$lang->my->name = '名稱';
+3 -3
View File
@@ -40,8 +40,8 @@
<th class='c-status'><?php echo $lang->statusAB;?></th>
<th class='c-user'><?php echo $lang->team->role;?></th>
<th class='c-date'><?php echo $lang->team->join;?></th>
<th class='w-110px'><?php echo $lang->team->hours;?></th>
<th class='w-60px'><?php echo $lang->project->waitTasks;?></th>
<th class='w-110px'><?php echo $lang->my->hours;?></th>
<th class='w-60px'><?php echo $lang->project->assignedToMe;?></th>
<th class='c-progress'><?php echo $lang->project->progress;?></th>
</tr>
</thead>
@@ -70,7 +70,7 @@
<td><?php echo $execution->role;?></td>
<td><?php echo $execution->join;?></td>
<td><?php echo $execution->hours;?></td>
<td><?php echo $execution->waitTasks;?></td>
<td><?php echo $execution->assignedToMeTasks;?></td>
<td><?php echo "<span class='pie-icon' data-percent='{$execution->progress}' data-border-color='#ddd' data-back-color='#f1f1f1'></span> {$execution->progress}%";?></td>
</tr>
<?php endforeach;?>
+2 -2
View File
@@ -107,7 +107,7 @@ $config->story->datatable->fieldList['stage']['required'] = 'no';
$config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->story->datatable->fieldList['openedBy']['fixed'] = 'no';
$config->story->datatable->fieldList['openedBy']['width'] = '90';
$config->story->datatable->fieldList['openedBy']['width'] = '70';
$config->story->datatable->fieldList['openedBy']['required'] = 'no';
$config->story->datatable->fieldList['openedDate']['title'] = 'openedDate';
@@ -117,7 +117,7 @@ $config->story->datatable->fieldList['openedDate']['required'] = 'no';
$config->story->datatable->fieldList['assignedTo']['title'] = 'assignedToAB';
$config->story->datatable->fieldList['assignedTo']['fixed'] = 'no';
$config->story->datatable->fieldList['assignedTo']['width'] = '120';
$config->story->datatable->fieldList['assignedTo']['width'] = '100';
$config->story->datatable->fieldList['assignedTo']['required'] = 'no';
$config->story->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
+6 -4
View File
@@ -1005,9 +1005,9 @@ class userModel extends model
/* Get all tasks and compute totalConsumed, totalLeft, totalWait, progress according to them. */
$hours = array();
$emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0);
$emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0, 'assignedToMeTasks' => 0);
$searchField = $type == 'project' ? 'PRJ' : 'project';
$tasks = $this->dao->select('id, PRJ, project, consumed, `left`, status')
$tasks = $this->dao->select('id, PRJ, project, consumed, `left`, status, assignedTo')
->from(TABLE_TASK)
->where('parent')->lt(1)
->andWhere($searchField)->in($projectIdList)->fi()
@@ -1023,6 +1023,7 @@ class userModel extends model
if($task->status == 'wait') $hour->waitTasks += 1;
if($task->status != 'cancel') $hour->totalConsumed += $task->consumed;
if($task->status != 'cancel' and $task->status != 'closed') $hour->totalLeft += $task->left;
if($task->assignedTo == $account) $hour->assignedToMeTasks += 1;
}
$hours[$projectID] = $hour;
}
@@ -1052,8 +1053,9 @@ class userModel extends model
}
/* Process the hours. */
$project->progress = isset($hours[$project->id]) ? $hours[$project->id]->progress : 0;
$project->waitTasks = isset($hours[$project->id]) ? $hours[$project->id]->waitTasks : 0;
$project->progress = isset($hours[$project->id]) ? $hours[$project->id]->progress : 0;
$project->waitTasks = isset($hours[$project->id]) ? $hours[$project->id]->waitTasks : 0;
$project->assignedToMeTasks = isset($hours[$project->id]) ? $hours[$project->id]->assignedToMeTasks : 0;
if($project->project) $project->projectName = $projectList[$project->project]->name;
$myProjects[$project->id] = $project;