mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve Agenda filter
This commit is contained in:
@@ -608,10 +608,12 @@ export class AgendaPage implements OnInit {
|
||||
case "Pessoal":
|
||||
//Inicializa o array eventSource
|
||||
this.eventSource=[];
|
||||
if(this.profile == "mdgpr"){
|
||||
if(this.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=[];
|
||||
this.eventsListPessoal= [];
|
||||
|
||||
|
||||
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
|
||||
// loop
|
||||
@@ -628,7 +630,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
const list = this.timelineFilter(this.timelineFilterState, this.eventsList, 'md');
|
||||
const list = this.timelineFilter(this.timelineFilterState, this.eventsListPessoal, 'md');
|
||||
|
||||
this.events = list;
|
||||
this.TimelineMD = list;
|
||||
@@ -660,7 +662,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
const list = this.timelineFilter(this.timelineFilterState, this.eventsListOficial, 'pr');
|
||||
const list = this.timelineFilter(this.timelineFilterState, this.eventsListPessoal, 'pr');
|
||||
|
||||
this.events = list;
|
||||
// optional
|
||||
@@ -687,6 +689,7 @@ export class AgendaPage implements OnInit {
|
||||
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");
|
||||
|
||||
this.eventsListOficial.forEach(element => {
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
@@ -698,7 +701,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
const list = this.timelineFilter(this.timelineFilterState, this.eventsListOficial, 'pr');
|
||||
const list = this.timelineFilter(this.timelineFilterState, this.eventsListOficial, 'md');
|
||||
|
||||
this.events = list;
|
||||
this.TimelinePR = list;
|
||||
|
||||
Reference in New Issue
Block a user