Merge pull request #928 from julceslauhub/master
Column "Current User" removed from the "Participated list" due to performance reason.
This commit is contained in:
@@ -153,6 +153,20 @@ class AppProxy extends HttpProxyController
|
||||
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
|
||||
}
|
||||
|
||||
if ($httpData->action == 'sent') { // Get the last valid delegation for participated list
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||
$criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
|
||||
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||
$criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
|
||||
if (AppDelegationPeer::doCount($criteria) > 0) {
|
||||
$dataset = AppDelegationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$row = $dataset->getRow();
|
||||
$httpData->delIndex = $row['DEL_INDEX'];
|
||||
}
|
||||
}
|
||||
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
|
||||
$process = new Process();
|
||||
$processData = $process->load( $applicationFields['PRO_UID'] );
|
||||
@@ -194,6 +208,20 @@ class AppProxy extends HttpProxyController
|
||||
$processData = $_SESSION['_processData'];
|
||||
unset( $_SESSION['_processData'] );
|
||||
} else {
|
||||
if ($httpData->action == 'sent') { // Get the last valid delegation for participated list
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||
$criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
|
||||
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||
$criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
|
||||
if (AppDelegationPeer::doCount($criteria) > 0) {
|
||||
$dataset = AppDelegationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$row = $dataset->getRow();
|
||||
$httpData->delIndex = $row['DEL_INDEX'];
|
||||
}
|
||||
}
|
||||
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
|
||||
$process = new Process();
|
||||
$processData = $process->load( $applicationFields['PRO_UID'] );
|
||||
|
||||
@@ -428,9 +428,6 @@ function getParticipated ()
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_TASK' ),'dataIndex' => 'APP_TAS_TITLE','width' => 120
|
||||
);
|
||||
//$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_CURRENT_USER' ),'dataIndex' => 'APP_CURRENT_USER','width' => 120,'sortable' => false
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_LAST_MODIFY' ),'dataIndex' => 'APP_UPDATE_DATE','width' => 80
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_STATUS' ),'dataIndex' => 'APP_STATUS','width' => 50
|
||||
|
||||
@@ -390,7 +390,7 @@ function statusBarMessage( msg, isLoading, success ) {
|
||||
/* Case Notes - End */
|
||||
|
||||
/* Case Summary - Start */
|
||||
var openSummaryWindow = function(appUid, delIndex)
|
||||
var openSummaryWindow = function(appUid, delIndex, action)
|
||||
{
|
||||
if (summaryWindowOpened) {
|
||||
return;
|
||||
@@ -400,12 +400,13 @@ var openSummaryWindow = function(appUid, delIndex)
|
||||
url : '../appProxy/requestOpenSummary',
|
||||
params : {
|
||||
appUid : appUid,
|
||||
delIndex: delIndex
|
||||
delIndex: delIndex,
|
||||
action: action
|
||||
},
|
||||
success: function (result, request) {
|
||||
var response = Ext.util.JSON.decode(result.responseText);
|
||||
if (response.success) {
|
||||
var sumaryInfPanel = PMExt.createInfoPanel('../appProxy/getSummary', {appUid: appUid, delIndex: delIndex});
|
||||
var sumaryInfPanel = PMExt.createInfoPanel('../appProxy/getSummary', {appUid: appUid, delIndex: delIndex, action: action});
|
||||
sumaryInfPanel.setTitle(_('ID_GENERATE_INFO'));
|
||||
|
||||
var summaryWindow = new Ext.Window({
|
||||
|
||||
@@ -26,7 +26,7 @@ var textJump;
|
||||
var caseSummary = function() {
|
||||
var rowModel = grid.getSelectionModel().getSelected();
|
||||
if (rowModel) {
|
||||
openSummaryWindow(rowModel.data.APP_UID, rowModel.data.DEL_INDEX);
|
||||
openSummaryWindow(rowModel.data.APP_UID, rowModel.data.DEL_INDEX, action);
|
||||
}
|
||||
else {
|
||||
msgBox(_('ID_INFORMATION'), _('ID_SELECT_ONE_AT_LEAST'));
|
||||
@@ -472,7 +472,7 @@ Ext.onReady ( function() {
|
||||
|
||||
var renderSummary = function (val, p, r) {
|
||||
var summaryIcon = '<img src="/images/ext/default/s.gif" class="x-tree-node-icon ss_layout_header" unselectable="off" id="extdd-17" ';
|
||||
summaryIcon += 'onclick="openSummaryWindow(' + "'" + r.data['APP_UID'] + "'" + ', ' + r.data['DEL_INDEX'] + ')" title="' + _('ID_SUMMARY') + '" />';
|
||||
summaryIcon += 'onclick="openSummaryWindow(' + "'" + r.data['APP_UID'] + "'" + ', ' + r.data['DEL_INDEX'] + ', action)" title="' + _('ID_SUMMARY') + '" />';
|
||||
return summaryIcon;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user