Commit abcea5a1de7918a3eb5ea527408a8a77b5dfdf66
Exists in
master
conflicts
Showing
3 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/js/controller.js
| 1 | angular.module('focaModalProveedor') | 1 | angular.module('focaModalProveedor') |
| 2 | .controller('focaModalProveedorCtrl', [ | 2 | .controller('focaModalProveedorCtrl', [ |
| 3 | '$timeout', | ||
| 3 | '$filter', | 4 | '$filter', |
| 4 | '$scope', | 5 | '$scope', |
| 5 | '$uibModalInstance', | 6 | '$uibModalInstance', |
| 6 | 'focaModalProveedorService', | 7 | 'focaModalProveedorService', |
| 7 | 'transportista', | 8 | 'transportista', |
| 8 | function ($filter, $scope, $uibModalInstance, focaModalProveedorService, transportista) { | 9 | function ($timeout, $filter, $scope, $uibModalInstance, |
| 10 | focaModalProveedorService, transportista) { | ||
| 9 | 11 | ||
| 10 | $scope.filters = ''; | 12 | $scope.filters = ''; |
| 11 | $scope.primerBusqueda = false; | 13 | $scope.primerBusqueda = false; |
| 12 | // pagination | 14 | // pagination |
| 13 | $scope.numPerPage = 10; | 15 | $scope.numPerPage = 10; |
| 14 | $scope.currentPage = 1; | 16 | $scope.currentPage = 1; |
| 15 | $scope.filteredProveedores = []; | 17 | $scope.filteredProveedores = []; |
| 16 | $scope.currentPageProveedores = []; | 18 | $scope.currentPageProveedores = []; |
| 17 | $scope.selectedProveedores = -1; | 19 | $scope.selectedProveedores = -1; |
| 18 | $scope.transportista = transportista | false; | 20 | $scope.transportista = transportista | false; |
| 19 | 21 | ||
| 20 | $scope.busquedaPress = function(key) { | 22 | $scope.busquedaPress = function(key) { |
| 21 | if (key === 13) { | 23 | if (key === 13) { |
| 22 | $scope.searchLoading = true; | 24 | $scope.searchLoading = true; |
| 23 | var json = { | 25 | var json = { |
| 24 | razonCuitCod: $scope.filters | 26 | razonCuitCod: $scope.filters |
| 25 | }; | 27 | }; |
| 26 | focaModalProveedorService.getProveedores(json).then( | 28 | focaModalProveedorService.getProveedores(json).then( |
| 27 | function(res) { | 29 | function(res) { |
| 28 | for (var i = res.data.length - 1; i >= 0; i--) { | 30 | for (var i = res.data.length - 1; i >= 0; i--) { |
| 29 | if (res.data[i].COD === 0) { | 31 | if (res.data[i].COD === 0) { |
| 30 | delete res.data[i]; | 32 | delete res.data[i]; |
| 31 | } | 33 | } |
| 32 | } | 34 | } |
| 33 | $scope.primerBusqueda = true; | 35 | $scope.primerBusqueda = true; |
| 34 | $scope.proveedores = res.data; | 36 | $scope.proveedores = res.data; |
| 35 | $scope.search(); | 37 | $scope.search(true); |
| 36 | primera(); | 38 | primera(); |
| 37 | $scope.searchLoading = false; | 39 | $scope.searchLoading = false; |
| 38 | }); | 40 | }); |
| 39 | } | 41 | } |
| 40 | }; | 42 | }; |
| 41 | 43 | ||
| 42 | $scope.search = function () { | 44 | $scope.search = function (pressed) { |
| 43 | if($scope.primerBusqueda) { | 45 | if($scope.primerBusqueda) { |
| 44 | $scope.filteredProveedores = $filter('filter')( | 46 | $scope.filteredProveedores = $filter('filter')( |
| 45 | $scope.proveedores, {$: $scope.filters} | 47 | $scope.proveedores, {$: $scope.filters} |
| 46 | ); | 48 | ); |
| 47 | 49 | ||
| 50 | if(pressed && $scope.filteredProveedores.length === 0){ | ||
| 51 | $timeout(function() { | ||
| 52 | angular.element('#search')[0].focus(); | ||
| 53 | $scope.filters = ''; | ||
| 54 | }); | ||
| 55 | } | ||
| 56 | |||
| 48 | $scope.lastPage = Math.ceil( | 57 | $scope.lastPage = Math.ceil( |
| 49 | $scope.filteredProveedores.length / $scope.numPerPage | 58 | $scope.filteredProveedores.length / $scope.numPerPage |
| 50 | ); | 59 | ); |
| 51 | 60 | ||
| 52 | $scope.resetPage(); | 61 | $scope.resetPage(); |
| 53 | } | 62 | } |
| 54 | }; | 63 | }; |
| 55 | 64 | ||
| 56 | $scope.resetPage = function () { | 65 | $scope.resetPage = function () { |
| 57 | $scope.currentPage = 1; | 66 | $scope.currentPage = 1; |
| 58 | $scope.selectPage(1); | 67 | $scope.selectPage(1); |
| 59 | }; | 68 | }; |
| 60 | 69 | ||
| 61 | $scope.selectPage = function (page) { | 70 | $scope.selectPage = function (page) { |
| 62 | console.info(page); | 71 | console.info(page); |
| 63 | var start = (page - 1) * $scope.numPerPage; | 72 | var start = (page - 1) * $scope.numPerPage; |
| 64 | var end = start + $scope.numPerPage; | 73 | var end = start + $scope.numPerPage; |
| 65 | $scope.paginas = []; | 74 | $scope.paginas = []; |
| 66 | $scope.paginas = calcularPages(page); | 75 | $scope.paginas = calcularPages(page); |
| 67 | $scope.currentPageProveedores = $scope.filteredProveedores.slice(start, end); | 76 | $scope.currentPageProveedores = $scope.filteredProveedores.slice(start, end); |
| 68 | $scope.currentPage = page; | 77 | $scope.currentPage = page; |
| 69 | }; | 78 | }; |
| 70 | 79 | ||
| 71 | $scope.select = function(proveedor) { | 80 | $scope.select = function(proveedor) { |
| 72 | $uibModalInstance.close(proveedor); | 81 | $uibModalInstance.close(proveedor); |
| 73 | }; | 82 | }; |
| 74 | 83 | ||
| 75 | $scope.cancel = function() { | 84 | $scope.cancel = function() { |
| 76 | $uibModalInstance.dismiss('cancel'); | 85 | $uibModalInstance.dismiss('cancel'); |
| 77 | }; | 86 | }; |
| 78 | 87 | ||
| 79 | $scope.busquedaDown = function(key) { | 88 | $scope.busquedaDown = function(key) { |
| 80 | if (key === 40) { | 89 | if (key === 40) { |
| 81 | primera(key); | 90 | primera(key); |
| 82 | } | 91 | } |
| 83 | }; | 92 | }; |
| 84 | 93 | ||
| 85 | $scope.itemProveedor = function(key) { | 94 | $scope.itemProveedor = function(key) { |
| 86 | if (key === 38) { | 95 | if (key === 38) { |
| 87 | anterior(key); | 96 | anterior(key); |
| 88 | } | 97 | } |
| 89 | 98 | ||
| 90 | if (key === 40) { | 99 | if (key === 40) { |
| 91 | siguiente(key); | 100 | siguiente(key); |
| 92 | } | 101 | } |
| 93 | 102 | ||
| 94 | if (key === 37) { | 103 | if (key === 37) { |
| 95 | retrocederPagina(); | 104 | retrocederPagina(); |
| 96 | } | 105 | } |
| 97 | 106 | ||
| 98 | if (key === 39) { | 107 | if (key === 39) { |
| 99 | avanzarPagina(); | 108 | avanzarPagina(); |
| 100 | } | 109 | } |
| 101 | }; | 110 | }; |
| 102 | 111 | ||
| 103 | function calcularPages(paginaActual) { | 112 | function calcularPages(paginaActual) { |
| 104 | var paginas = []; | 113 | var paginas = []; |
| 105 | paginas.push(paginaActual); | 114 | paginas.push(paginaActual); |
| 106 | 115 | ||
| 107 | if (paginaActual - 1 > 1) { | 116 | if (paginaActual - 1 > 1) { |
| 108 | 117 | ||
| 109 | paginas.unshift(paginaActual - 1); | 118 | paginas.unshift(paginaActual - 1); |
| 110 | if (paginaActual - 2 > 1) { | 119 | if (paginaActual - 2 > 1) { |
| 111 | paginas.unshift(paginaActual - 2); | 120 | paginas.unshift(paginaActual - 2); |
| 112 | } | 121 | } |
| 113 | } | 122 | } |
| 114 | 123 | ||
| 115 | if (paginaActual + 1 < $scope.lastPage) { | 124 | if (paginaActual + 1 < $scope.lastPage) { |
| 116 | paginas.push(paginaActual + 1); | 125 | paginas.push(paginaActual + 1); |
| 117 | if (paginaActual + 2 < $scope.lastPage) { | 126 | if (paginaActual + 2 < $scope.lastPage) { |
| 118 | paginas.push(paginaActual + 2); | 127 | paginas.push(paginaActual + 2); |
| 119 | } | 128 | } |
| 120 | } | 129 | } |
| 121 | 130 | ||
| 122 | if (paginaActual !== 1) { | 131 | if (paginaActual !== 1) { |
| 123 | paginas.unshift(1); | 132 | paginas.unshift(1); |
| 124 | } | 133 | } |
| 125 | 134 | ||
| 126 | if (paginaActual !== $scope.lastPage) { | 135 | if (paginaActual !== $scope.lastPage) { |
| 127 | paginas.push($scope.lastPage); | 136 | paginas.push($scope.lastPage); |
| 128 | } | 137 | } |
| 129 | 138 | ||
| 130 | return paginas; | 139 | return paginas; |
| 131 | } | 140 | } |
| 132 | 141 | ||
| 133 | function primera() { | 142 | function primera() { |
| 134 | $scope.selectedProveedores = 0; | 143 | $scope.selectedProveedores = 0; |
| 135 | } | 144 | } |
| 136 | 145 | ||
| 137 | function anterior() { | 146 | function anterior() { |
| 138 | if ($scope.selectedProveedores === 0 && $scope.currentPage > 1) { | 147 | if ($scope.selectedProveedores === 0 && $scope.currentPage > 1) { |
| 139 | retrocederPagina(); | 148 | retrocederPagina(); |
| 140 | } else { | 149 | } else { |
| 141 | $scope.selectedProveedores--; | 150 | $scope.selectedProveedores--; |
| 142 | } | 151 | } |
| 143 | } | 152 | } |
| 144 | 153 | ||
| 145 | function siguiente() { | 154 | function siguiente() { |
| 146 | if ($scope.selectedProveedores < $scope.currentPageProveedores.length - 1 ) { | 155 | if ($scope.selectedProveedores < $scope.currentPageProveedores.length - 1 ) { |
| 147 | $scope.selectedProveedores++; | 156 | $scope.selectedProveedores++; |
| 148 | } else { | 157 | } else { |
| 149 | avanzarPagina(); | 158 | avanzarPagina(); |
| 150 | } | 159 | } |
| 151 | } | 160 | } |
| 152 | 161 | ||
| 153 | function retrocederPagina() { | 162 | function retrocederPagina() { |
| 154 | if ($scope.currentPage > 1) { | 163 | if ($scope.currentPage > 1) { |
| 155 | $scope.selectPage($scope.currentPage - 1); | 164 | $scope.selectPage($scope.currentPage - 1); |
| 156 | $scope.selectedProveedores = $scope.numPerPage - 1; | 165 | $scope.selectedProveedores = $scope.numPerPage - 1; |
| 157 | } | 166 | } |
| 158 | } | 167 | } |
| 159 | 168 | ||
| 160 | function avanzarPagina() { | 169 | function avanzarPagina() { |
| 161 | if ($scope.currentPage < $scope.lastPage) { | 170 | if ($scope.currentPage < $scope.lastPage) { |
| 162 | $scope.selectPage($scope.currentPage + 1); | 171 | $scope.selectPage($scope.currentPage + 1); |
| 163 | $scope.selectedProveedores = 0; | 172 | $scope.selectedProveedores = 0; |
| 164 | } | 173 | } |
| 165 | } | 174 | } |
| 166 | }] | 175 | }] |
| 167 | ); | 176 | ); |
| 168 | 177 |
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 | id="search" | ||
| 13 | placeholder="Busqueda" | ||
| 14 | ng-model="filters" | ||
| 15 | ng-change="search()" | ||
| 16 | ng-keydown="busquedaDown($event.keyCode)" | ||
| 17 | ng-keypress="busquedaPress($event.keyCode)" | ||
| 18 | foca-focus="selectedProveedores == -1" | ||
| 19 | ng-focus="selectedProveedores = -1" | ||
| 20 | teclado-virtual | ||
| 21 | > | ||
| 22 | <div class="input-group-append"> | ||
| 23 | <button | ||
| 24 | ladda="searchLoading" | ||
| 25 | data-spinner-color="#FF0000" | ||
| 26 | class="btn btn-outline-secondary" | ||
| 27 | type="button" | ||
| 28 | ng-click="busquedaPress(13)"> | ||
| 29 | <i class="fa fa-search" aria-hidden="true"></i> | ||
| 30 | </button> | ||
| 31 | </div> | ||
| 32 | </div> | ||
| 4 | </div> | 33 | </div> |
| 5 | <div class="modal-body" id="modal-body"> | 34 | </div> |
| 6 | <div class="input-group"> | 35 | <div class="modal-body" id="modal-body"> |
| 7 | <input | 36 | <div class="input-group"> |
| 8 | ladda="searchLoading" | 37 | <input |
| 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 | data-spinner-color="#FF0000" | ||
| 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> | 38 | ladda="searchLoading" |
| 29 | </div> | 39 | type="text" |
| 30 | </div> | 40 | class="form-control form-control-sm" |
| 31 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 41 | placeholder="Busqueda" |
| 32 | <thead> | 42 | ng-model="filters" |
| 33 | <tr> | 43 | ng-change="search()" |
| 34 | <th>Código</th> | 44 | ng-keydown="busquedaDown($event.keyCode)" |
| 35 | <th>Nombre</th> | 45 | ng-keypress="busquedaPress($event.keyCode)" |
| 36 | <th>CUIT</th> | 46 | foca-focus="selectedProveedores == -1" |
| 37 | <th></th> | 47 | ng-focus="selectedProveedores = -1" |
| 38 | </tr> | 48 | teclado-virtual |
| 39 | </thead> | 49 | > |
| 40 | <tbody> | 50 | <div class="input-group-append"> |
| 41 | <tr ng-show="currentPageProveedores.length == 0 && primerBusqueda"> | 51 | <button |
| 42 | <td colspan="4"> | 52 | ladda="searchLoading" |
| 43 | No se encontraron resultados. | 53 | data-spinner-color="#FF0000" |
| 44 | </td> | 54 | class="btn btn-outline-secondary" |
| 45 | </tr> | 55 | type="button" |
| 46 | <tr | 56 | ng-click="busquedaPress(13)"> |
| 47 | class="selectable" | 57 | <i class="fa fa-search" aria-hidden="true"></i> |
| 48 | ng-repeat="(key, proveedor) in currentPageProveedores" | 58 | </button> |
| 49 | ng-click="select(proveedor)"> | 59 | </div> |
| 50 | <td ng-bind="proveedor.COD"></td> | 60 | |
| 51 | <td ng-bind="proveedor.NOM"></td> | 61 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
| 52 | <td ng-bind="proveedor.CUIT"></td> | 62 | <thead> |
| 53 | <td> | 63 | <tr> |
| 54 | <button | 64 | <th>Código</th> |
| 55 | type="button" | 65 | <th>Nombre</th> |
| 56 | class="btn btn-xs p-1 float-right" | 66 | <th>CUIT</th> |
| 57 | ng-class="{ | 67 | <th></th> |
| 58 | 'btn-secondary': selectedProveedores != key, | 68 | </tr> |
| 59 | 'btn-primary': selectedProveedores == key | 69 | </thead> |
| 60 | }" | 70 | <tbody> |
| 61 | ng-click="select(proveedor)" | 71 | <tr ng-show="currentPageProveedores.length == 0 && primerBusqueda"> |
| 62 | foca-focus="selectedProveedores == {{key}}" | 72 | <td colspan="4"> |
| 63 | ng-keydown="itemProveedor($event.keyCode)" | 73 | No se encontraron resultados. |
| 64 | > | 74 | </td> |
| 65 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 75 | </tr> |
| 66 | </button> | 76 | <tr |
| 67 | </td> | 77 | class="selectable" |
| 68 | </tr> | 78 | ng-repeat="(key, proveedor) in currentPageProveedores" |
| 69 | </tbody> | 79 | ng-click="select(proveedor)"> |
| 70 | </table> | 80 | <td ng-bind="proveedor.COD"></td> |
| 81 | <td ng-bind="proveedor.NOM"></td> | ||
| 82 | <td ng-bind="proveedor.CUIT"></td> | ||
| 83 | <td> | ||
| 71 | <nav ng-show="currentPageProveedores.length > 0 && primerBusqueda"> | 84 | <button |
| 72 | <ul class="pagination pagination-sm mb-0"> | 85 | type="button" |
| 73 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 86 | class="btn btn-xs p-1 float-right" |
| 74 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 87 | ng-class="{ |
| 75 | <span aria-hidden="true">«</span> | 88 | 'btn-secondary': selectedProveedores != key, |
| 76 | <span class="sr-only">Anterior</span> | 89 | 'btn-primary': selectedProveedores == key |
| 77 | </a> | 90 | }" |
| 78 | </li> | 91 | ng-click="select(proveedor)" |
| 79 | <li | 92 | foca-focus="selectedProveedores == {{key}}" |
| 80 | class="page-item" | 93 | ng-keydown="itemProveedor($event.keyCode)" |
| 81 | ng-repeat="pagina in paginas" | 94 | > |
| 82 | ng-class="{'active': pagina == currentPage}" | 95 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
| 83 | > | 96 | </button> |
| 84 | <a | 97 | </td> |
| 85 | class="page-link" | 98 | </tr> |
| 86 | href="javascript:void();" | 99 | </tbody> |
| 87 | ng-click="selectPage(pagina)" | 100 | </table> |
| 88 | ng-bind="pagina" | 101 | |
| 89 | ></a> | 102 | </div> |
| 90 | </li> | 103 | <div class="modal-footer py-1"> |
| 91 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 104 | <nav ng-show="currentPageProveedores.length > 0 && primerBusqueda" class="mr-auto"> |
| 92 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 105 | <ul class="pagination pagination-sm mb-0"> |
| 93 | <span aria-hidden="true">»</span> | 106 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
| 94 | <span class="sr-only">Siguiente</span> | 107 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
| 95 | </a> | 108 | <span aria-hidden="true">«</span> |
| 96 | </li> | 109 | <span class="sr-only">Anterior</span> |
| 97 | </ul> | 110 | </a> |
| 98 | </nav> | ||
| 99 | </div> | ||
| 100 | <div class="modal-footer py-1"> | 111 | </li> |
| 101 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 112 | <li |
| 102 | </div> | 113 | class="page-item" |