mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
change agenda
This commit is contained in:
@@ -43,21 +43,17 @@ export class ListBoxService {
|
||||
// }
|
||||
|
||||
|
||||
if(segment!='Combinado') {
|
||||
eventSource = this.filterSegment(eventSource, segment)
|
||||
}
|
||||
// if(segment!='Combinado') {
|
||||
// eventSource = this.filterSegment(eventSource, segment)
|
||||
// }
|
||||
|
||||
if(profile != 'all') {
|
||||
eventSource = this.filterProfile(eventSource, profile)
|
||||
}
|
||||
// if(profile != 'all') {
|
||||
// eventSource = this.filterProfile(eventSource, profile)
|
||||
// }
|
||||
|
||||
let newStracture:CustomCalendarEvent[];
|
||||
|
||||
if(profile == 'md') {
|
||||
newStracture = this.encapsulation(eventSource, 'mdgpr');
|
||||
} else {
|
||||
newStracture = this.encapsulation(eventSource, 'pr');
|
||||
}
|
||||
newStracture = this.encapsulation(eventSource);
|
||||
|
||||
return this.display(newStracture, profile, selectedDate)
|
||||
}
|
||||
@@ -97,7 +93,7 @@ export class ListBoxService {
|
||||
|
||||
if (diffDays >= 1) {
|
||||
|
||||
const StartEvent = this.transForm(event, {startMany: true, endMany: false, middle: false, profile})
|
||||
const StartEvent = this.transForm(event, {startMany: true, endMany: false, middle: false})
|
||||
|
||||
if(this.CanPush(event, selectedDate)) days[day].push(StartEvent)
|
||||
|
||||
@@ -124,12 +120,12 @@ export class ListBoxService {
|
||||
startDate.getDate() != endDate.getDate())) {
|
||||
// last push
|
||||
|
||||
const EndEvent = this.transForm(event, {startMany: false, endMany: true, middle: false, profile})
|
||||
const EndEvent = this.transForm(event, {startMany: false, endMany: true, middle: false})
|
||||
if(this.CanPush(event, selectedDate)) days[otherDays].push(EndEvent)
|
||||
|
||||
} else {
|
||||
|
||||
const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: true, profile})
|
||||
const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: true})
|
||||
if(this.CanPush(event, selectedDate)) days[otherDays].push(EndEvent)
|
||||
}
|
||||
|
||||
@@ -172,7 +168,7 @@ export class ListBoxService {
|
||||
new Date(event.start).getDate() >= selectedDate.getDate()
|
||||
}
|
||||
|
||||
encapsulation(eventsList:EventListStore[], profile): CustomCalendarEvent[] {
|
||||
encapsulation(eventsList:EventListStore[]): CustomCalendarEvent[] {
|
||||
|
||||
// remove all event
|
||||
let events: CustomCalendarEvent[] = [];
|
||||
@@ -184,7 +180,7 @@ export class ListBoxService {
|
||||
end: new Date(element.endTime),
|
||||
id: element.id,
|
||||
event: element.event,
|
||||
profile: profile
|
||||
profile: element.profile
|
||||
});
|
||||
|
||||
});
|
||||
@@ -192,12 +188,12 @@ export class ListBoxService {
|
||||
return events;
|
||||
}
|
||||
|
||||
transForm(event: CustomCalendarEvent, {startMany, endMany, middle, profile}) {
|
||||
transForm(event: CustomCalendarEvent, {startMany, endMany, middle}) {
|
||||
return Object.assign({}, {
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
id: event.id,
|
||||
profile: profile,
|
||||
profile: event.profile,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
|
||||
@@ -277,6 +277,7 @@ export class EventsService {
|
||||
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true
|
||||
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId
|
||||
this.calendarNamesType[e.FullName]['RoleId'] = sharedCalendar.CalendarRoleId
|
||||
this.calendarNamesType[e.FullName]['OwnerId'] = sharedCalendar.OwnerUserId
|
||||
})
|
||||
}
|
||||
|
||||
@@ -295,6 +296,7 @@ export class EventsService {
|
||||
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName] = true
|
||||
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName+'Id'] = OwnerCalendar.CalendarId
|
||||
this.calendarNamesType['Meu calendario']['RoleId'] = OwnerCalendar.CalendarRoleId
|
||||
this.calendarNamesType['Meu calendario']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
|
||||
}
|
||||
|
||||
|
||||
@@ -525,9 +527,10 @@ export class EventsService {
|
||||
return this.http.get<any>(`${geturl}`, options)
|
||||
}
|
||||
|
||||
async getEventsByCalendarId( startdate: string, enddate: string, calendarIds: any[]) {
|
||||
|
||||
async getEventsByCalendarId( startdate: string, enddate: string, calendarId: string) {
|
||||
const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars)
|
||||
const agendasCalendars = calendars.filter( e => calendarIds.includes(e.CalendarId))
|
||||
const agendasCalendars = calendars.filter( e => e.CalendarId == calendarId)
|
||||
|
||||
let result = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user