BUG 7554 A new permission was added for the functionality of "Cancel"
This commit is contained in:
@@ -281,16 +281,17 @@ $caseStep->getStepPosition());
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'TO_DO':
|
case 'TO_DO':
|
||||||
if( ! AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX']) ) {
|
if( ! AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX']) ) {
|
||||||
$options[] = Array('text'=>G::LoadTranslation('ID_PAUSED_CASE'), 'fn'=>'setUnpauseCaseDate');
|
$options[] = Array('text'=>G::LoadTranslation('ID_PAUSED_CASE'), 'fn'=>'setUnpauseCaseDate');
|
||||||
|
if ($cant == 1) {
|
||||||
if ($cant == 1) {
|
if($RBAC->userCanAccess('PM_CANCELCASE')==1)
|
||||||
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase');
|
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase');
|
||||||
|
else
|
||||||
|
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase', 'hide'=>'hiden');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$options[] = Array('text'=>G::LoadTranslation('ID_UNPAUSE'), 'fn'=>'unpauseCase');
|
$options[] = Array('text'=>G::LoadTranslation('ID_UNPAUSE'), 'fn'=>'unpauseCase');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($RBAC->userCanAccess('PM_REASSIGNCASE')==1) {
|
if($RBAC->userCanAccess('PM_REASSIGNCASE')==1) {
|
||||||
$options[] = Array('text'=>G::LoadTranslation('ID_REASSIGN'), 'fn'=>'getUsersToReassign');
|
$options[] = Array('text'=>G::LoadTranslation('ID_REASSIGN'), 'fn'=>'getUsersToReassign');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Ext.onReady(function(){
|
|||||||
url : 'ajaxListener',
|
url : 'ajaxListener',
|
||||||
params : {action : 'getCaseMenu', app_status:app_status},
|
params : {action : 'getCaseMenu', app_status:app_status},
|
||||||
success: function ( result, request ) {
|
success: function ( result, request ) {
|
||||||
var data = Ext.util.JSON.decode(result.responseText);
|
var data = Ext.util.JSON.decode(result.responseText);
|
||||||
for(i=0; i<data.length; i++) {
|
for(i=0; i<data.length; i++) {
|
||||||
switch(data[i].id) {
|
switch(data[i].id) {
|
||||||
case 'STEPS':
|
case 'STEPS':
|
||||||
@@ -93,11 +93,13 @@ Ext.onReady(function(){
|
|||||||
var actionMenu = Ext.getCmp('actionMenu');
|
var actionMenu = Ext.getCmp('actionMenu');
|
||||||
actionMenu.menu.removeAll();
|
actionMenu.menu.removeAll();
|
||||||
for(j=0; j<data[i].options.length; j++) {
|
for(j=0; j<data[i].options.length; j++) {
|
||||||
actionMenu.menu.add({
|
if(!data[i].options[j].hide){
|
||||||
text: data[i].options[j].text,
|
actionMenu.menu.add({
|
||||||
handler: data[i].options[j].fn != '' ? Actions[data[i].options[j].fn] : function(){}
|
text: data[i].options[j].text,
|
||||||
});
|
handler: data[i].options[j].fn != '' ? Actions[data[i].options[j].fn] : function(){}
|
||||||
menuSelectedTitle[data[i].options[j].fn] = data[i].options[j].text;
|
});
|
||||||
|
menuSelectedTitle[data[i].options[j].fn] = data[i].options[j].text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
actionMenu.show();
|
actionMenu.show();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user