-implement create chat group

This commit is contained in:
tiago.kayaya
2021-01-21 16:27:04 +01:00
parent 608eee8cc2
commit f3c15e603a
56 changed files with 462 additions and 501 deletions
+16 -7
View File
@@ -1,6 +1,6 @@
import { analyzeAndValidateNgModules } from '@angular/compiler';
import { Component, OnInit } from '@angular/core';
import { ModalController, PickerController, PopoverController } from '@ionic/angular';
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
@@ -10,17 +10,22 @@ import { GroupContactsPage } from '../group-messages/group-contacts/group-contac
styleUrls: ['./new-group.page.scss'],
})
export class NewGroupPage implements OnInit {
isGroupCreated:boolean;
showLoader: boolean;
displayDuration: any;
showDuration: boolean;
selectedDuration = ['','',''];
groupName:string;
constructor(
private pickerController: PickerController,
private popoverController: PopoverController,
private modalController: ModalController,
) {
private modalController: ModalController,
private navParams: NavParams,
)
{
this.isGroupCreated = false;
this.groupName = this.navParams.get('name');
}
ngOnInit() {
@@ -34,16 +39,20 @@ export class NewGroupPage implements OnInit {
}
async addContacts(){
this.close();
this.modalController.dismiss();
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {},
componentProps: {
isCreated:this.isGroupCreated,
name:this.groupName,
duration:'',
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
}