Commit d16b59bd1c40bf070a9db8b758e8633cc024eb7f
1 parent
4f637ed66e
Exists in
master
and in
1 other branch
guarda boolean 'visita'
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
src/js/service.js
... | ... | @@ -3,7 +3,8 @@ angular.module('focaSeguimiento') |
3 | 3 | '$http', 'API_ENDPOINT', 'cordovaGeolocationService', |
4 | 4 | function($http, API_ENDPOINT, cordovaGeolocationService) { |
5 | 5 | return { |
6 | - guardarPosicion: function(actividad, idComprobante, observaciones) { | |
6 | + guardarPosicion: function(actividad, idComprobante, observaciones, visita) { | |
7 | + visita = (visita) ? true : false; | |
7 | 8 | cordovaGeolocationService.getCurrentPosition(function(posicion) { |
8 | 9 | var nuevaPosicion = { |
9 | 10 | posicion: { |
... | ... | @@ -11,7 +12,8 @@ angular.module('focaSeguimiento') |
11 | 12 | longitud: posicion.coords.longitude, |
12 | 13 | idComprobante: idComprobante, |
13 | 14 | actividad: actividad, |
14 | - observaciones: observaciones | |
15 | + observaciones: observaciones, | |
16 | + visita: visita | |
15 | 17 | } |
16 | 18 | }; |
17 | 19 | |
... | ... | @@ -19,7 +21,7 @@ angular.module('focaSeguimiento') |
19 | 21 | return $http.post(API_ENDPOINT.URL + '/seguimiento', nuevaPosicion); |
20 | 22 | }); |
21 | 23 | }, |
22 | - obtenerPosicion: function(callback) { | |
24 | + obtenerPosicion: function(callback) { | |
23 | 25 | cordovaGeolocationService.getCurrentPosition(callback); |
24 | 26 | } |
25 | 27 | }; |