mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Speedup agenda
This commit is contained in:
@@ -190,14 +190,17 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
let rrealoadCounter = 0
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
|
||||
if(event instanceof NavigationEnd && event.url == "/home/agenda") {
|
||||
if(event instanceof NavigationEnd && event.url == pathname ) {
|
||||
if (this.segment == null){
|
||||
this.segment = "Combinado";
|
||||
}
|
||||
else{
|
||||
else if ( rrealoadCounter != 0) {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
rrealoadCounter++;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -336,7 +339,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// for timeline
|
||||
|
||||
|
||||
get CalendarCurrentDay ():any {
|
||||
|
||||
/* console.log(this.viewDate.getDate(), '0_0') */
|
||||
@@ -460,6 +462,8 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date){
|
||||
|
||||
console.log('==========================================================')
|
||||
|
||||
this.eventSelectedDate = new Date(startTime);
|
||||
|
||||
@@ -774,9 +778,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
//this.showTimelinePR = false;
|
||||
//this.showTimelineMD = false;
|
||||
|
||||
// calendar
|
||||
let counter = 0;
|
||||
@@ -834,12 +835,6 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).finally(() =>{
|
||||
|
||||
counter++;
|
||||
if(counter==2) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
})
|
||||
|
||||
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) => {
|
||||
@@ -887,12 +882,6 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).finally(() =>{
|
||||
|
||||
counter++;
|
||||
if(counter==2) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user