HOR-133-3018 "Validar reports tables para grids..." SOLVED

This commit is contained in:
Luis Fernando Saisa Lopez
2016-01-29 18:24:50 -04:00
parent bf0110ab58
commit 8af71f089a
2 changed files with 34 additions and 13 deletions

View File

@@ -340,6 +340,8 @@ class Process extends BaseProcess
public function getAll ()
{
$bpmn = new \ProcessMaker\Project\Bpmn();
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( ProcessPeer::PRO_UID );
@@ -359,7 +361,9 @@ class Process extends BaseProcess
$processes = Array ();
$uids = array ();
while ($oDataset->next()) {
$processes[] = $oDataset->getRow();
$row = $oDataset->getRow();
$row['PRO_PROCESS_TYPE'] = ($bpmn->exists($row['PRO_UID']))? 'BPMN' : 'CLASSIC';
$processes[] = $row;
$uids[] = $processes[sizeof( $processes ) - 1]['PRO_UID'];
}
//process details will have the info about the processes

View File

@@ -721,9 +721,14 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
}
});
var types = new Ext.data.SimpleStore({
fields: ['REP_TAB_TYPE', 'type'],
data : [['NORMAL',_("ID_GLOBAL")],['GRID',_("ID_GRID")]]
var arrayBpmnTypeData = [["NORMAL", _("ID_GLOBAL")]];
var arrayClassicTypeData = [["NORMAL", _("ID_GLOBAL")], ["GRID", _("ID_GRID")]];
var types = new Ext.data.ArrayStore({
storeId: "types",
autoDestroy: true,
fields: ["REP_TAB_TYPE", "type"]
});
comboReport = new Ext.form.ComboBox({
@@ -889,7 +894,7 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
action: 'getProcessList'
},
reader : new Ext.data.JsonReader( {
fields : [{name : 'PRO_UID'}, {name : 'PRO_TITLE'},{name : 'PRO_DESCRIPTION'}]
fields : [{name : 'PRO_UID'}, {name : 'PRO_TITLE'},{name : 'PRO_DESCRIPTION'}, {name: "PRO_PROCESS_TYPE"}]
}),
listeners: {
load: function() {
@@ -952,6 +957,18 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
listeners:{
select: function(){
var dataStore = Ext.getCmp('PROCESS').store.getRange();
var i = Ext.getCmp('PROCESS').store.find("PRO_UID", Ext.getCmp('PROCESS').getValue());
types.loadData(
(dataStore[i].data.PRO_PROCESS_TYPE == "BPMN")? arrayBpmnTypeData : arrayClassicTypeData, false
);
var dataStoreAux = types.getRange(0);
comboReport.setValue(dataStoreAux[0].data.REP_TAB_TYPE);
comboGridsList.setVisible(false);
comboDbConnections.getStore().reload({params:{PRO_UID : Ext.getCmp('PROCESS').getValue()}});
if (Ext.getCmp('REP_TAB_TYPE').getValue() == 'GRID') {
gridsListStore.reload({params:{PRO_UID : Ext.getCmp('PROCESS').getValue()}});