Commit 60cbf278 authored by Prayas Jain's avatar Prayas Jain

Fixed Utilization Report Alignments

parent c8931b7f
myApp.directive('hcPieChart', function () {
return {
restrict: 'E',
template: '<div></div>',
link: function (scope, element) {
getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByMonth','line',element," Billability Monthly Trends");
//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.clickMe= function(value) {
console.log(value);
console.log(value.Name);
if(value.Id== 1) {
uri = 'Account';
chart = 'column';
} else if(value.Id == 2){
uri = 'FunctionalGroup';
chart = 'column';
}
else if(value.Id == 3){
uri = 'Month';
chart = 'line';
scope.clickMe= function() {
if(scope.reportId == 1){
getEmployeeDetails(scope,element[0].baseURI+'reports/getBarChartReport?byType=Account','column',element,"Billability By Account");
}else if(scope.reportId == 2){
getEmployeeDetails(scope,element[0].baseURI+'reports/getBarChartReport?byType=FunctionalGroup','column',element,"Billability By Functional Group");
}else if(scope.reportId == 3){
getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByMonth','line',element," Billability Monthly Trends");
}
desc = value.Name;
console.log(desc);
getEmployeeDetails(scope,element[0].baseURI+'reports/getBarChartReport?byType='+uri,chart,element,desc);
//alert(value);
// if(scope.reportId == 1){
// getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element," Billability By Account");
// }else if(scope.reportId == 2){
// getEmployeeDetails(scope,element[0].baseURI+'reports/billabilityByFunctionalGroup','column',element,"Billability By Functional Group");
// }else if(scope.reportId == 3){
// getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByMonth','line',element," Billability Monthly Trends");
// }
}
}
};
......@@ -40,9 +24,8 @@ myApp.directive('hcPieChart', function () {
$scope.records = [];
$scope.empSearchId = "";
$scope.reportId = "1"
//$scope.reportId = "2"
$scope.reports = $scope.reportId;
$scope.reports=[ {Name:"Billability By Account",Id:"1"},{Name:"Billability By Functional Group",Id:"2"},{Name:"Billability Monthly Trends",Id:"3"}];
$scope.reports=[ {Name:"Billability Monthly Trends",Id:"1"},{Name:"Billability By Functional Group",Id:"2"},{Name:"Billability By Account",Id:"3"}];
$scope.employees = [];
......@@ -131,7 +114,7 @@ myApp.directive('hcPieChart', function () {
}else if(title.trim() == 'Billability By Account'){
$http({
method : "GET",
url : appConfig.appUri + "/reports/fetchEmployeeDetailsByAccountBillability?account="+category+"&billabilityStatus="+seriesName
url : appConfig.appUri + "reports/fetchEmployeeDetailsByAccountBillability?account="+category+"&billabilityStatus="+seriesName
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data;
if(response.data.length > 10){
......@@ -147,7 +130,7 @@ myApp.directive('hcPieChart', function () {
}else if(title.trim() == 'Billability Monthly Trends'){
$http({
method : "GET",
url : appConfig.appUri + "/reports/fetchEmployeeDetailsByDateBillability?billabilityStatus="+seriesName+"&reportDate="+category
url : appConfig.appUri + "reports/fetchEmployeeDetailsByDateBillability?billabilityStatus="+seriesName+"&reportDate="+category
}).then(function mySuccess(response) {
$scope.gridOptions.data = response.data;
if(response.data.length > 10){
......@@ -175,7 +158,7 @@ myApp.directive('hcPieChart', function () {
Highcharts.chart(element[0], {
chart: {
type: chartName,
height: '300px'
height: '275px'
},
title: {
text: title
......
......@@ -664,5 +664,9 @@ cursor: pointer;
height: calc(85vh - 168px) !important;
}
.utilization-report {
height: calc(86vh - 346px) !important;
height: calc(86vh - 346px) !important;
}
.highcharts-menu {
height: 205px;
overflow-y: scroll;
}
......@@ -5,7 +5,7 @@
id="popupContainer" ng-controller="chartsController">
<div class="text-right">
Report Type:<select ng-model="report" #ref ng-change="clickMe(report)" ng-options="report.Name for report in reports"></select>
Report Type:<select ng-model="reportId" #ref ng-change="clickMe()" ng-options="report.Id as report.Name for report in reports"></select>
</div>
<hc-pie-chart title="Browser usage" data="pieData" options="chartOptions">Placeholder for pie chart</hc-pie-chart>
......
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