Commit 05c2d28e89a63ccb7de181f239e1e0f3dd420fee
1 parent
25d263945b
Exists in
master
agrego Informe de reparto óptimo detallado
Showing
2 changed files
with
20 additions
and
0 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() { | ||
83 | focaBotoneraLateralService.showTeclado(false); | ||
84 | $uibModal.open( | ||
85 | { | ||
86 | ariaLabelledBy: 'Informe de reparto óptimo detallado', | ||
87 | templateUrl: 'informe-reparto-optimo.html', | ||
88 | controller: 'focaModalInformeRepartoOptimoController', | ||
89 | size: 'xl' | ||
90 | } | ||
91 | ) | ||
92 | .result.then(function(){ | ||
93 | focaBotoneraLateralService.showTeclado(true); | ||
94 | }, function(){ | ||
95 | focaBotoneraLateralService.showTeclado(true); | ||
96 | }); | ||
97 | }; | ||
82 | } | 98 | } |
83 | ]); | 99 | ]); |
84 | 100 |
src/js/service.js
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 | }, | 13 | }, |
14 | { | 14 | { |
15 | label: 'Litros por km recorridos por unidad de reparto', | 15 | label: 'Litros por km recorridos por unidad de reparto', |
16 | image: 'productos.png' | 16 | image: 'productos.png' |
17 | }, | 17 | }, |
18 | { | 18 | { |
19 | label: 'Informe general por unidad de reparto', | 19 | label: 'Informe general por unidad de reparto', |
20 | image: 'flete.png' | 20 | image: 'flete.png' |
21 | }, | ||
22 | { | ||
23 | label: 'Informe de reparto óptimo detallado', | ||
24 | image: 'flete.png' | ||
21 | } | 25 | } |
22 | ]; | 26 | ]; |
23 | return result; | 27 | return result; |
24 | } | 28 | } |
25 | }; | 29 | }; |
26 | }]); | 30 | }]); |
27 | 31 |