mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 09:38:51 +02:00
fix:#13 colorized array type
This commit is contained in:
@ -41,7 +41,10 @@ export function parseICalData(
|
||||
const jCalData = ICAL.parse(icalData);
|
||||
const comp = new ICAL.Component(jCalData);
|
||||
const vEvents = comp.getAllSubcomponents("vevent");
|
||||
const colorDistinctionEvents = extractedColorizedEvents(vEvents);
|
||||
const events: CalendarComponent[] = vEvents.map((vevent: CalendarComponent) => {
|
||||
return new ICAL.Event(vevent);
|
||||
});
|
||||
const colorDistinctionEvents: ColorDistinctionEvent[] = extractedColorizedEvents(events);
|
||||
|
||||
return vEvents.map((vevent: CalendarComponent) => {
|
||||
const event = new ICAL.Event(vevent);
|
||||
@ -127,6 +130,7 @@ function colorizeEvents(vEvents: CalendarComponent[]): ColorDistinctionEvent[] {
|
||||
});
|
||||
}
|
||||
|
||||
// Exported for testing
|
||||
export const exportedForTesting = {
|
||||
extractedColorizedEvents,
|
||||
filterEventsDistinct,
|
||||
|
Reference in New Issue
Block a user