Commit fdddf81d8fe2b6ed9e173d8910b2402c90637c27
Exists in
master
Merge branch 'master' into 'develop'
Arreglo en buscador en informe productividad See merge request !9
Showing
7 changed files
Show diff stats
src/js/controller-productividad.js
| ... | ... | @@ -20,7 +20,10 @@ angular.module('focaModalInforme') |
| 20 | 20 | fechaDesde: new Date(fecha.setMonth(fecha.getMonth() - 1)), |
| 21 | 21 | sector: undefined, |
| 22 | 22 | diferenciarProductos: false, |
| 23 | - diferenciarMeses: false | |
| 23 | + diferenciarMeses: false, | |
| 24 | + entidad:{ | |
| 25 | + label: '' | |
| 26 | + } | |
| 24 | 27 | }; |
| 25 | 28 | $scope.gridOptions = { |
| 26 | 29 | enableGridMenu: true, |
| ... | ... | @@ -82,39 +85,42 @@ angular.module('focaModalInforme') |
| 82 | 85 | ] |
| 83 | 86 | }; |
| 84 | 87 | $scope.seleccionarTipo = function() { |
| 85 | - var data = [ | |
| 86 | - { | |
| 87 | - id: 0, | |
| 88 | - label: 'Todos' | |
| 89 | - }, | |
| 90 | - { | |
| 91 | - id: 1, | |
| 92 | - label: 'Vendedores' | |
| 93 | - }, | |
| 94 | - { | |
| 95 | - id: 2, | |
| 96 | - label: 'Cobradores' | |
| 97 | - }, | |
| 98 | - { | |
| 99 | - id: 3, | |
| 100 | - label: 'Transportistas' | |
| 101 | - } | |
| 102 | - ]; | |
| 103 | - focaModalService.modal({ | |
| 104 | - titulo: 'Seleccionar entidad', | |
| 105 | - data: data, | |
| 88 | + var parametrosModal = { | |
| 89 | + searchText: $scope.params.entidad.label, | |
| 106 | 90 | columnas: [ |
| 107 | 91 | { |
| 108 | 92 | propiedad: 'label', |
| 109 | 93 | nombre: 'Entidad' |
| 110 | 94 | } |
| 111 | 95 | ], |
| 112 | - }).then(function(res) { | |
| 96 | + titulo: 'Seleccionar entidad', | |
| 97 | + size: 'md', | |
| 98 | + data: [ | |
| 99 | + { | |
| 100 | + id: 0, | |
| 101 | + label: 'Todos' | |
| 102 | + }, | |
| 103 | + { | |
| 104 | + id: 1, | |
| 105 | + label: 'Vendedores' | |
| 106 | + }, | |
| 107 | + { | |
| 108 | + id: 2, | |
| 109 | + label: 'Cobradores' | |
| 110 | + }, | |
| 111 | + { | |
| 112 | + id: 3, | |
| 113 | + label: 'Transportistas' | |
| 114 | + } | |
| 115 | + ] | |
| 116 | + }; | |
| 117 | + | |
| 118 | + focaModalService.modal(parametrosModal).then(function(res) { | |
| 113 | 119 | $scope.params.entidad = res; |
| 114 | 120 | }); |
| 115 | 121 | }; |
| 116 | 122 | $scope.generarInforme = function() { |
| 117 | - if (!$scope.params.entidad) { | |
| 123 | + if ($scope.params.entidad.id === undefined) { | |
| 118 | 124 | focaModalService.alert('Seleccione una entidad'); |
| 119 | 125 | return; |
| 120 | 126 | } |
| ... | ... | @@ -201,7 +207,8 @@ angular.module('focaModalInforme') |
| 201 | 207 | $uibModalInstance.dismiss('Cancelar'); |
| 202 | 208 | }; |
| 203 | 209 | $scope.clearEntidad = function() { |
| 204 | - $scope.params.entidad = undefined; | |
| 210 | + $scope.params.entidad.label = ''; | |
| 211 | + $scope.params.entidad.id = undefined; | |
| 205 | 212 | }; |
| 206 | 213 | } |
| 207 | 214 | ] |
src/views/informe-chofer.html
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <div class="input-group row" |
| 12 | 12 | ng-show="buscar"> |
| 13 | 13 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
| 14 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 14 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 15 | 15 | <div class="input-group-prepend"> |
| 16 | 16 | <div class="input-group-text"> |
| 17 | 17 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | /> |
| 33 | 33 | </div> |
| 34 | 34 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
| 35 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 35 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 36 | 36 | <div class="input-group-prepend"> |
| 37 | 37 | <div class="input-group-text"> |
| 38 | 38 | <i class="fa fa-calendar"></i> |
src/views/informe-general-unidad.html
| ... | ... | @@ -15,11 +15,15 @@ |
| 15 | 15 | <div class="input-group row" |
| 16 | 16 | ng-show="buscar"> |
| 17 | 17 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
| 18 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 18 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 19 | 19 | <div class="input-group-prepend"> |
| 20 | - <div class="input-group-text"> | |
| 20 | + <button | |
| 21 | + class="input-group-text" | |
| 22 | + type="button" | |
| 23 | + ng-click="datepickerOpen = true" | |
| 24 | + > | |
| 21 | 25 | <i class="fa fa-calendar"></i> |
| 22 | - </div> | |
| 26 | + </button> | |
| 23 | 27 | </div> |
| 24 | 28 | <input |
| 25 | 29 | class="form-control form-control-sm" |
| ... | ... | @@ -36,11 +40,15 @@ |
| 36 | 40 | /> |
| 37 | 41 | </div> |
| 38 | 42 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
| 39 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 43 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 40 | 44 | <div class="input-group-prepend"> |
| 41 | - <div class="input-group-text"> | |
| 45 | + <button | |
| 46 | + class="input-group-text" | |
| 47 | + type="button" | |
| 48 | + ng-click="datepicker2Open = true" | |
| 49 | + > | |
| 42 | 50 | <i class="fa fa-calendar"></i> |
| 43 | - </div> | |
| 51 | + </button> | |
| 44 | 52 | </div> |
| 45 | 53 | <input |
| 46 | 54 | class="form-control form-control-sm" |
| ... | ... | @@ -56,7 +64,7 @@ |
| 56 | 64 | /> |
| 57 | 65 | </div> |
| 58 | 66 | <small class="col-md-2 col-4 text-left my-1">Sector</small> |
| 59 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 67 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 60 | 68 | <input |
| 61 | 69 | class="form-control form-control-sm" |
| 62 | 70 | id="inlineFormInputGroup" |
| ... | ... | @@ -65,9 +73,14 @@ |
| 65 | 73 | ng-required="true" |
| 66 | 74 | ng-keypress="seleccionarSector($event.keyCode)" |
| 67 | 75 | /> |
| 68 | - <button type="button" class="clear-input text-danger" ng-click="clearSector()"> | |
| 69 | - <i class="fa fa-times"></i> | |
| 70 | - </button> | |
| 76 | + <button | |
| 77 | + ng-show="params.sector.NOMBRE.length >= 1" | |
| 78 | + type="button" | |
| 79 | + class="clear-input" | |
| 80 | + ng-click="clearSector()" | |
| 81 | + > | |
| 82 | + <i class="fa fa-times"></i> | |
| 83 | + </button> | |
| 71 | 84 | <div class="input-group-append"> |
| 72 | 85 | <div class="input-group-append" ng-hide="ingreso"> |
| 73 | 86 | <button |
src/views/informe-hoja-ruta.html
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | <div class="input-group row" |
| 13 | 13 | ng-show="buscar"> |
| 14 | 14 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
| 15 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 15 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 16 | 16 | <div class="input-group-prepend"> |
| 17 | 17 | <div class="input-group-text"> |
| 18 | 18 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | /> |
| 35 | 35 | </div> |
| 36 | 36 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
| 37 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 37 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 38 | 38 | <div class="input-group-prepend"> |
| 39 | 39 | <div class="input-group-text"> |
| 40 | 40 | <i class="fa fa-calendar"></i> |
src/views/informe-litros-km-unidad.html
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <div class="input-group row" |
| 14 | 14 | ng-show="buscar"> |
| 15 | 15 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
| 16 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 16 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 17 | 17 | <div class="input-group-prepend"> |
| 18 | 18 | <div class="input-group-text"> |
| 19 | 19 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | /> |
| 35 | 35 | </div> |
| 36 | 36 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
| 37 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 37 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 38 | 38 | <div class="input-group-prepend"> |
| 39 | 39 | <div class="input-group-text"> |
| 40 | 40 | <i class="fa fa-calendar"></i> |
src/views/informe-productividad.html
| ... | ... | @@ -15,7 +15,7 @@ |
| 15 | 15 | <div class="input-group row" |
| 16 | 16 | ng-show="buscar"> |
| 17 | 17 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
| 18 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 18 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 19 | 19 | <div class="input-group-prepend"> |
| 20 | 20 | <div class="input-group-text"> |
| 21 | 21 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | /> |
| 37 | 37 | </div> |
| 38 | 38 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
| 39 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 39 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 40 | 40 | <div class="input-group-prepend"> |
| 41 | 41 | <div class="input-group-text"> |
| 42 | 42 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -56,9 +56,14 @@ |
| 56 | 56 | /> |
| 57 | 57 | </div> |
| 58 | 58 | <small class="col-md-2 col-4 text-left my-1">Entidad</small> |
| 59 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 60 | - <input type="text" class="form-control" ng-model="params.entidad.label" readonly> | |
| 61 | - <button type="button" class="clear-input text-danger" ng-click="clearEntidad()"> | |
| 59 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 60 | + <input type="text" class="form-control form-control-sm" ng-model="params.entidad.label"> | |
| 61 | + <button | |
| 62 | + ng-show="params.entidad.label.length >= 1" | |
| 63 | + type="button" | |
| 64 | + class="clear-input" | |
| 65 | + ng-click="clearEntidad()" | |
| 66 | + > | |
| 62 | 67 | <i class="fa fa-times"></i> |
| 63 | 68 | </button> |
| 64 | 69 | <div class="input-group-append"> |
src/views/informe-reparto-optimo.html
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <div class="input-group row" |
| 14 | 14 | ng-show="buscar"> |
| 15 | 15 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
| 16 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 16 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 17 | 17 | <div class="input-group-prepend"> |
| 18 | 18 | <div class="input-group-text"> |
| 19 | 19 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | /> |
| 35 | 35 | </div> |
| 36 | 36 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
| 37 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 37 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 38 | 38 | <div class="input-group-prepend"> |
| 39 | 39 | <div class="input-group-text"> |
| 40 | 40 | <i class="fa fa-calendar"></i> |
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | /> |
| 55 | 55 | </div> |
| 56 | 56 | <small class="col-md-2 col-4 text-left my-1">Sector</small> |
| 57 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 57 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 58 | 58 | <input |
| 59 | 59 | class="form-control form-control-sm" |
| 60 | 60 | id="inlineFormInputGroup" |
| ... | ... | @@ -63,7 +63,12 @@ |
| 63 | 63 | ng-required="true" |
| 64 | 64 | ng-keypress="seleccionarSector($event.keyCode)" |
| 65 | 65 | /> |
| 66 | - <button type="button" class="clear-input text-danger" ng-click="clearSector()"> | |
| 66 | + <button | |
| 67 | + ng-show="params.sector.NOMBRE.length >= 1" | |
| 68 | + type="button" | |
| 69 | + class="clear-input" | |
| 70 | + ng-click="clearSector()" | |
| 71 | + > | |
| 67 | 72 | <i class="fa fa-times"></i> |
| 68 | 73 | </button> |
| 69 | 74 | <div class="input-group-append"> |