HOR-124 "(Cases List Backend) En la version community..." SOLVED
Issue:
(Cases List Backend) En la version community el end point no devuelven los casos para mobile
Cause:
No se considero la version community para el end-point light
Solution:
Se agrego codigo para la version community para el end-point light
Fixes
This commit is contained in:
@@ -80,7 +80,7 @@ function getLoadTreeMenuData ()
|
||||
|
||||
$index = $i;
|
||||
list($childs, $index) = getChilds($oMenu, ++$index);
|
||||
|
||||
|
||||
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]]['childs'] = $childs;
|
||||
|
||||
$i = $index;
|
||||
@@ -274,7 +274,7 @@ function getProcess ()
|
||||
function getAllCounters ()
|
||||
{
|
||||
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$oAppCache = new AppCacheView();
|
||||
|
||||
$aTypes = Array ();
|
||||
$aTypes['to_do'] = 'CASES_INBOX';
|
||||
$aTypes['draft'] = 'CASES_DRAFT';
|
||||
@@ -285,29 +285,9 @@ function getAllCounters ()
|
||||
$aTypes['selfservice'] = 'CASES_SELFSERVICE';
|
||||
//$aTypes['to_revise'] = 'CASES_TO_REVISE';
|
||||
//$aTypes['to_reassign'] = 'CASES_TO_REASSIGN';
|
||||
$solrEnabled = false;
|
||||
|
||||
if ((($solrConf = System::solrEnv()) !== false)) {
|
||||
G::LoadClass( 'AppSolr' );
|
||||
$ApplicationSolrIndex = new AppSolr( $solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance'] );
|
||||
|
||||
if ($ApplicationSolrIndex->isSolrEnabled() && $solrConf['solr_enabled'] == true) {
|
||||
$solrEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($solrEnabled) {
|
||||
$aCount = $ApplicationSolrIndex->getCasesCount( $userUid );
|
||||
|
||||
//get paused count
|
||||
$aCountMissing = $oAppCache->getAllCounters( array ('completed','cancelled'), $userUid );
|
||||
|
||||
$aCount = array_merge( $aCount, $aCountMissing );
|
||||
} else {
|
||||
|
||||
$aCount = $oAppCache->getAllCounters( array_keys( $aTypes ), $userUid );
|
||||
|
||||
}
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$aCount = $case->getListCounters($userUid, array_keys($aTypes));
|
||||
|
||||
$response = Array ();
|
||||
$i = 0;
|
||||
@@ -326,7 +306,7 @@ function getChilds($menu, $index)
|
||||
|
||||
for ($i = $index; $i < count($menu->Options); $i++) {
|
||||
if ($menu->Types[$i] == 'childNode') {
|
||||
|
||||
|
||||
$childs[$menu->Id[$i]] = array(
|
||||
'label' => $menu->Labels[$i],
|
||||
'link' => $menu->Options[$i],
|
||||
|
||||
Reference in New Issue
Block a user