Commit 38f9a316 authored by Prayas Jain's avatar Prayas Jain

Updated Move to bench Message

parent 48a39117
...@@ -1075,7 +1075,7 @@ public class ResourceService implements IResourceService { ...@@ -1075,7 +1075,7 @@ public class ResourceService implements IResourceService {
benchResource.setBillableStatus(MyTeamUtils.BENCH_BILLABILITY_STATUS); benchResource.setBillableStatus(MyTeamUtils.BENCH_BILLABILITY_STATUS);
benchResource.setStatus(MyTeamUtils.STATUS_RELEASED); benchResource.setStatus(MyTeamUtils.STATUS_RELEASED);
benchResource.setAuditFields(loginId, MyTeamUtils.CREATE); benchResource.setAuditFields(loginId, MyTeamUtils.CREATE);
if(proposedResource.getBillingStartDate().compareTo(MyTeamDateUtils.getDayMoreThanDate(existingresource.getBillingEndDate()))!=0){ if(proposedResource!=null && existingresource!=null && proposedResource.getBillingStartDate().compareTo(MyTeamDateUtils.getDayMoreThanDate(existingresource.getBillingEndDate()))!=0){
resourcePers = resourceRepo.save(benchResource); resourcePers = resourceRepo.save(benchResource);
respMap.put("message", "Resource is moved to Bench Successfully"); respMap.put("message", "Resource is moved to Bench Successfully");
}else }else
......
...@@ -822,7 +822,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor ...@@ -822,7 +822,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
} }
$http(req).then(function mySuccess(response) { $http(req).then(function mySuccess(response) {
$scope.result = "Success"; $scope.result = "Success";
if(response.data.message == "Resource is moved to Bench Successfully"){ if((response.data.message == "Resource is moved to Bench Successfully") || (response.data.message == "Resource Released successfully")){
$timeout(function () { $timeout(function () {
getProjectDetails($scope.projectId, $scope.status); getProjectDetails($scope.projectId, $scope.status);
}, 500); }, 500);
......
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