Commit c7f42e06 authored by Prayas Jain's avatar Prayas Jain

Fixed Move to Engage Issue

parent 7691709e
...@@ -20,12 +20,13 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -20,12 +20,13 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
pageNumber: 1, pageNumber: 1,
pageSize:10, pageSize:10,
enableFiltering: true, enableFiltering: true,
enableHorizontalScrollbar:1,
columnDefs : [ columnDefs : [
{field : 'employeeId',displayName: 'Employee ID', enableColumnMenu: true, enableSorting: true,enableFiltering: true, width:120,cellClass: 'grid-align'}, {field : 'employeeId',displayName: 'EmpId', enableColumnMenu: true, enableSorting: true,enableFiltering: true, width:'*',cellClass: 'grid-align'},
{field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: true, enableSorting: true,enableFiltering: true,cellClass: 'grid-align',width:180}, {field : 'employeeName',displayName: 'Employee Name', enableColumnMenu: true, enableSorting: true,enableFiltering: true,cellClass: 'grid-align',width:'*'},
{field : 'mobileNumber',displayName: 'Mobile', enableColumnMenu: false, enableSorting: false,enableFiltering: false,cellClass: 'grid-align'}, {field : 'mobileNumber',displayName: 'Mobile', enableColumnMenu: false, enableSorting: false,enableFiltering: false,cellClass: 'grid-align', width:'*'},
{field : 'empStatus',displayName: 'Status', enableColumnMenu: false, enableSorting: true,enableFiltering: true,width:80}, {field : 'empStatus',displayName: 'Status', enableColumnMenu: false, enableSorting: false,enableFiltering: true,width:'*'},
{field : 'empSubStatus.subStatus',displayName: 'Sub Status', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:140,cellClass:function(grid,row,col){ {field : 'empSubStatus.subStatus',displayName: 'Sub Status', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:'*',cellClass:function(grid,row,col){
if(grid.getCellValue(row,col)==='Maternity Leave') { if(grid.getCellValue(row,col)==='Maternity Leave') {
return 'blue'; return 'blue';
...@@ -43,10 +44,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -43,10 +44,12 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
return 'violet'; return 'violet';
} }
}}, }},
{field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false,enableFiltering: true,cellClass: 'grid-align', width:180}, {field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false,enableFiltering: true,cellClass: 'grid-align', width:'*'},
{field : 'baseTechnology',displayName: 'Skill', enableColumnMenu: false, enableSorting: false,enableFiltering: false,cellClass: 'grid-align'}, {field : 'baseTechnology',displayName: 'Skill', enableColumnMenu: false, enableSorting: false,enableFiltering: false,cellClass: 'grid-align', width:'*'},
{field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: true,enableFiltering: true,cellClass: 'grid-align'}, {field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: false,enableFiltering: true,cellClass: 'grid-align',width:'*'},
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false,enableFiltering: false, width:100,cellClass: 'grid-align'} {field : 'functionalGroup',displayName: 'Func. Org', enableColumnMenu: false, enableSorting: false,enableFiltering:true,width:'*', cellClass: 'grid-align'},
{field : 'dateOfJoining',displayName: 'DOJ', enableColumnMenu: true, enableSorting: true,enableFiltering:true,cellFilter:'date:"dd-MMM-yyyy"',width:'*', cellClass: 'grid-align'},
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false,enableFiltering: false}
] ]
}; };
...@@ -119,7 +122,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $ ...@@ -119,7 +122,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
{field : 'mobileNumber',displayName: 'Mobile', enableColumnMenu: false, enableSorting: false,enableFiltering: false}, {field : 'mobileNumber',displayName: 'Mobile', enableColumnMenu: false, enableSorting: false,enableFiltering: false},
{field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false,enableFiltering: true}, {field : 'emailId',displayName: 'Email', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'baseTechnology',displayName: 'Skill', enableColumnMenu: false, enableSorting: false,enableFiltering: true}, {field : 'baseTechnology',displayName: 'Skill', enableColumnMenu: false, enableSorting: false,enableFiltering: true},
{field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: true,enableFiltering: true}, {field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: true,enableFiltering: true},
{name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false,enableFiltering: false, width:100} {name : 'Actions', displayName: 'Actions',cellTemplate: getCellTemplate, enableColumnMenu: false, enableSorting: false,enableFiltering: false, width:100}
] ]
}; };
......
...@@ -55,7 +55,8 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export ...@@ -55,7 +55,8 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
else if(grid.getCellValue(row,col)==='At Client Location') { else if(grid.getCellValue(row,col)==='At Client Location') {
return 'violet'; return 'violet';
} }
}}, }},
{field : 'designation',displayName: 'Designation', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:140},
{field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100}, {field : 'functionalGroup',displayName: 'Functional Org', enableColumnMenu: false, enableSorting: true,enableFiltering:true,width:100},
{field : 'emailId',displayName: 'Email Id', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100}, {field : 'emailId',displayName: 'Email Id', enableColumnMenu: false, enableSorting: true,enableFiltering:false,width:100},
......
...@@ -902,10 +902,17 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -902,10 +902,17 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
if(row.billableStatus == "Reserved"){ if(row.billableStatus == "Reserved"){
$scope.alertMsg = 'Please Update Your Billability Status From Reserved and then Move to Engage'; $scope.alertMsg = 'Please Update Your Billability Status From Reserved and then Move to Engage';
}else { }else {
var onBehalfOfEmp;
var onBehalfOfEmpId;
row.resourceRole == 'Individual Contributor' ? row.resourceRole = 'Employee' : row.resourceRole; row.resourceRole == 'Individual Contributor' ? row.resourceRole = 'Employee' : row.resourceRole;
$scope.alertMsg =''; $scope.alertMsg ='';
var onBehalfOfEmp = $scope.getOnBehalfOfEmpId(row.onBehalfOf); if(row.onBehalfOf != "" && row.onBehalfOf != null) {
var onBehalfOfEmpId = onBehalfOfEmp[0].employeeId; onBehalfOfEmp = $scope.getOnBehalfOfEmpId(row.onBehalfOf);
onBehalfOfEmpId = onBehalfOfEmp[0].employeeId;
}
else {
onBehalfOfEmpId = null;
}
var loginEmpId = myFactory.getEmpId(); var loginEmpId = myFactory.getEmpId();
var record = {"id":row.id,"employeeId":row.employeeId,"projectId":row.projectId,"onBehalfOf":onBehalfOfEmpId,"billableStatus":row.billableStatus,"billingEndDate":row.billingEndDate,"resourceRole":row.resourceRole,"billingStartDate":row.billingStartDate,"status":"Engaged"}; var record = {"id":row.id,"employeeId":row.employeeId,"projectId":row.projectId,"onBehalfOf":onBehalfOfEmpId,"billableStatus":row.billableStatus,"billingEndDate":row.billingEndDate,"resourceRole":row.resourceRole,"billingStartDate":row.billingStartDate,"status":"Engaged"};
var urlRequest = appConfig.appUri+ "resources?loginEmpId="+loginEmpId; var urlRequest = appConfig.appUri+ "resources?loginEmpId="+loginEmpId;
...@@ -929,7 +936,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -929,7 +936,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
ok: 'ok' ok: 'ok'
})).then(function () { })).then(function () {
$scope.myForm.$setPristine(); $scope.myForm.$setPristine();
}) })
}else{ }else{
$scope.alertMsg=response.data.message; $scope.alertMsg=response.data.message;
if($scope.alertMsg && $scope.alertMsg != ""){ if($scope.alertMsg && $scope.alertMsg != ""){
......
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