mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improvements
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<button full class="btn-delete" shape="round" >Apagar conversa</button>
|
||||
<button (click)="closeChatRoom()" full class="btn-delete" shape="round" >Apagar conversa</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PopoverController } from '@ionic/angular';
|
||||
import { NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages-options',
|
||||
@@ -8,9 +9,16 @@ import { PopoverController } from '@ionic/angular';
|
||||
})
|
||||
export class MessagesOptionsPage implements OnInit {
|
||||
|
||||
roomId:string;
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController
|
||||
) { }
|
||||
private popoverController: PopoverController,
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
)
|
||||
{
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
@@ -19,4 +27,12 @@ export class MessagesOptionsPage implements OnInit {
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
|
||||
closeChatRoom(){
|
||||
let body = { "roomId": this.roomId }
|
||||
this.chatService.removeChatRoom(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user