Commit cf01dcac55c68054f3fa9710934c3bf895041923
Exists in
master
Merge branch 'master' of https://192.168.0.11/modulos-npm/foca-abm-precios-condiciones
# Conflicts: # gulpfile.js # index.html # package.json
Showing
8 changed files
Show diff stats
gulpfile.js
| ... | ... | @@ -8,6 +8,7 @@ const gulp = require('gulp'); |
| 8 | 8 | const pump = require('pump'); |
| 9 | 9 | const jshint = require('gulp-jshint'); |
| 10 | 10 | const replace = require('gulp-replace'); |
| 11 | +const connect = require('gulp-connect'); | |
| 11 | 12 | |
| 12 | 13 | var paths = { |
| 13 | 14 | srcJS: 'src/js/*.js', |
| ... | ... | @@ -39,7 +40,7 @@ gulp.task('uglify', ['templates'], function() { |
| 39 | 40 | ]), |
| 40 | 41 | concat('foca-abm-precios-condiciones.js'), |
| 41 | 42 | replace('src/views/', ''), |
| 42 | - replace("['ngRoute', 'ui.bootstrap']", '[]'), | |
| 43 | + replace("['ngRoute', 'ui.bootstrap']", '[]'), | |
| 43 | 44 | gulp.dest(paths.tmp), |
| 44 | 45 | rename('foca-abm-precios-condiciones.min.js'), |
| 45 | 46 | uglify(), |
index.html
| 1 | 1 | <html ng-app="focaAbmPreciosCondiciones"> |
| 2 | + <head> | |
| 3 | + <meta charset="UTF-8" /> | |
| 4 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| 2 | 5 | |
| 3 | -<head> | |
| 4 | - <meta charset="UTF-8" /> | |
| 5 | - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| 6 | + <!--CSS--> | |
| 7 | + <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" /> | |
| 8 | + <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> | |
| 6 | 9 | |
| 7 | - <!--CSS--> | |
| 8 | - <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" /> | |
| 9 | - <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> | |
| 10 | + <!--VENDOR JS--> | |
| 11 | + <script src="node_modules/jquery/dist/jquery.min.js"></script> | |
| 12 | + <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> | |
| 13 | + <script src="node_modules/angular/angular.min.js"></script> | |
| 14 | + <script src="node_modules/angular-route/angular-route.min.js"></script> | |
| 15 | + <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> | |
| 10 | 16 | |
| 11 | - <!--VENDOR JS--> | |
| 12 | - <script src="node_modules/jquery/dist/jquery.min.js"></script> | |
| 13 | - <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> | |
| 14 | - <script src="node_modules/angular/angular.min.js"></script> | |
| 15 | - <script src="node_modules/angular-route/angular-route.min.js"></script> | |
| 16 | - <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> | |
| 17 | - | |
| 18 | - <!-- BUILD --> | |
| 19 | - <script src="src/js/app.js"></script> | |
| 20 | - <script src="src/js/route.js"></script> | |
| 21 | - <script src="src/js/controller.js"></script> | |
| 22 | - <script src="src/js/service.js"></script> | |
| 23 | - <script src="src/etc/develop.js"></script> | |
| 24 | - <!-- /BUILD --> | |
| 25 | - | |
| 26 | -<body ng-view> | |
| 27 | -</body> | |
| 28 | - | |
| 29 | -</html> | |
| 30 | 17 | \ No newline at end of file |
| 18 | + <!-- BUILD --> | |
| 19 | + <script src="src/js/app.js"></script> | |
| 20 | + <script src="src/js/route.js"></script> | |
| 21 | + <script src="src/js/controller.js"></script> | |
| 22 | + <script src="src/js/service.js"></script> | |
| 23 | + <script src="src/etc/develop.js"></script> | |
| 24 | + <!-- /BUILD --> | |
| 25 | + </head> | |
| 26 | + <body> | |
| 27 | + <div ng-view></div> | |
| 28 | + </body> | |
| 29 | +</html> |
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-replace jquery jshint pump" | |
| 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 jquery jshint pump" | |
| 12 | 12 | }, |
| 13 | 13 | "pre-commit": [ |
| 14 | 14 | "gulp-pre-commit" |
src/etc/develop.js
src/js/controller.js
| ... | ... | @@ -32,6 +32,7 @@ angular.module('focaAbmPreciosCondiciones') |
| 32 | 32 | $scope, focaAbmPreciosCondicionesService, |
| 33 | 33 | $routeParams, $location, $uibModal |
| 34 | 34 | ) { |
| 35 | + $scope.mostrarPlazos = $routeParams.id > 0; | |
| 35 | 36 | focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id) |
| 36 | 37 | .then(function(datos) { |
| 37 | 38 | $scope.precioCondicion = { |
src/views/foca-abm-precios-condiciones-item.html
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | type="text" |
| 10 | 10 | name="codigo" |
| 11 | 11 | ng-model="precioCondicion.codigo" |
| 12 | + autocomplete="off" | |
| 12 | 13 | /> |
| 13 | 14 | </div> |
| 14 | 15 | </div> |
| ... | ... | @@ -20,6 +21,7 @@ |
| 20 | 21 | type="text" |
| 21 | 22 | name="nombre" |
| 22 | 23 | ng-model="precioCondicion.nombre" |
| 24 | + autocomplete="off" | |
| 23 | 25 | /> |
| 24 | 26 | </div> |
| 25 | 27 | </div> |
| ... | ... | @@ -31,6 +33,7 @@ |
| 31 | 33 | type="text" |
| 32 | 34 | name="nombre" |
| 33 | 35 | ng-model="precioCondicion.descripcion" |
| 36 | + autocomplete="off" | |
| 34 | 37 | /> |
| 35 | 38 | </div> |
| 36 | 39 | </div> |
| ... | ... | @@ -42,37 +45,42 @@ |
| 42 | 45 | type="number" |
| 43 | 46 | name="nombre" |
| 44 | 47 | ng-model="precioCondicion.idListaPrecio" |
| 48 | + autocomplete="off" | |
| 45 | 49 | /> |
| 46 | 50 | </div> |
| 47 | 51 | </div> |
| 48 | - <div class="form-group row"> | |
| 52 | + <div class="form-group row" ng-show="mostrarPlazos"> | |
| 49 | 53 | <label class="offset-sm-1 col-sm-2 col-form-label">Plazos</label> |
| 50 | 54 | <div class="col-sm-4"> |
| 51 | - <table class="table table-sm table-hover"> | |
| 52 | - <tr> | |
| 53 | - <th>Item</th> | |
| 54 | - <th>Dias</th> | |
| 55 | - <th colspan="2" class="text-center"> | |
| 56 | - <button class="btn btn-default" ng-click="editarPlazoPago(0)"> | |
| 57 | - <i class="fa fa-plus"></i> | |
| 58 | - </button> | |
| 59 | - </th> | |
| 60 | - </tr> | |
| 61 | - <tr ng-repeat="plazo in precioCondicion.plazos"> | |
| 62 | - <td ng-bind="plazo.item"></td> | |
| 63 | - <td ng-bind="plazo.dias"></td> | |
| 64 | - <td class="text-center"> | |
| 65 | - <button class="btn btn-default" ng-click="editarPlazoPago(plazo.id)"> | |
| 66 | - <i class="fa fa-pencil"></i> | |
| 67 | - </button> | |
| 68 | - <button | |
| 69 | - class="btn btn-default" | |
| 70 | - ng-click="solicitarConfirmacionPlazoPago(plazo)" | |
| 71 | - > | |
| 72 | - <i class="fa fa-trash"></i> | |
| 73 | - </button> | |
| 74 | - </td> | |
| 75 | - </tr> | |
| 55 | + <table class="table table-sm table-hover lista"> | |
| 56 | + <thead> | |
| 57 | + <tr> | |
| 58 | + <th>Item</th> | |
| 59 | + <th>Dias</th> | |
| 60 | + <th colspan="2" class="text-center"> | |
| 61 | + <button class="btn btn-default boton-accion" ng-click="editarPlazoPago(0)"> | |
| 62 | + <i class="fa fa-plus"></i> | |
| 63 | + </button> | |
| 64 | + </th> | |
| 65 | + </tr> | |
| 66 | + </thead> | |
| 67 | + <tbody> | |
| 68 | + <tr ng-repeat="plazo in precioCondicion.plazos"> | |
| 69 | + <td ng-bind="plazo.item"></td> | |
| 70 | + <td ng-bind="plazo.dias"></td> | |
| 71 | + <td class="text-center"> | |
| 72 | + <button class="btn btn-default boton-accion" ng-click="editarPlazoPago(plazo.id)"> | |
| 73 | + <i class="fa fa-pencil"></i> | |
| 74 | + </button> | |
| 75 | + <button | |
| 76 | + class="btn btn-default boton-accion" | |
| 77 | + ng-click="solicitarConfirmacionPlazoPago(plazo)" | |
| 78 | + > | |
| 79 | + <i class="fa fa-trash"></i> | |
| 80 | + </button> | |
| 81 | + </td> | |
| 82 | + </tr> | |
| 83 | + </tbody> | |
| 76 | 84 | </table> |
| 77 | 85 | </div> |
| 78 | 86 | </div> |
src/views/foca-abm-precios-condiciones-listado.html
| 1 | -<h4>Precios y Condiciones</h4> | |
| 2 | -<table class="table table-sm table-hover table-nonfluid"> | |
| 3 | - <tr> | |
| 4 | - <th>Código</th> | |
| 5 | - <th>Nombre</th> | |
| 6 | - <th colspan="2" class="text-center"> | |
| 7 | - <button class="btn btn-default" ng-click="editar(0)"> | |
| 8 | - <i class="fa fa-plus"></i> | |
| 9 | - </button> | |
| 10 | - </th> | |
| 11 | - </tr> | |
| 12 | - <tr ng-repeat="precioCondicion in preciosCondiciones"> | |
| 13 | - <td ng-bind="precioCondicion.codigo"></td> | |
| 14 | - <td ng-bind="precioCondicion.nombre"></td> | |
| 15 | - <td> | |
| 16 | - <button class="btn btn-default" ng-click="editar(precioCondicion.id)"> | |
| 17 | - <i class="fa fa-pencil"></i> | |
| 18 | - </button> | |
| 19 | - <button class="btn btn-default" ng-click="solicitarConfirmacion(precioCondicion)"> | |
| 20 | - <i class="fa fa-trash"></i> | |
| 21 | - </button> | |
| 22 | - </td> | |
| 23 | - </tr> | |
| 24 | -</table> | |
| 1 | +<div class="lista"> | |
| 2 | + <h4>Precios y Condiciones</h4> | |
| 3 | + <table class="table table-sm table-hover table-nonfluid"> | |
| 4 | + <thead> | |
| 5 | + <tr> | |
| 6 | + <th>Código</th> | |
| 7 | + <th>Nombre</th> | |
| 8 | + <th colspan="2" class="text-center"> | |
| 9 | + <button class="btn btn-default boton-accion" ng-click="editar(0)"> | |
| 10 | + <i class="fa fa-plus"></i> | |
| 11 | + </button> | |
| 12 | + </th> | |
| 13 | + </tr> | |
| 14 | + </thead> | |
| 15 | + <tbody> | |
| 16 | + <tr ng-repeat="precioCondicion in preciosCondiciones"> | |
| 17 | + <td ng-bind="precioCondicion.codigo"></td> | |
| 18 | + <td ng-bind="precioCondicion.nombre"></td> | |
| 19 | + <td> | |
| 20 | + <button class="btn btn-default boton-accion" ng-click="editar(precioCondicion.id)"> | |
| 21 | + <i class="fa fa-pencil"></i> | |
| 22 | + </button> | |
| 23 | + <button class="btn btn-default boton-accion" ng-click="solicitarConfirmacion(precioCondicion)"> | |
| 24 | + <i class="fa fa-trash"></i> | |
| 25 | + </button> | |
| 26 | + </td> | |
| 27 | + </tr> | |
| 28 | + </tbody> | |
| 29 | + </table> | |
| 30 | +</div> |