Merge branch 'developer' into feature/chat

This commit is contained in:
tiago.kayaya
2021-04-16 10:00:34 +01:00
66 changed files with 562 additions and 502 deletions
@@ -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,10 +23,14 @@ 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>();
@Output() openEditGroup:EventEmitter<any> = new EventEmitter<any>();
constructor(
private menu: MenuController,
@@ -79,6 +83,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 +195,32 @@ 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 if(res.data == 'edit'){
console.log('CANCEL');
}
else{
this.roomName = res.data.name.split('-').join(' ');
console.log(this.roomName);
this.getRoomInfo();
//this.modalController.dismiss();
};
});
}
openSendGroupMessageOptions(ev: any){
@@ -1,6 +1,6 @@
<ion-content>
<div class="title width-100">
<div class="title-container">
<div class="title-container d-flex justify-space-between">
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
@@ -27,16 +27,19 @@ 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(){
console.log('leave');
let body = { "roomId":this.roomId, }
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
@@ -53,7 +56,7 @@ export class ChatPopoverPage implements OnInit {
});
}
});
this.popoverController.dismiss(true);
this.modalController.dismiss('leave');
}
//Delete
deleteGroup(){
@@ -72,12 +75,12 @@ export class ChatPopoverPage implements OnInit {
});
}
});
this.popoverController.dismiss(true);
this.modalController.dismiss('delete');
}
async openChangeGroupName(){
const modal = await this.modalController.create({
async openChangeGroupName(){
this.modalController.dismiss('edit');
/* const modal = await this.modalController.create({
component: EditGroupPage,
componentProps: {
roomId: this.roomId,
@@ -89,8 +92,8 @@ 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,
@@ -108,7 +108,6 @@
.actions-icon{
display: flex;
overflow: auto;
align-items: top;
justify-content: flex-end;
padding: 0 !important;
@@ -116,7 +115,6 @@
.actions-icon ion-icon{
margin-left: 5px;
font-size: 35px;
float: right;
padding: 0 !important;
}
/* .title-icon{