diff --git a/src/Ombi/ClientApp/app/requests/movierequests.component.ts b/src/Ombi/ClientApp/app/requests/movierequests.component.ts index 950743dc4..19fc989f2 100644 --- a/src/Ombi/ClientApp/app/requests/movierequests.component.ts +++ b/src/Ombi/ClientApp/app/requests/movierequests.component.ts @@ -218,6 +218,13 @@ export class MovieRequestsComponent implements OnInit { }); } + public isRequestUser(request: IMovieRequests) { + if (request.requestedUser.userName === this.auth.claims().name) { + return true; + } + return false; + } + private filterActiveStyle(el: any) { el = el.toElement || el.relatedTarget || el.target || el.srcElement; @@ -366,10 +373,4 @@ export class MovieRequestsComponent implements OnInit { ("url(" + "https://image.tmdb.org/t/p/w1280" + req.background + ")"); } - public isRequestUser(request: IMovieRequests) { - if (request.requestedUser.userName === this.auth.claims().name) { - return true; - } - return false; - } } diff --git a/src/Ombi/ClientApp/app/requests/music/musicrequests.component.ts b/src/Ombi/ClientApp/app/requests/music/musicrequests.component.ts index 360b68c27..e70d44a38 100644 --- a/src/Ombi/ClientApp/app/requests/music/musicrequests.component.ts +++ b/src/Ombi/ClientApp/app/requests/music/musicrequests.component.ts @@ -198,6 +198,13 @@ export class MusicRequestsComponent implements OnInit { this.loadInit(); } + public isRequestUser(request: IAlbumRequest) { + if (request.requestedUser.userName === this.auth.claims().name) { + return true; + } + return false; + } + // public subscribe(request: IAlbumRequest) { // request.subscribed = true; // this.requestService.subscribeToMovie(request.id) @@ -349,10 +356,4 @@ export class MusicRequestsComponent implements OnInit { ("url(" + req.cover + ")"); } - public isRequestUser(request: IAlbumRequest) { - if (request.requestedUser.userName === this.auth.claims().name) { - return true; - } - return false; - } } diff --git a/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts b/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts index ff451e5b5..bc792a55b 100644 --- a/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts +++ b/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts @@ -111,6 +111,13 @@ export class TvRequestChildrenComponent { }); } + public isRequestUser(request: IChildRequests) { + if (request.requestedUser.userName === this.currentUser) { + return true; + } + return false; + } + private removeRequestFromUi(key: IChildRequests) { const index = this.childRequests.indexOf(key, 0); if (index > -1) { @@ -118,10 +125,4 @@ export class TvRequestChildrenComponent { } } - public isRequestUser(request: IChildRequests) { - if (request.requestedUser.userName === this.currentUser) { - return true; - } - return false; - } }