* Finish task #8988.

This commit is contained in:
holan20180123
2021-01-15 14:17:46 +08:00
parent 6da84d9cf1
commit 907dfc23d7
8 changed files with 14 additions and 15 deletions
+1
View File
@@ -54,6 +54,7 @@ $lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
$lang->programplan->workloadTips = 'The subphase workload ratio is split at a percentage of 100 percent';
$lang->programplan->stageCustom = new stdClass();
$lang->programplan->stageCustom->date = 'Show Date';
+1
View File
@@ -54,6 +54,7 @@ $lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
$lang->programplan->workloadTips = 'The subphase workload ratio is split at a percentage of 100 percent';
$lang->programplan->stageCustom = new stdClass();
$lang->programplan->stageCustom->date = 'Show Date';
+1
View File
@@ -54,6 +54,7 @@ $lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
$lang->programplan->workloadTips = 'The subphase workload ratio is split at a percentage of 100 percent';
$lang->programplan->stageCustom = new stdClass();
$lang->programplan->stageCustom->date = 'Show Date';
+1
View File
@@ -54,6 +54,7 @@ $lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
$lang->programplan->workloadTips = 'The subphase workload ratio is split at a percentage of 100 percent';
$lang->programplan->stageCustom = new stdClass();
$lang->programplan->stageCustom->date = 'Show Date';
+1
View File
@@ -54,6 +54,7 @@ $lang->programplan->noData = '暂无数据。';
$lang->programplan->children = '二级计划';
$lang->programplan->childrenAB = '子';
$lang->programplan->confirmDelete = '确定要删除当前计划吗?';
$lang->programplan->workloadTips = '子阶段工作量占比按百分百的比例进行拆分';
$lang->programplan->stageCustom = new stdClass();
$lang->programplan->stageCustom->date = '显示日期';
+1
View File
@@ -54,6 +54,7 @@ $lang->programplan->noData = '暫無數據。';
$lang->programplan->children = '二級計劃';
$lang->programplan->childrenAB = '子';
$lang->programplan->confirmDelete = '確定要刪除當前計劃嗎?';
$lang->programplan->workloadTips = '子階段工作量佔比按百分百的比例進行拆分';
$lang->programplan->stageCustom = new stdClass();
$lang->programplan->stageCustom->date = '顯示日期';
-14
View File
@@ -461,13 +461,6 @@ class programplanModel extends model
if($plan->milestone) $milestone = 1;
}
/* The sum of the workload of the child phases cannot be greater than that of the parent phase. */
if($parentID && $totalPercent > $parentPercent)
{
dao::$errors['message'][] = sprintf($this->lang->programplan->error->parentWorkload, $parentPercent . '%');
return false;
}
if($totalPercent > 100) return dao::$errors['message'][] = $this->lang->programplan->error->percentOver;
$this->loadModel('action');
@@ -652,13 +645,6 @@ class programplanModel extends model
$childrenTotalPercent = $this->getTotalPercent($parentStage, true);
$childrenTotalPercent = $plan->parent == $oldPlan->parent ? ($childrenTotalPercent - $oldPlan->percent + $plan->percent) : ($childrenTotalPercent + $plan->percent);
/* The sum of the workload of the child phases cannot be greater than that of the parent phase. */
if($childrenTotalPercent > $parentPercent)
{
dao::$errors['message'][] = sprintf($this->lang->programplan->error->parentWorkload, $parentPercent . '%');
return false;
}
/* If child plan has milestone, update parent plan set milestone eq 0 . */
if($plan->milestone and $parentStage->milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($oldPlan->parent)->exec();
}
+8 -1
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('browseType', $type);?>
<style>.icon-help{margin-left: 3px;}</style>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'>
@@ -32,7 +33,12 @@
<thead>
<tr class='text-center'>
<th class='required'><?php echo $name;?></th>
<th class='w-100px'><?php echo $lang->programplan->percent;?></th>
<th class='w-110px'>
<?php echo $lang->programplan->percent;?>
<?php if($planID):?>
<i class='icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content=<?php echo $lang->programplan->workloadTips;?>></i>
<?php endif;?>
</th>
<th class='w-110px <?php echo $hideAttribute?>'><?php echo $lang->programplan->attribute;?></th>
<th class='w-110px'><?php echo $lang->project->acl;?></th>
<th class='w-110px'><?php echo $lang->programplan->milestone;?></th>
@@ -173,4 +179,5 @@
</tr>
</table>
</div>
<script>$('[data-toggle="popover"]').popover();</script>
<?php include '../../common/view/footer.html.php';?>