* Finish task #4978,#4979,#4985,#4992,#4998,#5003,#5004,#5005,#5006,

This commit is contained in:
yfl
2018-10-11 10:48:18 +08:00
parent 9263cafb61
commit 2dfb4aeeda
7 changed files with 15 additions and 13 deletions
+3 -6
View File
@@ -162,14 +162,12 @@ class blockModel extends model
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where("(status='wait' or status='doing')")
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)
->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->andWhere('deleted')->eq(0)
->fetch('count');
$data['products'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)
->where('status')->ne('closed')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)
->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
->andWhere('deleted')->eq(0)
->fetch('count');
@@ -190,8 +188,7 @@ class blockModel extends model
->fetch('count');
$data['delayProject'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where('status')->in('wait,doing')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)
->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->andWhere('end')->lt($today)
->andWhere('deleted')->eq(0)
->fetch('count');
+4
View File
@@ -2471,6 +2471,10 @@ class bugModel extends model
$class .= ' text-left';
$title = "title='{$bug->title}'";
}
if($id == 'type')
{
$title = "title='" . zget($this->lang->bug->typeList, $bug->type) . "'";
}
if($id == 'assignedTo')
{
$class .= ' has-btn text-left';
+1 -1
View File
@@ -401,7 +401,7 @@ $(function()
}
var data = $row.data();
checkedEstimate += data.estimate;
checkedCase += data.cases;
if(data.cases > 0) checkedCase += 1;
});
var rate = Math.round(checkedCase / checkedTotal * 10000) / 100 + '' + '%';
return checkedSummary.replace('%total%', checkedTotal)
+1 -1
View File
@@ -302,7 +302,7 @@ $lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
$lang->project->featureBar['task']['assignedtome'] = $lang->project->assignedToMe;
$lang->project->featureBar['task']['myinvolved'] = $lang->project->myInvolved;
$lang->project->featureBar['task']['delayed'] = '已延期';
$lang->project->featureBar['task']['needconfirm'] = '需求变';
$lang->project->featureBar['task']['needconfirm'] = '需求变';
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
$lang->project->treeLevel = array();
+2
View File
@@ -93,6 +93,7 @@ class reportModel extends model
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.status')->ne('cancel')
->andWhere('t1.deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
->andWhere('t2.deleted')->eq(0)
->andWhere('t1.parent')->eq(0)
->andWhere('t2.status')->eq('closed')
@@ -131,6 +132,7 @@ class reportModel extends model
$products = $this->dao->select('id, code, name, PO')->from(TABLE_PRODUCT)
->where('deleted')->eq(0)
->beginIF(strpos($conditions, 'closedProduct') === false)->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
->fetchAll('id');
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('deleted')->eq(0)->andWhere('product')->in(array_keys($products))
->beginIF(strpos($conditions, 'overduePlan') === false)->andWhere('end')->gt(date('Y-m-d'))->fi()
+1 -1
View File
@@ -23,7 +23,7 @@ $(document).ready(function()
}
}
}
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + module + '&storyID='+ $(select).val() + '&onlyOption=true&status=noclosed');
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + module + '&storyID='+ $(select).val() + '&onlyOption=true');
$('#story' + index).load(link, function(){$(this).trigger("chosen:updated");});
}
if($(select).val() == 'ditto')
+3 -4
View File
@@ -42,18 +42,17 @@ function loadList(type, id)
{
$.get(link, function(data, status)
{
if(data != ' ')
if(data.length != 0)
{
$(divClass).html(data).find('select').chosen();
}
else
{
$("#type").val("custom");
$(divClass).html("<select id='bugs' class='form-control'></select>").find('select').chosen();
$(divClass).html("<select id="+ type +" class='form-control'></select>").find('select').chosen();
}
});
}
else if(type == 'custom')
else
{
$(divClass).html($(divID).html());
}