mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'feature/agenda-new-api-peter' into feature/agenda-new-api-eudes
This commit is contained in:
@@ -245,10 +245,13 @@ export class AgendaPage implements OnInit {
|
||||
this.weekToShow()
|
||||
|
||||
this.eventService.registerOnLoadCalendars(()=> {
|
||||
|
||||
this.setCalendarByDefault(true)
|
||||
const selectedCalendarIds = this.getSelectedAgendaCalendars();
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
|
||||
this.reloadCalendar()
|
||||
|
||||
this.tigerUpdate()
|
||||
})
|
||||
}
|
||||
@@ -773,8 +776,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
updateEventListBox() {
|
||||
|
||||
const selectedCalendarIds = this.getSelectedAgendaCalendars();
|
||||
this.listToPresent = this.removeDuplicatesByOwnerUserId(this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds))
|
||||
const selectedCalendarIds = this.removeDuplicatesByOwnerUserId(this.getSelectedAgendaCalendars());
|
||||
this.listToPresent = 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 })
|
||||
|
||||
@@ -281,7 +281,7 @@ export class EventsService {
|
||||
}
|
||||
|
||||
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']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
|
||||
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+'Id'] = sharedCalendar.CalendarId
|
||||
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.OwnerUserId
|
||||
this.calendarNamesType[e.FullName]['RoleId'] = sharedCalendar.CalendarRoleId
|
||||
this.calendarNamesType[e.FullName]['OwnerId'] = sharedCalendar.OwnerUserId
|
||||
this.calendarNamesType[e.FullName]['Shared'] = sharedCalendar.OwnerUserId
|
||||
|
||||
@@ -80,23 +80,16 @@ export class CalendarService {
|
||||
let news = []
|
||||
eventsList.forEach((element, eventIndex) => {
|
||||
|
||||
const found = this._eventSource.find( e => e.id == element.EventId)
|
||||
|
||||
if(!found) {
|
||||
news.push({
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: new Date(element.EndDate),
|
||||
allDay: false,
|
||||
event: element,
|
||||
calendarName: element.CalendarName,
|
||||
profile: profile,
|
||||
id: element.EventId,
|
||||
CalendarId: CalendarId
|
||||
});
|
||||
} else {
|
||||
console.log('found')
|
||||
}
|
||||
|
||||
news.push({
|
||||
startTime: new Date(element.StartDate),
|
||||
endTime: new Date(element.EndDate),
|
||||
allDay: false,
|
||||
event: element,
|
||||
calendarName: element.CalendarName,
|
||||
profile: profile,
|
||||
id: element.EventId,
|
||||
CalendarId: CalendarId
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user