fix message statud bag

This commit is contained in:
Peter Maquiran
2024-08-26 09:59:30 +01:00
parent c9b50620fe
commit 0f94af5f4e
18 changed files with 285 additions and 107 deletions
@@ -19,6 +19,7 @@
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<br *ngIf="showLoader">
<button (click)="details()" class="btn-cancel" shape="round">Detalhes</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" style="min-width: 192px;">Alterar
@@ -8,6 +8,7 @@ import { ZodError } from 'zod';
import { isHttpResponse } from 'src/app/services/http.service';
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service'
import { RoomInfoPage } from '../room-info/room-info.page';
@Component({
selector: 'app-chat-popover',
@@ -112,7 +113,7 @@ export class ChatPopoverPage implements OnInit {
//Delete
async deleteGroup() {
this.showLoader = true
const result = await this.ChatServiceService.deleteRoomById(this.roomId)
@@ -144,4 +145,23 @@ export class ChatPopoverPage implements OnInit {
this.close('addUser');
}
async details() {
const modal = await this.modalController.create({
component: RoomInfoPage,
cssClass: 'modal-aside',
backdropDismiss: true,
componentProps: {
roomId: this.roomId
}
});
await modal.present();
modal.onDidDismiss().then((res)=>{
if(res.data == 'success') {
this.leaveGroup();
//this.ChatSystemService.hidingRoom(this.roomId);
}
});
}
}