This commit is contained in:
Peter Maquiran
2023-07-20 16:54:58 +01:00
parent 880f154ea2
commit 4d7c80a739
49 changed files with 1114 additions and 432 deletions
@@ -86,6 +86,9 @@ export class EditEventPage implements OnInit {
private participantsPipe = new ParticipantsPipe()
sesseionStora = SessionStore
CalendarNameOwnerName = ''
CalendarNamesOptions = []
constructor(
private modalController: ModalController,
private eventsService: EventsService,
@@ -131,6 +134,9 @@ export class EditEventPage implements OnInit {
}, 500);
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this.postEvent.CalendarId)
this.changeAgenda()
}
ngOnChanges(changes: any): void {
@@ -512,4 +518,27 @@ export class EditEventPage implements OnInit {
}
changeAgenda() {
setTimeout(() => {
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial']) {
this.CalendarNamesOptions = ['Oficial']
this.postEvent.CalendarName = 'Oficial'
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
this.CalendarNamesOptions = ['Pessoal']
this.postEvent.CalendarName = 'Pessoal'
} else {
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
}
}, 50)
}
}