Commit 84f372739f6830213505c356f59be7d4dc1f24d5

Authored by Jose Pinto
1 parent dfaa71f02e
Exists in master

boton ver lista de precios

src/js/controller.js
1 angular.module('focaModalPrecioCondicion') 1 angular.module('focaModalPrecioCondicion')
2 .controller('focaModalPrecioCondicionController', 2 .controller('focaModalPrecioCondicionController',
3 [ 3 [
4 '$timeout', 4 '$timeout',
5 '$filter', 5 '$filter',
6 '$scope', 6 '$scope',
7 '$uibModal',
7 '$uibModalInstance', 8 '$uibModalInstance',
8 'focaModalService', 9 'focaModalService',
9 'focaModalPrecioCondicionService', 10 'focaModalPrecioCondicionService',
10 function( 11 function(
11 $timeout, $filter, $scope, $uibModalInstance, 12 $timeout, $filter, $scope, $uibModal, $uibModalInstance,
12 focaModalService, focaModalPrecioCondicionService 13 focaModalService, focaModalPrecioCondicionService
13 ) { 14 ) {
14 15
15 focaModalPrecioCondicionService.getPreciosCondicionesPlazosPagos().then( 16 focaModalPrecioCondicionService.getPreciosCondicionesPlazosPagos().then(
16 function(res) { 17 function(res) {
17 for(var i = 0; i < res.data.length; i++) { 18 for(var i = 0; i < res.data.length; i++) {
18 var plazosTemp = ''; 19 var plazosTemp = '';
19 res.data[i].plazoPago.sort(function(a, b) { 20 res.data[i].plazoPago.sort(function(a, b) {
20 return a.dias - b.dias; 21 return a.dias - b.dias;
21 }); 22 });
22 for(var j = 0; j < res.data[i].plazoPago.length; j++) { 23 for(var j = 0; j < res.data[i].plazoPago.length; j++) {
23 if(j + 1 === res.data[i].plazoPago.length) { 24 if(j + 1 === res.data[i].plazoPago.length) {
24 plazosTemp += res.data[i].plazoPago[j].dias; 25 plazosTemp += res.data[i].plazoPago[j].dias;
25 }else { 26 }else {
26 plazosTemp += res.data[i].plazoPago[j].dias + ', '; 27 plazosTemp += res.data[i].plazoPago[j].dias + ', ';
27 } 28 }
28 } 29 }
29 res.data[i].plazos = plazosTemp.trim(); 30 res.data[i].plazos = plazosTemp.trim();
30 } 31 }
31 $scope.precioCondicion = res.data; 32 $scope.precioCondicion = res.data;
32 $scope.search(); 33 $scope.search();
33 } 34 }
34 ); 35 );
35 $scope.filters = ''; 36 $scope.filters = '';
36 $scope.ingreso = false; 37 $scope.ingreso = false;
37 $scope.plazosNuevos = []; 38 $scope.plazosNuevos = [];
38 $scope.plazoACargar = 39 $scope.plazoACargar =
39 { 40 {
40 item: 1 41 item: 1
41 }; 42 };
42 // pagination 43 // pagination
43 $scope.numPerPage = 10; 44 $scope.numPerPage = 10;
44 $scope.currentPage = 1; 45 $scope.currentPage = 1;
45 $scope.filteredPrecioCondicion = []; 46 $scope.filteredPrecioCondicion = [];
46 $scope.currentPagePrecioCondicion = []; 47 $scope.currentPagePrecioCondicion = [];
47 $scope.selectedPrecioCondicion = -1; 48 $scope.selectedPrecioCondicion = -1;
48 49
49 //METODOS 50 //METODOS
50 51
51 $scope.agregarPlazo = function(key) { 52 $scope.agregarPlazo = function(key) {
52 if(key === 13) { 53 if(key === 13) {
53 if(!$scope.plazoACargar.dias) { 54 if(!$scope.plazoACargar.dias) {
54 focaModalService.alert('Ingrese cantidad de días'); 55 focaModalService.alert('Ingrese cantidad de días');
55 return; 56 return;
56 } 57 }
57 var tieneEseDia = $scope.plazosNuevos.filter(function(a) { 58 var tieneEseDia = $scope.plazosNuevos.filter(function(a) {
58 return a.dias === $scope.plazoACargar.dias; 59 return a.dias === $scope.plazoACargar.dias;
59 }); 60 });
60 if(tieneEseDia.length > 0) { 61 if(tieneEseDia.length > 0) {
61 focaModalService.alert('Ya ha ingresado un plazo con esos días'); 62 focaModalService.alert('Ya ha ingresado un plazo con esos días');
62 return; 63 return;
63 } 64 }
64 $scope.plazosNuevos.push($scope.plazoACargar); 65 $scope.plazosNuevos.push($scope.plazoACargar);
65 $scope.plazoACargar = 66 $scope.plazoACargar =
66 { 67 {
67 item: $scope.plazosNuevos.length + 1 68 item: $scope.plazosNuevos.length + 1
68 }; 69 };
69 } 70 }
70 }; 71 };
71 72
72 $scope.volver = function() { 73 $scope.volver = function() {
73 $scope.ingreso = false; 74 $scope.ingreso = false;
74 $scope.plazosNuevos = []; 75 $scope.plazosNuevos = [];
75 $scope.plazoACargar = 76 $scope.plazoACargar =
76 { 77 {
77 item: $scope.plazosNuevos.length + 1 78 item: $scope.plazosNuevos.length + 1
78 }; 79 };
79 }; 80 };
80 81
81 $scope.quitarPlazo = function(key) { 82 $scope.quitarPlazo = function(key) {
82 $scope.plazosNuevos.splice(key, 1); 83 $scope.plazosNuevos.splice(key, 1);
83 $scope.plazoACargar = 84 $scope.plazoACargar =
84 { 85 {
85 item: $scope.plazosNuevos.length + 1 86 item: $scope.plazosNuevos.length + 1
86 }; 87 };
87 }; 88 };
88 89
89 $scope.search = function(pressed) { 90 $scope.search = function(pressed) {
90 $scope.filteredPrecioCondicion = $filter('filter')( 91 $scope.filteredPrecioCondicion = $filter('filter')(
91 $scope.precioCondicion, 92 $scope.precioCondicion,
92 {$: $scope.filters} 93 {$: $scope.filters}
93 ); 94 );
94 95
95 if(pressed) { 96 if(pressed) {
96 if($scope.filteredPrecioCondicion.length === 0) { 97 if($scope.filteredPrecioCondicion.length === 0) {
97 $timeout(function() { 98 $timeout(function() {
98 angular.element('#search')[0].focus(); 99 angular.element('#search')[0].focus();
99 $scope.filters = ''; 100 $scope.filters = '';
100 }); 101 });
101 }else { 102 }else {
102 primera(); 103 primera();
103 } 104 }
104 } 105 }
105 106
106 $scope.lastPage = Math.ceil( 107 $scope.lastPage = Math.ceil(
107 $scope.filteredPrecioCondicion.length / $scope.numPerPage 108 $scope.filteredPrecioCondicion.length / $scope.numPerPage
108 ); 109 );
109 110
110 $scope.resetPage(); 111 $scope.resetPage();
111 }; 112 };
112 113
113 $scope.resetPage = function() { 114 $scope.resetPage = function() {
114 $scope.currentPage = 1; 115 $scope.currentPage = 1;
115 $scope.selectPage(1); 116 $scope.selectPage(1);
116 }; 117 };
117 118
118 $scope.selectPage = function(page) { 119 $scope.selectPage = function(page) {
119 var start = (page - 1) * $scope.numPerPage; 120 var start = (page - 1) * $scope.numPerPage;
120 var end = start + $scope.numPerPage; 121 var end = start + $scope.numPerPage;
121 $scope.paginas = []; 122 $scope.paginas = [];
122 $scope.paginas = calcularPages(page); 123 $scope.paginas = calcularPages(page);
123 $scope.currentPagePrecioCondicion = 124 $scope.currentPagePrecioCondicion =
124 $scope.filteredPrecioCondicion.slice(start, end); 125 $scope.filteredPrecioCondicion.slice(start, end);
125 $scope.currentPage = page; 126 $scope.currentPage = page;
126 }; 127 };
127 128
128 $scope.select = function(precioCondicion) { 129 $scope.select = function(precioCondicion) {
129 $uibModalInstance.close(precioCondicion); 130 $uibModalInstance.close(precioCondicion);
130 }; 131 };
131 132
132 $scope.cancel = function() { 133 $scope.cancel = function() {
133 $uibModalInstance.dismiss('cancel'); 134 $uibModalInstance.dismiss('cancel');
134 }; 135 };
135 136
136 $scope.busquedaDown = function(key) { 137 $scope.busquedaDown = function(key) {
137 if (key === 40) { 138 if (key === 40) {
138 primera(key); 139 primera(key);
139 } 140 }
140 }; 141 };
141 142
142 $scope.busquedaPress = function(key) { 143 $scope.busquedaPress = function(key) {
143 if (key === 13) { 144 if (key === 13) {
144 $scope.search(true); 145 $scope.search(true);
145 } 146 }
146 }; 147 };
147 148
148 $scope.itemProducto = function(key) { 149 $scope.itemProducto = function(key) {
149 if (key === 38) { 150 if (key === 38) {
150 anterior(key); 151 anterior(key);
151 } 152 }
152 153
153 if (key === 40) { 154 if (key === 40) {
154 siguiente(key); 155 siguiente(key);
155 } 156 }
156 157
157 if (key === 37) { 158 if (key === 37) {
158 retrocederPagina(); 159 retrocederPagina();
159 } 160 }
160 161
161 if (key === 39) { 162 if (key === 39) {
162 avanzarPagina(); 163 avanzarPagina();
163 } 164 }
164 }; 165 };
166
167 $scope.verListaPrecio = function(id) {
168 $uibModal.open(
169 {
170 ariaLabelledBy: 'Busqueda de Productos',
171 templateUrl: 'modal-busqueda-productos.html',
172 controller: 'modalBusquedaProductosCtrl',
173 resolve: {
174 parametroProducto: {
175 idLista: id,
176 cotizacion: 1,
177 simbolo: '$',
178 soloMostrar: true
179 }
180 },
181 size: 'md'
182 }
183 );
184 };
165 185
166 function calcularPages(paginaActual) { 186 function calcularPages(paginaActual) {
167 var paginas = []; 187 var paginas = [];
168 paginas.push(paginaActual); 188 paginas.push(paginaActual);
169 189
170 if (paginaActual - 1 > 1) { 190 if (paginaActual - 1 > 1) {
171 191
172 paginas.unshift(paginaActual - 1); 192 paginas.unshift(paginaActual - 1);
173 if (paginaActual - 2 > 1) { 193 if (paginaActual - 2 > 1) {
174 paginas.unshift(paginaActual - 2); 194 paginas.unshift(paginaActual - 2);
175 } 195 }
176 } 196 }
177 197
178 if (paginaActual + 1 < $scope.lastPage) { 198 if (paginaActual + 1 < $scope.lastPage) {
179 paginas.push(paginaActual + 1); 199 paginas.push(paginaActual + 1);
180 if (paginaActual + 2 < $scope.lastPage) { 200 if (paginaActual + 2 < $scope.lastPage) {
181 paginas.push(paginaActual + 2); 201 paginas.push(paginaActual + 2);
182 } 202 }
183 } 203 }
184 204
185 if (paginaActual !== 1) { 205 if (paginaActual !== 1) {
186 paginas.unshift(1); 206 paginas.unshift(1);
187 } 207 }
188 208
189 if (paginaActual !== $scope.lastPage) { 209 if (paginaActual !== $scope.lastPage) {
190 paginas.push($scope.lastPage); 210 paginas.push($scope.lastPage);
191 } 211 }
192 212
193 return paginas; 213 return paginas;
194 } 214 }
195 215
196 function primera() { 216 function primera() {
197 $scope.selectedPrecioCondicion = 0; 217 $scope.selectedPrecioCondicion = 0;
198 } 218 }
199 219
200 function anterior() { 220 function anterior() {
201 if ($scope.selectedPrecioCondicion === 0 && $scope.currentPage > 1) { 221 if ($scope.selectedPrecioCondicion === 0 && $scope.currentPage > 1) {
202 retrocederPagina(); 222 retrocederPagina();
203 } else { 223 } else {
204 $scope.selectedPrecioCondicion--; 224 $scope.selectedPrecioCondicion--;
205 } 225 }
206 } 226 }
207 227
208 function siguiente() { 228 function siguiente() {
209 if ($scope.selectedPrecioCondicion < 229 if ($scope.selectedPrecioCondicion <
210 $scope.currentPagePrecioCondicion.length ) { 230 $scope.currentPagePrecioCondicion.length ) {
211 $scope.selectedPrecioCondicion++; 231 $scope.selectedPrecioCondicion++;
212 } else { 232 } else {
213 avanzarPagina(); 233 avanzarPagina();
214 } 234 }
215 } 235 }
216 236
217 function retrocederPagina() { 237 function retrocederPagina() {
218 if ($scope.currentPage > 1) { 238 if ($scope.currentPage > 1) {
219 $scope.selectPage($scope.currentPage - 1); 239 $scope.selectPage($scope.currentPage - 1);
220 $scope.selectedPrecioCondicion = $scope.numPerPage - 1; 240 $scope.selectedPrecioCondicion = $scope.numPerPage - 1;
221 } 241 }
222 } 242 }
223 243
224 function avanzarPagina() { 244 function avanzarPagina() {
225 if ($scope.currentPage < $scope.lastPage) { 245 if ($scope.currentPage < $scope.lastPage) {
226 $scope.selectPage($scope.currentPage + 1); 246 $scope.selectPage($scope.currentPage + 1);
227 $scope.selectedPrecioCondicion = 0; 247 $scope.selectedPrecioCondicion = 0;
228 } 248 }
229 } 249 }
230 } 250 }
231 ] 251 ]
232 ); 252 );
233 253
src/views/modal-precio-condicion.html
1 <div class="modal-header py-1"> 1 <div class="modal-header py-1">
2 <div class="row w-100"> 2 <div class="row w-100">
3 <div class="col-lg-6"> 3 <div class="col-lg-6">
4 <h5 ng-show="!ingreso" class="modal-title my-1">Búsqueda de Precio-Condición</h5> 4 <h5 ng-show="!ingreso" class="modal-title my-1">Búsqueda de Precio-Condición</h5>
5 <h5 ng-show="ingreso" class="modal-title my-1">Nuevos Plazos</h5> 5 <h5 ng-show="ingreso" class="modal-title my-1">Nuevos Plazos</h5>
6 </div> 6 </div>
7 <div class="input-group col-lg-6 pr-0 my-2" ng-show="!ingreso"> 7 <div class="input-group col-lg-6 pr-0 my-2" ng-show="!ingreso">
8 <input 8 <input
9 type="text" 9 type="text"
10 class="form-control form-control-sm" 10 class="form-control form-control-sm"
11 id="search" 11 id="search"
12 placeholder="Busqueda" 12 placeholder="Busqueda"
13 ng-model="filters" 13 ng-model="filters"
14 ng-change="search()" 14 ng-change="search()"
15 ng-keydown="busquedaDown($event.keyCode)" 15 ng-keydown="busquedaDown($event.keyCode)"
16 ng-keypress="busquedaPress($event.keyCode)" 16 ng-keypress="busquedaPress($event.keyCode)"
17 foca-focus="selectedPrecioCondicion == -1" 17 foca-focus="selectedPrecioCondicion == -1"
18 ng-focus="selectedPrecioCondicion = -1" 18 ng-focus="selectedPrecioCondicion = -1"
19 teclado-virtual 19 teclado-virtual
20 > 20 >
21 <div class="input-group-append"> 21 <div class="input-group-append">
22 <button 22 <button
23 class="btn btn-outline-secondary" 23 class="btn btn-outline-secondary"
24 type="button" 24 type="button"
25 title="Buscar" 25 title="Buscar"
26 ng-click="busquedaPress(13)"> 26 ng-click="busquedaPress(13)">
27 <i class="fa fa-search" aria-hidden="true"></i> 27 <i class="fa fa-search" aria-hidden="true"></i>
28 </button> 28 </button>
29 </div> 29 </div>
30 </div> 30 </div>
31 </div> 31 </div>
32 </div> 32 </div>
33 <div class="modal-body" id="modal-body"> 33 <div class="modal-body" id="modal-body">
34 34
35 35
36 <table ng-show="!ingreso" class="table table-striped table-sm"> 36 <table ng-show="!ingreso" class="table table-striped table-sm">
37 <thead> 37 <thead>
38 <tr> 38 <tr>
39 <th>Código</th> 39 <th>Código</th>
40 <th>Nombre</th> 40 <th>Nombre</th>
41 <th>Lista Precio</th> 41 <th>Lista Precio</th>
42 <th>Plazos</th> 42 <th>Plazos</th>
43 <th></th> 43 <th></th>
44 </tr> 44 </tr>
45 </thead> 45 </thead>
46 <tbody> 46 <tbody>
47 <tr ng-show="currentPagePrecioCondicion.length == 0"> 47 <tr ng-show="currentPagePrecioCondicion.length == 0">
48 <td colspan="6"> 48 <td colspan="6">
49 No se encontraron resultados. 49 No se encontraron resultados.
50 </td> 50 </td>
51 </tr> 51 </tr>
52 <tr> 52 <tr>
53 <td colspan="4" ng-show="!ingreso"> 53 <td colspan="4" ng-show="!ingreso">
54 <input 54 <input
55 class="form-control form-control-sm" 55 class="form-control form-control-sm"
56 type="text" 56 type="text"
57 placeholder="Selección manual" 57 placeholder="Selección manual"
58 readonly 58 readonly
59 ng-click="ingreso = !ingreso" 59 ng-click="ingreso = !ingreso"
60 /> 60 />
61 </td> 61 </td>
62 <td colspan="1" ng-show="!ingreso"> 62 <td colspan="1" ng-show="!ingreso">
63 <button 63 <button
64 type="button" 64 type="button"
65 class="btn btn-sm p-1 float-right" 65 class="btn btn-sm p-1 float-right"
66 ng-class="{ 66 ng-class="{
67 'btn-secondary': selectedPrecioCondicion != 0, 67 'btn-secondary': selectedPrecioCondicion != 0,
68 'btn-primary': selectedPrecioCondicion == 0 68 'btn-primary': selectedPrecioCondicion == 0
69 }" 69 }"
70 foca-focus="selectedPrecioCondicion == 0" 70 foca-focus="selectedPrecioCondicion == 0"
71 ng-keydown="itemProducto($event.keyCode)" 71 ng-keydown="itemProducto($event.keyCode)"
72 ng-click="ingreso = !ingreso" 72 ng-click="ingreso = !ingreso"
73 > 73 >
74 <i class="fa fa-circle-thin" aria-hidden="true"></i> 74 <i class="fa fa-circle-thin" aria-hidden="true"></i>
75 </button> 75 </button>
76 </td> 76 </td>
77 </tr> 77 </tr>
78 <tr class="selectable" 78 <tr class="selectable"
79 ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion" 79 ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion">
80 ng-click="select(precioCondicion)"> 80 <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0"
81 <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0"></td> 81 ng-click="select(precioCondicion)"></td>
82 <td ng-bind="precioCondicion.nombre"></td> 82 <td ng-bind="precioCondicion.nombre"
83 <td ng-bind="precioCondicion.idListaPrecio"></td> 83 ng-click="select(precioCondicion)"></td>
84 <td ng-bind="precioCondicion.plazos"></td> 84 <td ng-bind="precioCondicion.idListaPrecio"
85 ng-click="select(precioCondicion)"></td>
86 <td ng-bind="precioCondicion.plazos"
87 ng-click="select(precioCondicion)"></td>
85 <td> 88 <td>
86 <button 89 <button
87 type="button" 90 type="button"
88 class="btn btn-sm p-1 float-right" 91 class="btn btn-sm p-1 float-right"
89 title="Seleccionar" 92 title="Seleccionar"
90 ng-class="{ 93 ng-class="{
91 'btn-secondary': selectedPrecioCondicion != key + 1, 94 'btn-secondary': selectedPrecioCondicion != key + 1,
92 'btn-primary': selectedPrecioCondicion == key + 1 95 'btn-primary': selectedPrecioCondicion == key + 1
93 }" 96 }"
94 foca-focus="selectedPrecioCondicion == {{key + 1}}" 97 foca-focus="selectedPrecioCondicion == {{key + 1}}"
95 ng-keydown="itemProducto($event.keyCode)" 98 ng-keydown="itemProducto($event.keyCode)"
99 ng-click="select(precioCondicion)"
96 > 100 >
97 <i class="fa fa-circle-thin" aria-hidden="true"></i> 101 <i class="fa fa-circle-thin" aria-hidden="true"></i>
98 </button> 102 </button>
103 <button
104 type="button"
105 class="btn btn-sm p-1 float-right btn-secondary mr-2"
106 title="Ver lista precio"
107 ng-click="verListaPrecio(precioCondicion.id)"
108 >
109 <i class="fa fa-eye" aria-hidden="true"></i>
110 </button>
99 </td> 111 </td>
100 </tr> 112 </tr>
101 </tbody> 113 </tbody>
102 </table> 114 </table>
103 115
104 <table class="table table-striped table-sm" ng-show="ingreso"> 116 <table class="table table-striped table-sm" ng-show="ingreso">
105 <thead> 117 <thead>
106 <tr> 118 <tr>
107 <th>Item</th> 119 <th>Item</th>
108 <th>Días</th> 120 <th>Días</th>
109 <th></th> 121 <th></th>
110 </tr> 122 </tr>
111 </thead> 123 </thead>
112 <tbody> 124 <tbody>
113 <tr> 125 <tr>
114 <td> 126 <td>
115 <input 127 <input
116 type="number" 128 type="number"
117 class="form-control text-right" 129 class="form-control text-right"
118 ng-model="plazoACargar.item" 130 ng-model="plazoACargar.item"
119 readonly 131 readonly
120 /> 132 />
121 </td> 133 </td>
122 <td> 134 <td>
123 <input 135 <input
124 type="number" 136 type="number"
125 class="form-control text-right" 137 class="form-control text-right"
126 min="0" 138 min="0"
127 ng-model="plazoACargar.dias" 139 ng-model="plazoACargar.dias"
128 ng-keypress="agregarPlazo($event.keyCode)" 140 ng-keypress="agregarPlazo($event.keyCode)"
129 foca-focus="ingreso" 141 foca-focus="ingreso"
130 /> 142 />
131 </td> 143 </td>
132 <td class="text-center"> 144 <td class="text-center">
133 <button 145 <button
134 class="btn btn-outline-secondary" 146 class="btn btn-outline-secondary"
135 title="Agregar" 147 title="Agregar"
136 ng-click="agregarPlazo(13)" 148 ng-click="agregarPlazo(13)"
137 > 149 >
138 <i class="fa fa-save"></i> 150 <i class="fa fa-save"></i>
139 </button> 151 </button>
140 </td> 152 </td>
141 </tr> 153 </tr>
142 <tr ng-repeat="(key, plazo) in plazosNuevos"> 154 <tr ng-repeat="(key, plazo) in plazosNuevos">
143 <td class="text-right" ng-bind="key + 1"></td> 155 <td class="text-right" ng-bind="key + 1"></td>
144 <td class="text-right" ng-bind="plazo.dias"></td> 156 <td class="text-right" ng-bind="plazo.dias"></td>
145 <td class="text-center"> 157 <td class="text-center">
146 <button 158 <button
147 class="btn btn-outline-secondary" 159 class="btn btn-outline-secondary"
148 title="Eliminar" 160 title="Eliminar"
149 ng-click="quitarPlazo(key)" 161 ng-click="quitarPlazo(key)"
150 > 162 >
151 <i class="fa fa-trash"></i> 163 <i class="fa fa-trash"></i>
152 </button> 164 </button>
153 </td> 165 </td>
154 </tr> 166 </tr>
155 </tbody> 167 </tbody>
156 </table> 168 </table>
157 </div> 169 </div>
158 <div class="modal-footer py-1"> 170 <div class="modal-footer py-1">
159 <nav ng-show="currentPagePrecioCondicion.length > 0 && !ingreso" class="mr-auto"> 171 <nav ng-show="currentPagePrecioCondicion.length > 0 && !ingreso" class="mr-auto">
160 <ul class="pagination pagination-sm mb-0"> 172 <ul class="pagination pagination-sm mb-0">
161 <li class="page-item" ng-class="{'disabled': currentPage == 1}"> 173 <li class="page-item" ng-class="{'disabled': currentPage == 1}">
162 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> 174 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)">
163 <span aria-hidden="true">&laquo;</span> 175 <span aria-hidden="true">&laquo;</span>
164 <span class="sr-only">Anterior</span> 176 <span class="sr-only">Anterior</span>
165 </a> 177 </a>
166 </li> 178 </li>
167 <li 179 <li
168 class="page-item" 180 class="page-item"
169 ng-repeat="pagina in paginas" 181 ng-repeat="pagina in paginas"
170 ng-class="{'active': pagina == currentPage}" 182 ng-class="{'active': pagina == currentPage}"
171 > 183 >
172 <a 184 <a
173 class="page-link" 185 class="page-link"
174 href="javascript:void();" 186 href="javascript:void();"
175 ng-click="selectPage(pagina)" 187 ng-click="selectPage(pagina)"
176 ng-bind="pagina" 188 ng-bind="pagina"
177 ></a> 189 ></a>
178 </li> 190 </li>
179 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> 191 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
180 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> 192 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)">
181 <span aria-hidden="true">&raquo;</span> 193 <span aria-hidden="true">&raquo;</span>
182 <span class="sr-only">Siguiente</span> 194 <span class="sr-only">Siguiente</span>
183 </a> 195 </a>
184 </li> 196 </li>
185 </ul> 197 </ul>
186 </nav> 198 </nav>
187 <button 199 <button
188 ng-show="!ingreso" 200 ng-show="!ingreso"
189 class="btn btn-sm btn-secondary" 201 class="btn btn-sm btn-secondary"
190 type="button" 202 type="button"
191 ng-click="cancel()" 203 ng-click="cancel()"
192 >Cancelar 204 >Cancelar
193 </button> 205 </button>
194 <button 206 <button
195 ng-show="ingreso" 207 ng-show="ingreso"
196 ng-disabled="plazosNuevos.length === 0" 208 ng-disabled="plazosNuevos.length === 0"
197 class="btn btn-sm btn-primary" 209 class="btn btn-sm btn-primary"
198 type="button" 210 type="button"
199 ng-click="select(plazosNuevos)" 211 ng-click="select(plazosNuevos)"
200 >Aceptar 212 >Aceptar
201 </button> 213 </button>
202 <button 214 <button
203 ng-show="ingreso" 215 ng-show="ingreso"
204 class="btn btn-sm btn-secondary" 216 class="btn btn-sm btn-secondary"
205 type="button" 217 type="button"
206 ng-click="volver()" 218 ng-click="volver()"
207 >Volver 219 >Volver
208 </button> 220 </button>
209 </div> 221 </div>
210 222