Commit 1d6e37847e37aba1556b057b0c0099c3308ad6f2

Authored by Kuldeep Arora
1 parent b90971c064
Exists in master

fueltype in adding a aircraft

app/partials/accountSetting/accountSetting.html
... ... @@ -12,7 +12,7 @@
12 12  
13 13 <form role="form">
14 14 <div class="col-sm-6">
15   - <div class="form-group"><label>Username</label> <input type="email" placeholder="Username" ng-model="userData.email" class="form-control"></div>
  15 + <div class="form-group"><label>Email Username</label> <input type="email" placeholder="Username" ng-model="userData.email" class="form-control"></div>
16 16 <div class="form-group"><label>First Name</label> <input type="text" placeholder="First Name" ng-model="userData.firstName" class="form-control"></div>
17 17 <div class="form-group"><label>Last Name</label> <input type="text" placeholder="Last Name" ng-model="userData.lastName" class="form-control"></div>
18 18 </div>
... ...
app/partials/customers/customers.html
... ... @@ -515,7 +515,7 @@
515 515 <div>
516 516 <div class="row" style="margin: 0;">
517 517 <div>
518   - <div class="widget" style="margin-bottom: 0;">
  518 + <div class="widget" style="margin-bottom: 0;box-shadow: none;">
519 519 <div class="widget-header">
520 520 <i class="icon-pencil"></i>
521 521 <i class="fa fa-tasks" aria-hidden="true"></i>
... ...
app/partials/viewCompany/viewCompany.controller.js
... ... @@ -49,7 +49,7 @@ angular.module(&#39;acufuel&#39;)
49 49  
50 50 function getAllCompanies() {
51 51 CustomersService.getAllCompanies().then(function(result) {
52   - //console.log('log', result);
  52 + // console.log('log', result);
53 53 $scope.companyList = result;
54 54 for (var i = 0; i < $scope.companyList.length; i++) {
55 55 if ($scope.companyList[i].companyContact != null) {
... ... @@ -295,6 +295,7 @@ angular.module(&#39;acufuel&#39;)
295 295 $scope.showLoader = true;
296 296 CustomersService.getAircraftMake().then(function(result) {
297 297 $scope.aircraftMakeList = result;
  298 + console.log("make",result)
298 299 })
299 300 $scope.showLoader = false;
300 301 }
... ... @@ -326,12 +327,26 @@ angular.module(&#39;acufuel&#39;)
326 327 $scope.getModal = function(makeId, index) {
327 328 $scope.showLoader = true;
328 329 $scope.aircraft.make = makeId;
329   - //var makeId = makeId;
  330 +
  331 + ViewCompanyService.checkFuelType($scope.aircraft.make).then(function(result){
  332 + // $scope.showLoader = false;
  333 + if (result.type == "JetA") {
  334 + $scope.jetShow[index] = false;
  335 + $scope.marginShow[index] = true;
  336 + } else if (result.type == "Avgas") {
  337 + $scope.jetShow[index] = true;
  338 + $scope.marginShow[index] = false;
  339 + }else {
  340 + $scope.jetShow[index] = true;
  341 + $scope.marginShow[index] = true;
  342 + }
330 343 CustomersService.getModal($scope.aircraft.make).then(function(result) {
331   - $scope.showLoader = false;
332   - $scope.aircraftDetails[index].aircraftModalList = result;
333   - //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0];
334   - })
  344 + $scope.showLoader = false;
  345 + $scope.aircraftDetails[index].aircraftModalList = result;
  346 + //$scope.aircraftDetails[index].model = $scope.aircraftModalList[0];
  347 + })
  348 + })
  349 +
335 350 }
336 351  
337 352 $scope.getSize = function(model, index) {
... ... @@ -707,12 +722,13 @@ angular.module(&#39;acufuel&#39;)
707 722 })
708 723 }
709 724  
  725 + //--fuel type based on tail in not in use--
710 726 // $scope.aircraftData = {}
711   - $scope.checkJetWithTail = function(tail, index) {
  727 + /*$scope.checkJetWithTail = function(tail, index) {
712 728  
713   - // console.log("tail==============",tail, index)
  729 + console.log("tail==============",tail, index)
714 730 ViewCompanyService.checkJetType(tail).then(function(result) {
715   - // console.log("result",result)
  731 + console.log("result",result)
716 732 if (result.jetA == "true") {
717 733 $scope.jetShow[index] = false;
718 734 $scope.marginShow[index] = true;
... ... @@ -721,7 +737,8 @@ angular.module(&#39;acufuel&#39;)
721 737 $scope.marginShow[index] = false;
722 738 }
723 739 })
724   - }
  740 + }*/
  741 +
725 742  
726 743 /*add a fuel order*/
727 744  
... ...
app/partials/viewCompany/viewCompany.html
... ... @@ -629,7 +629,7 @@
629 629 <div>
630 630 <div class="row" style="margin: 0;">
631 631 <div>
632   - <div class="widget" style="margin-bottom: 0;">
  632 + <div class="widget" style="margin-bottom: 0;box-shadow: none;">
633 633 <div class="widget-header">
634 634 <i class="icon-pencil"></i>
635 635 <i class="fa fa-tasks" aria-hidden="true"></i>
... ... @@ -811,7 +811,7 @@
811 811 </div>
812 812 </div>
813 813 </form>
814   -
  814 +<div class="clearfix"></div>
815 815  
816 816  
817 817  
... ... @@ -855,11 +855,14 @@
855 855 <!-- <td>
856 856 <input type="checkbox" ng-model="aircraftData.selected"/>
857 857 </td> -->
858   - <td style="width: 15%">
  858 + <!-- <td style="width: 15%">
859 859 <input type="tel" class="form-control" ng-model="aircraftData.tail" ng-blur="checkJetWithTail(aircraftData.tail, $index)" required/>
  860 + </td> -->
  861 + <td style="width: 15%">
  862 + <input type="tel" class="form-control" ng-model="aircraftData.tail" required/>
860 863 </td>
861 864 <td style="width: 17%">
862   - <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index)">
  865 + <select class="form-control" ng-model="aircraftData.make" ng-change="getModal(aircraftData.make, $index) ">
863 866 <option value="" disabled>Select</option>
864 867 <option ng-repeat="make in aircraftMakeList | orderBy">{{make}}</option>
865 868 </select>
... ...
app/partials/viewCompany/viewCompany.service.js
... ... @@ -213,6 +213,7 @@
213 213 return deferred.promise;
214 214 }
215 215  
  216 + /*Not use this service */
216 217 this.checkJetType = function(tail) {
217 218  
218 219 var deferred = $q.defer();
... ... @@ -279,6 +280,22 @@
279 280 return deferred.promise;
280 281 }
281 282  
  283 + this.checkFuelType = function(make) {
  284 +
  285 + var deferred = $q.defer();
  286 + $http({
  287 + method : 'GET',
  288 + url : BASE_URL.url +'/flightDept/getFuelType/'+make,
  289 + headers : {'Content-Type': 'application/json'},
  290 + })
  291 + .then(function (result){
  292 + deferred.resolve(result.data);
  293 + },function (result){
  294 + deferred.resolve(result.data);
  295 + })
  296 + return deferred.promise;
  297 + }
  298 +
282 299  
283 300  
284 301 }
... ...