This commit is contained in:
tiago.kayaya
2021-06-16 21:44:11 +01:00
parent aa629410d6
commit 9689fad958
2 changed files with 59 additions and 11 deletions
+47
View File
@@ -575,6 +575,53 @@ export class AgendaPage implements OnInit {
this.centralizeTimeline(500);
});
}
else if(this.profile == "pr" && this.loggeduser.Profile == 'MDGPR'){
console.log('HERE PR');
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then(
(response:any) => {
// calendar
this.eventSource=[];
this.eventsList = response;
// calendar
this.eventsList.forEach((element, eventIndex) => {
this.eventSource.push({
title: element.Subject,
startTime: new Date(element.StartDate),
endTime: new Date(element.EndDate),
allDay: false,
event: element,
calendarName: element.CalendarName,
profile: 'pr',
id: element.EventId,
});
});
const list = this.timelineFilter(this.timelineFilterState, this.eventsList, 'pr');
this.TimelineMDList = this.eventListBox(list)
this.events = list;
this.TimelinePR = list;
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
this.showTimeline = true;
this.timelineBoxCorrectHeight(500);
this.centralizeTimeline(500);
});
}
else {
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then(