* Finish importbuild to kanban.

This commit is contained in:
wangyuting
2023-11-07 05:34:21 +00:00
parent 2aea71c370
commit c6afb52c8a
6 changed files with 68 additions and 5 deletions
+2 -1
View File
@@ -1302,7 +1302,8 @@ class kanban extends control
$this->loadModel('action')->create('kanbancard', $cardID, 'importedBuild', '', $buildID);
}
return print(js::locate($this->createLink('kanban', 'view', "kanbanID=$kanbanID"), 'parent.parent'));
$callback = $this->kanban->getKanbanCallback($kanbanID, $regionID);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => $callback));
}
$this->loadModel('build');
+15
View File
@@ -0,0 +1,15 @@
$(document).off('click', '.batch-btn').on('click', '.batch-btn', function()
{
const dtable = zui.DTable.query($(this).target);
const checkedList = dtable.$.getChecks();
if(!checkedList.length) return;
const url = $(this).data('url');
const form = new FormData();
form.append('targetLane', $('[name=lane]').val())
checkedList.forEach((id) => form.append('builds[]', id));
$.ajaxSubmit({url, data:form});
return false;
});
+47
View File
@@ -1,2 +1,49 @@
<?php
/**
* The importbuild view file of kanban module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yuting Wang <wangyuting@easycorp.ltd>
* @package kanban
* @link https://www.zentao.net
*/
namespace zin;
jsVar('kanbanID', $kanbanID);
jsVar('regionID', $regionID);
jsVar('groupID', $groupID);
jsVar('columnID', $columnID);
jsVar('methodName', $this->app->rawMethod);
featureBar
(
inputGroup
(
span(set::className('input-group-addon'), $lang->kanban->selectedProduct),
picker(set::name('project'), set::items($projects), set::value($selectedProjectID), set::style(array('width' => '200px')), set('data-on', 'change'), set('data-call', 'changeProject'), set::required(true)),
span(set::className('input-group-addon'), $lang->kanban->selectedLane),
picker(set::name('lane'), set::items($lanePairs), set::style(array('width' => '200px')), set::required(true)),
)
);
$config->build->dtable->fieldList['execution']['name'] = 'executionName';
unset($config->build->dtable->fieldList['branch']);
unset($config->build->dtable->fieldList['path']);
unset($config->build->dtable->fieldList['actions']);
formBase
(
set::id('linkForm'),
set::actions(''),
set::className('mt-2'),
dtable
(
set::fixedLeftWidth('0.33'),
set::checkable(true),
set::userMap($users),
set::cols(array_values($config->build->dtable->fieldList)),
set::data(array_values($builds2Imported)),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importCard, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importBuild', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footPager(usePager())
)
);
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* The importrelease view file of kanban module of ZenTaoPMS.
* The importexecution view file of kanban module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yuting Wang <wangyuting@easycorp.ltd>
@@ -59,7 +59,7 @@ formBase
set::userMap($users),
set::cols(array_values($config->execution->dtable->fieldList)),
set::data(array_values($executions2Imported)),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importCard, 'btnType' => 'primary', 'className' => 'size-sm importcardBtn batch-btn', 'data-url' => inlink('importExecution', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importAB, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importExecution', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footPager(usePager())
)
);
+1 -1
View File
@@ -43,7 +43,7 @@ formBase
set::checkable(true),
set::cols(array_values($config->productplan->dtable->fieldList)),
set::data(array_values($plans2Imported)),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importCard, 'btnType' => 'primary', 'className' => 'size-sm importcardBtn batch-btn', 'data-url' => inlink('importplan', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importAB, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importplan', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footPager(usePager())
)
);
+1 -1
View File
@@ -57,7 +57,7 @@ formBase
set::checkable(true),
set::cols(array_values($config->release->dtable->fieldList)),
set::data(array_values($releases2Imported)),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importCard, 'btnType' => 'primary', 'className' => 'size-sm importcardBtn batch-btn', 'data-url' => inlink('importrelease', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footToolbar(array('items' => array(array('text' => $lang->kanban->importAB, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importrelease', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
set::footPager(usePager())
)
);