mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 17:48:51 +02:00
Merge branch '13-popup-informations-in-ical-viewer' into 'main'
fix:#13 colorized array type See merge request htwk-software/htwkalender-pwa!8
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