Commit dbc9294752735d2acd1a5359722a34467b887797
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master(efernandez) See merge request modulos-npm/foca-crear-nota-pedido!26
Showing
5 changed files
Show diff stats
gulpfile.js
| ... | ... | @@ -45,7 +45,7 @@ gulp.task('uglify', ['templates'], function() { |
| 45 | 45 | uglify(), |
| 46 | 46 | replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+ |
| 47 | 47 | '"focaModalPetroleras","focaBusquedaCliente","focaModalPrecioCondicion",'+ |
| 48 | - '"focaModalFlete","focaDirectivas","focaModal"', ''), | |
| 48 | + '"focaModalFlete","focaDirectivas","focaModal","focaModalDomicilio"', ''), | |
| 49 | 49 | gulp.dest(paths.dist) |
| 50 | 50 | ] |
| 51 | 51 | ); |
index.html
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | <script src="node_modules/foca-modal-precio-condiciones/dist/foca-modal-precio-condiciones.min.js"></script> |
| 23 | 23 | <script src="node_modules/foca-modal-flete/dist/foca-modal-flete.min.js"></script> |
| 24 | 24 | <script src="node_modules/foca-modal/dist/foca-modal.min.js"></script> |
| 25 | + <script src="node_modules/foca-modal-domicilio/dist/foca-modal-domicilios.min.js"></script> | |
| 25 | 26 | |
| 26 | 27 | <script src="src/js/app.js"></script> |
| 27 | 28 | <script src="src/js/controller.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-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-petroleras.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" | |
| 11 | + "install-dev": "npm install -D jasmine-core pre-commit angular 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-petroleras.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" | |
| 12 | 12 | }, |
| 13 | 13 | "pre-commit": [ |
| 14 | 14 | "gulp-pre-commit" |
| ... | ... | @@ -34,6 +34,7 @@ |
| 34 | 34 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", |
| 35 | 35 | "foca-modal": "git+https://debo.suite.repo/modulos-npm/foca-modal.git", |
| 36 | 36 | "foca-modal-busqueda-productos": "git+https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos", |
| 37 | + "foca-modal-domicilio": "git+https://debo.suite.repo/modulos-npm/foca-modal-domicilio.git", | |
| 37 | 38 | "foca-modal-flete": "git+https://debo.suite.repo/modulos-npm/foca-modal-flete", |
| 38 | 39 | "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", |
| 39 | 40 | "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", |
src/js/app.js
src/js/controller.js
| ... | ... | @@ -231,10 +231,29 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 231 | 231 | ); |
| 232 | 232 | return; |
| 233 | 233 | } |
| 234 | - $scope.domiciliosCliente = data.data; | |
| 234 | + var modalInstanceDomicilio = $uibModal.open( | |
| 235 | + { | |
| 236 | + ariaLabelledBy: 'Busqueda de Domicilios', | |
| 237 | + templateUrl: 'modal-domicilio.html', | |
| 238 | + controller: 'focaModalDomicilioController', | |
| 239 | + resolve: { idCliente: function() { return cliente.cod; }}, | |
| 240 | + size: 'lg', | |
| 241 | + backdrop: 'static', | |
| 242 | + } | |
| 243 | + ); | |
| 244 | + modalInstanceDomicilio.result.then( | |
| 245 | + function(domicilio) { | |
| 246 | + focaModalService.alert('Domicilio elegido' + domicilio.dom); | |
| 247 | + }, function() { | |
| 248 | + $scope.notaPedido.cliente.nombre = ''; | |
| 249 | + $scope.notaPedido.cliente.id = ''; | |
| 250 | + removeCabecera('Cliente:'); | |
| 251 | + $scope.seleccionarCliente(); | |
| 252 | + return; | |
| 253 | + } | |
| 254 | + ); | |
| 235 | 255 | } |
| 236 | 256 | ); |
| 237 | - | |
| 238 | 257 | addCabecera('Cliente:', cliente.nom); |
| 239 | 258 | }, function() { |
| 240 | 259 |