Worked on creating and Saving Case tracker properties and started with Users and user groups(Ad hoc) Extjs
This commit is contained in:
@@ -5719,5 +5719,114 @@ class processMap {
|
||||
}
|
||||
return $aReportTable;
|
||||
}
|
||||
function getExtAvailableUsersList($sTaskUID = '', $iType = 1) {
|
||||
try {
|
||||
$oTasks = new Tasks ( );
|
||||
$aAux = $oTasks->getGroupsOfTask($sTaskUID, $iType);
|
||||
$aUIDS1 = array();
|
||||
$aUIDS2 = array();
|
||||
foreach ($aAux as $aGroup) {
|
||||
$aUIDS1 [] = $aGroup ['GRP_UID'];
|
||||
}
|
||||
$aAux = $oTasks->getUsersOfTask($sTaskUID, $iType);
|
||||
foreach ($aAux as $aUser) {
|
||||
$aUIDS2 [] = $aUser ['USR_UID'];
|
||||
}
|
||||
$aUsers = array();
|
||||
$aUsers [] = array('LABEL' => 'char', 'TAS_UID' => 'char', 'USR_UID' => 'char', 'TU_TYPE' => 'integer', 'TU_RELATION' => 'integer');
|
||||
$sDelimiter = DBAdapter::getStringDelimiter ();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||
$oCriteria->addAsColumn('GRP_TITLE', 'C.CON_VALUE');
|
||||
$oCriteria->addAlias('C', 'CONTENT');
|
||||
$aConditions = array();
|
||||
$aConditions [] = array(GroupwfPeer::GRP_UID, 'C.CON_ID');
|
||||
$aConditions [] = array('C.CON_CATEGORY', $sDelimiter . 'GRP_TITLE' . $sDelimiter);
|
||||
$aConditions [] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
|
||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
|
||||
$oCriteria->add(GroupwfPeer::GRP_UID, $aUIDS1, Criteria::NOT_IN);
|
||||
//$oCriteria->add(GroupwfPeer::GRP_UID, '', Criteria::NOT_EQUAL);
|
||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$c = 0;
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$c++;
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn('COUNT(*) AS MEMBERS_NUMBER');
|
||||
$oCriteria->add(GroupUserPeer::GRP_UID, $aRow ['GRP_UID']);
|
||||
$oDataset2 = GroupUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset2->next();
|
||||
$aRow2 = $oDataset2->getRow();
|
||||
$aUsers [] = array('LABEL' => $aRow ['GRP_TITLE'] . ' <a href="#" onclick="usersGroup(\'' . $aRow ['GRP_UID'] . '\', \'' . $c . '\');return false;"><font color="green"><strong>(' . $aRow2 ['MEMBERS_NUMBER'] . ' ' . ((int) $aRow2 ['MEMBERS_NUMBER'] == 1 ? G::LoadTranslation('ID_USER') : G::LoadTranslation('ID_USERS')) . ')</strong></font></a> <br /><div id="users' . $c . '" style="display: none"></div>', 'TAS_UID' => $sTaskUID, 'USR_UID' => $aRow ['GRP_UID'], 'TU_TYPE' => $iType, 'TU_RELATION' => 2);
|
||||
$oDataset->next();
|
||||
}
|
||||
$sDelimiter = DBAdapter::getStringDelimiter ();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
|
||||
$oCriteria->add(UsersPeer::USR_UID, $aUIDS2, Criteria::NOT_IN);
|
||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aUsers [] = array('LABEL' => $aRow ['USR_FIRSTNAME'] . ' ' . $aRow ['USR_LASTNAME'], 'TAS_UID' => $sTaskUID, 'USR_UID' => $aRow ['USR_UID'], 'TU_TYPE' => $iType, 'TU_RELATION' => 1);
|
||||
$oDataset->next();
|
||||
}
|
||||
global $_DBArray;
|
||||
$_DBArray = (isset($_SESSION ['_DBArray']) ? $_SESSION ['_DBArray'] : '');
|
||||
$_DBArray ['availableUsers'] = $aUsers;
|
||||
$_SESSION ['_DBArray'] = $_DBArray;
|
||||
G::LoadClass('ArrayPeer');
|
||||
$oCriteria = new Criteria('dbarray');
|
||||
$oCriteria->setDBArrayTable('availableUsers');
|
||||
$oCriteria->addDescendingOrderByColumn(TaskUserPeer::TU_RELATION);
|
||||
$oCriteria->addAscendingOrderByColumn('LABEL');
|
||||
return $oCriteria;
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
function getExtusersadhoc($sProcessUID = '', $sTaskUID = '') {
|
||||
try {
|
||||
$oProcess = new Process ( );
|
||||
$aFields = $oProcess->load($sProcessUID);
|
||||
$oTask = new Task ( );
|
||||
$aFields = $oTask->load($sTaskUID);
|
||||
|
||||
$_SESSION ['iType'] = 2;
|
||||
|
||||
$aFields ['TASK'] = $sTaskUID;
|
||||
$aFields ['TYPE'] = $_SESSION ['iType'];
|
||||
$aFields ['OF_TO_ASSIGN'] = G::LoadTranslation('ID_DE_ASSIGN');
|
||||
$aFields ['CONFIRM'] = G::LoadTranslation('ID_MSG_CONFIRM_DEASIGN_USER_GROUP_MESSAGE');
|
||||
$aFields ['UIDS'] = "'0'";
|
||||
|
||||
$oTasks = new Tasks ( );
|
||||
$oGroups = new Groups ( );
|
||||
$aAux1 = $oTasks->getGroupsOfTask($sTaskUID, $_SESSION ['iType']);
|
||||
foreach ($aAux1 as $aGroup) {
|
||||
$aAux2 = $oGroups->getUsersOfGroup($aGroup ['GRP_UID']);
|
||||
foreach ($aAux2 as $aUser) {
|
||||
$aFields ['UIDS'] .= ",'" . $aUser ['USR_UID'] . "'";
|
||||
}
|
||||
}
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher ( );
|
||||
$oTask = new Task ( );
|
||||
$aTask = $oTask->load($sTaskUID);
|
||||
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'users/users_ShortListAdhoc', $this->getTaskUsersCriteria($sTaskUID, $_SESSION ['iType']), $aFields);
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
return true;
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,16 @@
|
||||
<?
|
||||
unset($_POST['form']['SAVE']);
|
||||
if (!isset($_POST['form']['CT_DERIVATION_HISTORY'])) {
|
||||
$_POST['form']['CT_DERIVATION_HISTORY'] = 0;
|
||||
if(isset($_POST['form']))
|
||||
$sValue = $_POST['form']; //For old processmap
|
||||
else
|
||||
$sValue = $_POST;
|
||||
|
||||
unset($sValue['SAVE']);
|
||||
if (!isset($sValue['CT_DERIVATION_HISTORY'])) {
|
||||
$sValue['CT_DERIVATION_HISTORY'] = 0;
|
||||
}
|
||||
if (!isset($_POST['form']['CT_MESSAGE_HISTORY'])) {
|
||||
$_POST['form']['CT_MESSAGE_HISTORY'] = 0;
|
||||
if (!isset($sValue['CT_MESSAGE_HISTORY'])) {
|
||||
$sValue['CT_MESSAGE_HISTORY'] = 0;
|
||||
}
|
||||
require_once 'classes/model/CaseTracker.php';
|
||||
$oCaseTracker = new CaseTracker();
|
||||
$oCaseTracker->update($_POST['form']);
|
||||
$oCaseTracker->update($sValue);
|
||||
@@ -77,6 +77,7 @@ MyWorkflow.prototype.AddTaskContextMenu= function(oShape)
|
||||
},
|
||||
{
|
||||
text: 'Users & Users Groups (ad-hoc)',
|
||||
handler: taskExtObj.editUsersAdHoc,
|
||||
scope: oShape
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1053,7 +1053,7 @@ ProcessMapContext.prototype.processSupervisors= function()
|
||||
});
|
||||
|
||||
var window = new Ext.Window({
|
||||
title: 'Assign Process Supervisor',
|
||||
title: 'Supervisor',
|
||||
collapsible: false,
|
||||
maximizable: false,
|
||||
width: 400,
|
||||
@@ -1270,7 +1270,7 @@ ProcessMapContext.prototype.processDynaform= function()
|
||||
});
|
||||
|
||||
var window = new Ext.Window({
|
||||
title: 'Assign Dynaform',
|
||||
title: 'Dynaform',
|
||||
collapsible: false,
|
||||
maximizable: false,
|
||||
width: 400,
|
||||
@@ -1487,7 +1487,7 @@ ProcessMapContext.prototype.processIODoc= function()
|
||||
});
|
||||
|
||||
var window = new Ext.Window({
|
||||
title: 'Assign Dynaform',
|
||||
title: 'Input Documents',
|
||||
collapsible: false,
|
||||
maximizable: false,
|
||||
width: 400,
|
||||
@@ -1517,7 +1517,7 @@ ProcessMapContext.prototype.processFileManager= function()
|
||||
,height:300
|
||||
});
|
||||
|
||||
var window = new Ext.Window({
|
||||
var window = new Ext.Window({
|
||||
title: 'Edit Process',
|
||||
collapsible: false,
|
||||
maximizable: false,
|
||||
@@ -1577,29 +1577,53 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
||||
labelWidth: 75, // label settings here cascade unless overridden
|
||||
frame:true,
|
||||
bodyStyle:'padding:5px 5px 0',
|
||||
width: 500,
|
||||
height: 400,
|
||||
defaults: {width: 350},
|
||||
width: 300,
|
||||
height: 300,
|
||||
//defaults: {width: 350},
|
||||
defaultType: 'textfield',
|
||||
items: [{
|
||||
width :100,
|
||||
xtype :'combo',
|
||||
mode :'local',
|
||||
triggerAction :'all',
|
||||
forceSelection :true,
|
||||
editable :false,
|
||||
fieldLabel :'Map Type',
|
||||
name :'CT_MAP_TYPE',
|
||||
displayField :'name',
|
||||
value :'Process Map',
|
||||
valueField :'value',
|
||||
store :new Ext.data.JsonStore({
|
||||
fields : ['name', 'value'],
|
||||
data :[{name: 'None', value:'0'},
|
||||
{name: 'Process Map', value: '1'},
|
||||
{name: 'Stages Map', value:'2'}]
|
||||
})
|
||||
},{
|
||||
xtype: 'fieldset',
|
||||
layout:'column',
|
||||
border:false,
|
||||
width: 400,
|
||||
//title: 'valueBased',
|
||||
hidden: false,
|
||||
id: 'evaluate',
|
||||
items:[{
|
||||
columnWidth:.6,
|
||||
layout: 'form',
|
||||
border:false,
|
||||
items: [{
|
||||
width :100,
|
||||
xtype :'combo',
|
||||
mode :'local',
|
||||
triggerAction :'all',
|
||||
forceSelection :true,
|
||||
editable :false,
|
||||
fieldLabel :'Map Type',
|
||||
name :'CT_MAP_TYPE',
|
||||
displayField :'name',
|
||||
value :'PROCESSMAP',
|
||||
valueField :'value',
|
||||
store :new Ext.data.JsonStore({
|
||||
fields : ['name', 'value'],
|
||||
data :[{name: 'None', value:'NONE'},
|
||||
{name: 'PROCESSMAP', value: 'PROCESSMAP'},
|
||||
{name: 'STAGES', value:'STAGES'}]
|
||||
})
|
||||
}]
|
||||
},{
|
||||
columnWidth:.3,
|
||||
layout: 'form',
|
||||
border:false,
|
||||
items: [{
|
||||
xtype: 'box',
|
||||
bodyStyle: 'padding:0 0 0 50px;',
|
||||
autoEl: {tag: 'a', href: '../tracker/tracker_Ajax?PRO_UID=pro_uid&action=editStagesMap', children: [{tag: 'div', html: 'Edit'}]},
|
||||
style: 'cursor:pointer;'
|
||||
}]
|
||||
}]
|
||||
},{
|
||||
xtype: 'checkbox',
|
||||
fieldLabel: 'Derivation History',
|
||||
name: 'CT_DERIVATION_HISTORY'
|
||||
@@ -1609,17 +1633,17 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
||||
fieldLabel: 'Messages History',
|
||||
name: 'CT_MESSAGE_HISTORY'
|
||||
// checked:checkMessages
|
||||
}]
|
||||
}]
|
||||
|
||||
});
|
||||
var Propertieswindow = new Ext.Window({
|
||||
title: 'Edit Process',
|
||||
title: 'Case tracker',
|
||||
collapsible: false,
|
||||
maximizable: false,
|
||||
width: 500,
|
||||
height: 400,
|
||||
minWidth: 300,
|
||||
minHeight: 200,
|
||||
width: 300,
|
||||
height: 300,
|
||||
//minWidth: 300,
|
||||
//minHeight: 200,
|
||||
layout: 'fit',
|
||||
plain: true,
|
||||
bodyStyle: 'padding:5px;',
|
||||
@@ -1629,13 +1653,22 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
||||
text: 'Save',
|
||||
handler: function(){
|
||||
var getForm = PropertiesForm.getForm().getValues();
|
||||
var pro_uid = getForm.PRO_UID;
|
||||
//var pro_uid = getForm.PRO_UID;
|
||||
var MapType = getForm.CT_MAP_TYPE;
|
||||
var DerivationHistory = getForm.CT_DERIVATION_HISTORY;
|
||||
var MessageHistory = getForm.CT_MESSAGE_HISTORY;
|
||||
if(DerivationHistory == 'on')
|
||||
DerivationHistory = '1';
|
||||
else
|
||||
DerivationHistory = '0';
|
||||
|
||||
if(MessageHistory == 'on')
|
||||
MessageHistory = '1';
|
||||
else
|
||||
MessageHistory = '0';
|
||||
|
||||
Ext.Ajax.request({
|
||||
url : '../tracker/tracker_save.php',
|
||||
url : '../tracker/tracker_Save.php',
|
||||
method: 'POST',
|
||||
params:{
|
||||
PRO_UID :pro_uid,
|
||||
@@ -1645,7 +1678,7 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
|
||||
},
|
||||
success: function(response) {
|
||||
Ext.MessageBox.alert ('Status','Connection Saved Successfully.');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},{
|
||||
|
||||
@@ -528,7 +528,7 @@ ProcessOptions.prototype.dbConnection = function()
|
||||
|
||||
var btnRemove = new Ext.Button({
|
||||
id: 'btnRemove',
|
||||
text: 'Remove Step',
|
||||
text: 'Remove',
|
||||
iconCls: 'application_delete',
|
||||
handler: function (s) {
|
||||
editor.stopEditing();
|
||||
@@ -861,7 +861,8 @@ ProcessOptions.prototype.dbConnection = function()
|
||||
fieldLabel: 'Port',
|
||||
name: 'DBS_PORT',
|
||||
id:'port',
|
||||
allowBlank: false
|
||||
allowBlank: false,
|
||||
editable:false
|
||||
},{
|
||||
xtype: 'textarea',
|
||||
fieldLabel: 'Description',
|
||||
@@ -879,9 +880,9 @@ ProcessOptions.prototype.dbConnection = function()
|
||||
title: 'Add new Database Source',
|
||||
collapsible: false,
|
||||
maximizable: true,
|
||||
width: 450,
|
||||
width: 300,
|
||||
//autoHeight: true,
|
||||
height: 400,
|
||||
//height: 400,
|
||||
//layout: 'fit',
|
||||
plain: true,
|
||||
bodyStyle: 'padding:5px;',
|
||||
@@ -958,7 +959,7 @@ ProcessOptions.prototype.dbConnection = function()
|
||||
title: 'Database Source List',
|
||||
collapsible: false,
|
||||
maximizable: true,
|
||||
width: 550,
|
||||
width: 480,
|
||||
//autoHeight: true,
|
||||
height: 400,
|
||||
//layout: 'fit',
|
||||
@@ -1295,7 +1296,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
|
||||
autoHeight:false,
|
||||
clicksToEdit: 1,
|
||||
minHeight:400,
|
||||
height :400,
|
||||
height :350,
|
||||
layout: 'fit',
|
||||
cm: inputDocColumns,
|
||||
stripeRows: true,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user