mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
implement change group name
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<button class="btn-ok" shape="round" >Alterar nome do grupo</button>
|
||||
<button (click)="openChangeGroupName()" class="btn-ok" shape="round" >Alterar nome do grupo</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="border-top">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { EditGroupPage } from 'src/app/pages/chat/edit-group/edit-group.page';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
|
||||
@Component({
|
||||
@@ -12,6 +13,7 @@ export class ChatPopoverPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private chatService: ChatService,
|
||||
) {
|
||||
@@ -57,5 +59,20 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
this.popoverController.dismiss(true);
|
||||
}
|
||||
async openChangeGroupName(){
|
||||
const modal = await this.modalController.create({
|
||||
component: EditGroupPage,
|
||||
componentProps: {
|
||||
room: this.room,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user