mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix
This commit is contained in:
@@ -546,6 +546,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
else if (res.data == 'edit') {
|
||||
this.editGroup(this.roomId);
|
||||
} else if (res.data == 'addUser') {
|
||||
|
||||
this.addContacts();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -820,25 +823,27 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async addContacts() {
|
||||
|
||||
if(this.isAdmin) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
isCreated: this.isGroupCreated,
|
||||
room: this.room,
|
||||
members: this.members,
|
||||
name: this.room.name,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
isCreated: this.isGroupCreated,
|
||||
room: this.room,
|
||||
members: this.members,
|
||||
name: this.room.name,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.getRoomInfo();
|
||||
});
|
||||
}
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.getRoomInfo();
|
||||
});
|
||||
}
|
||||
|
||||
async editGroup(roomId) {
|
||||
|
||||
@@ -528,7 +528,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
|
||||
console.log(res)
|
||||
if (res.data == 'leave') {
|
||||
this.getRoomInfo();
|
||||
this.closeAllDesktopComponents.emit();
|
||||
@@ -546,6 +546,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
//this.closeAllDesktopComponents.emit();
|
||||
this.openEditGroupPage.emit(this.roomId);
|
||||
} else if (res.data == 'addUser') {
|
||||
|
||||
this.openGroupContactsPage();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -616,24 +619,26 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
async addContacts() {
|
||||
|
||||
if(this.isAdmin) {
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
isCreated: this.isGroupCreated,
|
||||
room: this.room,
|
||||
members: this.members,
|
||||
name: this.room.name,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
//this.getRoomInfo();
|
||||
});
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
isCreated: this.isGroupCreated,
|
||||
room: this.room,
|
||||
members: this.members,
|
||||
name: this.room.name,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
//this.getRoomInfo();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" >Adicionar</button>
|
||||
<button *ngIf="isAdmin" (click)="addUser()" class="btn-cancel" shape="round" >Adicionar</button>
|
||||
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
|
||||
<button *ngIf="isAdmin" (click)="openChangeGroupName()" class="btn-cancel btn-cancel mt-10" shape="round" >Alterar nome do grupo</button>
|
||||
<div class="solid"></div>
|
||||
|
||||
@@ -5,8 +5,6 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SetRoomOwnerPage } from 'src/app/modals/set-room-owner/set-room-owner.page';
|
||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -41,11 +39,11 @@ export class ChatPopoverPage implements OnInit {
|
||||
close(action:any){
|
||||
if( window.innerWidth < 701){
|
||||
this.popoverController.dismiss(action);
|
||||
this.modalController.dismiss(action);
|
||||
this.modalController.dismiss(action)
|
||||
}
|
||||
else{
|
||||
this.popoverController.dismiss(action);
|
||||
this.modalController.dismiss(action);
|
||||
this.modalController.dismiss(action)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,16 +124,24 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
});
|
||||
this.popoverController.dismiss('delete');
|
||||
this.modalController.dismiss('delete');
|
||||
this.modalController.dismiss('delete')
|
||||
}
|
||||
|
||||
async openChangeGroupName(){
|
||||
if( window.innerWidth < 701){
|
||||
this.popoverController.dismiss('edit');
|
||||
this.modalController.dismiss('edit')
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss('edit');
|
||||
this.popoverController.dismiss('edit');
|
||||
this.modalController.dismiss('edit')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async addUser() {
|
||||
this.popoverController.dismiss('addUser');
|
||||
this.modalController.dismiss('addUser')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user