feat(EnvelopeReceiverService): Status-Filteroption zu ReadByUserAsync hinzugefügt, um die Ergebnisse nach Status zu filtern
This commit is contained in:
@@ -70,6 +70,6 @@ export class EnvelopeTableComponent implements AfterViewInit {
|
||||
private readonly erService: EnvelopeReceiverService = inject(EnvelopeReceiverService);
|
||||
|
||||
async ngAfterViewInit() {
|
||||
this.data = await this.eService.getEnvelopeAsync();
|
||||
this.data = await this.eService.getEnvelopeAsync(this.options);
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,20 @@ export class EnvelopeService {
|
||||
this.url = `${api_url}/envelope`;
|
||||
}
|
||||
|
||||
public getEnvelope(): Observable<any> {
|
||||
return this.http.get(this.url);
|
||||
public getEnvelope(options?: { min_status?: number; max_status?: number; ignore_status?: number[] }): Observable<any> {
|
||||
let params = new HttpParams();
|
||||
if (options) {
|
||||
if (options.min_status)
|
||||
params = params.set('min_status', options.min_status.toString());
|
||||
if (options.max_status)
|
||||
params = params.set('max_status', options.max_status.toString());
|
||||
if (options.ignore_status)
|
||||
params = params.set('ignore_status', options.ignore_status.join(','));
|
||||
}
|
||||
return this.http.get(this.url, { params });
|
||||
}
|
||||
|
||||
public async getEnvelopeAsync(): Promise<any> {
|
||||
return await firstValueFrom(this.getEnvelope());
|
||||
public async getEnvelopeAsync(options?: { min_status?: number; max_status?: number; ignore_status?: number[] }): Promise<any> {
|
||||
return await firstValueFrom(this.getEnvelope(options));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user