WIP: ATTENDEE prop support #46
2 changed files with 25 additions and 1 deletions
|
@ -40,11 +40,23 @@
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<p>
|
||||||
{#if event.extendedProps.description}
|
{#if event.extendedProps.description}
|
||||||
{@html md.render(event.extendedProps.description)}
|
{@html md.render(event.extendedProps.description)}
|
||||||
{:else}
|
{:else}
|
||||||
<i class="fs-7">Pas de description</i>
|
<i class="fs-7">Pas de description</i>
|
||||||
{/if}
|
{/if}
|
||||||
|
</p>
|
||||||
|
{#if event.extendedProps.speakers}
|
||||||
|
<p class="fs-7 mb-1">
|
||||||
|
<strong>Intervenant·e{#if event.extendedProps.speakers.size > 1}·s{/if} :</strong>
|
||||||
|
</p>
|
||||||
|
<ul class="fs-7">
|
||||||
|
{#each event.extendedProps.speakers as s}
|
||||||
|
<li>{s.cn}</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
|
||||||
<ModalFooter class="justify-content-between">
|
<ModalFooter class="justify-content-between">
|
||||||
|
|
|
@ -227,7 +227,15 @@ class Calendar {
|
||||||
_parse_vevent(vevent) {
|
_parse_vevent(vevent) {
|
||||||
const event = {}
|
const event = {}
|
||||||
vevent.forEach(elt => {
|
vevent.forEach(elt => {
|
||||||
event[elt[0]] = elt[3]
|
if (elt[0] == "attendee" && elt[1].cn && elt[1].role == "CHAIR") {
|
||||||
|
if (event[elt[0]] === undefined) event["speakers"] = []
|
||||||
|
event["speakers"].push({
|
||||||
|
cn: elt[1].cn,
|
||||||
|
cal-address: elt[3]
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
event[elt[0]] = elt[3]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return event
|
return event
|
||||||
}
|
}
|
||||||
|
@ -280,6 +288,10 @@ function fcEventFromjCalEvent(cal) {
|
||||||
fcEvent.classNames = [`st-${evt.status.toLowerCase()}`]
|
fcEvent.classNames = [`st-${evt.status.toLowerCase()}`]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (evt.speakers) {
|
||||||
|
fcEvent.speakers = evt.speakers
|
||||||
|
}
|
||||||
|
|
||||||
if (evt.rrule) {
|
if (evt.rrule) {
|
||||||
const { freq, byday, interval } = evt.rrule
|
const { freq, byday, interval } = evt.rrule
|
||||||
fcEvent.rrule = {
|
fcEvent.rrule = {
|
||||||
|
|
Loading…
Reference in a new issue