Merge branch 'sprint/169' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/169

This commit is contained in:
dingguodong
2021-10-29 17:33:56 +08:00
15 changed files with 89 additions and 39 deletions
+7 -1
View File
@@ -1,3 +1,7 @@
$(function()
{
if(programID) $('#line_chosen').addClass('hidden');
})
/**
* Load product Lines.
*
@@ -56,12 +60,14 @@ function toggleLine(obj)
{
$('form .line-no-exist').removeClass('hidden');
$('form .line-exist').addClass('hidden');
$('#line_chosen').addClass('hidden');
$line.attr('disabled', 'disabled');
}
else
{
$('form .line-exist').removeClass('hidden');
$(' #line').removeClass('hidden');
$('form .line-no-exist').addClass('hidden');
$('#line_chosen').removeClass('hidden');
$line.removeAttr('disabled');
}
}
+6 -5
View File
@@ -13,6 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('noProject', false);?>
<?php js::set('programID', $programID);?>
<div id="mainContent" class="main-content">
<div class="center-block">
<div class="main-header">
@@ -32,7 +33,7 @@
<?php if($config->systemMode == 'classic' or $programID):?>
<td>
<div class='input-group'>
<?php echo html::select("line", $lines, '', "class='form-control hidden line-exist'");?>
<?php echo html::select("line", $lines, '', "class='form-control hidden line-exist chosen'");?>
<?php echo html::input("lineName", '', "class='form-control line-no-exist'");?>
<?php if(count($lines)):?>
<span class='input-group-addon'>
@@ -54,19 +55,19 @@
</tr>
<tr>
<th><?php echo $lang->product->code;?></th>
<td><?php echo html::input('code', '', "class='form-control' required");?></td><td></td>
<td><?php echo html::input('code', '', "class='form-control' required");?></td>
</tr>
<tr>
<th><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $this->app->user->account, "class='form-control chosen'");?></td><td></td>
<td><?php echo html::select('PO', $poUsers, $this->app->user->account, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->product->QD;?></th>
<td><?php echo html::select('QD', $qdUsers, '', "class='form-control chosen'");?></td><td></td>
<td><?php echo html::select('QD', $qdUsers, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->product->RD;?></th>
<td><?php echo html::select('RD', $rdUsers, '', "class='form-control chosen'");?></td><td></td>
<td><?php echo html::select('RD', $rdUsers, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->product->type;?></th>
+1 -1
View File
@@ -313,7 +313,7 @@ class productplan extends control
$this->view->canBeChanged = $canBeChanged;
if($this->app->getViewType() == 'json')
{
{
unset($this->view->storyPager);
unset($this->view->bugPager);
}
+9 -1
View File
@@ -24,7 +24,15 @@ $(function()
{
var projectID = $('#project').val();
var planID = $('#planID').val();
$.apps.open(createLink('execution', 'create', 'projectID=' + projectID + '&executionID=&copyExecutionID=&planID=' + planID + '&confirm=&productID=' + productID), 'project')
if(!projectID)
{
alert(projectNotEmpty);
return false;
}
else
{
$.apps.open(createLink('execution', 'create', 'projectID=' + projectID + '&executionID=&copyExecutionID=&planID=' + planID + '&confirm=&productID=' + productID), 'project')
}
});
});
$(document).on('click', 'td.content .more', function(e)
+2 -3
View File
@@ -41,7 +41,6 @@ function computeEndDate(delta)
$('#begin').on('change', function()
{
$("#end").val('');
$("input:radio[name='delta']").attr("checked",false);
});
@@ -55,11 +54,11 @@ $('#future').on('change', function()
if($(this).prop('checked'))
{
$('#begin').attr('disabled', 'disabled');
$('#end').val('').parents('tr').hide();
$('#end').attr('disabled', 'disabled').parents('tr').hide();
}
else
{
$('#begin').removeAttr('disabled');
$('#end').val('').parents('tr').show();
$('#end').removeAttr('disabled').parents('tr').show();
}
});
+7 -4
View File
@@ -46,6 +46,7 @@ $lang->productplan->confirmUnlinkBug = "Möchten Sie diesen Bug löschen?";
$lang->productplan->noPlan = 'Kein Plan. ';
$lang->productplan->cannotDeleteParent = 'Cannot delete parent plan';
$lang->productplan->selectProjects = "Please select the project";
$lang->productplan->projectNotEmpty = 'Project cannot be empty.';
$lang->productplan->nextStep = "Next step";
$lang->productplan->id = 'ID';
@@ -76,10 +77,12 @@ $lang->productplan->endList[93] = '3 Monate';
$lang->productplan->endList[186] = '6 Monate';
$lang->productplan->endList[365] = '1 Jahr';
$lang->productplan->errorNoTitle = 'ID %s Titel darf nicht leer sein.';
$lang->productplan->errorNoBegin = 'ID %s Start darf nicht leer sein.';
$lang->productplan->errorNoEnd = 'ID %s Ende darf nicht leer sein.';
$lang->productplan->beginGeEnd = 'ID %s Start darf nicht größer als Ende sein.';
$lang->productplan->errorNoTitle = 'ID %s Titel darf nicht leer sein.';
$lang->productplan->errorNoBegin = 'ID %s Start darf nicht leer sein.';
$lang->productplan->errorNoEnd = 'ID %s Ende darf nicht leer sein.';
$lang->productplan->beginGeEnd = 'ID %s Start darf nicht größer als Ende sein.';
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'Alle';
$lang->productplan->featureBar['browse']['unexpired'] = 'Nicht abgelaufen';
+7 -4
View File
@@ -46,6 +46,7 @@ $lang->productplan->confirmUnlinkBug = "Do you want to unlink this bug?";
$lang->productplan->noPlan = 'No plans yet. ';
$lang->productplan->cannotDeleteParent = 'Cannot delete parent plan';
$lang->productplan->selectProjects = "Please select the project";
$lang->productplan->projectNotEmpty = 'Project cannot be empty.';
$lang->productplan->nextStep = "Next step";
$lang->productplan->id = 'ID';
@@ -77,10 +78,12 @@ $lang->productplan->endList[93] = '3 Months';
$lang->productplan->endList[186] = '6 Months';
$lang->productplan->endList[365] = '1 Year';
$lang->productplan->errorNoTitle = 'ID %s title should not be empty.';
$lang->productplan->errorNoBegin = 'ID %s begin time should not be empty.';
$lang->productplan->errorNoEnd = 'ID %s end time should not be empty.';
$lang->productplan->beginGeEnd = 'ID %s begin time should not be >= end time.';
$lang->productplan->errorNoTitle = 'ID %s title should not be empty.';
$lang->productplan->errorNoBegin = 'ID %s begin time should not be empty.';
$lang->productplan->errorNoEnd = 'ID %s end time should not be empty.';
$lang->productplan->beginGeEnd = 'ID %s begin time should not be >= end time.';
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'All';
$lang->productplan->featureBar['browse']['unexpired'] = 'Unexpired';
+7 -4
View File
@@ -46,6 +46,7 @@ $lang->productplan->confirmUnlinkBug = "Voulez-vous retirer ce bug du plan ?";
$lang->productplan->noPlan = "Aucun plan pour l'instant. ";
$lang->productplan->cannotDeleteParent = 'Impossible de supprimer le plan parent';
$lang->productplan->selectProjects = "Please select the project";
$lang->productplan->projectNotEmpty = 'Project cannot be empty.';
$lang->productplan->nextStep = "Next step";
$lang->productplan->id = 'ID';
@@ -76,10 +77,12 @@ $lang->productplan->endList[93] = '3 Mois';
$lang->productplan->endList[186] = '6 Mois';
$lang->productplan->endList[365] = '1 Année';
$lang->productplan->errorNoTitle = 'ID %s titre ne doit pas être à blanc.';
$lang->productplan->errorNoBegin = "ID %s l'heure de début devrait être renseignée.";
$lang->productplan->errorNoEnd = "ID %s l'heure de fin devrait être renseignée.";
$lang->productplan->beginGeEnd = "ID %s l'heure de début ne doit pas être >= à l'heure de fin.";
$lang->productplan->errorNoTitle = 'ID %s titre ne doit pas être à blanc.';
$lang->productplan->errorNoBegin = "ID %s l'heure de début devrait être renseignée.";
$lang->productplan->errorNoEnd = "ID %s l'heure de fin devrait être renseignée.";
$lang->productplan->beginGeEnd = "ID %s l'heure de début ne doit pas être >= à l'heure de fin.";
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'Tous';
$lang->productplan->featureBar['browse']['unexpired'] = 'Non échus';
+7 -4
View File
@@ -46,6 +46,7 @@ $lang->productplan->confirmUnlinkBug = "Bạn có muốn hủy liên kết bug
$lang->productplan->noPlan = 'Không có kế hoạch nào';
$lang->productplan->cannotDeleteParent = 'Không thể xóa kế hoạch mẹ';
$lang->productplan->selectProjects = "Please select the project";
$lang->productplan->projectNotEmpty = 'Project cannot be empty.';
$lang->productplan->nextStep = "Next step";
$lang->productplan->id = 'ID';
@@ -76,10 +77,12 @@ $lang->productplan->endList[93] = '3 tháng';
$lang->productplan->endList[186] = '6 tháng';
$lang->productplan->endList[365] = '1 năm';
$lang->productplan->errorNoTitle = 'Tiêu đề ID %s không nên trống.';
$lang->productplan->errorNoBegin = 'Thời gian bắt đầu ID %s không nên trống.';
$lang->productplan->errorNoEnd = 'Thời gian kết thúc ID %s không nên trống.';
$lang->productplan->beginGeEnd = 'ID %s thời gian bắt đầu không nên >= thời gian kết thúc.';
$lang->productplan->errorNoTitle = 'Tiêu đề ID %s không nên trống.';
$lang->productplan->errorNoBegin = 'Thời gian bắt đầu ID %s không nên trống.';
$lang->productplan->errorNoEnd = 'Thời gian kết thúc ID %s không nên trống.';
$lang->productplan->beginGeEnd = 'ID %s thời gian bắt đầu không nên >= thời gian kết thúc.';
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'Tất cả';
$lang->productplan->featureBar['browse']['unexpired'] = 'Chưa quá hạn';
+8 -4
View File
@@ -46,6 +46,7 @@ $lang->productplan->confirmUnlinkBug = "您确认移除该Bug吗?";
$lang->productplan->noPlan = "暂时没有计划。";
$lang->productplan->cannotDeleteParent = "不能删除父计划";
$lang->productplan->selectProjects = "请选择所属项目";
$lang->productplan->projectNotEmpty = '所属项目不能为空。';
$lang->productplan->nextStep = "下一步";
$lang->productplan->id = '编号';
@@ -77,10 +78,13 @@ $lang->productplan->endList[93] = '三个月';
$lang->productplan->endList[186] = '半年';
$lang->productplan->endList[365] = '一年';
$lang->productplan->errorNoTitle = 'ID %s 标题不能为空';
$lang->productplan->errorNoBegin = 'ID %s 开始时间不能为空';
$lang->productplan->errorNoEnd = 'ID %s 结束时间不能为空';
$lang->productplan->beginGeEnd = 'ID %s 开始时间不能大于结束时间';
$lang->productplan->errorNoTitle = 'ID %s 标题不能为空';
$lang->productplan->errorNoBegin = 'ID %s 开始时间不能为空';
$lang->productplan->errorNoEnd = 'ID %s 结束时间不能为空';
$lang->productplan->beginGeEnd = 'ID %s 开始时间不能大于结束时间';
$lang->productplan->beginLetterParent = "父计划的开始日期:%s,开始日期不能小于父计划的开始日期";
$lang->productplan->endGreaterParent = "父计划的完成日期:%s,完成日期不能大于父计划的完成日期";
$lang->productplan->featureBar['browse']['all'] = '全部';
$lang->productplan->featureBar['browse']['unexpired'] = '未过期';
+7 -4
View File
@@ -46,6 +46,7 @@ $lang->productplan->confirmUnlinkBug = "您確認移除該Bug嗎?";
$lang->productplan->noPlan = "暫時沒有計劃。";
$lang->productplan->cannotDeleteParent = "不能刪除父計劃";
$lang->productplan->selectProjects = "請選擇所屬項目";
$lang->productplan->projectNotEmpty = '所屬項目不能為空。';
$lang->productplan->nextStep = "下一步";
$lang->productplan->id = '編號';
@@ -77,10 +78,12 @@ $lang->productplan->endList[93] = '三個月';
$lang->productplan->endList[186] = '半年';
$lang->productplan->endList[365] = '一年';
$lang->productplan->errorNoTitle = 'ID %s 標題不能為空';
$lang->productplan->errorNoBegin = 'ID %s 開始時間不能為空';
$lang->productplan->errorNoEnd = 'ID %s 結束時間不能為空';
$lang->productplan->beginGeEnd = 'ID %s 開始時間不能大於結束時間';
$lang->productplan->errorNoTitle = 'ID %s 標題不能為空';
$lang->productplan->errorNoBegin = 'ID %s 開始時間不能為空';
$lang->productplan->errorNoEnd = 'ID %s 結束時間不能為空';
$lang->productplan->beginGeEnd = 'ID %s 開始時間不能大於結束時間';
$lang->productplan->beginLetterParent = "父計畫的開始日期:%s,開始日期不能小於父計畫的開始日期";
$lang->productplan->endGreaterParent = "父計畫的完成日期:%s,完成日期不能大於父計畫的完成日期";
$lang->productplan->featureBar['browse']['all'] = '全部';
$lang->productplan->featureBar['browse']['unexpired'] = '未過期';
+12
View File
@@ -332,6 +332,18 @@ class productplanModel extends model
->setIF($this->post->future || empty($_POST['end']), 'end', '2030-01-01')
->remove('delta,uid,future')
->get();
if(!empty($plan->parentBegin))
{
if($plan->begin < $plan->parentBegin) dao::$errors['begin'] = sprintf($this->lang->productplan->beginLetterParent, $plan->parentBegin);
}
if(!empty($plan->parentEnd))
{
if($plan->end !=='2030-01-01' and $plan->end > $plan->parentEnd) dao::$errors['end'] = sprintf($this->lang->productplan->endGreaterParent, $plan->parentEnd);
}
unset($plan->parentBegin);
unset($plan->parentEnd);
if(!$this->post->future and strpos($this->config->productplan->create->requiredFields, 'begin') !== false and empty($_POST['begin']))
{
dao::$errors['begin'] = sprintf($this->lang->error->notempty, $this->lang->productplan->begin);
+1
View File
@@ -202,4 +202,5 @@
</div>
</div>
</div>
<?php js::set('projectNotEmpty', $lang->productplan->projectNotEmpty)?>
<?php include '../../common/view/footer.html.php';?>
+6 -3
View File
@@ -20,12 +20,15 @@
<h2> <?php echo $parent ? $lang->productplan->createChildren : $lang->productplan->create;?></h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<table class='table table-form'>
<tbody>
<?php if($parent):?>
<tr>
<th><?php echo $lang->productplan->parent;?></th>
<td class='muted'><?php echo $parentPlan->title;?></td><td></td><td></td>
<td class='muted'><?php echo $parentPlan->title;?>
<?php echo html::hidden('parentBegin', $parentPlan->begin);?>
<?php echo html::hidden('parentEnd', $parentPlan->end);?>
</td><td></td><td></td>
</tr>
<?php else:?>
<tr>
@@ -48,7 +51,7 @@
<th><?php echo $lang->productplan->begin;?></th>
<td><?php echo html::input('begin', formatTime($begin), "class='form-control form-date'");?></td>
<td>
<div class='checkbox-primary'>
<div class='checkbox-primary'>
<input type='checkbox' id='future' name='future' value='1' />
<label for='future'><?php echo $lang->productplan->future;?></label>
</div>
+2 -1
View File
@@ -515,7 +515,8 @@ class todoModel extends model
$stmt = $this->dao->select('*')->from(TABLE_TODO)
->where('deleted')->eq('0')
->andWhere('assignedTo', true)->eq($account)
->beginIF($type == 'assignedtoother')->andWhere('account', true)->eq($account)->fi()
->beginIF($type != 'assignedtoother')->andWhere('assignedTo', true)->eq($account)->fi()
->orWhere('finishedBy')->eq($account)
->markRight(1)
->beginIF($begin)->andWhere('date')->ge($begin)->fi()