@@ -281,6 +281,8 @@ class RBAC
|
||||
"PER_NAME" => "Edit User profile Default Main Menu Options"
|
||||
), array("PER_UID" => "00000000000000000000000000000063", "PER_CODE" => "PM_EDIT_USER_PROFILE_DEFAULT_CASES_MENU_OPTIONS",
|
||||
"PER_NAME" => "Edit User profile Default Cases Menu Options"
|
||||
), array("PER_UID" => "00000000000000000000000000000064", "PER_CODE" => "PM_REASSIGNCASE_SUPERVISOR",
|
||||
"PER_NAME" => "Reassign case supervisor"
|
||||
)
|
||||
);
|
||||
return $permissionsAdmin;
|
||||
|
||||
@@ -61,7 +61,8 @@ INSERT INTO `RBAC_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000060','PM_EDIT_USER_PROFILE_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000061','PM_EDIT_USER_PROFILE_PHOTO','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000062','PM_EDIT_USER_PROFILE_DEFAULT_MAIN_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000063','PM_EDIT_USER_PROFILE_DEFAULT_CASES_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002');
|
||||
('00000000000000000000000000000063','PM_EDIT_USER_PROFILE_DEFAULT_CASES_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000064','PM_REASSIGNCASE_SUPERVISOR','2016-09-01 00:00:00','2016-09-01 00:00:00',1,'00000000000000000000000000000002');
|
||||
|
||||
INSERT INTO `RBAC_ROLES` VALUES
|
||||
('00000000000000000000000000000001','','00000000000000000000000000000001','RBAC_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
|
||||
@@ -134,6 +135,7 @@ INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000002','00000000000000000000000000000061'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000062'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000063'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000064'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000001'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000005'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000040'),
|
||||
|
||||
@@ -143,8 +143,14 @@ class Applications
|
||||
$CriteriaCount = $oAppCache->getToReviseCountCriteria($userUid);
|
||||
break;
|
||||
case "to_reassign":
|
||||
$Criteria = $oAppCache->getToReassignListCriteria($userUid);
|
||||
$CriteriaCount = $oAppCache->getToReassignCountCriteria($userUid);
|
||||
GLOBAL $RBAC;
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE') == 1){
|
||||
$Criteria = $oAppCache->getToReassignListCriteria($userUid);
|
||||
$CriteriaCount = $oAppCache->getToReassignCountCriteria($userUid);
|
||||
} else {
|
||||
$Criteria = $oAppCache->getToReassignSupervisorListCriteria($userUid);
|
||||
$CriteriaCount = $oAppCache->getToReassignSupervisorCountCriteria($userUid);
|
||||
}
|
||||
break;
|
||||
case "all":
|
||||
$Criteria = $oAppCache->getAllCasesListCriteria($userUid);
|
||||
|
||||
@@ -1183,6 +1183,36 @@ class AppCacheView extends BaseAppCacheView
|
||||
return $this->getToReassign($userUid, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the ALL cases list criteria for count by Supervisor
|
||||
* @return Criteria object $Criteria
|
||||
*/
|
||||
public function getToReassignSupervisorCountCriteria($userUid)
|
||||
{
|
||||
GLOBAL $RBAC;
|
||||
$aUser = $RBAC->userObj->load( $_SESSION['USER_LOGGED'] );
|
||||
|
||||
$aProcesses = $this->getProUidSupervisor($aUser['USR_UID']);
|
||||
$criteria = $this->getToReassign($userUid, true);
|
||||
$criteria->add(AppCacheViewPeer::PRO_UID, $aProcesses, Criteria::IN);
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the ALL cases list criteria for list by Supervisor
|
||||
* @return Criteria object $Criteria
|
||||
*/
|
||||
public function getToReassignSupervisorListCriteria($userUid)
|
||||
{
|
||||
GLOBAL $RBAC;
|
||||
$aUser = $RBAC->userObj->load( $_SESSION['USER_LOGGED'] );
|
||||
|
||||
$aProcesses = $this->getProUidSupervisor($aUser['USR_UID']);
|
||||
$criteria = $this->getToReassign($userUid, false);
|
||||
$criteria->add(AppCacheViewPeer::PRO_UID, $aProcesses, Criteria::IN);
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
public function getDefaultFields()
|
||||
{
|
||||
return array_merge(
|
||||
|
||||
@@ -5,68 +5,70 @@ INSERT INTO CONTENT (CON_CATEGORY,CON_PARENT,CON_ID,CON_LANG,CON_VALUE) VALUES
|
||||
('ROL_NAME','','00000000000000000000000000000002','en','System Administrator'),
|
||||
('ROL_NAME','','00000000000000000000000000000003','en','Operator'),
|
||||
('ROL_NAME','','00000000000000000000000000000004','en','Manager'),
|
||||
|
||||
('PER_NAME','','00000000000000000000000000000001','en','Login'),
|
||||
('PER_NAME','','00000000000000000000000000000002','en','Setup'),
|
||||
('PER_NAME','','00000000000000000000000000000003','en','Users'),
|
||||
('PER_NAME','','00000000000000000000000000000004','en','Design processes'),
|
||||
('PER_NAME','','00000000000000000000000000000005','en','Create cases'),
|
||||
('PER_NAME','','00000000000000000000000000000006','en','All cases'),
|
||||
('PER_NAME','','00000000000000000000000000000007','en','Reassign case'),
|
||||
('PER_NAME','','00000000000000000000000000000008','en','Reports'),
|
||||
('PER_NAME','','00000000000000000000000000000009','en','Supervisor'),
|
||||
('PER_NAME','','00000000000000000000000000000010','en','Setup Advanced'),
|
||||
('PER_NAME','','00000000000000000000000000000011','en','Dashboard'),
|
||||
('PER_NAME','','00000000000000000000000000000012','en','WebDav'),
|
||||
('PER_NAME','','00000000000000000000000000000013','en','Delete cases'),
|
||||
('PER_NAME','','00000000000000000000000000000014','en','Edit Personal Info'),
|
||||
('PER_NAME','','00000000000000000000000000000015','en','View Folders'),
|
||||
('PER_NAME','','00000000000000000000000000000016','en','Add Folders'),
|
||||
('PER_NAME','','00000000000000000000000000000017','en','Add file in folders'),
|
||||
('PER_NAME','','00000000000000000000000000000018','en','Cancel cases'),
|
||||
('PER_NAME','','00000000000000000000000000000019','en','Delete folders'),
|
||||
('PER_NAME','','00000000000000000000000000000013','en','Delete cases'),
|
||||
('PER_NAME','','00000000000000000000000000000012','en','WebDav'),
|
||||
('PER_NAME','','00000000000000000000000000000011','en','Dashboard'),
|
||||
('PER_NAME','','00000000000000000000000000000010','en','Setup Advanced'),
|
||||
('PER_NAME','','00000000000000000000000000000009','en','Supervisor'),
|
||||
('PER_NAME','','00000000000000000000000000000008','en','Reports'),
|
||||
('PER_NAME','','00000000000000000000000000000007','en','Reassign case'),
|
||||
('PER_NAME','','00000000000000000000000000000006','en','All cases'),
|
||||
('PER_NAME','','00000000000000000000000000000005','en','Create cases'),
|
||||
('PER_NAME','','00000000000000000000000000000004','en','Design processes'),
|
||||
('PER_NAME','','00000000000000000000000000000003','en','Users'),
|
||||
('PER_NAME','','00000000000000000000000000000001','en','Login'),
|
||||
('PER_NAME','','00000000000000000000000000000002','en','Setup'),
|
||||
('PER_NAME','','00000000000000000000000000000063','en','Edit User profile Default Cases Menu Options'),
|
||||
('PER_NAME','','00000000000000000000000000000062','en','Edit User profile Default Main Menu Options'),
|
||||
('PER_NAME','','00000000000000000000000000000061','en','Edit User profile Photo'),
|
||||
('PER_NAME','','00000000000000000000000000000060','en','Edit User profile Must Change Password at next Logon'),
|
||||
('PER_NAME','','00000000000000000000000000000059','en','Edit User profile Password'),
|
||||
('PER_NAME','','00000000000000000000000000000058','en','Edit User profile Costs'),
|
||||
('PER_NAME','','00000000000000000000000000000057','en','Edit User profile Default Language'),
|
||||
('PER_NAME','','00000000000000000000000000000056','en','Edit User profile Time Zone'),
|
||||
('PER_NAME','','00000000000000000000000000000055','en','Edit User profile Role'),
|
||||
('PER_NAME','','00000000000000000000000000000054','en','Edit User profile Status'),
|
||||
('PER_NAME','','00000000000000000000000000000053','en','Edit User profile Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000052','en','Edit User profile Expiration Date'),
|
||||
('PER_NAME','','00000000000000000000000000000051','en','Edit User profile Replaced By'),
|
||||
('PER_NAME','','00000000000000000000000000000050','en','Edit User profile Position'),
|
||||
('PER_NAME','','00000000000000000000000000000049','en','Edit User profile Phone'),
|
||||
('PER_NAME','','00000000000000000000000000000048','en','Edit User profile Location'),
|
||||
('PER_NAME','','00000000000000000000000000000047','en','Edit User profile State or Region'),
|
||||
('PER_NAME','','00000000000000000000000000000046','en','Edit User profile Country'),
|
||||
('PER_NAME','','00000000000000000000000000000045','en','Edit User profile Zip Code'),
|
||||
('PER_NAME','','00000000000000000000000000000044','en','Edit User profile Address'),
|
||||
('PER_NAME','','00000000000000000000000000000043','en','Edit User profile Email'),
|
||||
('PER_NAME','','00000000000000000000000000000042','en','Edit User profile Username'),
|
||||
('PER_NAME','','00000000000000000000000000000041','en','Edit User profile Last Name'),
|
||||
('PER_NAME','','00000000000000000000000000000040','en','Edit User profile First Name'),
|
||||
('PER_NAME','','00000000000000000000000000000038','en','Undo cancel case'),
|
||||
('PER_NAME','','00000000000000000000000000000037','en','Edit personal info Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000036','en','Delete process cases'),
|
||||
('PER_NAME','','00000000000000000000000000000035','en','Setup Logs'),
|
||||
('PER_NAME','','00000000000000000000000000000034','en','Setup User Authentication Sources'),
|
||||
('PER_NAME','','00000000000000000000000000000033','en','Setup Plugins'),
|
||||
('PER_NAME','','00000000000000000000000000000032','en','Setup Case List Cache Builder'),
|
||||
('PER_NAME','','00000000000000000000000000000031','en','Setup Skin'),
|
||||
('PER_NAME','','00000000000000000000000000000030','en','Setup Language'),
|
||||
('PER_NAME','','00000000000000000000000000000029','en','Setup Dashboards'),
|
||||
('PER_NAME','','00000000000000000000000000000028','en','Setup Login'),
|
||||
('PER_NAME','','00000000000000000000000000000027','en','Setup PM Tables'),
|
||||
('PER_NAME','','00000000000000000000000000000026','en','Setup Environment'),
|
||||
('PER_NAME','','00000000000000000000000000000025','en','Setup Heart Beat'),
|
||||
('PER_NAME','','00000000000000000000000000000024','en','Setup Clear Cache'),
|
||||
('PER_NAME','','00000000000000000000000000000023','en','Setup Process Categories'),
|
||||
('PER_NAME','','00000000000000000000000000000022','en','Setup Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000020','en','Setup Logo'),
|
||||
('PER_NAME','','00000000000000000000000000000021','en','Setup Email'),
|
||||
('PER_NAME','','00000000000000000000000000000020','en','Setup Logo');
|
||||
('PER_NAME','','00000000000000000000000000000022','en','Setup Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000023','en','Setup Process Categories'),
|
||||
('PER_NAME','','00000000000000000000000000000024','en','Setup Clear Cache'),
|
||||
('PER_NAME','','00000000000000000000000000000025','en','Setup Heart Beat'),
|
||||
('PER_NAME','','00000000000000000000000000000026','en','Setup Environment'),
|
||||
('PER_NAME','','00000000000000000000000000000027','en','Setup PM Tables'),
|
||||
('PER_NAME','','00000000000000000000000000000028','en','Setup Login'),
|
||||
('PER_NAME','','00000000000000000000000000000029','en','Setup Dashboards'),
|
||||
('PER_NAME','','00000000000000000000000000000030','en','Setup Language'),
|
||||
('PER_NAME','','00000000000000000000000000000031','en','Setup Skin'),
|
||||
('PER_NAME','','00000000000000000000000000000032','en','Setup Case List Cache Builder'),
|
||||
('PER_NAME','','00000000000000000000000000000033','en','Setup Plugins'),
|
||||
('PER_NAME','','00000000000000000000000000000034','en','Setup User Authentication Sources'),
|
||||
('PER_NAME','','00000000000000000000000000000035','en','Setup Logs'),
|
||||
('PER_NAME','','00000000000000000000000000000036','en','Delete process cases'),
|
||||
('PER_NAME','','00000000000000000000000000000037','en','Edit personal info Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000038','en','Undo cancel case'),
|
||||
('PER_NAME','','00000000000000000000000000000040','en','Edit User profile First Name'),
|
||||
('PER_NAME','','00000000000000000000000000000041','en','Edit User profile Last Name'),
|
||||
('PER_NAME','','00000000000000000000000000000042','en','Edit User profile Username'),
|
||||
('PER_NAME','','00000000000000000000000000000043','en','Edit User profile Email'),
|
||||
('PER_NAME','','00000000000000000000000000000044','en','Edit User profile Address'),
|
||||
('PER_NAME','','00000000000000000000000000000045','en','Edit User profile Zip Code'),
|
||||
('PER_NAME','','00000000000000000000000000000046','en','Edit User profile Country'),
|
||||
('PER_NAME','','00000000000000000000000000000047','en','Edit User profile State or Region'),
|
||||
('PER_NAME','','00000000000000000000000000000048','en','Edit User profile Location'),
|
||||
('PER_NAME','','00000000000000000000000000000049','en','Edit User profile Phone'),
|
||||
('PER_NAME','','00000000000000000000000000000050','en','Edit User profile Position'),
|
||||
('PER_NAME','','00000000000000000000000000000051','en','Edit User profile Replaced By'),
|
||||
('PER_NAME','','00000000000000000000000000000052','en','Edit User profile Expiration Date'),
|
||||
('PER_NAME','','00000000000000000000000000000053','en','Edit User profile Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000054','en','Edit User profile Status'),
|
||||
('PER_NAME','','00000000000000000000000000000055','en','Edit User profile Role'),
|
||||
('PER_NAME','','00000000000000000000000000000056','en','Edit User profile Time Zone'),
|
||||
('PER_NAME','','00000000000000000000000000000057','en','Edit User profile Default Language'),
|
||||
('PER_NAME','','00000000000000000000000000000058','en','Edit User profile Costs'),
|
||||
('PER_NAME','','00000000000000000000000000000059','en','Edit User profile Password'),
|
||||
('PER_NAME','','00000000000000000000000000000060','en','Edit User profile Must Change Password at next Logon'),
|
||||
('PER_NAME','','00000000000000000000000000000061','en','Edit User profile Photo'),
|
||||
('PER_NAME','','00000000000000000000000000000062','en','Edit User profile Default Main Menu Options'),
|
||||
('PER_NAME','','00000000000000000000000000000063','en','Edit User profile Default Cases Menu Options'),
|
||||
('PER_NAME','','00000000000000000000000000000064','en','Reassign case supervisor');
|
||||
|
||||
INSERT INTO LANGUAGE (LAN_ID,LAN_LOCATION,LAN_NAME,LAN_NATIVE_NAME,LAN_DIRECTION,LAN_WEIGHT,LAN_ENABLED,LAN_CALENDAR) VALUES
|
||||
('aa','','Afar','','L','0','0','GREGORIAN'),
|
||||
|
||||
@@ -61,17 +61,11 @@ if ($RBAC->userCanAccess('PM_ALLCASES') == 1) {
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption('ADMIN', '', G::LoadTranslation('ID_CASES_MENU_ADMIN'), '', '', 'blockHeader');
|
||||
if ($RBAC->userCanAccess('PM_SUPERVISOR') == 1) {
|
||||
//$G_TMP_MENU->AddIdRawOption('CASES_TO_REVISE_NORMAL', 'cases_List?l=to_revise',
|
||||
//G::LoadTranslation('ID_TO_REVISE'), 'document-review.png' );
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_TO_REVISE', 'casesListExtJs?action=to_revise',
|
||||
G::LoadTranslation('ID_TO_REVISE'), 'document-review.png');
|
||||
//$G_TMP_MENU->AddIdRawOption('CASES_SCHEDULER','cases_Scheduler_List',G::LoadTranslation('ID_SCHEDULER_LIST'));
|
||||
//$G_TMP_MENU->AddIdRawOption('CASES_SCHEDULER_LOG','cases_Scheduler_Log',G::LoadTranslation('ID_SCHEDULER_LOG'));
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) {
|
||||
//$G_TMP_MENU->AddIdRawOption('CASES_TO_REASSIGN_NORMAL', 'cases_List?l=to_reassign',
|
||||
//G::LoadTranslation('ID_TO_REASSIGN'), 'reassing.png' );
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_TO_REASSIGN', 'casesListExtJs?action=to_reassign',
|
||||
G::LoadTranslation('ID_TO_REASSIGN'), 'reassing.png' );
|
||||
}
|
||||
@@ -82,10 +76,6 @@ if ($RBAC->userCanAccess('PM_FOLDERS_VIEW') == 1) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//$G_TMP_MENU->AddIdRawOption('CASES_START_PAGE', 'casesStartPage?action=mainDashboard',
|
||||
//ucwords(strtolower(G::LoadTranslation('ID_DASHBOARD'))),'');
|
||||
|
||||
//Load Other registered Dashboards (From plugins)
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton ();
|
||||
$dashBoardPages = $oPluginRegistry->getDashboardPages ();
|
||||
|
||||
@@ -57,6 +57,22 @@ if(isset($_REQUEST['action']) && $_REQUEST['action'] == "verifySession" ) {
|
||||
die();
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
|
||||
//Check if the user is a supervisor to this Process
|
||||
GLOBAL $RBAC;
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE') == 1){
|
||||
$response->reassigncase = true;
|
||||
$response->message = '';
|
||||
} elseif ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
$response->reassigncase = false;
|
||||
$response->message = G::LoadTranslation('ID_NOT_ABLE_REASSIGN');
|
||||
$oAppCache = new AppCacheView();
|
||||
$aProcesses = $oAppCache->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
if(in_array($_SESSION['PROCESS'], $aProcesses)){
|
||||
$response->reassigncase = true;
|
||||
}
|
||||
}
|
||||
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
}
|
||||
@@ -193,7 +209,7 @@ class Ajax
|
||||
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_DELETE'), 'fn' => 'deleteCase');
|
||||
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) {
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign');
|
||||
}
|
||||
@@ -212,7 +228,7 @@ class Ajax
|
||||
} else {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase');
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_SUPERVISOR') == 1) {
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign');
|
||||
}
|
||||
|
||||
@@ -189,9 +189,10 @@ if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjB
|
||||
|
||||
//menu permissions
|
||||
$cnt = '';
|
||||
$menuPerms = '';
|
||||
$menuPerms = $menuPerms . ($RBAC->userCanAccess( 'PM_REASSIGNCASE' ) == 1) ? 'R' : ''; //can reassign case
|
||||
$oHeadPublisher->assign( '___p34315105', $menuPerms ); // user menu permissions
|
||||
$reassignCase = ($RBAC->userCanAccess( 'PM_REASSIGNCASE' ) == 1) ? 'true' : 'false';
|
||||
$reassignCaseSup = ($RBAC->userCanAccess( 'PM_REASSIGNCASE_SUPERVISOR' ) == 1) ? 'true':'false';
|
||||
$oHeadPublisher->assign( 'varReassignCase', $reassignCase );
|
||||
$oHeadPublisher->assign( 'varReassignCaseSupervisor', $reassignCaseSup );
|
||||
G::LoadClass( 'configuration' );
|
||||
$c = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'app/main', true );
|
||||
|
||||
@@ -144,6 +144,21 @@ if ($actionAjax == "processListExtJs") {
|
||||
$cProcess->addAnd($filters);
|
||||
}
|
||||
|
||||
if($action==='to_revise') {
|
||||
$oAppCache = new AppCacheView();
|
||||
$aProcesses = $oAppCache->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
$cProcess->add(ProcessPeer::PRO_UID, $aProcesses, Criteria::IN);
|
||||
}
|
||||
|
||||
if($action==='to_reassign') {
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) {
|
||||
} elseif($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
$oAppCache = new AppCacheView();
|
||||
$aProcesses = $oAppCache->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
$cProcess->add(ProcessPeer::PRO_UID, $aProcesses, Criteria::IN);
|
||||
}
|
||||
}
|
||||
|
||||
$cProcess->addAscendingOrderByColumn(ProcessPeer::PRO_TITLE);
|
||||
|
||||
$oDataset = ProcessPeer::doSelectRS($cProcess);
|
||||
@@ -156,6 +171,34 @@ if ($actionAjax == "processListExtJs") {
|
||||
return print G::json_encode($processes);
|
||||
}
|
||||
|
||||
if ($actionAjax == "verifySession") {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
GLOBAL $RBAC;
|
||||
//Check if the user is a supervisor to this Process
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE') == 1){
|
||||
$response->reassigncase = true;
|
||||
$response->message = '';
|
||||
$response->processeslist = '';
|
||||
} elseif ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
$response->reassigncase = true;
|
||||
$response->message = G::LoadTranslation('ID_NOT_ABLE_REASSIGN');
|
||||
$oAppCache = new AppCacheView();
|
||||
$aProcesses = $oAppCache->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
$response->processeslist = G::json_encode( $aProcesses );
|
||||
}
|
||||
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
if ($actionAjax == "getUsersToReassign") {
|
||||
$taskUid = $_POST['taskUid'];
|
||||
$search = $_POST['search'];
|
||||
|
||||
@@ -984,7 +984,7 @@ Ext.onReady ( function() {
|
||||
|
||||
var processStore = new Ext.data.Store( {
|
||||
proxy : new Ext.data.HttpProxy( {
|
||||
url : 'casesList_Ajax?actionAjax=processListExtJs',
|
||||
url : 'casesList_Ajax?actionAjax=processListExtJs&action='+action,
|
||||
method : 'POST'
|
||||
}),
|
||||
reader : new Ext.data.JsonReader( {
|
||||
@@ -1613,6 +1613,7 @@ Ext.onReady ( function() {
|
||||
var rowSelectedJsonArray = rowAllJsonArray[rowSelectedIndex];
|
||||
|
||||
var TAS_UID = rowSelectedJsonArray.TAS_UID;
|
||||
var PRO_UID = rowSelectedJsonArray.PRO_UID;
|
||||
var USR_UID = rowSelectedJsonArray.USR_UID;
|
||||
|
||||
var APP_UID = rowSelectedJsonArray.APP_UID;
|
||||
@@ -1620,7 +1621,31 @@ Ext.onReady ( function() {
|
||||
|
||||
optionMenuReassignGlobal.APP_UID = APP_UID;
|
||||
optionMenuReassignGlobal.DEL_INDEX = DEL_INDEX;
|
||||
if( rowSelected ){
|
||||
|
||||
//Check if the user is a supervisor to this Process
|
||||
var reassigncase = false;
|
||||
if(varReassignCase == 'true'){
|
||||
reassigncase = true;
|
||||
} else if (varReassignCaseSupervisor == 'true') {
|
||||
aProcessList= JSON.parse(data.processeslist);
|
||||
for(var i=0; i < aProcessList.length; ++i) {
|
||||
if(aProcessList[i] == PRO_UID){
|
||||
reassigncase = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!reassigncase) {
|
||||
Ext.Msg.show({
|
||||
title: _('ID_WARNING'),
|
||||
msg: data.message,
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.WARNING,
|
||||
buttons: Ext.MessageBox.OK,
|
||||
fn : function(btn) {
|
||||
}
|
||||
});
|
||||
} else if( rowSelected ){
|
||||
//Variables
|
||||
var pageSizeUsersToReassign = 10;
|
||||
|
||||
@@ -1832,15 +1857,17 @@ Ext.onReady ( function() {
|
||||
case 'todo':
|
||||
menuItems = [optionMenuPause, optionMenuSummary, optionMenuNotes];
|
||||
|
||||
if( ___p34315105.search('R') != -1 )
|
||||
if( varReassignCase == 'true' || varReassignCaseSupervisor == 'true'){
|
||||
menuItems.push(optionMenuReassign);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'draft':
|
||||
menuItems = [optionMenuPause, optionMenuSummary, optionMenuNotes];
|
||||
if( ___p34315105.search('R') != -1 )
|
||||
if( varReassignCase == 'true' || varReassignCaseSupervisor == 'true'){
|
||||
menuItems.push(optionMenuReassign);
|
||||
}
|
||||
menuItems.push(optionMenuDelete);
|
||||
|
||||
break;
|
||||
|
||||
@@ -1125,7 +1125,7 @@ Ext.onReady(function(){
|
||||
labelSeparator: '',
|
||||
labelStyle: 'margin-left:150px;position:absolute;'
|
||||
});
|
||||
|
||||
|
||||
var winReassignInCasesList = new Ext.Window({
|
||||
title: '',
|
||||
width: 450,
|
||||
@@ -1172,16 +1172,25 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if(!data.reassigncase) {
|
||||
Ext.Msg.show({
|
||||
title: _('ID_WARNING'),
|
||||
msg: data.message,
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.WARNING,
|
||||
buttons: Ext.MessageBox.OK,
|
||||
fn : function(btn) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
winReassignInCasesList.show();
|
||||
|
||||
grdpnlUsersToReassign.store.load();
|
||||
winReassignInCasesList.show();
|
||||
grdpnlUsersToReassign.store.load();
|
||||
}
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
if (typeof(result.responseText) != 'undefined') {
|
||||
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
||||
}
|
||||
if (typeof(result.responseText) != 'undefined') {
|
||||
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user