Commit 4786b133fb93eb04f2aed834459735eb2fa574e4

Authored by Eric Fernandez
1 parent 4a3ff5358a
Exists in master

focus input si no hay resultados

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