Commit c85b6a340104d49e8e350c000ce20c51b44b4cf4
1 parent
9b9585d719
Exists in
master
cambio para merge request
Showing
2 changed files
with
11 additions
and
10 deletions
Show diff stats
package.json
| 1 | { | 1 | { |
| 2 | "name": "foca-crear-hoja-ruta", | 2 | "name": "foca-crear-hoja-ruta", |
| 3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
| 4 | "description": "foca-crear-hoja-ruta", | 4 | "description": "foca-crear-hoja-ruta", |
| 5 | "main": "index.js", | 5 | "main": "index.js", |
| 6 | "scripts": { | 6 | "scripts": { |
| 7 | "test": "echo \"Error: no test specified\" && exit 1" | 7 | "test": "echo \"Error: no test specified\" && exit 1" |
| 8 | }, | 8 | }, |
| 9 | "repository": { | 9 | "repository": { |
| 10 | "type": "git", | 10 | "type": "git", |
| 11 | "url": "https://debo.suite.repo/modulos-npm/foca-crear-hoja-ruta.git" | 11 | "url": "https://debo.suite.repo/modulos-npm/foca-crear-hoja-ruta.git" |
| 12 | }, | 12 | }, |
| 13 | "author": "Nicolás Guarnieri", | 13 | "author": "Foca Software", |
| 14 | "license": "ISC", | 14 | "license": "ISC", |
| 15 | "devDependencies": { | 15 | "devDependencies": { |
| 16 | "angular": "^1.7.5", | 16 | "angular": "^1.7.5", |
| 17 | "angular-ladda": "^0.4.3", | ||
| 17 | "angular-route": "^1.7.5", | 18 | "angular-route": "^1.7.5", |
| 18 | "bootstrap": "^4.1.3", | 19 | "bootstrap": "^4.1.3", |
| 19 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", | 20 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", |
| 20 | "font-awesome": "^4.7.0", | 21 | "font-awesome": "^4.7.0", |
| 21 | "gulp": "^3.9.1", | 22 | "gulp": "^3.9.1", |
| 22 | "gulp-angular-templatecache": "^2.2.5", | 23 | "gulp-angular-templatecache": "^2.2.5", |
| 23 | "gulp-clean": "^0.4.0", | 24 | "gulp-clean": "^0.4.0", |
| 24 | "gulp-concat": "^2.6.1", | 25 | "gulp-concat": "^2.6.1", |
| 25 | "gulp-connect": "^5.6.1", | 26 | "gulp-connect": "^5.6.1", |
| 26 | "gulp-htmlmin": "^5.0.1", | 27 | "gulp-htmlmin": "^5.0.1", |
| 27 | "gulp-jshint": "^2.1.0", | 28 | "gulp-jshint": "^2.1.0", |
| 28 | "gulp-rename": "^1.4.0", | 29 | "gulp-rename": "^1.4.0", |
| 29 | "gulp-replace": "^1.0.0", | 30 | "gulp-replace": "^1.0.0", |
| 30 | "gulp-sequence": "^1.0.0", | 31 | "gulp-sequence": "^1.0.0", |
| 31 | "gulp-uglify": "^3.0.1", | 32 | "gulp-uglify": "^3.0.1", |
| 32 | "jasmine-core": "^3.3.0", | 33 | "jasmine-core": "^3.3.0", |
| 33 | "jquery": "^3.3.1", | 34 | "jquery": "^3.3.1", |
| 34 | "jshint": "^2.9.6", | 35 | "jshint": "^2.9.6", |
| 35 | "ladda": "^2.0.1", | 36 | "ladda": "1.0.6", |
| 36 | "pre-commit": "^1.2.2", | 37 | "pre-commit": "^1.2.2", |
| 37 | "pump": "^3.0.0", | 38 | "pump": "^3.0.0", |
| 38 | "ui-bootstrap4": "^3.0.5" | 39 | "ui-bootstrap4": "^3.0.5" |
| 39 | } | 40 | } |
| 40 | } | 41 | } |
| 41 | 42 |
src/js/service.js
| 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 + '/nota-pedido', {hojaRuta: hojaRuta}); | 6 | return $http.post(route + '/hoja-ruta', {hojaRuta: hojaRuta}); |
| 7 | }, | 7 | }, |
| 8 | obtenerHojaRuta: function() { | 8 | obtenerHojaRuta: function() { |
| 9 | return $http.get(route +'/nota-pedido'); | 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/nota-pedido/'+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/nota-pedido', | 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 +'/nota-pedido/'+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/nota-pedido', 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 + '/nota-pedido/numero-siguiente'); | 56 | return $http.get(route + '/hoja-ruta/numero-siguiente'); |
| 57 | } | 57 | } |
| 58 | }; | 58 | }; |
| 59 | }]); | 59 | }]); |
| 60 | 60 |