new changes done

This commit is contained in:
Eudes Inácio
2024-06-14 09:18:56 +01:00
parent 1a42c1cdce
commit b9c81f4cef
4 changed files with 29 additions and 17 deletions
@@ -104,16 +104,16 @@
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
<!-- <input matInput type="text" > -->
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="_postEvent.Category">
<mat-option value=1>
<mat-option value="Meeting">
Reunião
</mat-option>
<mat-option value=2>
<mat-option value="Travel">
Viagem
</mat-option>
<mat-option value=3>
<mat-option value="Conference">
Conferência
</mat-option>
<mat-option value=4>
<mat-option value="Encontro">
Encontro
</mat-option>
</mat-select>
@@ -116,9 +116,9 @@ export class EditEventPage implements OnInit {
ngOnInit() {
this.loadedEventAttachments = this.postEvent.Attachments
console.log(this.postEvent)
console.log(this.postEvent.Category)
this._postEvent = this.postEvent
this.setCalendarNameValue(this._postEvent.CalendarName);
this._postEvent.Category = this.setEventType(this._postEvent.Category)
if (!this._postEvent.IsRecurring) {
this._postEvent.EventRecurrence.frequency = 'never';
} else {
@@ -774,12 +774,14 @@ export class EditEventPage implements OnInit {
return date
}
setCalendarNameValue(calendarName) {
var selectedCalendar = {
1: 'Oficial',
2: 'Pessoal'
setEventType(eventType) {
var selectedEventType = {
1: 'Meeting',
2: 'Travel',
3: 'Conference',
4: 'Encontro'
}
return selectedCalendar[calendarName];
return selectedEventType[eventType];
}
}