Commit 6f451202644485d7aaf2445f997706c73d83064a

Authored by Jose Pinto
Exists in master

Merge branch 'master' into 'master'

Master(efernandez)

See merge request !6
... ... @@ -8,43 +8,43 @@
8 8 "compile": "gulp uglify",
9 9 "gulp-pre-commit": "gulp pre-commit",
10 10 "postinstall": "npm run compile && gulp clean-post-install",
11   - "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+ssh://git@debonline.dyndns.org:npm/foca-directivas.git git+ssh://git@debonline.dyndns.org:npm/foca-modal-remito.git"
  11 + "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+http://git.focasoftware.com/npm/foca-directivas.git git+http://git.focasoftware.com/npm/foca-modal-remito.git"
12 12 },
13 13 "pre-commit": [
14 14 "gulp-pre-commit"
15 15 ],
16 16 "repository": {
17 17 "type": "git",
18   - "url": "git+ssh://git@debonline.dyndns.org:npm/foca-hoja-ruta.git"
  18 + "url": "git+http://git.focasoftware.com/npm/foca-hoja-ruta.git"
19 19 },
20 20 "author": "Foca Software",
21 21 "license": "ISC",
22 22 "devDependencies": {
23   - "angular": "1.7.5",
24   - "angular-ladda": "0.4.3",
25   - "angular-route": "1.7.5",
26   - "bootstrap": "4.1.3",
27   - "foca-directivas": "git+ssh://git@debonline.dyndns.org:npm/foca-directivas.git",
28   - "foca-modal-remito": "git+ssh://git@debonline.dyndns.org:npm/foca-modal-remito.git",
29   - "font-awesome": "4.7.0",
30   - "gulp": "3.9.1",
31   - "gulp-angular-templatecache": "2.2.5",
32   - "gulp-clean": "0.4.0",
  23 + "angular": "^1.7.5",
  24 + "angular-ladda": "^0.4.3",
  25 + "angular-route": "^1.7.5",
  26 + "bootstrap": "^4.1.3",
  27 + "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git",
  28 + "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git",
  29 + "font-awesome": "^4.7.0",
  30 + "gulp": "^3.9.1",
  31 + "gulp-angular-templatecache": "^2.2.5",
  32 + "gulp-clean": "^0.4.0",
33 33 "gulp-concat": "^2.6.1",
34   - "gulp-connect": "5.6.1",
35   - "gulp-htmlmin": "5.0.1",
36   - "gulp-jshint": "2.1.0",
37   - "gulp-rename": "1.4.0",
38   - "gulp-replace": "1.0.0",
39   - "gulp-sequence": "1.0.0",
40   - "gulp-uglify": "3.0.1",
41   - "gulp-uglify-es": "1.0.4",
42   - "jasmine-core": "3.3.0",
43   - "jquery": "3.3.1",
44   - "jshint": "2.9.6",
45   - "ladda": "1.0.6",
46   - "pre-commit": "1.2.2",
47   - "pump": "3.0.0",
48   - "ui-bootstrap4": "3.0.5"
  34 + "gulp-connect": "^5.6.1",
  35 + "gulp-htmlmin": "^5.0.1",
  36 + "gulp-jshint": "^2.1.0",
  37 + "gulp-rename": "^1.4.0",
  38 + "gulp-replace": "^1.0.0",
  39 + "gulp-sequence": "^1.0.0",
  40 + "gulp-uglify": "^3.0.1",
  41 + "gulp-uglify-es": "^1.0.4",
  42 + "jasmine-core": "^3.3.0",
  43 + "jquery": "^3.3.1",
  44 + "jshint": "^2.9.6",
  45 + "ladda": "^1.0.6",
  46 + "pre-commit": "^1.2.2",
  47 + "pump": "^3.0.0",
  48 + "ui-bootstrap4": "^3.0.5"
49 49 }
50 50 }
src/js/controller.js
... ... @@ -49,39 +49,35 @@ angular.module('focaHojaRuta')
49 49 templateUrl: 'modal-detalle-hoja-ruta.html',
50 50 controller: 'focaModalDetalleHojaRutaController',
51 51 resolve: {
52   - parametrosDetalleHojaRuta: function(){
53   - return {
54   - remito: $filter('comprobante')([
55   - remito.sucursal, remito.numeroRemito
56   - ]),
57   - cliente: remito.nombreCliente,
58   - domicilio: remito.domicilioStamp,
59   - producto: 'Super',
60   - contacto: remito.nombreCliente,
61   - telefonoContacto: '-',
62   - litros: remito.carga,
63   - idRemito: remito.id
64   - };
65   - }
  52 + remito : function() {return remito;}
66 53 },
67 54 size: 'lg'
68 55 }
69 56 );
70   - modalInstance.result.then(function(parametros) {
71   - // Al guardar los datos del producto entregado logueamos la
72   - // actividad para su seguimiento.
73   - hojaRutaService.postMovimientoHojaRuta({
74   - numeroRecibo: parametros.numeroRecibo,
75   - idRemito: parametros.idRemito,
76   - litrosDescargados: parametros.litrosDescargados
77   - }).then(function(movimiento) {
78   - focaSeguimientoService.guardarPosicion(
79   - 'Entrega de producto',
80   - movimiento.data.id,
81   - parametros.observaciones
82   - );
  57 + modalInstance.result.then(function(detalle) {
  58 + console.log(detalle);
  59 + /*Al guardar los datos del producto entregado logueamos la
  60 + actividad para su seguimiento.
  61 +
  62 + hojaRutaService.postMovimientoHojaRuta(detalle).then(function(movimiento) {
  63 + console.log(detalle) ;
83 64 });
84   -
  65 + var promesaSeguimiento = focaSeguimientoService.posicionCallBack(success);
  66 + function success(posicion) {
  67 + var nuevaPosicion = {
  68 + posicion: {
  69 + latitud: posicion.coords.latitude,
  70 + longitud: posicion.coords.longitude,
  71 + idComprobante: detalle.idRemito,
  72 + actividad: 'Entrega de producto',
  73 + observaciones: detalle.observaciones
  74 + }
  75 + };
  76 + focaSeguimientoService.nuevaPosicion(nuevaPosicion).then(successMark);
  77 + }
  78 + function successMark(seguimiento) {
  79 + console.log(seguimiento);
  80 + }*/
85 81 });
86 82 };
87 83