Merge branch 'main' into feature/relation
This commit is contained in:
@@ -170,7 +170,7 @@ function checkBatchEstStartedAndDeadline(event)
|
||||
const estStarted = $currentRow.find('[name^=estStarted]').val();
|
||||
const deadline = $currentRow.find('[name^=deadline]').val();
|
||||
|
||||
if(field == 'estStarted' && estStarted.length > 0 && estStarted < parentEstStarted)
|
||||
if(field == 'estStarted' && estStarted.length > 0 && parentEstStarted.length > 0 && estStarted < parentEstStarted)
|
||||
{
|
||||
const $estStartedTd = $currentRow.find('td[data-name=estStarted]');
|
||||
if($estStartedTd.find('.date-tip').length == 0 || $estStartedTd.find('.date-tip .form-tip').length > 0)
|
||||
@@ -184,7 +184,7 @@ function checkBatchEstStartedAndDeadline(event)
|
||||
}
|
||||
}
|
||||
|
||||
if(field == 'deadline' && deadline.length > 0 && deadline > parentDeadline)
|
||||
if(field == 'deadline' && deadline.length > 0 && parentDeadline.length > 0 && deadline > parentDeadline)
|
||||
{
|
||||
const $deadlineTd = $currentRow.find('td[data-name=deadline]');
|
||||
if($deadlineTd.find('.date-tip').length == 0 || $deadlineTd.find('.date-tip .form-tip').length > 0)
|
||||
|
||||
@@ -75,7 +75,6 @@ window.clickSubmit = async function(e)
|
||||
const $taskBatchFormTrs = $taskBatchForm.find('tbody tr');
|
||||
|
||||
var confirmID = '';
|
||||
var tipAll = true;
|
||||
for(let i = 0; i < $taskBatchFormTrs.length; i++)
|
||||
{
|
||||
const $currentTr = $($taskBatchFormTrs[i]);
|
||||
@@ -94,7 +93,6 @@ window.clickSubmit = async function(e)
|
||||
const nonStoryChildTaskIdList = Object.keys(nonStoryChildTasks[taskID]);
|
||||
if(nonStoryChildTaskIdList.length == 0) continue;
|
||||
|
||||
if(tipAll) tipAll = Object.keys(childTasks[taskID]).length == nonStoryChildTaskIdList.length;
|
||||
|
||||
for(let j = 0; j < nonStoryChildTaskIdList.length; j++) confirmID += 'ID' + nonStoryChildTaskIdList[j].toString() + ', ';
|
||||
}
|
||||
@@ -102,8 +100,7 @@ window.clickSubmit = async function(e)
|
||||
|
||||
if(confirmID.endsWith(', ')) confirmID = confirmID.slice(0, -2);
|
||||
|
||||
let confirmTip = tipAll ? syncStoryToAllChildrenTip : syncStoryToChildrenTip;
|
||||
confirmTip = confirmTip.replace('%s', confirmID);
|
||||
let confirmTip = syncStoryToChildrenTip.replace('%s', confirmID);
|
||||
zui.Modal.confirm(confirmTip).then((res) =>
|
||||
{
|
||||
$taskBatchForm.find('[name=syncChildren]').remove();
|
||||
@@ -166,7 +163,7 @@ function checkBatchEstStartedAndDeadline(event)
|
||||
if(field == 'estStarted')
|
||||
{
|
||||
let parentEstStarted = typeof tasks[parentID] == 'undefined' || $(event.target).closest('tbody').find('[name="estStarted[' + parentID + ']"]').length == 0 ? parentTask.estStarted : $(event.target).closest('tbody').find('[name="estStarted[' + parentID + ']"]').val();
|
||||
if(estStarted.length > 0 && estStarted < parentEstStarted)
|
||||
if(estStarted.length > 0 && parentEstStarted.length > 0 && estStarted < parentEstStarted)
|
||||
{
|
||||
const $estStartedTd = $currentRow.find('td[data-name=estStarted]');
|
||||
if($estStartedTd.find('.date-tip').length == 0 || $estStartedTd.find('.date-tip .form-tip').length > 0)
|
||||
@@ -184,7 +181,7 @@ function checkBatchEstStartedAndDeadline(event)
|
||||
if(field == 'deadline')
|
||||
{
|
||||
let parentDeadline = typeof tasks[parentID] == 'undefined' || $(event.target).closest('tbody').find('[name="deadline[' + parentID + ']"]').length == 0 ? parentTask.deadline : $(event.target).closest('tbody').find('[name="deadline[' + parentID + ']"]').val();
|
||||
if(deadline.length > 0 && deadline > parentDeadline)
|
||||
if(deadline.length > 0 && parentDeadline.length > 0 && deadline > parentDeadline)
|
||||
{
|
||||
const $deadlineTd = $currentRow.find('td[data-name=deadline]');
|
||||
if($deadlineTd.find('.date-tip').length == 0 || $deadlineTd.find('.date-tip .form-tip').length > 0)
|
||||
|
||||
@@ -408,7 +408,7 @@ function checkEstStartedAndDeadline(event)
|
||||
const $deadline = $form.find('[name=deadline]');
|
||||
const deadline = $deadline.val();
|
||||
|
||||
if(field == 'estStarted' && estStarted.length > 0 && estStarted < parentEstStarted)
|
||||
if(field == 'estStarted' && estStarted.length > 0 && parentEstStarted.length > 0&& estStarted < parentEstStarted)
|
||||
{
|
||||
const $estStartedDiv = $estStarted.closest('.form-group');
|
||||
if($estStartedDiv.find('.date-tip').length == 0 || $estStartedDiv.find('.date-tip .form-tip').length > 0)
|
||||
@@ -422,7 +422,7 @@ function checkEstStartedAndDeadline(event)
|
||||
}
|
||||
}
|
||||
|
||||
if(field == 'deadline' && deadline.length > 0 && deadline > parentDeadline)
|
||||
if(field == 'deadline' && deadline.length > 0 && parentDeadline.length > 0 && deadline > parentDeadline)
|
||||
{
|
||||
const $deadlineDiv = $deadline.closest('.form-group');
|
||||
if($deadlineDiv.find('.date-tip').length == 0 || $deadlineDiv.find('.date-tip .form-tip').length > 0)
|
||||
|
||||
@@ -286,7 +286,6 @@ $lang->task->cannotDeleteParent = 'Cannot delete parent task';
|
||||
$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.';
|
||||
$lang->task->selectTestStoryTip = "The following {$lang->SRCommon} will be subtasks of this task";
|
||||
$lang->task->effortOperateTips = 'Only the project manager, the executive supervisor, and the department head have the authority to %s logs belonging to others.';
|
||||
$lang->task->syncStoryToAllChildrenTip = "Will be {$lang->SRCommon} synchronised with all child tasks?";
|
||||
$lang->task->syncStoryToChildrenTip = "Child tasks of %s do not have {$lang->SRCommon}, will {$lang->SRCommon} be synchronised with these child tasks?";
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
|
||||
@@ -286,7 +286,6 @@ $lang->task->cannotDeleteParent = 'Cannot delete parent task';
|
||||
$lang->task->addChildTask = 'Because the task has cost hours, ZenTao will create a child task with the same name to record the cost housrs to ensure data consistency.';
|
||||
$lang->task->selectTestStoryTip = "The following {$lang->SRCommon} will be subtasks of this task";
|
||||
$lang->task->effortOperateTips = 'Only the project manager, the executive supervisor, and the department head have the authority to %s logs belonging to others.';
|
||||
$lang->task->syncStoryToAllChildrenTip = "Will be {$lang->SRCommon} synchronised with all child tasks?";
|
||||
$lang->task->syncStoryToChildrenTip = "Child tasks of %s do not have {$lang->SRCommon}, will {$lang->SRCommon} be synchronised with these child tasks?";
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
|
||||
@@ -286,7 +286,6 @@ $lang->task->cannotDeleteParent = 'Impossible de supprimer la tâche pare
|
||||
$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.';
|
||||
$lang->task->selectTestStoryTip = "The following {$lang->SRCommon} will be subtasks of this task";
|
||||
$lang->task->effortOperateTips = 'Only the project manager, the executive supervisor, and the department head have the authority to %s logs belonging to others.';
|
||||
$lang->task->syncStoryToAllChildrenTip = "Will be {$lang->SRCommon} synchronised with all child tasks?";
|
||||
$lang->task->syncStoryToChildrenTip = "Child tasks of %s do not have {$lang->SRCommon}, will {$lang->SRCommon} be synchronised with these child tasks?";
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
|
||||
@@ -286,7 +286,6 @@ $lang->task->cannotDeleteParent = '不能删除父任务。';
|
||||
$lang->task->addChildTask = '因该任务已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子任务记录该消耗。';
|
||||
$lang->task->selectTestStoryTip = "以下{$lang->SRCommon}将作为此任务的子任务";
|
||||
$lang->task->effortOperateTips = '只有项目负责人、执行负责人、所属部门负责人才能%s他人日志。';
|
||||
$lang->task->syncStoryToAllChildrenTip = "是否同步更新所有子任务的相关{$lang->SRCommon}?";
|
||||
$lang->task->syncStoryToChildrenTip = "子任务%s没有关联{$lang->SRCommon},是否同步更新这些子任务的相关{$lang->SRCommon}?";
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
@@ -416,5 +415,5 @@ $lang->taskestimate->consumed = '工时';
|
||||
$lang->task->overEsStartDate = '已超出%s计划开始时间,请先修改%s计划开始时间';
|
||||
$lang->task->overEsEndDate = '已超出%s计划结束时间,请先修改%s计划结束时间';
|
||||
|
||||
$lang->task->overParentEsStarted = '任务预计开始日期小于父任务预计开始日期:%s';
|
||||
$lang->task->overParentDeadline = '任务截止日期大于父任务截止日期:%s';
|
||||
$lang->task->overParentEsStarted = '任务的预计开始日期小于了父任务的预计开始日期:%s';
|
||||
$lang->task->overParentDeadline = '任务的截止日期大于了父任务的截止日期:%s';
|
||||
|
||||
@@ -22,7 +22,6 @@ jsVar('childTasks', $childTasks);
|
||||
jsVar('nonStoryChildTasks', $nonStoryChildTasks);
|
||||
jsVar('tasks', $tasks);
|
||||
jsVar('stories', $stories);
|
||||
jsVar('syncStoryToAllChildrenTip', $lang->task->syncStoryToAllChildrenTip);
|
||||
jsVar('syncStoryToChildrenTip', $lang->task->syncStoryToChildrenTip);
|
||||
jsVar('parentTasks', $parentTasks);
|
||||
jsVar('ignoreLang', $lang->project->ignore);
|
||||
@@ -81,7 +80,7 @@ formBatchPanel
|
||||
set::label($lang->task->story),
|
||||
set::control('picker'),
|
||||
set::items(array()),
|
||||
set::width('200px'),
|
||||
set::width('300px'),
|
||||
set::ditto(true),
|
||||
set::defaultDitto('off')
|
||||
),
|
||||
|
||||
@@ -34,14 +34,11 @@ jsVar('requiredFields', $config->task->edit->requiredFields);
|
||||
jsVar('parentEstStarted', !empty($parentTask) ? $parentTask->estStarted : '');
|
||||
jsVar('parentDeadline', !empty($parentTask) ? $parentTask->deadline : '');
|
||||
jsVar('ignoreLang', $lang->project->ignore);
|
||||
jsVar('overParentEstStartedLang', isset($parentTask) ? sprintf($lang->task->overParentEsStarted, $parentTask->estStarted) : '');
|
||||
jsVar('overParentDeadlineLang', isset($parentTask) ? sprintf($lang->task->overParentDeadline, $parentTask->deadline) : '');
|
||||
jsVar('overParentEstStartedLang', !empty($parentTask) ? sprintf($lang->task->overParentEsStarted, $parentTask->estStarted) : '');
|
||||
jsVar('overParentDeadlineLang', !empty($parentTask) ? sprintf($lang->task->overParentDeadline, $parentTask->deadline) : '');
|
||||
|
||||
$confirmSyncTip = '';
|
||||
if(!empty($syncChildren) && !empty($task->children))
|
||||
{
|
||||
$confirmSyncTip = count($syncChildren) == count($task->children) ? $lang->task->syncStoryToAllChildrenTip : sprintf($lang->task->syncStoryToChildrenTip, 'ID' . implode(', ID', $syncChildren));
|
||||
}
|
||||
if(!empty($syncChildren) && !empty($task->children)) $confirmSyncTip = sprintf($lang->task->syncStoryToChildrenTip, 'ID' . implode(', ID', $syncChildren));
|
||||
jsVar('confirmSyncTip', $confirmSyncTip);
|
||||
jsVar('taskID', $task->id);
|
||||
jsVar('taskStory', $task->story);
|
||||
|
||||
Reference in New Issue
Block a user