Commit b7b8bd719052ee7cf1b749894a53a405bbcf91c5
Exists in
master
Merge branch 'master' into 'master'
buscador en header, paginado en footer, cambio icons See merge request !1
Showing
2 changed files
Show diff stats
package.json
| 1 | { | 1 | { |
| 2 | "name": "foca-modal-proveedor", | 2 | "name": "foca-modal-proveedor", |
| 3 | "version": "0.0.2", | 3 | "version": "0.0.2", |
| 4 | "description": "Modal para seleccionar proveedores", | 4 | "description": "Modal para seleccionar proveedores", |
| 5 | "scripts": { | 5 | "scripts": { |
| 6 | "test": "echo \"Error: no test specified\" && exit 1", | 6 | "test": "echo \"Error: no test specified\" && exit 1", |
| 7 | "gulp-pre-commit": "gulp pre-commit", | 7 | "gulp-pre-commit": "gulp pre-commit", |
| 8 | "compile": "gulp uglify", | 8 | "compile": "gulp uglify", |
| 9 | "postinstall": "npm run compile && gulp clean-post-install", | 9 | "postinstall": "npm run compile && gulp clean-post-install", |
| 10 | "install-dev": "npm install -D angular angular-ladda ladda@1.0.6 bootstrap jquery font-awesome gulp gulp-concat gulp-jshint gulp-rename gulp-replace gulp-uglify-es gulp-clean jshint pump gulp-connect gulp-uglify jasmine-core pre-commit gulp-angular-templatecache ui-bootstrap4 gulp-htmlmin git+https://debo.suite.repo/modulos-npm/foca-directivas" | 10 | "install-dev": "npm install -D angular angular-ladda ladda@1.0.6 bootstrap jquery font-awesome gulp gulp-concat gulp-jshint gulp-rename gulp-replace gulp-uglify-es gulp-clean jshint pump gulp-connect gulp-uglify jasmine-core pre-commit gulp-angular-templatecache ui-bootstrap4 gulp-htmlmin git+ssh://git@git.focasoftware.com:npm/foca-directivas" |
| 11 | }, | 11 | }, |
| 12 | "pre-commit": [ | 12 | "pre-commit": [ |
| 13 | "gulp-pre-commit" | 13 | "gulp-pre-commit" |
| 14 | ], | 14 | ], |
| 15 | "repository": { | 15 | "repository": { |
| 16 | "type": "git", | 16 | "type": "git", |
| 17 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-proveedor" | 17 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-proveedor" |
| 18 | }, | 18 | }, |
| 19 | "author": "Nicolás Guarnieri", | 19 | "author": "Nicolás Guarnieri", |
| 20 | "license": "ISC", | 20 | "license": "ISC", |
| 21 | "peerDependencies": { | 21 | "peerDependencies": { |
| 22 | "angular": "^1.7.4", | 22 | "angular": "^1.7.4", |
| 23 | "bootstrap": "^4.1.3", | 23 | "bootstrap": "^4.1.3", |
| 24 | "font-awesome": "^4.7.0", | 24 | "font-awesome": "^4.7.0", |
| 25 | "ui-bootstrap4": "^3.0.4", | 25 | "ui-bootstrap4": "^3.0.4", |
| 26 | "gulp": "^3.9.1", | 26 | "gulp": "^3.9.1", |
| 27 | "gulp-angular-templatecache": "^2.2.1", | 27 | "gulp-angular-templatecache": "^2.2.1", |
| 28 | "gulp-clean": "^0.4.0", | 28 | "gulp-clean": "^0.4.0", |
| 29 | "gulp-concat": "^2.6.1", | 29 | "gulp-concat": "^2.6.1", |
| 30 | "gulp-connect": "^5.6.1", | 30 | "gulp-connect": "^5.6.1", |
| 31 | "gulp-htmlmin": "^5.0.1", | 31 | "gulp-htmlmin": "^5.0.1", |
| 32 | "gulp-rename": "^1.4.0", | 32 | "gulp-rename": "^1.4.0", |
| 33 | "gulp-replace": "^1.0.0", | 33 | "gulp-replace": "^1.0.0", |
| 34 | "gulp-uglify": "^3.0.1", | 34 | "gulp-uglify": "^3.0.1", |
| 35 | "jquery": "^3.3.1", | 35 | "jquery": "^3.3.1", |
| 36 | "pump": "^3.0.0", | 36 | "pump": "^3.0.0", |
| 37 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas" | 37 | "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas" |
| 38 | }, | 38 | }, |
| 39 | "devDependencies": { | 39 | "devDependencies": { |
| 40 | "angular": "^1.7.5", | 40 | "angular": "^1.7.5", |
| 41 | "angular-ladda": "^0.4.3", | 41 | "angular-ladda": "^0.4.3", |
| 42 | "bootstrap": "^4.1.3", | 42 | "bootstrap": "^4.1.3", |
| 43 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas", | 43 | "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas", |
| 44 | "font-awesome": "^4.7.0", | 44 | "font-awesome": "^4.7.0", |
| 45 | "gulp": "^3.9.1", | 45 | "gulp": "^3.9.1", |
| 46 | "gulp-angular-templatecache": "^2.2.3", | 46 | "gulp-angular-templatecache": "^2.2.3", |
| 47 | "gulp-clean": "^0.4.0", | 47 | "gulp-clean": "^0.4.0", |
| 48 | "gulp-concat": "^2.6.1", | 48 | "gulp-concat": "^2.6.1", |
| 49 | "gulp-connect": "^5.6.1", | 49 | "gulp-connect": "^5.6.1", |
| 50 | "gulp-htmlmin": "^5.0.1", | 50 | "gulp-htmlmin": "^5.0.1", |
| 51 | "gulp-jshint": "^2.1.0", | 51 | "gulp-jshint": "^2.1.0", |
| 52 | "gulp-rename": "^1.4.0", | 52 | "gulp-rename": "^1.4.0", |
| 53 | "gulp-replace": "^1.0.0", | 53 | "gulp-replace": "^1.0.0", |
| 54 | "gulp-uglify": "^3.0.1", | 54 | "gulp-uglify": "^3.0.1", |
| 55 | "gulp-uglify-es": "^1.0.4", | 55 | "gulp-uglify-es": "^1.0.4", |
| 56 | "jasmine-core": "^3.3.0", | 56 | "jasmine-core": "^3.3.0", |
| 57 | "jquery": "^3.3.1", | 57 | "jquery": "^3.3.1", |
| 58 | "jshint": "^2.9.6", | 58 | "jshint": "^2.9.6", |
| 59 | "ladda": "1.0.6", | 59 | "ladda": "1.0.6", |
| 60 | "pre-commit": "^1.2.2", | 60 | "pre-commit": "^1.2.2", |
| 61 | "pump": "^3.0.0", | 61 | "pump": "^3.0.0", |
| 62 | "ui-bootstrap4": "^3.0.5" | 62 | "ui-bootstrap4": "^3.0.5" |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 |
src/views/modal-proveedor.html
| 1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
| 2 | <h5 class="modal-title" ng-hide="transportista">Búsqueda de Proveedor</h5> | 2 | <div class="row w-100"> |
| 3 | <h5 class="modal-title" ng-show="transportista">Búsqueda de Transportista</h5> | 3 | <div class="col-lg-6"> |
| 4 | <h5 class="modal-title my-1" ng-hide="transportista">Búsqueda de Proveedor</h5> | ||
| 5 | <h5 class="modal-title my-1" ng-show="transportista">Búsqueda de Transportista</h5> | ||
| 6 | </div> | ||
| 7 | <div class="input-group col-lg-6 pr-0 my-2"> | ||
| 8 | <input | ||
| 9 | ladda="searchLoading" | ||
| 10 | type="text" | ||
| 11 | class="form-control form-control-sm" | ||
| 12 | placeholder="Busqueda" | ||
| 13 | ng-model="filters" | ||
| 14 | ng-change="search()" | ||
| 15 | ng-keydown="busquedaDown($event.keyCode)" | ||
| 16 | ng-keypress="busquedaPress($event.keyCode)" | ||
| 17 | foca-focus="selectedProveedores == -1" | ||
| 18 | ng-focus="selectedProveedores = -1" | ||
| 19 | teclado-virtual | ||
| 20 | > | ||
| 21 | <div class="input-group-append"> | ||
| 22 | <button | ||
| 23 | ladda="searchLoading" | ||
| 24 | class="btn btn-outline-secondary" | ||
| 25 | type="button" | ||
| 26 | ng-click="busquedaPress(13)"> | ||
| 27 | <i class="fa fa-search" aria-hidden="true"></i> | ||
| 28 | </button> | ||
| 29 | </div> | ||
| 30 | </div> | ||
| 31 | </div> | ||
| 4 | </div> | 32 | </div> |
| 5 | <div class="modal-body" id="modal-body"> | 33 | <div class="modal-body" id="modal-body"> |
| 6 | <div class="input-group"> | 34 | |
| 7 | <input | 35 | <div ng-show="!primerBusqueda"> |
| 8 | ladda="searchLoading" | 36 | Debe realizar una primer búsqueda. |
| 9 | type="text" | ||
| 10 | class="form-control form-control-sm" | ||
| 11 | placeholder="Busqueda" | ||
| 12 | ng-model="filters" | ||
| 13 | ng-change="search()" | ||
| 14 | ng-keydown="busquedaDown($event.keyCode)" | ||
| 15 | ng-keypress="busquedaPress($event.keyCode)" | ||
| 16 | foca-focus="selectedProveedores == -1" | ||
| 17 | ng-focus="selectedProveedores = -1" | ||
| 18 | teclado-virtual | ||
| 19 | > | ||
| 20 | <div class="input-group-append"> | ||
| 21 | <button | ||
| 22 | ladda="searchLoading" | ||
| 23 | class="btn btn-outline-secondary" | ||
| 24 | type="button" | ||
| 25 | ng-click="busquedaPress(13)"> | ||
| 26 | <i class="fa fa-search" aria-hidden="true"></i> | ||
| 27 | </button> | ||
| 28 | </div> | 37 | </div> |
| 29 | </div> | 38 | |
| 30 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 39 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
| 31 | <thead> | 40 | <thead> |
| 32 | <tr> | 41 | <tr> |
| 33 | <th>Código</th> | 42 | <th>Código</th> |
| 34 | <th>Nombre</th> | 43 | <th>Nombre</th> |
| 35 | <th>CUIT</th> | 44 | <th>CUIT</th> |
| 36 | <th></th> | 45 | <th></th> |
| 37 | </tr> | 46 | </tr> |
| 38 | </thead> | 47 | </thead> |
| 39 | <tbody> | 48 | <tbody> |
| 40 | <tr ng-show="currentPageProveedores.length == 0 && primerBusqueda"> | 49 | <tr ng-show="currentPageProveedores.length == 0 && primerBusqueda"> |
| 41 | <td colspan="4"> | 50 | <td colspan="4"> |
| 42 | No se encontraron resultados. | 51 | No se encontraron resultados. |
| 43 | </td> | 52 | </td> |
| 44 | </tr> | 53 | </tr> |
| 45 | <tr | 54 | <tr |
| 46 | class="selectable" | 55 | class="selectable" |
| 47 | ng-repeat="(key, proveedor) in currentPageProveedores" | 56 | ng-repeat="(key, proveedor) in currentPageProveedores" |
| 48 | ng-click="select(proveedor)"> | 57 | ng-click="select(proveedor)"> |
| 49 | <td ng-bind="proveedor.COD"></td> | 58 | <td ng-bind="proveedor.COD"></td> |
| 50 | <td ng-bind="proveedor.NOM"></td> | 59 | <td ng-bind="proveedor.NOM"></td> |
| 51 | <td ng-bind="proveedor.CUIT"></td> | 60 | <td ng-bind="proveedor.CUIT"></td> |
| 52 | <td> | 61 | <td> |
| 53 | <button | 62 | <button |
| 54 | type="button" | 63 | type="button" |
| 55 | class="btn btn-xs p-1 float-right" | 64 | class="btn btn-xs p-1 float-right" |
| 56 | ng-class="{ | 65 | ng-class="{ |
| 57 | 'btn-secondary': selectedProveedores != key, | 66 | 'btn-secondary': selectedProveedores != key, |
| 58 | 'btn-primary': selectedProveedores == key | 67 | 'btn-primary': selectedProveedores == key |
| 59 | }" | 68 | }" |
| 60 | ng-click="select(proveedor)" | 69 | ng-click="select(proveedor)" |
| 61 | foca-focus="selectedProveedores == {{key}}" | 70 | foca-focus="selectedProveedores == {{key}}" |
| 62 | ng-keydown="itemProveedor($event.keyCode)" | 71 | ng-keydown="itemProveedor($event.keyCode)" |
| 63 | > | 72 | > |
| 64 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 73 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
| 65 | </button> | 74 | </button> |
| 66 | </td> | 75 | </td> |
| 67 | </tr> | 76 | </tr> |
| 68 | </tbody> | 77 | </tbody> |
| 69 | </table> | 78 | </table> |
| 70 | <nav ng-show="currentPageProveedores.length > 0 && primerBusqueda"> | 79 | |
| 80 | </div> | ||
| 81 | <div class="modal-footer py-1"> | ||
| 82 | <nav ng-show="currentPageProveedores.length > 0 && primerBusqueda" class="mr-auto"> | ||
| 71 | <ul class="pagination pagination-sm mb-0"> | 83 | <ul class="pagination pagination-sm mb-0"> |
| 72 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 84 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
| 73 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 85 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
| 74 | <span aria-hidden="true">«</span> | 86 | <span aria-hidden="true">«</span> |
| 75 | <span class="sr-only">Anterior</span> | 87 | <span class="sr-only">Anterior</span> |
| 76 | </a> | 88 | </a> |
| 77 | </li> | 89 | </li> |
| 78 | <li | 90 | <li |
| 79 | class="page-item" | 91 | class="page-item" |
| 80 | ng-repeat="pagina in paginas" | 92 | ng-repeat="pagina in paginas" |
| 81 | ng-class="{'active': pagina == currentPage}" | 93 | ng-class="{'active': pagina == currentPage}" |