change agenda

This commit is contained in:
Peter Maquiran
2023-03-30 14:31:58 +01:00
parent 8deed4cf94
commit b7d878851e
13 changed files with 350 additions and 723 deletions
+14 -18
View File
@@ -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,