From d16b59bd1c40bf070a9db8b758e8633cc024eb7f Mon Sep 17 00:00:00 2001 From: Jose Pinto Date: Thu, 21 Feb 2019 12:11:36 -0300 Subject: [PATCH] guarda boolean 'visita' --- src/js/service.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/service.js b/src/js/service.js index 191a9f3..e693836 100644 --- a/src/js/service.js +++ b/src/js/service.js @@ -3,7 +3,8 @@ angular.module('focaSeguimiento') '$http', 'API_ENDPOINT', 'cordovaGeolocationService', function($http, API_ENDPOINT, cordovaGeolocationService) { return { - guardarPosicion: function(actividad, idComprobante, observaciones) { + guardarPosicion: function(actividad, idComprobante, observaciones, visita) { + visita = (visita) ? true : false; cordovaGeolocationService.getCurrentPosition(function(posicion) { var nuevaPosicion = { posicion: { @@ -11,7 +12,8 @@ angular.module('focaSeguimiento') longitud: posicion.coords.longitude, idComprobante: idComprobante, actividad: actividad, - observaciones: observaciones + observaciones: observaciones, + visita: visita } }; @@ -19,7 +21,7 @@ angular.module('focaSeguimiento') return $http.post(API_ENDPOINT.URL + '/seguimiento', nuevaPosicion); }); }, - obtenerPosicion: function(callback) { + obtenerPosicion: function(callback) { cordovaGeolocationService.getCurrentPosition(callback); } }; -- 1.9.1