diff --git a/apps/events/CHANGELOG.md b/apps/events/CHANGELOG.md index c2ef7e9..b2c0ba9 100644 --- a/apps/events/CHANGELOG.md +++ b/apps/events/CHANGELOG.md @@ -7,6 +7,10 @@ and this project follows [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Fixed + +- Events that have already started but not yet finished now show on the home page and the Events page. Both pages were hiding an event as soon as its start time passed; they now keep it listed until its end time, which matches what `GET /api/events` already returns. + ## [1.10.4] - 2026-09-01 ### Fixed diff --git a/apps/events/frontend/src/app/events/page.tsx b/apps/events/frontend/src/app/events/page.tsx index efdccb5..9e378bb 100644 --- a/apps/events/frontend/src/app/events/page.tsx +++ b/apps/events/frontend/src/app/events/page.tsx @@ -31,7 +31,7 @@ export default async function EventsPage() { const now = Date.now(); const upcoming = (events || []).filter(e => { if (e.cashupStatus === "closed") return false; - const t = new Date(e.startDate).getTime(); + const t = new Date(e.endDate || e.startDate).getTime(); return !isNaN(t) && t > now; }); const sorted = [...upcoming].sort((a, b) => new Date(a.startDate).getTime() - new Date(b.startDate).getTime()); diff --git a/apps/events/frontend/src/app/page.tsx b/apps/events/frontend/src/app/page.tsx index 4758272..0821e29 100644 --- a/apps/events/frontend/src/app/page.tsx +++ b/apps/events/frontend/src/app/page.tsx @@ -45,7 +45,7 @@ export default async function HomePage() { ]); const now = Date.now(); const upcoming = (events || []).filter(e => { - const t = new Date(e.startDate).getTime(); + const t = new Date(e.endDate || e.startDate).getTime(); return !isNaN(t) && t > now; }); const sorted = [...upcoming].sort((a, b) => new Date(a.startDate).getTime() - new Date(b.startDate).getTime());