fix, agenda list box not showing

This commit is contained in:
Peter Maquiran
2022-07-04 19:13:28 +01:00
parent e625fbfeb2
commit 744883bd6a
4 changed files with 28 additions and 10 deletions
+3 -3
View File
@@ -293,7 +293,7 @@
</div>
</div>
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="eventService.calendarIds.length >= 2">
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length">
<div *ngFor="let events of TimelineMDList | keyvalue;" >
<div class="EventListBox-container" >
@@ -333,8 +333,8 @@
</div>
</div>
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" >
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0" >
<div *ngFor="let events of TimelinePRList | keyvalue;">
<div class="EventListBox-container" >
+6 -2
View File
@@ -212,7 +212,7 @@ export class AgendaPage implements OnInit {
} else if (this.loggeduser.Profile == 'PR') {
this.profile = "pr";
} else {
if(this.eventService.calendarIds.length >= 2) {
if(this.eventService.usersCalendarIds.length >= 2) {
this.profile = "mdgpr";
} else if (this.eventService.hasOwnCalendar) {
this.profile = "mdgpr";
@@ -804,6 +804,8 @@ export class AgendaPage implements OnInit {
this.addEventToDB(response, "md");
let eventsList = response;
console.log('response', response);
this.CalendarStore.removeRange(startTime, endTime, 'md')
@@ -813,7 +815,9 @@ export class AgendaPage implements OnInit {
this.listToPresent = this.CalendarStore.eventSource
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
console.log('this.TimelineMDList', this.TimelineMDList);
this.myCal.update();
this.myCal.loadEvents();
+16 -5
View File
@@ -42,6 +42,8 @@ export class EventsService {
calendarIds = []
usersCalendarIds = []
hasSharedOficial: boolean = false;
hasSharedPessoal: boolean = false;
hasOwnOficial: boolean = false;
@@ -122,7 +124,7 @@ export class EventsService {
this.userCalendarNameOwnOficial = '';
this.userCalendarNameOwnPessoal = '';
this.calendarIds = [];
this.usersCalendarIds = [];
this.calendarNames = {}
this.calendarNamesAry = []
@@ -200,9 +202,14 @@ export class EventsService {
this.loggeduser.OwnerCalendars.forEach(calendar => {
if(!this.calendarIds.includes(calendar.OwnerUserId)) {
this.calendarIds.push(calendar.OwnerUserId)
if(!this.usersCalendarIds.includes(calendar.OwnerUserId)) {
this.usersCalendarIds.push(calendar.OwnerUserId)
}
if(!this.calendarIds.includes(calendar.CalendarId)) {
this.calendarIds.push(calendar.CalendarId)
}
this.hasOwnCalendar = true
if (calendar.CalendarName == 'Oficial') {
@@ -228,8 +235,12 @@ export class EventsService {
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
if(!this.calendarIds.includes(sharedCalendar.OwnerUserId)) {
this.calendarIds.push(sharedCalendar.OwnerUserId)
if(!this.usersCalendarIds.includes(sharedCalendar.OwnerUserId)) {
this.usersCalendarIds.push(sharedCalendar.OwnerUserId)
}
if(!this.calendarIds.includes(sharedCalendar.CalendarId)) {
this.calendarIds.push(sharedCalendar.CalendarId)
}
this.hasSharedCalendar = true
@@ -65,9 +65,12 @@ export class ViewEventPage implements OnInit {
this.loadedEvent = new Event();
this.eventBody = { BodyType : "1", Text : ""};
this.loadedEvent.Body = this.eventBody;
}
ngOnInit() {
this.loadEvent();
}