diff --git a/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html b/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html
index 88d942be2..4fa687149 100644
--- a/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html
+++ b/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html
@@ -60,7 +60,7 @@
|
-
+
|
diff --git a/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.ts b/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.ts
index 633ddf1c2..e8f2899c7 100644
--- a/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.ts
+++ b/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.ts
@@ -25,6 +25,7 @@ export class AlbumsGridComponent implements OnInit, AfterViewInit {
public defaultSort: string = "requestedDate";
public defaultOrder: string = "desc";
public currentFilter: RequestFilterType = RequestFilterType.All;
+ public manageOwnRequests: boolean;
public RequestFilter = RequestFilterType;
@@ -46,6 +47,7 @@ export class AlbumsGridComponent implements OnInit, AfterViewInit {
public ngOnInit() {
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
+ this.manageOwnRequests = this.auth.hasRole("ManageOwnRequests")
const defaultCount = this.storageService.get(this.storageKeyGridCount);
const defaultSort = this.storageService.get(this.storageKey);
@@ -117,16 +119,17 @@ export class AlbumsGridComponent implements OnInit, AfterViewInit {
public openOptions(request: IAlbumRequest) {
const filter = () => {
- this.dataSource = this.dataSource.filter((req) => {
- return req.id !== request.id;
- })
+ this.dataSource = this.dataSource.filter((req) => {
+ return req.id !== request.id;
+ });
};
const onChange = () => {
this.ref.detectChanges();
};
- this.onOpenOptions.emit({ request: request, filter: filter, onChange: onChange });
+ const data = { request: request, filter: filter, onChange: onChange, manageOwnRequests: this.manageOwnRequests, isAdmin: this.isAdmin };
+ this.onOpenOptions.emit(data);
}
public switchFilter(type: RequestFilterType) {
diff --git a/src/Ombi/ClientApp/src/app/services/request.service.ts b/src/Ombi/ClientApp/src/app/services/request.service.ts
index 3fe60e5f3..7eca20955 100644
--- a/src/Ombi/ClientApp/src/app/services/request.service.ts
+++ b/src/Ombi/ClientApp/src/app/services/request.service.ts
@@ -128,6 +128,7 @@ export class RequestService extends ServiceHelpers {
public approveChild(child: ITvUpdateModel): Observable {
return this.http.post(`${this.url}tv/approve`, JSON.stringify(child), {headers: this.headers});
}
+
public deleteChild(childId: number): Observable {
return this.http.delete(`${this.url}tv/child/${childId}`, {headers: this.headers});
}