* Get delay for project, and show delay info in project block.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.project-list-block .projectName a {overflow: hidden; text-overflow: clip; white-space: nowrap;}
|
||||
|
||||
@@ -2,7 +2,7 @@ window.onRenderProjectNameCell = function(result, info)
|
||||
{
|
||||
if(info.col.name === 'name' && info.row.data.delay > 0)
|
||||
{
|
||||
const html = {html : '<span class="label size-sm circle danger-pale">' + delayInfo.replace('%s', info.row.data.delay) + '</span>', className : 'flex items-end w-28', style : {flexDirection : "column"}};
|
||||
const html = {html : '<span class="label size-sm danger-pale flex-none nowrap">' + delayInfo.replace('%s', info.row.data.delay) + '</span>', className : 'flex items-end', style : {flexDirection : "column"}};
|
||||
result.push(html);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ if(!$longBlock)
|
||||
|
||||
blockPanel
|
||||
(
|
||||
setClass('list-block'),
|
||||
setClass('list-block project-list-block'),
|
||||
dtable
|
||||
(
|
||||
setID('project'),
|
||||
|
||||
@@ -261,6 +261,7 @@ class projectModel extends model
|
||||
$storySummary = $this->projectTao->getTotalStoriesByProject($projectIdList);
|
||||
|
||||
/* Set project attribute. */
|
||||
$today = helper::today();
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
$project->leftBugs = isset($bugSummary[$projectID]) ? $bugSummary[$projectID]->leftBugs : 0;
|
||||
@@ -275,6 +276,13 @@ class projectModel extends model
|
||||
$project->doingTasks = isset($taskSummary[$projectID]) ? $taskSummary[$projectID]->doingTasks : 0;
|
||||
$project->rndDoneTasks = isset($taskSummary[$projectID]) ? $taskSummary[$projectID]->doneTasks : 0;
|
||||
$project->liteDoneTasks = isset($taskSummary[$projectID]) ? $taskSummary[$projectID]->litedoneTasks : 0;
|
||||
|
||||
/* Judge whether the project is delayed. */
|
||||
if($project->status != 'done' && $project->status != 'closed' && $project->status != 'suspended')
|
||||
{
|
||||
$delay = helper::diffDate($today, $project->end);
|
||||
if($delay > 0) $project->delay = $delay;
|
||||
}
|
||||
}
|
||||
|
||||
return $projects;
|
||||
|
||||
Reference in New Issue
Block a user