Commit c8e144f5 authored by dgoud-nisum-com's avatar dgoud-nisum-com Committed by rbonthala-nisum-com

Defect Fixed for MT-69 (#49)

parent e8f9ef32
...@@ -211,9 +211,9 @@ myApp.controller("domainController", ...@@ -211,9 +211,9 @@ myApp.controller("domainController",
e.stopPropagation(); e.stopPropagation();
} }
$scope.searchFilter = function(obj) { $scope.searchFilter = function(obj) {
var re = new RegExp($scope.searchTerm, 'i'); var re = $scope.searchTerm;
return !$scope.searchTerm var filteredWord = !$scope.searchTerm || obj.employeeName.startsWith(re);
|| re.test(obj.employeeName); return filteredWord;
}; };
$scope.clearSearchTerm = function() { $scope.clearSearchTerm = function() {
$scope.searchTerm = ''; $scope.searchTerm = '';
......
...@@ -277,8 +277,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -277,8 +277,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
e.stopPropagation(); e.stopPropagation();
} }
$scope.searchFilter = function (obj) { $scope.searchFilter = function (obj) {
var re = new RegExp($scope.searchTerm, 'i'); var re = $scope.searchTerm;
return !$scope.searchTerm || re.test(obj.employeeName); var filteredWord = !$scope.searchTerm || obj.employeeName.startsWith(re);
return filteredWord;
}; };
......
...@@ -300,10 +300,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog, ...@@ -300,10 +300,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
e.stopPropagation(); e.stopPropagation();
} }
$scope.searchFilter = function (obj) { $scope.searchFilter = function (obj) {
var re = new RegExp($scope.searchTerm, 'i'); var re = $scope.searchTerm;
// searching the employee based on name , employeeid and email var filteredWord = !$scope.searchTerm || obj.employeeName.startsWith(re);
//return !$scope.searchTerm || re.test(obj.employeeId) || re.test(obj.employeeName) ||re.test(obj.emailId) ; return filteredWord; ;
return !$scope.searchTerm || re.test(obj.employeeName) ;
}; };
......
...@@ -26,6 +26,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -26,6 +26,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:130} {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false, enableFiltering:false,width:130}
] ]
}; };
$scope.nameFields = ['employeeName']
$scope.gridOptions.data = $scope.records; $scope.gridOptions.data = $scope.records;
$scope.getRowData = function(row, action){ $scope.getRowData = function(row, action){
$scope.parentData.id = row.entity.id; $scope.parentData.id = row.entity.id;
...@@ -58,7 +59,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -58,7 +59,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$('#home').addClass('md-scroll-mask'); $('#home').addClass('md-scroll-mask');
userData.action = action; userData.action = action;
$mdDialog.show ({ $mdDialog.show ({
clickOutsideToClose: true, clickOutsideToClose: false,
scope: $scope, scope: $scope,
preserveScope: true, preserveScope: true,
templateUrl: 'templates/newAccount.html', templateUrl: 'templates/newAccount.html',
...@@ -165,8 +166,9 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -165,8 +166,9 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
e.stopPropagation(); e.stopPropagation();
} }
$scope.searchFilter = function (obj) { $scope.searchFilter = function (obj) {
var re = new RegExp($scope.searchTerm, 'i'); var re = $scope.searchTerm;
return !$scope.searchTerm || re.test(obj.employeeName); var filteredWord = !$scope.searchTerm || obj.employeeName.startsWith(re);
return filteredWord;
}; };
$scope.removeSelectedLead = function(item){ $scope.removeSelectedLead = function(item){
var index = $scope.managersSelectedList.indexOf(item); var index = $scope.managersSelectedList.indexOf(item);
...@@ -293,3 +295,4 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo ...@@ -293,3 +295,4 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
} }
} }
}); });
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<span class="glyphicon glyphicon-remove close-mdselect" ng-click="closeSelectBox()"></span> <span class="glyphicon glyphicon-remove close-mdselect" ng-click="closeSelectBox()"></span>
</md-select-header> </md-select-header>
<md-optgroup label="managers" class="optionScroll"> <md-optgroup label="managers" class="optionScroll">
<md-option ng-value="manager" ng-repeat="manager in managerDetails | filter:searchTerm">{{manager.employeeName}}</md-option> <md-option ng-value="manager" ng-repeat="manager in managerDetails | filter:searchFilter">{{manager.employeeName}}</md-option>
</md-optgroup> </md-optgroup>
</md-select> </md-select>
</div> </div>
......
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