Commit 94602696811d8b6a9ddc14571f2972ba28ce8b72
1 parent
0b4f70caac
Exists in
master
and in
1 other branch
Setear fecha del día en la cabecera
Showing
1 changed file
with
12 additions
and
3 deletions
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,15 @@ 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 | + }); | |
| 342 | + } | |
| 343 | + | |
| 335 | 344 | $scope.seleccionarDatosExtra = function() { |
| 336 | 345 | var datosHojaRuta = $scope.hojaRuta.datosExtra; |
| 337 | 346 | var modalInstance = $uibModal.open( |
| ... | ... | @@ -367,7 +376,7 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
| 367 | 376 | }); |
| 368 | 377 | }); |
| 369 | 378 | }; |
| 370 | - | |
| 379 | + | |
| 371 | 380 | $scope.verProductosRemito = function(idRemito) { |
| 372 | 381 | var parametrosModal = { |
| 373 | 382 | titulo: 'Articulos remito', |