Commit 781fa02de1d27e2ceea0cbd1d190f15146cb31e2
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing
1 changed file
Show diff stats
src/js/service.js
1 | angular.module('focaEstadoCisternas') | 1 | angular.module('focaEstadoCisternas') |
2 | .factory('focaEstadoCisternasService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { | 2 | .factory('focaEstadoCisternasService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { |
3 | return { | 3 | return { |
4 | getVehiculos: function() { | 4 | getVehiculos: function() { |
5 | return $http.get(API_ENDPOINT.URL + '/vehiculo'); | 5 | return $http.get(API_ENDPOINT.URL + '/vehiculo'); |
6 | }, | 6 | }, |
7 | getTransportistas: function() { | 7 | getTransportistas: function() { |
8 | return $http.get(API_ENDPOINT.URL + '/transportista'); | 8 | return $http.get(API_ENDPOINT.URL + '/transportista'); |
9 | }, | 9 | }, |
10 | getCisternadoPorVehiculo: function(idVehiculo) { | 10 | getCisternadoPorVehiculo: function(idVehiculo) { |
11 | return $http.get(API_ENDPOINT.URL + '/cisterna/listar/' + idVehiculo); | 11 | return $http.get(API_ENDPOINT.URL + '/cisterna/listar/' + idVehiculo); |
12 | }, | 12 | }, |
13 | getCisterna: function(id) { | 13 | getCisterna: function(id) { |
14 | return $http.get(API_ENDPOINT.URL + '/cisterna/obtener/' + id); | 14 | return $http.get(API_ENDPOINT.URL + '/cisterna/obtener/' + id); |
15 | }, | 15 | }, |
16 | guardarCisterna: function(cisterna) { | 16 | guardarCisterna: function(cisterna) { |
17 | return $http.post(API_ENDPOINT.URL + '/cisterna/guardar', {cisterna: cisterna}); | 17 | return $http.post(API_ENDPOINT.URL + '/cisterna/guardar', {cisterna: cisterna}); |
18 | }, | 18 | }, |
19 | deleteCisterna: function(id) { | 19 | deleteCisterna: function(id) { |
20 | return $http.delete(API_ENDPOINT.URL + '/cisterna/borrar/' + id); | 20 | return $http.delete(API_ENDPOINT.URL + '/cisterna/borrar/' + id); |
21 | }, | 21 | }, |
22 | getVehiculosPorTransportista: function(id) { | 22 | getVehiculosPorTransportista: function(id) { |
23 | return $http.get(API_ENDPOINT.URL + '/vehiculo/transportista/' + id); | 23 | return $http.get(API_ENDPOINT.URL + '/vehiculo/transportista/' + id); |
24 | }, | 24 | }, |
25 | getEstadoCisterna: function(id, fecha) { | 25 | getEstadoCisterna: function(id, fecha) { |
26 | return $http.post(API_ENDPOINT.URL + '/cisterna/stock', | 26 | return $http.post(API_ENDPOINT.URL + '/cisterna/stock', |
27 | {idCisterna: id, fecha: fecha}); | 27 | {idCisterna: id, fecha: fecha}); |
28 | }, | 28 | }, |
29 | getBotonera: function() { | 29 | getBotonera: function() { |
30 | return [ | 30 | return [ |
31 | { | 31 | { |
32 | label: 'Vehiculo', | 32 | label: 'Vehiculo', |
33 | image: 'vehiculos.png' | 33 | image: 'vehiculos.png' |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | label: 'Fecha entrega', | 36 | label: 'Fecha entrega', |
37 | image: 'FechaEntrega.png' | 37 | image: 'FechaEntrega.png' |
38 | }, | 38 | }, |
39 | { | 39 | { |
40 | label: 'Grafico', | 40 | label: 'Grafico', |
41 | image: 'FechaEntrega.png' | 41 | image: 'FechaEntrega.png' |
42 | } | 42 | } |
43 | ]; | 43 | ]; |
44 | } | 44 | } |
45 | }; | 45 | }; |
46 | }]); | 46 | }]); |
47 | 47 |