mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
- delete group implemented
- add group in progress
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<button class="btn-delete" shape="round">Apagar grupo</button>
|
||||
<button (click)="deleteGroup()" class="btn-delete" shape="round">Apagar grupo</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-content>
|
||||
|
||||
@@ -27,6 +27,7 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
|
||||
//Top menu options
|
||||
//Close
|
||||
leaveGroup(){
|
||||
let body = { "roomId":this.room._id, }
|
||||
if(this.room.t === 'p'){
|
||||
@@ -39,6 +40,22 @@ export class ChatPopoverPage implements OnInit {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
this.popoverController.dismiss(true);
|
||||
}
|
||||
//Delete
|
||||
deleteGroup(){
|
||||
let body = { "roomId":this.room._id, }
|
||||
if(this.room.t === 'p'){
|
||||
this.chatService.deleteGroup(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.chatService.deleteChannel(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
this.popoverController.dismiss(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user