mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
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,13 +235,15 @@ 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()
|
||||
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user