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:
@@ -62,7 +62,7 @@
|
||||
<ion-footer>
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<button class="btn-no-color" > <!-- (click)="openSendGroupMessageOptions()" -->
|
||||
<button class="btn-no-color" (click)="openSendGroupMessageOptions()">
|
||||
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -242,7 +242,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
}
|
||||
|
||||
openSendGroupMessageOptions(ev?: any){
|
||||
if(window.innerWidth <= 1024){
|
||||
if(window.innerWidth <= 701){
|
||||
console.log('mobile');
|
||||
this.openChatOptions(ev);
|
||||
}
|
||||
@@ -334,7 +334,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
*/
|
||||
|
||||
async _openChatOptions() {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
@@ -362,7 +361,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: ChatOptionsPopoverPage,
|
||||
cssClass: 'model profile-modal search-submodal',
|
||||
cssClass: 'model',
|
||||
componentProps: {
|
||||
roomId: this.roomId,
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<button (click)="notImplemented()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
<button (click)="getDoc()" class="btn-ok" shape="round" >Anexar Documento</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Marcar reunião</button>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat-options-popover',
|
||||
@@ -12,14 +15,30 @@ import { AlertService } from 'src/app/services/alert.service';
|
||||
export class ChatOptionsPopoverPage implements OnInit {
|
||||
|
||||
documents:SearchDocument[] = [];
|
||||
members: any;
|
||||
attendees: EventPerson[] = [];
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
) { }
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
|
||||
this.members = this.navParams.get('members');
|
||||
console.log(this.members);
|
||||
this.attendees = this.navParams.get('members').map((val)=>{
|
||||
return {
|
||||
Name: val.name,
|
||||
EmailAddress: val.username+"@"+environment.domain,
|
||||
IsRequired: "true",
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.attendees);
|
||||
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
@@ -37,9 +56,29 @@ export class ChatOptionsPopoverPage implements OnInit {
|
||||
|
||||
attachDocument(){
|
||||
console.log('Anexar Documento');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* getGroupContacts(room:any){
|
||||
this.showLoader = true;
|
||||
//If group is private call getGroupMembers
|
||||
if(this.room.t === 'p'){
|
||||
this.chatService.getGroupMembers(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.members = res['members'];
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
//Otherwise call getChannelMembers for públic groups
|
||||
else{
|
||||
this.chatService.getChannelMembers(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.members = res['members'];
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
} */
|
||||
|
||||
async getDoc(){
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
@@ -56,9 +95,30 @@ export class ChatOptionsPopoverPage implements OnInit {
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
console.log(res.data);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async bookMeeting() {
|
||||
console.log(this.attendees);
|
||||
this.popoverController.dismiss();
|
||||
if( window.innerWidth <= 1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: NewEventPage,
|
||||
componentProps:{
|
||||
attendees: this.attendees,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if(data){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
|
||||
<button (click)="openChangeGroupName()" class="btn-ok" shape="round" >Alterar nome do grupo</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-cancel" shape="round">Marcar Reunião</button>
|
||||
<button (click)="close()" full class="btn-cancel mobile-only" shape="round" >Cancelar</button>
|
||||
<button (click)="deleteGroup()" class="btn-delete" shape="round">Apagar grupo</button>
|
||||
</div>
|
||||
|
||||
@@ -86,4 +86,8 @@ export class ChatPopoverPage implements OnInit {
|
||||
this.modalController.dismiss('edit');
|
||||
}
|
||||
|
||||
bookMeeting(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user