Commit 1422345c1f18fa45ca73f4ce308e5f5bfeb4f1b2
Exists in
master
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-botonera-principal!3
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', | 3 | '$scope', '$location', |
| 4 | function($scope, $location) { | 4 | function($scope, $location) { |
| 5 | // TODO: Tomar estos datos desde el servicio | 5 | // TODO: Tomar estos datos desde el servicio |
| 6 | $scope.botones = [ | 6 | $scope.botones = [ |
| 7 | { | 7 | { |
| 8 | texto: 'Abrir Turno', | 8 | texto: 'Abrir Turno', |
| 9 | clase: 'botonera-principal-abrir-turno', | 9 | clase: 'botonera-principal-abrir-turno', |
| 10 | accion: '/turno-apertura' | 10 | accion: '/turno-apertura' |
| 11 | }, | 11 | }, |
| 12 | { | 12 | { |
| 13 | texto: 'Cerrar Turno', | 13 | texto: 'Cerrar Turno', |
| 14 | clase: 'botonera-principal-cerrar-turno', | 14 | clase: 'botonera-principal-cerrar-turno', |
| 15 | accion: '/turno-cierre' | 15 | accion: '/turno-cierre' |
| 16 | }, | 16 | }, |
| 17 | { | 17 | { |
| 18 | texto: 'Nota Pedido', | 18 | texto: 'Nota Pedido', |
| 19 | clase: 'botonera-principal-nota-pedido', | 19 | clase: 'botonera-principal-nota-pedido', |
| 20 | accion: '/venta-nota-pedido/crear' | 20 | accion: '/venta-nota-pedido/crear' |
| 21 | }, | 21 | }, |
| 22 | { | 22 | { |
| 23 | texto: '', | 23 | texto: 'Seguimiento GPS', |
| 24 | clase: 'botonera-principal-vacio', | 24 | clase: 'botonera-principal-seguimiento', |
| 25 | accion: '/' | 25 | accion: '/admin-seguimiento' |
| 26 | }, | 26 | }, |
| 27 | { | 27 | { |
| 28 | texto: '', | 28 | texto: '', |
| 29 | clase: 'botonera-principal-vacio', | 29 | clase: 'botonera-principal-vacio', |
| 30 | accion: '/' | 30 | accion: '/' |
| 31 | }, | 31 | }, |
| 32 | { | 32 | { |
| 33 | texto: '', | 33 | texto: '', |
| 34 | clase: 'botonera-principal-vacio', | 34 | clase: 'botonera-principal-vacio', |
| 35 | accion: '/' | 35 | accion: '/' |
| 36 | }, | 36 | }, |
| 37 | { | 37 | { |
| 38 | texto: '', | 38 | texto: '', |
| 39 | clase: 'botonera-principal-vacio', | 39 | clase: 'botonera-principal-vacio', |
| 40 | accion: '/' | 40 | accion: '/' |
| 41 | }, | 41 | }, |
| 42 | { | 42 | { |
| 43 | texto: '', | 43 | texto: '', |
| 44 | clase: 'botonera-principal-vacio', | 44 | clase: 'botonera-principal-vacio', |
| 45 | accion: '/' | 45 | accion: '/' |
| 46 | }, | 46 | }, |
| 47 | { | 47 | { |
| 48 | texto: '', | 48 | texto: '', |
| 49 | clase: 'botonera-principal-vacio', | 49 | clase: 'botonera-principal-vacio', |
| 50 | accion: '/' | 50 | accion: '/' |
| 51 | }, | 51 | }, |
| 52 | { | 52 | { |
| 53 | texto: '', | 53 | texto: '', |
| 54 | clase: 'botonera-principal-vacio', | 54 | clase: 'botonera-principal-vacio', |
| 55 | accion: '/' | 55 | accion: '/' |
| 56 | }, | 56 | }, |
| 57 | { | 57 | { |
| 58 | texto: '', | 58 | texto: '', |
| 59 | clase: 'botonera-principal-vacio', | 59 | clase: 'botonera-principal-vacio', |
| 60 | accion: '/' | 60 | accion: '/' |
| 61 | }, | 61 | }, |
| 62 | { | 62 | { |
| 63 | texto: '', | 63 | texto: '', |
| 64 | clase: 'botonera-principal-vacio', | 64 | clase: 'botonera-principal-vacio', |
| 65 | accion: '/' | 65 | accion: '/' |
| 66 | }, | 66 | }, |
| 67 | { | 67 | { |
| 68 | texto: '', | 68 | texto: '', |
| 69 | clase: 'botonera-principal-vacio', | 69 | clase: 'botonera-principal-vacio', |
| 70 | accion: '/' | 70 | accion: '/' |
| 71 | }, | 71 | }, |
| 72 | { | 72 | { |
| 73 | texto: '', | 73 | texto: '', |
| 74 | clase: 'botonera-principal-vacio', | 74 | clase: 'botonera-principal-vacio', |
| 75 | accion: '/' | 75 | accion: '/' |
| 76 | }, | 76 | }, |
| 77 | { | 77 | { |
| 78 | texto: '', | 78 | texto: '', |
| 79 | clase: 'botonera-principal-vacio', | 79 | clase: 'botonera-principal-vacio', |
| 80 | accion: '/' | 80 | accion: '/' |
| 81 | }, | 81 | }, |
| 82 | { | 82 | { |
| 83 | texto: '', | 83 | texto: '', |
| 84 | clase: 'botonera-principal-vacio', | 84 | clase: 'botonera-principal-vacio', |
| 85 | accion: '/' | 85 | accion: '/' |
| 86 | }, | 86 | }, |
| 87 | { | 87 | { |
| 88 | texto: '', | 88 | texto: '', |
| 89 | clase: 'botonera-principal-vacio', | 89 | clase: 'botonera-principal-vacio', |
| 90 | accion: '/' | 90 | accion: '/' |
| 91 | }, | 91 | }, |
| 92 | { | 92 | { |
| 93 | texto: '', | 93 | texto: '', |
| 94 | clase: 'botonera-principal-vacio', | 94 | clase: 'botonera-principal-vacio', |
| 95 | accion: '/' | 95 | accion: '/' |
| 96 | }, | 96 | }, |
| 97 | { | 97 | { |
| 98 | texto: '', | 98 | texto: '', |
| 99 | clase: 'botonera-principal-vacio', | 99 | clase: 'botonera-principal-vacio', |
| 100 | accion: '/' | 100 | accion: '/' |
| 101 | }, | 101 | }, |
| 102 | { | 102 | { |
| 103 | texto: '', | 103 | texto: '', |
| 104 | clase: 'botonera-principal-vacio', | 104 | clase: 'botonera-principal-vacio', |
| 105 | accion: '/' | 105 | accion: '/' |
| 106 | }, | 106 | }, |
| 107 | { | 107 | { |
| 108 | texto: '', | 108 | texto: '', |
| 109 | clase: 'botonera-principal-vacio', | 109 | clase: 'botonera-principal-vacio', |
| 110 | accion: '/' | 110 | accion: '/' |
| 111 | } | 111 | } |
| 112 | ]; | 112 | ]; |
| 113 | 113 | ||
| 114 | $scope.paginas = []; | 114 | $scope.paginas = []; |
| 115 | $scope.paginas.push($scope.botones.slice(0, 15)); | 115 | $scope.paginas.push($scope.botones.slice(0, 15)); |
| 116 | $scope.paginas.push($scope.botones.slice(15, 30)); | 116 | $scope.paginas.push($scope.botones.slice(15, 30)); |
| 117 | 117 | ||
| 118 | $scope.irA = function(accion) { | 118 | $scope.irA = function(accion) { |
| 119 | $location.path(accion); | 119 | $location.path(accion); |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | $scope.logout = function() { | 122 | $scope.logout = function() { |
| 123 | $location.path('/logout'); | 123 | $location.path('/logout'); |
| 124 | }; | 124 | }; |
| 125 | } | 125 | } |
| 126 | ]); | 126 | ]); |
| 127 | 127 |