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,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 {