* Modify return value for recordworkhour.

This commit is contained in:
sunguangming
2023-06-02 10:19:26 +08:00
parent 9906148f37
commit 1495615c87
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -1133,20 +1133,20 @@ class taskModel extends model
* @param int $taskID
* @param array $workhour
* @access public
* @return array|false
* @return array
*/
public function recordWorkhour(int $taskID, array $workhour): array|false
public function recordWorkhour(int $taskID, array $workhour): array
{
$task = $this->taskTao->fetchByID($taskID);
$task->team = $this->dao->select('*')->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->orderBy('order')->fetchAll('id');
/* Check if field is valid. */
$result = $this->taskTao->checkWorkhour($task, $workhour);
if(!$result) return false;
if(!$result) return array();
/* Add field to workhour. */
$workhour = $this->taskTao->buildWorkhour($taskID, $workhour);
if(empty($workhour)) return false;
if(empty($workhour)) return array();
$allChanges = array();
$oldStatus = $task->status;
+2 -2
View File
@@ -46,10 +46,10 @@ $items[] = array
'width' => '100px',
);
formBatchPanel
formBatch
(
set::items($items),
);
/* ====== Render page ====== */
render();
render(isonlybody() ? 'modalDialog' : 'page');