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