* code for task #63802.
This commit is contained in:
@@ -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';
|
||||
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
|
||||
|
||||
@@ -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';
|
||||
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
|
||||
|
||||
@@ -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';
|
||||
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
|
||||
|
||||
@@ -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 = '今天';
|
||||
|
||||
@@ -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 = "<span class='task-label'>[ T ] </span>";
|
||||
@@ -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();
|
||||
|
||||
@@ -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 = <?php echo json_encode($typeHtml);?>;
|
||||
gantt.locale.labels.column_owner_id = "<?php echo $lang->programplan->PMAB;?>";
|
||||
gantt.locale.labels.column_status = "<?php echo $lang->statusAB;?>";
|
||||
gantt.locale.labels.column_percent = "<?php echo $lang->programplan->percentAB;?>";
|
||||
gantt.locale.labels.column_taskProgress = "<?php echo $lang->programplan->taskProgress;?>";
|
||||
@@ -526,6 +530,8 @@ $(function()
|
||||
gantt.locale.labels.column_realBegan = "<?php echo $lang->programplan->realBegan;?>";
|
||||
gantt.locale.labels.column_realEnd = "<?php echo $lang->programplan->realEnd;?>";
|
||||
gantt.locale.labels.column_duration = "<?php echo $lang->programplan->duration;?>";
|
||||
gantt.locale.labels.column_estimate = "<?php echo $lang->programplan->estimate;?>";
|
||||
gantt.locale.labels.column_consumed = "<?php echo $lang->programplan->consumed;?>";
|
||||
|
||||
if((module == 'review' && method == 'assess') || dateDetails) gantt.config.show_chart = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user