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
          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;
a9aef0b1c   Anchit Jindal   new changes imple...
23
          }
f100849ce   Mr. Hot Foods   analytics updates
24

a9aef0b1c   Anchit Jindal   new changes imple...
25
          this.getCS = function(){
f100849ce   Mr. Hot Foods   analytics updates
26
27
28
29
30
31
32
33
34
35
36
37
              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;
a9aef0b1c   Anchit Jindal   new changes imple...
38
          }
f100849ce   Mr. Hot Foods   analytics updates
39

4bb02bb84   Rishav   new integration w...
40
41
42
        }
        
  })();