Commit a51ecc88e7c6e278b043d1e30ceb5ad5011da7bc

Authored by Pablo Marco del Pont
Exists in master and in 2 other branches develop, lab

Merge branch 'master' into 'master'

Master

See merge request modulos-npm/foca-hoja-ruta!5
src/js/controller.js
... ... @@ -5,6 +5,8 @@ angular.module('focaHojaRuta')
5 5 function($scope, $filter, $uibModal, hojaRutaService) {
6 6 hojaRutaService.getHojasRuta().then(function(res) {
7 7 $scope.hojasRuta = res.data;
  8 + $scope.puntoVenta = rellenar(res.data[0].sucursal, 4);
  9 + $scope.comprobante = rellenar(res.data[0].numeroHojaRuta, 8);
8 10 });
9 11 $scope.cabecera = [];
10 12 $scope.showCabecera = true;
... ... @@ -14,8 +16,7 @@ angular.module('focaHojaRuta')
14 16 $scope.now = new Date();
15 17 $scope.puntoVenta = '0000';
16 18 $scope.comprobante = '00000000';
17   -
18   - $scope.verDetalle = function(hojaRuta) {
  19 + $scope.verDetalle = function() {
19 20 var modalInstance = $uibModal.open(
20 21 {
21 22 ariaLabelledBy: 'Detalle hoja ruta',
... ... @@ -37,7 +38,7 @@ angular.module('focaHojaRuta')
37 38 );
38 39 modalInstance.result.then(function() {
39 40  
40   - })
  41 + });
41 42 };
42 43  
43 44 function addCabecera(label, valor) {
... ... @@ -48,13 +49,13 @@ angular.module('focaHojaRuta')
48 49 $scope.cabecera.push({label: label, valor: valor});
49 50 }
50 51 }
51   -
52   - function removeCabecera(label) {
53   - var propiedad = $filter('filter')($scope.cabecera, {label: label}, true);
54   - if(propiedad.length === 1) {
55   - $scope.cabecera.splice($scope.cabecera.indexOf(propiedad[0]), 1);
56   - }
57   - }
  52 + //TODO Descomentar cuando se use
  53 + // function removeCabecera(label) {
  54 + // var propiedad = $filter('filter')($scope.cabecera, {label: label}, true);
  55 + // if(propiedad.length === 1) {
  56 + // $scope.cabecera.splice($scope.cabecera.indexOf(propiedad[0]), 1);
  57 + // }
  58 + // }
58 59  
59 60 function rellenar(relleno, longitud) {
60 61 relleno = '' + relleno;
src/views/lista-hoja-ruta.html
... ... @@ -82,8 +82,11 @@
82 82 <thead>
83 83 <tr class="d-flex">
84 84 <th>#</th>
85   - <th>Sucursal</th>
86   - <th>#HojaRuta</th>
  85 + <th>Fecha creacion</th>
  86 + <th>sucursal</th>
  87 + <th>idTransportista</th>
  88 + <th>idChofer</th>
  89 + <th>idVehiculo</th>
87 90 <th></th>
88 91 </tr>
89 92 </thead>
... ... @@ -93,7 +96,11 @@
93 96 >
94 97 <td ng-bind="key + 1"></td>
95 98 <td ng-bind="hojaRuta.sucursal"></td>
96   - <td ng-bind="hojaRuta.numeroHojaRuta"></td>
  99 + <td ng-bind="hojaRuta.fechaCreacion"></td>
  100 + <td ng-bind="hojaRuta.sucursal"></td>
  101 + <td ng-bind="hojaRuta.transportista[0].nombre"></td>
  102 + <td ng-bind="hojaRuta.chofer[0].nombre"></td>
  103 + <td ng-bind="hojaRuta.vehiculo[0].tractor"></td>
97 104 <td>
98 105 <button
99 106 class="btn btn-secondary"