This commit is contained in:
tiago.kayaya
2021-07-23 14:43:51 +01:00
parent 9bcc06add2
commit b5e1ad4201
17 changed files with 194 additions and 203 deletions
@@ -37,11 +37,10 @@ export class GroupContactsPage implements OnInit {
private chatService: ChatService,
private authService: AuthService,
private navParams: NavParams,
)
)
{
this.authService.userData$.subscribe((res:any)=>{
this.loggedUser=res;
});
this.loggedUser = authService.ValidatedUserChat['data'];
this.textSearch="";
this.dm=null;
this.room=null;
@@ -95,7 +94,7 @@ export class GroupContactsPage implements OnInit {
loadUsers(){
this.options = {
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
@@ -115,7 +114,7 @@ export class GroupContactsPage implements OnInit {
return 0;
});
console.log(this.users);
this.showLoader = false;
});
}
@@ -143,7 +142,7 @@ export class GroupContactsPage implements OnInit {
async close(){
this.modalController.dismiss();
if(this.isGroupCreated){
console.log('go to conversa');
console.log('go to conversa');
}
else{
this.modalController.dismiss();
@@ -167,12 +166,12 @@ export class GroupContactsPage implements OnInit {
}
clicked(){
console.log('clicked');
}
selectedContact(user:any){
/* this.groupName = this.room.name; */
user.isChecked = !user.isChecked;
}
addContacts(room:any){
@@ -185,11 +184,11 @@ export class GroupContactsPage implements OnInit {
let body ={
"roomId":room._id,
"userId":user._id,
}
this.chatService.addUserToGroup(body).subscribe(res=>{
console.log(res['success']);
});
});
});
}
@@ -202,9 +201,9 @@ export class GroupContactsPage implements OnInit {
console.log(res['group']);
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
});
}
else{
this.addContacts(this.room);
@@ -212,12 +211,12 @@ export class GroupContactsPage implements OnInit {
/* this.openGroupMessages(this.room); */
/* this.chatService.getGroupInfo(this.room._id).subscribe(res=>{
console.log(res);
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
}) */
}
}
}
async newGroup(){
@@ -237,7 +236,7 @@ export class GroupContactsPage implements OnInit {
component: GroupMessagesPage,
componentProps: {
room: room,
},
},
cssClass: 'group-messages',
backdropDismiss: false
});