mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'feature/agenda-new-api-peter' into feature/agenda-new-api-eudes
This commit is contained in:
@@ -634,7 +634,7 @@ export class AgendaPage implements OnInit {
|
||||
this.rangeEndDate = endTime
|
||||
|
||||
this.showLoader = true;
|
||||
const selectedCalendarIds = this.getSelectedAgendaCalendars();
|
||||
const selectedCalendarIds = this.removeDuplicatesByOwnerUserId(this.getSelectedAgendaCalendars());
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
// this.calendar.currentDate.setDate(1);
|
||||
|
||||
@@ -647,9 +647,14 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
let load = 0;
|
||||
for (const selectedCalendar of this.removeDuplicatesByOwnerUserId(selectedCalendarIds)) {
|
||||
for (const selectedCalendar of selectedCalendarIds) {
|
||||
|
||||
const response = await this.AgendaDataRepositoryService.EventList({userId: selectedCalendar.OwnerUserId, calendarOwnerName: selectedCalendar['FullName'] })
|
||||
const response = await this.AgendaDataRepositoryService.EventList({
|
||||
userId: selectedCalendar.OwnerUserId,
|
||||
calendarOwnerName: selectedCalendar['FullName'],
|
||||
endDate: endTime.toISOString(),
|
||||
startDate: startTime.toISOString()
|
||||
})
|
||||
|
||||
if(response.isOk()) {
|
||||
let label;
|
||||
@@ -668,11 +673,11 @@ export class AgendaPage implements OnInit {
|
||||
this.CalendarStore.pushEvent(eventsList, label, selectedCalendar.OwnerUserId);
|
||||
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
// console.log('this.listToPresent', this.listToPresent)
|
||||
|
||||
this.showTimelinePR = true;
|
||||
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
if (load ==(selectedCalendarIds).length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
@@ -681,7 +686,7 @@ export class AgendaPage implements OnInit {
|
||||
this.updateEventListBox()
|
||||
} else {
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
if (load == (selectedCalendarIds).length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
@@ -769,8 +774,9 @@ export class AgendaPage implements OnInit {
|
||||
updateEventListBox() {
|
||||
|
||||
const selectedCalendarIds = this.getSelectedAgendaCalendars();
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
this.listToPresent = this.removeDuplicatesByOwnerUserId(this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds))
|
||||
|
||||
console.log('this.listToPresent', JSON.stringify(this.listToPresent) )
|
||||
const year = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
this.TimelineMDList = year
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ export class CalendarService {
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
pushEvent(eventsList: EventList, profile: 'pr' | 'md', CalendarId: string) {
|
||||
|
||||
Reference in New Issue
Block a user