Commit 751e6eec4ab571bda0c6f5ef1505eb7c04978c93

Authored by Luigi
1 parent df412d96bc
Exists in master

limpio cabecera

Showing 1 changed file with 7 additions and 6 deletions   Show diff stats
src/js/controller.js
... ... @@ -120,7 +120,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
120 120 });
121 121  
122 122 if (isBotoneraDirty) {
123   - init();
  123 + $scope.$broadcast('cleanCabecera');
124 124 focaModalService.confirm('Se perderan los cambios')
125 125 .then(function () {
126 126 limpiarBotonera($scope.botonera);
... ... @@ -132,7 +132,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
132 132  
133 133 });
134 134 } else {
135   - init();
  135 + $scope.$broadcast('cleanCabecera');
136 136 limpiarBotonera($scope.botoneraPrincipal);
137 137 $filter('filter')($scope.botoneraPrincipal, {
138 138 label: 'Remito Abierto',
... ... @@ -152,7 +152,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
152 152 });
153 153  
154 154 if (isBotoneraDirty) {
155   - init();
  155 + $scope.$broadcast('cleanCabecera');
156 156 focaModalService.confirm('Se perderan los cambios')
157 157 .then(function () {
158 158 limpiarBotonera($scope.botonera);
... ... @@ -164,7 +164,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
164 164 $scope.botonera = focaCrearHojaRutaService.getBotonFecha();
165 165 });
166 166 } else {
167   - init();
  167 + $scope.$broadcast('cleanCabecera');
168 168 limpiarBotonera($scope.botoneraPrincipal);
169 169 $filter('filter')($scope.botoneraPrincipal, {
170 170 label: 'Cargar Remitos',
... ... @@ -181,9 +181,9 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
181 181 });
182 182  
183 183 if (isBotoneraDirty) {
184   - init();
185 184 focaModalService.confirm('Se perderan los cambios')
186 185 .then(function () {
  186 + $scope.$broadcast('cleanCabecera');
187 187 limpiarBotonera($scope.botonera);
188 188 limpiarBotonera($scope.botoneraPrincipal);
189 189 $filter('filter')($scope.botoneraPrincipal, {
... ... @@ -192,7 +192,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
192 192 $scope.botonera = focaCrearHojaRutaService.getBotonFecha();
193 193 });
194 194 } else {
195   - init();
  195 + $scope.$broadcast('cleanCabecera');
196 196 limpiarBotonera($scope.botoneraPrincipal);
197 197 $filter('filter')($scope.botoneraPrincipal, {
198 198 label: 'Precargado',
... ... @@ -284,6 +284,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl',
284 284 //guardar nuevo objeto (?)
285 285 var date = new Date();
286 286 if ($scope.hojaRuta !== null) {
  287 + console.log('DATOS---: ', $scope.hojaRuta);
287 288 focaBotoneraLateralService.startGuardar();
288 289 var save = {
289 290 remito: {