@@ -224,7 +225,7 @@
[taskParticipants]="taskParticipants"
[taskParticipantsCc]="taskParticipantsCc"
[adding]="adding"
-
+ (dynamicSetIntervenient)="dynamicSetIntervenient($event)"
>
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts
index 7a23ad41b..a20b8c146 100644
--- a/src/app/pages/agenda/edit-event/edit-event.page.ts
+++ b/src/app/pages/agenda/edit-event/edit-event.page.ts
@@ -44,17 +44,20 @@ export class EditEventPage implements OnInit {
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
}
- this.taskParticipants = [];
- this.taskParticipantsCc = [];
-
if(this.postEvent.Attendees == null){
this.taskParticipants = []
} else {
- this.taskParticipants = this.postEvent.Attendees;
+
+ this.postEvent.Attendees.forEach(e =>{
+ if(e.IsRequired){
+ this.taskParticipants.push(e);
+ } else {
+ this.taskParticipantsCc.push(e);
+ }
+ })
+
}
- this.taskParticipantsCc = [];
-
if(this.postEvent.IsRecurring == false){
this.isRecurring = "Não se repete";
}
@@ -80,7 +83,9 @@ export class EditEventPage implements OnInit {
}
save(){
-
+
+ this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
+
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
@@ -122,7 +127,6 @@ export class EditEventPage implements OnInit {
}
});
}
-
}
setIntervenient(data){
@@ -145,4 +149,10 @@ export class EditEventPage implements OnInit {
this.openAttendees();
}
+
+ dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
+ this.taskParticipants = taskParticipants;
+ this.taskParticipantsCc = taskParticipantsCc;
+ }
+
}
\ No newline at end of file
diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html
index bb2c41c9d..675385602 100644
--- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html
+++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html
@@ -117,7 +117,6 @@
- Editar Evento
+ Editar Evento agenda
@@ -130,43 +130,43 @@
-