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