Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-2576
This commit is contained in:
@@ -305,9 +305,9 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
|
||||
* @label order Grid
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#orderGrid.28.29
|
||||
*
|
||||
* @param array | $dataM | User ID | A grid, which is a numbered array containing associative arrays with field names and their values, it has to be set like this "@=".
|
||||
* @param array | $dataM | Grid Name | A grid, which is a numbered array containing associative arrays with field names and their values, it has to be set like this "@=".
|
||||
* @param string(32) | $field | Name of field | The name of the field by which the grid will be sorted.
|
||||
* @param string(32) | $ord = "ASC"| Optional parameter | Optional parameter. The order which can either be 'ASC' (ascending) or 'DESC' (descending). If not included, 'ASC' will be used by default.
|
||||
* @param string(32) | $ord = "ASC"| Optional parameter (Criteria) | Optional parameter. The order which can either be 'ASC' (ascending) or 'DESC' (descending). If not included, 'ASC' will be used by default.
|
||||
* @return array | $dataM | Grid Sorted | Grid sorted
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -171,6 +171,29 @@ class StepSupervisor extends BaseStepSupervisor
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next position for a atep
|
||||
*
|
||||
* @param string $sProcessUID
|
||||
* @return integer
|
||||
*
|
||||
*/
|
||||
public function getNextPositionAll ($sProcessUID)
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( '(COUNT(*) + 1) AS POSITION' );
|
||||
$oCriteria->add( StepSupervisorPeer::PRO_UID, $sProcessUID );
|
||||
$oDataset = StepSupervisorPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
return (int) $aRow['POSITION'];
|
||||
} catch (Exception $oException) {
|
||||
throw $Exception;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder the steps positions
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -90,6 +90,25 @@ class ProcessSupervisors extends Api
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
*
|
||||
* @url GET /:prjUid/process-supervisor/assignmentsteps
|
||||
*/
|
||||
public function doGetProcessSupervisorAssignmentsteps($prjUid)
|
||||
{
|
||||
try {
|
||||
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
|
||||
$arrayData = $supervisor->getProcessSupervisorDynaformsInputsDocuments($prjUid);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $pudUid {@min 32} {@max 32}
|
||||
@@ -129,6 +148,25 @@ class ProcessSupervisors extends Api
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
*
|
||||
* @url GET /:prjUid/process-supervisor/available-assignmentsteps
|
||||
*/
|
||||
public function doGetAvailableProcessSupervisorAssignmentstep($prjUid)
|
||||
{
|
||||
try {
|
||||
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
|
||||
$arrayData = $supervisor->getAvailableProcessSupervisorDynaformInputDocument($prjUid);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
*
|
||||
|
||||
@@ -165,6 +165,9 @@
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-casetracker"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-supervisors"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bpmn_shapes_legend">
|
||||
|
||||
@@ -186,9 +186,19 @@ Ext.onReady(function(){
|
||||
xtype: 'textfield',
|
||||
allowBlank: true,
|
||||
listeners:{
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().replace(/\s/g,'').toUpperCase());
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().replace(/^\s+/,'').replace(/\s+$/,''));
|
||||
var valueInputField= /^[0-9a-zA-Z\_|-]+$/.test(this.getValue()) ? true : false;
|
||||
if (valueInputField) {
|
||||
this.setValue(this.getValue().replace(/\s/g,'').toUpperCase());
|
||||
}else{
|
||||
//Ext.Msg.alert(_('ID_WARNING'), _('ID_FIELD_NAME'));
|
||||
this.setValue('');
|
||||
}
|
||||
}
|
||||
},
|
||||
validator: function(v) {
|
||||
return valueInputField= /^[0-9a-zA-Z\_|-]+$/.test(v)?true:false;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -198,7 +208,20 @@ Ext.onReady(function(){
|
||||
width: 220,
|
||||
editor:{
|
||||
xtype: 'textfield',
|
||||
allowBlank: true
|
||||
allowBlank: true,
|
||||
listeners:{
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().replace(/^\s+/,'').replace(/\s+$/,''));
|
||||
var valueInputField= /^[0-9a-zA-Z\_|-]+$/.test(this.getValue()) ? true : false;
|
||||
if (!valueInputField) {
|
||||
//Ext.Msg.alert(_('ID_WARNING'), _('ID_FIELD_LABEL'));
|
||||
this.setValue('');
|
||||
}
|
||||
}
|
||||
},
|
||||
validator: function(v) {
|
||||
return valueInputField= /^[0-9a-zA-Z\_|-]+$/.test(v)?true:_('ID_ROLE_NAME_NOT_EMPTY');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: 'field_type',
|
||||
|
||||
Reference in New Issue
Block a user