summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common')
-rw-r--r--ecomp-portal-FE-common/client/app/views/role/rolefunctionpopupController.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/role/rolefunctionpopupController.js b/ecomp-portal-FE-common/client/app/views/role/rolefunctionpopupController.js
index 0fa84f31..4573effa 100644
--- a/ecomp-portal-FE-common/client/app/views/role/rolefunctionpopupController.js
+++ b/ecomp-portal-FE-common/client/app/views/role/rolefunctionpopupController.js
@@ -124,8 +124,11 @@ app.controller('rolefunctionpopupController',function($scope, confirmBoxService,
break;
}
if (!isEditing) {
- if (message.availableRoleFunctions[x].code == availableRoleFunction.code) {
- confirmBoxService.showInformation("Code already exists. Please create a role function with a different code to proceed.");
+ if (message.availableRoleFunctions[x].type == availableRoleFunction.type
+ && message.availableRoleFunctions[x].code == availableRoleFunction.code
+ && message.availableRoleFunctions[x].action == availableRoleFunction.action
+ ) {
+ confirmBoxService.showInformation("Please make sure code, type and action is unique. Please create a role function with a different code or type or action to proceed.");
exists = true;
availableRoleFunction.name = $scope.tempText;
break;