Commit 6ee8662d authored by Prayas Jain's avatar Prayas Jain

Added Status Validation for showing Icon

parent 30c018f4
...@@ -626,14 +626,14 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -626,14 +626,14 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
rowEditWaitInterval: 0, rowEditWaitInterval: 0,
columnDefs: [ columnDefs: [
{ name: 'employeeId', displayName: 'Emp ID', enableColumnMenu: true, enableSorting: true, enableFiltering:true,width:80 }, { name: 'employeeId', displayName: 'Emp ID', enableColumnMenu: true, enableSorting: true, enableFiltering:true,width:80 },
{ field: 'employeeName', displayName: 'Emp Name', enableColumnMenu: false,width:"*", enableSorting: false,enableFiltering:true,sort: { { name: 'employeeName', displayName: 'Emp Name',width:'*', enableSorting: false, enableColumnMenu: false ,enableFiltering:true,sort: {
direction: uiGridConstants.ASC, direction: uiGridConstants.ASC,
priority: 0, priority: 0,
} }, } },
// { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false }, // { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false },
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 }, // { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{ {
field: 'resourceRole', displayName:'Role', enableColumnMenu: true,width:"*", enableSorting: false,enableFiltering:false, name: 'resourceRole', displayName:'Role', enableColumnMenu: false,width:"*", enableSorting: false,enableFiltering:false,
cellTemplate:'<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" id="empRole">' cellTemplate:'<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow" class="grid-Dropdown"><md-select ng-model="MODEL_COL_FIELD" id="empRole">'
+'<md-optgroup label="employee role"><md-option ng-value="empRole" ng-repeat="empRole in col.colDef.editDropdownOptionsArray">{{empRole}}</md-option>' +'<md-optgroup label="employee role"><md-option ng-value="empRole" ng-repeat="empRole in col.colDef.editDropdownOptionsArray">{{empRole}}</md-option>'
+'</md-optgroup></md-select></div>', +'</md-optgroup></md-select></div>',
...@@ -688,10 +688,9 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -688,10 +688,9 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}); });
$scope.showMoveToBenchIcon = function(row){ $scope.showMoveToBenchIcon = function(row){
if($scope.status == 'InActive' && row.projectId != 'Nisum0000'){ if($scope.status == 'InActive' && row.status == 'Engaged'){
return true; return true;
} }
} }
$scope.parentData = { $scope.parentData = {
...@@ -789,14 +788,14 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -789,14 +788,14 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
var urlRequest = ""; var urlRequest = "";
var loginEmpId = myFactory.getEmpId(); var loginEmpId = myFactory.getEmpId();
urlRequest = appConfig.appUri+ "resources/moveToOpenPool?loginEmpId="+loginEmpId; urlRequest = appConfig.appUri+ "resources/moveToOpenPool?loginEmpId="+loginEmpId;
var req = { var req = {
method : 'PUT', method : 'PUT',
url : urlRequest, url : urlRequest,
headers : { headers : {
"Content-type" : "application/json" "Content-type" : "application/json"
}, },
data : record data : record
} }
$http(req).then(function mySuccess(response) { $http(req).then(function mySuccess(response) {
$scope.result = "Success"; $scope.result = "Success";
if(response.data.message == "Resource Moved to Bench"){ if(response.data.message == "Resource Moved to Bench"){
......
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