+
{
@@ -627,7 +627,7 @@ export class AgendaPage implements OnInit {
case "Pessoal":
//Inicializa o array eventSource
- if(this.profile == "mdgpr") {
+ if(this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
this.eventSource=[];
@@ -703,7 +703,7 @@ export class AgendaPage implements OnInit {
//Inicializa o array eventSource
this.eventsListOficial = [];
- if(this.profile == "mdgpr") {
+ if(this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
this.eventSource=[];
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
@@ -779,56 +779,59 @@ export class AgendaPage implements OnInit {
// calendar
let counter = 0;
- this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
- response => {
-
-
- if(this.segment == 'Oficial') {
- this.eventsList = response.filter(data => data.CalendarName == "Oficial");
- } else if (this.segment == 'Pessoal') {
- this.eventsList = response.filter(data => data.CalendarName == "Pessoal");
- } else {
- this.eventsList = response;
- }
-
- this.eventSource= this.eventSource.filter(e => e.profile != 'md');
- // loop
- this.eventsList.forEach((element, eventIndex) => {
-
- // calendar
- this.eventSource.push({
- index: eventIndex,
- title: element.Subject,
- startTime: new Date(element.StartDate),
- endTime: new Date(element.EndDate),
- allDay: false,
- event: element,
- calendarName: element.CalendarName,
- profile: 'md',
- id: element.EventId,
- });
-
- });
-
- const MDEventList = this.timelineFilter(this.timelineFilterState, this.eventsList, 'md');
-
- this.events = MDEventList;
- this.TimelineMD = MDEventList;
-
- this.myCal.update();
- this.myCal.loadEvents();
-
- this.showTimelineMD = true;
-
- counter++;
- if(counter==2){
- this.showLoader = false;
- this.timelineBoxCorrectHeight(500);
- this.centralizeTimeline(500);
- }
-
- });
+ if(this.loggeduser.Profile == 'MDGPR') {
+ this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
+ response => {
+
+ if(this.segment == 'Oficial') {
+ this.eventsList = response.filter(data => data.CalendarName == "Oficial");
+ } else if (this.segment == 'Pessoal') {
+ this.eventsList = response.filter(data => data.CalendarName == "Pessoal");
+ } else {
+ this.eventsList = response;
+ }
+
+ this.eventSource= this.eventSource.filter(e => e.profile != 'md');
+ // loop
+ this.eventsList.forEach((element, eventIndex) => {
+
+ // calendar
+ this.eventSource.push({
+ index: eventIndex,
+ title: element.Subject,
+ startTime: new Date(element.StartDate),
+ endTime: new Date(element.EndDate),
+ allDay: false,
+ event: element,
+ calendarName: element.CalendarName,
+ profile: 'md',
+ id: element.EventId,
+ });
+
+ });
+
+ const MDEventList = this.timelineFilter(this.timelineFilterState, this.eventsList, 'md');
+
+ this.events = MDEventList;
+ this.TimelineMD = MDEventList;
+
+ this.myCal.update();
+ this.myCal.loadEvents();
+
+ this.showTimelineMD = true;
+
+ counter++;
+ if(counter==2){
+ this.showLoader = false;
+ this.timelineBoxCorrectHeight(500);
+ this.centralizeTimeline(500);
+ }
+
+ });
+ }
+
+
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(
response => {
@@ -869,7 +872,7 @@ export class AgendaPage implements OnInit {
counter++;
- if(counter==2){
+ if(counter==2 || this.loggeduser.Profile == 'PR') {
this.showLoader = false;
this.timelineBoxCorrectHeight(500);
this.centralizeTimeline(500);
diff --git a/src/global.scss b/src/global.scss
index 0b6614828..647c8cbb8 100644
--- a/src/global.scss
+++ b/src/global.scss
@@ -523,25 +523,23 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
-// timeline
-.sd-timeline{
- .cal-time{
- display: none;
- }
- .cal-current-time-marker::before {
- display: none !important;
- }
-
- .timeline-box{
- left: -13%;
- position: relative;
- width: 113%;
+.timeline-container {
+ div:nth-child(3) {
+ .cal-time{
+ display: none;
+ }
+ .cal-current-time-marker::before {
+ display: none !important;
+ }
+
+ .timeline-box{
+ left: -13%;
+ position: relative;
+ width: 113%;
+ }
}
}
-
-
-
.timeline{
div.cal-event:focus{
outline: none !important;