Commit 51a5b485650c9ddec25c007c73563bb48de2a877
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master(efernandez) See merge request !1
Showing
2 changed files
Show diff stats
package.json
1 | { | 1 | { |
2 | "name": "foca-seguimiento", | 2 | "name": "foca-seguimiento", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "Seguimiento", | 4 | "description": "Seguimiento", |
5 | "main": "dist/foca-seguimiento.js", | 5 | "main": "dist/foca-seguimiento.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "test": "echo \"Error: no test specified\" && exit 1", | 7 | "test": "echo \"Error: no test specified\" && exit 1", |
8 | "compile": "gulp compile", | 8 | "compile": "gulp compile", |
9 | "gulp-pre-commit": "gulp pre-commit", | 9 | "gulp-pre-commit": "gulp pre-commit", |
10 | "postinstall": "npm run compile && gulp clean-post-install", | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
11 | "install-dev": "npm install -D gulp gulp-connect jasmine-core pre-commit angular angular-route angular-cookies bootstrap font-awesome gulp-angular-templatecache gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-replace jquery jshint pump && npm i -D git+https://debo.suite.repo/modulos-npm/foca-directivas" | 11 | "install-dev": "npm install -D gulp gulp-uglify gulp-connect jasmine-core pre-commit angular angular-route angular-cookies bootstrap font-awesome gulp-angular-templatecache gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-replace jquery jshint pump && npm i -D git+http://git.focasoftware.com/npm/foca-directivas.git" |
12 | }, | 12 | }, |
13 | "pre-commit": [ | 13 | "pre-commit": [ |
14 | "gulp-pre-commit" | 14 | "gulp-pre-commit" |
15 | ], | 15 | ], |
16 | "repository": { | 16 | "repository": { |
17 | "type": "git", | 17 | "type": "git", |
18 | "url": "https://debo.suite.repo/modulos-npm/foca-seguimiento.git" | 18 | "url": "http://git.focasoftware.com/npm/foca-seguimiento.git" |
19 | }, | 19 | }, |
20 | "author": "Foca Software", | 20 | "author": "Foca Software", |
21 | "license": "ISC", | 21 | "license": "ISC", |
22 | "peerDependencies": { | 22 | "peerDependencies": { |
23 | "angular": "^1.7.x", | 23 | "angular": "^1.7.x", |
24 | "bootstrap": "^4.1.x", | 24 | "bootstrap": "^4.1.x", |
25 | "jquery": "^3.3.x", | 25 | "jquery": "^3.3.x", |
26 | "font-awesome": "^4.7.x", | 26 | "font-awesome": "^4.7.x", |
27 | "gulp": "^3.9.x", | 27 | "gulp": "^3.9.x", |
28 | "gulp-concat": "2.6.x", | 28 | "gulp-concat": "2.6.x", |
29 | "gulp-jshint": "^2.1.x", | 29 | "gulp-jshint": "^2.1.x", |
30 | "gulp-rename": "^1.4.x", | 30 | "gulp-rename": "^1.4.x", |
31 | "gulp-replace": "^1.0.x", | 31 | "gulp-replace": "^1.0.x", |
32 | "gulp-uglify-es": "^1.0.x", | 32 | "gulp-uglify-es": "^1.0.x", |
33 | "jshint": "^2.9.x", | 33 | "jshint": "^2.9.x", |
34 | "pump": "^3.0.x", | 34 | "pump": "^3.0.x", |
35 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas" | 35 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git" |
36 | }, | 36 | }, |
37 | "devDependencies": { | 37 | "devDependencies": { |
38 | "angular": "^1.7.5", | 38 | "angular": "^1.7.5", |
39 | "angular-cookies": "^1.7.5", | 39 | "angular-cookies": "^1.7.5", |
40 | "angular-route": "^1.7.5", | 40 | "angular-route": "^1.7.5", |
41 | "bootstrap": "^4.1.3", | 41 | "bootstrap": "^4.1.3", |
42 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas", | 42 | "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", |
43 | "font-awesome": "^4.7.0", | 43 | "font-awesome": "^4.7.0", |
44 | "gulp": "^3.9.1", | 44 | "gulp": "^3.9.1", |
45 | "gulp-angular-templatecache": "2.2.3", | 45 | "gulp-angular-templatecache": "^2.2.5", |
46 | "gulp-clean": "^0.4.0", | 46 | "gulp-clean": "^0.4.0", |
47 | "gulp-connect": "^5.6.1", | 47 | "gulp-connect": "^5.7.0", |
48 | "gulp-htmlmin": "5.0.1", | 48 | "gulp-htmlmin": "^5.0.1", |
49 | "gulp-jshint": "2.1.0", | 49 | "gulp-jshint": "^2.1.0", |
50 | "gulp-rename": "1.4.0", | 50 | "gulp-rename": "^1.4.0", |
51 | "gulp-replace": "1.0.0", | 51 | "gulp-replace": "^1.0.0", |
52 | "gulp-sequence": "^1.0.0", | 52 | "gulp-sequence": "^1.0.0", |
53 | "gulp-uglify-es": "1.0.4", | 53 | "gulp-uglify-es": "^1.0.4", |
54 | "jasmine-core": "^3.2.1", | 54 | "jasmine-core": "^3.3.0", |
55 | "jquery": "^3.3.1", | 55 | "jquery": "^3.3.1", |
56 | "jshint": "2.9.6", | 56 | "jshint": "^2.9.7", |
57 | "pre-commit": "^1.2.2", | 57 | "pre-commit": "^1.2.2", |
58 | "pump": "3.0.0" | 58 | "pump": "^3.0.0" |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 |
src/js/service.js
1 | angular.module('focaSeguimiento') | 1 | angular.module('focaSeguimiento') |
2 | .service('focaSeguimientoService', [ | 2 | .service('focaSeguimientoService', [ |
3 | '$http', 'API_ENDPOINT', 'cordovaGeolocationService', | 3 | '$http', 'API_ENDPOINT', 'cordovaGeolocationService', |
4 | function($http, API_ENDPOINT, cordovaGeolocationService) { | 4 | function($http, API_ENDPOINT, cordovaGeolocationService) { |
5 | return { | 5 | return { |
6 | guardarPosicion: function(idUsuario, actividad, observaciones) { | 6 | guardarPosicion: function(idUsuario, actividad, observaciones, sucursal) { |
7 | cordovaGeolocationService.getCurrentPosition(function(posicion) { | 7 | cordovaGeolocationService.getCurrentPosition(function(posicion) { |
8 | var nuevaPosicion = { | 8 | var nuevaPosicion = { |
9 | posicion: { | 9 | posicion: { |
10 | latitud: posicion.coords.latitude, | 10 | latitud: posicion.coords.latitude, |
11 | longitud: posicion.coords.longitude, | 11 | longitud: posicion.coords.longitude, |
12 | idUsuario: idUsuario, | 12 | idUsuario: idUsuario, |
13 | sucursal: sucursal, | ||
13 | actividad: actividad, | 14 | actividad: actividad, |
14 | observaciones: observaciones | 15 | observaciones: observaciones |
15 | } | 16 | } |
16 | }; | 17 | }; |
17 | return $http.post(API_ENDPOINT.URL + '/seguimiento', nuevaPosicion); | 18 | return $http.post(API_ENDPOINT.URL + '/seguimiento', nuevaPosicion); |
18 | }); | 19 | }); |
19 | } | 20 | } |
20 | }; | 21 | }; |
21 | } | 22 | } |
22 | ]); | 23 | ]); |
23 | 24 |