mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
save
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user