From 40c41fad081059823f93c2bfd92e1818fc742bea Mon Sep 17 00:00:00 2001 From: mandalore Date: Fri, 4 Sep 2026 16:04:42 -0500 Subject: [PATCH] Flag each event as Singles or Team Event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Investigated BCP's API for a team-size field (5-man vs 8-man, etc.) — there isn't one. The only candidate, totalPlayers / totalTeamPlayers, tracks live registration progress rather than the event's configured format, so it's unreliable for upcoming events with thin early signups (verified: "TEO-8 - All in.", an event explicitly branded as an 8-man format, currently shows 21/8 ≈ 2.6 via that ratio — would round to a wrong "3-Man Teams"). Sticking to the one field BCP does report reliably (teamEvent) rather than shipping a specific size that's sometimes confidently wrong. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK --- sites/events/src/main.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sites/events/src/main.js b/sites/events/src/main.js index d0e7a1b..0e07cf0 100644 --- a/sites/events/src/main.js +++ b/sites/events/src/main.js @@ -131,6 +131,16 @@ function locationOf(ev) { return parts.length ? parts.join(", ") : (ev.formatted_address || "Location TBD"); } +// BCP's only reliable format signal is the teamEvent flag. There's no +// dedicated "team size" field — the closest candidate (totalPlayers / +// totalTeamPlayers) reflects live registration progress, not the event's +// configured format, so it's noisy/wrong for events with thin early +// signups (which is most upcoming events). Deliberately not guessing a +// specific team size here. +function formatOf(ev) { + return ev.teamEvent ? "Team Event" : "Singles"; +} + function eventCard(ev) { const capacity = ev.numTickets ? `${ev.checkedInPlayers ?? 0}/${ev.numTickets} checked in` @@ -138,6 +148,7 @@ function eventCard(ev) { const system = ev.gameSystemName ? `${esc(ev.gameSystemName)}` : ""; + const format = `${formatOf(ev)}`; return ` @@ -145,7 +156,7 @@ function eventCard(ev) {
${esc(ev.name)}
${esc(locationOf(ev))}
-
${system}${capacity}
+
${format}${system}${capacity}
${fmtDateRange(ev.eventDate, ev.eventEndDate)}