Commit 45e1ec52 authored by Prayas Jain's avatar Prayas Jain

Fixed Issues Related to utilization enhancements

parent 7a6fdf36
......@@ -35,7 +35,7 @@ public class ReportService implements IReportService {
public ReportVo getBarChartReport(String byType,Date onDate) throws MyTeamException {
ReportVo reportVo = new ReportVo();
if(byType.equals("AllFunctionalGroup")) {
if(byType.equals("AllFunctionalOrgs")) {
functionalGroupService.getAllFunctionalGroups().stream().
filter(f -> !Arrays.asList("IT","Recruiter","Admin","HR","Accounts","Delivery Org","Global Mobility").contains(f.getName())).
forEach(f -> reportVo.getCategoriesList().add(f.getName()));
......@@ -63,7 +63,7 @@ public class ReportService implements IReportService {
float billper;
float nonBillPer;
List<Employee> employeeList = new ArrayList<>();
if(byType.equals("AllFunctionalGroup")) {
if(byType.equals("AllFunctionalOrgs")) {
employeeList = getEmployeesByFunctionalGroup(category);
} else if(byType.equals("Account")){
employeeList = getEmployeeByAccounts(category);
......@@ -80,7 +80,7 @@ public class ReportService implements IReportService {
billableC++;
}else if(resource!=null && resource.getBillableStatus().equals("Trainee")) {
traineeC++;
} else{
} else if(resource!=null && resource.getBillableStatus().equals("Non-Billable")){
nonBillableC++;
}
}
......
......@@ -1148,7 +1148,8 @@ public class ResourceService implements IResourceService {
resourceRepo.delete(futureAllocation);
}
if(Objects.nonNull(currentAllocation)) {
currentAllocation.setBillingEndDate(endDate);
Date projectEndDate = currentAllocation.getBillingEndDate().compareTo(endDate) <= 0 ? currentAllocation.getBillingEndDate() : endDate ;
currentAllocation.setBillingEndDate(projectEndDate);
currentAllocation.setStatus(MyTeamUtils.STATUS_RELEASED);
resourceRepo.save(currentAllocation);
}
......
......@@ -5,7 +5,7 @@ myApp.directive('hcPieChart', function () {
template: '<div></div>',
link: function (scope, element) {
let onLoadSearchedDate = getFormattedDate(scope.searchedReportDate);
getEmployeeDetails(scope,element[0].baseURI+'reports/getBarChartReport?byType=AllFunctionalGroup&onDate='+onLoadSearchedDate,'column',element,"Billability For All Functional Group");
getEmployeeDetails(scope,element[0].baseURI+'reports/getBarChartReport?byType=AllFunctionalOrgs&onDate='+onLoadSearchedDate,'column',element,"Billability For All Functional Orgs");
//getEmployeeDetails(scope,element[0].baseURI+'reports/billabilityByFunctionalGroup','column',element,"Billability By Functional Group");
//getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element,"Billability By Account");
scope.getBillabilityReportData = function() {
......@@ -21,7 +21,7 @@ myApp.directive('hcPieChart', function () {
else {
if(reportType=='I&A'){
reportTypeApiFormat = 'I%26A';
}else if(reportType == "All Functional Group"){
}else if(reportType == "All Functional Orgs"){
reportTypeApiFormat = reportType.replace(/\s/g, "");
}else{
reportTypeApiFormat = reportType;
......@@ -41,8 +41,8 @@ myApp.directive('hcPieChart', function () {
$scope.name = [];
$scope.records = [];
$scope.empSearchId = "";
$scope.reportType = "All Functional Group";
$scope.reportTypeList = ["All Functional Group", "Account", "Monthly Trends"];
$scope.reportType = "All Functional Orgs";
$scope.reportTypeList = ["All Functional Orgs", "Account", "Monthly Trends"];
var today = new Date();
$scope.searchedReportDate = today;
$scope.maxReportDate = today;
......@@ -127,8 +127,8 @@ myApp.directive('hcPieChart', function () {
$scope.getMyTeamDetails = function(seriesName, category, optionName,title){
let searchedDate = getFormattedDate($scope.searchedReportDate);
if(title.trim() == 'Billability For All Functional Group On '+searchedDate ||
title.trim() == 'Billability For All Functional Group On Today' ){
if(title.trim() == 'Billability For All Functional Orgs On '+searchedDate ||
title.trim() == 'Billability For All Functional Orgs On Today' ){
if(category=='I&A'){
category = 'I%26A';
}
......
......@@ -247,10 +247,10 @@
<!--row--> </md-dialog-content>
<md-dialog-actions layout="row">
<div role="alert" class="col-sm-9 error-msg">
<div role="alert" class="col-sm-8 error-msg">
<span ng-if="errorMessage" class="error" style="color: red; text-align:left;">{{alertMsg}}</span>
</div>
<div class="col-sm-3 action-content">
<div class="col-sm-4 action-content">
<md-button
class="md-raised" data-ng-click="validateFields(); button=true"
style="width:120px;background: cadetblue;color:white;">
......
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