diff --git a/module/programplan/lang/de.php b/module/programplan/lang/de.php index d0e0722278..819c19660d 100644 --- a/module/programplan/lang/de.php +++ b/module/programplan/lang/de.php @@ -26,6 +26,7 @@ $lang->programplan->emptyParent = 'N/A'; $lang->programplan->name = 'Stage Name'; $lang->programplan->status = 'Stage Progress'; $lang->programplan->PM = 'Stage Manager'; +$lang->programplan->PMAB = 'Owner'; $lang->programplan->acl = 'Access Control'; $lang->programplan->subStageName = 'Sub Stage Name'; $lang->programplan->percent = 'Workload Ratio'; @@ -50,6 +51,8 @@ $lang->programplan->openedDate = 'Created Date'; $lang->programplan->editedBy = 'Edited By'; $lang->programplan->editedDate = 'Edited Date'; $lang->programplan->duration = 'Duration'; +$lang->programplan->estimate = 'Man-hours'; +$lang->programplan->consumed = 'Consumed'; $lang->programplan->version = 'Version'; $lang->programplan->full = 'Full Screen'; $lang->programplan->today = 'Today'; @@ -85,4 +88,4 @@ $lang->programplan->error->createdTask = 'The task has been decomposed. Sub $lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.'; $lang->programplan->error->parentDuration = 'The planned start and planned completion of the child phase cannot exceed the parent phase.'; $lang->programplan->error->sameName = 'Stage name cannot be the same!'; -$lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; \ No newline at end of file +$lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; diff --git a/module/programplan/lang/en.php b/module/programplan/lang/en.php index 488e8ddd13..aac1c8c430 100644 --- a/module/programplan/lang/en.php +++ b/module/programplan/lang/en.php @@ -26,6 +26,7 @@ $lang->programplan->emptyParent = 'N/A'; $lang->programplan->name = 'Stage Name'; $lang->programplan->status = 'Stage Progress'; $lang->programplan->PM = 'Stage Manager'; +$lang->programplan->PMAB = 'Owner'; $lang->programplan->acl = 'Access Control'; $lang->programplan->subStageName = 'Sub Stage Name'; $lang->programplan->percent = 'Workload Ratio'; @@ -50,6 +51,8 @@ $lang->programplan->openedDate = 'Created Date'; $lang->programplan->editedBy = 'Edited By'; $lang->programplan->editedDate = 'Edited Date'; $lang->programplan->duration = 'Duration'; +$lang->programplan->estimate = 'Man-hours'; +$lang->programplan->consumed = 'Consumed'; $lang->programplan->version = 'Version'; $lang->programplan->full = 'Full Screen'; $lang->programplan->today = 'Today'; @@ -85,4 +88,4 @@ $lang->programplan->error->createdTask = 'The task is decomposed. Sub stages $lang->programplan->error->parentWorkload = 'The sum of the workload in the sub stage cannot be > that in the parent stage: %s.'; $lang->programplan->error->parentDuration = 'The planned start and planned completion of the child phase cannot exceed the parent phase.'; $lang->programplan->error->sameName = 'Stage name cannot be the same!'; -$lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; \ No newline at end of file +$lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; diff --git a/module/programplan/lang/fr.php b/module/programplan/lang/fr.php index d0e0722278..819c19660d 100644 --- a/module/programplan/lang/fr.php +++ b/module/programplan/lang/fr.php @@ -26,6 +26,7 @@ $lang->programplan->emptyParent = 'N/A'; $lang->programplan->name = 'Stage Name'; $lang->programplan->status = 'Stage Progress'; $lang->programplan->PM = 'Stage Manager'; +$lang->programplan->PMAB = 'Owner'; $lang->programplan->acl = 'Access Control'; $lang->programplan->subStageName = 'Sub Stage Name'; $lang->programplan->percent = 'Workload Ratio'; @@ -50,6 +51,8 @@ $lang->programplan->openedDate = 'Created Date'; $lang->programplan->editedBy = 'Edited By'; $lang->programplan->editedDate = 'Edited Date'; $lang->programplan->duration = 'Duration'; +$lang->programplan->estimate = 'Man-hours'; +$lang->programplan->consumed = 'Consumed'; $lang->programplan->version = 'Version'; $lang->programplan->full = 'Full Screen'; $lang->programplan->today = 'Today'; @@ -85,4 +88,4 @@ $lang->programplan->error->createdTask = 'The task has been decomposed. Sub $lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.'; $lang->programplan->error->parentDuration = 'The planned start and planned completion of the child phase cannot exceed the parent phase.'; $lang->programplan->error->sameName = 'Stage name cannot be the same!'; -$lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; \ No newline at end of file +$lang->programplan->error->taskDrag = 'The %s task cannot be dragged'; diff --git a/module/programplan/lang/zh-cn.php b/module/programplan/lang/zh-cn.php index f9c975c285..b92b54e7dd 100644 --- a/module/programplan/lang/zh-cn.php +++ b/module/programplan/lang/zh-cn.php @@ -26,6 +26,7 @@ $lang->programplan->emptyParent = '无'; $lang->programplan->name = '阶段名称'; $lang->programplan->status = '阶段进度'; $lang->programplan->PM = '阶段负责人'; +$lang->programplan->PMAB = '负责人'; $lang->programplan->acl = '访问控制'; $lang->programplan->subStageName = '子阶段名称'; $lang->programplan->percent = '工作量占比'; @@ -50,6 +51,8 @@ $lang->programplan->openedDate = '创建日期'; $lang->programplan->editedBy = '由谁编辑'; $lang->programplan->editedDate = '编辑日期'; $lang->programplan->duration = '工期'; +$lang->programplan->estimate = '工时'; +$lang->programplan->consumed = '消耗工时'; $lang->programplan->version = '版本号'; $lang->programplan->full = '全屏'; $lang->programplan->today = '今天'; diff --git a/module/programplan/model.php b/module/programplan/model.php index d24283b55f..4486924392 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -206,7 +206,7 @@ class programplanModel extends model if($data->start_date == '' or $data->endDate == '') $data->duration = 1; $datas['data'][$plan->id] = $data; - $stageIndex[$plan->id] = array('planID' => $plan->id, 'parent' => $plan->parent, 'progress' => array('totalConsumed' => 0, 'totalReal' => 0)); + $stageIndex[$plan->id] = array('planID' => $plan->id, 'parent' => $plan->parent, 'progress' => array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalReal' => 0)); } $taskSign = "[ T ] "; @@ -275,6 +275,8 @@ class programplanModel extends model $data->start_date = $start; $data->endDate = $end; $data->duration = 1; + $data->estimate = $task->estimate; + $data->consumed = $task->consumed; /* If multi task then show the teams. */ if($task->mode == 'multi' and !empty($taskTeams[$task->id])) @@ -294,12 +296,14 @@ class programplanModel extends model { if($stage['planID'] == $task->execution) { + $stageIndex[$index]['progress']['totalEstimate'] += $task->estimate; $stageIndex[$index]['progress']['totalConsumed'] += $task->consumed; $stageIndex[$index]['progress']['totalReal'] += ($task->left + $task->consumed); $parent = $stage['parent']; if(isset($stageIndex[$parent])) { + $stageIndex[$parent]['progress']['totalEstimate'] += $task->estimate; $stageIndex[$parent]['progress']['totalConsumed'] += $task->consumed; $stageIndex[$parent]['progress']['totalReal'] += ($task->left + $task->consumed); } @@ -315,6 +319,8 @@ class programplanModel extends model $progress = ($progress * 100) . '%'; $datas['data'][$index]->taskProgress = $progress; + $datas['data'][$index]->estimate = $stage['progress']['totalEstimate']; + $datas['data'][$index]->consumed = $stage['progress']['consumed']; } $datas['links'] = array(); @@ -466,6 +472,8 @@ class programplanModel extends model $data->start_date = $start; $data->endDate = $end; $data->duration = 1; + $data->estimate = $task->estimate; + $data->consumed = $task->consumed; if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1; @@ -481,11 +489,13 @@ class programplanModel extends model { $stageIndex[$groupKey]['totalConsumed'] += $task->consumed; $stageIndex[$groupKey]['totalReal'] += $task->left + $task->consumed; + $stageIndex[$groupKey]['totalEstimate'] += $task->estimate; } else { $stageIndex[$groupKey]['totalConsumed'] = $task->consumed; $stageIndex[$groupKey]['totalReal'] = $task->left + $task->consumed; + $stageIndex[$groupKey]['totalEstimate'] = $task->estimate; } } @@ -502,6 +512,8 @@ class programplanModel extends model $progress = ($progress * 100) . '%'; $datas['data'][$index]->taskProgress = $progress; + $datas['data'][$index]->estimate = $stage['totalEstimate']; + $datas['data'][$index]->consumed = $stage['totalConsumed']; } $datas['links'] = array(); diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index ec4db33513..b59f461898 100644 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -503,21 +503,25 @@ $(function() gantt.config.columns = [ {name: 'text', width: '*', tree: true, resize: true, width:200}, + {name: 'owner_id', align: 'center', resize: true, width: 80}, {name: 'status', align: 'center', resize: true, width: 80}, {name: 'start_date', align: 'center', resize: true, width: 80}, {name: 'end_date', align: 'center', resize: true, width: 80}, {name: 'duration', align: 'center', resize: true, width: 60}, + {name: 'estimate', align: 'center', resize: true, width: 60}, {name: 'percent', align: 'center', resize: true, width:70, template: function(plan) { if(plan.percent) return Math.round(plan.percent) + '%'; } }, {name: 'taskProgress', align: 'center', resize: true, width: 60}, - {name: 'realBegan', align: 'center', resize: true, width: 150}, - {name: 'realEnd', align: 'center', width: 150} + {name: 'realBegan', align: 'center', resize: true, width: 60}, + {name: 'realEnd', align: 'center', resize: true, width: 60}, + {name: 'consumed', align: 'center', resize: true, width: 60}, ]; gantt.locale.labels.column_text = ; + gantt.locale.labels.column_owner_id = "programplan->PMAB;?>"; gantt.locale.labels.column_status = "statusAB;?>"; gantt.locale.labels.column_percent = "programplan->percentAB;?>"; gantt.locale.labels.column_taskProgress = "programplan->taskProgress;?>"; @@ -526,6 +530,8 @@ $(function() gantt.locale.labels.column_realBegan = "programplan->realBegan;?>"; gantt.locale.labels.column_realEnd = "programplan->realEnd;?>"; gantt.locale.labels.column_duration = "programplan->duration;?>"; + gantt.locale.labels.column_estimate = "programplan->estimate;?>"; + gantt.locale.labels.column_consumed = "programplan->consumed;?>"; if((module == 'review' && method == 'assess') || dateDetails) gantt.config.show_chart = false;