mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 05:30:13 +01:00
chore: translate some strings, add organizer to waterfall view
This commit is contained in:
@@ -9,7 +9,7 @@ async function createEvent() {
|
|||||||
|
|
||||||
// Walidacja prostych pól
|
// Walidacja prostych pól
|
||||||
if (!title || !location || !eventDateRaw) {
|
if (!title || !location || !eventDateRaw) {
|
||||||
alert("Uzupełnij wszystkie wymagane pola!");
|
alert("Please fill out all of the required fields!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ async function createEvent() {
|
|||||||
throw new Error(errorText);
|
throw new Error(errorText);
|
||||||
}
|
}
|
||||||
|
|
||||||
alert("Wydarzenie zostało utworzone!");
|
alert("Event created successfully!");
|
||||||
window.location.href = "/"; // Przekierowanie do strony głównej
|
window.location.href = "/"; // Przekierowanie do strony głównej
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Błąd podczas tworzenia:", error);
|
console.error("Couldn't create event:", error);
|
||||||
alert("Nie udało się utworzyć wydarzenia: " + error);
|
alert("Couldn't create new event: " + error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,10 @@ async function loadEvents(org_id: number, evs?: Promise<any>) {
|
|||||||
// <span>${ev.title}</span>`
|
// <span>${ev.title}</span>`
|
||||||
// Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy
|
// Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
<span><a href="/view.html?event=${ev.eventId}" style="color: #2898BD">${ev.title}</a></span>`
|
<span>
|
||||||
|
<a href="/view.html?event=${ev.eventId}" style="color: #2898BD">${ev.title}</a>
|
||||||
|
<p style="margin: 0">${ev.organisation}</p>
|
||||||
|
</span>`
|
||||||
if (org_id == ev.organisationId) {
|
if (org_id == ev.organisationId) {
|
||||||
card.innerHTML += `
|
card.innerHTML += `
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ async function modifyEvent()
|
|||||||
// Walidacja prostych pól
|
// Walidacja prostych pól
|
||||||
if (!title || !location || !eventDateRaw)
|
if (!title || !location || !eventDateRaw)
|
||||||
{
|
{
|
||||||
alert("Należy uzupełnić wszystkie pola!");
|
alert("Please fill out all of the required fields!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function createEvent() {
|
|||||||
const eventDateRaw = document.getElementById('eventDate').value;
|
const eventDateRaw = document.getElementById('eventDate').value;
|
||||||
// Walidacja prostych pól
|
// Walidacja prostych pól
|
||||||
if (!title || !location || !eventDateRaw) {
|
if (!title || !location || !eventDateRaw) {
|
||||||
alert("Uzupełnij wszystkie wymagane pola!");
|
alert("Please fill out all of the required fields!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const eventDate = new Date(eventDateRaw).toISOString();
|
const eventDate = new Date(eventDateRaw).toISOString();
|
||||||
@@ -37,12 +37,12 @@ function createEvent() {
|
|||||||
const errorText = yield response.text();
|
const errorText = yield response.text();
|
||||||
throw new Error(errorText);
|
throw new Error(errorText);
|
||||||
}
|
}
|
||||||
alert("Wydarzenie zostało utworzone!");
|
alert("Event created successfully!");
|
||||||
window.location.href = "/"; // Przekierowanie do strony głównej
|
window.location.href = "/"; // Przekierowanie do strony głównej
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error("Błąd podczas tworzenia:", error);
|
console.error("Couldn't create event:", error);
|
||||||
alert("Nie udało się utworzyć wydarzenia: " + error);
|
alert("Couldn't create new event: " + error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,10 @@ function loadEvents(org_id, evs) {
|
|||||||
// <span>${ev.title}</span>`
|
// <span>${ev.title}</span>`
|
||||||
// Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy
|
// Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
<span><a href="/view.html?event=${ev.eventId}" style="color: #2898BD">${ev.title}</a></span>`;
|
<span>
|
||||||
|
<a href="/view.html?event=${ev.eventId}" style="color: #2898BD">${ev.title}</a>
|
||||||
|
<p style="margin: 0">${ev.organisation}</p>
|
||||||
|
</span>`;
|
||||||
if (org_id == ev.organisationId) {
|
if (org_id == ev.organisationId) {
|
||||||
card.innerHTML += `
|
card.innerHTML += `
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function modifyEvent() {
|
|||||||
const eventDateRaw = document.getElementById('eventDate').value;
|
const eventDateRaw = document.getElementById('eventDate').value;
|
||||||
// Walidacja prostych pól
|
// Walidacja prostych pól
|
||||||
if (!title || !location || !eventDateRaw) {
|
if (!title || !location || !eventDateRaw) {
|
||||||
alert("Należy uzupełnić wszystkie pola!");
|
alert("Please fill out all of the required fields!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const eventDate = new Date(eventDateRaw).toISOString();
|
const eventDate = new Date(eventDateRaw).toISOString();
|
||||||
|
|||||||
Reference in New Issue
Block a user