mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -227,12 +227,11 @@
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label class="list-people-title">Com conhecimento</ion-label>
|
||||
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com conhecimento</ion-label>
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngIf="!taskParticipants" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
@@ -59,6 +59,7 @@ export class NewEventPage implements OnInit {
|
||||
documents:SearchDocument[] = [];
|
||||
|
||||
loggeduser: User;
|
||||
members:any;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -78,7 +79,9 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
this.selectedSegment = this.navParams.get('segment');
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
this.taskParticipants = this.navParams.get('attendees');
|
||||
|
||||
console.log(this.taskParticipants);
|
||||
|
||||
this.postEvent.StartDate = new Date()
|
||||
this.postEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||
@@ -232,6 +235,8 @@ export class NewEventPage implements OnInit {
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
}
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
let eventId: any;
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -12,11 +12,14 @@ import { GroupMessagesPage } from './group-messages.page';
|
||||
import { ChatPopoverPageModule } from 'src/app/shared/popover/chat-popover/chat-popover.module';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
FontAwesomeModule,
|
||||
IonicModule,
|
||||
|
||||
GroupMessagesPageRoutingModule,
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
<ion-footer>
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<button class="btn-no-color" > <!-- (click)="openChatOptions()" -->
|
||||
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
<button class="btn-no-color" (click)="openChatOptions()">
|
||||
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="width-80">
|
||||
<div class="message-box width-80">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<button hidden class="btn-no-color">
|
||||
|
||||
@@ -187,14 +187,19 @@
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
|
||||
.message-box{
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
@@ -209,6 +214,7 @@
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
|
||||
@@ -31,6 +31,7 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
|
||||
roomId: string;
|
||||
loggedUserChat:any;
|
||||
eventSelectedDate: Date = new Date();
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
|
||||
@@ -146,7 +147,6 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
}
|
||||
|
||||
async openOptions() {
|
||||
console.log('OK');
|
||||
const modal = await this.popoverController.create({
|
||||
component: ChatPopoverPage,
|
||||
cssClass: 'chat-popover',
|
||||
@@ -165,17 +165,20 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
else if(res.data == 'edit'){
|
||||
this.editGroup(this.roomId);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openChatOptions(ev?: any) {
|
||||
console.log(this.members);
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: ChatOptionsPopoverPage,
|
||||
cssClass: 'chat-options-popover',
|
||||
event: ev,
|
||||
componentProps: {
|
||||
room: this.room,
|
||||
members: this.members,
|
||||
eventSelectedDate: new Date(),
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
|
||||
@@ -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(){
|
||||
@@ -40,6 +59,26 @@ export class ChatOptionsPopoverPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/* 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,
|
||||
@@ -61,4 +100,25 @@ export class ChatOptionsPopoverPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
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