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.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 })
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -80,23 +80,16 @@ 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)
|
news.push({
|
||||||
|
startTime: new Date(element.StartDate),
|
||||||
if(!found) {
|
endTime: new Date(element.EndDate),
|
||||||
news.push({
|
allDay: false,
|
||||||
startTime: new Date(element.StartDate),
|
event: element,
|
||||||
endTime: new Date(element.EndDate),
|
calendarName: element.CalendarName,
|
||||||
allDay: false,
|
profile: profile,
|
||||||
event: element,
|
id: element.EventId,
|
||||||
calendarName: element.CalendarName,
|
CalendarId: CalendarId
|
||||||
profile: profile,
|
});
|
||||||
id: element.EventId,
|
|
||||||
CalendarId: CalendarId
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.log('found')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user