Commit 4ac2c1d269a1c46590e587c5ce6050a669c38025
1 parent
3ff10be5df
Exists in
master
espacios
Showing
1 changed file
with
12 additions
and
12 deletions
Show diff stats
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 | focaBotoneraLateralService.showTeclado(false); | 19 | focaBotoneraLateralService.showTeclado(false); |
20 | $uibModal.open( | 20 | $uibModal.open( |
21 | { | 21 | { |
22 | ariaLabelledBy: 'Informes de hojas de ruta', | 22 | ariaLabelledBy: 'Informes de hojas de ruta', |
23 | templateUrl: 'informe-hoja-ruta.html', | 23 | templateUrl: 'informe-hoja-ruta.html', |
24 | controller: 'focaModalInformeHojaRutaController', | 24 | controller: 'focaModalInformeHojaRutaController', |
25 | size: 'xl' | 25 | size: 'xl' |
26 | } | 26 | } |
27 | ) | 27 | ) |
28 | .result.then(function(){ | 28 | .result.then(function() { |
29 | focaBotoneraLateralService.showTeclado(true); | 29 | focaBotoneraLateralService.showTeclado(true); |
30 | }, function(){ | 30 | }, function() { |
31 | focaBotoneraLateralService.showTeclado(true); | 31 | focaBotoneraLateralService.showTeclado(true); |
32 | }); | 32 | }); |
33 | }; | 33 | }; |
34 | $scope.seleccionarChoferes = function() { | 34 | $scope.seleccionarChoferes = function() { |
35 | focaBotoneraLateralService.showTeclado(false); | 35 | focaBotoneraLateralService.showTeclado(false); |
36 | $uibModal.open( | 36 | $uibModal.open( |
37 | { | 37 | { |
38 | ariaLabelledBy: 'Informes de choferes', | 38 | ariaLabelledBy: 'Informes de choferes', |
39 | templateUrl: 'informe-chofer.html', | 39 | templateUrl: 'informe-chofer.html', |
40 | controller: 'focaModalInformeChoferController', | 40 | controller: 'focaModalInformeChoferController', |
41 | size: 'xl' | 41 | size: 'xl' |
42 | } | 42 | } |
43 | ) | 43 | ) |
44 | .result.then(function(){ | 44 | .result.then(function() { |
45 | focaBotoneraLateralService.showTeclado(true); | 45 | focaBotoneraLateralService.showTeclado(true); |
46 | }, function(){ | 46 | }, function() { |
47 | focaBotoneraLateralService.showTeclado(true); | 47 | focaBotoneraLateralService.showTeclado(true); |
48 | }); | 48 | }); |
49 | }; | 49 | }; |
50 | $scope.seleccionarLitrosPorKmRecorridosPorUnidadDeReparto = function() { | 50 | $scope.seleccionarLitrosPorKmRecorridosPorUnidadDeReparto = function() { |
51 | focaBotoneraLateralService.showTeclado(false); | 51 | focaBotoneraLateralService.showTeclado(false); |
52 | $uibModal.open( | 52 | $uibModal.open( |
53 | { | 53 | { |
54 | ariaLabelledBy: 'Informes de litros por km recorridos por unidad de reparto', | 54 | ariaLabelledBy: 'Informes de litros por km recorridos por unidad de reparto', |
55 | templateUrl: 'informe-litros-km-unidad.html', | 55 | templateUrl: 'informe-litros-km-unidad.html', |
56 | controller: 'focaModalInformeLitrosKmUnidadController', | 56 | controller: 'focaModalInformeLitrosKmUnidadController', |
57 | size: 'xl' | 57 | size: 'xl' |
58 | } | 58 | } |
59 | ) | 59 | ) |
60 | .result.then(function(){ | 60 | .result.then(function() { |
61 | focaBotoneraLateralService.showTeclado(true); | 61 | focaBotoneraLateralService.showTeclado(true); |
62 | }, function(){ | 62 | }, function() { |
63 | focaBotoneraLateralService.showTeclado(true); | 63 | focaBotoneraLateralService.showTeclado(true); |
64 | }); | 64 | }); |
65 | }; | 65 | }; |
66 | $scope.seleccionarInformeGeneralPorUnidadDeReparto = function() { | 66 | $scope.seleccionarInformeGeneralPorUnidadDeReparto = function() { |
67 | focaBotoneraLateralService.showTeclado(false); | 67 | focaBotoneraLateralService.showTeclado(false); |
68 | $uibModal.open( | 68 | $uibModal.open( |
69 | { | 69 | { |
70 | ariaLabelledBy: 'Informe general por unidad de reparto', | 70 | ariaLabelledBy: 'Informe general por unidad de reparto', |
71 | templateUrl: 'informe-general-unidad.html', | 71 | templateUrl: 'informe-general-unidad.html', |
72 | controller: 'focaModalInformeGeneralUnidadController', | 72 | controller: 'focaModalInformeGeneralUnidadController', |
73 | size: 'xl' | 73 | size: 'xl' |
74 | } | 74 | } |
75 | ) | 75 | ) |
76 | .result.then(function(){ | 76 | .result.then(function() { |
77 | focaBotoneraLateralService.showTeclado(true); | 77 | focaBotoneraLateralService.showTeclado(true); |
78 | }, function(){ | 78 | }, function() { |
79 | focaBotoneraLateralService.showTeclado(true); | 79 | focaBotoneraLateralService.showTeclado(true); |
80 | }); | 80 | }); |
81 | }; | 81 | }; |
82 | $scope.seleccionarInformeDeRepartoÓptimoDetallado = function() { | 82 | $scope.seleccionarInformeDeRepartoÓptimoDetallado = function() { |
83 | focaBotoneraLateralService.showTeclado(false); | 83 | focaBotoneraLateralService.showTeclado(false); |
84 | $uibModal.open( | 84 | $uibModal.open( |
85 | { | 85 | { |
86 | ariaLabelledBy: 'Informe de reparto óptimo detallado', | 86 | ariaLabelledBy: 'Informe de reparto óptimo detallado', |
87 | templateUrl: 'informe-reparto-optimo.html', | 87 | templateUrl: 'informe-reparto-optimo.html', |
88 | controller: 'focaModalInformeRepartoOptimoController', | 88 | controller: 'focaModalInformeRepartoOptimoController', |
89 | size: 'xl' | 89 | size: 'xl' |
90 | } | 90 | } |
91 | ) | 91 | ) |
92 | .result.then(function(){ | 92 | .result.then(function() { |
93 | focaBotoneraLateralService.showTeclado(true); | 93 | focaBotoneraLateralService.showTeclado(true); |
94 | }, function(){ | 94 | }, function() { |
95 | focaBotoneraLateralService.showTeclado(true); | 95 | focaBotoneraLateralService.showTeclado(true); |
96 | }); | 96 | }); |
97 | }; | 97 | }; |
98 | $scope.seleccionarInformeDeProductividad = function() { | 98 | $scope.seleccionarInformeDeProductividad = function() { |
99 | focaBotoneraLateralService.showTeclado(false); | 99 | focaBotoneraLateralService.showTeclado(false); |
100 | $uibModal.open( | 100 | $uibModal.open( |
101 | { | 101 | { |
102 | ariaLabelledBy: | 102 | ariaLabelledBy: |
103 | 'Informe de productividad de Vendedores / Cobradores / Transportistas', | 103 | 'Informe de productividad de Vendedores / Cobradores / Transportistas', |
104 | templateUrl: 'informe-productividad.html', | 104 | templateUrl: 'informe-productividad.html', |
105 | controller: 'focaModalInformeProductividadController', | 105 | controller: 'focaModalInformeProductividadController', |
106 | size: 'xl' | 106 | size: 'xl' |
107 | } | 107 | } |
108 | ) | 108 | ) |
109 | .result.then(function(){ | 109 | .result.then(function() { |
110 | focaBotoneraLateralService.showTeclado(true); | 110 | focaBotoneraLateralService.showTeclado(true); |
111 | }, function(){ | 111 | }, function() { |
112 | focaBotoneraLateralService.showTeclado(true); | 112 | focaBotoneraLateralService.showTeclado(true); |
113 | }); | 113 | }); |
114 | }; | 114 | }; |
115 | } | 115 | } |
116 | ]); | 116 | ]); |
117 | 117 |