mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
Merge branch 'developer-c' of https://bitbucket.org/equilibriumito/gabinete-digital into developer-c
This commit is contained in:
@@ -35,3 +35,7 @@ npm-debug.log*
|
|||||||
# Custom
|
# Custom
|
||||||
/android
|
/android
|
||||||
/package-lock.json
|
/package-lock.json
|
||||||
|
|
||||||
|
|
||||||
|
src/app/architect/
|
||||||
|
src/environments/environment.e2e.ts
|
||||||
@@ -87,7 +87,7 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'emend-message-modal',
|
path: 'emend-message-modal',
|
||||||
loadChildren: () => import('../pages/agenda/emend-message-modal/emend-message-modal.module').then( m => m.EmendMessageModalPageModule)
|
loadChildren: () => import('../pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule)
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<ion-icon class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
<ion-icon class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="btn-no-color" (click)="clearContact();openAddEvent()">
|
<button class="btn-no-color" (click)="clearContact();openAddEvent();">
|
||||||
<ion-icon class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
|
<ion-icon class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -372,6 +372,7 @@
|
|||||||
(setIntervenient)="setIntervenient($event)"
|
(setIntervenient)="setIntervenient($event)"
|
||||||
(setIntervenientCC)="setIntervenientCC($event)"
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
></app-new-event>
|
></app-new-event>
|
||||||
|
|
||||||
<!-- Edit -->
|
<!-- Edit -->
|
||||||
<app-edit-event *ngIf="mobileComponent.showEditEvent"
|
<app-edit-event *ngIf="mobileComponent.showEditEvent"
|
||||||
[taskParticipants]="taskParticipants"
|
[taskParticipants]="taskParticipants"
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export class AgendaPage implements OnInit {
|
|||||||
// this will make toggle add event and.
|
// this will make toggle add event and.
|
||||||
showEventEditOrOpen: "edit" | "add" | "" = ""
|
showEventEditOrOpen: "edit" | "add" | "" = ""
|
||||||
prEventList: Event[];
|
prEventList: Event[];
|
||||||
mdEventList: Event[]
|
mdEventList: Event[];
|
||||||
|
|
||||||
showLoader: boolean;
|
showLoader: boolean;
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ export class AgendaPage implements OnInit {
|
|||||||
const profile_ = profile == 'md'? 'mdgpr': 'pr';
|
const profile_ = profile == 'md'? 'mdgpr': 'pr';
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class=" overflow-hidden timeline-box timeline-box-event-${eventIndex} timeline-${profile_}-box-${calendarName} calendar-top${top}">
|
<div class="overflow-hidden timeline-box timeline-box-event-${eventIndex} timeline-${profile_}-box-${calendarName} calendar-top${top}">
|
||||||
<div>
|
<div>
|
||||||
<span class="timeline-start-time">${startHours.toString().padStart(2, '0')}:${startMinutos.toString().padStart(2, '0')}</span><span class="timeline-location">${eventlocation}</span>
|
<span class="timeline-start-time">${startHours.toString().padStart(2, '0')}:${startMinutos.toString().padStart(2, '0')}</span><span class="timeline-location">${eventlocation}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -474,9 +474,9 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
this.showTimelineFilterState = false;
|
this.showTimelineFilterState = false;
|
||||||
|
|
||||||
if( profile =='md'){
|
/* if( profile =='md'){
|
||||||
console.log('eventsList: ', eventsList);
|
console.log('eventsList: ', eventsList);
|
||||||
}
|
} */
|
||||||
|
|
||||||
eventsList.forEach((element, eventIndex) => {
|
eventsList.forEach((element, eventIndex) => {
|
||||||
|
|
||||||
@@ -491,6 +491,7 @@ export class AgendaPage implements OnInit {
|
|||||||
console.log('mdEvent:', element,eventIndex);
|
console.log('mdEvent:', element,eventIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log( element.CalendarName);
|
||||||
events.push({
|
events.push({
|
||||||
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName, element.Subject,startHoursOtherFormate,EndHoursOtherFormate, eventIndex, profile),
|
title: this.timeLineTemplate(startHours, element.Location, element.Body, element.CalendarName, element.Subject,startHoursOtherFormate,EndHoursOtherFormate, eventIndex, profile),
|
||||||
start: setHours(setMinutes(new Date(element.StartDate), 0), parseInt(startHours)),
|
start: setHours(setMinutes(new Date(element.StartDate), 0), parseInt(startHours)),
|
||||||
@@ -1064,4 +1065,3 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<div class="upper-content">
|
<div class="upper-content">
|
||||||
<div class="content-location">
|
<div class="content-location">
|
||||||
<div class="location-detail">
|
<div class="location-detail">
|
||||||
<ion-label >{{loadedEvent.workflowInstanceDataFields.Location}}</ion-label>
|
<ion-label >11{{loadedEvent.workflowInstanceDataFields.Location}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-calendar-type">
|
<div class="button-calendar-type">
|
||||||
<ion-button class="button-calendar-type" slot="end">{{loadedEvent.workflowInstanceDataFields.Agenda}}</ion-button>
|
<ion-button class="button-calendar-type" slot="end">{{loadedEvent.workflowInstanceDataFields.Agenda}}</ion-button>
|
||||||
|
|||||||
@@ -8,14 +8,13 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<ion-label class="title">Editar Evento inicio </ion-label>
|
<ion-label class="title">Editar Evento</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
</div>
|
</div>
|
||||||
<ion-item-sliding class="overflow-y-auto">
|
<ion-item-sliding class="overflow-y-auto">
|
||||||
|
|
||||||
|
|
||||||
<div class="px-20">
|
<div class="px-20">
|
||||||
<div class="ion-item-container width-100">
|
<div class="ion-item-container width-100">
|
||||||
<ion-input placeholder="Assunto" [(ngModel)]="postEvent.Subject"></ion-input>
|
<ion-input placeholder="Assunto" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||||
@@ -150,8 +149,8 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-people">
|
<div class="add-people" (click)="addParticipants();showAttendees=true">
|
||||||
<ion-icon (click)="addParticipants()" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -171,8 +170,8 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-people">
|
<div class="add-people" (click)="addParticipantsCC();showAttendees=true">
|
||||||
<ion-icon (click)="addParticipantsCC()" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -204,7 +203,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div hidden>
|
<div hidden>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Documentos Anexados</ion-label>
|
<ion-label>Documentos Anexados</ion-label>
|
||||||
@@ -223,6 +221,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-attendee-modal class="aside-right flex-column height-100 d-none d-md-flex pt-10"
|
<app-attendee-modal class="aside-right flex-column height-100 d-none d-md-flex pt-10"
|
||||||
|
*ngIf="showAttendees"
|
||||||
[taskParticipants]="taskParticipants"
|
[taskParticipants]="taskParticipants"
|
||||||
[taskParticipantsCc]="taskParticipantsCc"
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
[adding]="adding"
|
[adding]="adding"
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ export class EditEventPage implements OnInit {
|
|||||||
taskParticipantsCc: any = [];
|
taskParticipantsCc: any = [];
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
|
|
||||||
|
showAttendees = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
|
|||||||
@@ -31,8 +31,12 @@
|
|||||||
<ion-label class="title">{{loadedEvent.Subject}}</ion-label>
|
<ion-label class="title">{{loadedEvent.Subject}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-icon">
|
<div class="div-icon">
|
||||||
<ion-icon class="edit" (click)="editEvent()" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
<button class="btn-no-color" (click)="editEvent()">
|
||||||
<ion-icon class="delete" (click)="deleteEvent()" name="trash-sharp"></ion-icon>
|
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||||
|
</button>
|
||||||
|
<button class="btn-no-color" (click)="deleteEvent()">
|
||||||
|
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,9 +79,10 @@
|
|||||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<h5>Documentos Anexados</h5>
|
<h5>Documentos Anexados</h5>
|
||||||
<ion-item class="ion-no-margin ion-no-padding">
|
<ion-item class="ion-no-margin ion-no-padding"
|
||||||
<ion-label *ngFor="let attach of loadedAttachments"
|
*ngFor="let attach of loadedAttachments"
|
||||||
(click)="viewDocument(attach.SourceId)">
|
(click)="viewDocument(attach.SourceId)">
|
||||||
|
<ion-label>
|
||||||
<p class="attach-title-item">{{attach.SourceName}}</p>
|
<p class="attach-title-item">{{attach.SourceName}}</p>
|
||||||
<p><span class="span-left">{{attach.Stakeholders}}</span><span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yy' }}</span></p>
|
<p><span class="span-left">{{attach.Stakeholders}}</span><span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yy' }}</span></p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
|||||||
+13
-7
@@ -1,7 +1,9 @@
|
|||||||
<ion-header class="ion-no-border">
|
<ion-header class="ion-no-border">
|
||||||
<div class="header-content mx-20 d-flex justify-start">
|
<div class="header-content mx-20 d-flex justify-start">
|
||||||
<div class="header-icon-left">
|
<div class="header-icon-left">
|
||||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
<button class="btn-no-color" (click)="close()">
|
||||||
|
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-title flex-md-grow-1">
|
<div class="header-title flex-md-grow-1">
|
||||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||||
@@ -48,22 +50,26 @@
|
|||||||
<div class="content-details">
|
<div class="content-details">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p>{{customDate}}</p>
|
<p>{{customDate}}</p>
|
||||||
<p>das {{loadedEvent.workflowInstanceDataFields.StartDate}} às {{loadedEvent.workflowInstanceDataFields.EndDate}}</p>
|
<p>das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'hh:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'hh:mm'}}</p>
|
||||||
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
||||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">Repete</p>
|
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">Repete</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="middle-content">
|
<div class="middle-content">
|
||||||
|
<div *ngIf="loadedEvent.workflowInstanceDataFields.Participants">
|
||||||
<h5>Intervenientes</h5>
|
<h5>Intervenientes</h5>
|
||||||
<ion-item class="ion-no-padding ion-no-margin">
|
<div *ngFor="let att of loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||||
<p>{{loadedEvent.workflowInstanceDataFields.Participants}}</p>
|
<ion-label>{{att.Name}}</ion-label>
|
||||||
</ion-item>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h5>Detalhes</h5>
|
<h5>Detalhes</h5>
|
||||||
<ion-item class="ion-no-padding ion-no-margin">
|
<ion-item lines="none" class="ion-no-padding ion-no-margin">
|
||||||
<p>{{loadedEvent.workflowInstanceDataFields.Body}}</p>
|
<div [innerHTML]="loadedEvent.workflowInstanceDataFields.Body"></div>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="line"></div>
|
||||||
|
|
||||||
<div *ngIf="loadedAttachments" class="bottom-content">
|
<div *ngIf="loadedAttachments" class="bottom-content">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<ion-header class="ion-no-border">
|
<ion-header class="ion-no-border">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
<div class="header-icon-left">
|
<div class="header-icon-left">
|
||||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
<button class="btn-no-color" (click)="close()">
|
||||||
|
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-title">
|
<div class="header-title">
|
||||||
<label>Eventos para Aprovação</label>
|
<label>Eventos para Aprovação</label>
|
||||||
|
|||||||
+2
-2
@@ -56,7 +56,7 @@
|
|||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label *ngIf="!taskParticipants && taskParticipants.length >= 1" class="list-people-title">Adicionar intervenientes</ion-label>
|
<ion-label *ngIf="taskParticipants.length == 0" 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 taskParticipants">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label *ngIf="!taskParticipantsCc && taskParticipantsCc.length >= 1" class="list-people-title">Com conhecimento</ion-label>
|
<ion-label *ngIf="taskParticipantsCc.length == 0" class="list-people-title">Com conhecimento</ion-label>
|
||||||
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|||||||
@@ -72,12 +72,15 @@
|
|||||||
<div *ngFor="let att of loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
<div *ngFor="let att of loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||||
<ion-label>{{att.Name}}</ion-label>
|
<ion-label>{{att.Name}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="loadedEvent.workflowInstanceDataFields.Body">
|
||||||
<h5>Detalhes</h5>
|
<h5>Detalhes</h5>
|
||||||
<ion-item class="ion-no-margin ion-no-padding">
|
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||||
<p [innerHTML]="loadedEvent.workflowInstanceDataFields.Body"></p>
|
<p [innerHTML]="loadedEvent.workflowInstanceDataFields.Body"></p>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
<div class="line"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="loadedAttachments" class="bottom-content">
|
<div *ngIf="loadedAttachments" class="bottom-content">
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ export class EditEventComponent implements OnInit {
|
|||||||
minDate: string;
|
minDate: string;
|
||||||
|
|
||||||
@Input() taskParticipants: EventPerson[];
|
@Input() taskParticipants: EventPerson[];
|
||||||
@Input() taskParticipantsCc: any = [];
|
@Input() taskParticipantsCc: EventPerson[];
|
||||||
@Input() profile:string;
|
@Input() profile:string;
|
||||||
@Input() selectedSegment: string;
|
@Input() selectedSegment: string;
|
||||||
@Input() postEvent: any;
|
@Input() postEvent: Event;
|
||||||
@Output() clearContact = new EventEmitter<any>();
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
|
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@@ -45,11 +45,15 @@ export class EditEventComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
if(!this.restoreTemporaryData()){
|
||||||
|
|
||||||
if(this.postEvent){
|
if(this.postEvent){
|
||||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// attendees list
|
// attendees list
|
||||||
|
alert(JSON.stringify(this.postEvent.Attendees))
|
||||||
if(this.postEvent.Attendees != null) {
|
if(this.postEvent.Attendees != null) {
|
||||||
this.postEvent.Attendees.forEach(e =>{
|
this.postEvent.Attendees.forEach(e =>{
|
||||||
if(e.IsRequired) {
|
if(e.IsRequired) {
|
||||||
@@ -63,6 +67,9 @@ export class EditEventComponent implements OnInit {
|
|||||||
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
||||||
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||||
|
|
||||||
|
this.setIntervenient.emit(this.taskParticipants);
|
||||||
|
this.setIntervenientCC.emit(this.taskParticipantsCc);
|
||||||
|
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
|
|
||||||
if(this.postEvent.IsRecurring == false){
|
if(this.postEvent.IsRecurring == false){
|
||||||
@@ -73,11 +80,15 @@ export class EditEventComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
this.closeComponent.emit();
|
this.closeComponent.emit();
|
||||||
this.setIntervenient.emit([]);
|
this.setIntervenient.emit([]);
|
||||||
this.setIntervenientCC.emit([]);
|
this.setIntervenientCC.emit([]);
|
||||||
this.clearContact.emit();
|
this.clearContact.emit();
|
||||||
|
|
||||||
|
this.deleteTemporaryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
async save(){
|
async save(){
|
||||||
@@ -96,11 +107,14 @@ export class EditEventComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.clearPostEvent.emit();
|
this.clearPostEvent.emit();
|
||||||
|
this.deleteTemporaryData();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
async addParticipants() {
|
async addParticipants() {
|
||||||
|
|
||||||
|
this.saveTemporaryData();
|
||||||
|
|
||||||
this.openAttendeesComponent.emit({
|
this.openAttendeesComponent.emit({
|
||||||
type: "intervenient"
|
type: "intervenient"
|
||||||
});
|
});
|
||||||
@@ -109,6 +123,9 @@ export class EditEventComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async addParticipantsCc() {
|
async addParticipantsCc() {
|
||||||
|
|
||||||
|
this.saveTemporaryData();
|
||||||
|
|
||||||
this.openAttendeesComponent.emit({
|
this.openAttendeesComponent.emit({
|
||||||
type: "CC"
|
type: "CC"
|
||||||
});
|
});
|
||||||
@@ -116,4 +133,35 @@ export class EditEventComponent implements OnInit {
|
|||||||
this.clearContact.emit();
|
this.clearContact.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
saveTemporaryData(){
|
||||||
|
|
||||||
|
window['temp.path:/home/agenda/edit-event.component.ts'] = {
|
||||||
|
postEvent: this.postEvent,
|
||||||
|
eventBody: this.eventBody,
|
||||||
|
segment: this.segment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
restoreTemporaryData(): boolean{
|
||||||
|
|
||||||
|
const restoredData = window['temp.path:/home/agenda/edit-event.component.ts']
|
||||||
|
|
||||||
|
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData){
|
||||||
|
this.postEvent = restoredData.postEvent
|
||||||
|
this.eventBody = restoredData.eventBody
|
||||||
|
this.segment = restoredData.segment
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteTemporaryData(){
|
||||||
|
window['temp.path:/home/agenda/edit-event.component.ts'] = {}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
|||||||
import { EventsService } from 'src/app/services/events.service';
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
import { Event } from 'src/app/models/event.model';
|
import { Event } from 'src/app/models/event.model';
|
||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new-event',
|
selector: 'app-new-event',
|
||||||
templateUrl: './new-event.component.html',
|
templateUrl: './new-event.component.html',
|
||||||
@@ -13,7 +13,6 @@ import { ModalController } from '@ionic/angular';
|
|||||||
|
|
||||||
export class NewEventPage implements OnInit {
|
export class NewEventPage implements OnInit {
|
||||||
|
|
||||||
postEvent: Event;
|
|
||||||
eventBody: EventBody;
|
eventBody: EventBody;
|
||||||
segment:string = "true";
|
segment:string = "true";
|
||||||
|
|
||||||
@@ -27,6 +26,7 @@ export class NewEventPage implements OnInit {
|
|||||||
@Output() setIntervenient = new EventEmitter<any>();
|
@Output() setIntervenient = new EventEmitter<any>();
|
||||||
@Output() setIntervenientCC = new EventEmitter<any>();
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
|
|
||||||
|
@Input() postEvent: Event;
|
||||||
@Output() onAddEvent = new EventEmitter<any>();
|
@Output() onAddEvent = new EventEmitter<any>();
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@Output() clearContact = new EventEmitter<any>();
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
@@ -100,6 +100,23 @@ export class NewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(this.postEvent.Attendees != null) {
|
||||||
|
this.postEvent.Attendees.forEach(e =>{
|
||||||
|
if(e.IsRequired) {
|
||||||
|
this.taskParticipants.push(e);
|
||||||
|
} else {
|
||||||
|
this.taskParticipantsCc.push(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
||||||
|
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||||
|
|
||||||
|
this.setIntervenient.emit(this.taskParticipants);
|
||||||
|
this.setIntervenientCC.emit(this.taskParticipantsCc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -110,16 +127,18 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
this.cloneAllmobileComponent.emit();
|
this.cloneAllmobileComponent.emit();
|
||||||
this.clearContact.emit();
|
this.clearContact.emit();
|
||||||
|
this.setIntervenient.emit([]);
|
||||||
|
this.setIntervenientCC.emit([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
save(){
|
save(){
|
||||||
|
|
||||||
this.postEvent.Attendees = this.taskParticipants;
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
if(this.profile=='mdgpr'){
|
if(this.profile=='mdgpr') {
|
||||||
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
|
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
|
||||||
}
|
}
|
||||||
else if(this.profile=='pr'){
|
else if(this.profile=='pr') {
|
||||||
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe();
|
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +153,9 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
async addParticipants() {
|
async addParticipants() {
|
||||||
|
|
||||||
|
this.saveTemporaryData();
|
||||||
|
|
||||||
this.openAttendeesComponent.emit({
|
this.openAttendeesComponent.emit({
|
||||||
type: "intervenient"
|
type: "intervenient"
|
||||||
});
|
});
|
||||||
@@ -142,6 +164,9 @@ export class NewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async addParticipantsCc() {
|
async addParticipantsCc() {
|
||||||
|
|
||||||
|
this.saveTemporaryData();
|
||||||
|
|
||||||
this.openAttendeesComponent.emit({
|
this.openAttendeesComponent.emit({
|
||||||
type: "CC"
|
type: "CC"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
import { ContactsService } from 'src/app/services/contacts.service';
|
import { ContactsService } from 'src/app/services/contacts.service';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-attendee-modal',
|
selector: 'app-attendee-modal',
|
||||||
templateUrl: './attendee-modal.page.html',
|
templateUrl: './attendee-modal.page.html',
|
||||||
@@ -37,11 +37,11 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
|
|
||||||
this.fetchContacts("");
|
this.fetchContacts("");
|
||||||
|
|
||||||
if(this.taskParticipants == null || this.taskParticipants == undefined){
|
if(this.taskParticipants == null || this.taskParticipants == undefined) {
|
||||||
this.taskParticipants = [];
|
this.taskParticipants = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.taskParticipantsCc == null || this.taskParticipantsCc == undefined){
|
if(this.taskParticipantsCc == null || this.taskParticipantsCc == undefined) {
|
||||||
this.taskParticipantsCc = [];
|
this.taskParticipantsCc = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user