diff --git a/app/partials/accountSetting/accountSetting.html b/app/partials/accountSetting/accountSetting.html index 527c9cd..ccc2090 100644 --- a/app/partials/accountSetting/accountSetting.html +++ b/app/partials/accountSetting/accountSetting.html @@ -12,7 +12,7 @@
-
+
diff --git a/app/partials/customers/customers.html b/app/partials/customers/customers.html index b6df335..96a8ae6 100644 --- a/app/partials/customers/customers.html +++ b/app/partials/customers/customers.html @@ -515,7 +515,7 @@
-
+
diff --git a/app/partials/viewCompany/viewCompany.controller.js b/app/partials/viewCompany/viewCompany.controller.js index 15a10f4..3e5bd40 100644 --- a/app/partials/viewCompany/viewCompany.controller.js +++ b/app/partials/viewCompany/viewCompany.controller.js @@ -49,7 +49,7 @@ angular.module('acufuel') function getAllCompanies() { CustomersService.getAllCompanies().then(function(result) { - //console.log('log', result); + // console.log('log', result); $scope.companyList = result; for (var i = 0; i < $scope.companyList.length; i++) { if ($scope.companyList[i].companyContact != null) { @@ -295,6 +295,7 @@ angular.module('acufuel') $scope.showLoader = true; CustomersService.getAircraftMake().then(function(result) { $scope.aircraftMakeList = result; + console.log("make",result) }) $scope.showLoader = false; } @@ -326,12 +327,26 @@ angular.module('acufuel') $scope.getModal = function(makeId, index) { $scope.showLoader = true; $scope.aircraft.make = makeId; - //var makeId = makeId; + + ViewCompanyService.checkFuelType($scope.aircraft.make).then(function(result){ + // $scope.showLoader = false; + if (result.type == "JetA") { + $scope.jetShow[index] = false; + $scope.marginShow[index] = true; + } else if (result.type == "Avgas") { + $scope.jetShow[index] = true; + $scope.marginShow[index] = false; + }else { + $scope.jetShow[index] = true; + $scope.marginShow[index] = true; + } CustomersService.getModal($scope.aircraft.make).then(function(result) { - $scope.showLoader = false; - $scope.aircraftDetails[index].aircraftModalList = result; - //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; - }) + $scope.showLoader = false; + $scope.aircraftDetails[index].aircraftModalList = result; + //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0]; + }) + }) + } $scope.getSize = function(model, index) { @@ -707,12 +722,13 @@ angular.module('acufuel') }) } + //--fuel type based on tail in not in use-- // $scope.aircraftData = {} - $scope.checkJetWithTail = function(tail, index) { + /*$scope.checkJetWithTail = function(tail, index) { - // console.log("tail==============",tail, index) + console.log("tail==============",tail, index) ViewCompanyService.checkJetType(tail).then(function(result) { - // console.log("result",result) + console.log("result",result) if (result.jetA == "true") { $scope.jetShow[index] = false; $scope.marginShow[index] = true; @@ -721,7 +737,8 @@ angular.module('acufuel') $scope.marginShow[index] = false; } }) - } + }*/ + /*add a fuel order*/ diff --git a/app/partials/viewCompany/viewCompany.html b/app/partials/viewCompany/viewCompany.html index c5df35b..8ccbddd 100644 --- a/app/partials/viewCompany/viewCompany.html +++ b/app/partials/viewCompany/viewCompany.html @@ -629,7 +629,7 @@
-
+
@@ -811,7 +811,7 @@
- +
@@ -855,11 +855,14 @@ - + + + - diff --git a/app/partials/viewCompany/viewCompany.service.js b/app/partials/viewCompany/viewCompany.service.js index 055c9b0..5431038 100644 --- a/app/partials/viewCompany/viewCompany.service.js +++ b/app/partials/viewCompany/viewCompany.service.js @@ -213,6 +213,7 @@ return deferred.promise; } + /*Not use this service */ this.checkJetType = function(tail) { var deferred = $q.defer(); @@ -279,6 +280,22 @@ return deferred.promise; } + this.checkFuelType = function(make) { + + var deferred = $q.defer(); + $http({ + method : 'GET', + url : BASE_URL.url +'/flightDept/getFuelType/'+make, + headers : {'Content-Type': 'application/json'}, + }) + .then(function (result){ + deferred.resolve(result.data); + },function (result){ + deferred.resolve(result.data); + }) + return deferred.promise; + } + }