diff --git a/src/frontend/src/routes/awards/[id]/+page.svelte b/src/frontend/src/routes/awards/[id]/+page.svelte index f80f9f3..9408263 100644 --- a/src/frontend/src/routes/awards/[id]/+page.svelte +++ b/src/frontend/src/routes/awards/[id]/+page.svelte @@ -164,6 +164,28 @@ applyFilter(); } + // Calculate band sums + $: bandSums = (() => { + const sums = new Map(); + const hasPoints = entities.length > 0 && entities[0].points !== undefined; + + bands.forEach(band => { + if (hasPoints) { + // Sum points for confirmed QSOs in this band + const sum = entities + .filter(e => e.band === band && e.confirmed) + .reduce((total, e) => total + (e.points || 0), 0); + sums.set(band, sum); + } else { + // Count confirmed QSOs in this band + const count = entities.filter(e => e.band === band && e.confirmed).length; + sums.set(band, count); + } + }); + + return sums; + })(); + // QSO Detail Modal Functions async function openQSODetailModal(qso) { loadingQSO = true; @@ -341,6 +363,19 @@ {/each} +
+