HOR-265
18724 Aun persiste el error de aparecer aleatoriamente la opcion Actions o Information en Supervisor HOR-265 18724 Aun persiste el error de aparecer aleatoriamente la opcion Actions o Information en Supervisor
This commit is contained in:
@@ -24,26 +24,59 @@
|
||||
*/
|
||||
global $G_TMP_MENU;
|
||||
global $sStatus;
|
||||
global $RBAC;
|
||||
$statusSendAndUnassigned = false;
|
||||
|
||||
if ((($sStatus == 'DRAFT') || ($sStatus == 'TO_DO')) && ($_SESSION['TASK'] != -1)) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
} else {
|
||||
$G_TMP_MENU->AddIdOption('STEPS' , G::LoadTranslation('ID_STEPS') , 'javascript:showSteps();' , 'absolute');
|
||||
$G_TMP_MENU->AddIdOption('INFO' , G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
}
|
||||
$G_TMP_MENU->AddIdOption('ACTIONS' , G::LoadTranslation('ID_ACTIONS') , 'javascript:showActions();' , 'absolute');
|
||||
} else {
|
||||
$G_TMP_MENU->AddIdOption('INFO' , G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
//caseOptions
|
||||
switch ($_SESSION['actionCaseOptions']) {
|
||||
case 'todo':
|
||||
case 'draft':
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
break;
|
||||
case 'sent':
|
||||
case 'unassigned':
|
||||
$_SESSION['TASK'] = -1;
|
||||
$statusSendAndUnassigned = true;
|
||||
break;
|
||||
case 'paused':
|
||||
$access = $RBAC->requirePermissions('PM_ALLCASES');
|
||||
if ($access) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
} else {
|
||||
$_SESSION['TASK'] = -1;
|
||||
}
|
||||
break;
|
||||
case 'to_revise':
|
||||
case 'to_reassign':
|
||||
$access = $RBAC->requirePermissions('PM_REASSIGNCASE', 'PM_SUPERVISOR');
|
||||
if ($access) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
} else {
|
||||
$_SESSION['TASK'] = -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
break;
|
||||
}
|
||||
$G_TMP_MENU->AddIdOption('NOTES' , G::LoadTranslation('ID_NOTES'), 'javascript:showNotes();', 'absolute');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
unset($_SESSION['actionCaseOptions']);
|
||||
|
||||
if ((($sStatus === 'DRAFT') || ($sStatus === 'TO_DO')) && !$statusSendAndUnassigned) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
} else {
|
||||
$G_TMP_MENU->AddIdOption('STEPS', G::LoadTranslation('ID_STEPS'), 'javascript:showSteps();', 'absolute');
|
||||
$G_TMP_MENU->AddIdOption('INFO', G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
}
|
||||
$G_TMP_MENU->AddIdOption('ACTIONS', G::LoadTranslation('ID_ACTIONS'), 'javascript:showActions();', 'absolute');
|
||||
} else {
|
||||
$G_TMP_MENU->AddIdOption('INFO', G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
}
|
||||
$G_TMP_MENU->AddIdOption('NOTES', G::LoadTranslation('ID_NOTES'), 'javascript:showNotes();', 'absolute');
|
||||
|
||||
@@ -132,12 +132,7 @@ if(!isset($_SESSION['APPLICATION']) || !isset($_SESSION['TASK']) || !isset($_SES
|
||||
$_SESSION['APPLICATION'] = $case['APP_UID'];
|
||||
$_SESSION['TASK'] = $case['TAS_UID'];
|
||||
$_SESSION['INDEX'] = $case['DEL_INDEX'];
|
||||
}
|
||||
$_SESSION['TASK'] = ($_GET['action'] == "unassigned" || $_GET['action'] == "sent" ) ? -1 : $_SESSION['TASK'];
|
||||
if($_GET['action'] == "todo" || $_GET['action'] == "draft") {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
}
|
||||
$_SESSION['actionCaseOptions'] = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user