Commit 16e3c0bca2136732545b133d1e99f468c4766671

Authored by Jose Pinto
1 parent 80c514dc5f
Exists in master

botones con imagenes

Showing 1 changed file with 22 additions and 1 deletions   Show diff stats
1 angular.module('focaCrearHojaRuta') 1 angular.module('focaCrearHojaRuta')
2 .service('crearHojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { 2 .service('crearHojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) {
3 var route = API_ENDPOINT.URL; 3 var route = API_ENDPOINT.URL;
4 return { 4 return {
5 crearHojaRuta: function(hojaRuta) { 5 crearHojaRuta: function(hojaRuta) {
6 return $http.post(route + '/hoja-ruta', hojaRuta); 6 return $http.post(route + '/hoja-ruta', hojaRuta);
7 }, 7 },
8 obtenerHojaRuta: function() { 8 obtenerHojaRuta: function() {
9 return $http.get(route +'/hoja-ruta'); 9 return $http.get(route +'/hoja-ruta');
10 }, 10 },
11 setHojaRuta: function(hojaRuta) { 11 setHojaRuta: function(hojaRuta) {
12 this.hojaRuta = hojaRuta; 12 this.hojaRuta = hojaRuta;
13 }, 13 },
14 clearHojaRuta: function() { 14 clearHojaRuta: function() {
15 this.hojaRuta = undefined; 15 this.hojaRuta = undefined;
16 }, 16 },
17 getHojaRuta: function() { 17 getHojaRuta: function() {
18 return this.hojaRuta; 18 return this.hojaRuta;
19 }, 19 },
20 getArticulosByIdHojaRuta: function(id) { 20 getArticulosByIdHojaRuta: function(id) {
21 return $http.get(route+'/articulos/hoja-ruta/'+id); 21 return $http.get(route+'/articulos/hoja-ruta/'+id);
22 }, 22 },
23 crearArticulosParaHojaRuta: function(articuloHojaRuta) { 23 crearArticulosParaHojaRuta: function(articuloHojaRuta) {
24 return $http.post(route + '/articulos/hoja-ruta', 24 return $http.post(route + '/articulos/hoja-ruta',
25 {articuloHojaRuta: articuloHojaRuta}); 25 {articuloHojaRuta: articuloHojaRuta});
26 }, 26 },
27 getDomiciliosByIdHojaRuta: function(id) { 27 getDomiciliosByIdHojaRuta: function(id) {
28 return $http.get(route +'/hoja-ruta/' + id + '/domicilios'); 28 return $http.get(route +'/hoja-ruta/' + id + '/domicilios');
29 }, 29 },
30 getDomiciliosByIdCliente: function(id) { 30 getDomiciliosByIdCliente: function(id) {
31 var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) 31 var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega)
32 return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); 32 return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id );
33 }, 33 },
34 getPrecioCondicion: function() { 34 getPrecioCondicion: function() {
35 return $http.get(route + '/precio-condicion'); 35 return $http.get(route + '/precio-condicion');
36 }, 36 },
37 getPrecioCondicionById: function(id) { 37 getPrecioCondicionById: function(id) {
38 return $http.get(route + '/precio-condicion/' + id); 38 return $http.get(route + '/precio-condicion/' + id);
39 }, 39 },
40 getPlazoPagoByPrecioCondicion: function(id) { 40 getPlazoPagoByPrecioCondicion: function(id) {
41 return $http.get(route + '/plazo-pago/precio-condicion/' + id); 41 return $http.get(route + '/plazo-pago/precio-condicion/' + id);
42 }, 42 },
43 crearFlete: function(flete) { 43 crearFlete: function(flete) {
44 return $http.post(route + '/flete', {flete : flete}); 44 return $http.post(route + '/flete', {flete : flete});
45 }, 45 },
46 crearPlazosParaHojaRuta: function(plazos) { 46 crearPlazosParaHojaRuta: function(plazos) {
47 return $http.post(route + '/plazo-pago/hoja-ruta', plazos); 47 return $http.post(route + '/plazo-pago/hoja-ruta', plazos);
48 }, 48 },
49 getCotizacionByIdMoneda: function(id) { 49 getCotizacionByIdMoneda: function(id) {
50 return $http.get(route + '/moneda/' + id); 50 return $http.get(route + '/moneda/' + id);
51 }, 51 },
52 crearEstadoParaHojaRuta: function(estado) { 52 crearEstadoParaHojaRuta: function(estado) {
53 return $http.post(route + '/estado', {estado: estado}); 53 return $http.post(route + '/estado', {estado: estado});
54 }, 54 },
55 getNumeroHojaRuta: function() { 55 getNumeroHojaRuta: function() {
56 return $http.get(route + '/hoja-ruta/numero-siguiente'); 56 return $http.get(route + '/hoja-ruta/numero-siguiente');
57 }, 57 },
58 getBotonera: function() { 58 getBotonera: function() {
59 return ['Transportista', 'Chofer', 'Vehiculo', 'Tarifario', 'Remitos']; 59 return [
60 {
61 label: 'Transportista',
62 image: 'cliente.png'
63 },
64 {
65 label: 'Chofer',
66 image: 'vendedor.png'
67 },
68 {
69 label: 'Vehiculo',
70 image: 'flete.png'
71 },
72 {
73 label: 'Tarifario',
74 image: 'precios-condiciones.png'
75 },
76 {
77 label: 'Remitos',
78 image: 'precios-condiciones.png'
79 }
80 ];
60 } 81 }
61 }; 82 };
62 }]); 83 }]);
63 84