mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
save
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="main-header">
|
||||
<div class="header-top">
|
||||
<div class="middle">
|
||||
<ion-label class="title">{{room.name.split('-').join(' ')}}</ion-label>
|
||||
<ion-label class="title">{{roomName}}</ion-label>
|
||||
</div>
|
||||
<div class="right">
|
||||
<button class="btn-no-color" (click)="openGroupMessagesOptions()">
|
||||
|
||||
@@ -23,9 +23,12 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
|
||||
|
||||
room:any;
|
||||
roomName:any;
|
||||
members:any;
|
||||
|
||||
@Input() roomId:string;
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() showEmptyContainer:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openGroupContacts:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
@@ -79,6 +82,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
this.getGroupContacts(this.room);
|
||||
this.loadGroupMessages(this.room);
|
||||
this.showLoader = false;
|
||||
@@ -190,7 +194,29 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
roomId: this.roomId,
|
||||
}
|
||||
});
|
||||
return await modal.present();
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res);
|
||||
if(res.data == 'leave'){
|
||||
console.log('LEAVE');
|
||||
|
||||
}
|
||||
else if(res.data == 'delete'){
|
||||
this.closeAllDesktopComponents.emit();
|
||||
this.showEmptyContainer.emit();
|
||||
}
|
||||
else if(res.data == 'cancel'){
|
||||
console.log('CANCEL');
|
||||
}
|
||||
else{
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
console.log(this.roomName);
|
||||
|
||||
this.getRoomInfo();
|
||||
//this.modalController.dismiss();
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
openSendGroupMessageOptions(ev: any){
|
||||
|
||||
@@ -27,17 +27,20 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
this.popoverController.dismiss();
|
||||
//this.popoverController.dismiss();
|
||||
this.modalController.dismiss('cancel');
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
this.modalController.dismiss('cancel');
|
||||
}
|
||||
}
|
||||
|
||||
//Top menu options
|
||||
//Close
|
||||
leaveGroup(){
|
||||
let body = { "roomId":this.roomId, }
|
||||
console.log('leave');
|
||||
|
||||
/* let body = { "roomId":this.roomId, }
|
||||
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
@@ -52,10 +55,8 @@ export class ChatPopoverPage implements OnInit {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
this.popoverController.dismiss(true);
|
||||
}); */
|
||||
this.modalController.dismiss('leave');
|
||||
}
|
||||
//Delete
|
||||
deleteGroup(){
|
||||
@@ -74,8 +75,9 @@ export class ChatPopoverPage implements OnInit {
|
||||
});
|
||||
}
|
||||
});
|
||||
this.popoverController.dismiss(true);
|
||||
this.modalController.dismiss('delete');
|
||||
}
|
||||
|
||||
async openChangeGroupName(){
|
||||
const modal = await this.modalController.create({
|
||||
component: EditGroupPage,
|
||||
@@ -89,7 +91,7 @@ export class ChatPopoverPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log(res.data);
|
||||
this.popoverController.dismiss(res.data);
|
||||
this.modalController.dismiss(res.data);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
getPublicationDetail(){
|
||||
this.showLoader = true;
|
||||
console.log(this.publicationId);
|
||||
//console.log(this.publicationId);
|
||||
/* console.log(this.folderId); */
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
//console.log(res);
|
||||
/* this.publication = res; */
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
|
||||
Reference in New Issue
Block a user