mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-07 04:09:17 +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 jCalData = ICAL.parse(icalData);
|
||||||
const comp = new ICAL.Component(jCalData);
|
const comp = new ICAL.Component(jCalData);
|
||||||
const vEvents = comp.getAllSubcomponents("vevent");
|
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) => {
|
return vEvents.map((vevent: CalendarComponent) => {
|
||||||
const event = new ICAL.Event(vevent);
|
const event = new ICAL.Event(vevent);
|
||||||
@@ -127,6 +130,7 @@ function colorizeEvents(vEvents: CalendarComponent[]): ColorDistinctionEvent[] {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Exported for testing
|
||||||
export const exportedForTesting = {
|
export const exportedForTesting = {
|
||||||
extractedColorizedEvents,
|
extractedColorizedEvents,
|
||||||
filterEventsDistinct,
|
filterEventsDistinct,
|
||||||
|
Reference in New Issue
Block a user