Merged in feature/PMC-512 (pull request #6993)
PMC-512 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
11
gulliver/system/class.rbac.php
Normal file → Executable file
11
gulliver/system/class.rbac.php
Normal file → Executable file
@@ -201,6 +201,17 @@ class RBAC
|
|||||||
'unassigned' => ['PM_CASES'],
|
'unassigned' => ['PM_CASES'],
|
||||||
'to_reassign' => ['PM_REASSIGNCASE,PM_REASSIGNCASE_SUPERVISOR'],
|
'to_reassign' => ['PM_REASSIGNCASE,PM_REASSIGNCASE_SUPERVISOR'],
|
||||||
'to_revise' => ['PM_SUPERVISOR']
|
'to_revise' => ['PM_SUPERVISOR']
|
||||||
|
],
|
||||||
|
'casesList_Ajax.php' => [
|
||||||
|
'userValues' => ['PM_CASES'],
|
||||||
|
'processListExtJs' => ['PM_CASES'],
|
||||||
|
'verifySession' => [],
|
||||||
|
'getUsersToReassign' => ['PM_CASES'],
|
||||||
|
'reassignCase' => ['PM_CASES'],
|
||||||
|
'showHistoryMessage' => ['PM_CASES'],
|
||||||
|
'showDynaformListHistory' => ['PM_CASES'],
|
||||||
|
'dynaformChangeLogViewHistory' => ['PM_CASES'],
|
||||||
|
'historyDynaformGridPreview' => ['PM_CASES'],
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
$this->aliasPermissions['PM_CASES'] = [self::PM_GUEST_CASE];
|
$this->aliasPermissions['PM_CASES'] = [self::PM_GUEST_CASE];
|
||||||
|
|||||||
93
tests/unit/workflow/engine/classes/ConfigurationsTest.php
Executable file
93
tests/unit/workflow/engine/classes/ConfigurationsTest.php
Executable file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\unit\workflow\engine\classes;
|
||||||
|
|
||||||
|
use Configurations;
|
||||||
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
use ProcessMaker\Model\User;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class ConfigurationsTest extends TestCase
|
||||||
|
{
|
||||||
|
use DatabaseTransactions;
|
||||||
|
private $filters = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define values of some parameters of the test
|
||||||
|
*/
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
//Define filters
|
||||||
|
$filters = [];
|
||||||
|
$filters['category'] = ''; //Dropdown: Category id
|
||||||
|
$filters['columnSearch'] = 'APP_TITLE'; //Dropdown: filter by value
|
||||||
|
$filters['dateFrom'] = '2019-07-01'; //Date picker
|
||||||
|
$filters['dateTo'] = '2020-07-01'; //Date picker
|
||||||
|
$filters['dir'] = 'DESC';
|
||||||
|
$filters['limit'] = 15;
|
||||||
|
$filters['filterStatus'] = 3; //Dropdown: Status id
|
||||||
|
$filters['process'] = ''; //Suggest: Process id
|
||||||
|
$filters['process_label'] = ''; //Suggest: Process label
|
||||||
|
$filters['search'] = ''; //Text search
|
||||||
|
$filters['sort'] = 'APP_NUMBER';
|
||||||
|
$filters['start'] = 0;
|
||||||
|
$filters['user'] = ''; //Suggest: User id
|
||||||
|
$filters['user_label'] = ''; //Suggest: User label
|
||||||
|
|
||||||
|
$this->filters['advanced'] = $filters;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Review the user preferences when the user does not save filters
|
||||||
|
* @covers Configurations::getUserPreferences
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_should_return_default_filters()
|
||||||
|
{
|
||||||
|
$user = factory(User::class)->create();
|
||||||
|
$configuration = new Configurations();
|
||||||
|
|
||||||
|
//Get the user preferences
|
||||||
|
$response = $configuration->getUserPreferences('FILTERS', $user->USR_UID);
|
||||||
|
|
||||||
|
//Compare filters
|
||||||
|
$this->assertEquals($response, ['advanced' => []]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Review the user preferences when the user save filters
|
||||||
|
* @covers Configurations::getUserPreferences
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_should_return_filters_saved()
|
||||||
|
{
|
||||||
|
//Define a user
|
||||||
|
$user = factory(User::class)->create();
|
||||||
|
|
||||||
|
//Save the configuration defined
|
||||||
|
$configuration = new Configurations();
|
||||||
|
$configuration->aConfig['FILTERS'] = $this->filters;
|
||||||
|
$configuration->saveConfig('USER_PREFERENCES', '', '', $user->USR_UID);
|
||||||
|
|
||||||
|
//Get the user preferences
|
||||||
|
$response = $configuration->getUserPreferences('FILTERS', $user->USR_UID);
|
||||||
|
|
||||||
|
//Compare filters
|
||||||
|
$this->assertEquals($response, $this->filters);
|
||||||
|
//Review if some keys exist
|
||||||
|
$this->assertArrayHasKey('category', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('columnSearch', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('dateFrom', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('dateTo', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('dir', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('limit', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('filterStatus', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('process', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('process_label', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('search', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('sort', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('start', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('user', $response['advanced']);
|
||||||
|
$this->assertArrayHasKey('user_label', $response['advanced']);
|
||||||
|
}
|
||||||
|
}
|
||||||
30
workflow/engine/classes/Configurations.php
Normal file → Executable file
30
workflow/engine/classes/Configurations.php
Normal file → Executable file
@@ -612,6 +612,36 @@ class Configurations // extends Configuration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the values stored in the USER_PREFERENCES
|
||||||
|
*
|
||||||
|
* @param string $key
|
||||||
|
* @param string $userUid
|
||||||
|
* @param string $listName
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getUserPreferences($key = null, $userUid = null, $listName = 'advanced')
|
||||||
|
{
|
||||||
|
$this->loadConfig($obj, 'USER_PREFERENCES', '', '', $userUid, '');
|
||||||
|
|
||||||
|
if (isset($key)) {
|
||||||
|
if (isset($this->aConfig[$key])) {
|
||||||
|
if (isset($data) && is_array($data)) {
|
||||||
|
foreach ($data as $k => $v) {
|
||||||
|
$this->aConfig[$key] = str_replace('@' . $k, $v, $this->aConfig[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->aConfig[$key];
|
||||||
|
} else {
|
||||||
|
return [$listName => []];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return $this->aConfig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the default fields and configuration for the cases list
|
* Gets the default fields and configuration for the cases list
|
||||||
*
|
*
|
||||||
|
|||||||
12
workflow/engine/content/translations/english/processmaker.en.po
Normal file → Executable file
12
workflow/engine/content/translations/english/processmaker.en.po
Normal file → Executable file
@@ -22787,6 +22787,12 @@ msgstr "Result"
|
|||||||
msgid "[LABEL/ID_RESUME] Resume"
|
msgid "[LABEL/ID_RESUME] Resume"
|
||||||
msgstr "Resume"
|
msgstr "Resume"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_RETURN_ADVANCED_SEARCH
|
||||||
|
#: LABEL/ID_RETURN_ADVANCED_SEARCH
|
||||||
|
msgid "Return"
|
||||||
|
msgstr "Return"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_RIGHT
|
# LABEL/ID_RIGHT
|
||||||
#: LABEL/ID_RIGHT
|
#: LABEL/ID_RIGHT
|
||||||
@@ -23867,6 +23873,12 @@ msgstr "Show Dirs"
|
|||||||
msgid "Show or hide the Cases Steps"
|
msgid "Show or hide the Cases Steps"
|
||||||
msgstr "Show or hide the Cases Steps"
|
msgstr "Show or hide the Cases Steps"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_SHOW_RETURN_ADVANCED_SEARCH
|
||||||
|
#: LABEL/ID_SHOW_RETURN_ADVANCED_SEARCH
|
||||||
|
msgid "Return to Advanced Search"
|
||||||
|
msgstr "Return to Advanced Search"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_SIGN_IN
|
# LABEL/ID_SIGN_IN
|
||||||
#: LABEL/ID_SIGN_IN
|
#: LABEL/ID_SIGN_IN
|
||||||
|
|||||||
2
workflow/engine/data/mysql/insert.sql
Normal file → Executable file
2
workflow/engine/data/mysql/insert.sql
Normal file → Executable file
@@ -60681,6 +60681,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_RESTORING_CASE','en','Restoring case','2015-09-15') ,
|
( 'LABEL','ID_RESTORING_CASE','en','Restoring case','2015-09-15') ,
|
||||||
( 'LABEL','ID_RESULT','en','Result','2014-01-15') ,
|
( 'LABEL','ID_RESULT','en','Result','2014-01-15') ,
|
||||||
( 'LABEL','ID_RESUME','en','Resume','2014-01-15') ,
|
( 'LABEL','ID_RESUME','en','Resume','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_RETURN_ADVANCED_SEARCH','en','Return','2019-07-17') ,
|
||||||
( 'LABEL','ID_RIGHT','en','right','2014-09-18') ,
|
( 'LABEL','ID_RIGHT','en','right','2014-09-18') ,
|
||||||
( 'LABEL','ID_RIGHT_MARGIN','en','Right Margin','2014-01-15') ,
|
( 'LABEL','ID_RIGHT_MARGIN','en','Right Margin','2014-01-15') ,
|
||||||
( 'LABEL','ID_ROLE','en','Role','2014-01-15') ,
|
( 'LABEL','ID_ROLE','en','Role','2014-01-15') ,
|
||||||
@@ -60863,6 +60864,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_SHOW_CASES_NOTES','en','Show Case Notes','2014-01-15') ,
|
( 'LABEL','ID_SHOW_CASES_NOTES','en','Show Case Notes','2014-01-15') ,
|
||||||
( 'LABEL','ID_SHOW_DIRS','en','Show Dirs','2014-01-15') ,
|
( 'LABEL','ID_SHOW_DIRS','en','Show Dirs','2014-01-15') ,
|
||||||
( 'LABEL','ID_SHOW_HIDE_CASES_STEPS','en','Show or hide the Cases Steps','2014-01-15') ,
|
( 'LABEL','ID_SHOW_HIDE_CASES_STEPS','en','Show or hide the Cases Steps','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_SHOW_RETURN_ADVANCED_SEARCH','en','Return to Advanced Search','2017-07-23') ,
|
||||||
( 'LABEL','ID_SIGN_IN','en','Sign In','2014-01-15') ,
|
( 'LABEL','ID_SIGN_IN','en','Sign In','2014-01-15') ,
|
||||||
( 'LABEL','ID_SIGN_OUT','en','Sign out','2014-01-15') ,
|
( 'LABEL','ID_SIGN_OUT','en','Sign out','2014-01-15') ,
|
||||||
( 'LABEL','ID_SIMPLE_REPORT','en','Simple Report','2014-01-15') ,
|
( 'LABEL','ID_SIMPLE_REPORT','en','Simple Report','2014-01-15') ,
|
||||||
|
|||||||
8
workflow/engine/menus/caseOptions.php
Normal file → Executable file
8
workflow/engine/menus/caseOptions.php
Normal file → Executable file
@@ -14,9 +14,9 @@ global $RBAC;
|
|||||||
|
|
||||||
$viewSteps = true;
|
$viewSteps = true;
|
||||||
$statusSendAndUnassigned = false;
|
$statusSendAndUnassigned = false;
|
||||||
|
$listName = $_SESSION['actionCaseOptions'];
|
||||||
//caseOptions
|
//caseOptions
|
||||||
switch ($_SESSION['actionCaseOptions']) {
|
switch ($listName) {
|
||||||
case 'todo':
|
case 'todo':
|
||||||
case 'draft':
|
case 'draft':
|
||||||
if (isset($_SESSION['bNoShowSteps'])) {
|
if (isset($_SESSION['bNoShowSteps'])) {
|
||||||
@@ -73,3 +73,7 @@ if ((($sStatus === 'DRAFT') || ($sStatus === 'TO_DO')) && !$statusSendAndUnassig
|
|||||||
}
|
}
|
||||||
//Menu: Cases Notes
|
//Menu: Cases Notes
|
||||||
$G_TMP_MENU->AddIdOption('NOTES', G::LoadTranslation('ID_NOTES'), 'javascript:showNotes();', 'absolute');
|
$G_TMP_MENU->AddIdOption('NOTES', G::LoadTranslation('ID_NOTES'), 'javascript:showNotes();', 'absolute');
|
||||||
|
//Menu: Return to advanced search button
|
||||||
|
if ($listName === 'search'){
|
||||||
|
$G_TMP_MENU->AddIdOption('RETURN_ADVANCED_SEARCH', G::LoadTranslation('ID_RETURN_ADVANCED_SEARCH'), 'javascript:showReturnAdvancedSearch();', 'absolute');
|
||||||
|
}
|
||||||
|
|||||||
374
workflow/engine/methods/cases/casesListExtJs.php
Normal file → Executable file
374
workflow/engine/methods/cases/casesListExtJs.php
Normal file → Executable file
@@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* casesListExtJs.php
|
||||||
|
*
|
||||||
|
* Prepare the value of variables required for show the cases list and advanced search
|
||||||
|
*/
|
||||||
|
|
||||||
use ProcessMaker\Core\System;
|
use ProcessMaker\Core\System;
|
||||||
use ProcessMaker\Plugins\PluginRegistry;
|
use ProcessMaker\Plugins\PluginRegistry;
|
||||||
|
|
||||||
@@ -59,8 +65,8 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
$oHeadPublisher = headPublisher::getSingleton();
|
$headPublisher = headPublisher::getSingleton();
|
||||||
// oHeadPublisher->setExtSkin( 'xtheme-blue');
|
|
||||||
//get the configuration for this action
|
//get the configuration for this action
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
try {
|
try {
|
||||||
@@ -72,12 +78,12 @@ try {
|
|||||||
$aditionalTable = new AdditionalTables();
|
$aditionalTable = new AdditionalTables();
|
||||||
$table = $aditionalTable->load($confCasesList['PMTable']);
|
$table = $aditionalTable->load($confCasesList['PMTable']);
|
||||||
}
|
}
|
||||||
$confCasesList = ($table != null) ? $confCasesList : array();
|
$confCasesList = ($table != null) ? $confCasesList : [];
|
||||||
|
|
||||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$confCasesList = array();
|
$confCasesList = [];
|
||||||
$generalConfCasesList = array();
|
$generalConfCasesList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// reassign header configuration
|
// reassign header configuration
|
||||||
@@ -105,15 +111,8 @@ if (isset($generalConfCasesList['casesListDateFormat']) && ! empty($generalConfC
|
|||||||
$dateFormat = $config['dateformat'];
|
$dateFormat = $config['dateformat'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'draft') {
|
|
||||||
//array_unshift ( $columns, array( 'header'=> '', 'width'=> 50, 'sortable'=> false, 'id'=> 'deleteLink' ) );
|
|
||||||
}
|
|
||||||
if ($action == 'selfservice') {
|
if ($action == 'selfservice') {
|
||||||
array_unshift($columns, array('header' => '','width' => 50,'sortable' => false,'id' => 'viewLink'));
|
array_unshift($columns, ['header' => '','width' => 50,'sortable' => false,'id' => 'viewLink']);
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'paused') {
|
|
||||||
//array_unshift ( $columns, array( 'header'=> '', 'width'=> 50, 'sortable'=> false, 'id'=> 'unpauseLink' ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||||
@@ -135,46 +134,46 @@ if ($action == "todo" || $action == "draft" || $action == "sent" || $action == "
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get values for the comboBoxes
|
//Get values for the comboBoxes
|
||||||
$processes[] = array('', G::LoadTranslation('ID_ALL_PROCESS'));
|
$processes = [];
|
||||||
$status = getStatusArray($action, $userUid);
|
$processes[] = ['', G::LoadTranslation('ID_ALL_PROCESS')];
|
||||||
|
$status = getStatusArray($action);
|
||||||
$category = getCategoryArray();
|
$category = getCategoryArray();
|
||||||
$columnToSearch = getColumnsSearchArray();
|
$columnToSearch = getColumnsSearchArray();
|
||||||
$oHeadPublisher->assign('reassignReaderFields', $reassignReaderFields); //sending the fields to get from proxy
|
$headPublisher->assign('reassignReaderFields', $reassignReaderFields); //sending the fields to get from proxy
|
||||||
$oHeadPublisher->addExtJsScript('cases/reassignList', false);
|
$headPublisher->addExtJsScript('cases/reassignList', false);
|
||||||
$enableEnterprise = false;
|
$enableEnterprise = false;
|
||||||
if (class_exists('enterprisePlugin')) {
|
if (class_exists('enterprisePlugin')) {
|
||||||
$enableEnterprise = true;
|
$enableEnterprise = true;
|
||||||
$oHeadPublisher->addExtJsScript(PATH_PLUGINS . "enterprise" . PATH_SEP . "advancedTools" . PATH_SEP, false, true);
|
$headPublisher->addExtJsScript(PATH_PLUGINS . "enterprise" . PATH_SEP . "advancedTools" . PATH_SEP, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oHeadPublisher->assign('pageSize', $pageSize); //sending the page size
|
//Get user preferences
|
||||||
$oHeadPublisher->assign('columns', $columns); //sending the columns to display in grid
|
$filters = $conf->getUserPreferences('FILTERS', $userUid);
|
||||||
$oHeadPublisher->assign('readerFields', $readerFields); //sending the fields to get from proxy
|
|
||||||
$oHeadPublisher->assign('reassignColumns', $reassignColumns); //sending the columns to display in grid
|
|
||||||
$oHeadPublisher->assign('action', $action); //sending the action to make
|
|
||||||
$oHeadPublisher->assign('urlProxy', $urlProxy); //sending the urlProxy to make
|
|
||||||
$oHeadPublisher->assign('PMDateFormat', $dateFormat); //sending the fields to get from proxy
|
|
||||||
$oHeadPublisher->assign('statusValues', $status); //Sending the listing of status
|
|
||||||
$oHeadPublisher->assign('processValues', $processes); //Sending the listing of processes
|
|
||||||
$oHeadPublisher->assign('categoryValues', $category); //Sending the listing of categories
|
|
||||||
$oHeadPublisher->assign('solrEnabled', $solrEnabled); //Sending the status of solar
|
|
||||||
$oHeadPublisher->assign('enableEnterprise', $enableEnterprise); //sending the page size
|
|
||||||
$oHeadPublisher->assign('columnSearchValues', $columnToSearch); //Sending the list of column for search: caseTitle, caseNumber, tasTitle
|
|
||||||
|
|
||||||
|
$headPublisher->assign('pageSize', $pageSize); //sending the page size
|
||||||
|
$headPublisher->assign('columns', $columns); //sending the columns to display in grid
|
||||||
|
$headPublisher->assign('readerFields', $readerFields); //sending the fields to get from proxy
|
||||||
|
$headPublisher->assign('reassignColumns', $reassignColumns); //sending the columns to display in grid
|
||||||
|
$headPublisher->assign('action', $action); //sending the action to make
|
||||||
|
$headPublisher->assign('urlProxy', $urlProxy); //sending the urlProxy to make
|
||||||
|
$headPublisher->assign('PMDateFormat', $dateFormat); //sending the fields to get from proxy
|
||||||
|
$headPublisher->assign('statusValues', $status); //Sending the listing of status
|
||||||
|
$headPublisher->assign('processValues', $processes); //Sending the listing of processes
|
||||||
|
$headPublisher->assign('categoryValues', $category); //Sending the listing of categories
|
||||||
|
$headPublisher->assign('solrEnabled', $solrEnabled); //Sending the status of solar
|
||||||
|
$headPublisher->assign('enableEnterprise', $enableEnterprise); //sending the page size
|
||||||
|
$headPublisher->assign('columnSearchValues', $columnToSearch); //Sending the list of column for search: caseTitle, caseNumber, tasTitle
|
||||||
|
$headPublisher->assign('filtersValues', $filters); //Sending filters defined
|
||||||
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||||
$filterStatus[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
$taskStatus = getTaskStatus();
|
||||||
$filterStatus[] = array('ON_TIME', G::LoadTranslation('ID_ON_TIME'));
|
$headPublisher->assign('filterStatus', $taskStatus);
|
||||||
$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'])) {
|
if (isset($_COOKIE['dashboardListInbox'])) {
|
||||||
$oHeadPublisher->assign('valueFilterStatus', $_COOKIE['dashboardListInbox']);
|
$headPublisher->assign('valueFilterStatus', $_COOKIE['dashboardListInbox']);
|
||||||
if (PHP_VERSION < 5.2) {
|
if (PHP_VERSION < 5.2) {
|
||||||
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . config("system.workspace"), "; HttpOnly");
|
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . config("system.workspace"), "; HttpOnly");
|
||||||
} else {
|
} else {
|
||||||
@@ -185,24 +184,23 @@ if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjB
|
|||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
/** Define actions menu in the cases list */
|
/** Define actions menu in the cases list */
|
||||||
$cnt = '';
|
|
||||||
$reassignCase = ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) ? 'true' : 'false';
|
$reassignCase = ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) ? 'true' : 'false';
|
||||||
$reassignCaseSup = ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) ? 'true' : 'false';
|
$reassignCaseSup = ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) ? 'true' : 'false';
|
||||||
$oHeadPublisher->assign('varReassignCase', $reassignCase);
|
$headPublisher->assign('varReassignCase', $reassignCase);
|
||||||
$oHeadPublisher->assign('varReassignCaseSupervisor', $reassignCaseSup);
|
$headPublisher->assign('varReassignCaseSupervisor', $reassignCaseSup);
|
||||||
|
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$oHeadPublisher->addExtJsScript('app/main', true);
|
$headPublisher->addExtJsScript('app/main', true);
|
||||||
$oHeadPublisher->addExtJsScript('cases/casesList', false); //adding a javascript file .js
|
$headPublisher->addExtJsScript('cases/casesList', false); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent('cases/casesListExtJs'); //adding a html file .html.
|
$headPublisher->addContent('cases/casesListExtJs'); //adding a html file .html.
|
||||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
$headPublisher->assign('FORMATS', $c->getFormats());
|
||||||
$oHeadPublisher->assign('userUid', $userUid);
|
$headPublisher->assign('userUid', $userUid);
|
||||||
$oHeadPublisher->assign('extJsViewState', $oHeadPublisher->getExtJsViewState($userUid));
|
$headPublisher->assign('extJsViewState', $headPublisher->getExtJsViewState($userUid));
|
||||||
$oHeadPublisher->assign('isIE', Bootstrap::isIE());
|
$headPublisher->assign('isIE', Bootstrap::isIE());
|
||||||
$oHeadPublisher->assign('__OPEN_APPLICATION_UID__', $openApplicationUid);
|
$headPublisher->assign('__OPEN_APPLICATION_UID__', $openApplicationUid);
|
||||||
|
|
||||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||||
$fromPlugin = $oPluginRegistry->getOpenReassignCallback();
|
$fromPlugin = $pluginRegistry->getOpenReassignCallback();
|
||||||
$jsFunction = false;
|
$jsFunction = false;
|
||||||
if (sizeof($fromPlugin)) {
|
if (sizeof($fromPlugin)) {
|
||||||
/** @var \ProcessMaker\Plugins\Interfaces\OpenReassignCallback $jsFile */
|
/** @var \ProcessMaker\Plugins\Interfaces\OpenReassignCallback $jsFile */
|
||||||
@@ -216,15 +214,18 @@ if (sizeof($fromPlugin)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oHeadPublisher->assign('openReassignCallback', $jsFunction);
|
$headPublisher->assign('openReassignCallback', $jsFunction);
|
||||||
G::RenderPage('publish', 'extJs');
|
G::RenderPage('publish', 'extJs');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of categories
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
function getCategoryArray()
|
function getCategoryArray()
|
||||||
{
|
{
|
||||||
global $oAppCache;
|
$category = [];
|
||||||
require_once 'classes/model/ProcessCategory.php';
|
$category[] = ["", G::LoadTranslation("ID_ALL_CATEGORIES")];
|
||||||
$category[] = array("",G::LoadTranslation("ID_ALL_CATEGORIES")
|
|
||||||
);
|
|
||||||
|
|
||||||
$criteria = new Criteria('workflow');
|
$criteria = new Criteria('workflow');
|
||||||
$criteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
$criteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
||||||
@@ -236,118 +237,206 @@ function getCategoryArray()
|
|||||||
$dataset->next();
|
$dataset->next();
|
||||||
|
|
||||||
while ($row = $dataset->getRow()) {
|
while ($row = $dataset->getRow()) {
|
||||||
$category[] = array($row['CATEGORY_UID'],$row['CATEGORY_NAME']);
|
$category[] = [$row['CATEGORY_UID'], $row['CATEGORY_NAME']];
|
||||||
$dataset->next();
|
$dataset->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStatusArray($action, $userUid)
|
/**
|
||||||
|
* Return the list of task status
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function getTaskStatus()
|
||||||
{
|
{
|
||||||
$status = array();
|
$taskStatus = [];
|
||||||
$aStatus = Application::$app_status_values;
|
$taskStatus[] = ['', G::LoadTranslation('ID_ALL_STATUS')];
|
||||||
$status[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
$taskStatus[] = ['ON_TIME', G::LoadTranslation('ID_ON_TIME')];
|
||||||
foreach ($aStatus as $key => $value) {
|
$taskStatus[] = ['AT_RISK', G::LoadTranslation('ID_AT_RISK')];
|
||||||
|
$taskStatus[] = ['OVERDUE', G::LoadTranslation('ID_TASK_OVERDUE')];
|
||||||
|
|
||||||
|
return $taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of status
|
||||||
|
*
|
||||||
|
* @param string $action
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function getStatusArray($action)
|
||||||
|
{
|
||||||
|
$status = [];
|
||||||
|
$statusValues = Application::$app_status_values;
|
||||||
|
$status[] = ['', G::LoadTranslation('ID_ALL_STATUS')];
|
||||||
|
foreach ($statusValues as $key => $value) {
|
||||||
if ($action == 'search') {
|
if ($action == 'search') {
|
||||||
$status[] = array($value, G::LoadTranslation('ID_CASES_STATUS_' . $key));
|
$status[] = [$value, G::LoadTranslation('ID_CASES_STATUS_' . $key)];
|
||||||
} else {
|
} else {
|
||||||
$status[] = array($key, G::LoadTranslation('ID_CASES_STATUS_' . $key));
|
$status[] = [$key, G::LoadTranslation('ID_CASES_STATUS_' . $key)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the list configuration headers of the cases checked for reassign, for the
|
* Get the list configuration headers of the cases checked for reassign, for the reassign cases list.
|
||||||
* reassign cases list.
|
*
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getReassignList()
|
function getReassignList()
|
||||||
{
|
{
|
||||||
$caseColumns = array();
|
$caseColumns = [];
|
||||||
$caseColumns[] = array('header' => '#','dataIndex' => 'APP_NUMBER','width' => 40);
|
$caseColumns[] = ['header' => '#', 'dataIndex' => 'APP_NUMBER', 'width' => 40];
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_SUMMARY'),'dataIndex' => 'CASE_SUMMARY','width' => 45,'hidden' => true
|
$caseColumns[] = [
|
||||||
);
|
'header' => G::LoadTranslation('ID_SUMMARY'),
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_CASES_NOTES'),'dataIndex' => 'CASE_NOTES_COUNT','width' => 45,'hidden' => true
|
'dataIndex' => 'CASE_SUMMARY',
|
||||||
);
|
'width' => 45,
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_CASE'),'dataIndex' => 'APP_TITLE','width' => 100,'hidden' => true
|
'hidden' => true
|
||||||
);
|
];
|
||||||
$caseColumns[] = array('header' => 'CaseId','dataIndex' => 'APP_UID','width' => 200,'hidden' => true,'hideable' => false
|
$caseColumns[] = [
|
||||||
);
|
'header' => G::LoadTranslation('ID_CASES_NOTES'),
|
||||||
$caseColumns[] = array('header' => 'User','dataIndex' => 'USR_UID','width' => 200,'hidden' => true,'hideable' => false
|
'dataIndex' => 'CASE_NOTES_COUNT',
|
||||||
);
|
'width' => 45,
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_TASK'),'dataIndex' => 'APP_TAS_TITLE','width' => 120
|
'hidden' => true
|
||||||
);
|
];
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_PROCESS'),'dataIndex' => 'APP_PRO_TITLE','width' => 120
|
$caseColumns[] = [
|
||||||
);
|
'header' => G::LoadTranslation('ID_CASE'),
|
||||||
$caseColumns[] = array('header' => 'Reassigned Uid','dataIndex' => 'APP_REASSIGN_USER_UID','width' => 120,'hidden' => true,'hideable' => false
|
'dataIndex' => 'APP_TITLE',
|
||||||
);
|
'width' => 100,
|
||||||
$caseColumns[] = array('header' => 'Reassigned Uid','dataIndex' => 'TAS_UID','width' => 120,'hidden' => true,'hideable' => false
|
'hidden' => true
|
||||||
);
|
];
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_ASSIGNED_TO'),'dataIndex' => 'APP_CURRENT_USER','width' => 170
|
$caseColumns[] = [
|
||||||
);
|
'header' => 'CaseId',
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_REASSIGNED_TO'),'dataIndex' => 'APP_REASSIGN_USER','width' => 170
|
'dataIndex' => 'APP_UID',
|
||||||
);
|
'width' => 200,
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_REASON'),'dataIndex' => 'NOTE_REASON','width' => 170
|
'hidden' => true,
|
||||||
);
|
'hideable' => false
|
||||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_NOTIFY'), 'dataIndex' => 'NOTIFY_REASSIGN', 'width' => 100
|
];
|
||||||
);
|
$caseColumns[] = [
|
||||||
|
'header' => 'User',
|
||||||
|
'dataIndex' => 'USR_UID',
|
||||||
|
'width' => 200,
|
||||||
|
'hidden' => true,
|
||||||
|
'hideable' => false
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => G::LoadTranslation('ID_TASK'),
|
||||||
|
'dataIndex' => 'APP_TAS_TITLE',
|
||||||
|
'width' => 120
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => G::LoadTranslation('ID_PROCESS'),
|
||||||
|
'dataIndex' => 'APP_PRO_TITLE',
|
||||||
|
'width' => 120
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => 'Reassigned Uid',
|
||||||
|
'dataIndex' => 'APP_REASSIGN_USER_UID',
|
||||||
|
'width' => 120,
|
||||||
|
'hidden' => true,
|
||||||
|
'hideable' => false
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => 'Reassigned Uid',
|
||||||
|
'dataIndex' => 'TAS_UID',
|
||||||
|
'width' => 120,
|
||||||
|
'hidden' => true,
|
||||||
|
'hideable' => false
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => G::LoadTranslation('ID_ASSIGNED_TO'),
|
||||||
|
'dataIndex' => 'APP_CURRENT_USER',
|
||||||
|
'width' => 170
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => G::LoadTranslation('ID_REASSIGNED_TO'),
|
||||||
|
'dataIndex' => 'APP_REASSIGN_USER',
|
||||||
|
'width' => 170
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => G::LoadTranslation('ID_REASON'),
|
||||||
|
'dataIndex' => 'NOTE_REASON',
|
||||||
|
'width' => 170
|
||||||
|
];
|
||||||
|
$caseColumns[] = [
|
||||||
|
'header' => G::LoadTranslation('ID_NOTIFY'),
|
||||||
|
'dataIndex' => 'NOTIFY_REASSIGN',
|
||||||
|
'width' => 100
|
||||||
|
];
|
||||||
|
|
||||||
$caseReaderFields = array();
|
$caseReaderFields = [];
|
||||||
$caseReaderFields[] = array('name' => 'APP_NUMBER');
|
$caseReaderFields[] = ['name' => 'APP_NUMBER'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_TITLE');
|
$caseReaderFields[] = ['name' => 'APP_TITLE'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_UID');
|
$caseReaderFields[] = ['name' => 'APP_UID'];
|
||||||
$caseReaderFields[] = array('name' => 'USR_UID');
|
$caseReaderFields[] = ['name' => 'USR_UID'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_TAS_TITLE');
|
$caseReaderFields[] = ['name' => 'APP_TAS_TITLE'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_PRO_TITLE');
|
$caseReaderFields[] = ['name' => 'APP_PRO_TITLE'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_REASSIGN_USER_UID');
|
$caseReaderFields[] = ['name' => 'APP_REASSIGN_USER_UID'];
|
||||||
$caseReaderFields[] = array('name' => 'TAS_UID');
|
$caseReaderFields[] = ['name' => 'TAS_UID'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_REASSIGN_USER');
|
$caseReaderFields[] = ['name' => 'APP_REASSIGN_USER'];
|
||||||
$caseReaderFields[] = array('name' => 'CASE_SUMMARY');
|
$caseReaderFields[] = ['name' => 'CASE_SUMMARY'];
|
||||||
$caseReaderFields[] = array('name' => 'CASE_NOTES_COUNT');
|
$caseReaderFields[] = ['name' => 'CASE_NOTES_COUNT'];
|
||||||
$caseReaderFields[] = array('name' => 'APP_CURRENT_USER');
|
$caseReaderFields[] = ['name' => 'APP_CURRENT_USER'];
|
||||||
|
|
||||||
return array('caseColumns' => $caseColumns,'caseReaderFields' => $caseReaderFields,'rowsperpage' => 20,'dateformat' => 'M d, Y'
|
return [
|
||||||
);
|
'caseColumns' => $caseColumns,
|
||||||
}
|
'caseReaderFields' => $caseReaderFields,
|
||||||
|
'rowsperpage' => 20,
|
||||||
function getReassignUsersList()
|
'dateformat' => 'M d, Y'
|
||||||
{
|
];
|
||||||
$caseColumns = array();
|
|
||||||
|
|
||||||
$caseReaderFields = array();
|
|
||||||
$caseReaderFields[] = array('name' => 'userUid'
|
|
||||||
);
|
|
||||||
$caseReaderFields[] = array('name' => 'userFullname'
|
|
||||||
);
|
|
||||||
|
|
||||||
return array('caseColumns' => $caseColumns,'caseReaderFields' => $caseReaderFields,'rowsperpage' => 20,'dateformat' => 'M d, Y'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loads the PM Table field list from the database based in an action parameter
|
* Get the list of users for reassign
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function getReassignUsersList()
|
||||||
|
{
|
||||||
|
$caseColumns = [];
|
||||||
|
|
||||||
|
$caseReaderFields = [];
|
||||||
|
$caseReaderFields[] = ['name' => 'userUid'];
|
||||||
|
$caseReaderFields[] = ['name' => 'userFullname'];
|
||||||
|
|
||||||
|
return [
|
||||||
|
'caseColumns' => $caseColumns,
|
||||||
|
'caseReaderFields' => $caseReaderFields,
|
||||||
|
'rowsperpage' => 20,
|
||||||
|
'dateformat' => 'M d, Y'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load the PM Table field list from the database based in an action parameter
|
||||||
* then assemble the List of fields with these data, for the configuration in cases list.
|
* then assemble the List of fields with these data, for the configuration in cases list.
|
||||||
*
|
*
|
||||||
* @param String $action
|
* @param string $action
|
||||||
* @return Array $config
|
* @param array $confCasesList
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function getAdditionalFields($action, $confCasesList = array())
|
function getAdditionalFields($action, $confCasesList = [])
|
||||||
{
|
{
|
||||||
$config = new Configurations();
|
$config = new Configurations();
|
||||||
$arrayConfig = $config->casesListDefaultFieldsAndConfig($action);
|
$arrayConfig = $config->casesListDefaultFieldsAndConfig($action);
|
||||||
|
|
||||||
if (is_array($confCasesList) && count($confCasesList) > 0 && isset($confCasesList["second"]) && count($confCasesList["second"]["data"]) > 0) {
|
if (is_array($confCasesList) && count($confCasesList) > 0 && isset($confCasesList["second"]) && count($confCasesList["second"]["data"]) > 0) {
|
||||||
//For the case list builder in the enterprise plugin
|
//For the case list builder in the enterprise plugin
|
||||||
$caseColumns = array();
|
$caseColumns = [];
|
||||||
$caseReaderFields = array();
|
$caseReaderFields = [];
|
||||||
$caseReaderFieldsAux = array();
|
$caseReaderFieldsAux = [];
|
||||||
|
|
||||||
foreach ($confCasesList["second"]["data"] as $index1 => $value1) {
|
foreach ($confCasesList["second"]["data"] as $index1 => $value1) {
|
||||||
$arrayField = $value1;
|
$arrayField = $value1;
|
||||||
|
|
||||||
if ($arrayField["fieldType"] != "key" && $arrayField["name"] != "USR_UID" && $arrayField["name"] != "PREVIOUS_USR_UID") {
|
if ($arrayField["fieldType"] != "key" && $arrayField["name"] != "USR_UID" && $arrayField["name"] != "PREVIOUS_USR_UID") {
|
||||||
$arrayAux = array();
|
$arrayAux = [];
|
||||||
|
|
||||||
foreach ($arrayField as $index2 => $value2) {
|
foreach ($arrayField as $index2 => $value2) {
|
||||||
if ($index2 != "gridIndex" && $index2 != "fieldType") {
|
if ($index2 != "gridIndex" && $index2 != "fieldType") {
|
||||||
@@ -371,7 +460,7 @@ function getAdditionalFields($action, $confCasesList = array())
|
|||||||
}
|
}
|
||||||
|
|
||||||
$caseColumns[] = $arrayAux;
|
$caseColumns[] = $arrayAux;
|
||||||
$caseReaderFields[] = array("name" => $arrayField["name"]);
|
$caseReaderFields[] = ["name" => $arrayField["name"]];
|
||||||
|
|
||||||
$caseReaderFieldsAux[] = $arrayField["name"];
|
$caseReaderFieldsAux[] = $arrayField["name"];
|
||||||
}
|
}
|
||||||
@@ -382,7 +471,12 @@ function getAdditionalFields($action, $confCasesList = array())
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrayConfig = array("caseColumns" => $caseColumns, "caseReaderFields" => $caseReaderFields, "rowsperpage" => $confCasesList["rowsperpage"], "dateformat" => $confCasesList["dateformat"]);
|
$arrayConfig = [
|
||||||
|
"caseColumns" => $caseColumns,
|
||||||
|
"caseReaderFields" => $caseReaderFields,
|
||||||
|
"rowsperpage" => $confCasesList["rowsperpage"],
|
||||||
|
"dateformat" => $confCasesList["dateformat"]
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $arrayConfig;
|
return $arrayConfig;
|
||||||
@@ -390,6 +484,7 @@ function getAdditionalFields($action, $confCasesList = array())
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function define the possibles columns for apply the specific search
|
* This function define the possibles columns for apply the specific search
|
||||||
|
*
|
||||||
* @return array $filters values of the dropdown
|
* @return array $filters values of the dropdown
|
||||||
*/
|
*/
|
||||||
function getColumnsSearchArray()
|
function getColumnsSearchArray()
|
||||||
@@ -398,6 +493,7 @@ function getColumnsSearchArray()
|
|||||||
$filters[] = ['APP_TITLE', G::LoadTranslation('ID_CASE_TITLE')];
|
$filters[] = ['APP_TITLE', G::LoadTranslation('ID_CASE_TITLE')];
|
||||||
$filters[] = ['APP_NUMBER', G::LoadTranslation('ID_CASE_NUMBER')];
|
$filters[] = ['APP_NUMBER', G::LoadTranslation('ID_CASE_NUMBER')];
|
||||||
$filters[] = ['TAS_TITLE', G::LoadTranslation('ID_TASK')];
|
$filters[] = ['TAS_TITLE', G::LoadTranslation('ID_TASK')];
|
||||||
|
|
||||||
return $filters;
|
return $filters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,6 +501,7 @@ function getColumnsSearchArray()
|
|||||||
function getClientCredentials($clientId)
|
function getClientCredentials($clientId)
|
||||||
{
|
{
|
||||||
$oauthQuery = new ProcessMaker\Services\OAuth2\PmPdo(getDsn());
|
$oauthQuery = new ProcessMaker\Services\OAuth2\PmPdo(getDsn());
|
||||||
|
|
||||||
return $oauthQuery->getClientDetails($clientId);
|
return $oauthQuery->getClientDetails($clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +511,7 @@ function getDsn()
|
|||||||
$port = empty($port) ? '' : ";port=$port";
|
$port = empty($port) ? '' : ";port=$port";
|
||||||
$dsn = DB_ADAPTER.':host='.$host.';dbname='.DB_NAME.$port;
|
$dsn = DB_ADAPTER.':host='.$host.';dbname='.DB_NAME.$port;
|
||||||
|
|
||||||
return array('dsn' => $dsn, 'username' => DB_USER, 'password' => DB_PASS);
|
return ['dsn' => $dsn, 'username' => DB_USER, 'password' => DB_PASS];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -426,11 +523,14 @@ function getAuthorizationCode($client)
|
|||||||
$oauthServer = new \ProcessMaker\Services\OAuth2\Server();
|
$oauthServer = new \ProcessMaker\Services\OAuth2\Server();
|
||||||
$userId = $_SESSION['USER_LOGGED'];
|
$userId = $_SESSION['USER_LOGGED'];
|
||||||
$authorize = true;
|
$authorize = true;
|
||||||
$_GET = array_merge($_GET, array(
|
$_GET = array_merge(
|
||||||
|
$_GET,
|
||||||
|
[
|
||||||
'response_type' => 'code',
|
'response_type' => 'code',
|
||||||
'client_id' => $client['CLIENT_ID'],
|
'client_id' => $client['CLIENT_ID'],
|
||||||
'scope' => implode(' ', $oauthServer->getScope())
|
'scope' => implode(' ', $oauthServer->getScope())
|
||||||
));
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$response = $oauthServer->postAuthorize($authorize, $userId, true);
|
$response = $oauthServer->postAuthorize($authorize, $userId, true);
|
||||||
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
|
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
|
||||||
|
|||||||
5
workflow/engine/methods/cases/casesList_Ajax.php
Normal file → Executable file
5
workflow/engine/methods/cases/casesList_Ajax.php
Normal file → Executable file
@@ -8,7 +8,10 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
|
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : 'verifySession';
|
||||||
|
|
||||||
|
global $RBAC;
|
||||||
|
$RBAC->allows(basename(__FILE__), $actionAjax);
|
||||||
|
|
||||||
function filterUserListArray($users = array(), $filter = '')
|
function filterUserListArray($users = array(), $filter = '')
|
||||||
{
|
{
|
||||||
|
|||||||
83
workflow/engine/methods/cases/proxyCasesList.php
Normal file → Executable file
83
workflow/engine/methods/cases/proxyCasesList.php
Normal file → Executable file
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,38 +21,41 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
|||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$_GET = $filter->xssFilterHard($_GET);
|
$_GET = $filter->xssFilterHard($_GET);
|
||||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||||
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
$userLogged = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
||||||
|
|
||||||
|
$filters = [];
|
||||||
// Callback in the UI to utilize
|
// Callback in the UI to utilize
|
||||||
$callback = isset($_REQUEST["callback"]) ? $_REQUEST["callback"] : "stcCallback1001";
|
$callback = isset($_REQUEST["callback"]) ? $_REQUEST["callback"] : "stcCallback1001";
|
||||||
|
|
||||||
// Sort column
|
// Sort column
|
||||||
$sort = isset($_REQUEST["sort"]) ? $_REQUEST["sort"] : "APP_NUMBER";
|
$filters['sort'] = $sort = isset($_REQUEST["sort"]) ? $_REQUEST["sort"] : "APP_NUMBER";
|
||||||
// Sort direction
|
// Sort direction
|
||||||
$dir = isset($_REQUEST["dir"]) ? $_REQUEST["dir"] : "DESC";
|
$filters['dir'] = $dir = isset($_REQUEST["dir"]) ? $_REQUEST["dir"] : "DESC";
|
||||||
|
|
||||||
// Pagination control
|
// Pagination control
|
||||||
$start = !empty($_REQUEST["start"]) ? $_REQUEST["start"] : 0;
|
$filters['start'] = $start = !empty($_REQUEST["start"]) ? $_REQUEST["start"] : 0;
|
||||||
$limit = !empty($_REQUEST["limit"]) ? $_REQUEST["limit"] : 25;
|
$filters['limit'] = $limit = !empty($_REQUEST["limit"]) ? $_REQUEST["limit"] : 25;
|
||||||
|
|
||||||
// Our search filter
|
// Our search filter
|
||||||
$filter = isset($_REQUEST["filter"]) ? $_REQUEST["filter"] : "";
|
$filter = isset($_REQUEST["filter"]) ? $_REQUEST["filter"] : "";
|
||||||
|
|
||||||
// What process
|
// What process
|
||||||
$process = isset($_REQUEST["process"]) ? $_REQUEST["process"] : "";
|
$filters['process'] = $process = isset($_REQUEST["process"]) ? $_REQUEST["process"] : "";
|
||||||
|
$filters['process_label'] = $processLabel = isset($_REQUEST["process_label"]) ? $_REQUEST["process_label"] : "";
|
||||||
|
|
||||||
// What category
|
// What category
|
||||||
$category = isset($_REQUEST["category"]) ? $_REQUEST["category"] : "";
|
$filters['category'] = $category = isset($_REQUEST["category"]) ? $_REQUEST["category"] : "";
|
||||||
|
|
||||||
// What status
|
// What status
|
||||||
$status = isset($_REQUEST["status"]) ? strtoupper($_REQUEST["status"]) : "";
|
$status = isset($_REQUEST["status"]) ? strtoupper($_REQUEST["status"]) : "";
|
||||||
$filterStatus = isset($_REQUEST["filterStatus"]) ? strtoupper($_REQUEST["filterStatus"]) : "";
|
$filters['filterStatus'] = $filterStatus = isset($_REQUEST["filterStatus"]) ? strtoupper($_REQUEST["filterStatus"]) : "";
|
||||||
|
|
||||||
// What user
|
// What user
|
||||||
$user = isset($_REQUEST["user"]) ? $_REQUEST["user"] : "";
|
$filters['user'] = $user = isset($_REQUEST["user"]) ? $_REQUEST["user"] : "";
|
||||||
|
$filters['user_label'] = $userLabel = isset($_REQUEST["user_label"]) ? $_REQUEST["user_label"] : "";
|
||||||
|
|
||||||
// What keywords to search
|
// What keywords to search
|
||||||
$search = isset($_REQUEST["search"]) ? $_REQUEST["search"] : "";
|
$filters['search'] = $search = isset($_REQUEST["search"]) ? $_REQUEST["search"] : "";
|
||||||
|
|
||||||
// What kind of action
|
// What kind of action
|
||||||
$action = isset($_GET["action"]) ? $_GET["action"] : (isset($_REQUEST["action"]) ? $_REQUEST["action"] : "todo");
|
$action = isset($_GET["action"]) ? $_GET["action"] : (isset($_REQUEST["action"]) ? $_REQUEST["action"] : "todo");
|
||||||
@@ -60,17 +64,20 @@ $action = isset($_GET["action"]) ? $_GET["action"] : (isset($_REQUEST["action"])
|
|||||||
$type = isset($_GET["type"]) ? $_GET["type"] : (isset($_REQUEST["type"]) ? $_REQUEST["type"] : "extjs");
|
$type = isset($_GET["type"]) ? $_GET["type"] : (isset($_REQUEST["type"]) ? $_REQUEST["type"] : "extjs");
|
||||||
|
|
||||||
// Date ranges
|
// Date ranges
|
||||||
$dateFrom = isset($_REQUEST["dateFrom"]) ? substr($_REQUEST["dateFrom"], 0, 10) : "";
|
$filters['dateFrom'] = $dateFrom = isset($_REQUEST["dateFrom"]) ? substr($_REQUEST["dateFrom"], 0, 10) : "";
|
||||||
$dateTo = isset($_REQUEST["dateTo"]) ? substr($_REQUEST["dateTo"], 0, 10) : "";
|
$filters['dateTo'] = $dateTo = isset($_REQUEST["dateTo"]) ? substr($_REQUEST["dateTo"], 0, 10) : "";
|
||||||
|
|
||||||
// First? No idea
|
// First define if we need to return empty data the first time
|
||||||
$first = isset($_REQUEST["first"]) ? true : false;
|
$first = isset($_REQUEST["first"]);
|
||||||
|
|
||||||
|
// Do search define if the action was defined from the button search
|
||||||
|
$doSearch = isset($_REQUEST["doSearch"]);
|
||||||
|
|
||||||
|
// Open case from case link
|
||||||
$openApplicationUid = (isset($_REQUEST['openApplicationUid']) && $_REQUEST['openApplicationUid'] != '') ?
|
$openApplicationUid = (isset($_REQUEST['openApplicationUid']) && $_REQUEST['openApplicationUid'] != '') ?
|
||||||
$_REQUEST['openApplicationUid'] : null;
|
$_REQUEST['openApplicationUid'] : null;
|
||||||
$search = (!is_null($openApplicationUid)) ? $openApplicationUid : $search;
|
$search = (!is_null($openApplicationUid)) ? $openApplicationUid : $search;
|
||||||
$columnSearch = isset($_REQUEST["columnSearch"]) ? strtoupper($_REQUEST["columnSearch"]) : "";
|
$filters['columnSearch'] = $columnSearch = isset($_REQUEST["columnSearch"]) ? strtoupper($_REQUEST["columnSearch"]) : "";
|
||||||
|
|
||||||
if ($sort == 'CASE_SUMMARY' || $sort == 'CASE_NOTES_COUNT') {
|
if ($sort == 'CASE_SUMMARY' || $sort == 'CASE_NOTES_COUNT') {
|
||||||
$sort = 'APP_NUMBER';//DEFAULT VALUE
|
$sort = 'APP_NUMBER';//DEFAULT VALUE
|
||||||
@@ -79,28 +86,36 @@ if ($sort == 'APP_STATUS_LABEL') {
|
|||||||
$sort = 'APP_STATUS';
|
$sort = 'APP_STATUS';
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
//Load Configurations
|
||||||
$userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
|
$conf = new Configurations();
|
||||||
$result = [];
|
//Load the user preferences
|
||||||
|
$conf->getUserPreferences('FILTERS', $userLogged);
|
||||||
|
//Save the filters used
|
||||||
|
if ($doSearch && (empty($conf->aConfig['FILTERS']['advanced']) || $conf->aConfig['FILTERS']['advanced'] != $filters)) {
|
||||||
|
//The user does not have filters or we need to update the user preferences
|
||||||
|
$conf->aConfig['FILTERS']['advanced'] = $filters;
|
||||||
|
$conf->saveConfig('USER_PREFERENCES', '', '', $userLogged);
|
||||||
|
}
|
||||||
|
|
||||||
switch ($action) {
|
try {
|
||||||
case "search":
|
$result = [];
|
||||||
case "to_reassign":
|
//Define the user logged into the system
|
||||||
if ($first) {
|
$userUid = (isset($userLogged) && $userLogged != "") ? $userLogged : null;
|
||||||
|
|
||||||
|
if ($action == 'search') {
|
||||||
|
//Return empty if does not have filters
|
||||||
|
if (empty($conf->aConfig['FILTERS']['advanced'])) {
|
||||||
$result['totalCount'] = 0;
|
$result['totalCount'] = 0;
|
||||||
$result['data'] = array();
|
$result['data'] = [];
|
||||||
$result = G::json_encode($result);
|
$result = G::json_encode($result);
|
||||||
echo $result;
|
echo $result;
|
||||||
return;
|
return;
|
||||||
}
|
} else {
|
||||||
|
//Define the user
|
||||||
$user = ($user == "CURRENT_USER") ? $userUid : $user;
|
$user = ($user == "CURRENT_USER") ? $userUid : $user;
|
||||||
$userUid = $user;
|
$userUid = $user;
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'search') {
|
//Get the data from the specific search
|
||||||
$data = Delegation::search(
|
$data = Delegation::search(
|
||||||
$userUid,
|
$userUid,
|
||||||
$start,
|
$start,
|
||||||
@@ -115,7 +130,17 @@ try {
|
|||||||
$dateTo,
|
$dateTo,
|
||||||
$columnSearch
|
$columnSearch
|
||||||
);
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//We check if we need to return empty
|
||||||
|
if ($action == "to_reassign" && $first) {
|
||||||
|
$result['totalCount'] = 0;
|
||||||
|
$result['data'] = [];
|
||||||
|
$result = G::json_encode($result);
|
||||||
|
echo $result;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//This section is used by the community version
|
//This section is used by the community version
|
||||||
$apps = new Applications();
|
$apps = new Applications();
|
||||||
$data = $apps->getAll(
|
$data = $apps->getAll(
|
||||||
|
|||||||
@@ -717,6 +717,9 @@ antes funcionaba.
|
|||||||
width:15px !important;
|
width:15px !important;
|
||||||
height:15px !important;
|
height:15px !important;
|
||||||
}
|
}
|
||||||
|
.ICON_RETURN {
|
||||||
|
background-image: url(/images/baseline_arrow_back_black_18dp.png) !important;
|
||||||
|
}
|
||||||
.ICON_CASES_NOTES {
|
.ICON_CASES_NOTES {
|
||||||
/*ss_comment*/
|
/*ss_comment*/
|
||||||
background-image:url( /images/icons_silk/sprites.png) !important;
|
background-image:url( /images/icons_silk/sprites.png) !important;
|
||||||
|
|||||||
@@ -848,6 +848,9 @@ antes funcionaba.
|
|||||||
width: 15px !important;
|
width: 15px !important;
|
||||||
height: 15px !important;
|
height: 15px !important;
|
||||||
}
|
}
|
||||||
|
.ICON_RETURN {
|
||||||
|
background-image: url(/skins/neoclassic/images/baseline_arrow_back_black_18dp.png) !important;
|
||||||
|
}
|
||||||
.ICON_CASES_NOTES {
|
.ICON_CASES_NOTES {
|
||||||
/*ss_comment*/
|
/*ss_comment*/
|
||||||
|
|
||||||
|
|||||||
@@ -742,6 +742,9 @@ antes funcionaba.
|
|||||||
width:15px !important;
|
width:15px !important;
|
||||||
height:15px !important;
|
height:15px !important;
|
||||||
}
|
}
|
||||||
|
.ICON_RETURN {
|
||||||
|
background-image: url(/images/baseline_arrow_back_black_18dp.png) !important;
|
||||||
|
}
|
||||||
.ICON_CASES_NOTES {
|
.ICON_CASES_NOTES {
|
||||||
/*ss_comment*/
|
/*ss_comment*/
|
||||||
background-image:url( /images/icons_silk/sprites.png) !important;
|
background-image:url( /images/icons_silk/sprites.png) !important;
|
||||||
|
|||||||
@@ -714,6 +714,9 @@ antes funcionaba.
|
|||||||
width:15px !important;
|
width:15px !important;
|
||||||
height:15px !important;
|
height:15px !important;
|
||||||
}
|
}
|
||||||
|
.ICON_RETURN {
|
||||||
|
background-image: url(/images/baseline_arrow_back_black_18dp.png) !important;
|
||||||
|
}
|
||||||
.ICON_CASES_NOTES {
|
.ICON_CASES_NOTES {
|
||||||
/*ss_comment*/
|
/*ss_comment*/
|
||||||
background-image:url( /images/icons_silk/sprites.png) !important;
|
background-image:url( /images/icons_silk/sprites.png) !important;
|
||||||
|
|||||||
@@ -978,25 +978,6 @@ Ext.onReady ( function() {
|
|||||||
'</div></tpl>'
|
'</div></tpl>'
|
||||||
);
|
);
|
||||||
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : 'casesList_Ajax',
|
|
||||||
params : {
|
|
||||||
actionAjax : 'processListExtJs',
|
|
||||||
action: action,
|
|
||||||
CATEGORY_UID: filterCategory
|
|
||||||
},
|
|
||||||
success: function ( result, request ) {
|
|
||||||
processValues = Ext.util.JSON.decode(result.responseText);
|
|
||||||
suggestProcess.getStore().removeAll();
|
|
||||||
suggestProcess.getStore().loadData(processValues);
|
|
||||||
},
|
|
||||||
failure: function ( result, request) {
|
|
||||||
if (typeof(result.responseText) != 'undefined') {
|
|
||||||
Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
processProxy = new Ext.data.HttpProxy( {
|
processProxy = new Ext.data.HttpProxy( {
|
||||||
url : 'casesList_Ajax?actionAjax=processListExtJs&action='+action,
|
url : 'casesList_Ajax?actionAjax=processListExtJs&action='+action,
|
||||||
method : 'POST'
|
method : 'POST'
|
||||||
@@ -1451,6 +1432,11 @@ Ext.onReady ( function() {
|
|||||||
storeCases.setBaseParam('dateFrom', dateFrom.getValue());
|
storeCases.setBaseParam('dateFrom', dateFrom.getValue());
|
||||||
storeCases.setBaseParam('dateTo', dateTo.getValue());
|
storeCases.setBaseParam('dateTo', dateTo.getValue());
|
||||||
storeCases.setBaseParam('search', searchText);
|
storeCases.setBaseParam('search', searchText);
|
||||||
|
if ( action === 'search' ) {
|
||||||
|
storeCases.setBaseParam('doSearch', true);
|
||||||
|
storeCases.setBaseParam('process_label', suggestProcess.getRawValue());
|
||||||
|
storeCases.setBaseParam('user_label', suggestUser.getRawValue());
|
||||||
|
}
|
||||||
storeCases.load({params:{ start : 0 , limit : pageSize }});
|
storeCases.load({params:{ start : 0 , limit : pageSize }});
|
||||||
if ( action === 'search' ){
|
if ( action === 'search' ){
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
@@ -2506,13 +2492,34 @@ Ext.onReady ( function() {
|
|||||||
storeCases.setBaseParam("search", textSearch.getValue());
|
storeCases.setBaseParam("search", textSearch.getValue());
|
||||||
break;
|
break;
|
||||||
case "search":
|
case "search":
|
||||||
storeCases.setBaseParam("category", "");
|
storeCases.setBaseParam("category",
|
||||||
storeCases.setBaseParam("process", "");
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.category ?
|
||||||
storeCases.setBaseParam("status", comboStatus.store.getAt(0).get(comboStatus.valueField));
|
filtersValues.advanced.category : ""
|
||||||
storeCases.setBaseParam("columnSearch", comboColumnSearch.store.getAt(0).get(comboColumnSearch.valueField));
|
);
|
||||||
storeCases.setBaseParam("search", textSearch.getValue());
|
storeCases.setBaseParam("process",
|
||||||
storeCases.setBaseParam("dateFrom", dateFrom.getValue());
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.process ?
|
||||||
storeCases.setBaseParam("dateTo", dateTo.getValue());
|
filtersValues.advanced.process : ""
|
||||||
|
);
|
||||||
|
storeCases.setBaseParam("filterStatus",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.filterStatus ?
|
||||||
|
filtersValues.advanced.filterStatus : ""
|
||||||
|
);
|
||||||
|
storeCases.setBaseParam("columnSearch",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.columnSearch ?
|
||||||
|
filtersValues.advanced.columnSearch : ""
|
||||||
|
);
|
||||||
|
storeCases.setBaseParam("search",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.search ?
|
||||||
|
filtersValues.advanced.search : ""
|
||||||
|
);
|
||||||
|
storeCases.setBaseParam("dateFrom",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.dateFrom ?
|
||||||
|
filtersValues.advanced.dateFrom : ""
|
||||||
|
);
|
||||||
|
storeCases.setBaseParam("dateTo",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.dateTo ?
|
||||||
|
filtersValues.advanced.dateTo : ""
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case "unassigned":
|
case "unassigned":
|
||||||
storeCases.setBaseParam("category", "");
|
storeCases.setBaseParam("category", "");
|
||||||
@@ -2533,8 +2540,19 @@ Ext.onReady ( function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
storeCases.setBaseParam("action", action);
|
storeCases.setBaseParam("action", action);
|
||||||
|
if (action === "search") {
|
||||||
|
storeCases.setBaseParam("start",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.start ?
|
||||||
|
parseInt(filtersValues.advanced.start, 10) : 0
|
||||||
|
);
|
||||||
|
storeCases.setBaseParam("limit",
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.limit ?
|
||||||
|
parseInt(filtersValues.advanced.limit, 10) : pageSize
|
||||||
|
);
|
||||||
|
} else {
|
||||||
storeCases.setBaseParam("start", 0);
|
storeCases.setBaseParam("start", 0);
|
||||||
storeCases.setBaseParam("limit", pageSize);
|
storeCases.setBaseParam("limit", pageSize);
|
||||||
|
}
|
||||||
|
|
||||||
var viewText = Ext.getCmp('casesGrid').getView();
|
var viewText = Ext.getCmp('casesGrid').getView();
|
||||||
storeCases.removeAll();
|
storeCases.removeAll();
|
||||||
@@ -2543,7 +2561,7 @@ Ext.onReady ( function() {
|
|||||||
storeCases.load();
|
storeCases.load();
|
||||||
} else {
|
} else {
|
||||||
viewText.emptyText = _('ID_ENTER_SEARCH_CRITERIA');
|
viewText.emptyText = _('ID_ENTER_SEARCH_CRITERIA');
|
||||||
storeCases.load( {params: { first: true}} );
|
storeCases.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
__OPEN_APPLICATION_UID__ = null;
|
__OPEN_APPLICATION_UID__ = null;
|
||||||
@@ -2652,20 +2670,68 @@ Ext.onReady ( function() {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
// Nothing to do
|
// Nothing to do
|
||||||
}
|
}
|
||||||
|
if (action === "search") {
|
||||||
|
comboCategory.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.category ?
|
||||||
|
filtersValues.advanced.category : ""
|
||||||
|
);
|
||||||
|
// Loading process suggest
|
||||||
|
suggestProcess.getStore().loadData([{
|
||||||
|
"PRO_UID": typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.process ?
|
||||||
|
filtersValues.advanced.process : "",
|
||||||
|
"PRO_TITLE": typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.process_label ?
|
||||||
|
filtersValues.advanced.process_label : ""
|
||||||
|
}]);
|
||||||
|
suggestProcess.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.process ?
|
||||||
|
filtersValues.advanced.process : ""
|
||||||
|
);
|
||||||
|
comboStatus.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.filterStatus ?
|
||||||
|
filtersValues.advanced.filterStatus : ""
|
||||||
|
);
|
||||||
|
comboColumnSearch.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.columnSearch ?
|
||||||
|
filtersValues.advanced.columnSearch: ""
|
||||||
|
);
|
||||||
|
comboColumnSearch.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.columnSearch ?
|
||||||
|
filtersValues.advanced.columnSearch : ""
|
||||||
|
);
|
||||||
|
textSearch.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.search ?
|
||||||
|
filtersValues.advanced.search : ""
|
||||||
|
);
|
||||||
|
dateFrom.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.dateFrom ?
|
||||||
|
filtersValues.advanced.dateFrom : ""
|
||||||
|
);
|
||||||
|
dateTo.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.dateTo ?
|
||||||
|
filtersValues.advanced.dateTo : ""
|
||||||
|
);
|
||||||
|
// Loading user suggest
|
||||||
|
suggestUser.getStore().loadData([{
|
||||||
|
"USR_UID": typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.user ?
|
||||||
|
filtersValues.advanced.user : "",
|
||||||
|
"USR_FULLNAME": typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.user_label ?
|
||||||
|
filtersValues.advanced.user_label : ""
|
||||||
|
}]);
|
||||||
|
suggestUser.setValue(
|
||||||
|
typeof filtersValues !== 'undefined' && filtersValues.advanced && filtersValues.advanced.user ?
|
||||||
|
filtersValues.advanced.user : ""
|
||||||
|
);
|
||||||
|
} else {
|
||||||
comboCategory.setValue("");
|
comboCategory.setValue("");
|
||||||
suggestProcess.setValue("");
|
suggestProcess.setValue("");
|
||||||
comboStatus.setValue("");
|
comboStatus.setValue("");
|
||||||
comboColumnSearch.setValue("APP_TITLE");
|
comboColumnSearch.setValue("APP_TITLE");
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
if (typeof valueFilterStatus != 'undefined') {
|
if (typeof valueFilterStatus !== 'undefined') {
|
||||||
comboFilterStatus.setValue(valueFilterStatus);
|
comboFilterStatus.setValue(valueFilterStatus);
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
if(typeof(comboUser) != 'undefined'){
|
|
||||||
comboUser.setValue("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function reassign(){
|
function reassign(){
|
||||||
storeReassignCases.removeAll();
|
storeReassignCases.removeAll();
|
||||||
var rows = grid.getSelectionModel().getSelections();
|
var rows = grid.getSelectionModel().getSelections();
|
||||||
|
|||||||
@@ -143,7 +143,9 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
actionMenu.show();
|
actionMenu.show();
|
||||||
break;
|
break;
|
||||||
|
case 'RETURN_ADVANCED_SEARCH':
|
||||||
|
Ext.getCmp('returnButton').show();
|
||||||
|
break;
|
||||||
// custom menus from plugins or others
|
// custom menus from plugins or others
|
||||||
default:
|
default:
|
||||||
var navPanel = Ext.getCmp('navPanel');
|
var navPanel = Ext.getCmp('navPanel');
|
||||||
@@ -498,7 +500,24 @@ Ext.onReady(function(){
|
|||||||
region: 'center',
|
region: 'center',
|
||||||
layout: 'border',
|
layout: 'border',
|
||||||
items: [navPanelWest, navPanelCenter],
|
items: [navPanelWest, navPanelCenter],
|
||||||
tbar: [{
|
tbar: [
|
||||||
|
{
|
||||||
|
id: 'returnButton',
|
||||||
|
pressed: false,
|
||||||
|
enableToggle: true,
|
||||||
|
text: _('ID_RETURN_ADVANCED_SEARCH'),
|
||||||
|
iconCls: 'button_menu_ext ICON_RETURN',
|
||||||
|
tooltip: {
|
||||||
|
title:_('ID_RETURN_ADVANCED_SEARCH'),
|
||||||
|
text: _('ID_SHOW_RETURN_ADVANCED_SEARCH')
|
||||||
|
},
|
||||||
|
toggleHandler: function (btn, pressed) {
|
||||||
|
if (history) {
|
||||||
|
history.go(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
id: 'stepsMenu',
|
id: 'stepsMenu',
|
||||||
text: ' ' + _('ID_STEPS'),
|
text: ' ' + _('ID_STEPS'),
|
||||||
pressed: false,
|
pressed: false,
|
||||||
@@ -535,7 +554,8 @@ Ext.onReady(function(){
|
|||||||
closeCaseNotesWindow();
|
closeCaseNotesWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -577,6 +597,7 @@ Ext.onReady(function(){
|
|||||||
Ext.getCmp('caseNotes').hide();
|
Ext.getCmp('caseNotes').hide();
|
||||||
Ext.getCmp('informationMenu').hide();
|
Ext.getCmp('informationMenu').hide();
|
||||||
Ext.getCmp('actionMenu').hide();
|
Ext.getCmp('actionMenu').hide();
|
||||||
|
Ext.getCmp('returnButton').hide();
|
||||||
|
|
||||||
hideCaseNavigatorPanel();
|
hideCaseNavigatorPanel();
|
||||||
if(typeof appStatus !== "undefined") {
|
if(typeof appStatus !== "undefined") {
|
||||||
|
|||||||
BIN
workflow/public_html/images/baseline_arrow_back_black_18dp.png
Executable file
BIN
workflow/public_html/images/baseline_arrow_back_black_18dp.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 123 B |
BIN
workflow/public_html/skins/neoclassic/images/baseline_arrow_back_black_18dp.png
Executable file
BIN
workflow/public_html/skins/neoclassic/images/baseline_arrow_back_black_18dp.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 123 B |
Reference in New Issue
Block a user