From 41fae26dbdbb36c21b941eda03bde7ab02042cfe Mon Sep 17 00:00:00 2001 From: Pablo Marco del Pont Date: Tue, 13 Nov 2018 15:27:15 -0300 Subject: [PATCH] Fix botonera principal. --- src/js/controller.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index b192d8c..348e0ca 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -3,11 +3,12 @@ angular.module('focaBotoneraPrincipal') '$scope', '$location', '$cookies', 'botones', 'focaModalService', 'APP', function($scope, $location, $cookies, botones, focaModalService, APP) { $scope.paginas = []; - if(APP === 'distribuidor') { - $scope.paginas.push(botones.data.slice(0, 3)); - $scope.paginas.push(botones.data.slice(3, 6)); - } else { - $scope.paginas.push(botones.data); + var botonesPorPagina = 12; + if(APP === 'distribuidor' || APP === 'transportista') { + botonesPorPagina = 3; + } + for(var i = 0; i < botones.data.length; i += botonesPorPagina){ + $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); } $scope.irA = function(accion) { -- 1.9.1