From 84ae0dbc5519cd59054cd8e6702e627190ccee76 Mon Sep 17 00:00:00 2001 From: joshua Date: Thu, 1 Oct 2026 14:46:04 +0200 Subject: [PATCH] Show in-progress events on home and events pages Filter by endDate instead of startDate so events stay listed until they finish. Co-Authored-By: Claude Opus 5.5 --- apps/events/CHANGELOG.md | 4 ++++ apps/events/frontend/src/app/events/page.tsx | 2 +- apps/events/frontend/src/app/page.tsx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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());