Commit 8ac771f8c967ccc8640ee21e8b33df3a7a30bda6
Exists in
master
and in
2 other branches
Merge branch 'develop' into 'master'
Develop See merge request !38
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -65,11 +65,11 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
65 | 65 | console.info(err); |
66 | 66 | } |
67 | 67 | ); |
68 | - | |
68 | + setearFecha(new Date()); | |
69 | 69 | $scope.inicial = angular.copy($scope.hojaRuta); |
70 | 70 | } |
71 | 71 | |
72 | - $scope.$watch('hojaRuta', function(newValue, oldValue) { | |
72 | + $scope.$watch('hojaRuta', function(newValue) { | |
73 | 73 | focaBotoneraLateralService.setPausarData({ |
74 | 74 | label: 'hojaRuta', |
75 | 75 | val: newValue |
... | ... | @@ -332,6 +332,16 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
332 | 332 | }); |
333 | 333 | }; |
334 | 334 | |
335 | + function setearFecha(fecha) { | |
336 | + $timeout(function() { | |
337 | + $scope.$broadcast('addCabecera', { | |
338 | + label: 'Fecha de entrega: ', | |
339 | + valor: fecha.toLocaleDateString() | |
340 | + }); | |
341 | + $scope.hojaRuta.fechaReparto = fecha; | |
342 | + }); | |
343 | + } | |
344 | + | |
335 | 345 | $scope.seleccionarDatosExtra = function() { |
336 | 346 | var datosHojaRuta = $scope.hojaRuta.datosExtra; |
337 | 347 | var modalInstance = $uibModal.open( |
... | ... | @@ -367,7 +377,7 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
367 | 377 | }); |
368 | 378 | }); |
369 | 379 | }; |
370 | - | |
380 | + | |
371 | 381 | $scope.verProductosRemito = function(idRemito) { |
372 | 382 | var parametrosModal = { |
373 | 383 | titulo: 'Articulos remito', |