Commit 745eefa2a65b15644255099a2260c927b1309fd0

Authored by Eric Fernandez
Exists in master and in 2 other branches develop, lab

Merge branch 'develop' into 'master'

Develop

See merge request !11
... ... @@ -33,13 +33,13 @@
33 33 "gulp-uglify": "^3.0.1",
34 34 "jquery": "^3.3.1",
35 35 "pump": "^3.0.0",
36   - "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas"
  36 + "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git"
37 37 },
38 38 "devDependencies": {
39 39 "angular": "^1.7.5",
40 40 "angular-ladda": "^0.4.3",
41 41 "bootstrap": "^4.1.3",
42   - "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas",
  42 + "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git",
43 43 "font-awesome": "^4.7.0",
44 44 "gulp": "^3.9.1",
45 45 "gulp-angular-templatecache": "^2.2.5",
src/js/controller.js
... ... @@ -16,6 +16,8 @@ angular.module('focaModalRemito')
16 16 $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1));
17 17 $scope.filters = '';
18 18 $scope.remitos = [];
  19 + $scope.isCollapsed = false;
  20 + $scope.verProductos = {};
19 21 $scope.primerBusqueda = false;
20 22 $scope.searchLoading = false;
21 23 // pagination
... ... @@ -24,7 +26,7 @@ angular.module('focaModalRemito')
24 26 $scope.filteredRemitos = [];
25 27 $scope.currentPageRemitos = [];
26 28 $scope.selectedRemito = -1;
27   -
  29 +
28 30 //METODOS
29 31 $scope.busquedaPress = function(key) {
30 32 if (key === 13) {
src/views/foca-modal-remito.html
... ... @@ -18,6 +18,14 @@
18 18 id="search"
19 19 teclado-virtual
20 20 >
  21 + <button
  22 + ng-show="filters.length >= 1"
  23 + type="button"
  24 + class="clear-input"
  25 + ng-click="filters = ''"
  26 + >
  27 + <i class="fa fa-times"></i>
  28 + </button>
21 29 <div class="input-group-append">
22 30 <button
23 31 ladda="searchLoading"
... ... @@ -36,11 +44,15 @@
36 44 <div class="modal-body" id="modal-body">
37 45 <div class="input-group row">
38 46 <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">
  47 + <div class="col-md-4 col-8 input-group mb-3">
40 48 <div class="input-group-prepend">
41   - <div class="input-group-text form-control-sm">
  49 + <button
  50 + class="input-group-text"
  51 + type="button"
  52 + ng-click="datepickerOpen = true"
  53 + >
42 54 <i class="fa fa-calendar"></i>
43   - </div>
  55 + </button>
44 56 </div>
45 57 <input
46 58 class="form-control form-control-sm"
... ... @@ -57,11 +69,15 @@
57 69 />
58 70 </div>
59 71 <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small>
60   - <div class="col-md-4 col-8 input-group mb-2">
  72 + <div class="col-md-4 col-8 input-group mb-3">
61 73 <div class="input-group-prepend">
62   - <div class="input-group-text form-control-sm">
  74 + <button
  75 + class="input-group-text"
  76 + type="button"
  77 + ng-click="datepicker2Open = true"
  78 + >
63 79 <i class="fa fa-calendar"></i>
64   - </div>
  80 + </button>
65 81 </div>
66 82 <input
67 83 class="form-control form-control-sm"
... ... @@ -78,7 +94,7 @@
78 94 />
79 95 </div>
80 96 </div>
81   - <table ng-show="primerBusqueda" class="table table-striped table-sm">
  97 + <table ng-show="primerBusqueda" class="table table-hover table-sm">
82 98 <thead>
83 99 <tr>
84 100 <th>Fecha</th>
... ... @@ -86,6 +102,7 @@
86 102 <th>Comprobante</th>
87 103 <th>Importe</th>
88 104 <th></th>
  105 + <th></th>
89 106 </tr>
90 107 </thead>
91 108 <tbody>
... ... @@ -95,8 +112,8 @@
95 112 </td>
96 113 </tr>
97 114 <tr class="selectable"
98   - ng-repeat="(key, remito) in currentPageRemitos"
99   - ng-click="select(remito)">
  115 + ng-repeat-start="(key, remito) in currentPageRemitos"
  116 + >
100 117 <td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td>
101 118 <td ng-bind="remito.nombreCliente"></td>
102 119 <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td>
... ... @@ -104,6 +121,14 @@
104 121 <td>
105 122 <button
106 123 type="button"
  124 + class="btn btn-secondary btn-xs p-1"
  125 + ng-click="isCollapsed = !isCollapsed ; verProductos = remito.articulosRemito"
  126 + ><i class="fa fa-eye"></i>
  127 + </button>
  128 + </td>
  129 + <td>
  130 + <button ng-click="select(remito);"
  131 + type="button"
107 132 class="btn btn-xs p-1 float-right"
108 133 ng-class="{
109 134 'btn-secondary': selectedRemito != key,
... ... @@ -116,6 +141,26 @@
116 141 </button>
117 142 </td>
118 143 </tr>
  144 + <tr ng-repeat-end uib-collapse="!isCollapsed">
  145 + <td colspan="6">
  146 + <table class="table table-sm">
  147 + <thead>
  148 + <tr>
  149 + <th>Código</th>
  150 + <th>Descripción</th>
  151 + <th>Cantidad</th>
  152 + </tr>
  153 + </thead>
  154 + <tbody>
  155 + <tr ng-repeat="(key, articulo) in verProductos">
  156 + <td>{{articulo.codigo}}</td>
  157 + <td>{{articulo.descripcion}}</td>
  158 + <td>{{articulo.cantidad}}</td>
  159 + </tr>
  160 + </tbody>
  161 + </table>
  162 + </td>
  163 + </tr>
119 164 </tbody>
120 165 </table>
121 166 </div>