Commit 1438b06dde6f16d669f51f86042e49c575ab62a9
1 parent
e5a7cf796d
Exists in
master
Refactor para utilizar foca-modal-proveedor en vez de foca-modal-petroleras.
Showing
8 changed files
with
22 additions
and
21 deletions
Show diff stats
gulpfile.js
| ... | ... | @@ -44,7 +44,7 @@ gulp.task('uglify', ['templates'], function() { |
| 44 | 44 | rename('foca-crear-nota-pedido.min.js'), |
| 45 | 45 | uglify(), |
| 46 | 46 | replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+ |
| 47 | - '"focaModalPetroleras","focaBusquedaCliente","focaModalPrecioCondicion",'+ | |
| 47 | + '"focaModalProveedor","focaBusquedaCliente","focaModalPrecioCondicion",'+ | |
| 48 | 48 | '"focaModalFlete","focaDirectivas","focaModal","focaModalDomicilio"', ''), |
| 49 | 49 | gulp.dest(paths.dist) |
| 50 | 50 | ] |
index.html
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <script src="node_modules/foca-directivas/dist/foca-directivas.min.js"></script> |
| 18 | 18 | <script src="node_modules/foca-modal-vendedores/dist/foca-modal-vendedores.min.js"></script> |
| 19 | 19 | <script src="node_modules/foca-modal-busqueda-productos/dist/foca-busqueda-productos.min.js"></script> |
| 20 | - <script src="node_modules/foca-modal-petroleras/dist/foca-modal-petroleras.min.js"></script> | |
| 20 | + <script src="node_modules/foca-modal-proveedor/dist/foca-modal-proveedor.min.js"></script> | |
| 21 | 21 | <script src="node_modules/foca-busqueda-cliente/dist/foca-busqueda-cliente.min.js"></script> |
| 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> |
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 git+https://debo.suite.repo/modulos-npm/foca-modal-domicilio.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-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" | |
| 12 | 12 | }, |
| 13 | 13 | "pre-commit": [ |
| 14 | 14 | "gulp-pre-commit" |
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | "foca-busqueda-cliente": "git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git", |
| 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 | - "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", | |
| 26 | + "foca-modal-proveedor": "git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git", | |
| 27 | 27 | "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git" |
| 28 | 28 | }, |
| 29 | 29 | "devDependencies": { |
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | "foca-modal-busqueda-productos": "git+https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos", |
| 37 | 37 | "foca-modal-domicilio": "git+https://debo.suite.repo/modulos-npm/foca-modal-domicilio.git", |
| 38 | 38 | "foca-modal-flete": "git+https://debo.suite.repo/modulos-npm/foca-modal-flete", |
| 39 | - "foca-modal-petroleras": "git+https://debo.suite.repo/modulos-npm/foca-modal-petroleras.git", | |
| 39 | + "foca-modal-proveedor": "git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git", | |
| 40 | 40 | "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", |
| 41 | 41 | "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", |
| 42 | 42 | "font-awesome": "^4.7.0", |
src/js/app.js
src/js/controller.js
| ... | ... | @@ -8,7 +8,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 8 | 8 | $scope.botonera = [ |
| 9 | 9 | {texto: 'Vendedor', accion: function() {$scope.seleccionarVendedor();}}, |
| 10 | 10 | {texto: 'Cliente', accion: function() {$scope.seleccionarCliente();}}, |
| 11 | - {texto: 'Proveedor', accion: function() {}}, | |
| 11 | + {texto: 'Proveedor', accion: function() {$scope.seleccionarProveedor();}}, | |
| 12 | 12 | {texto: 'Moneda', accion: function() {$scope.abrirModalMoneda();}}, |
| 13 | 13 | { |
| 14 | 14 | texto: 'Precios y condiciones', |
| ... | ... | @@ -188,18 +188,19 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 188 | 188 | ); |
| 189 | 189 | }; |
| 190 | 190 | |
| 191 | - $scope.seleccionarPetrolera = function() { | |
| 191 | + $scope.seleccionarProveedor = function() { | |
| 192 | 192 | var modalInstance = $uibModal.open( |
| 193 | 193 | { |
| 194 | - ariaLabelledBy: 'Busqueda de Petrolera', | |
| 195 | - templateUrl: 'modal-petroleras.html', | |
| 196 | - controller: 'modalPetrolerasCtrl', | |
| 194 | + ariaLabelledBy: 'Busqueda de Proveedor', | |
| 195 | + templateUrl: 'modal-proveedor.html', | |
| 196 | + controller: 'focaModalProveedorCtrl', | |
| 197 | 197 | size: 'lg' |
| 198 | 198 | } |
| 199 | 199 | ); |
| 200 | 200 | modalInstance.result.then( |
| 201 | - function(petrolera) { | |
| 202 | - $scope.notaPedido.petrolera = petrolera.NOM; | |
| 201 | + function(proveedor) { | |
| 202 | + $scope.notaPedido.proveedor = proveedor.NOM; | |
| 203 | + addCabecera('Proveedor:', proveedor.NOM); | |
| 203 | 204 | }, function() { |
| 204 | 205 | |
| 205 | 206 | } |
src/views/nota-pedido-lista.html
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <th>Código</th> |
| 5 | 5 | <th>Vendedor</th> |
| 6 | 6 | <th>Cliente</th> |
| 7 | - <th>Petrolera</th> | |
| 7 | + <th>Proveedor</th> | |
| 8 | 8 | <th>Total</th> |
| 9 | 9 | <th><button class="btn btn-primary" ng-click="crearPedido()">Crear</button></th> |
| 10 | 10 | </tr> |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <td ng-bind="item.id"></td> |
| 15 | 15 | <td ng-bind="item.vendedor"></td> |
| 16 | 16 | <td ng-bind="item.cliente"></td> |
| 17 | - <td ng-bind="item.petrolera"></td> | |
| 17 | + <td ng-bind="item.proveedor"></td> | |
| 18 | 18 | <td ng-bind="(item.total | 0) | currency"></td> |
| 19 | 19 | <td> |
| 20 | 20 | <button class="btn btn-info" ng-show="false" ng-click="editar(item)"><i class="fa fa-edit"></i></button> |
src/views/nota-pedido.html
| ... | ... | @@ -339,13 +339,13 @@ |
| 339 | 339 | </div> |
| 340 | 340 | <div class="col-md-2"> |
| 341 | 341 | <div class="col-auto"> |
| 342 | - <label>Petrolera</label> | |
| 342 | + <label>Proveedor</label> | |
| 343 | 343 | </div> |
| 344 | 344 | </div> |
| 345 | 345 | <div class="col-md-3"> |
| 346 | 346 | <div class="col-auto"> |
| 347 | - <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" | |
| 348 | - ng-click="seleccionarPetrolera()" readonly> | |
| 347 | + <input type="text" class="form-control" placeholder="Seleccione proveedor" ng-model="notaPedido.proveedor" | |
| 348 | + ng-click="seleccionarProveedor()" readonly> | |
| 349 | 349 | </div> |
| 350 | 350 | </div> |
| 351 | 351 | </div> |
src/views/nota-pedido_1.html
| ... | ... | @@ -135,13 +135,13 @@ |
| 135 | 135 | </div> |
| 136 | 136 | <div class="col-md-2"> |
| 137 | 137 | <div class="col-auto"> |
| 138 | - <label>Petrolera</label> | |
| 138 | + <label>Proveedor</label> | |
| 139 | 139 | </div> |
| 140 | 140 | </div> |
| 141 | 141 | <div class="col-md-3"> |
| 142 | 142 | <div class="col-auto"> |
| 143 | - <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" | |
| 144 | - ng-click="seleccionarPetrolera()" readonly> | |
| 143 | + <input type="text" class="form-control" placeholder="Seleccione proveedor" ng-model="notaPedido.proveedor" | |
| 144 | + ng-click="seleccionarProveedor()" readonly> | |
| 145 | 145 | </div> |
| 146 | 146 | </div> |
| 147 | 147 | </div> |