This commit is contained in:
Peter Maquiran
2021-08-30 14:32:15 +01:00
parent 9edd0bc15f
commit f3f465ebc3
12 changed files with 214 additions and 49 deletions
@@ -68,6 +68,49 @@
</div>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
<ion-select placeholder="Selecione tipo de evento*"
class="d-block d-md-none"
[(ngModel)]="eventProcess.workflowInstanceDataFields.Category"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option value="Reunião">Reunião</ion-select-option>
<ion-select-option value="Viagem">Viagem</ion-select-option>
<ion-select-option value="Conferência">Conferência</ion-select-option>
<ion-select-option value="Encontro">Encontro</ion-select-option>
</ion-select>
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.Category" >
<mat-option value="Reunião">
Reunião
</mat-option>
<mat-option value="Viagem">
Viagem
</mat-option>
<mat-option value="Conferência">
Conferência
</mat-option>
<mat-option value="Encontro">
Encontro
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2 width-100">
<div class="ion-icon-class">
@@ -68,6 +68,7 @@ export class EditEventToApproveComponent implements OnInit {
workflowInstanceDataFields:{
Body: "",
OccurrenceType: '',
Category: '',
LastOccurrence: '',
ParticipantsList: [],
Agenda: '',
@@ -132,41 +133,42 @@ export class EditEventToApproveComponent implements OnInit {
async getTask() {
const result = await this.processes.GetTask(this.serialNumber).toPromise();
console.log(result);
console.log(result);
this.eventProcess = result
this.eventProcess.workflowInstanceDataFields.Category = result.workflowInstanceDataFields.EventType
this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
// description
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
this.eventProcess.workflowInstanceDataFields.Body = body
this.Location = this.eventProcess.workflowInstanceDataFields.Location
// description
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
this.eventProcess.workflowInstanceDataFields.Body = body
this.Location = this.eventProcess.workflowInstanceDataFields.Location
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
try {
this.getAttachments()
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
try {
this.getAttachments()
} catch (error) {
} catch (error) {
}
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
this.isRecurring = "Não se repete";
}
else {
this.isRecurring = "Repete";
}
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
if(e.IsRequired) {
this.taskParticipants.push(e);
} else {
this.taskParticipantsCc.push(e);
}
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
this.isRecurring = "Não se repete";
}
else {
this.isRecurring = "Repete";
}
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
if(e.IsRequired) {
this.taskParticipants.push(e);
} else {
this.taskParticipantsCc.push(e);
}
})
})
/* }) */
}
@@ -254,6 +256,7 @@ export class EditEventToApproveComponent implements OnInit {
LastOccurrence: this.eventProcess.workflowInstanceDataFields.LastOccurrence,
},
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
Category: this.eventProcess.workflowInstanceDataFields.Category
}
console.log(event);
@@ -307,14 +310,19 @@ export class EditEventToApproveComponent implements OnInit {
modal.onDidDismiss().then((data) => {
if(data){
if(data) {
data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
if(newAttendees.length) {
this.setIntervenient(newAttendees);
}
if(newAttendeesCC) {
this.setIntervenientCC(newAttendeesCC);
}
}
});
} else {