From e14da11a93f4b62cb7ae22e347d6d0f656312dca Mon Sep 17 00:00:00 2001 From: Joerg Date: Thu, 22 Jan 2026 08:04:51 +0100 Subject: [PATCH] fix: correct column sum calculation for satellite QSOs The SAT column sum was always showing 0 because it was filtering by e.band === 'SAT', but entities still have their original band in the data. Now it correctly identifies satellite QSOs by checking if any QSOs have satName. Co-Authored-By: Claude --- .../src/routes/awards/[id]/+page.svelte | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/routes/awards/[id]/+page.svelte b/src/frontend/src/routes/awards/[id]/+page.svelte index 854252f..f3effe7 100644 --- a/src/frontend/src/routes/awards/[id]/+page.svelte +++ b/src/frontend/src/routes/awards/[id]/+page.svelte @@ -299,22 +299,46 @@ // Sum points for confirmed QSOs in this column if (isMixedMode) { const sum = entities - .filter(e => e.band === band && e.confirmed) + .filter(e => { + // For SAT column, check if entity has satellite QSOs + if (band === 'SAT') { + return e.qsos && e.qsos.some(qso => qso.satName) && e.confirmed; + } + return e.band === band && e.confirmed; + }) .reduce((total, e) => total + (e.points || 0), 0); sums.set(key, sum); } else { const sum = entities - .filter(e => e.band === band && e.mode === mode && e.confirmed) + .filter(e => { + // For SAT column, check if entity has satellite QSOs + if (band === 'SAT') { + return e.qsos && e.qsos.some(qso => qso.satName) && e.mode === mode && e.confirmed; + } + return e.band === band && e.mode === mode && e.confirmed; + }) .reduce((total, e) => total + (e.points || 0), 0); sums.set(key, sum); } } else { // Count confirmed QSOs in this column if (isMixedMode) { - const count = entities.filter(e => e.band === band && e.confirmed).length; + const count = entities.filter(e => { + // For SAT column, check if entity has satellite QSOs + if (band === 'SAT') { + return e.qsos && e.qsos.some(qso => qso.satName) && e.confirmed; + } + return e.band === band && e.confirmed; + }).length; sums.set(key, count); } else { - const count = entities.filter(e => e.band === band && e.mode === mode && e.confirmed).length; + const count = entities.filter(e => { + // For SAT column, check if entity has satellite QSOs + if (band === 'SAT') { + return e.qsos && e.qsos.some(qso => qso.satName) && e.mode === mode && e.confirmed; + } + return e.band === band && e.mode === mode && e.confirmed; + }).length; sums.set(key, count); } }