create event from attachment

This commit is contained in:
Peter Maquiran
2024-07-12 16:55:29 +01:00
parent da8ac83a5b
commit e952cc2278
14 changed files with 512 additions and 130 deletions
@@ -118,6 +118,7 @@ export class BookMeetingModalPage implements OnInit {
sharedCalendar: Observable<TableSharedCalendar[]>
allDayCheck: boolean = false;
CalendarNameShow = true
eventRecurence = 'never';
constructor(
private modalController: ModalController,
@@ -159,6 +160,12 @@ export class BookMeetingModalPage implements OnInit {
this.postData.Category = 'Reunião'
this.postData.IsAllDayEvent = false
this.postData.EventRecurrence = {
frequency: this.eventRecurence,
until: "",
Type: '' ,
};
if (this.taskParticipants.length == 0) {
this.taskParticipants = [
// {
@@ -348,7 +355,10 @@ export class BookMeetingModalPage implements OnInit {
Category: 'Meeting',
HasAttachments: true,
IsAllDayEvent: this.postData.IsAllDayEvent,
EventRecurrence: this.postData.EventRecurrence,
EventRecurrence: {
frequency: this.eventRecurence,
until: "",
Type: '' },
Attachments: []
}
@@ -363,13 +373,13 @@ export class BookMeetingModalPage implements OnInit {
}
});
postData.Attachments = DocumentToSave;
this.postData.Attachments = DocumentToSave as any;
let loader = this.toastService.loading();
const calendar = await this.agendaDataRepository.getCalendarByUserId(this.selectedUserCalendar)
if(calendar.isOk()) {
const value = await this.agendaDataRepository.createEvent(postData, this.documents, calendar.value, tracing)
const value = await this.agendaDataRepository.createEvent(this.postData, this.documents, calendar.value, tracing)
if(value.isOk()) {
console.log(value.value)