From 89543558b0c3a3db11d557ad8d012c329cab1fb2 Mon Sep 17 00:00:00 2001 From: eee4 <41441600+eee4@users.noreply.github.com> Date: Mon, 19 May 2025 05:11:45 +0200 Subject: [PATCH] chore: translate some strings, add organizer to waterfall view --- WebApp/ts/eventCreate.ts | 8 ++++---- WebApp/ts/eventList.ts | 5 ++++- WebApp/ts/eventModify.ts | 2 +- WebApp/wwwroot/js/eventCreate.js | 8 ++++---- WebApp/wwwroot/js/eventList.js | 5 ++++- WebApp/wwwroot/js/eventModify.js | 2 +- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/WebApp/ts/eventCreate.ts b/WebApp/ts/eventCreate.ts index 1754cd7..bd0681a 100644 --- a/WebApp/ts/eventCreate.ts +++ b/WebApp/ts/eventCreate.ts @@ -9,7 +9,7 @@ async function createEvent() { // Walidacja prostych pól if (!title || !location || !eventDateRaw) { - alert("Uzupełnij wszystkie wymagane pola!"); + alert("Please fill out all of the required fields!"); return; } @@ -34,11 +34,11 @@ async function createEvent() { throw new Error(errorText); } - alert("Wydarzenie zostało utworzone!"); + alert("Event created successfully!"); window.location.href = "/"; // Przekierowanie do strony głównej } catch (error) { - console.error("Błąd podczas tworzenia:", error); - alert("Nie udało się utworzyć wydarzenia: " + error); + console.error("Couldn't create event:", error); + alert("Couldn't create new event: " + error); } } diff --git a/WebApp/ts/eventList.ts b/WebApp/ts/eventList.ts index 30e7884..4833a8d 100644 --- a/WebApp/ts/eventList.ts +++ b/WebApp/ts/eventList.ts @@ -58,7 +58,10 @@ async function loadEvents(org_id: number, evs?: Promise) { // ${ev.title}` // Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy card.innerHTML = ` - ${ev.title}` + + ${ev.title} +

${ev.organisation}

+
` if (org_id == ev.organisationId) { card.innerHTML += `
diff --git a/WebApp/ts/eventModify.ts b/WebApp/ts/eventModify.ts index d39830f..f7ff6f2 100644 --- a/WebApp/ts/eventModify.ts +++ b/WebApp/ts/eventModify.ts @@ -15,7 +15,7 @@ async function modifyEvent() // Walidacja prostych pól if (!title || !location || !eventDateRaw) { - alert("Należy uzupełnić wszystkie pola!"); + alert("Please fill out all of the required fields!"); return; } diff --git a/WebApp/wwwroot/js/eventCreate.js b/WebApp/wwwroot/js/eventCreate.js index 4106062..b463050 100644 --- a/WebApp/wwwroot/js/eventCreate.js +++ b/WebApp/wwwroot/js/eventCreate.js @@ -17,7 +17,7 @@ function createEvent() { const eventDateRaw = document.getElementById('eventDate').value; // Walidacja prostych pól if (!title || !location || !eventDateRaw) { - alert("Uzupełnij wszystkie wymagane pola!"); + alert("Please fill out all of the required fields!"); return; } const eventDate = new Date(eventDateRaw).toISOString(); @@ -37,12 +37,12 @@ function createEvent() { const errorText = yield response.text(); throw new Error(errorText); } - alert("Wydarzenie zostało utworzone!"); + alert("Event created successfully!"); window.location.href = "/"; // Przekierowanie do strony głównej } catch (error) { - console.error("Błąd podczas tworzenia:", error); - alert("Nie udało się utworzyć wydarzenia: " + error); + console.error("Couldn't create event:", error); + alert("Couldn't create new event: " + error); } }); } diff --git a/WebApp/wwwroot/js/eventList.js b/WebApp/wwwroot/js/eventList.js index c2fc172..1fc02dd 100644 --- a/WebApp/wwwroot/js/eventList.js +++ b/WebApp/wwwroot/js/eventList.js @@ -63,7 +63,10 @@ function loadEvents(org_id, evs) { // ${ev.title}` // Do odkomentowania kiedy widok podglądu wydarzeń będzie gotowy card.innerHTML = ` - ${ev.title}`; + + ${ev.title} +

${ev.organisation}

+
`; if (org_id == ev.organisationId) { card.innerHTML += `
diff --git a/WebApp/wwwroot/js/eventModify.js b/WebApp/wwwroot/js/eventModify.js index df42c99..7962616 100644 --- a/WebApp/wwwroot/js/eventModify.js +++ b/WebApp/wwwroot/js/eventModify.js @@ -20,7 +20,7 @@ function modifyEvent() { const eventDateRaw = document.getElementById('eventDate').value; // Walidacja prostych pól if (!title || !location || !eventDateRaw) { - alert("Należy uzupełnić wszystkie pola!"); + alert("Please fill out all of the required fields!"); return; } const eventDate = new Date(eventDateRaw).toISOString();