This commit is contained in:
tiago.kayaya
2021-07-08 13:20:54 +01:00
parent 11e379d651
commit 88bdab5d65
8 changed files with 67 additions and 7 deletions
@@ -56,8 +56,9 @@ export class EditEventPage implements OnInit {
private router: Router,
) {
this.postEvent = new Event();
console.log(this.postEvent);
this.postEvent.EventRecurrence = {Type:'-1'}
this.isEventEdited = false;
this.postEvent = this.navParams.get('event');
this.caller = this.navParams.get('caller');
@@ -108,6 +109,8 @@ export class EditEventPage implements OnInit {
if(window.innerWidth > 800){
this.showAttendees=true;
}
this.getRecurrenceTypes();
}
@@ -120,6 +123,12 @@ export class EditEventPage implements OnInit {
this.router.navigate(['/home',this.caller]);
}
getRecurrenceTypes() {
this.eventsService.getRecurrenceTypes().subscribe(res=>{
console.log(res);
});
}
runValidation() {
this.validateFrom = true
@@ -161,7 +170,9 @@ export class EditEventPage implements OnInit {
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
try{
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
console.log(this.postEvent);
/* this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
if(this.initCalendarName != this.postEvent.CalendarName){
let body = {
"EventId": this.postEvent.EventId,
@@ -174,7 +185,7 @@ export class EditEventPage implements OnInit {
}, error => {
this.toastService.badRequest()
});
}); */
this.isEventEdited = true;
this.goBack();