diff --git a/src/EventModal.svelte b/src/EventModal.svelte
index 00bc046..cd427d2 100644
--- a/src/EventModal.svelte
+++ b/src/EventModal.svelte
@@ -40,11 +40,23 @@
{/if}
+
{#if event.extendedProps.description}
{@html md.render(event.extendedProps.description)}
{:else}
Pas de description
{/if}
+
+ {#if event.extendedProps.speakers}
+
+ Intervenant·e{#if event.extendedProps.speakers.size > 1}·s{/if} :
+
+
+ {#each event.extendedProps.speakers as s}
+ - {s.cn}
+ {/each}
+
+ {/if}
diff --git a/src/calendar.js b/src/calendar.js
index 902e020..50fc127 100644
--- a/src/calendar.js
+++ b/src/calendar.js
@@ -227,7 +227,17 @@ class Calendar {
_parse_vevent(vevent) {
const event = {}
vevent.forEach(elt => {
- event[elt[0]] = elt[3]
+ switch (elt[0]) {
+ case "attendee":
+ if (event[elt[0]] === undefined) event[elt[0]] = []
+ event[elt[0]].push({
+ props: elt[1],
+ val: elt[3]
+ })
+ break
+ default:
+ event[elt[0]] = elt[3]
+ }
})
return event
}
@@ -280,6 +290,10 @@ function fcEventFromjCalEvent(cal) {
fcEvent.classNames = [`st-${evt.status.toLowerCase()}`]
}
+ if (evt.attendee) {
+ fcEvent.speakers = evt.attendee.filter(a => a.prop.cn && a.prop.role === "REQ-PARTICIPANT")
+ }
+
if (evt.rrule) {
const { freq, byday, interval } = evt.rrule
fcEvent.rrule = {