mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve agenda
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
|
||||
<calendar
|
||||
class="calendar-component"
|
||||
[eventSource]="eventSource"
|
||||
[eventSource]="calendarService.eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
(onEventSelected)="onEventSelected($event)"
|
||||
@@ -173,6 +173,9 @@
|
||||
<div class="timeline-wrapper flex-grow-1 height-100" >
|
||||
|
||||
<!-- Timeline -->
|
||||
|
||||
|
||||
|
||||
<div class="height-100">
|
||||
<div class="timeline-container height-100 d-flex pt-20 pl-20 pl-20 filter-{{segment}}" >
|
||||
|
||||
@@ -218,6 +221,7 @@
|
||||
</div>
|
||||
</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="loggeduser.Profile == 'MDGPR'">
|
||||
<div *ngFor="let events of TimelineMDList | keyvalue;" >
|
||||
|
||||
@@ -27,6 +27,8 @@ import { DateAdapter } from '@angular/material/core';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { eventSource } from 'src/app/models/agenda/eventSource';
|
||||
import { eventListBox as eventListBoxComponent } from './eventListBox'
|
||||
import { CalendarService } from 'src/app/store/calendar.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-agenda',
|
||||
templateUrl: './agenda.page.html',
|
||||
@@ -162,7 +164,8 @@ export class AgendaPage implements OnInit {
|
||||
private sanitizer: DomSanitizer,
|
||||
authService: AuthService,
|
||||
private dateAdapter: DateAdapter<any>,
|
||||
private toastService: ToastService
|
||||
private toastService: ToastService,
|
||||
public calendarService: CalendarService
|
||||
) {
|
||||
this.dateAdapter.setLocale('es');
|
||||
|
||||
@@ -181,6 +184,16 @@ export class AgendaPage implements OnInit {
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.mobileComponent.showEventList = true;
|
||||
}
|
||||
|
||||
setTimeout(()=>{
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch(e) {}
|
||||
|
||||
this.updateEventListBox()
|
||||
|
||||
}, 4000)
|
||||
|
||||
}
|
||||
|
||||
@@ -300,7 +313,15 @@ export class AgendaPage implements OnInit {
|
||||
this.rangeEndDate = ev.endTime;
|
||||
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
|
||||
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch(e) {}
|
||||
|
||||
this.updateEventListBox()
|
||||
|
||||
}
|
||||
|
||||
// for calendar
|
||||
@@ -433,13 +454,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||
|
||||
try {
|
||||
this.myCal.loadEvents();
|
||||
this.myCal.update();
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
|
||||
this.eventSelectedDate = new Date(startTime);
|
||||
|
||||
this.showLoader = true;
|
||||
@@ -451,7 +465,6 @@ export class AgendaPage implements OnInit {
|
||||
switch (this.segment) {
|
||||
case "Combinado":
|
||||
//Inicializa o array eventSource
|
||||
//this.eventSource=[];
|
||||
|
||||
if(this.profile == "mdgpr" && 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') ).then(
|
||||
@@ -459,42 +472,12 @@ export class AgendaPage implements OnInit {
|
||||
(response:any) => {
|
||||
|
||||
// calendar
|
||||
// this.eventSource=[];
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'md') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
const eventsList = response;
|
||||
// loop
|
||||
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: 'md',
|
||||
id: element.EventId,
|
||||
});
|
||||
});
|
||||
this.calendarService.pushEvent(response, 'md');
|
||||
|
||||
const list = this.timelineFilter(this.timelineFilterState, eventsList, 'mdgpr');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.events = list;
|
||||
// optional
|
||||
this.TimelineMD = list;
|
||||
|
||||
console.log('TimelineMD', this.TimelineMD)
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -502,60 +485,30 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
}
|
||||
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=[];
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'pr') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
const eventsList = response;
|
||||
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
|
||||
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,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
// calendar
|
||||
this.calendarService.pushEvent(response, 'pr');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
@@ -566,32 +519,13 @@ export class AgendaPage implements OnInit {
|
||||
// this.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'pr') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = response;
|
||||
|
||||
// calendar
|
||||
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,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.calendarService.pushEvent(response, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -599,7 +533,7 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
@@ -611,36 +545,15 @@ export class AgendaPage implements OnInit {
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
// this.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'md') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
// loop
|
||||
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: 'md',
|
||||
id: element.EventId,
|
||||
});
|
||||
});
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -656,30 +569,15 @@ export class AgendaPage implements OnInit {
|
||||
//this.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'pr') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
eventsList.forEach(element => {
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: new Date(element.EndDate),
|
||||
allDay: false,
|
||||
event: element,
|
||||
profile: 'pr',
|
||||
id: element.EventId,
|
||||
});
|
||||
});
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -701,32 +599,14 @@ 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')).then((res:any) => {
|
||||
|
||||
|
||||
// this.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'md') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
|
||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
||||
|
||||
eventsList.forEach(element => {
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: new Date(element.EndDate),
|
||||
allDay: false,
|
||||
event: element,
|
||||
profile: 'md',
|
||||
id: element.EventId,
|
||||
});
|
||||
});
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -742,31 +622,14 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// this.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'pr') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
||||
eventsList.forEach(element => {
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: new Date(element.EndDate),
|
||||
allDay: false,
|
||||
event: element,
|
||||
profile: 'pr',
|
||||
id: element.EventId,
|
||||
});
|
||||
});
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -782,56 +645,33 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
} else {
|
||||
// calendar
|
||||
|
||||
let counter = 0;
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
console.log('MDGPR');
|
||||
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then( (response:any) => {
|
||||
|
||||
let eventsList = response;
|
||||
let eventsList = response;
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'md') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
|
||||
// loop
|
||||
eventsList.forEach((element, eventIndex) => {
|
||||
|
||||
// calendar
|
||||
this.eventSource.push({
|
||||
title: element.Subject,
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: this.EventTretment({
|
||||
startTime: element.StartDate,
|
||||
endTime: element.EndDate
|
||||
}),
|
||||
allDay: false,
|
||||
event: element,
|
||||
calendarName: element.CalendarName,
|
||||
profile: 'md',
|
||||
id: element.EventId,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showTimelineMD = true;
|
||||
|
||||
counter++;
|
||||
if(counter==2) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
// loop
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showTimelineMD = true;
|
||||
|
||||
counter++;
|
||||
if(counter==2) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
|
||||
}).finally(()=> {
|
||||
counter++;
|
||||
if(counter==2) {
|
||||
@@ -844,31 +684,12 @@ export class AgendaPage implements OnInit {
|
||||
let eventsList = response;
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'pr') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
eventsList.forEach((element, eventIndex) => {
|
||||
// calendar
|
||||
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
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -887,7 +708,6 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
} 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((response:any) => {
|
||||
@@ -902,36 +722,13 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
// clear the current month only
|
||||
this.eventSource = this.eventSource.filter((e)=> {
|
||||
if(new Date(startTime).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(endTime).getTime() >= new Date(e.endTime).getTime() && e.profile == 'pr') {
|
||||
console.log('remove from agenda')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
eventsList.forEach((element, eventIndex) => {
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
// calendar
|
||||
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,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
this.TimelinePR = this.timelineFilter(this.timelineFilterState, eventsList, 'pr');
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -955,8 +752,13 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
updateEventListBox() {
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
console.log('list',JSON.stringify(this.calendarService.eventSource))
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
console.log('this.TimelineMDList', this.TimelineMDList)
|
||||
|
||||
}
|
||||
|
||||
eventListBox(list, nice?) {
|
||||
|
||||
@@ -46,13 +46,7 @@ export class eventListBox {
|
||||
eventSource = this.filterProfile(eventSource, profile)
|
||||
}
|
||||
|
||||
|
||||
eventSource = this.getEventInsideRange(eventSource, rangeStartDate, randEndDate)
|
||||
|
||||
if(profile == 'pr') {
|
||||
console.log('run', profile)
|
||||
console.log(eventSource)
|
||||
}
|
||||
|
||||
if(profile == 'md') {
|
||||
eventSource = this.encapsulation(eventSource, 'mdgpr');
|
||||
@@ -220,7 +214,6 @@ export class eventListBox {
|
||||
}
|
||||
})
|
||||
}, 10)
|
||||
|
||||
return days
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user