mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 05:30:13 +01:00
feat: show slightly more information in event list view
instead of event title and organizer, we now also show place and date
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getEvent, getMyAccount, unhideElementById } from './generalUseHelpers.js';
|
||||
import { getEvent, getMyAccount, unhideElementById } from './generalUseHelpers.js';
|
||||
|
||||
var isAscending: boolean = false;
|
||||
|
||||
@@ -57,10 +57,17 @@ async function loadEvents(org_id: number, evs?: Promise<any>) {
|
||||
//card.innerHTML = `
|
||||
// <span>${ev.title}</span>`
|
||||
// Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy
|
||||
let formattedDate: string = new Intl.DateTimeFormat('en-US', {
|
||||
weekday: 'long', // "Monday"
|
||||
year: 'numeric', // "2023"
|
||||
month: 'long', // "December"
|
||||
day: 'numeric' // "1"
|
||||
}).format(ev.eventDate);
|
||||
console.log(formattedDate);
|
||||
card.innerHTML = `
|
||||
<span>
|
||||
<a href="/view.html?event=${ev.eventId}" style="color: #2898BD">${ev.title}</a>
|
||||
<p style="margin: 0">${ev.organisation}</p>
|
||||
<p style="margin: 0">${ev.organisation} | ${ev.location} | ${formattedDate}</p>
|
||||
</span>`
|
||||
if (org_id == ev.organisationId) {
|
||||
card.innerHTML += `
|
||||
@@ -118,4 +125,4 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
loadEvents(org_id, searchResults);
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user