Commit d9da0b2f86df54093de7d8767457ca5453efa60a
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
botones See merge request modulos-npm/foca-admin-seguimiento!3
Showing
2 changed files
Show diff stats
src/js/controller.js
| 1 | angular.module('focaAdminSeguimiento') .controller('focaAdminSeguimientoController', [ | 1 | angular.module('focaAdminSeguimiento') .controller('focaAdminSeguimientoController', [ |
| 2 | '$scope', 'focaAdminSeguimientoService', '$location', '$routeParams', | 2 | '$scope', 'focaAdminSeguimientoService', '$location', '$routeParams', |
| 3 | function($scope, focaAdminSeguimientoService, $location, $routeParams) { | 3 | function($scope, focaAdminSeguimientoService, $location, $routeParams) { |
| 4 | $scope.actividad = ''; | 4 | $scope.actividad = ''; |
| 5 | 5 | ||
| 6 | if ($routeParams.parametro === 'nota-pedido') { | 6 | if ($routeParams.parametro === 'nota-pedido') { |
| 7 | $scope.actividad = 'Nota de pedido'; | 7 | $scope.actividad = 'Nota de pedido'; |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | if ($routeParams.parametro === 'hoja-ruta') { | 10 | if ($routeParams.parametro === 'hoja-ruta') { |
| 11 | $scope.actividad = 'Entrega de producto'; | 11 | $scope.actividad = 'Entrega de producto'; |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | $scope.general = true; | ||
| 15 | |||
| 14 | console.info($scope.actividad); | 16 | console.info($scope.actividad); |
| 15 | $scope.marcadores = []; | 17 | $scope.marcadores = []; |
| 16 | 18 | ||
| 17 | focaAdminSeguimientoService.obtenerActividad().then(function(datos) { | 19 | focaAdminSeguimientoService.obtenerActividad().then(function(datos) { |
| 18 | $scope.marcadores = datos.data; | 20 | $scope.marcadores = datos.data; |
| 19 | }); | 21 | }); |
| 20 | 22 | ||
| 23 | $scope.general = function() { | ||
| 24 | $scope.general = true; | ||
| 25 | }; | ||
| 26 | |||
| 27 | $scope.individual = function() { | ||
| 28 | $scope.general = false; | ||
| 29 | |||
| 30 | }; | ||
| 31 | |||
| 21 | $scope.salir = function() { | 32 | $scope.salir = function() { |
| 22 | $location.path('/'); | 33 | $location.path('/'); |
| 23 | }; | 34 | }; |
| 24 | } | 35 | } |
| 25 | ]); | 36 | ]); |
| 26 | 37 |
src/views/foca-admin-seguimiento.html
| 1 | <div class="foca-admin-seguimiento"> | 1 | <div class="foca-admin-seguimiento"> |
| 2 | <div class="row"> | 2 | <div class="row"> |
| 3 | <div class="offset-1 col-10"> | 3 | <div class="offset-1 col-9"> |
| 4 | <osm | 4 | <osm |
| 5 | latitud="-32.89214159952345" | 5 | latitud="-32.89214159952345" |
| 6 | longitud="-68.84572999101856" | 6 | longitud="-68.84572999101856" |
| 7 | zoom="14" | 7 | zoom="14" |
| 8 | marcadores="marcadores" | 8 | marcadores="marcadores" |
| 9 | /> | 9 | /> |
| 10 | </div> | 10 | </div> |
| 11 | <div class="col-1"> | 11 | <div class="col-2 pl-0"> |
| 12 | <button type="button" class="btn btn-default" ng-click="salir()">Salir</button> | 12 | <button |
| 13 | type="button" | ||
| 14 | ng-class="{'active': general}" | ||
| 15 | class="btn col-12 my-1" | ||
| 16 | ng-click="general()" | ||
| 17 | >General</button> | ||
| 18 | <button | ||
| 19 | type="button" | ||
| 20 | ng-class="{'active': !general}" | ||
| 21 | class="btn col-12 my-1" | ||
| 22 | ng-click="individual()" | ||
| 23 | >Individual</button> | ||
| 24 | <button | ||
| 25 | type="button" | ||
| 26 | class="btn col-12 my-1 boton-salir" | ||
| 27 | ng-click="salir()" | ||
| 28 | > | ||
| 29 | Salir | ||
| 30 | </button> | ||
| 13 | </div> | 31 | </div> |
| 14 | </div> | 32 | </div> |
| 15 | </div> | 33 | </div> |
| 16 | 34 |