fix: count QSOs confirmed by either LoTW or DCL in stats

QSO stats were only counting LoTW-confirmed QSOs, excluding
QSOs confirmed only by DCL from the "confirmed" count.

Changed getQSOStats() to count QSOs as confirmed if EITHER
LoTW OR DCL has confirmed them:
- Before: q.lotwQslRstatus === 'Y'
- After: q.lotwQslRstatus === 'Y' || q.dclQslRstatus === 'Y'

Fixes stats showing 8317/8338 confirmed when all QSOs were
confirmed by at least one system.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-19 13:32:45 +01:00
parent b40d3639f7
commit bee02d16ce
2 changed files with 6 additions and 1 deletions

View File

@@ -401,7 +401,7 @@ export async function getUserQSOs(userId, filters = {}, options = {}) {
*/
export async function getQSOStats(userId) {
const allQSOs = await db.select().from(qsos).where(eq(qsos.userId, userId));
const confirmed = allQSOs.filter((q) => q.lotwQslRstatus === 'Y');
const confirmed = allQSOs.filter((q) => q.lotwQslRstatus === 'Y' || q.dclQslRstatus === 'Y');
const uniqueEntities = new Set();
const uniqueBands = new Set();