From c77ac00eaeabbbaff303a2ee5fa0459d560a5ad7 Mon Sep 17 00:00:00 2001 From: Dhruv Bhavsar Date: Tue, 29 Aug 2017 20:54:54 -0400 Subject: [PATCH] Remove unused functions --- .../app/requests/tvrequests.component.ts | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/Ombi/ClientApp/app/requests/tvrequests.component.ts b/src/Ombi/ClientApp/app/requests/tvrequests.component.ts index 279593be8..e30248c24 100644 --- a/src/Ombi/ClientApp/app/requests/tvrequests.component.ts +++ b/src/Ombi/ClientApp/app/requests/tvrequests.component.ts @@ -68,9 +68,9 @@ export class TvRequestsComponent implements OnInit, OnDestroy { } }; } - transformData(datain: ITvRequests[]): any { + transformData(data: ITvRequests[]): TreeNode[] { var temp: TreeNode[] = []; - datain.forEach(function (value) { + data.forEach(function (value) { temp.push({ "data": value, "children": [{ @@ -83,7 +83,7 @@ export class TvRequestsComponent implements OnInit, OnDestroy { } private subscriptions = new Subject(); - tvRequests: ITvRequests[]; + tvRequests: TreeNode[]; searchChanged = new Subject(); searchText: string; @@ -135,11 +135,6 @@ export class TvRequestsComponent implements OnInit, OnDestroy { this.requestService.removeTvRequest(request); this.removeRequestFromUi(request); } - public removeChildRequest(request: IChildRequests) { - this.requestService.deleteChild(request) - .subscribe(); - this.removeChildRequestFromUi(request); - } public changeAvailability(request: IChildRequests, available: boolean) { request.available = available; @@ -185,12 +180,6 @@ export class TvRequestsComponent implements OnInit, OnDestroy { this.requestService.updateTvRequest(this.selectedSeason) .subscribe(); } - public denyChildSeasonRequest(request: IChildRequests) { - request.approved = false; - request.denied = true; - this.requestService.updateChild(request) - .subscribe(); - } public showChildren(request: ITvRequests) { this.selectedSeason = request; @@ -233,14 +222,6 @@ export class TvRequestsComponent implements OnInit, OnDestroy { this.tvRequests.splice(index, 1); } } - private removeChildRequestFromUi(key: IChildRequests) { - //var index = this.childRequests.indexOf(key, 0); - //if (index > -1) { - // this.childRequests.splice(index, 1); - //} - //TODO FIX THIS - } - ngOnDestroy(): void { this.subscriptions.next();