* [misc,done,3h] convert scientific counting into numbers.
This commit is contained in:
@@ -15,7 +15,11 @@ jsVar('delayInfo', $lang->project->delayInfo);
|
||||
jsVar('LONG_TIME', LONG_TIME);
|
||||
jsVar('longTimeText', $lang->project->longTime);
|
||||
|
||||
foreach($projects as $project) $project->consumed .= $lang->execution->workHourUnit;
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$project->consumed .= $lang->execution->workHourUnit;
|
||||
$project->consumed = helper::formatHours($project->consumed);
|
||||
}
|
||||
if(!$longBlock)
|
||||
{
|
||||
unset($config->block->project->dtable->fieldList['PM']);
|
||||
|
||||
@@ -19,6 +19,10 @@ foreach($executionStats as $scrum)
|
||||
$scrum->totalConsumed = zget($scrum, 'consumed', 0) . $lang->execution->workHourUnit;
|
||||
$scrum->totalLeft = zget($scrum, 'left', 0) . $lang->execution->workHourUnit;
|
||||
$scrum->progress = zget($scrum, 'progress', 0);
|
||||
|
||||
$scrum->totalEstimate = helper::formatHours($scrum->totalEstimate);
|
||||
$scrum->totalConsumed = helper::formatHours($scrum->totalConsumed);
|
||||
$scrum->totalLeft = helper::formatHours($scrum->totalLeft);
|
||||
}
|
||||
|
||||
if(!$longBlock)
|
||||
|
||||
@@ -1003,8 +1003,8 @@ class execution extends control
|
||||
foreach($this->view->teamMembers as $member)
|
||||
{
|
||||
$member->days = $member->days . $this->lang->execution->day;
|
||||
$member->hours = $member->hours . $this->lang->execution->workHour;
|
||||
$member->total = $member->totalHours . $this->lang->execution->workHour;
|
||||
$member->hours = helper::formatHours($member->hours) . $this->lang->execution->workHour;
|
||||
$member->total = helper::formatHours($member->totalHours) . $this->lang->execution->workHour;
|
||||
$member->actions = array();
|
||||
if(common::hasPriv('execution', 'unlinkMember', $member) && common::canModify('execution', $execution)) $member->actions = array('unlink');
|
||||
|
||||
|
||||
@@ -351,17 +351,17 @@ $tbody = function() use($tasks, $lang, $groupBy, $users, $groupByList, $executio
|
||||
h::td
|
||||
(
|
||||
setClass('text-right'),
|
||||
$task->estimate . $lang->execution->workHourUnit
|
||||
helper::formatHours($task->estimate) . $lang->execution->workHourUnit
|
||||
),
|
||||
h::td
|
||||
(
|
||||
setClass('text-right'),
|
||||
$task->consumed . $lang->execution->workHourUnit
|
||||
helper::formatHours($task->consumed) . $lang->execution->workHourUnit
|
||||
),
|
||||
h::td
|
||||
(
|
||||
setClass('text-right'),
|
||||
$task->left . $lang->execution->workHourUnit
|
||||
helper::formatHours($task->left) . $lang->execution->workHourUnit
|
||||
),
|
||||
h::td
|
||||
(
|
||||
|
||||
@@ -129,7 +129,7 @@ div
|
||||
span
|
||||
(
|
||||
setClass('ml-2 font-bold'),
|
||||
$story->estimate
|
||||
helper::formatHours($story->estimate)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
@@ -57,7 +57,7 @@ div
|
||||
span
|
||||
(
|
||||
setClass('ml-2 font-bold'),
|
||||
$task->estimate . ' ' . $lang->execution->workHourUnit
|
||||
helper::formatHours($task->estimate) . ' ' . $lang->execution->workHourUnit
|
||||
)
|
||||
),
|
||||
div
|
||||
@@ -67,7 +67,7 @@ div
|
||||
span
|
||||
(
|
||||
setClass('ml-2 font-bold'),
|
||||
round($task->consumed, 2) . ' ' . $lang->execution->workHourUnit
|
||||
helper::formatHours($task->consumed) . ' ' . $lang->execution->workHourUnit
|
||||
)
|
||||
),
|
||||
div
|
||||
@@ -77,7 +77,7 @@ div
|
||||
span
|
||||
(
|
||||
setClass('ml-2 font-bold'),
|
||||
$task->left . ' ' . $lang->execution->workHourUnit
|
||||
helper::formatHours($task->left) . ' ' . $lang->execution->workHourUnit
|
||||
)
|
||||
),
|
||||
div
|
||||
|
||||
@@ -596,19 +596,19 @@ div
|
||||
(
|
||||
setClass('w-1/3'),
|
||||
span(setClass('text-gray'), $lang->execution->estimateHours),
|
||||
span(setClass('ml-2'), $execution->totalEstimate . $lang->execution->workHourUnit)
|
||||
span(setClass('ml-2'), helper::formatHours($execution->totalEstimate) . $lang->execution->workHourUnit)
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('w-1/3'),
|
||||
span(setClass('text-gray'), $lang->execution->consumedHours),
|
||||
span(setClass('ml-2'), $execution->totalConsumed . $lang->execution->workHourUnit)
|
||||
span(setClass('ml-2'), helper::formatHours($execution->totalConsumed) . $lang->execution->workHourUnit)
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('w-1/3'),
|
||||
span(setClass('text-gray'), $lang->execution->leftHours),
|
||||
span(setClass('ml-2'), $execution->totalLeft . $lang->execution->workHourUnit)
|
||||
span(setClass('ml-2'), helper::formatHours($execution->totalLeft) . $lang->execution->workHourUnit)
|
||||
),
|
||||
div
|
||||
(
|
||||
|
||||
@@ -60,7 +60,9 @@ foreach($projects as $project)
|
||||
$project->budget = $lang->project->future;
|
||||
}
|
||||
|
||||
$project->end = $project->end == LONG_TIME ? $lang->project->longTime : $project->end;
|
||||
$project->end = $project->end == LONG_TIME ? $lang->project->longTime : $project->end;
|
||||
$project->estimate = helper::formatHours($project->estimate);
|
||||
$project->consume = helper::formatHours($project->consume);
|
||||
}
|
||||
|
||||
$projects = array_values($projects);
|
||||
|
||||
@@ -109,6 +109,7 @@ foreach($stories as $id => $story)
|
||||
if($action['name'] == 'create' && $story->isParent == '1') $stories[$id]->actions[$key]['disabled'] = 1;
|
||||
}
|
||||
}
|
||||
$story->estimate = helper::formatHours($story->estimate);
|
||||
}
|
||||
|
||||
if($viewType == 'tiled') $config->my->story->dtable->fieldList['title']['nestedToggle'] = false;
|
||||
|
||||
@@ -100,6 +100,10 @@ if($config->edition == 'ipd')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data->estimate = helper::formatHours($data->estimate);
|
||||
$data->consumed = helper::formatHours($data->consumed);
|
||||
$data->left = helper::formatHours($data->left);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace zin;
|
||||
foreach($teamMembers as $member)
|
||||
{
|
||||
$member->days = $member->days . $this->lang->execution->day;
|
||||
$member->hours = $member->hours . $this->lang->execution->workHour;
|
||||
$member->total = $member->totalHours . $this->lang->execution->workHour;
|
||||
$member->hours = helper::formatHours($member->hours) . $this->lang->execution->workHour;
|
||||
$member->total = helper::formatHours($member->totalHours) . $this->lang->execution->workHour;
|
||||
$member->actions = array();
|
||||
if(common::hasPriv('project', 'unlinkMember', $member) && $canBeChanged) $member->actions = array('unlink');
|
||||
}
|
||||
|
||||
@@ -465,19 +465,19 @@ row
|
||||
(
|
||||
setClass('w-1/3'),
|
||||
span(setClass('text-gray'), $lang->execution->estimateHours),
|
||||
span(setClass('ml-2'), (float)$project->estimate . 'h')
|
||||
span(setClass('ml-2'), helper::formatHours($project->estimate) . 'h')
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('w-1/3'),
|
||||
span(setClass('text-gray'), $lang->execution->consumedHours),
|
||||
span(setClass('ml-2'), (float)$project->consumed . 'h')
|
||||
span(setClass('ml-2'), helper::formatHours($project->consumed) . 'h')
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('w-1/3'),
|
||||
span(setClass('text-gray'), $lang->execution->leftHours),
|
||||
span(setClass('ml-2'), (float)$project->left . 'h')
|
||||
span(setClass('ml-2'), helper::formatHours($project->left) . 'h')
|
||||
),
|
||||
div
|
||||
(
|
||||
@@ -489,7 +489,7 @@ row
|
||||
(
|
||||
setClass('w-1/3 mt-4'),
|
||||
span(setClass('text-gray'), $lang->execution->totalHours),
|
||||
span(setClass('ml-2'), (float)$project->left . 'h')
|
||||
span(setClass('ml-2'), helper::formatHours($project->left) . 'h')
|
||||
),
|
||||
div
|
||||
(
|
||||
|
||||
@@ -1385,6 +1385,10 @@ class projectZen extends project
|
||||
|
||||
$project->from = 'project';
|
||||
$project->actions = $this->project->buildActionList($project);
|
||||
|
||||
$project->estimate = helper::formatHours($project->estimate);
|
||||
$project->consume = helper::formatHours($project->consume);
|
||||
$project->left = helper::formatHours($project->left);
|
||||
}
|
||||
|
||||
return array_values($projectList);
|
||||
|
||||
@@ -5091,7 +5091,7 @@ class storyModel extends model
|
||||
public function formatStoryForList(object $story, array $options = array(), string $storyType = 'story', array $maxGradeGroup = array()): object
|
||||
{
|
||||
$story->actions = $this->buildActionButtonList($story, 'browse', zget($options, 'execution', null), $storyType, $maxGradeGroup);
|
||||
$story->estimate = $story->estimate . $this->config->hourUnit;
|
||||
$story->estimate = helper::formatHours($story->estimate) . $this->config->hourUnit;
|
||||
|
||||
$story->taskCount = zget(zget($options, 'storyTasks', array()), $story->id, 0);
|
||||
$story->bugCount = zget(zget($options, 'storyBugs', array()), $story->id, 0);
|
||||
|
||||
@@ -21,6 +21,8 @@ $isRequirement = $story->type == 'requirement';
|
||||
$isStoryType = $story->type == 'story';
|
||||
if(empty($executionID)) $executionID = 0;
|
||||
|
||||
$story->estimate = helper::formatHours($story->estimate);
|
||||
|
||||
/* 版本列表。Version list. */
|
||||
$versions = array();
|
||||
for($i = $story->version; $i >= 1; $i--)
|
||||
|
||||
@@ -2613,7 +2613,7 @@ class taskModel extends model
|
||||
$dataList = array();
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
$key = (string)$task->$field;
|
||||
$key = strpos(',estimate,consumed,left,', ",{$field},") !== false ? helper::formatHours($task->$field) : (string)$task->$field;
|
||||
if(!isset($fields[$key])) $fields[$key] = 0;
|
||||
$fields[$key] ++;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ $myEfforts = array();
|
||||
$myLastOrder = 0;
|
||||
foreach($efforts as $key => $effort)
|
||||
{
|
||||
$effort->consumed = helper::formatHours($effort->consumed);
|
||||
$effort->left = helper::formatHours($effort->left);
|
||||
|
||||
$prevEffort = $key > 0 ? $efforts[$key - 1] : null;
|
||||
$order = (!$prevEffort or $prevEffort->order == $effort->order) ? $index : ++$index;
|
||||
$account = $effort->account;
|
||||
|
||||
@@ -29,7 +29,7 @@ modalHeader
|
||||
span
|
||||
(
|
||||
setClass('label secondary-pale'),
|
||||
$task->estimate . $lang->task->suffixHour
|
||||
helper::formatHours($task->estimate) . $lang->task->suffixHour
|
||||
)
|
||||
),
|
||||
span
|
||||
@@ -42,7 +42,7 @@ modalHeader
|
||||
span
|
||||
(
|
||||
setID('totalConsumed'),
|
||||
$task->consumed
|
||||
helper::formatHours($task->consumed)
|
||||
),
|
||||
$lang->task->suffixHour
|
||||
)
|
||||
@@ -63,6 +63,9 @@ if($efforts)
|
||||
$i = 1;
|
||||
foreach($efforts as $effort)
|
||||
{
|
||||
$effort->consumed = helper::formatHours($effort->consumed);
|
||||
$effort->left = helper::formatHours($effort->left);
|
||||
|
||||
$canOperateEffort = $this->task->canOperateEffort($task, $effort);
|
||||
$operateTips = $canOperateEffort ? '' : $lang->task->effortOperateTips;
|
||||
$hidden = ($taskEffortFold and $i > 3) ? 'hidden' : '';
|
||||
|
||||
@@ -45,6 +45,9 @@ if($this->config->edition == 'ipd')
|
||||
}
|
||||
|
||||
$task->executionInfo = $execution;
|
||||
$task->estimate = helper::formatHours($task->estimate);
|
||||
$task->consumed = helper::formatHours($task->consumed);
|
||||
$task->left = helper::formatHours($task->left);
|
||||
$actions = !$task->deleted && common::canModify('execution', $execution) ? $this->loadModel('common')->buildOperateMenu($task) : array();
|
||||
$hasDivider = !empty($actions['mainActions']) && !empty($actions['suffixActions']);
|
||||
if(!empty($actions)) $actions = array_merge($actions['mainActions'], $hasDivider ? array(array('type' => 'divider')) : array(), $actions['suffixActions']);
|
||||
|
||||
Reference in New Issue
Block a user