Commit 51253718ad64b3e91ec482c48adda442f92e54f1
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-botonera-principal!8
Showing
1 changed file
Show diff stats
src/js/controller.js
| 1 | angular.module('focaBotoneraPrincipal') | 1 | angular.module('focaBotoneraPrincipal') |
| 2 | .controller('focaBotoneraPrincipalController', [ | 2 | .controller('focaBotoneraPrincipalController', [ |
| 3 | '$scope', '$location', '$cookies', 'botones', 'focaModalService', 'APP', | 3 | '$scope', '$location', '$cookies', 'botones', 'focaModalService', 'APP', |
| 4 | function($scope, $location, $cookies, botones, focaModalService, APP) { | 4 | function($scope, $location, $cookies, botones, focaModalService, APP) { |
| 5 | $scope.paginas = []; | 5 | $scope.paginas = []; |
| 6 | if(APP !== '') { | 6 | if(APP === 'distribuidor') { |
| 7 | $scope.paginas.push(botones.data.slice(0, 3)); | 7 | $scope.paginas.push(botones.data.slice(0, 3)); |
| 8 | $scope.paginas.push(botones.data.slice(3, 6)); | 8 | $scope.paginas.push(botones.data.slice(3, 6)); |
| 9 | } else { | 9 | } else { |
| 10 | $scope.paginas.push(botones.data); | 10 | $scope.paginas.push(botones.data); |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | $scope.irA = function(accion) { | 13 | $scope.irA = function(accion) { |
| 14 | $location.path(accion); | 14 | $location.path(accion); |
| 15 | }; | 15 | }; |
| 16 | 16 | ||
| 17 | $scope.logout = function() { | 17 | $scope.logout = function() { |
| 18 | $location.path('/logout'); | 18 | $location.path('/logout'); |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | $scope.showTerminal = function() { | 21 | $scope.showTerminal = function() { |
| 22 | var key = $cookies.get('terminalKey'); | 22 | var key = $cookies.get('terminalKey'); |
| 23 | focaModalService.alert('SU TERMINAL ES: ' + key); | 23 | focaModalService.alert('SU TERMINAL ES: ' + key); |
| 24 | }; | 24 | }; |
| 25 | } | 25 | } |
| 26 | ]); | 26 | ]); |
| 27 | 27 |