From 66afb01c34379b273aac1bf06bd09c7580f15c6f Mon Sep 17 00:00:00 2001 From: geek Date: Fri, 16 Mar 2018 18:48:01 +0900 Subject: [PATCH] accept deny button --- .../noauth/component/list/list.component.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/packages/noauth/component/list/list.component.ts b/src/packages/noauth/component/list/list.component.ts index 708e171..02e9188 100644 --- a/src/packages/noauth/component/list/list.component.ts +++ b/src/packages/noauth/component/list/list.component.ts @@ -58,10 +58,30 @@ export class ListComponent implements OnInit, AfterContentInit { } handleAccept() { + this.store.dispatch(new ListStore.Accept(this.selected)); + this.noAuthProbes$.subscribe( + (noAuthProbes: NoAuthProbe[]) => { + this.dataSource = new MatTableDataSource(noAuthProbes); + this.dataSource.sort = this.sort; + }, + (error: RPCError) => { + console.log(error.message); + } + ); console.log(this.selected.id + ' accept'); } handleDeny() { + this.store.dispatch(new ListStore.Deny(this.selected)); + this.noAuthProbes$.subscribe( + (noAuthProbes: NoAuthProbe[]) => { + this.dataSource = new MatTableDataSource(noAuthProbes); + this.dataSource.sort = this.sort; + }, + (error: RPCError) => { + console.log(error.message); + } + ) console.log(this.selected.id + ' deny'); } }