Commit b81b4948e4171177095919ca5669cfe151c3f659
Exists in
master
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-modal-nota-pedido!5
Showing
3 changed files
Show diff stats
index.html
src/js/controller.js
... | ... | @@ -5,8 +5,9 @@ angular.module('focaModalNotaPedido') |
5 | 5 | '$scope', |
6 | 6 | '$uibModalInstance', |
7 | 7 | 'focaModalNotaPedidoService', |
8 | + 'usadoPor', | |
8 | 9 | function($filter, $scope, $uibModalInstance, |
9 | - focaModalNotaPedidoService | |
10 | + focaModalNotaPedidoService, usadoPor | |
10 | 11 | ) { |
11 | 12 | |
12 | 13 | $scope.filters = ''; |
... | ... | @@ -24,7 +25,7 @@ angular.module('focaModalNotaPedido') |
24 | 25 | $scope.busquedaPress = function(key) { |
25 | 26 | if (key === 13) { |
26 | 27 | $scope.searchLoading = true; |
27 | - focaModalNotaPedidoService.getNotasPedido().then(llenarDatos); | |
28 | + focaModalNotaPedidoService.getNotasPedido(usadoPor).then(llenarDatos); | |
28 | 29 | } |
29 | 30 | }; |
30 | 31 | function llenarDatos(res) { |
src/js/service.js
... | ... | @@ -4,8 +4,9 @@ angular.module('focaModalNotaPedido') |
4 | 4 | 'API_ENDPOINT', |
5 | 5 | function($http, API_ENDPOINT) { |
6 | 6 | return { |
7 | - getNotasPedido: function() { | |
8 | - return $http.get(API_ENDPOINT.URL + '/nota-pedido/listar'); | |
7 | + getNotasPedido: function(usadoPor) { | |
8 | + sinRemito = usadoPor === 'remito' ? '/sin-remito' : ''; | |
9 | + return $http.get(API_ENDPOINT.URL + '/nota-pedido/listar' + sinRemito); | |
9 | 10 | } |
10 | 11 | }; |
11 | 12 | } |