change home

This commit is contained in:
Peter Maquiran
2023-06-19 12:15:39 +01:00
parent 64e0760e62
commit f849610b8c
20 changed files with 145 additions and 73 deletions
@@ -49,18 +49,21 @@ export class EventListPage implements OnInit {
}
ngAfterViewInit(): void {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
this.eventService.onCalendarFinishLoad.subscribe(() => {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// select pr by default
const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
if(pr) {
this.segment = pr.OwnerUserId
}
}
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
})
}
ngOnInit() {