Commit 908fbb63c9c11595dff708981903899047005198
1 parent
1a386eac38
Exists in
master
refactor cookies
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/js/service.js
1 | angular.module('focaModalDetalleCisternas') | 1 | angular.module('focaModalDetalleCisternas') |
2 | .factory('focaModalDetalleCisternasService', [ | 2 | .factory('focaModalDetalleCisternasService', [ |
3 | '$http', | 3 | '$http', |
4 | '$cookies', | 4 | '$cookies', |
5 | 'API_ENDPOINT', | 5 | 'API_ENDPOINT', |
6 | function($http, $cookies, API_ENDPOINT) { | 6 | function($http, $cookies, API_ENDPOINT) { |
7 | var url = API_ENDPOINT.URL; | 7 | var url = API_ENDPOINT.URL; |
8 | return { | 8 | return { |
9 | idUsuario: $cookies.get('idUsuario'), | 9 | idUsuario: $cookies.get('vendedorCobrador'), |
10 | obtenerVehiculoById: function(idVehiculo) { | 10 | obtenerVehiculoById: function(idVehiculo) { |
11 | return $http.get(url + '/vehiculo/' + idVehiculo); | 11 | return $http.get(url + '/vehiculo/' + idVehiculo); |
12 | }, | 12 | }, |
13 | obtenerRemitoById: function(idRemito) { | 13 | obtenerRemitoById: function(idRemito) { |
14 | return $http.get(url + '/remito/obtener/' + idRemito); | 14 | return $http.get(url + '/remito/obtener/' + idRemito); |
15 | }, | 15 | }, |
16 | guardarCisternas: function(cisterna, idRemito) { | 16 | guardarCisternas: function(cisterna, idRemito) { |
17 | return $http.post(url + '/cisterna/guardar/cargar/' + | 17 | return $http.post(url + '/cisterna/guardar/cargar/' + |
18 | this.idUsuario + '/' + idRemito,cisterna); | 18 | this.idUsuario + '/' + idRemito,cisterna); |
19 | }, | 19 | }, |
20 | obtenerCisternasPorFecha: function(idVehiculo) { | 20 | obtenerCisternasPorFecha: function(idVehiculo) { |
21 | return $http.post(url + '/cisterna/listar/fecha', | 21 | return $http.post(url + '/cisterna/listar/fecha', |
22 | {idVehiculo: idVehiculo, fechaReparto: this.fecha}); | 22 | {idVehiculo: idVehiculo, fechaReparto: this.fecha}); |
23 | } | 23 | } |
24 | }; | 24 | }; |
25 | } | 25 | } |
26 | ]); | 26 | ]); |
27 | 27 |