Commit f05145ae33278d69880b3cfabc3f9628dac40f39
1 parent
60727f1f8d
Exists in
master
conflictos de merge
Showing
7 changed files
with
35 additions
and
9 deletions
Show diff stats
gulpfile.js
... | ... | @@ -46,7 +46,8 @@ gulp.task('uglify', ['templates'], function() { |
46 | 46 | replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+ |
47 | 47 | '"focaModalProveedor","focaBusquedaCliente","focaModalPrecioCondicion",'+ |
48 | 48 | '"focaModalFlete","focaDirectivas","focaModal","focaModalDomicilio",'+ |
49 | - '"angular-ladda","focaModalMoneda","focaModalCotizacion"', ''), | |
49 | + '"focaModalMoneda","focaModalCotizacion","focaSeguimiento","angular-ladda",'+ | |
50 | + '"cordovaGeolocationModule"', ''), | |
50 | 51 | gulp.dest(paths.dist) |
51 | 52 | ] |
52 | 53 | ); |
index.html
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | <script src="node_modules/ladda/dist/spin.min.js"></script> |
18 | 18 | <script src="node_modules/ladda/dist/ladda.min.js"></script> |
19 | 19 | <script src="node_modules/angular-ladda/dist/angular-ladda.min.js"></script> |
20 | + <script src="vendor/cordovaGeolocationModule.min.js"></script> | |
20 | 21 | |
21 | 22 | <script src="node_modules/foca-directivas/dist/foca-directivas.min.js"></script> |
22 | 23 | <script src="node_modules/foca-modal-vendedores/dist/foca-modal-vendedores.min.js"></script> |
... | ... | @@ -29,10 +30,12 @@ |
29 | 30 | <script src="node_modules/foca-modal-domicilio/dist/foca-modal-domicilios.min.js"></script> |
30 | 31 | <script src="node_modules/foca-modal-moneda/dist/foca-modal-moneda.min.js"></script> |
31 | 32 | <script src="node_modules/foca-modal-cotizacion/dist/foca-modal-cotizacion.min.js"></script> |
33 | + <script src="node_modules/foca-seguimiento/dist/foca-seguimiento.min.js"></script> | |
32 | 34 | |
33 | 35 | <script src="src/js/app.js"></script> |
34 | 36 | <script src="src/js/controller.js"></script> |
35 | 37 | <script src="src/js/service.js"></script> |
38 | + <script src="src/js/businessService.js"></script> | |
36 | 39 | <script src="src/js/route.js"></script> |
37 | 40 | |
38 | 41 | <script src="src/etc/develop.js"></script> |
package.json
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | "compile": "gulp uglify", |
9 | 9 | "gulp-pre-commit": "gulp pre-commit", |
10 | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
11 | - "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git git+https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git git+https://debo.suite.repo/modulos-npm/foca-modal-flete git+https://debo.suite.repo/modulos-npm/foca-modal.git git+https://debo.suite.repo/modulos-npm/foca-modal-domicilio.git git+https://debo.suite.repo/modulos-npm/foca-modal-moneda.git git+https://debo.suite.repo/modulos-npm/foca-modal-cotizacion.git" | |
11 | + "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git git+https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git git+https://debo.suite.repo/modulos-npm/foca-modal-flete git+https://debo.suite.repo/modulos-npm/foca-modal.git git+https://debo.suite.repo/modulos-npm/foca-modal-domicilio.git git+https://debo.suite.repo/modulos-npm/foca-seguimiento.git git+https://debo.suite.repo/modulos-npm/foca-modal-moneda.git git+https://debo.suite.repo/modulos-npm/foca-modal-cotizacion.git" | |
12 | 12 | }, |
13 | 13 | "pre-commit": [ |
14 | 14 | "gulp-pre-commit" |
... | ... | @@ -24,7 +24,8 @@ |
24 | 24 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", |
25 | 25 | "foca-modal-busqueda-productos": "git+https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos", |
26 | 26 | "foca-modal-proveedor": "git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git", |
27 | - "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git" | |
27 | + "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", | |
28 | + "foca-seguimiento": "git+https://debo.suite.repo/modulos-npm/foca-seguimiento.git" | |
28 | 29 | }, |
29 | 30 | "devDependencies": { |
30 | 31 | "angular": "^1.7.5", |
... | ... | @@ -42,6 +43,7 @@ |
42 | 43 | "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", |
43 | 44 | "foca-modal-proveedor": "git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git", |
44 | 45 | "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", |
46 | + "foca-seguimiento": "git+https://debo.suite.repo/modulos-npm/foca-seguimiento.git", | |
45 | 47 | "font-awesome": "^4.7.0", |
46 | 48 | "gulp": "^3.9.1", |
47 | 49 | "gulp-angular-templatecache": "^2.2.2", |
src/js/app.js
... | ... | @@ -10,7 +10,9 @@ angular.module('focaCrearNotaPedido', [ |
10 | 10 | 'focaDirectivas', |
11 | 11 | 'focaModal', |
12 | 12 | 'focaModalDomicilio', |
13 | - 'angular-ladda', | |
14 | 13 | 'focaModalMoneda', |
15 | - 'focaModalCotizacion' | |
14 | + 'focaModalCotizacion', | |
15 | + 'focaSeguimiento', | |
16 | + 'angular-ladda', | |
17 | + 'cordovaGeolocationModule' | |
16 | 18 | ]); |
src/js/businessService.js
... | ... | @@ -0,0 +1,16 @@ |
1 | +angular.module('focaCrearNotaPedido') | |
2 | + .service('notaPedidoBusinessService', [ | |
3 | + 'crearNotaPedidoService', | |
4 | + function(crearNotaPedidoService) { | |
5 | + return { | |
6 | + addArticulos: function(articulosNotaPedido, idNotaPedido, cotizacion) { | |
7 | + for(var i = 0; i < articulosNotaPedido.length; i++) { | |
8 | + delete articulosNotaPedido[i].editCantidad; | |
9 | + delete articulosNotaPedido[i].editPrecio; | |
10 | + articulosNotaPedido[i].idNotaPedido = idNotaPedido; | |
11 | + articulosNotaPedido[i].precio = articulosNotaPedido[i].precio * cotizacion; | |
12 | + crearNotaPedidoService.crearArticulosParaNotaPedido(articulosNotaPedido[i]); | |
13 | + } | |
14 | + } | |
15 | + }; | |
16 | + }]); | |
0 | 17 | \ No newline at end of file |
src/js/controller.js
1 | 1 | angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
2 | 2 | [ |
3 | 3 | '$scope', '$uibModal', '$location', '$filter', 'crearNotaPedidoService', |
4 | - 'focaModalService', | |
4 | + 'focaModalService', 'focaSeguimientoService', 'notaPedidoBusinessService', | |
5 | 5 | function( |
6 | - $scope, $uibModal, $location, $filter, crearNotaPedidoService, focaModalService | |
6 | + $scope, $uibModal, $location, $filter, crearNotaPedidoService, focaModalService, | |
7 | + focaSeguimientoService, notaPedidoBusinessService | |
7 | 8 | ) { |
8 | 9 | $scope.botonera = [ |
9 | 10 | {texto: 'Vendedor', accion: function() {$scope.seleccionarVendedor();}}, |
... | ... | @@ -155,9 +156,9 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
155 | 156 | }; |
156 | 157 | crearNotaPedidoService.crearNotaPedido(notaPedido).then( |
157 | 158 | function(data) { |
158 | - crearNotaPedidoService.addArticulos($scope.articulosTabla, | |
159 | + notaPedidoBusinessService.addArticulos($scope.articulosTabla, | |
159 | 160 | data.data.id, $scope.notaPedido.cotizacion.COTIZACION); |
160 | - | |
161 | + focaSeguimientoService.guardarPosicion('crear nota pedido', ''); | |
161 | 162 | var plazos = $scope.plazosPagos; |
162 | 163 | for(var j = 0; j < plazos.length; j++) { |
163 | 164 | var json = { |
vendor/cordovaGeolocationModule.min.js
... | ... | @@ -0,0 +1 @@ |
1 | +var cordovaGeolocationModule=angular.module("cordovaGeolocationModule",[]);cordovaGeolocationModule.constant("cordovaGeolocationConstants",{apiVersion:"1.0.0",cordovaVersion:">=3.4.0"});cordovaGeolocationModule.factory("cordovaGeolocationService",["$rootScope","$log","cordovaGeolocationConstants",function(e,t,n){return{apiVersion:function(){t.debug("cordovaGeolocationService.apiVersion.");return n.apiVersion},cordovaVersion:function(){t.debug("cordovaGeolocationService.cordovaVersion.");return n.cordovaVersion},checkGeolocationAvailability:function(){t.debug("cordovaGeolocationService.checkGeolocationAvailability.");if(!navigator.geolocation){t.warn("Geolocation API is not available.");return false}return true},getCurrentPosition:function(n,r,i){t.debug("cordovaGeolocationService.getCurrentPosition.");if(!this.checkGeolocationAvailability()){return}navigator.geolocation.getCurrentPosition(function(t){e.$apply(n(t))},function(t){e.$apply(r(t))},i)},watchPosition:function(n,r,i){t.debug("cordovaGeolocationService.watchPosition.");if(!this.checkGeolocationAvailability()){return}return navigator.geolocation.watchPosition(function(t){e.$apply(n(t))},function(t){e.$apply(r(t))},i)},clearWatch:function(e){t.debug("cordovaGeolocationService.clearWatch.");if(!this.checkGeolocationAvailability()){return}navigator.geolocation.clearWatch(e)}}}]) | |
0 | 2 | \ No newline at end of file |