Split start/end location fields to Events

This commit is contained in:
2022-07-25 13:12:01 +00:00
parent 4418ec2b82
commit 9c30d14975
4 changed files with 38 additions and 10 deletions

View File

@@ -56,10 +56,17 @@ async function main() {
$event.querySelector('.event-start .event-datetime').innerText = event.start;
$event.querySelector('.event-end .event-datetime').innerText = event.end ? event.end : 'N/A';
if (event.location)
$event.querySelector('.event-location').appendChild(getDirectionLink(event.location));
else
$event.querySelector('.event-location').innerText = 'There is no location specified for this event';
if (event.startLocation) {
$event.querySelector('.event-location-start').appendChild(getDirectionLink(event.startLocation));
if (event.endLocation)
$event.querySelector('.event-location-end').appendChild(getDirectionLink(event.endLocation));
else
$event.querySelector('.event-location-end').innerText = '';
} else {
$event.querySelector('.event-location-start').innerText = 'There are no locations specified for this event';
$event.querySelector('.event-location-end').innerText = '';
}
$event.querySelector('.event-notes').innerText = event.notes ?? 'There are no notes for this event';