Merge branch 'feature/agenda-new-api-peter' into feature/agenda-new-api-eudes

This commit is contained in:
Eudes Inácio
2024-06-04 10:23:01 +01:00
2 changed files with 15 additions and 7 deletions
+13 -7
View File
@@ -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
+2
View File
@@ -71,6 +71,8 @@ export class CalendarService {
}
return true
})
}
pushEvent(eventsList: EventList, profile: 'pr' | 'md', CalendarId: string) {