controller.js
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
angular.module('focaAdminSeguimiento') .controller('focaAdminSeguimientoController', [
'$scope', 'focaAdminSeguimientoService', '$location', '$routeParams',
function($scope, focaAdminSeguimientoService, $location, $routeParams) {
$scope.actividad = '';
$scope.now = new Date();
if ($routeParams.parametro === 'nota-pedido') {
$scope.actividad = 'Nota de pedido';
}
if ($routeParams.parametro === 'hoja-ruta') {
$scope.actividad = 'Entrega de producto';
}
$scope.general = true;
console.info($scope.actividad);
$scope.marcadores = [];
focaAdminSeguimientoService.obtenerActividad().then(function(datos) {
$scope.marcadores = datos.data;
});
$scope.general = function() {
$scope.general = true;
};
$scope.individual = function() {
$scope.general = false;
};
$scope.salir = function() {
$location.path('/');
};
}
]);