mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 21:50:12 +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:
@@ -59,13 +59,18 @@ function loadEvents(org_id, evs) {
|
||||
for (const ev of events) {
|
||||
const card = document.createElement("div");
|
||||
card.className = "event-card filled";
|
||||
//card.innerHTML = `
|
||||
// <span>${ev.title}</span>`
|
||||
// Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy
|
||||
|
||||
let formattedDate = new Intl.DateTimeFormat('en-US', {
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric' // "1"
|
||||
}).format(new Date(ev.eventDate));
|
||||
|
||||
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 += `
|
||||
|
||||
@@ -29,7 +29,7 @@ export function getMyAccount() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const res = yield fetch("/api/auth/my_account");
|
||||
if (!res.ok) {
|
||||
throw Error("U<EFBFBD>ytkownik niezalogowany!");
|
||||
throw Error("Użytkownik niezalogowany!");
|
||||
}
|
||||
const data = yield res.json();
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user