HOR-2456
This commit is contained in:
@@ -207,12 +207,14 @@ class database extends database_base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset( $aParameters['AutoIncrement'] ) && $aParameters['AutoIncrement']) {
|
if (isset( $aParameters['AutoIncrement'] ) && $aParameters['AutoIncrement']) {
|
||||||
$sSQL .= ' AUTO_INCREMENT PRIMARY KEY';
|
$sSQL .= ' AUTO_INCREMENT';
|
||||||
}
|
}
|
||||||
/*if ($aParameters['Key'] == 'PRI') {
|
if (isset( $aParameters['Unique'] ) && $aParameters['Unique']) {
|
||||||
$sKeys .= 'ALTER TABLE ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter .
|
$sSQL .= ' UNIQUE';
|
||||||
' ADD PRIMARY KEY (' . $this->sQuoteCharacter . $sColumn . $this->sQuoteCharacter . ')' . $this->sEndLine;
|
} else {
|
||||||
}*/
|
$sSQL .= ' PRIMARY KEY';
|
||||||
|
}
|
||||||
|
|
||||||
if (isset( $aParameters['AI'] )) {
|
if (isset( $aParameters['AI'] )) {
|
||||||
if ($aParameters['AI'] == 1) {
|
if ($aParameters['AI'] == 1) {
|
||||||
$sSQL .= ' AUTO_INCREMENT';
|
$sSQL .= ' AUTO_INCREMENT';
|
||||||
|
|||||||
@@ -1,6 +1,140 @@
|
|||||||
<?php
|
<?php
|
||||||
class Applications
|
class Applications
|
||||||
{
|
{
|
||||||
|
public function searchAll(
|
||||||
|
$userUid,
|
||||||
|
$start = null,
|
||||||
|
$limit = null,
|
||||||
|
$search = null,
|
||||||
|
$process = null,
|
||||||
|
$status = null,
|
||||||
|
$dir = null,
|
||||||
|
$sort = null,
|
||||||
|
$category = null
|
||||||
|
) {
|
||||||
|
//Task Dummies
|
||||||
|
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
|
||||||
|
|
||||||
|
$newCriteria = new Criteria("workflow");
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_NUMBER);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_UID);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_STATUS);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::PRO_UID);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_CREATE_DATE);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_FINISH_DATE);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_UPDATE_DATE);
|
||||||
|
$newCriteria->addSelectColumn(ApplicationPeer::APP_TITLE);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::USR_UID);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::TAS_UID);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_LAST_INDEX);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_FINISH_DATE);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_TASK_DUE_DATE);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_RISK_DATE);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_THREAD_STATUS);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_PRIORITY);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_DURATION);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_QUEUE_DURATION);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_STARTED);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_DELAY_DURATION);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_FINISHED);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_DELAYED);
|
||||||
|
$newCriteria->addSelectColumn(AppDelegationPeer::DEL_DELAY_DURATION);
|
||||||
|
$newCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||||
|
$newCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||||
|
$newCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||||
|
$newCriteria->addSelectColumn(TaskPeer::TAS_TITLE);
|
||||||
|
$newCriteria->addSelectColumn(ProcessPeer::PRO_TITLE);
|
||||||
|
$newCriteria->addJoin(AppDelegationPeer::APP_NUMBER , ApplicationPeer::APP_NUMBER, Criteria::LEFT_JOIN);
|
||||||
|
$newCriteria->addJoin(AppDelegationPeer::DELEGATION_ID , AppThreadPeer::DELEGATION_ID, Criteria::LEFT_JOIN);
|
||||||
|
$newCriteria->addJoin(AppDelegationPeer::USR_ID , UsersPeer::USR_ID, Criteria::LEFT_JOIN);
|
||||||
|
$newCriteria->addJoin(AppDelegationPeer::PRO_ID , ProcessPeer::PRO_ID, Criteria::LEFT_JOIN);
|
||||||
|
$newCriteria->addJoin(AppDelegationPeer::TAS_ID , TaskPeer::TAS_ID, Criteria::LEFT_JOIN);
|
||||||
|
$newCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||||
|
switch ($status) {
|
||||||
|
case 1: //DRAFT
|
||||||
|
$newCriteria->add(ApplicationPeer::APP_STATUS_ID, 1);
|
||||||
|
break;
|
||||||
|
case 2: //TO_DO
|
||||||
|
$newCriteria->add(ApplicationPeer::APP_STATUS_ID, 2);
|
||||||
|
break;
|
||||||
|
case 3: //COMPLETED
|
||||||
|
$newCriteria->addOr(AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED');
|
||||||
|
$newCriteria->add(ApplicationPeer::APP_STATUS_ID, 3);
|
||||||
|
$newCriteria->add(AppDelegationPeer::DEL_LAST_INDEX, '1');
|
||||||
|
break;
|
||||||
|
case 4: //CANCELLED
|
||||||
|
$newCriteria->addOr(AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED');
|
||||||
|
$newCriteria->add(ApplicationPeer::APP_STATUS_ID, 4);
|
||||||
|
$newCriteria->add(AppDelegationPeer::DEL_LAST_INDEX, '1');
|
||||||
|
break;
|
||||||
|
case "PAUSED": //This status is not considered in the search, maybe we can add in the new versions
|
||||||
|
$newCriteria->add(ApplicationPeer::APP_STATUS, 'TO_DO');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!empty($userUid)) {
|
||||||
|
$newCriteria->add(AppDelegationPeer::USR_ID, $userUid);
|
||||||
|
}
|
||||||
|
if (!empty($process)) {
|
||||||
|
$newCriteria->add(ProcessPeer::PRO_ID, $process);
|
||||||
|
}
|
||||||
|
if (!empty($category)) {
|
||||||
|
$newCriteria->add(ProcessPeer::PRO_CATEGORY, $category);
|
||||||
|
}
|
||||||
|
if (!empty($search)) {
|
||||||
|
//APP_NUMBER APP_TAS_TITLE APP_TITLE
|
||||||
|
$newCriteria->add( $newCriteria->getNewCriterion( ApplicationPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )
|
||||||
|
->addOr( $newCriteria->getNewCriterion( TaskPeer::TAS_TITLE, '%' . $search . '%', Criteria::LIKE )
|
||||||
|
->addOr( $newCriteria->getNewCriterion( ApplicationPeer::APP_NUMBER, '%' . $search . '%', Criteria::LIKE ) ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$newCriteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
|
||||||
|
$totalCount = ApplicationPeer::doCount($newCriteria, false);
|
||||||
|
|
||||||
|
//Filters
|
||||||
|
if ($dir == "DESC") {
|
||||||
|
$newCriteria->addDescendingOrderByColumn($sort);
|
||||||
|
} else {
|
||||||
|
$newCriteria->addAscendingOrderByColumn($sort);
|
||||||
|
}
|
||||||
|
$newCriteria->setLimit( $limit );
|
||||||
|
$newCriteria->setOffset( $start );
|
||||||
|
|
||||||
|
$oDataset = ApplicationPeer::doSelectRS( $newCriteria, Propel::getDbConnection('workflow') );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
|
$result = array ();
|
||||||
|
$result['totalCount'] = $totalCount;
|
||||||
|
$rows = array();
|
||||||
|
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||||
|
while ($oDataset->next()) {
|
||||||
|
$aRow = $oDataset->getRow();
|
||||||
|
if (isset( $aRow['APP_STATUS'] )) {
|
||||||
|
$aRow['APP_STATUS_LABEL'] = G::LoadTranslation( "ID_{$aRow['APP_STATUS']}" );
|
||||||
|
}
|
||||||
|
if (isset( $aRow['DEL_PRIORITY'] )) {
|
||||||
|
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
|
||||||
|
}
|
||||||
|
$aRow["APP_CURRENT_USER"] = $aRow["USR_LASTNAME"].' '.$aRow["USR_FIRSTNAME"];
|
||||||
|
$aRow["APPDELCR_APP_TAS_TITLE"] = '';
|
||||||
|
$aRow["USRCR_USR_UID"] = $aRow["USR_UID"];
|
||||||
|
$aRow["USRCR_USR_FIRSTNAME"] = $aRow["USR_FIRSTNAME"];
|
||||||
|
$aRow["USRCR_USR_LASTNAME"] = $aRow["USR_LASTNAME"];
|
||||||
|
$aRow["USRCR_USR_USERNAME"] = $aRow["USR_USERNAME"];
|
||||||
|
$aRow["APP_OVERDUE_PERCENTAGE"] = '';
|
||||||
|
$aRow["APP_TAS_TITLE"] = $aRow["TAS_TITLE"];
|
||||||
|
$aRow["APP_TITLE"] = $aRow["APP_TITLE"];
|
||||||
|
$aRow["APP_PRO_TITLE"] = $aRow["PRO_TITLE"];
|
||||||
|
$rows[] = $aRow;
|
||||||
|
}
|
||||||
|
$result['data'] = $rows;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
public function getAll(
|
public function getAll(
|
||||||
$userUid,
|
$userUid,
|
||||||
$start = null,
|
$start = null,
|
||||||
|
|||||||
@@ -807,6 +807,7 @@ class System
|
|||||||
$required = (in_array(strtolower($required), array('1', 'true'
|
$required = (in_array(strtolower($required), array('1', 'true'
|
||||||
)));
|
)));
|
||||||
$autoIncrement = $oColumn->hasAttribute('autoIncrement') ? $oColumn->hasAttribute('autoIncrement') : false;
|
$autoIncrement = $oColumn->hasAttribute('autoIncrement') ? $oColumn->hasAttribute('autoIncrement') : false;
|
||||||
|
$unique = $oColumn->hasAttribute('unique') ? $oColumn->hasAttribute('unique') : false;
|
||||||
$default = $oColumn->hasAttribute('default') ? $oColumn->getAttribute('default') : null;
|
$default = $oColumn->hasAttribute('default') ? $oColumn->getAttribute('default') : null;
|
||||||
|
|
||||||
$primaryKey = $oColumn->hasAttribute('primaryKey') ? $oColumn->getAttribute('primaryKey') : null;
|
$primaryKey = $oColumn->hasAttribute('primaryKey') ? $oColumn->getAttribute('primaryKey') : null;
|
||||||
@@ -816,8 +817,14 @@ class System
|
|||||||
if ($primaryKey) {
|
if ($primaryKey) {
|
||||||
$aPrimaryKeys[] = $sColumName;
|
$aPrimaryKeys[] = $sColumName;
|
||||||
}
|
}
|
||||||
$aSchema[$sTableName][$sColumName] = array('Field' => $sColumName, 'Type' => $type,
|
$aSchema[$sTableName][$sColumName] = array(
|
||||||
'Null' => $required ? "NO" : "YES", 'Default' => $default, 'AutoIncrement' => $autoIncrement);
|
'Field' => $sColumName,
|
||||||
|
'Type' => $type,
|
||||||
|
'Null' => $required ? "NO" : "YES",
|
||||||
|
'Default' => $default,
|
||||||
|
'AutoIncrement' => $autoIncrement,
|
||||||
|
'Unique' => $unique
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($aPrimaryKeys) && count($aPrimaryKeys) > 0) {
|
if (is_array($aPrimaryKeys) && count($aPrimaryKeys) > 0) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Application extends BaseApplication
|
|||||||
*/
|
*/
|
||||||
protected $app_title_content = '';
|
protected $app_title_content = '';
|
||||||
protected $app_description_content = '';
|
protected $app_description_content = '';
|
||||||
//protected $app_proc_code = '';
|
public static $app_status_values = ['DRAFT' => 1, 'TO_DO' => 2, 'COMPLETED' => 3, 'CANCELLED' => 4];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [app_title_content] column value.
|
* Get the [app_title_content] column value.
|
||||||
@@ -225,7 +225,8 @@ class Application extends BaseApplication
|
|||||||
$this->setAppUid(G::generateUniqueID());
|
$this->setAppUid(G::generateUniqueID());
|
||||||
$this->setAppParent('');
|
$this->setAppParent('');
|
||||||
$this->setAppStatus('DRAFT');
|
$this->setAppStatus('DRAFT');
|
||||||
$this->setProUid( $sProUid);
|
$this->setAppStatusId(1);
|
||||||
|
$this->setProUid($sProUid);
|
||||||
$this->setAppProcStatus('');
|
$this->setAppProcStatus('');
|
||||||
$this->setAppProcCode('');
|
$this->setAppProcCode('');
|
||||||
$this->setAppParallel('N');
|
$this->setAppParallel('N');
|
||||||
@@ -294,6 +295,9 @@ class Application extends BaseApplication
|
|||||||
$oApp->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
$oApp->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||||
|
|
||||||
if ($oApp->validate()) {
|
if ($oApp->validate()) {
|
||||||
|
if (isset($aData['APP_STATUS'])) {
|
||||||
|
$oApp->setAppStatusId(self::$app_status_values[$aData['APP_STATUS']]);
|
||||||
|
}
|
||||||
if (isset($aData['APP_TITLE'])) {
|
if (isset($aData['APP_TITLE'])) {
|
||||||
$oApp->setAppTitleContent($aData['APP_TITLE']);
|
$oApp->setAppTitleContent($aData['APP_TITLE']);
|
||||||
}
|
}
|
||||||
@@ -301,9 +305,6 @@ class Application extends BaseApplication
|
|||||||
$oApp->setAppDescriptionContent($aData['APP_DESCRIPTION']);
|
$oApp->setAppDescriptionContent($aData['APP_DESCRIPTION']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if ( isset ( $aData['APP_PROC_CODE'] ) )
|
|
||||||
//$oApp->setAppProcCode( $aData['APP_PROC_CODE'] );
|
|
||||||
|
|
||||||
$res = $oApp->save();
|
$res = $oApp->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class ApplicationMapBuilder
|
|||||||
|
|
||||||
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||||
|
|
||||||
$tMap->addColumn('APP_STATUS_ID', 'AppStatusId', 'int', CreoleTypes::INTEGER, true, null);
|
$tMap->addColumn('APP_STATUS_ID', 'AppStatusId', 'int', CreoleTypes::TINYINT, true, null);
|
||||||
|
|
||||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||||
<column name="APP_PARENT" type="VARCHAR" size="32" required="true" default="0"/>
|
<column name="APP_PARENT" type="VARCHAR" size="32" required="true" default="0"/>
|
||||||
<column name="APP_STATUS" type="VARCHAR" size="100" required="true" default=""/>
|
<column name="APP_STATUS" type="VARCHAR" size="100" required="true" default=""/>
|
||||||
<column name="APP_STATUS_ID" type="INTEGER" required="true" default="1"/>
|
<column name="APP_STATUS_ID" type="TINYINT" required="true" default="1"/>
|
||||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||||
<column name="APP_PROC_STATUS" type="VARCHAR" size="100" required="true" default=""/>
|
<column name="APP_PROC_STATUS" type="VARCHAR" size="100" required="true" default=""/>
|
||||||
<column name="APP_PROC_CODE" type="VARCHAR" size="100" required="true" default=""/>
|
<column name="APP_PROC_CODE" type="VARCHAR" size="100" required="true" default=""/>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ CREATE TABLE `APPLICATION`
|
|||||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||||
`APP_PARENT` VARCHAR(32) default '0' NOT NULL,
|
`APP_PARENT` VARCHAR(32) default '0' NOT NULL,
|
||||||
`APP_STATUS` VARCHAR(100) default '' NOT NULL,
|
`APP_STATUS` VARCHAR(100) default '' NOT NULL,
|
||||||
`APP_STATUS_ID` INTEGER default 1 NOT NULL,
|
`APP_STATUS_ID` TINYINT default 1 NOT NULL,
|
||||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||||
`APP_PROC_STATUS` VARCHAR(100) default '' NOT NULL,
|
`APP_PROC_STATUS` VARCHAR(100) default '' NOT NULL,
|
||||||
`APP_PROC_CODE` VARCHAR(100) default '' NOT NULL,
|
`APP_PROC_CODE` VARCHAR(100) default '' NOT NULL,
|
||||||
|
|||||||
@@ -235,14 +235,14 @@ function getUserArray ($action, $userUid)
|
|||||||
case 'search':
|
case 'search':
|
||||||
$cUsers = new Criteria( 'workflow' );
|
$cUsers = new Criteria( 'workflow' );
|
||||||
$cUsers->clearSelectColumns();
|
$cUsers->clearSelectColumns();
|
||||||
$cUsers->addSelectColumn( UsersPeer::USR_UID );
|
$cUsers->addSelectColumn( UsersPeer::USR_ID );
|
||||||
$cUsers->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
$cUsers->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||||
$cUsers->addSelectColumn( UsersPeer::USR_LASTNAME );
|
$cUsers->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||||
$oDataset = UsersPeer::doSelectRS( $cUsers );
|
$oDataset = UsersPeer::doSelectRS( $cUsers );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$users[] = array ($aRow['USR_UID'],$aRow['USR_LASTNAME'] . ' ' . $aRow['USR_FIRSTNAME']);
|
$users[] = array ($aRow['USR_ID'],$aRow['USR_LASTNAME'] . ' ' . $aRow['USR_FIRSTNAME']);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -308,14 +308,11 @@ function getAllUsersArray ($action)
|
|||||||
|
|
||||||
function getStatusArray($action, $userUid)
|
function getStatusArray($action, $userUid)
|
||||||
{
|
{
|
||||||
$status = array();
|
$aStatus = Application::$app_status_values;
|
||||||
$status[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
foreach ($aStatus as $key => $value) {
|
||||||
$status[] = array('COMPLETED', G::LoadTranslation('ID_CASES_STATUS_COMPLETED'));
|
$status[] = array ($value, G::LoadTranslation( 'ID_CASES_STATUS_' . $key ));
|
||||||
$status[] = array('DRAFT', G::LoadTranslation('ID_CASES_STATUS_DRAFT'));
|
}
|
||||||
$status[] = array('TO_DO', G::LoadTranslation('ID_CASES_STATUS_TO_DO'));
|
return $aStatus;
|
||||||
$status[] = array('CANCELLED', G::LoadTranslation('ID_CASES_STATUS_CANCELLED'));
|
|
||||||
|
|
||||||
return $status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//these getXX function gets the default fields in casesListSetup
|
//these getXX function gets the default fields in casesListSetup
|
||||||
|
|||||||
@@ -28,16 +28,6 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
/*require_once 'classes/model/Application.php';
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
require_once 'classes/model/AppThread.php';
|
|
||||||
require_once 'classes/model/AppDelay.php';
|
|
||||||
require_once 'classes/model/Process.php';
|
|
||||||
require_once 'classes/model/Task.php';
|
|
||||||
require_once ("classes/model/AppCacheView.php");
|
|
||||||
require_once ("classes/model/AppDelegation.php");
|
|
||||||
require_once ("classes/model/AdditionalTables.php");
|
|
||||||
require_once ("classes/model/AppDelay.php");*/
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
|
|
||||||
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
|
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
|
||||||
@@ -74,7 +64,7 @@ if ($actionAjax == "userValues") {
|
|||||||
|
|
||||||
$cUsers = new Criteria('workflow');
|
$cUsers = new Criteria('workflow');
|
||||||
$cUsers->clearSelectColumns();
|
$cUsers->clearSelectColumns();
|
||||||
$cUsers->addSelectColumn(UsersPeer::USR_UID);
|
$cUsers->addSelectColumn(UsersPeer::USR_ID);
|
||||||
$cUsers->addSelectColumn(UsersPeer::USR_USERNAME);
|
$cUsers->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||||
$cUsers->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
$cUsers->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||||
$cUsers->addSelectColumn(UsersPeer::USR_LASTNAME);
|
$cUsers->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||||
@@ -96,7 +86,7 @@ if ($actionAjax == "userValues") {
|
|||||||
|
|
||||||
$usrFullName = $conf->usersNameFormatBySetParameters($confEnvSetting["format"], $row["USR_USERNAME"], $row["USR_FIRSTNAME"], $row["USR_LASTNAME"]);
|
$usrFullName = $conf->usersNameFormatBySetParameters($confEnvSetting["format"], $row["USR_USERNAME"], $row["USR_FIRSTNAME"], $row["USR_LASTNAME"]);
|
||||||
|
|
||||||
$users[] = array("USR_UID" => $row["USR_UID"], "USR_FULLNAME" => $usrFullName);
|
$users[] = array("USR_ID" => $row["USR_UID"], "USR_FULLNAME" => $usrFullName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -124,7 +114,7 @@ if ($actionAjax == "processListExtJs") {
|
|||||||
$cProcess = new Criteria('workflow');
|
$cProcess = new Criteria('workflow');
|
||||||
//get the processes for this user in this action
|
//get the processes for this user in this action
|
||||||
$cProcess->clearSelectColumns();
|
$cProcess->clearSelectColumns();
|
||||||
$cProcess->addSelectColumn(ProcessPeer::PRO_UID);
|
$cProcess->addSelectColumn(ProcessPeer::PRO_ID);
|
||||||
$cProcess->addSelectColumn(ProcessPeer::PRO_TITLE);
|
$cProcess->addSelectColumn(ProcessPeer::PRO_TITLE);
|
||||||
if ($categoryUid) {
|
if ($categoryUid) {
|
||||||
$cProcess->add(ProcessPeer::PRO_CATEGORY, $categoryUid);
|
$cProcess->add(ProcessPeer::PRO_CATEGORY, $categoryUid);
|
||||||
@@ -221,6 +211,7 @@ if ($actionAjax == "getUsersToReassign") {
|
|||||||
|
|
||||||
echo G::json_encode($response);
|
echo G::json_encode($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($actionAjax == 'reassignCase') {
|
if ($actionAjax == 'reassignCase') {
|
||||||
|
|
||||||
$APP_UID = $_REQUEST["APP_UID"];
|
$APP_UID = $_REQUEST["APP_UID"];
|
||||||
@@ -255,16 +246,15 @@ if ($actionAjax == 'reassignCase') {
|
|||||||
if($flagReassign){
|
if($flagReassign){
|
||||||
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
|
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
$caseData = $app->load($_SESSION['APPLICATION']);
|
$caseData = $app->load($_SESSION['APPLICATION']);
|
||||||
$userData = $user->load($TO_USR_UID);
|
$userData = $user->load($TO_USR_UID);
|
||||||
//print_r($caseData);
|
|
||||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||||
$data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
$data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
||||||
$result = new stdClass();
|
$result = new stdClass();
|
||||||
$result->status = 0;
|
$result->status = 0;
|
||||||
$result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
|
$result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
|
||||||
|
|
||||||
// Save the note reassign reason
|
// Save the note reassign reason
|
||||||
if (isset($_POST['NOTE_REASON']) && $_POST['NOTE_REASON'] !== '') {
|
if (isset($_POST['NOTE_REASON']) && $_POST['NOTE_REASON'] !== '') {
|
||||||
require_once ("classes/model/AppNotes.php");
|
require_once ("classes/model/AppNotes.php");
|
||||||
|
|||||||
@@ -115,21 +115,15 @@ try {
|
|||||||
G::LoadClass("applications");
|
G::LoadClass("applications");
|
||||||
|
|
||||||
$apps = new Applications();
|
$apps = new Applications();
|
||||||
$data = $apps->getAll(
|
$data = $apps->searchAll(
|
||||||
$userUid,
|
$userUid,
|
||||||
$start,
|
$start,
|
||||||
$limit,
|
$limit,
|
||||||
$action,
|
|
||||||
$filter,
|
|
||||||
$search,
|
$search,
|
||||||
$process,
|
$process,
|
||||||
$filterStatus,
|
$filterStatus,
|
||||||
$type,
|
|
||||||
$dateFrom,
|
|
||||||
$dateTo,
|
|
||||||
$callback,
|
|
||||||
$dir,
|
$dir,
|
||||||
(strpos($sort, ".") !== false)? $sort : "APP_CACHE_VIEW." . $sort,
|
(strpos($sort, ".") !== false)? $sort : "APPLICATION." . $sort,
|
||||||
$category
|
$category
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -843,7 +843,7 @@ Ext.onReady ( function() {
|
|||||||
reader: readerCasesList,
|
reader: readerCasesList,
|
||||||
writer: writerCasesList, // <-- plug a DataWriter into the store just as you would a Reader
|
writer: writerCasesList, // <-- plug a DataWriter into the store just as you would a Reader
|
||||||
autoSave: true, // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
|
autoSave: true, // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
|
||||||
sortInfo:{field: 'APP_CACHE_VIEW.APP_NUMBER', direction: "DESC"},
|
sortInfo:{field: 'APPLICATION.APP_NUMBER', direction: "DESC"},
|
||||||
listeners: {
|
listeners: {
|
||||||
beforeload: function (store, options)
|
beforeload: function (store, options)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user