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
@@ -62,20 +62,25 @@ export class EventListPage implements OnInit {
if(window.location.pathname.includes('gabinete-digital')) {
this.showFilter = true
}
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
}
}
})
// select pr by default
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
const location = window.location
const pathname = location.pathname + location.search