|
|
|
@ -9,7 +9,7 @@ import { NgFor, NgIf } from '@angular/common';
|
|
|
|
|
styleUrls: ['./friend-page.component.css']
|
|
|
|
|
})
|
|
|
|
|
export class FriendPageComponent implements OnInit {
|
|
|
|
|
listFriend: {username: string, status: string}[] = [];
|
|
|
|
|
protected listFriend: {username: string, status: string, friend_user_id: string}[] = [];
|
|
|
|
|
userId: string = "";
|
|
|
|
|
status: string = "";
|
|
|
|
|
|
|
|
|
@ -30,7 +30,8 @@ export class FriendPageComponent implements OnInit {
|
|
|
|
|
this.friendService.getFriendById(userId).subscribe((friendData: any) => {
|
|
|
|
|
this.listFriend.push({
|
|
|
|
|
username: friendData.username,
|
|
|
|
|
status: status
|
|
|
|
|
status: status,
|
|
|
|
|
friend_user_id: userId
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
@ -38,4 +39,8 @@ export class FriendPageComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onAcceptOrDeny(friend_user_id: string, choice: string){
|
|
|
|
|
this.friendService.acceptOrDenyFriendById(friend_user_id,choice).subscribe()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|