* Code for task #95362.
This commit is contained in:
@@ -175,7 +175,7 @@ $config->task->effortTable->fieldList['consumed']['checkbox'] = false;
|
||||
$config->task->effortTable->fieldList['consumed']['width'] = '80';
|
||||
|
||||
$config->task->effortTable->fieldList['left']['title'] = $lang->task->left;
|
||||
$config->task->effortTable->fieldList['left']['name'] = 'consumed';
|
||||
$config->task->effortTable->fieldList['left']['name'] = 'left';
|
||||
$config->task->effortTable->fieldList['left']['checkbox'] = false;
|
||||
$config->task->effortTable->fieldList['left']['width'] = '80';
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ $config->task->form->recordWorkhour = array();
|
||||
$config->task->form->recordWorkhour['date'] = array('type' => 'date', 'required' => true, 'default' => array());
|
||||
$config->task->form->recordWorkhour['work'] = array('type' => 'string', 'required' => false, 'default' => array(), 'base' => true);
|
||||
$config->task->form->recordWorkhour['consumed'] = array('type' => 'float', 'required' => true, 'default' => array());
|
||||
$config->task->form->recordWorkhour['left'] = array('type' => 'float', 'required' => true, 'default' => array());
|
||||
$config->task->form->recordWorkhour['left'] = array('type' => 'float', 'required' => false, 'default' => array());
|
||||
|
||||
$config->task->form->editEffort = array();
|
||||
$config->task->form->editEffort['date'] = array('type' => 'date', 'required' => true, 'default' => '');
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
$(".form-actions .btn[type='submit']").on('click', function(e, hasConfirmed)
|
||||
{
|
||||
if(hasConfirmed) return true;
|
||||
|
||||
var $this = $(this);
|
||||
$("input[name^='left']").each(function()
|
||||
{
|
||||
if($(this).val() !== '' && !$(this).prop('readonly')) left = $(this).val();
|
||||
});
|
||||
|
||||
if(typeof(left) != 'undefined' && left == '0')
|
||||
{
|
||||
e.preventDefault();
|
||||
zui.Modal.confirm(confirmRecord).then(
|
||||
confirmed =>
|
||||
{
|
||||
if(confirmed) $this.trigger('click', true);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -1074,7 +1074,7 @@ class taskModel extends model
|
||||
$this->addTaskEffort($record);
|
||||
$effortID = $this->dao->lastInsertID();
|
||||
|
||||
$isFinishTask = (empty($currentTeam) && !in_array($task->status, $this->config->task->unfinishedStatus)) || (!empty($currentTeam) && $currentTeam->status != 'done');
|
||||
$isFinishTask = (empty($currentTeam) && in_array($task->status, $this->config->task->unfinishedStatus)) || (!empty($currentTeam) && $currentTeam->status != 'done');
|
||||
/* Change the workhour and status of tasks through effort. */
|
||||
list($newTask, $actionID) = $this->taskTao->buildTaskForEffort($record, $task, (string)$lastDate, $isFinishTask);
|
||||
if($lastDate <= $record->date) $lastDate = $record->date;
|
||||
|
||||
@@ -10,6 +10,8 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
jsVar('confirmRecord', $lang->task->confirmRecord);
|
||||
|
||||
entityLabel
|
||||
(
|
||||
setClass('my-3 gap-x-3'),
|
||||
|
||||
Reference in New Issue
Block a user