Commit 4fdb4f5f authored by Md Suleman's avatar Md Suleman

Resource service updates

parent e3553028
......@@ -146,6 +146,8 @@ public class ResourceService implements IResourceService {
if(validateResourceForProposedToEngage(resourceReq)){
this.updateExistedResource(resourceReq);
return;
}else{
}
if(isDatesAvailableForAllocation(resourceReq)) {
Resource prevAllocation = getFirstOfListOrNull(resourceRepo.findByEmployeeId(resourceReq.getEmployeeId()).stream().
......@@ -160,10 +162,10 @@ public class ResourceService implements IResourceService {
nextAllocation.setBillingStartDate(MyTeamDateUtils.getDayMoreThanDate(resourceReq.getBillingEndDate()));
this.updateExistedResource(nextAllocation);
}
// resource.setBillableStatus(resourceReq.getBillableStatus());
// resource.setBillingStartDate(resourceReq.getBillingStartDate());
// resource.setBillingEndDate(resourceReq.getBillingEndDate());
this.updateExistedResource(resourceReq);
resource.setBillableStatus(resourceReq.getBillableStatus());
resource.setBillingStartDate(resourceReq.getBillingStartDate());
resource.setBillingEndDate(resourceReq.getBillingEndDate());
this.updateExistedResource(resource);
}
}else{
......@@ -182,8 +184,6 @@ public class ResourceService implements IResourceService {
if (resource != null) {
Resource resourcePers = resourceRepo.save(resource);
respMap.put("statusCode", 801);
respMap.put("message", "Resource updated successfully");
respMap.put("resourceObj", resourcePers);
}
......
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