Commit a1f6c3a47192b644fd8ab5b0d8842302e0b71fb0

Authored by Nicolás Guarnieri
Exists in master and in 1 other branch develop

Merge branch 'master' into 'master'

Master

See merge request !2
src/js/controller.js
1 angular.module('focaInformes') 1 angular.module('focaInformes')
2 .controller('focaInformesController', 2 .controller('focaInformesController',
3 [ 3 [
4 '$scope', 4 '$scope',
5 'focaInformesService', 5 'focaInformesService',
6 'focaBotoneraLateralService', 6 'focaBotoneraLateralService',
7 '$uibModal', 7 '$uibModal',
8 function($scope, focaInformesService, focaBotoneraLateralService, $uibModal) 8 function($scope, focaInformesService, focaBotoneraLateralService, $uibModal)
9 { 9 {
10 $scope.now = new Date(); 10 $scope.now = new Date();
11 $scope.botonera = focaInformesService.getBotonera(); 11 $scope.botonera = focaInformesService.getBotonera();
12 12
13 //SETEO BOTONERA LATERAL 13 //SETEO BOTONERA LATERAL
14 focaBotoneraLateralService.showSalir(true); 14 focaBotoneraLateralService.showSalir(true);
15 focaBotoneraLateralService.showPausar(false); 15 focaBotoneraLateralService.showPausar(false);
16 focaBotoneraLateralService.showGuardar(false); 16 focaBotoneraLateralService.showGuardar(false);
17 17
18 $scope.seleccionarHojasDeRuta = function() { 18 $scope.seleccionarHojasDeRuta = function() {
19 $uibModal.open( 19 $uibModal.open(
20 { 20 {
21 ariaLabelledBy: 'Informes de hojas de ruta', 21 ariaLabelledBy: 'Informes de hojas de ruta',
22 templateUrl: 'modal-informe-hoja-ruta.html', 22 templateUrl: 'modal-informe-hoja-ruta.html',
23 controller: 'focaModalInformeHojaRutaController', 23 controller: 'focaModalInformeHojaRutaController',
24 size: 'lg' 24 size: 'lg'
25 } 25 }
26 ); 26 );
27 }; 27 };
28 $scope.seleccionarChoferes = function() {
29 $uibModal.open(
30 {
31 ariaLabelledBy: 'Informes de choferes',
32 templateUrl: 'modal-informe-chofer.html',
33 controller: 'focaModalInformeChoferController',
34 size: 'lg'
35 }
36 );
37 };
28 } 38 }
29 ]); 39 ]);
30 40
1 angular.module('focaInformes') 1 angular.module('focaInformes')
2 .factory('focaInformesService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { 2 .factory('focaInformesService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) {
3 return { 3 return {
4 getBotonera: function() { 4 getBotonera: function() {
5 var result = [ 5 var result = [
6 { 6 {
7 label: 'Hojas de ruta', 7 label: 'Hojas de ruta',
8 image: 'cliente.png' 8 image: 'cliente.png'
9 },
10 {
11 label: 'Choferes',
12 image: 'chofer.png'
9 } 13 }
10 ]; 14 ];
11 return result; 15 return result;
12 } 16 }
13 }; 17 };
14 }]); 18 }]);
15 19