mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add book meeting in desktop component
This commit is contained in:
@@ -26,6 +26,8 @@ import { GroupContactsPageModule } from 'src/app/shared/chat/group-messages/grou
|
||||
import { MessagesPageModule } from 'src/app/shared/chat/messages/messages.module';
|
||||
import { EmptyChatPageModule } from 'src/app/shared/chat/empty-chat/empty-chat.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { NewEventPageModule } from 'src/app/shared/agenda/new-event/new-event.module';
|
||||
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -44,6 +46,8 @@ import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
EditGroupPageModule,
|
||||
GroupContactsPageModule,
|
||||
EmptyChatPageModule,
|
||||
NewEventPageModule,
|
||||
AttendeeModalPageModule,
|
||||
],
|
||||
declarations: [
|
||||
ChatPage
|
||||
|
||||
@@ -112,17 +112,20 @@
|
||||
[showMessages]="showMessages" #messagecontainer>
|
||||
|
||||
</app-messages>
|
||||
|
||||
<app-contacts
|
||||
(openMessage)="openMessagesPage($event)"
|
||||
*ngIf="showContacts"
|
||||
[style.display]="showContacts ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column">
|
||||
</app-contacts>
|
||||
|
||||
<app-new-group
|
||||
(addGroupMessage)="openGroupContactsPage($event)"
|
||||
[style.display]="showNewGroup ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column">
|
||||
</app-new-group>
|
||||
|
||||
<app-edit-group [roomId]="roomId"
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
(openGroupMessage)="openGroupMessagesPage($event)"
|
||||
@@ -130,6 +133,7 @@
|
||||
[style.display]="showEditGroup ? 'flex' : 'none'"
|
||||
class="height-100 flex-column">
|
||||
</app-edit-group>
|
||||
|
||||
<app-group-contacts
|
||||
(openGroupMessage)="openGroupMessagesPage($event)"
|
||||
*ngIf="showGroupContacts"
|
||||
@@ -137,6 +141,7 @@
|
||||
[roomId]="groupRoomId" class=" height-100 flex-column"
|
||||
>
|
||||
</app-group-contacts>
|
||||
|
||||
<app-group-messages
|
||||
*ngIf="showGroupMessages"
|
||||
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
||||
@@ -144,10 +149,40 @@
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(openGroupContacts)="openGroupContactsPage($event)"
|
||||
(openEditGroupPage)="openEditGroupPage($event)"
|
||||
(openNewEventPage)="openNewEventPage($event)"
|
||||
[style.display]="showGroupMessages ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column"
|
||||
[roomId]="roomId" #messagecontainer>
|
||||
</app-group-messages>
|
||||
|
||||
<app-new-event
|
||||
[profile]=""
|
||||
[selectedSegment]=segment
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[selectedDate]="eventSelectedDate"
|
||||
[eventAttendees]="contacts"
|
||||
(onAddEvent)="closeNewEventComponent()"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
(cloneAllmobileComponent)="closeNewEventComponent()"
|
||||
[style.display]="showNewEvent ? 'flex' : 'none'"
|
||||
[roomId]="groupRoomId"
|
||||
class=" height-100 flex-column">
|
||||
</app-new-event>
|
||||
|
||||
<app-attendee-modal
|
||||
[adding]="adding"
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
(closeComponent)="closeAttendeesComponent()"
|
||||
(setIntervenient)="setIntervenient($event)"
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
(setContact)="setContact($event)"
|
||||
[style.display]="showAttendees ? 'flex' : 'none'"
|
||||
[footer]="true"
|
||||
class=" height-100 flex-column">
|
||||
</app-attendee-modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -23,6 +23,9 @@ import * as Rx from "rxjs/Rx";
|
||||
import { Message } from 'src/app/models/message.model';
|
||||
import { Observable, Subject } from "rxjs/Rx";
|
||||
import { Router } from '@angular/router';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
@@ -70,6 +73,8 @@ export class ChatPage implements OnInit {
|
||||
showEditGroup=false;
|
||||
showGroupMessages=false;
|
||||
showGroupContacts=false;
|
||||
showNewEvent=false;
|
||||
showAttendees=false;
|
||||
emptyTextDescription = 'Sem conversa selecionada';
|
||||
|
||||
@Output() getRoomInfo;
|
||||
@@ -95,6 +100,14 @@ export class ChatPage implements OnInit {
|
||||
loggedUserChat:any;
|
||||
hideRefreshBtn = true;
|
||||
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
profile:'mdgpr' | 'pr';
|
||||
eventSelectedDate: Date = new Date();
|
||||
contacts: EventPerson[];
|
||||
showEventEditOrOpen: "edit" | "add" | "" | "eventoToApprove" = ""
|
||||
|
||||
constructor(
|
||||
private http:HttpClient,
|
||||
private chatService: ChatService,
|
||||
@@ -164,8 +177,11 @@ hideRefreshButton(){
|
||||
this.showGroupMessages=false;
|
||||
this.showEmptyComponent=false;
|
||||
this.showGroupContacts=false;
|
||||
this.showNewEvent=false;
|
||||
this.showAttendees=false;
|
||||
console.log('All components closed!');
|
||||
}
|
||||
|
||||
showEmptyContainer(){
|
||||
this.showEmptyComponent=true;
|
||||
}
|
||||
@@ -240,6 +256,57 @@ hideRefreshButton(){
|
||||
}
|
||||
}
|
||||
|
||||
openNewEventPage(data:any){
|
||||
this.taskParticipants = data.members.map((val) =>{
|
||||
return {
|
||||
Name: val.name,
|
||||
EmailAddress: val.username+"@"+environment.domain,
|
||||
IsRequired: "true",
|
||||
}
|
||||
});
|
||||
this.closeAllDesktopComponents();
|
||||
if(window.innerWidth < 801){
|
||||
console.log('Mobile');
|
||||
}
|
||||
else{
|
||||
this.showNewEvent=true;
|
||||
}
|
||||
}
|
||||
|
||||
async openAttendeesComponent(data) {
|
||||
this.adding = data.type
|
||||
this.closeAllDesktopComponents();
|
||||
this.showAttendees = true;
|
||||
}
|
||||
|
||||
async clearContact() {
|
||||
this.contacts = [];
|
||||
}
|
||||
|
||||
async setContact(data:EventPerson[]) {
|
||||
this.contacts = data;
|
||||
}
|
||||
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = removeDuplicate(data)
|
||||
|
||||
}
|
||||
|
||||
async setIntervenientCC(data) {
|
||||
this.taskParticipantsCc = removeDuplicate(data)
|
||||
}
|
||||
|
||||
async closeAttendeesComponent() {
|
||||
this.closeAllDesktopComponents();
|
||||
this.showNewEvent = true;
|
||||
}
|
||||
|
||||
async closeNewEventComponent() {
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = true;
|
||||
this.idSelected = "";
|
||||
}
|
||||
|
||||
onSegmentChange(){
|
||||
this.load();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user