Commit 6336c2a99c061a40be537b3392998a6486b66212
Exists in
master
Merge branch 'master' into 'master'
Master See merge request !3
Showing
3 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -37,41 +37,34 @@ angular.module('focaEstadoCisternas') |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | ); |
| 40 | - modalInstance.result.then( | |
| 41 | - function(transportista) { | |
| 42 | - elegirTransportista(transportista); | |
| 43 | - }, function() { | |
| 44 | - | |
| 45 | - } | |
| 46 | - ); | |
| 40 | + return modalInstance.result; | |
| 47 | 41 | }; |
| 48 | 42 | |
| 49 | 43 | $scope.seleccionarVehiculo = function() { |
| 50 | - if(!$scope.idTransportista) { | |
| 51 | - focaModalService.alert('Primero seleccione un transportista'); | |
| 52 | - return; | |
| 53 | - } | |
| 54 | - var query = '/vehiculo/transportista/' + $scope.idTransportista; | |
| 55 | - var columnas = { | |
| 56 | - nombre: ['Código', 'tractor', 'Semi', 'Capacidad'], | |
| 57 | - propiedad: ['codigo', 'tractor', 'semi', 'capacidadTotalCisternas'] | |
| 58 | - }; | |
| 59 | - var titulo = 'Búsqueda de vehículos'; | |
| 44 | + $scope.seleccionarTransportista().then( | |
| 45 | + function(transportista) { | |
| 46 | + elegirTransportista(transportista); | |
| 60 | 47 | |
| 61 | - focaModalService.modal(columnas, query, titulo).then( | |
| 62 | - function(vehiculo) { | |
| 63 | - $scope.$broadcast('addCabecera', { | |
| 64 | - label: 'Vehículo:', | |
| 65 | - valor: vehiculo.codigo | |
| 66 | - }); | |
| 67 | - $scope.cisternas = vehiculo.cisternas; | |
| 68 | - getEstadosCisternas($scope.cisternas); | |
| 69 | - }, function() { | |
| 70 | - // funcion ejecutada cuando se cancela el modal | |
| 71 | - }); | |
| 48 | + var query = '/vehiculo/transportista/' + $scope.idTransportista; | |
| 49 | + var columnas = { | |
| 50 | + nombre: ['Código', 'tractor', 'Semi', 'Capacidad'], | |
| 51 | + propiedad: ['codigo', 'tractor', 'semi', 'capacidadTotalCisternas'] | |
| 52 | + }; | |
| 53 | + var titulo = 'Búsqueda de vehículos'; | |
| 54 | + | |
| 55 | + focaModalService.modal(columnas, query, titulo).then( | |
| 56 | + function(vehiculo) { | |
| 57 | + $scope.$broadcast('addCabecera', { | |
| 58 | + label: 'Vehículo:', | |
| 59 | + valor: vehiculo.codigo | |
| 60 | + }); | |
| 61 | + $scope.cisternas = vehiculo.cisternas; | |
| 62 | + getEstadosCisternas($scope.cisternas); | |
| 63 | + }, function() {}); | |
| 64 | + }, function() {}); | |
| 72 | 65 | }; |
| 73 | 66 | |
| 74 | - $scope.seleccionarFecha = function() { | |
| 67 | + $scope.seleccionarFechaEntrega = function() { | |
| 75 | 68 | focaModalService.modalFecha('Fecha').then(function(fecha) { |
| 76 | 69 | $scope.$broadcast('addCabecera', { |
| 77 | 70 | label: 'Fecha:', |
src/js/service.js
| ... | ... | @@ -29,15 +29,11 @@ angular.module('focaEstadoCisternas') |
| 29 | 29 | getBotonera: function() { |
| 30 | 30 | return [ |
| 31 | 31 | { |
| 32 | - label: 'Transportista', | |
| 33 | - image: 'transportista.png' | |
| 34 | - }, | |
| 35 | - { | |
| 36 | 32 | label: 'Vehiculo', |
| 37 | 33 | image: 'vehiculos.png' |
| 38 | 34 | }, |
| 39 | 35 | { |
| 40 | - label: 'Fecha', | |
| 36 | + label: 'Fecha entrega', | |
| 41 | 37 | image: 'fechaDeReparto.png' |
| 42 | 38 | }, |
| 43 | 39 | { |
src/views/foca-estado-cisterna.html
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | <div class="col-12 col-md-10 p-0 mt-4 border border-white rounded"> |
| 10 | 10 | <div class="row px-5 py-2 botonera-secundaria"> |
| 11 | 11 | <div class="col-12"> |
| 12 | - <foca-botonera-facturador botones="botonera" extra="2" class="row"> | |
| 12 | + <foca-botonera-facturador botones="botonera" extra="3" class="row"> | |
| 13 | 13 | </foca-botonera-facturador> |
| 14 | 14 | </div> |
| 15 | 15 | </div> |