edit event form correct

This commit is contained in:
Eudes Inácio
2024-06-12 13:59:29 +01:00
parent 1d76cb56c2
commit e5b010940e
4 changed files with 14 additions and 4 deletions
@@ -77,7 +77,7 @@
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
<mat-select [(value)]="postEvent.CalendarName" class="width-100" [disabled]=true>
<mat-select [(value)]="postEvent.CalendarName" class="width-100" [disabled]=false>
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
Agenda {{ calendars }}
</mat-option>
@@ -170,7 +170,12 @@ export class EditEventPage implements OnInit {
}
ngOnInit() {
this.postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
if(!this.postEvent.IsRecurring) {
this.postEvent.EventRecurrence.frequency = 'never'
} else {
this.postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
}
console.log(this.postEvent?.Attachments)
console.log(this.loadedEventAttachments)
window.onresize = (event) => {
@@ -82,7 +82,7 @@
<div class="ion-input-class flex-grow-1">
<mat-form-field appearance="none" floatLabel="never" class="width-100 ">
<mat-select placeholder="Selecione agenda*" [(ngModel)]="_postEvent.CalendarName" [disabled]=true>
<mat-select placeholder="Selecione agenda*" [(ngModel)]="_postEvent.CalendarName" [disabled]=false>
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
Agenda {{ calendars }}
</mat-option>
@@ -118,7 +118,12 @@ export class EditEventPage implements OnInit {
this.loadedEventAttachments = this.postEvent.Attachments
console.log(this.postEvent)
this._postEvent = this.postEvent
this._postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
if(!this._postEvent.IsRecurring) {
this._postEvent.EventRecurrence.frequency = 'never';
} else {
this._postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
}
this.allDayCheck = this.postEvent.IsAllDayEvent;
if (!this.restoreTemporaryData()) {
// clear