Commit 93d197c98d30bb46c37b774b508241c65b74497a
Exists in
develop
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !13
Showing
2 changed files
 
Show diff stats
src/js/controller.js
| 1 | angular.module('focaBotoneraPrincipal') | 1 | angular.module('focaBotoneraPrincipal') | 
| 2 | .controller('focaBotoneraPrincipalController', [ | 2 | .controller('focaBotoneraPrincipalController', [ | 
| 3 | '$scope', '$rootScope', '$timeout', '$location', '$localStorage', | 3 | '$scope', '$rootScope', '$timeout', '$location', '$localStorage', | 
| 4 | 'botones', 'focaModalService', 'APP', 'focaBotoneraLateralService', | 4 | 'botones', 'focaModalService', 'APP', 'focaBotoneraLateralService', | 
| 5 | function($scope, $rootScope, $timeout, $location, $localStorage, | 5 | function ($scope, $rootScope, $timeout, $location, $localStorage, | 
| 6 | botones, focaModalService, APP, focaBotoneraLateralService) { | 6 | botones, focaModalService, APP, focaBotoneraLateralService) { | 
| 7 | $scope.paginas = []; | 7 | $scope.paginas = []; | 
| 8 | var botonesPorPagina = 10; | 8 | var botonesPorPagina = 10; | 
| 9 | if(APP === 'distribuidor' || APP === 'transportista') { | 9 | if (APP === 'distribuidor' || APP === 'transportista') { | 
| 10 | botonesPorPagina = 3; | 10 | botonesPorPagina = 3; | 
| 11 | } | 11 | } | 
| 12 | for(var i = 0; i < botones.data.length; i += botonesPorPagina) { | 12 | for (var i = 0; i < botones.data.length; i += botonesPorPagina) { | 
| 13 | $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); | 13 | $scope.paginas.push(botones.data.slice(i, i + botonesPorPagina)); | 
| 14 | } | 14 | } | 
| 15 | 15 | ||
| 16 | focaBotoneraLateralService.showGuardar(false); | 16 | focaBotoneraLateralService.showGuardar(false); | 
| 17 | focaBotoneraLateralService.showPausar(false); | 17 | focaBotoneraLateralService.showPausar(false); | 
| 18 | focaBotoneraLateralService.showSalir(false); | 18 | focaBotoneraLateralService.showSalir(false); | 
| 19 | focaBotoneraLateralService.showCancelar(false); | 19 | focaBotoneraLateralService.showCancelar(false); | 
| 20 | 20 | ||
| 21 | $scope.irA = function(accion) { | 21 | $scope.rutas = $localStorage.rutas ? JSON.parse($localStorage.rutas) : []; | 
| 22 | |||
| 23 | $scope.irA = function (accion) { | ||
| 22 | $location.path(accion); | 24 | $location.path(accion); | 
| 23 | }; | 25 | }; | 
| 24 | 26 | ||
| 25 | $scope.logout = function() { | 27 | $scope.logout = function () { | 
| 26 | $location.path('/logout'); | 28 | $location.path('/logout'); | 
| 27 | }; | 29 | }; | 
| 28 | 30 | ||
| 29 | $scope.showTerminal = function() { | 31 | $scope.showTerminal = function () { | 
| 30 | var key = $localStorage.terminalKey; | 32 | var key = $localStorage.terminalKey; | 
| 31 | focaModalService.info('Su terminal es: ' + key); | 33 | focaModalService.info('Su terminal es: ' + key); | 
| 32 | }; | 34 | }; | 
| 35 | |||
| 33 | } | 36 | } | 
| 34 | ]); | 37 | ]); | 
| 35 | 38 | 
src/views/foca-botonera-principal.html
| 1 | <div class="botonera-principal"> | 1 | <div class="botonera-principal"> | 
| 2 | <div class="d-flex"> | ||
| 3 | <div ng-if="rutas.length > 0" class="ml-auto dropdown"> | ||
| 4 | <button | ||
| 5 | class="m-0 btn-tareas-pausadas dropdown-toggle" | ||
| 6 | type="button" | ||
| 7 | id="dropdownMenuButton" | ||
| 8 | data-toggle="dropdown" | ||
| 9 | aria-haspopup="true" | ||
| 10 | aria-expanded="false" | ||
| 11 | > | ||
| 12 | Tareas Pausadas | ||
| 13 | </button> | ||
| 14 | <div class="dropdown-tareas-pausadas dropdown-menu" aria-labelledby="dropdownMenuButton"> | ||
| 15 | <a | ||
| 16 | ng-click="irA(ruta)" | ||
| 17 | ng-repeat="ruta in rutas track by $index" | ||
| 18 | class="items-dropdown dropdown-item m-1"> | ||
| 19 | Volver a: {{ruta}} | ||
| 20 | </a> | ||
| 21 | </div> | ||
| 22 | </div> | ||
| 23 | </div> | ||
| 2 | <div class="row mt-3 justify-content-center"> | 24 | <div class="row mt-3 justify-content-center"> | 
| 3 | <div class="col-auto p-0"> | 25 | <div class="col-auto p-0"> | 
| 4 | <img src="./img/logoMapa.png"/> | 26 | <img src="./img/logoMapa.png" /> | 
| 5 | </div> | 27 | </div> | 
| 6 | </div> | 28 | </div> | 
| 7 | <div class="row"> | 29 | <div class="row"> | 
| 8 | <div class="col-12 mb-3"> | 30 | <div class="col-12 mb-3"> | 
| 9 | <swiper on-init="inicioSwiper"> | 31 | <swiper on-init="inicioSwiper"> | 
| 10 | <slides> | 32 | <slides> | 
| 11 | <slide ng-repeat="(keyPagina, pagina) in paginas"> | 33 | <slide ng-repeat="(keyPagina, pagina) in paginas"> | 
| 12 | <menu class="botonera-principal-menu"> | 34 | <menu class="botonera-principal-menu"> | 
| 13 | <menuitem | 35 | <menuitem | 
| 14 | ng-class="boton.clase" | 36 | ng-class="boton.clase" | 
| 15 | ng-repeat="(keyBoton, boton) in pagina" | 37 | ng-repeat="(keyBoton, boton) in pagina" | 
| 16 | ng-show="boton.accion != '/venta-hoja-ruta/lista'"> | 38 | ng-show="boton.accion != '/venta-hoja-ruta/lista'" | 
| 39 | > | ||
| 17 | <button | 40 | <button | 
| 18 | foca-focus="keyPagina === 0 && keyBoton === 0" | 41 | foca-focus="keyPagina === 0 && keyBoton === 0" | 
| 19 | ng-click="irA(boton.accion)"> | 42 | ng-click="irA(boton.accion)" | 
| 43 | > | ||
| 20 | <span ng-bind="boton.texto"></span> | 44 | <span ng-bind="boton.texto"></span> | 
| 21 | </button> | 45 | </button> | 
| 22 | </menuitem> | 46 | </menuitem> | 
| 23 | </menu> | 47 | </menu> | 
| 24 | </slide> | 48 | </slide> | 
| 25 | </slides> | 49 | </slides> | 
| 26 | <prev></prev> | 50 | <prev></prev> | 
| 27 | <next></next> | 51 | <next></next> | 
| 28 | <pagination></pagination> | 52 | <pagination></pagination> | 
| 29 | </swiper> | 53 | </swiper> | 
| 30 | <div class="d-none d-sm-block"> | 54 | <div class="d-none d-sm-block"> | 
| 31 | <a | 55 | <a | 
| 32 | class="btn btn-outline-dark mt-5 btn-lg" | 56 | class="btn btn-outline-dark mt-5 btn-lg" | 
| 33 | href="javascript:void()" | 57 | href="javascript:void()" | 
| 34 | ng-click="showTerminal()" | 58 | ng-click="showTerminal()" | 
| 35 | > | 59 | > | 
| 36 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 60 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 
| 37 | </a> | 61 | </a> | 
| 38 | <a class="btn btn-outline-dark mt-5 btn-lg" | 62 | <a | 
| 39 | href="javascript:void()" | 63 | class="btn btn-outline-dark mt-5 btn-lg" | 
| 40 | ng-click="logout()" | 64 | href="javascript:void()" | 
| 41 | > | 65 | ng-click="logout()"> | 
| 42 | <i class="fa fa-power-off" aria-hidden="true"></i> | 66 | <i class="fa fa-power-off" aria-hidden="true"></i> | 
| 43 | </a> | 67 | </a> | 
| 44 | </div> | 68 | </div> | 
| 45 | </div> | 69 | </div> | 
| 46 | </div> | 70 | </div> | 
| 47 | <div class="row d-md-none fixed-bottom"> | 71 | <div class="row d-md-none fixed-bottom"> | 
| 48 | <div class="w-100 d-flex px-3 acciones-mobile"> | 72 | <div class="w-100 d-flex px-3 acciones-mobile"> | 
| 49 | <a | 73 | <a | 
| 50 | class="btn btn-outline-dark btn-lg mr-2" | 74 | class="btn btn-outline-dark btn-lg mr-2" | 
| 51 | href="javascript:void()" | 75 | href="javascript:void()" | 
| 52 | ng-click="showTerminal()" | 76 | ng-click="showTerminal()"> | 
| 53 | > | ||
| 54 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 77 | <i class="fa fa-info-circle" aria-hidden="true"></i> | 
| 55 | </a> | 78 | </a> | 
| 56 | <a class="btn btn-outline-dark btn-lg" | 79 | <a | 
| 80 | class="btn btn-outline-dark btn-lg" | ||
| 57 | href="javascript:void()" | 81 | href="javascript:void()" | 
| 58 | ng-click="logout()" | 82 | ng-click="logout()"> | 
| 59 | > | ||
| 60 | <i class="fa fa-power-off" aria-hidden="true"></i> | 83 | <i class="fa fa-power-off" aria-hidden="true"></i> | 
| 61 | </a> | 84 | </a> | 
| 62 | </div> | 85 | </div> | 
| 63 | </div> | 86 | </div> |