status fix for sample_references

This commit is contained in:
VLE2FE 2020-08-10 13:30:26 +02:00
parent 126882df66
commit 449522a38b

View File

@ -486,7 +486,7 @@ export class SampleComponent implements OnInit, AfterContentChecked {
return new Observable(observer => { return new Observable(observer => {
if (value !== '') { if (value !== '') {
this.api.get<{ _id: string, number: string }[]>( this.api.get<{ _id: string, number: string }[]>(
'/samples?status=all&page-size=25&sort=number-asc&fields[]=number&fields[]=_id&' + '/samples?status[]=validated&status[]=new&page-size=25&sort=number-asc&fields[]=number&fields[]=_id&' +
'filters[]=%7B%22mode%22%3A%22stringin%22%2C%22field%22%3A%22number%22%2C%22values%22%3A%5B%22' + value + '%22%5D%7D', data => { 'filters[]=%7B%22mode%22%3A%22stringin%22%2C%22field%22%3A%22number%22%2C%22values%22%3A%5B%22' + value + '%22%5D%7D', data => {
console.log(data); console.log(data);
this.sampleReferenceAutocomplete[this.currentSRIndex] = data.map(e => e.number); this.sampleReferenceAutocomplete[this.currentSRIndex] = data.map(e => e.number);