issue fixes in shift details and manage Employee and error handling in Manage Projects

parent 5365ae60
......@@ -353,7 +353,11 @@ public class ProjectServiceImpl implements ProjectService {
billings.setBillableStatus(pT.getBillableStatus());
billings.setAccount(pT.getAccount());
billings.setActive(pT.isActive());
if (!projectTeamMate.getProjectId().equalsIgnoreCase("Nisum0000")) {
billings.setBillingStartDate(DateUtils.truncate(pT.getNewBillingStartDate(), Calendar.DATE));
} else {
billings.setBillingStartDate(DateUtils.truncate(pT.getStartDate(), Calendar.DATE));
}
if (pT.getEndDate() != null) {
billings.setBillingEndDate(DateUtils.truncate(pT.getEndDate(), Calendar.DATE));
}
......
......@@ -152,18 +152,13 @@ public class UserServiceImpl implements UserService {
newBenchAllocation.setEmployeeName(employeeRoles.getEmployeeName());
newBenchAllocation.setProjectId(MyTimeUtils.BENCH_PROJECT_ID);
newBenchAllocation.setStartDate(employeeRoles.getDateOfJoining() != null
? employeeRoles.getDateOfJoining()
: new Date());
newBenchAllocation.setStartDate(employeeRoles.getDateOfJoining() != null ? employeeRoles.getDateOfJoining() : new Date());
Project p = projectRepo.findByProjectId(MyTimeUtils.BENCH_PROJECT_ID);
newBenchAllocation.setProjectName(p.getProjectName());
newBenchAllocation.setAccountId(p.getAccountId());
newBenchAllocation.setDomainId(p.getDomainId());
newBenchAllocation.setShift(employeeRoles.getShift());
newBenchAllocation.setRole(employeeRoles.getRole());
// newBenchAllocation.setManagerId(p.getManagerId());
//newBenchAllocation.setManagerName(p.getManagerName());
if (employeeRoles.getEmpStatus() != null
&& (employeeRoles.getEmpStatus().trim().equalsIgnoreCase("InActive")
......
......@@ -476,7 +476,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
document.getElementById('hasPassort').focus();
}
else if(hasPassort == "Yes" && (passportExpiryDate == undefined || passportExpiryDate == "")){
$scope.alertMsg = "Please select the Passport Expiry Date:";
$scope.alertMsg = "Please select the Passport Expiry Date";
document.getElementById('passportExpiryDate').focus();
}
else if(hasPassort == "Yes" && (passportExpiryDate < today)){
$scope.alertMsg = "Please select the Future Date for passport Expiry";
document.getElementById('passportExpiryDate').focus();
}
else if(hasB1 == undefined){
......@@ -484,7 +488,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
document.getElementById('hasB1').focus();
}
else if(hasB1 == "Yes" && (b1ExpiryDate == undefined || b1ExpiryDate == "")){
$scope.alertMsg = "Please select the B1 Expiry Date";
$scope.alertMsg = "Please select the B1 Expiry Date ";
document.getElementById('b1ExpiryDate').focus();
}
else if(hasB1 == "Yes" && (b1ExpiryDate < today)){
$scope.alertMsg = "Please select the Future Date for B1 Expiry";
document.getElementById('b1ExpiryDate').focus();
}
else if($scope.templateTitle != "Add" && $scope.exitDate == undefined && $scope.empStatus != "Active"){
......
......@@ -1496,7 +1496,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$http(req).then(function mySuccess(response) {
$scope.result = "Success";
if(response.data == "TeamMate updated successfuly"){
if(response.data == "TeamMate updated successfuly" || response.data.includes("Resource Successfully moved from") ){
$timeout(function () {
getProjectDetails($scope.projectId, $scope.status);
removeTab('Add');
......
......@@ -74,7 +74,7 @@ myApp.controller("shiftDetailsController",function($scope, myFactory,exportUiGri
var shiftV = $scope.shiftValue;
if(shiftV == undefined || shiftV==""){
shiftV="Shift 1(09:00 AM - 06:00 PM)";
shiftV="Shift 1(9:00 AM - 6:00 PM)";
}
$scope.shiftValue=shiftV;
$scope.selectedshiftValue=shiftV;
......
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