Commit 89cd22a02aedf8c0d684b9a0a62534e0f208f1a5
1 parent
a51ecc88e7
Exists in
master
and in
2 other branches
- Agregué lógica de seguimiento.
Showing
1 changed file
with
11 additions
and
4 deletions
Show diff stats
src/js/controller.js
1 | 1 | angular.module('focaHojaRuta') |
2 | 2 | .controller('listaHojaRutaCtrl', |
3 | 3 | [ |
4 | - '$scope', '$filter', '$uibModal', 'hojaRutaService', | |
5 | - function($scope, $filter, $uibModal, hojaRutaService) { | |
4 | + '$scope', '$filter', '$uibModal', 'hojaRutaService', 'focaSeguimientoService', | |
5 | + function($scope, $filter, $uibModal, hojaRutaService, focaSeguimientoService) { | |
6 | 6 | hojaRutaService.getHojasRuta().then(function(res) { |
7 | 7 | $scope.hojasRuta = res.data; |
8 | 8 | $scope.puntoVenta = rellenar(res.data[0].sucursal, 4); |
... | ... | @@ -36,8 +36,15 @@ angular.module('focaHojaRuta') |
36 | 36 | size: 'lg' |
37 | 37 | } |
38 | 38 | ); |
39 | - modalInstance.result.then(function() { | |
40 | - | |
39 | + modalInstance.result.then(function(parametros) { | |
40 | + // Al guardar los datos del producto entregado logueamos la | |
41 | + // actividad para su seguimiento. | |
42 | + focaSeguimientoService.guardarPosicion( | |
43 | + 'Entrega de producto', | |
44 | + 'Remito: ' + $scope.puntoVenta + '-' + $scope.comprobante + '<br/>' + | |
45 | + 'Producto: ' + parametros.producto + '<br/>' + | |
46 | + 'Litros: ' + parametros.litros | |
47 | + ); | |
41 | 48 | }); |
42 | 49 | }; |
43 | 50 |