From 87660da6c92cf73436909d8a3fe2f15343d4fe50 Mon Sep 17 00:00:00 2001 From: "kuldeep.arora" Date: Tue, 25 Sep 2018 15:59:32 +0530 Subject: [PATCH] testing --- app/partials/customers/customers.controller.js | 20 ++++++++++++-------- app/partials/customers/customers.html | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/partials/customers/customers.controller.js b/app/partials/customers/customers.controller.js index 3b825b4..f253edd 100644 --- a/app/partials/customers/customers.controller.js +++ b/app/partials/customers/customers.controller.js @@ -80,7 +80,7 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta function getAllCompanies() { CustomersService.getAllCompanies().then(function(result) { - //console.log('log', result); + console.log('company list', result); $scope.companyList = result; for (var i = 0; i < $scope.companyList.length; i++) { if ($scope.companyList[i].companyContact != null) { @@ -141,6 +141,7 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta function getData() { $scope.showLoader = true; CustomersService.getAircraftMake().then(function(result) { + //console.log("==aircrafts===",result) $scope.aircraftMakeList = result; $scope.showLoader = false; }) @@ -249,6 +250,7 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta $scope.aircraftListData = {}; $scope.addData = []; $scope.saveCompanyData = function() { + console.log("company data --",$scope.data) CustomersService.addCompany($scope.data).then(function(result) { $scope.accountId = result; $scope.aircraft.accountId = $scope.accountId; @@ -276,7 +278,8 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta toastr.success('' + result.success + '', { closeButton : true }) - $('#demo-modal-3').modal('hide'); + $('#demo-modal-3').css('display', 'none'); + $('.modal-backdrop').css('display', 'none'); getAllCompanies(); } else { toastr.error('' + result.statusText + '', { @@ -291,7 +294,7 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta /*add a fuel order*/ $scope.getOrders = function() { fuelOrdersService.getOrders().then(function(result) { - + console.log("==get orders===",result) $scope.orderdata = result; for (var i = 0; i < $scope.orderdata.length; i++) { $scope.orderdata[i].upliftDateS = new Date($scope.orderdata[i].upliftDate); @@ -411,10 +414,9 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta } $scope.addTotal = function(value, valueOf) { - if (valueOf == 'v') { - $scope.order.total = value * $scope.order.invoiced - } else if (valueOf == 'i') { - $scope.order.total = $scope.order.volume * value + if (value != undefined && valueOf != undefined) { + value = JSON.parse(value) + $scope.order.total = value.cost * valueOf; } } @@ -443,6 +445,7 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta if ($scope.selectedCompanyId != '') { fuelOrdersService.getAircraft($scope.selectedCompanyId).then(function(aircraft) { $scope.aircraftList = aircraft; + console.log("===tail search====",aircraft); }) } if ($scope.marginId != '') { @@ -468,9 +471,10 @@ function customersController($scope, $rootScope, $uibModal, $filter, $http, $sta $('#demo-modal-4').css('display', ''); } - $scope.setFuel = function(companyName) { + $scope.setFuel = function(companyName,certificateType) { $('#demo-modal-4').css('display', 'block'); $scope.order.defaultCompanyName = companyName; + $scope.order.certificateType = certificateType; $scope.getAircraft(companyName); // event.stopPropagation(); // $state.go('app.updateFuelManager'); diff --git a/app/partials/customers/customers.html b/app/partials/customers/customers.html index 4631d03..ee4d989 100644 --- a/app/partials/customers/customers.html +++ b/app/partials/customers/customers.html @@ -130,7 +130,7 @@ {{row.marginAllIn | number : 4}} - + @@ -543,7 +543,7 @@
- @@ -575,7 +575,7 @@
- +
@@ -606,13 +606,13 @@
-
+
$
- +
@@ -677,7 +677,7 @@ $
- +
@@ -710,7 +710,7 @@
- @@ -728,11 +728,11 @@
-- 2.0.0