From 2ba29dd57482b7c3157a3871fda946191d6f8639 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 13 Sep 2022 13:03:21 +0800 Subject: [PATCH] * adjust for effort when restart task. --- module/task/model.php | 2 +- module/task/view/start.html.php | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index 51c8936f6b..532e03dc2d 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1736,7 +1736,7 @@ class taskModel extends model /* Record consumed and left. */ $estimate = new stdclass(); - $estimate->date = helper::isZeroDate($task->realStarted) ? helper::today() : substr($task->realStarted, 0, 10); + $estimate->date = helper::today(); $estimate->task = $taskID; $estimate->consumed = zget($_POST, 'consumed', 0); $estimate->left = zget($_POST, 'left', 0); diff --git a/module/task/view/start.html.php b/module/task/view/start.html.php index 7ae33dafe4..87846e617b 100644 --- a/module/task/view/start.html.php +++ b/module/task/view/start.html.php @@ -65,14 +65,21 @@ - task->consumed;?> + team) ? $this->task->getTeamByAccount($task->team) : ''; + $consumed = !empty($currentTeam) ? (float)$currentTeam->consumed : $task->consumed; + $lblConsumed = $lang->task->consumed; + $readonly = ''; + if($app->rawMethod == 'restart' and !empty($currentTeam)) + { + $lblConsumed = $lang->task->myConsumed; + $readonly = 'readonly'; + } + ?> +
- team) ? $this->task->getTeamByAccount($task->team) : ''; - $consumed = !empty($currentTeam) ? (float)$currentTeam->consumed : $task->consumed; - ?> - task->hour;?> + task->hour;?>