mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -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 { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, OnInit, Output, ViewChild } from "@angular/core";
|
||||||
import { IMovieRequests, IRequestEngineResult, IRequestsViewModel } from "../../../interfaces";
|
import { IMovieRequests, IRequestEngineResult, IRequestsViewModel } from "../../../interfaces";
|
||||||
import { NotificationService, RequestService } from "../../../services";
|
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 { catchError, map, startWith, switchMap } from 'rxjs/operators';
|
||||||
|
|
||||||
import { AuthService } from "../../../auth/auth.service";
|
import { AuthService } from "../../../auth/auth.service";
|
||||||
|
@ -164,16 +164,16 @@ export class MoviesGridComponent implements OnInit, AfterViewInit {
|
||||||
if (this.selection.isEmpty()) {
|
if (this.selection.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let tasks = new Array();
|
let tasks = new Array<Observable<IRequestEngineResult>>();
|
||||||
this.selection.selected.forEach((selected) => {
|
this.selection.selected.forEach((selected) => {
|
||||||
tasks.push(this.requestServiceV1.removeMovieRequestAsync(selected.id));
|
tasks.push(this.requestServiceV1.removeMovieRequestAsync(selected.id));
|
||||||
});
|
});
|
||||||
|
|
||||||
await Promise.all(tasks);
|
combineLatest(tasks).subscribe(() => {
|
||||||
|
|
||||||
this.notification.success(this.translateService.instant('Requests.RequestPanel.Deleted'))
|
this.notification.success(this.translateService.instant('Requests.RequestPanel.Deleted'))
|
||||||
this.selection.clear();
|
this.selection.clear();
|
||||||
this.ngAfterViewInit();
|
this.ngAfterViewInit();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public bulkApprove() {
|
public bulkApprove() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue