mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -16,6 +16,7 @@ import { ContactsPage } from 'src/app/shared/chat/messages/contacts/contacts.pag
|
||||
import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
||||
import { GroupContactsPage } from 'src/app/shared/chat/group-messages/group-contacts/group-contacts.page';
|
||||
import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -33,6 +34,7 @@ import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
ContactsPage,
|
||||
GroupMessagesPage,
|
||||
NewGroupPage,
|
||||
EditGroupPage,
|
||||
GroupContactsPage,
|
||||
EmptyChatPage,
|
||||
],
|
||||
@@ -42,6 +44,7 @@ import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
ContactsPage,
|
||||
GroupMessagesPage,
|
||||
NewGroupPage,
|
||||
EditGroupPage,
|
||||
GroupContactsPage,
|
||||
EmptyChatPage,
|
||||
]
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<app-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showMessages" #messagecontainer></app-messages>
|
||||
<app-contacts (openMessage)="openMessagesPage($event)" *ngIf="showContacts" class="d-flex height-100 flex-column"></app-contacts>
|
||||
<app-new-group (addGroupMessage)="openGroupContactsPage($event)" *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
|
||||
<app-edit-group [roomId]="roomId" *ngIf="showEditGroup" class="d-flex height-100 flex-column"></app-edit-group>
|
||||
<app-group-contacts (openGroupMessage)="openGroupMessagesPage($event)" [roomId]="groupRoomId" class="d-flex height-100 flex-column" *ngIf="showGroupContacts"></app-group-contacts>
|
||||
<app-group-messages (openGroupContacts)="openGroupContactsPage($event)" *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,7 @@ import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { NewchatPage } from './newchat/newchat.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
@@ -63,6 +64,7 @@ export class ChatPage implements OnInit {
|
||||
showMessages=false;
|
||||
showContacts=false;
|
||||
showNewGroup=false;
|
||||
showEditGroup=false;
|
||||
showGroupMessages=false;
|
||||
showGroupContacts=false;
|
||||
emptyTextDescription = 'Sem conversa selecionada';
|
||||
@@ -105,6 +107,7 @@ export class ChatPage implements OnInit {
|
||||
this.showMessages=false;
|
||||
this.showContacts=false;
|
||||
this.showNewGroup=false;
|
||||
this.showEditGroup=false;
|
||||
this.showGroupMessages=false;
|
||||
this.showEmptyComponent=false;
|
||||
this.showGroupContacts=false;
|
||||
@@ -154,6 +157,17 @@ export class ChatPage implements OnInit {
|
||||
this.showNewGroup=true;
|
||||
}
|
||||
}
|
||||
|
||||
openEditGroupPage(rid) {
|
||||
if( window.innerWidth <= 1024){
|
||||
this.editGroup(rid);
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEditGroup=true;
|
||||
}
|
||||
}
|
||||
|
||||
openGroupMessagesPage(data) {
|
||||
console.log('HERE');
|
||||
|
||||
@@ -263,6 +277,19 @@ export class ChatPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async editGroup(roomId){
|
||||
const modal = await this.modalController.create({
|
||||
component: EditGroupPage,
|
||||
cssClass: 'edit-group',
|
||||
componentProps: {
|
||||
roomId: roomId,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openMessagesModal(roomId:any){
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="left">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Alterar assunto</ion-label>
|
||||
|
||||
@@ -14,6 +14,7 @@ export class EditGroupPage implements OnInit {
|
||||
selectedDuration = ['','',''];
|
||||
groupName:string;
|
||||
room:any;
|
||||
roomId:string;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -21,12 +22,19 @@ export class EditGroupPage implements OnInit {
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
this.room = this.navParams.get('room');
|
||||
this.groupName = this.room.name.split('-').join(' ');
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.room);
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
getRoomInfo(){
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
console.log(this.room);
|
||||
this.groupName = this.room.name.split('-').join(' ');
|
||||
});
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'r'" class="info-text">
|
||||
<ion-label>Alterou o assunto de para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
||||
<ion-label>Alterou o assunto para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user