mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Fix event all day
This commit is contained in:
@@ -26,10 +26,23 @@ export class ListBoxService {
|
||||
})
|
||||
}
|
||||
|
||||
filterSegment(eventSource: EventListStore[], segment): EventListStore[] {
|
||||
return eventSource.filter( data => data.calendarName == segment)
|
||||
}
|
||||
|
||||
|
||||
daysBetween(){ }
|
||||
|
||||
list(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, {segment = 'todo'}) {
|
||||
list(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, {segment = 'Combinado', selectedDate= null}) {
|
||||
|
||||
if(selectedDate) {
|
||||
eventSource = eventSource.filter(data => data.startTime.toLocaleDateString('pt')>= selectedDate.toLocaleDateString('pt'))
|
||||
}
|
||||
|
||||
if(segment!='Combinado') {
|
||||
eventSource = this.filterSegment(eventSource, segment)
|
||||
}
|
||||
|
||||
if(profile != 'all') {
|
||||
eventSource = this.filterProfile(eventSource, profile)
|
||||
}
|
||||
@@ -49,7 +62,6 @@ export class ListBoxService {
|
||||
|
||||
display(list: CustomCalendarEvent[]) {
|
||||
let days = {};
|
||||
console.log(list)
|
||||
|
||||
list.forEach( (event:CustomCalendarEvent, index)=> {
|
||||
|
||||
@@ -127,15 +139,6 @@ export class ListBoxService {
|
||||
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{
|
||||
if(e.childElementCount == 0) {
|
||||
e.parentElement.style.display = 'none'
|
||||
} else {
|
||||
e.parentElement.style.display = 'block'
|
||||
}
|
||||
})
|
||||
}, 10)
|
||||
return days
|
||||
}
|
||||
|
||||
@@ -149,18 +152,10 @@ export class ListBoxService {
|
||||
events.push({
|
||||
start: new Date(element.startTime),
|
||||
end: new Date(element.endTime),
|
||||
color: {
|
||||
primary: '#0000',
|
||||
secondary: '#0000'
|
||||
},
|
||||
id: element.id,
|
||||
index: eventIndex,
|
||||
CalendarName: element.calendarName,
|
||||
event: element.event,
|
||||
});
|
||||
|
||||
console.log('element.event', element.event)
|
||||
|
||||
});
|
||||
|
||||
return events;
|
||||
@@ -169,14 +164,10 @@ export class ListBoxService {
|
||||
|
||||
transForm(event: CustomCalendarEvent, {startMany, endMany, middle}) {
|
||||
return Object.assign({}, {
|
||||
title: event.event.Subject,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
|
||||
Reference in New Issue
Block a user