This commit is contained in:
tiago.kayaya
2021-07-09 11:51:22 +01:00
parent b140873df9
commit 3edb765c41
8 changed files with 16 additions and 56 deletions
@@ -71,6 +71,7 @@ export class NewEventPage implements OnInit {
) {
this.loggeduser = userService.ValidatedUser;
this.postEvent = new Event();
this.postEvent.EventRecurrence = {Type:'-1'};
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
/* this.profile = this.navParams.get('profile'); */
@@ -109,7 +110,7 @@ export class NewEventPage implements OnInit {
Organizer: '',
Categories: ['Reunião'],
HasAttachments: false,
EventRecurrence: null,
EventRecurrence: {Type:'-1'},
};
}
else{
@@ -131,7 +132,7 @@ export class NewEventPage implements OnInit {
Organizer: '',
Categories: ['Reunião'],
HasAttachments: false,
EventRecurrence: null,
EventRecurrence: {Type:'-1'},
};
}
@@ -219,6 +220,9 @@ export class NewEventPage implements OnInit {
if(this.documents.length >= 0) {
this.postEvent.HasAttachments = true;
}
if(this.selectedRecurringType != '-1'){
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
}
let eventId: any;
@@ -226,6 +230,8 @@ export class NewEventPage implements OnInit {
if(this.loggeduser.Profile == 'MDGPR') {
console.log(this.loggeduser.Profile);
console.log(this.postEvent);
eventId = await this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).toPromise();
console.log(eventId);