Blame view

app/partials/flightDepDashboard/flightDepDashboard.service.js 3.7 KB
da04b5b2f   Mr. Hot Foods   flight Dep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  (function(){
   'use strict';    
      angular.module('acufuel')
        .service('flightDepDashboardService', ['$q', '$http', 'BASE_URL', flightDepDashboardService]);
  
        function flightDepDashboardService($q, $http, BASE_URL) {
          var temp = {};
  
          this.getFuelPricingNew = function() {
  
            var deferred = $q.defer();
            $http({
                method : 'GET',
                url : BASE_URL.url +'/user/products',
                headers : {'Content-Type': 'application/json'},
            })
            .then(function (result){
                deferred.resolve(result.data);
            },function (result){
                deferred.resolve(result.data);
            })
            return deferred.promise;
          }
f746aee1b   Anchit Jindal   account settingsc...
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
          
          this.getAircrafts = function() {
  
              var deferred = $q.defer();
              $http({
                  method : 'GET',
                  url : BASE_URL.url +'/flightDept/aircrafts',
                  headers : {'Content-Type': 'application/json'},
              })
              .then(function (result){
                  deferred.resolve(result.data);
              },function (result){
                  deferred.resolve(result.data);
              })
              return deferred.promise;
          }
          
a9aef0b1c   Anchit Jindal   new changes imple...
41
42
43
44
45
          this.getTiers = function(id) {
  
              var deferred = $q.defer();
              $http({
                  method : 'GET',
25082c4e3   Anchit Jindal   flight dept order...
46
                  url : BASE_URL.url +'/flightDept/tiers/'+id,
a9aef0b1c   Anchit Jindal   new changes imple...
47
48
49
50
51
52
53
54
55
56
                  headers : {'Content-Type': 'application/json'},
              })
              .then(function (result){
                  deferred.resolve(result.data);
              },function (result){
                  deferred.resolve(result.data);
              })
              return deferred.promise;
          }
          
f746aee1b   Anchit Jindal   account settingsc...
57
58
59
60
61
62
63
64
65
66
67
68
69
70
          this.getFBOs = function(data) {
              var deferred = $q.defer();
              $http({
                  method : 'GET',
                  url : BASE_URL.url +'/flightDept/getFboQuote/'+data+'/aircraft',
                  headers : {'Content-Type': 'application/json'},
              })
              .then(function (result){
                  deferred.resolve(result.data);
              },function (result){
                  deferred.resolve(result.data);
              })
              return deferred.promise;
          }
da04b5b2f   Mr. Hot Foods   flight Dep
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  
           this.getMargin = function() {
  
            var deferred = $q.defer();
            $http({
                method : 'GET',
                url : BASE_URL.url +'/user/margins',
                headers : {'Content-Type': 'application/json'},
            })
            .then(function (result){
                deferred.resolve(result.data);
            },function (result){
                deferred.resolve(result.data);
            })
            return deferred.promise;
          }
  
         this.updateFuelPricing = function(data){
            var deferred = $q.defer();
            $http({
                method : 'POST',
                url : BASE_URL.url +'/fuelPricing',
                headers : {'Content-Type': 'application/json'},
                data: data
            })
            .then(function (result){
                deferred.resolve(result.data);
            },function (result){
                deferred.resolve(result.data);
            })
            return deferred.promise;
          }
25082c4e3   Anchit Jindal   flight dept order...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
         
         this.dispathFuelOrder = function(data) {
      	      var deferred = $q.defer();
      	      $http({
      	          method : 'POST',
      	          url : BASE_URL.url +'/flightDept/order',
      	          headers : {'Content-Type': 'application/json'},
      	          data: data
      	      })
      	      .then(function (result){
      	          deferred.resolve(result.data);
      	      },function (result){
      	          deferred.resolve(result.data);
      	      })
      	      return deferred.promise;
      	    }
da04b5b2f   Mr. Hot Foods   flight Dep
119
120
121
122
          
        }
        
  })();