mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve attendess
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user