mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -161,6 +161,7 @@ export class AgendaPage implements OnInit {
|
||||
dropdownScrollWeal = false
|
||||
CalendarStore = CalendarStore
|
||||
listToPresent
|
||||
array = []
|
||||
|
||||
constructor(
|
||||
private alertCtrl: AlertController,
|
||||
@@ -232,6 +233,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.getFromDB();
|
||||
|
||||
const pathname = window.location.pathname
|
||||
let realoadCounter = 0
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -240,14 +243,14 @@ export class AgendaPage implements OnInit {
|
||||
this.segment = "Combinado";
|
||||
}
|
||||
if (realoadCounter != 0) {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
//this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
realoadCounter++;
|
||||
}
|
||||
});
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
//this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
});
|
||||
|
||||
window.onresize = (event) => {
|
||||
@@ -487,6 +490,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||
this.array = [];
|
||||
|
||||
this.rangeStartDate = startTime
|
||||
this.rangeEndDate = endTime
|
||||
@@ -514,6 +518,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -540,13 +545,17 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
@@ -567,6 +576,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -603,6 +613,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -614,7 +625,10 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
counter++;
|
||||
if (counter == 2) {
|
||||
this.showLoader = false;
|
||||
@@ -633,6 +647,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -644,7 +660,10 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
counter++;
|
||||
if (counter == 2) {
|
||||
this.showLoader = false;
|
||||
@@ -674,6 +693,7 @@ export class AgendaPage implements OnInit {
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -685,7 +705,10 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
if (counter == 1 || this.loggeduser.Profile == 'PR') {
|
||||
this.showLoader = false;
|
||||
}
|
||||
@@ -697,7 +720,6 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
trasnformData(response,profile) {
|
||||
let array = []
|
||||
response.forEach(element => {
|
||||
let event = {
|
||||
startTime: new Date(element.StartDate),
|
||||
@@ -708,10 +730,9 @@ export class AgendaPage implements OnInit {
|
||||
profile: profile,
|
||||
id: element.EventId,
|
||||
}
|
||||
array.push(event)
|
||||
this.array.push(event)
|
||||
});
|
||||
|
||||
this.listToPresent = array;
|
||||
this.listToPresent = this.array;
|
||||
console.log('LIST TO PRESET', this.listToPresent)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user