Commit 1e8ba4322ef6c7f62f1f046893ab0f75f8ad57f8

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

Merge branch 'master' into 'master'

Master

See merge request !3
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() { 28 $scope.seleccionarChoferes = function() {
29 $uibModal.open( 29 $uibModal.open(
30 { 30 {
31 ariaLabelledBy: 'Informes de choferes', 31 ariaLabelledBy: 'Informes de choferes',
32 templateUrl: 'modal-informe-chofer.html', 32 templateUrl: 'modal-informe-chofer.html',
33 controller: 'focaModalInformeChoferController', 33 controller: 'focaModalInformeChoferController',
34 size: 'lg' 34 size: 'lg'
35 } 35 }
36 ); 36 );
37 }; 37 };
38 $scope.seleccionarLitrosPorKmRecorridosPorUnidadDeReparto = function() {
39 $uibModal.open(
40 {
41 ariaLabelledBy: 'Informes de litros por km recorridos por unidad de reparto',
42 templateUrl: 'modal-informe-litros-km-unidad.html',
43 controller: 'focaModalInformeLitrosKmUnidadController',
44 size: 'lg'
45 }
46 );
47 };
48 $scope.seleccionarInformeGeneralPorUnidadDeReparto = function() {
49 $uibModal.open(
50 {
51 ariaLabelledBy: 'Informe general por unidad de reparto',
52 templateUrl: 'modal-informe-general-unidad.html',
53 controller: 'focaModalInformeGeneralUnidadController',
54 size: 'lg'
55 }
56 );
57 };
38 } 58 }
39 ]); 59 ]);
40 60
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 }, 9 },
10 { 10 {
11 label: 'Choferes', 11 label: 'Choferes',
12 image: 'chofer.png' 12 image: 'chofer.png'
13 },
14 {
15 label: 'Litros por km recorridos por unidad de reparto',
16 image: 'productos.png'
17 },
18 {
19 label: 'Informe general por unidad de reparto',
20 image: 'flete.png'
13 } 21 }
14 ]; 22 ];
15 return result; 23 return result;
16 } 24 }
17 }; 25 };
18 }]); 26 }]);
19 27