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
@@ -298,35 +298,6 @@
</div>
</div>
<!-- <div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div (click)="openLastOccurrence()" class="ion-input-class flex-grow-1">
<mat-form-field class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="occurrrence"
placeholder="Choose a date"
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
[disabled]="disabled"
[min]="postEvent.EndDate"
>
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #occurrrence
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi"
>
</ngx-mat-datetime-picker>
</mat-form-field>
</div>
</div>
</div> -->
<div class="container-div">
<div class="ion-item-class-2">
<div class="ion-icon-class">
@@ -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)