Commit 0867e749ca2ef83e8bbe6fe089efef2e49bcd414
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
saco maxDate a calendario See merge request !5
Showing
2 changed files
Show diff stats
src/js/controller.js
1 | angular.module('focaModalNotaPedido') | 1 | angular.module('focaModalNotaPedido') |
2 | .controller('focaModalNotaPedidoController', | 2 | .controller('focaModalNotaPedidoController', |
3 | [ | 3 | [ |
4 | '$timeout', | 4 | '$timeout', |
5 | '$filter', | 5 | '$filter', |
6 | '$scope', | 6 | '$scope', |
7 | '$uibModalInstance', | 7 | '$uibModalInstance', |
8 | 'focaModalNotaPedidoService', | 8 | 'focaModalNotaPedidoService', |
9 | 'usadoPor', | 9 | 'usadoPor', |
10 | function($timeout, $filter, $scope, $uibModalInstance, | 10 | function($timeout, $filter, $scope, $uibModalInstance, |
11 | focaModalNotaPedidoService, usadoPor | 11 | focaModalNotaPedidoService, usadoPor |
12 | ) { | 12 | ) { |
13 | var fecha = new Date(); | 13 | var fecha = new Date(); |
14 | $scope.fechaHasta = new Date(); | 14 | $scope.fechaHasta = new Date(); |
15 | $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1)); | 15 | $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1)); |
16 | $scope.filters = ''; | 16 | $scope.filters = ''; |
17 | $scope.notasPedido = []; | 17 | $scope.notasPedido = []; |
18 | $scope.primerBusqueda = false; | 18 | $scope.primerBusqueda = false; |
19 | $scope.searchLoading = false; | 19 | $scope.searchLoading = false; |
20 | // pagination | 20 | // pagination |
21 | $scope.numPerPage = 10; | 21 | $scope.numPerPage = 10; |
22 | $scope.currentPage = 1; | 22 | $scope.currentPage = 1; |
23 | $scope.filteredNotasPedido = []; | 23 | $scope.filteredNotasPedido = []; |
24 | $scope.currentPageNotasPedido = []; | 24 | $scope.currentPageNotasPedido = []; |
25 | $scope.selectedNotaPedido = -1; | 25 | $scope.selectedNotaPedido = -1; |
26 | $scope.dateOptions = { | ||
27 | maxDate: new Date() | ||
28 | }; | ||
29 | 26 | ||
30 | //METODOS | 27 | //METODOS |
31 | $scope.busquedaPress = function(key) { | 28 | $scope.busquedaPress = function(key) { |
32 | if (key === 13) { | 29 | if (key === 13) { |
33 | //TODO Validaciones con alertas | 30 | //TODO Validaciones con alertas |
34 | if(!$scope.fechaDesde) { | 31 | if(!$scope.fechaDesde) { |
35 | alert('INGRESE FECHA DESDE'); | 32 | alert('INGRESE FECHA DESDE'); |
36 | return; | 33 | return; |
37 | } | 34 | } |
38 | if(!$scope.fechaHasta) { | 35 | if(!$scope.fechaHasta) { |
39 | alert('INGRESE FECHA HASTA'); | 36 | alert('INGRESE FECHA HASTA'); |
40 | return; | 37 | return; |
41 | } | 38 | } |
42 | if($scope.fechaDesde > $scope.fechaHasta) { | 39 | if($scope.fechaDesde > $scope.fechaHasta) { |
43 | alert('La fecha desde no puede ser mayor a la fecha hasta'); | 40 | alert('La fecha desde no puede ser mayor a la fecha hasta'); |
44 | return; | 41 | return; |
45 | } | 42 | } |
46 | $scope.searchLoading = true; | 43 | $scope.searchLoading = true; |
47 | //TODO hacer filtro de fecha | 44 | //TODO hacer filtro de fecha |
48 | focaModalNotaPedidoService | 45 | focaModalNotaPedidoService |
49 | .getNotasPedido(usadoPor, $scope.fechaDesde.toISOString().split('.')[0], | 46 | .getNotasPedido(usadoPor, $scope.fechaDesde.toISOString().split('.')[0], |
50 | $scope.fechaHasta.toISOString().split('.')[0]) | 47 | $scope.fechaHasta.toISOString().split('.')[0]) |
51 | .then(llenarDatos); | 48 | .then(llenarDatos); |
52 | } | 49 | } |
53 | }; | 50 | }; |
54 | function llenarDatos(res) { | 51 | function llenarDatos(res) { |
55 | $scope.notasPedido = []; | 52 | $scope.notasPedido = []; |
56 | $scope.filteredNotasPedido = []; | 53 | $scope.filteredNotasPedido = []; |
57 | $scope.currentPageNotasPedido = []; | 54 | $scope.currentPageNotasPedido = []; |
58 | $scope.selectedNotaPedido = -1; | 55 | $scope.selectedNotaPedido = -1; |
59 | $scope.searchLoading = false; | 56 | $scope.searchLoading = false; |
60 | $scope.primerBusqueda = true; | 57 | $scope.primerBusqueda = true; |
61 | $scope.notasPedido = res.data; | 58 | $scope.notasPedido = res.data; |
62 | $scope.search(true); | 59 | $scope.search(true); |
63 | primera(); | 60 | primera(); |
64 | } | 61 | } |
65 | $scope.search = function(pressed) { | 62 | $scope.search = function(pressed) { |
66 | if($scope.notasPedido.length > 0) { | 63 | if($scope.notasPedido.length > 0) { |
67 | $scope.filteredNotasPedido = $filter('filter')( | 64 | $scope.filteredNotasPedido = $filter('filter')( |
68 | $scope.notasPedido, | 65 | $scope.notasPedido, |
69 | {$: $scope.filters} | 66 | {$: $scope.filters} |
70 | ); | 67 | ); |
71 | 68 | ||
72 | $scope.lastPage = Math.ceil( | 69 | $scope.lastPage = Math.ceil( |
73 | $scope.filteredNotasPedido.length / $scope.numPerPage | 70 | $scope.filteredNotasPedido.length / $scope.numPerPage |
74 | ); | 71 | ); |
75 | 72 | ||
76 | $scope.resetPage(); | 73 | $scope.resetPage(); |
77 | if(pressed && $scope.filteredNotasPedido.length === 0){ | 74 | if(pressed && $scope.filteredNotasPedido.length === 0){ |
78 | $timeout(function() { | 75 | $timeout(function() { |
79 | angular.element('#search')[0].focus(); | 76 | angular.element('#search')[0].focus(); |
80 | $scope.filters = ''; | 77 | $scope.filters = ''; |
81 | }); | 78 | }); |
82 | } | 79 | } |
83 | } | 80 | } |
84 | }; | 81 | }; |
85 | 82 | ||
86 | $scope.resetPage = function() { | 83 | $scope.resetPage = function() { |
87 | $scope.currentPage = 1; | 84 | $scope.currentPage = 1; |
88 | $scope.selectPage(1); | 85 | $scope.selectPage(1); |
89 | }; | 86 | }; |
90 | 87 | ||
91 | $scope.selectPage = function(page) { | 88 | $scope.selectPage = function(page) { |
92 | var start = (page - 1) * $scope.numPerPage; | 89 | var start = (page - 1) * $scope.numPerPage; |
93 | var end = start + $scope.numPerPage; | 90 | var end = start + $scope.numPerPage; |
94 | $scope.paginas = []; | 91 | $scope.paginas = []; |
95 | $scope.paginas = calcularPages(page); | 92 | $scope.paginas = calcularPages(page); |
96 | $scope.currentPageNotasPedido = $scope.filteredNotasPedido.slice(start, end); | 93 | $scope.currentPageNotasPedido = $scope.filteredNotasPedido.slice(start, end); |
97 | $scope.currentPage = page; | 94 | $scope.currentPage = page; |
98 | }; | 95 | }; |
99 | 96 | ||
100 | $scope.select = function(notaPedido) { | 97 | $scope.select = function(notaPedido) { |
101 | $uibModalInstance.close(notaPedido); | 98 | $uibModalInstance.close(notaPedido); |
102 | }; | 99 | }; |
103 | 100 | ||
104 | $scope.cancel = function() { | 101 | $scope.cancel = function() { |
105 | $uibModalInstance.dismiss('cancel'); | 102 | $uibModalInstance.dismiss('cancel'); |
106 | }; | 103 | }; |
107 | 104 | ||
108 | $scope.busquedaDown = function(key) { | 105 | $scope.busquedaDown = function(key) { |
109 | if (key === 40) { | 106 | if (key === 40) { |
110 | primera(key); | 107 | primera(key); |
111 | } | 108 | } |
112 | }; | 109 | }; |
113 | 110 | ||
114 | $scope.itemNotaPedido = function(key) { | 111 | $scope.itemNotaPedido = function(key) { |
115 | if (key === 38) { | 112 | if (key === 38) { |
116 | anterior(key); | 113 | anterior(key); |
117 | } | 114 | } |
118 | 115 | ||
119 | if (key === 40) { | 116 | if (key === 40) { |
120 | siguiente(key); | 117 | siguiente(key); |
121 | } | 118 | } |
122 | 119 | ||
123 | if (key === 37) { | 120 | if (key === 37) { |
124 | retrocederPagina(); | 121 | retrocederPagina(); |
125 | } | 122 | } |
126 | 123 | ||
127 | if (key === 39) { | 124 | if (key === 39) { |
128 | avanzarPagina(); | 125 | avanzarPagina(); |
129 | } | 126 | } |
130 | }; | 127 | }; |
131 | 128 | ||
132 | function calcularPages(paginaActual) { | 129 | function calcularPages(paginaActual) { |
133 | var paginas = []; | 130 | var paginas = []; |
134 | paginas.push(paginaActual); | 131 | paginas.push(paginaActual); |
135 | 132 | ||
136 | if (paginaActual - 1 > 1) { | 133 | if (paginaActual - 1 > 1) { |
137 | 134 | ||
138 | paginas.unshift(paginaActual - 1); | 135 | paginas.unshift(paginaActual - 1); |
139 | if (paginaActual - 2 > 1) { | 136 | if (paginaActual - 2 > 1) { |
140 | paginas.unshift(paginaActual - 2); | 137 | paginas.unshift(paginaActual - 2); |
141 | } | 138 | } |
142 | } | 139 | } |
143 | 140 | ||
144 | if (paginaActual + 1 < $scope.lastPage) { | 141 | if (paginaActual + 1 < $scope.lastPage) { |
145 | paginas.push(paginaActual + 1); | 142 | paginas.push(paginaActual + 1); |
146 | if (paginaActual + 2 < $scope.lastPage) { | 143 | if (paginaActual + 2 < $scope.lastPage) { |
147 | paginas.push(paginaActual + 2); | 144 | paginas.push(paginaActual + 2); |
148 | } | 145 | } |
149 | } | 146 | } |
150 | 147 | ||
151 | if (paginaActual !== 1) { | 148 | if (paginaActual !== 1) { |
152 | paginas.unshift(1); | 149 | paginas.unshift(1); |
153 | } | 150 | } |
154 | 151 | ||
155 | if (paginaActual !== $scope.lastPage) { | 152 | if (paginaActual !== $scope.lastPage) { |
156 | paginas.push($scope.lastPage); | 153 | paginas.push($scope.lastPage); |
157 | } | 154 | } |
158 | 155 | ||
159 | return paginas; | 156 | return paginas; |
160 | } | 157 | } |
161 | 158 | ||
162 | function primera() { | 159 | function primera() { |
163 | $scope.selectedNotaPedido = 0; | 160 | $scope.selectedNotaPedido = 0; |
164 | } | 161 | } |
165 | 162 | ||
166 | function anterior() { | 163 | function anterior() { |
167 | if ($scope.selectedNotaPedido === 0 && $scope.currentPage > 1) { | 164 | if ($scope.selectedNotaPedido === 0 && $scope.currentPage > 1) { |
168 | retrocederPagina(); | 165 | retrocederPagina(); |
169 | } else { | 166 | } else { |
170 | $scope.selectedNotaPedido--; | 167 | $scope.selectedNotaPedido--; |
171 | } | 168 | } |
172 | } | 169 | } |
173 | 170 | ||
174 | function siguiente() { | 171 | function siguiente() { |
175 | if ($scope.selectedNotaPedido < $scope.currentPageNotasPedido.length - 1 ) { | 172 | if ($scope.selectedNotaPedido < $scope.currentPageNotasPedido.length - 1 ) { |
176 | $scope.selectedNotaPedido++; | 173 | $scope.selectedNotaPedido++; |
177 | } else { | 174 | } else { |
178 | avanzarPagina(); | 175 | avanzarPagina(); |
179 | } | 176 | } |
180 | } | 177 | } |
181 | 178 | ||
182 | function retrocederPagina() { | 179 | function retrocederPagina() { |
183 | if ($scope.currentPage > 1) { | 180 | if ($scope.currentPage > 1) { |
184 | $scope.selectPage($scope.currentPage - 1); | 181 | $scope.selectPage($scope.currentPage - 1); |
185 | $scope.selectedNotaPedido = $scope.numPerPage - 1; | 182 | $scope.selectedNotaPedido = $scope.numPerPage - 1; |
186 | } | 183 | } |
187 | } | 184 | } |
188 | 185 | ||
189 | function avanzarPagina() { | 186 | function avanzarPagina() { |
190 | if ($scope.currentPage < $scope.lastPage) { | 187 | if ($scope.currentPage < $scope.lastPage) { |
191 | $scope.selectPage($scope.currentPage + 1); | 188 | $scope.selectPage($scope.currentPage + 1); |
192 | $scope.selectedNotaPedido = 0; | 189 | $scope.selectedNotaPedido = 0; |
193 | } | 190 | } |
194 | } | 191 | } |
195 | } | 192 | } |
196 | ] | 193 | ] |
197 | ); | 194 | ); |
198 | 195 |
src/views/foca-modal-nota-pedido.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 class="modal-title my-1">Búsqueda de Nota de Pedido</h5> | 4 | <h5 class="modal-title my-1">Búsqueda de Nota de Pedido</h5> |
5 | </div> | 5 | </div> |
6 | <div class="input-group col-lg-6 pr-0 my-2"> | 6 | <div class="input-group col-lg-6 pr-0 my-2"> |
7 | <input | 7 | <input |
8 | ladda="searchLoading" | 8 | ladda="searchLoading" |
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="Razón social" | 12 | placeholder="Razón social" |
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="selectedNotaPedido == -1" | 17 | foca-focus="selectedNotaPedido == -1" |
18 | ng-focus="selectedNotaPedido = -1" | 18 | ng-focus="selectedNotaPedido = -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 | ladda="searchLoading" | 23 | ladda="searchLoading" |
24 | data-spinner-color="#FF0000" | 24 | data-spinner-color="#FF0000" |
25 | class="btn btn-outline-secondary" | 25 | class="btn btn-outline-secondary" |
26 | type="button" | 26 | type="button" |
27 | ng-click="busquedaPress(13)" | 27 | ng-click="busquedaPress(13)" |
28 | > | 28 | > |
29 | <i class="fa fa-search" aria-hidden="true"></i> | 29 | <i class="fa fa-search" aria-hidden="true"></i> |
30 | </button> | 30 | </button> |
31 | </div> | 31 | </div> |
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> |
34 | </div> | 34 | </div> |
35 | <div class="modal-body" id="modal-body"> | 35 | <div class="modal-body" id="modal-body"> |
36 | 36 | ||
37 | <div class="input-group row"> | 37 | <div class="input-group row"> |
38 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 38 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
39 | <div class="col-md-4 col-8 input-group mb-2"> | 39 | <div class="col-md-4 col-8 input-group mb-2"> |
40 | <div class="input-group-prepend"> | 40 | <div class="input-group-prepend"> |
41 | <div class="input-group-text form-control-sm"> | 41 | <div class="input-group-text form-control-sm"> |
42 | <i class="fa fa-calendar"></i> | 42 | <i class="fa fa-calendar"></i> |
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | <input | 45 | <input |
46 | class="form-control form-control-sm" | 46 | class="form-control form-control-sm" |
47 | id="inlineFormInputGroup" | 47 | id="inlineFormInputGroup" |
48 | ladda="searchLoading" | 48 | ladda="searchLoading" |
49 | type="text" | 49 | type="text" |
50 | ng-model="fechaDesde" | 50 | ng-model="fechaDesde" |
51 | ng-required="true" | 51 | ng-required="true" |
52 | uib-datepicker-popup="dd/MM/yyyy" | 52 | uib-datepicker-popup="dd/MM/yyyy" |
53 | show-button-bar="false" | 53 | show-button-bar="false" |
54 | is-open="datepickerOpen" | 54 | is-open="datepickerOpen" |
55 | on-open-focus="false" | 55 | on-open-focus="false" |
56 | ng-focus="datepickerOpen = true" | 56 | ng-focus="datepickerOpen = true" |
57 | datepicker-options="dateOptions" | 57 | datepicker-options="dateOptions" |
58 | /> | 58 | /> |
59 | </div> | 59 | </div> |
60 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 60 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
61 | <div class="col-md-4 col-8 input-group mb-2"> | 61 | <div class="col-md-4 col-8 input-group mb-2"> |
62 | <div class="input-group-prepend"> | 62 | <div class="input-group-prepend"> |
63 | <div class="input-group-text form-control-sm"> | 63 | <div class="input-group-text form-control-sm"> |
64 | <i class="fa fa-calendar"></i> | 64 | <i class="fa fa-calendar"></i> |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | <input | 67 | <input |
68 | class="form-control form-control-sm" | 68 | class="form-control form-control-sm" |
69 | id="inlineFormInputGroup" | 69 | id="inlineFormInputGroup" |
70 | ladda="searchLoading" | 70 | ladda="searchLoading" |
71 | type="text" | 71 | type="text" |
72 | ng-model="fechaHasta" | 72 | ng-model="fechaHasta" |
73 | ng-required="true" | 73 | ng-required="true" |
74 | uib-datepicker-popup="dd/MM/yyyy" | 74 | uib-datepicker-popup="dd/MM/yyyy" |
75 | show-button-bar="false" | 75 | show-button-bar="false" |
76 | is-open="datepicker2Open" | 76 | is-open="datepicker2Open" |
77 | on-open-focus="false" | 77 | on-open-focus="false" |
78 | ng-focus="datepicker2Open = true" | ||
79 | datepicker-options="dateOptions" | 78 | ng-focus="datepicker2Open = true" |
80 | /> | 79 | /> |
81 | </div> | 80 | </div> |
82 | </div> | 81 | </div> |
83 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 82 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
84 | <thead> | 83 | <thead> |
85 | <tr> | 84 | <tr> |
86 | <th>Fecha</th> | 85 | <th>Fecha</th> |
87 | <th>Cliente</th> | 86 | <th>Cliente</th> |
88 | <th>Comprobante</th> | 87 | <th>Comprobante</th> |
89 | <th class="text-right">Importe</th> | 88 | <th class="text-right">Importe</th> |
90 | <th></th> | 89 | <th></th> |
91 | </tr> | 90 | </tr> |
92 | </thead> | 91 | </thead> |
93 | <tbody> | 92 | <tbody> |
94 | <tr ng-show="currentPageNotasPedido.length == 0 && primerBusqueda"> | 93 | <tr ng-show="currentPageNotasPedido.length == 0 && primerBusqueda"> |
95 | <td colspan="5"> | 94 | <td colspan="5"> |
96 | No se encontraron resultados. | 95 | No se encontraron resultados. |
97 | </td> | 96 | </td> |
98 | </tr> | 97 | </tr> |
99 | <tr class="selectable" | 98 | <tr class="selectable" |
100 | ng-repeat="(key,notaPedido) in currentPageNotasPedido" | 99 | ng-repeat="(key,notaPedido) in currentPageNotasPedido" |
101 | ng-click="select(notaPedido)"> | 100 | ng-click="select(notaPedido)"> |
102 | <td ng-bind="notaPedido.fechaCarga | date : 'dd/MM/yyyy'"></td> | 101 | <td ng-bind="notaPedido.fechaCarga | date : 'dd/MM/yyyy'"></td> |
103 | <td ng-bind="notaPedido.nombreCliente"></td> | 102 | <td ng-bind="notaPedido.nombreCliente"></td> |
104 | <td ng-bind="[notaPedido.sucursal, notaPedido.numeroNotaPedido] | comprobante"></td> | 103 | <td ng-bind="[notaPedido.sucursal, notaPedido.numeroNotaPedido] | comprobante"></td> |
105 | <td ng-bind="notaPedido.total | number: 2" class="text-right"></td> | 104 | <td ng-bind="notaPedido.total | number: 2" class="text-right"></td> |
106 | <td> | 105 | <td> |
107 | <button | 106 | <button |
108 | type="button" | 107 | type="button" |
109 | class="btn btn-xs p-1 float-right" | 108 | class="btn btn-xs p-1 float-right" |
110 | ng-class="{ | 109 | ng-class="{ |
111 | 'btn-secondary': selectedNotaPedido != key, | 110 | 'btn-secondary': selectedNotaPedido != key, |
112 | 'btn-primary': selectedNotaPedido == key | 111 | 'btn-primary': selectedNotaPedido == key |
113 | }" | 112 | }" |
114 | foca-focus="selectedNotaPedido == {{key}}" | 113 | foca-focus="selectedNotaPedido == {{key}}" |
115 | ng-keydown="itemNotaPedido($event.keyCode)" | 114 | ng-keydown="itemNotaPedido($event.keyCode)" |
116 | > | 115 | > |
117 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 116 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
118 | </button> | 117 | </button> |
119 | </td> | 118 | </td> |
120 | </tr> | 119 | </tr> |
121 | </tbody> | 120 | </tbody> |
122 | </table> | 121 | </table> |
123 | </div> | 122 | </div> |
124 | <div class="modal-footer py-1"> | 123 | <div class="modal-footer py-1"> |
125 | <nav ng-show="currentPageNotasPedido.length > 0 && primerBusqueda" class="mr-auto"> | 124 | <nav ng-show="currentPageNotasPedido.length > 0 && primerBusqueda" class="mr-auto"> |
126 | <ul class="pagination pagination-sm justify-content mb-0"> | 125 | <ul class="pagination pagination-sm justify-content mb-0"> |
127 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 126 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
128 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 127 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
129 | <span aria-hidden="true">«</span> | 128 | <span aria-hidden="true">«</span> |
130 | <span class="sr-only">Anterior</span> | 129 | <span class="sr-only">Anterior</span> |
131 | </a> | 130 | </a> |
132 | </li> | 131 | </li> |
133 | <li | 132 | <li |
134 | class="page-item" | 133 | class="page-item" |
135 | ng-repeat="pagina in paginas" | 134 | ng-repeat="pagina in paginas" |
136 | ng-class="{'active': pagina == currentPage}" | 135 | ng-class="{'active': pagina == currentPage}" |
137 | > | 136 | > |
138 | <a | 137 | <a |
139 | class="page-link" | 138 | class="page-link" |
140 | href="javascript:void();" | 139 | href="javascript:void();" |
141 | ng-click="selectPage(pagina)" | 140 | ng-click="selectPage(pagina)" |
142 | ng-bind="pagina" | 141 | ng-bind="pagina" |
143 | ></a> | 142 | ></a> |
144 | </li> | 143 | </li> |
145 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 144 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
146 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 145 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
147 | <span aria-hidden="true">»</span> | 146 | <span aria-hidden="true">»</span> |
148 | <span class="sr-only">Siguiente</span> | 147 | <span class="sr-only">Siguiente</span> |
149 | </a> | 148 | </a> |
150 | </li> | 149 | </li> |
151 | </ul> | 150 | </ul> |
152 | </nav> | 151 | </nav> |
153 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 152 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> |
154 | </div> | 153 | </div> |
155 | 154 |