Add simple alert-confirm for delete user

pull/1/head
Florian Hartwich 2017-05-14 15:41:50 +02:00
parent d5ad544a1a
commit b196cce61f
1 changed files with 5 additions and 4 deletions

View File

@ -62,11 +62,12 @@ export class UserListComponent implements OnInit {
} }
deleteUser(user: User) { deleteUser(user: User) {
if (confirm('Soll der Teilnehmer ' + user.username + ' wirklich gelöscht werden?')) {
this.userService.deleteUser(user) this.userService.deleteUser(user)
.subscribe((res) => { .subscribe((res) => {
}) })
} }
}
filterUsersByFraction(query = '', fractionFilter) { filterUsersByFraction(query = '', fractionFilter) {
this.users$ = this.userService.findUsers(query, fractionFilter); this.users$ = this.userService.findUsers(query, fractionFilter);