Commit bcf7f4c6405fed5ea8d32c2bafaf02d55b03a1b1
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !10
Showing
2 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -182,14 +182,15 @@ angular.module('focaModalDetalleHojaRuta') |
| 182 | 182 | remitoRechazado.motivoRechazo = motivo; |
| 183 | 183 | remitoRechazado.fechaRemito = |
| 184 | 184 | remitoRechazado.fechaRemito.slice(0, 19).replace('T', ' '); |
| 185 | - Promise.all([ | |
| 186 | - focaModalDetalleHojaRutaService | |
| 187 | - .rechazarRemito(remitoRechazado), | |
| 188 | - focaSeguimientoService.guardarPosicion( | |
| 189 | - 'Entrega de producto', | |
| 190 | - remitoRechazado.id, | |
| 191 | - motivo) | |
| 192 | - ]).then(success).catch(error); | |
| 185 | + focaModalDetalleHojaRutaService.rechazarRemito(remitoRechazado) | |
| 186 | + .then(function(res) { | |
| 187 | + focaSeguimientoService.guardarPosicion( | |
| 188 | + 'Entrega de producto', | |
| 189 | + res.data[1].id, | |
| 190 | + motivo); | |
| 191 | + success(); | |
| 192 | + }) | |
| 193 | + .catch(error); | |
| 193 | 194 | $scope.readonly = true; |
| 194 | 195 | }); |
| 195 | 196 | }; |
src/js/service.js
| ... | ... | @@ -17,7 +17,7 @@ angular.module('focaModalDetalleHojaRuta') |
| 17 | 17 | return $http.post(API_ENDPOINT.URL + '/hoja-ruta/movimiento', datos); |
| 18 | 18 | }, |
| 19 | 19 | rechazarRemito: function(remito) { |
| 20 | - return $http.post(API_ENDPOINT.URL + '/remito/update', {remito: remito}); | |
| 20 | + return $http.post(API_ENDPOINT.URL + '/remito/rechazar', {remito: remito}); | |
| 21 | 21 | }, |
| 22 | 22 | updatePuntoDescarga: function(puntoDescarga) { |
| 23 | 23 | return $http.post(API_ENDPOINT.URL + '/punto-descarga', |