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

This commit is contained in:
Peter Maquiran
2024-06-04 11:12:38 +01:00
3 changed files with 17 additions and 21 deletions
+5 -2
View File
@@ -245,10 +245,13 @@ export class AgendaPage implements OnInit {
this.weekToShow() this.weekToShow()
this.eventService.registerOnLoadCalendars(()=> { this.eventService.registerOnLoadCalendars(()=> {
this.setCalendarByDefault(true) this.setCalendarByDefault(true)
const selectedCalendarIds = this.getSelectedAgendaCalendars(); const selectedCalendarIds = this.getSelectedAgendaCalendars();
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds) this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
this.reloadCalendar()
this.tigerUpdate() this.tigerUpdate()
}) })
} }
@@ -773,8 +776,8 @@ export class AgendaPage implements OnInit {
updateEventListBox() { updateEventListBox() {
const selectedCalendarIds = this.getSelectedAgendaCalendars(); const selectedCalendarIds = this.removeDuplicatesByOwnerUserId(this.getSelectedAgendaCalendars());
this.listToPresent = this.removeDuplicatesByOwnerUserId(this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)) this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
console.log('this.listToPresent', JSON.stringify(this.listToPresent) ) 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 }) const year = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
+2 -2
View File
@@ -281,7 +281,7 @@ export class EventsService {
} }
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName] = true this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName] = true
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName+'Id'] = OwnerCalendar.CalendarId this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName+'Id'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
this.calendarNamesType['Meu calendario']['RoleId'] = OwnerCalendar.CalendarRoleId this.calendarNamesType['Meu calendario']['RoleId'] = OwnerCalendar.CalendarRoleId
this.calendarNamesType['Meu calendario']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId this.calendarNamesType['Meu calendario']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
this.calendarNamesType['Meu calendario']['FullName'] = SessionStore.user.FullName this.calendarNamesType['Meu calendario']['FullName'] = SessionStore.user.FullName
@@ -316,7 +316,7 @@ export class EventsService {
} }
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.OwnerUserId
this.calendarNamesType[e.FullName]['RoleId'] = sharedCalendar.CalendarRoleId this.calendarNamesType[e.FullName]['RoleId'] = sharedCalendar.CalendarRoleId
this.calendarNamesType[e.FullName]['OwnerId'] = sharedCalendar.OwnerUserId this.calendarNamesType[e.FullName]['OwnerId'] = sharedCalendar.OwnerUserId
this.calendarNamesType[e.FullName]['Shared'] = sharedCalendar.OwnerUserId this.calendarNamesType[e.FullName]['Shared'] = sharedCalendar.OwnerUserId
-7
View File
@@ -80,9 +80,6 @@ export class CalendarService {
let news = [] let news = []
eventsList.forEach((element, eventIndex) => { eventsList.forEach((element, eventIndex) => {
const found = this._eventSource.find( e => e.id == element.EventId)
if(!found) {
news.push({ news.push({
startTime: new Date(element.StartDate), startTime: new Date(element.StartDate),
endTime: new Date(element.EndDate), endTime: new Date(element.EndDate),
@@ -93,10 +90,6 @@ export class CalendarService {
id: element.EventId, id: element.EventId,
CalendarId: CalendarId CalendarId: CalendarId
}); });
} else {
console.log('found')
}
}); });