Commit 901fea4ec24b5a2ef420a67543747f3911ae29e9
1 parent
be4dfba45b
Exists in
master
and in
1 other branch
Filtrar busqueda por codigo - Cruz para eliminar los datos ingresados
Showing
2 changed files
with
12 additions
and
1 deletions
Show diff stats
src/js/controller-litros-km-unidad.js
| ... | ... | @@ -18,6 +18,9 @@ angular.module('focaModalInforme') |
| 18 | 18 | $scope.fechaHasta = new Date(); |
| 19 | 19 | $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1)); |
| 20 | 20 | $scope.buscar = true; |
| 21 | + $scope.unidad = { | |
| 22 | + codigo: '' | |
| 23 | + }; | |
| 21 | 24 | $scope.informe = {}; |
| 22 | 25 | i18nService.setCurrentLang('es'); |
| 23 | 26 | $scope.gridOptions = { |
| ... | ... | @@ -142,7 +145,7 @@ angular.module('focaModalInforme') |
| 142 | 145 | }; |
| 143 | 146 | return focaModalService.modal(parametrosModal) |
| 144 | 147 | }; |
| 145 | - | |
| 148 | + | |
| 146 | 149 | $scope.seleccionarUnidad = function(key) { |
| 147 | 150 | if (key === 13) { |
| 148 | 151 | $scope.seleccionarTransportista().then( |
src/views/informe-litros-km-unidad.html
| ... | ... | @@ -71,6 +71,14 @@ |
| 71 | 71 | ng-required="true" |
| 72 | 72 | ng-keypress="seleccionarUnidad($event.keyCode)" |
| 73 | 73 | /> |
| 74 | + <button | |
| 75 | + ng-show="unidad.codigo.length >= 1" | |
| 76 | + type="button" | |
| 77 | + class="clear-input" | |
| 78 | + ng-click="unidad.codigo = ''" | |
| 79 | + > | |
| 80 | + <i class="fa fa-times"></i> | |
| 81 | + </button> | |
| 74 | 82 | <div class="input-group-append"> |
| 75 | 83 | <div class="input-group-append" ng-hide="ingreso"> |
| 76 | 84 | <button |