This commit is contained in:
tanghucheng
2022-06-07 11:35:20 +08:00
10 changed files with 23 additions and 12 deletions

View File

@@ -20,7 +20,8 @@ class taskRecordEstimateEntry extends Entry
*/
public function get($taskID)
{
if($this->config->edition != 'open')
$issetEffort = $this->loadModel('effort') ? true : false;
if($issetEffort)
{
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('task', $taskID);
@@ -36,8 +37,8 @@ class taskRecordEstimateEntry extends Entry
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$effort = array();
if($this->config->edition != 'open' and $data->data->efforts) $effort = $data->data->efforts;
if($this->config->edition == 'open' and $data->data->estimates) $effort = $data->data->estimates;
if($issetEffort and $data->data->efforts) $effort = $data->data->efforts;
if(!$issetEffort and $data->data->estimates) $effort = $data->data->estimates;
$this->send(200, array('effort' => $effort));
}
@@ -51,7 +52,7 @@ class taskRecordEstimateEntry extends Entry
*/
public function post($taskID)
{
if($this->config->edition != 'open')
if($this->loadModel('effort'))
{
$fields = 'id,dates,consumed,left,objectType,objectID,work';
$this->batchSetPost($fields);

View File

@@ -896,7 +896,8 @@ class block extends control
$count = isset($this->params->count) ? (int)$this->params->count : 15;
/* Get projects. */
$projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count);
$excludedModel = $this->config->edition == 'max' ? '' : 'waterfall';
$projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count, $excludedModel);
if(empty($projects))
{
$this->view->projects = $projects;

View File

@@ -11,7 +11,7 @@ $config->company->dynamic->search['module'] = 'action';
if($config->vision == 'rnd') $config->company->dynamic->search['fields']['product'] = $lang->action->product;
$config->company->dynamic->search['fields']['project'] = '项目';
if($config->systemMode == 'new') $config->company->dynamic->search['fields']['project'] = '项目';
$config->company->dynamic->search['fields']['execution'] = $lang->action->execution;
$config->company->dynamic->search['fields']['actor'] = $lang->action->actor;
$config->company->dynamic->search['fields']['objectID'] = $lang->action->objectID;

View File

@@ -126,7 +126,7 @@ class execution extends control
$execution = $this->commonAction($executionID, $status);
$executionID = $execution->id;
if($execution->type == 'kanban' and $this->config->vision != 'lite' and defined('RUN_MODE') and RUN_MODE != 'api') $this->locate($this->createLink('execution', 'kanban', "executionID=$executionID"));
if($execution->type == 'kanban' and $this->config->vision != 'lite' and $this->app->getViewType() != 'json') $this->locate($this->createLink('execution', 'kanban', "executionID=$executionID"));
/* Get products by execution. */
$products = $this->product->getProductPairsByProject($executionID);

View File

@@ -17,6 +17,9 @@
#execution_chosen .chosen-single {width: 230px;}
#execution_chosen .chosen-drop ul li .label {margin-top: 2px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;}
.radio-inline {line-height: normal;}
#dept + .picker {width: 220px;}
#execution + .picker {width: 230px;}
#mainMenu .picker-has-value {float: left;}
#teamForm .table tr > td:first-child {padding-left: 10px;}
#teamForm .table tr > td:last-child {padding-right: 10px;}

View File

@@ -1,10 +1,10 @@
$(function()
{
$('#execution_chosen').click(function()
$('#execution_chosen, #execution + .picker').click(function()
{
if(systemMode == 'new')
{
$('#execution_chosen ul li').each(function(index)
$('#execution_chosen ul li, #pickerDropMenu-pk_execution div a').each(function(index)
{
if(index == 0)
{

View File

@@ -30,7 +30,11 @@
<?php if(empty($projectStats)):?>
<div class="table-empty-tip">
<p>
<?php if($config->systemMode == 'new'):?>
<span class="text-muted"><?php echo $lang->project->empty;?></span>
<?php else:?>
<span class="text-muted"><?php echo $lang->execution->noExecution;?></span>
<?php endif;?>
</p>
</div>
<?php else:?>

View File

@@ -274,7 +274,7 @@ class productplan extends control
}
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
die(js::locate(inlink('browse', "productID=$plan->product"), 'parent'));
die(js::reload('parent'));
}
}

View File

@@ -273,16 +273,18 @@ class projectModel extends model
* @param string|int $param
* @param string $orderBy
* @param int $limit
* @param string $excludedModel
* @access public
* @return array
*/
public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15)
public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15, $excludedModel = '')
{
$queryType = strtolower($queryType);
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('type')->eq('project')
->andWhere('vision')->eq($this->config->vision)
->andWhere('deleted')->eq(0)
->beginIF($excludedModel)->andWhere('model')->ne($excludedModel)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->beginIF($queryType == 'bystatus' and $param == 'undone')->andWhere('status')->notIN('done,closed')->fi()
->beginIF($queryType == 'bystatus' and $param != 'all' and $param != 'undone')->andWhere('status')->eq($param)->fi()

View File

@@ -245,7 +245,7 @@ function setMailto(mailto, contactListID)
{
$('#' + mailto).replaceWith(users);
$('#' + mailto + '_chosen').remove();
$('.picker').remove();
$('#' + mailto).siblings('.picker').remove();
if($("[data-pickertype='remote']").length == 0 && $('.picker-select').length == 0)
{