Commit 63962ec91841c6f08c6798e3aebd27f360b50a42
1 parent
5ec68fbfc8
Exists in
master
nueva ruta servicio
Showing
2 changed files
with
2 additions
and
3 deletions
Show diff stats
src/js/service.js
1 | angular.module('focaModalInformeChofer') | 1 | angular.module('focaModalInformeChofer') |
2 | .factory('focaModalInformeChoferService', [ | 2 | .factory('focaModalInformeChoferService', [ |
3 | '$http', | 3 | '$http', |
4 | 'API_ENDPOINT', | 4 | 'API_ENDPOINT', |
5 | function($http, API_ENDPOINT) { | 5 | function($http, API_ENDPOINT) { |
6 | return { | 6 | return { |
7 | getDescargas: function(fechaDesde, fechaHasta) { | 7 | getDescargas: function(fechaDesde, fechaHasta) { |
8 | return $http.get(API_ENDPOINT.URL + '/cisterna-movimiento/groupedBy/chofer/' + | 8 | return $http.post(API_ENDPOINT.URL + '/informe/chofer', |
9 | fechaDesde + '/' + fechaHasta); | 9 | {fechaDesde: fechaDesde, fechaHasta: fechaHasta}); |
10 | }, | 10 | }, |
11 | getEmpresa: function(id) { | 11 | getEmpresa: function(id) { |
12 | return $http.get(API_ENDPOINT.URL + '/empresa/' + id); | 12 | return $http.get(API_ENDPOINT.URL + '/empresa/' + id); |
13 | }, | 13 | }, |
14 | getDistanciaPorIdRemito: function(ids) { | 14 | getDistanciaPorIdRemito: function(ids) { |
15 | return $http.post(API_ENDPOINT.URL + '/remito/distancia', {ids: ids}); | 15 | return $http.post(API_ENDPOINT.URL + '/remito/distancia', {ids: ids}); |
16 | } | 16 | } |
17 | }; | 17 | }; |
18 | } | 18 | } |
19 | ]); | 19 | ]); |
20 | 20 |
src/views/modal-informe-chofer.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <div class="row w-100"> | 2 | <div class="row w-100"> |
3 | <div class="col-6" ng-bind="informe.nombreEmpresa" ng-hide="buscar"></div> | 3 | <div class="col-6" ng-bind="informe.nombreEmpresa" ng-hide="buscar"></div> |
4 | <div class="col-6 text-right" ng-bind="informe.direccionEmpresa" ng-hide="buscar"></div> | 4 | <div class="col-6 text-right" ng-bind="informe.direccionEmpresa" ng-hide="buscar"></div> |
5 | <div class="col-12"><h5 class="modal-title">Informe de choferes</h5></div> | 5 | <div class="col-12"><h5 class="modal-title">Informe de choferes</h5></div> |
6 | <div class="col-12" ng-hide="buscar">Filtros: Fecha desde: {{fechaDesde | date: 'dd/MM/yyyy'}} Fecha hasta: {{fechaHasta | date: 'dd/MM/yyyy'}}</div> | 6 | <div class="col-12" ng-hide="buscar">Filtros: Fecha desde: {{fechaDesde | date: 'dd/MM/yyyy'}} Fecha hasta: {{fechaHasta | date: 'dd/MM/yyyy'}}</div> |
7 | </div> | 7 | </div> |
8 | </div> | 8 | </div> |
9 | <div class="modal-body" id="modal-body"> | 9 | <div class="modal-body" id="modal-body"> |
10 | |||
11 | <div class="input-group row" | 10 | <div class="input-group row" |
12 | ng-show="buscar"> | 11 | ng-show="buscar"> |
13 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 12 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
14 | <div class="col-md-4 col-8 input-group mb-2"> | 13 | <div class="col-md-4 col-8 input-group mb-2"> |
15 | <div class="input-group-prepend"> | 14 | <div class="input-group-prepend"> |
16 | <div class="input-group-text form-control-sm"> | 15 | <div class="input-group-text form-control-sm"> |
17 | <i class="fa fa-calendar"></i> | 16 | <i class="fa fa-calendar"></i> |
18 | </div> | 17 | </div> |
19 | </div> | 18 | </div> |
20 | <input | 19 | <input |
21 | class="form-control form-control-sm" | 20 | class="form-control form-control-sm" |
22 | id="inlineFormInputGroup" | 21 | id="inlineFormInputGroup" |
23 | type="text" | 22 | type="text" |
24 | ng-model="fechaDesde" | 23 | ng-model="fechaDesde" |
25 | ng-required="true" | 24 | ng-required="true" |
26 | uib-datepicker-popup="dd/MM/yyyy" | 25 | uib-datepicker-popup="dd/MM/yyyy" |
27 | show-button-bar="false" | 26 | show-button-bar="false" |
28 | is-open="datepickerOpen" | 27 | is-open="datepickerOpen" |
29 | on-open-focus="false" | 28 | on-open-focus="false" |
30 | ng-focus="datepickerOpen = true" | 29 | ng-focus="datepickerOpen = true" |
31 | datepicker-options="dateOptions" | 30 | datepicker-options="dateOptions" |
32 | /> | 31 | /> |
33 | </div> | 32 | </div> |
34 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 33 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
35 | <div class="col-md-4 col-8 input-group mb-2"> | 34 | <div class="col-md-4 col-8 input-group mb-2"> |
36 | <div class="input-group-prepend"> | 35 | <div class="input-group-prepend"> |
37 | <div class="input-group-text form-control-sm"> | 36 | <div class="input-group-text form-control-sm"> |
38 | <i class="fa fa-calendar"></i> | 37 | <i class="fa fa-calendar"></i> |
39 | </div> | 38 | </div> |
40 | </div> | 39 | </div> |
41 | <input | 40 | <input |
42 | class="form-control form-control-sm" | 41 | class="form-control form-control-sm" |
43 | id="inlineFormInputGroup" | 42 | id="inlineFormInputGroup" |
44 | type="text" | 43 | type="text" |
45 | ng-model="fechaHasta" | 44 | ng-model="fechaHasta" |
46 | ng-required="true" | 45 | ng-required="true" |
47 | uib-datepicker-popup="dd/MM/yyyy" | 46 | uib-datepicker-popup="dd/MM/yyyy" |
48 | show-button-bar="false" | 47 | show-button-bar="false" |
49 | is-open="datepicker2Open" | 48 | is-open="datepicker2Open" |
50 | on-open-focus="false" | 49 | on-open-focus="false" |
51 | ng-focus="datepicker2Open = true" | 50 | ng-focus="datepicker2Open = true" |
52 | /> | 51 | /> |
53 | </div> | 52 | </div> |
54 | </div> | 53 | </div> |
55 | <div | 54 | <div |
56 | ng-if="!buscar" | 55 | ng-if="!buscar" |
57 | class="row"> | 56 | class="row"> |
58 | <div class="col-12"> | 57 | <div class="col-12"> |
59 | <div | 58 | <div |
60 | class="gridInforme" | 59 | class="gridInforme" |
61 | ui-grid="gridOptions" | 60 | ui-grid="gridOptions" |
62 | ui-grid-exporter | 61 | ui-grid-exporter |
63 | ui-grid-resize-columns | 62 | ui-grid-resize-columns |
64 | ></div> | 63 | ></div> |
65 | </div> | 64 | </div> |
66 | </div> | 65 | </div> |
67 | </div> | 66 | </div> |
68 | <div class="modal-footer py-1"> | 67 | <div class="modal-footer py-1"> |
69 | <button | 68 | <button |
70 | class="btn btn-sm btn-secondary" | 69 | class="btn btn-sm btn-secondary" |
71 | type="button" | 70 | type="button" |
72 | ng-click="cancel()" | 71 | ng-click="cancel()" |
73 | ng-show="buscar">Cancelar</button> | 72 | ng-show="buscar">Cancelar</button> |
74 | <button | 73 | <button |
75 | ladda="generando" | 74 | ladda="generando" |
76 | class="btn btn-sm btn-secondary" | 75 | class="btn btn-sm btn-secondary" |
77 | type="button" | 76 | type="button" |
78 | ng-click="generarInforme()" | 77 | ng-click="generarInforme()" |
79 | ng-show="buscar">Generar</button> | 78 | ng-show="buscar">Generar</button> |
80 | <button | 79 | <button |
81 | class="btn btn-sm btn-secondary" | 80 | class="btn btn-sm btn-secondary" |
82 | type="button" | 81 | type="button" |
83 | ng-click="volver()" | 82 | ng-click="volver()" |
84 | ng-hide="buscar">Volver</button> | 83 | ng-hide="buscar">Volver</button> |
85 | </div> | 84 | </div> |
86 | 85 |