From 039002959d12be8fc8a9fe9280f6c23725172e7a Mon Sep 17 00:00:00 2001 From: "kuldeep.arora" Date: Wed, 10 Oct 2018 17:26:08 +0530 Subject: [PATCH] minor change --- app/partials/analytics/analytics.controller.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/app/partials/analytics/analytics.controller.js b/app/partials/analytics/analytics.controller.js index 7c886dc..f8f9281 100644 --- a/app/partials/analytics/analytics.controller.js +++ b/app/partials/analytics/analytics.controller.js @@ -383,7 +383,7 @@ angular.module('acufuel') $scope.getCS = function() { //var makeId = makeId; analyticsService.getCS().then(function(result) { - console.log("===customersupports===",result) + //console.log("===customersupports===",result) $scope.csValues = result; $scope.optionscs = { chart: { @@ -437,17 +437,17 @@ angular.module('acufuel') if(result[i].includes("JET-A Full Service") ){ let datePusha = result[i][0]; let tempValue = result[i][1].toFixed(2); - let valePusha = parseInt(tempValue); + let valePusha = parseFloat(tempValue); $scope.hfpValuesOne.values.push([datePusha, valePusha]) }else if(result[i].includes("100LL Full Service") ) { let datePushb = result[i][0]; let tempvalePushb = result[i][1].toFixed(2); - let valePushb = parseInt(tempvalePushb); + let valePushb = parseFloat(tempvalePushb); $scope.hfpValuesTwo.values.push([datePushb, valePushb]) } } $scope.hfpFinalData.push($scope.hfpValuesOne, $scope.hfpValuesTwo); - // console.log('$scope.hfpFinalData', $scope.hfpFinalData); + // console.log('$scope.hfpFinalData', $scope.hfpFinalData); var chart = nv.models.lineChart() .x(function(d) { return d[0] }) @@ -499,7 +499,7 @@ angular.module('acufuel') } else if ($scope.hfp.fromDate != undefined && $scope.hfp.toDate === undefined || $scope.hfp.toDate === '') { $scope.fillForm = false; var today = new Date(); - var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2); + var DefaultToDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)).slice(-2) + '-' + ("0" + today.getDate()).slice(-2) + " " + '23:59:59'; //from date format $scope.dat1 = $scope.hfp.fromDate; $scope.fd1 = $scope.dat1.split("/").reverse(); @@ -507,23 +507,24 @@ angular.module('acufuel') $scope.fd1[2] = $scope.fd1[1]; $scope.fd1[1] = $scope.tmp; $scope.fd = $scope.fd1.join("-"); + // console.log("===date====",$scope.fd,"===dad====",DefaultToDate) analyticsService.getDRFHfpChart($scope.fd, DefaultToDate).then(function(result) { // console.log("===date range===",$scope.fd,DefaultToDate) for(var i=0; i0){return d[0]}}) @@ -570,20 +571,20 @@ angular.module('acufuel') $scope.tmp1 = $scope.td1[2]; $scope.td1[2] = $scope.td1[1]; $scope.td1[1] = $scope.tmp1; - $scope.td = $scope.td1.join("-"); - + $scope.td = $scope.td1.join("-") + " " + '23:59:59'; + // console.log("===both dates==",$scope.td) analyticsService.getDRFHfpChart($scope.fd, $scope.td).then(function(result) { //console.log("===date range22===",result); for(var i=0; i