Blame view

app/partials/analytics/analytics.service.js 1.15 KB
4bb02bb84   Rishav   new integration w...
1
2
3
  (function(){
   'use strict';    
      angular.module('acufuel')
f100849ce   Mr. Hot Foods   analytics updates
4
        .service('analyticsService', ['$q', '$http', 'BASE_URL',analyticsService]);
4bb02bb84   Rishav   new integration w...
5

f100849ce   Mr. Hot Foods   analytics updates
6
        function analyticsService($q, $http, BASE_URL) {        
4bb02bb84   Rishav   new integration w...
7
8
9
          var temp = {};
  
          
f100849ce   Mr. Hot Foods   analytics updates
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
          this.getMFS = function(){
              var deferred = $q.defer();
              $http({
                  method : 'GET',
                  url : BASE_URL.url +'/fuelOrder/export/mfs'
              })
              .then(function (result){
                  deferred.resolve(result.data);
              },function (result){
                console.log(result)
                  deferred.resolve(result.data);
              })
              return deferred.promise;
           }
  
             this.getCS = function(){
              var deferred = $q.defer();
              $http({
                  method : 'GET',
                  url : BASE_URL.url +'/user/sources'
              })
              .then(function (result){
                  deferred.resolve(result.data);
              },function (result){
                console.log(result)
                  deferred.resolve(result.data);
              })
              return deferred.promise;
           }
4bb02bb84   Rishav   new integration w...
39
40
41
        }
        
  })();