mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
agenda change timeline
This commit is contained in:
@@ -16,12 +16,16 @@ export class ListBoxService {
|
||||
return eventSource.filter((e) => e.profile == profile)
|
||||
}
|
||||
|
||||
getEventInsideRange(eventSource: EventListStore[], rangeStartDate, randEndDate) {
|
||||
getEventInsideRange(eventSource: EventListStore[], rangeStartDate, randEndDate, selectedDate) {
|
||||
return eventSource.filter((e)=> {
|
||||
if(new Date(rangeStartDate).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(randEndDate).getTime() >= new Date(e.endTime).getTime()) {
|
||||
new Date(randEndDate).getTime() >= new Date(e.endTime).getTime()) {
|
||||
return true
|
||||
} else if ( new Date(selectedDate).getMonth() == new Date(e.endTime).getMonth() ||
|
||||
new Date(selectedDate).getMonth() == new Date(e.startTime).getMonth()) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
}
|
||||
@@ -47,16 +51,14 @@ export class ListBoxService {
|
||||
if(segment!='Combinado') {
|
||||
eventSource = this.filterSegment(eventSource, segment)
|
||||
}
|
||||
|
||||
eventSource = this.getEventInsideRange(eventSource, rangeStartDate, randEndDate, selectedDate)
|
||||
|
||||
// if(profile != 'all') {
|
||||
// eventSource = this.filterProfile(eventSource, profile)
|
||||
// }
|
||||
|
||||
let newStracture:CustomCalendarEvent[];
|
||||
|
||||
newStracture = this.encapsulation(eventSource);
|
||||
|
||||
return this.display(newStracture, selectedDate)
|
||||
return eventSource
|
||||
}
|
||||
|
||||
display(list: CustomCalendarEvent[], selectedDate) {
|
||||
|
||||
Reference in New Issue
Block a user