Merged in marcoAntonioNina/processmaker/dashboards2 (pull request #2325)
Add link home inbox
This commit is contained in:
@@ -318,12 +318,13 @@ class ListInbox extends BaseListInbox
|
|||||||
|
|
||||||
public function loadFilters (&$criteria, $filters)
|
public function loadFilters (&$criteria, $filters)
|
||||||
{
|
{
|
||||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||||
|
$filterStatus = isset($filters['filterStatus']) ? $filters['filterStatus'] : "";
|
||||||
|
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
@@ -339,8 +340,8 @@ class ListInbox extends BaseListInbox
|
|||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion( ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
$criteria->getNewCriterion( ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||||
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||||
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -368,7 +369,7 @@ class ListInbox extends BaseListInbox
|
|||||||
}
|
}
|
||||||
|
|
||||||
$criteria->add( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
$criteria->add( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||||
addAnd( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
addAnd( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||||
} else {
|
} else {
|
||||||
$dateFrom = $dateFrom . " 00:00:00";
|
$dateFrom = $dateFrom . " 00:00:00";
|
||||||
|
|
||||||
@@ -379,6 +380,21 @@ class ListInbox extends BaseListInbox
|
|||||||
|
|
||||||
$criteria->add( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
$criteria->add( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($filterStatus != '') {
|
||||||
|
switch ($filterStatus) {
|
||||||
|
case 'ON_TIME':
|
||||||
|
$criteria->add( ListInboxPeer::DEL_RISK_DATE , "TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE." , NOW( ) ) > 0", Criteria::CUSTOM);
|
||||||
|
break;
|
||||||
|
case 'AT_RISK':
|
||||||
|
$criteria->add( ListInboxPeer::DEL_RISK_DATE , "TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE .", NOW( ) ) < 0", Criteria::CUSTOM);
|
||||||
|
$criteria->add( ListInboxPeer::DEL_DUE_DATE , "TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE .", NOW( ) ) > 0", Criteria::CUSTOM);
|
||||||
|
break;
|
||||||
|
case 'OVERDUE':
|
||||||
|
$criteria->add( ListInboxPeer::DEL_DUE_DATE , "TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE." , NOW( ) ) < 0", Criteria::CUSTOM);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function countTotal ($usr_uid, $filters = array())
|
public function countTotal ($usr_uid, $filters = array())
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ class StrategicDashboard extends Controller
|
|||||||
$this->setView( 'strategicDashboard/viewDashboard' );
|
$this->setView( 'strategicDashboard/viewDashboard' );
|
||||||
|
|
||||||
$this->setVar('urlProxy', $this->urlProxy);
|
$this->setVar('urlProxy', $this->urlProxy);
|
||||||
|
$this->setVar('SYS_SYS', SYS_SYS);
|
||||||
$this->setVar('usrId', $this->usrId);
|
$this->setVar('usrId', $this->usrId);
|
||||||
$this->setVar('credentials', $this->clientToken);
|
$this->setVar('credentials', $this->clientToken);
|
||||||
$this->setVar('unitCost', $this->usrUnitCost);
|
$this->setVar('unitCost', $this->usrUnitCost);
|
||||||
|
|||||||
@@ -54,8 +54,9 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var bindTimeSeriesLists = function (presenter, elementsToConserve = []) {
|
var bindTimeSeriesLists = function (presenter, elementsToConserve) {
|
||||||
var conserveStates =[];
|
var conserveStates =[];
|
||||||
|
elementsToConserve =[];
|
||||||
$.each (elementsToConserve, function (i, elem){
|
$.each (elementsToConserve, function (i, elem){
|
||||||
conserveStates.push({id:elem, selValue: $('#' + elem).val()});
|
conserveStates.push({id:elem, selValue: $('#' + elem).val()});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -376,6 +376,18 @@ $(document).ready(function() {
|
|||||||
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#indicatorsGridStack').on('click','.status-indicator-low', function() {
|
||||||
|
locationCases('OVERDUE');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#indicatorsGridStack').on('click','.status-indicator-medium', function() {
|
||||||
|
locationCases('AT_RISK');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#indicatorsGridStack').on('click','.status-indicator-high', function() {
|
||||||
|
locationCases('ON_TIME');
|
||||||
|
});
|
||||||
|
|
||||||
$('body').on('click','.bread-back-selector', function() {
|
$('body').on('click','.bread-back-selector', function() {
|
||||||
var indicatorId = window.currentIndicator.id;
|
var indicatorId = window.currentIndicator.id;
|
||||||
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
||||||
@@ -1001,6 +1013,28 @@ var animateProgress = function (indicatorItem, widget){
|
|||||||
fpAnimationFrame(animacion);
|
fpAnimationFrame(animacion);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var createCookie = function (name, value, time) {
|
||||||
|
if (time) {
|
||||||
|
var date = new Date();
|
||||||
|
date.setTime(date.getTime()+(time*24*60*60*1000));
|
||||||
|
var expires = "; expires="+date.toUTCString();
|
||||||
|
} else {
|
||||||
|
var expires = "";
|
||||||
|
}
|
||||||
|
document.cookie = name+"="+value+expires+"; path=/sys"+workspace;
|
||||||
|
};
|
||||||
|
|
||||||
|
var locationCases = function (type) {
|
||||||
|
createCookie("dashboardListInbox", type, 1);
|
||||||
|
|
||||||
|
var currentLocation = location.href;
|
||||||
|
var position = currentLocation.lastIndexOf('/', currentLocation.lastIndexOf('/') - 1);
|
||||||
|
currentLocation = currentLocation.substring(0, position+1);
|
||||||
|
currentLocation = currentLocation + 'cases/main';
|
||||||
|
|
||||||
|
parent.location.href = currentLocation;
|
||||||
|
};
|
||||||
|
|
||||||
/*var dashboardButtonTemplate = ' <div class="btn-group pull-left"> \
|
/*var dashboardButtonTemplate = ' <div class="btn-group pull-left"> \
|
||||||
<button id="favorite" type="button" class="btn btn-success"><i class="fa fa-star fa-1x"></i></button> \
|
<button id="favorite" type="button" class="btn btn-success"><i class="fa fa-star fa-1x"></i></button> \
|
||||||
<button id="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \
|
<button id="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ unset($_SESSION['APPLICATION']);
|
|||||||
//get the action from GET or POST, default is todo
|
//get the action from GET or POST, default is todo
|
||||||
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
$filterAction = isset( $_GET['filterAction'] ) ? $_GET['filterAction'] : (isset( $_POST['filterAction'] ) ? $_POST['filterAction'] : '');
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
//fix a previous inconsistency
|
//fix a previous inconsistency
|
||||||
$urlProxy = 'proxyCasesList';
|
$urlProxy = 'proxyCasesList';
|
||||||
if ($action == 'selfservice') {
|
if ($action == 'selfservice') {
|
||||||
@@ -143,7 +147,7 @@ if ($action == "todo" || $action == "draft" || $action == "sent" || $action == "
|
|||||||
$solrConf['solr_instance']
|
$solrConf['solr_instance']
|
||||||
);
|
);
|
||||||
if ($applicationSolrIndex->isSolrEnabled()) {
|
if ($applicationSolrIndex->isSolrEnabled()) {
|
||||||
$solrEnabled = 1;
|
$solrEnabled = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,6 +183,28 @@ $oHeadPublisher->assign( 'allUsersValues', $allUsers ); //Sending the listing of
|
|||||||
$oHeadPublisher->assign( 'solrEnabled', $solrEnabled ); //Sending the status of solar
|
$oHeadPublisher->assign( 'solrEnabled', $solrEnabled ); //Sending the status of solar
|
||||||
$oHeadPublisher->assign( 'enableEnterprise', $enableEnterprise ); //sending the page size
|
$oHeadPublisher->assign( 'enableEnterprise', $enableEnterprise ); //sending the page size
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||||
|
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=') ) {
|
||||||
|
$filterStatus[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
||||||
|
$filterStatus[] = array('ON_TIME', G::LoadTranslation('ID_ON_TIME'));
|
||||||
|
$filterStatus[] = array('AT_RISK', G::LoadTranslation('ID_AT_RISK'));
|
||||||
|
$filterStatus[] = array('OVERDUE', G::LoadTranslation('ID_TASK_OVERDUE'));
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('filterStatus', $filterStatus);
|
||||||
|
|
||||||
|
if (isset($_COOKIE['dashboardListInbox'])) {
|
||||||
|
$oHeadPublisher->assign('valueFilterStatus', $_COOKIE['dashboardListInbox']);
|
||||||
|
if (PHP_VERSION < 5.2) {
|
||||||
|
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . SYS_SYS, "; HttpOnly");
|
||||||
|
} else {
|
||||||
|
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . SYS_SYS, null, false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
//menu permissions
|
//menu permissions
|
||||||
/*$c = new Criteria('workflow');
|
/*$c = new Criteria('workflow');
|
||||||
$c->clearSelectColumns();
|
$c->clearSelectColumns();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ try {
|
|||||||
|
|
||||||
$filters['action'] = isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "";
|
$filters['action'] = isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "";
|
||||||
$listName = isset( $_REQUEST["list"] ) ? $_REQUEST["list"] : "inbox";
|
$listName = isset( $_REQUEST["list"] ) ? $_REQUEST["list"] : "inbox";
|
||||||
|
$filters['filterStatus'] = isset( $_REQUEST["filterStatus"] ) ? $_REQUEST["filterStatus"] : "";
|
||||||
|
|
||||||
// Select list
|
// Select list
|
||||||
switch ($listName) {
|
switch ($listName) {
|
||||||
@@ -145,16 +146,17 @@ try {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$filtersData = array();
|
$filtersData = array();
|
||||||
$filtersData['start'] = $filters['start'];
|
$filtersData['start'] = $filters['start'];
|
||||||
$filtersData['limit'] = $filters['limit'];
|
$filtersData['limit'] = $filters['limit'];
|
||||||
$filtersData['sort'] = G::toLower($filters['sort']);
|
$filtersData['sort'] = G::toLower($filters['sort']);
|
||||||
$filtersData['dir'] = G::toLower($filters['dir']);
|
$filtersData['dir'] = G::toLower($filters['dir']);
|
||||||
$filtersData['cat_uid'] = $filters['category'];
|
$filtersData['cat_uid'] = $filters['category'];
|
||||||
$filtersData['pro_uid'] = $filters['process'];
|
$filtersData['pro_uid'] = $filters['process'];
|
||||||
$filtersData['search'] = $filters['search'];
|
$filtersData['search'] = $filters['search'];
|
||||||
$filtersData['date_from'] = $filters['dateFrom'];
|
$filtersData['date_from'] = $filters['dateFrom'];
|
||||||
$filtersData['date_to'] = $filters['dateTo'];
|
$filtersData['date_to'] = $filters['dateTo'];
|
||||||
$filtersData["action"] = $filters["action"];
|
$filtersData["action"] = $filters["action"];
|
||||||
|
$filtersData["filterStatus"] = $filters['filterStatus'];
|
||||||
|
|
||||||
$response = array();
|
$response = array();
|
||||||
$response['filters'] = $filtersData;
|
$response['filters'] = $filtersData;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@
|
|||||||
<script type="text/javascript" src="/js/pmchart/pmCharts.js"></script>
|
<script type="text/javascript" src="/js/pmchart/pmCharts.js"></script>
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var urlProxy = '{$urlProxy}';
|
var urlProxy = '{$urlProxy}';
|
||||||
|
var workspace = '{$SYS_SYS}';
|
||||||
var pageUserId = '{$usrId}';
|
var pageUserId = '{$usrId}';
|
||||||
var token = '{$credentials.access_token}';
|
var token = '{$credentials.access_token}';
|
||||||
var moneyUnit = '{$unitCost}';
|
var moneyUnit = '{$unitCost}';
|
||||||
|
|||||||
Reference in New Issue
Block a user