mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 17:22:54 -07:00
fix(request-list): 🐛 Fixed an issue where the bulk delete would not work for movie requests
This commit is contained in:
parent
332d9344d0
commit
4b540fb45b
1 changed files with 7 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
import { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, OnInit, Output, ViewChild } from "@angular/core";
|
||||
import { IMovieRequests, IRequestEngineResult, IRequestsViewModel } from "../../../interfaces";
|
||||
import { NotificationService, RequestService } from "../../../services";
|
||||
import { Observable, forkJoin, merge, of as observableOf } from 'rxjs';
|
||||
import { Observable, combineLatest, forkJoin, merge, of as observableOf } from 'rxjs';
|
||||
import { catchError, map, startWith, switchMap } from 'rxjs/operators';
|
||||
|
||||
import { AuthService } from "../../../auth/auth.service";
|
||||
|
@ -164,16 +164,16 @@ export class MoviesGridComponent implements OnInit, AfterViewInit {
|
|||
if (this.selection.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
let tasks = new Array();
|
||||
let tasks = new Array<Observable<IRequestEngineResult>>();
|
||||
this.selection.selected.forEach((selected) => {
|
||||
tasks.push(this.requestServiceV1.removeMovieRequestAsync(selected.id));
|
||||
});
|
||||
|
||||
await Promise.all(tasks);
|
||||
|
||||
this.notification.success(this.translateService.instant('Requests.RequestPanel.Deleted'))
|
||||
this.selection.clear();
|
||||
this.ngAfterViewInit();
|
||||
combineLatest(tasks).subscribe(() => {
|
||||
this.notification.success(this.translateService.instant('Requests.RequestPanel.Deleted'))
|
||||
this.selection.clear();
|
||||
this.ngAfterViewInit();
|
||||
});
|
||||
}
|
||||
|
||||
public bulkApprove() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue