Commit 65bab730951544677ba0f49beb342344b257b9b4

Authored by Eric Fernandez
1 parent e4296f6a85
Exists in master

selecciono fecha de reparto

Showing 1 changed file with 11 additions and 4 deletions   Show diff stats
src/js/controller.js
... ... @@ -34,9 +34,10 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo
34 34 focaBotoneraLateralService.showPausar(false);
35 35 focaBotoneraLateralService.showGuardar(false);
36 36  
37   - focaLogisticaPedidoRutaService.getVehiculosByIdUsuario().then(function(res) {
38   - $scope.vehiculos = res.data;
39   - });
  37 + // TODO: obtener vehiculos con remitos cargados para esa fecha que no han sido confirmados
  38 + // focaLogisticaPedidoRutaService.getVehiculosByIdUsuario().then(function(res) {
  39 + // $scope.vehiculos = res.data;
  40 + // });
40 41  
41 42 $scope.general = function() {
42 43 $scope.idVendedor = 0;
... ... @@ -49,6 +50,10 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo
49 50 };
50 51  
51 52 $scope.cargar = function(idVehiculo, punto) {
  53 + if(!$scope.fechaReparto) {
  54 + focaModalService.alert('elija primero una fecha de reparto');
  55 + return;
  56 + }
52 57 var idRemito;
53 58 if(punto === -1) {
54 59 idRemito = -1;
... ... @@ -63,7 +68,8 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo
63 68 size: 'lg',
64 69 resolve: {
65 70 idVehiculo: function() {return idVehiculo;},
66   - idRemito: function() {return idRemito;}
  71 + idRemito: function() {return idRemito;},
  72 + fechaReparto: function() {return $scope.fechaReparto;}
67 73 }
68 74 }
69 75 );
... ... @@ -177,6 +183,7 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo
177 183 label: 'Fecha:',
178 184 valor: fecha.toLocaleDateString()
179 185 });
  186 + $scope.fechaReparto = fecha;
180 187 });
181 188 };
182 189