Blame view

app/partials/dashboard/dashboard.service.js 1.63 KB
4bb02bb84   Rishav   new integration w...
1
2
3
  (function(){
   'use strict';    
      angular.module('acufuel')
9732e9b36   Swarn Singh   updates in fuel m...
4
        .service('dashboardService', ['$q', '$http', 'BASE_URL', dashboardService]);
4bb02bb84   Rishav   new integration w...
5

9732e9b36   Swarn Singh   updates in fuel m...
6
        function dashboardService($q, $http, BASE_URL) {
4bb02bb84   Rishav   new integration w...
7
          var temp = {};
9732e9b36   Swarn Singh   updates in fuel m...
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
          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;
          }
6275a96f0   Jaideep Singh   s
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
           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;
          }
9732e9b36   Swarn Singh   updates in fuel m...
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
          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;
          }
4bb02bb84   Rishav   new integration w...
53
54
55
56
          
        }
        
  })();