Commit 3d3c7609 authored by Rajesh Sagar's avatar Rajesh Sagar

issues in domain module

parent 393c6ba3
...@@ -211,11 +211,6 @@ public class DomainServiceImpl implements DomainService { ...@@ -211,11 +211,6 @@ public class DomainServiceImpl implements DomainService {
boolean check=false; boolean check=false;
int count=0; int count=0;
List<Domains> domainListbyAccountId=domainRepo.findByAccountId(accountId); List<Domains> domainListbyAccountId=domainRepo.findByAccountId(accountId);
for(Domains domains:domainListbyAccountId )
{
if(domains.getDomainName().equalsIgnoreCase(domainName))
count++;
}
boolean deleveryManagersCheck=fromDB.toString().contentEquals(fromUser.toString()); boolean deleveryManagersCheck=fromDB.toString().contentEquals(fromUser.toString());
List<Domains> domainList=domainRepo.findByDomainNameAndAccountId(domainName, accountId); List<Domains> domainList=domainRepo.findByDomainNameAndAccountId(domainName, accountId);
for(Domains domains:domainListbyAccountId ) for(Domains domains:domainListbyAccountId )
......
...@@ -12,7 +12,7 @@ myApp.controller("domainController", ...@@ -12,7 +12,7 @@ myApp.controller("domainController",
}); });
var getCellTemplate = '<p class="col-lg-12"><p class="col-lg-4"><i class="fa fa-pencil-square-o fa-2x" ng-show="row.entity.status == \'Active\'" aria-hidden="true" id="UpdateBtnVisible" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Update\')"></i></p>'+ var getCellTemplate = '<p class="col-lg-12"><p class="col-lg-4"><i class="fa fa-pencil-square-o fa-2x" ng-show="row.entity.status == \'Active\'" aria-hidden="true" id="UpdateBtnVisible" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Update\')"></i></p>'+
'<p class="col-lg-4"><i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="left" title="Delete" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p></p>'; '<p class="col-lg-4"><i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="left" title="Delete" onmouseenter="$(this).tooltip(\'show\')" ng-click="grid.appScope.getRowData(row,\'Delete\')"></i></p></p>';
$scope.gridOptions = { $scope.gridOptions = {
...@@ -264,14 +264,14 @@ myApp.controller("domainController", ...@@ -264,14 +264,14 @@ myApp.controller("domainController",
$scope.cancel = function() { $scope.cancel = function() {
var showConfirmDialog = false; var showConfirmDialog = false;
var totalFields = $scope.myForm.$$controls; var totalFields = $scope.myForm.$$controls;
for (key in totalFields) { for (key in totalFields) {
console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue) console.log("Model value of" + key + " ==>" + totalFields[key].$modelValue)
if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) { if(totalFields[key].$modelValue !== '' && totalFields[key].$modelValue !== undefined && totalFields[key].$modelValue.length !== 0) {
console.log("Came here!"); console.log("Came here!");
showConfirmDialog = true; showConfirmDialog = true;
}
} }
}
if(showConfirmDialog){ if(showConfirmDialog){
$mdDialog.show($mdDialog.confirm({ $mdDialog.show($mdDialog.confirm({
skipHide: true, skipHide: true,
...@@ -365,8 +365,6 @@ myApp.controller("domainController", ...@@ -365,8 +365,6 @@ myApp.controller("domainController",
} }
} }
$scope.ifEmployeeNameExists = function(empName) { $scope.ifEmployeeNameExists = function(empName) {
$scope.selectedEmployeeNames.push(manager.employeeName);
removeDuplicates($scope.selectedEmployeeNames);
return $scope.selectedEmployeeNames.includes(empName); return $scope.selectedEmployeeNames.includes(empName);
} }
$scope.validateFields = function(action){ $scope.validateFields = function(action){
...@@ -424,11 +422,6 @@ myApp.controller("domainController", ...@@ -424,11 +422,6 @@ myApp.controller("domainController",
}; };
function removeDuplicates(arr){
return arr.filter(function(item, pos) {
return arr.indexOf(item) == pos;
})
}
} }
}); });
\ No newline at end of file
...@@ -91,7 +91,18 @@ ...@@ -91,7 +91,18 @@
<h4>Organization Info</h4> <h4>Organization Info</h4>
<div class="form-group"> <div class="form-group">
<table> <table>
<tr> <tr>
<td colspan="4"><b>Functional Group:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="functionalGroup"
md-selected-text="getSelectedFunctionalGroup()"
id="functionalGroup"> <md-optgroup
label="Functional Org"> <md-option
ng-value="functionalGroup"
ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option>
</md-optgroup> </md-select></td>
</tr>
<tr>
<td colspan="4"><b>Role:</b></td> <td colspan="4"><b>Role:</b></td>
<td colspan="8"><md-select ng-model="empRole" <td colspan="8"><md-select ng-model="empRole"
md-selected-text="getSelectedRole()" id="empRole"> <md-optgroup md-selected-text="getSelectedRole()" id="empRole"> <md-optgroup
...@@ -146,16 +157,7 @@ ...@@ -146,16 +157,7 @@
</md-optgroup> </md-select></td> </md-optgroup> </md-select></td>
</tr> --> </tr> -->
<tr>
<td colspan="4"><b>Functional Group:</b><span class="mandatory"></span></td>
<td colspan="8"><md-select ng-model="functionalGroup"
md-selected-text="getSelectedFunctionalGroup()"
id="functionalGroup"> <md-optgroup
label="Functional Org"> <md-option
ng-value="functionalGroup"
ng-repeat="functionalGroup in functionalGroups">{{functionalGroup}}</md-option>
</md-optgroup> </md-select></td>
</tr>
<tr> <tr>
<td colspan="1"><b>HasPassport:</b><span class="mandatory"></span></td> <td colspan="1"><b>HasPassport:</b><span class="mandatory"></span></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment