feat: add DXCC SAT award for satellite-only QSOs
Added new award "DXCC SAT" that only counts satellite QSOs (QSOs with satName field set). This adds a new "satellite_only" key to award definitions that filters to only include satellite communications. Award definition: - ID: dxcc-sat - Name: DXCC SAT - Target: 100 DXCC entities - Only satellite QSOs count Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ function loadAwardDefinitions() {
|
||||
try {
|
||||
const files = [
|
||||
'dxcc.json',
|
||||
'dxcc-sat.json',
|
||||
'was.json',
|
||||
'vucc-sat.json',
|
||||
'sat-rs44.json',
|
||||
@@ -145,6 +146,12 @@ export async function calculateAwardProgress(userId, award, options = {}) {
|
||||
logger.debug('QSOs after allowed_bands filter', { count: finalQSOs.length });
|
||||
}
|
||||
|
||||
// Apply satellite_only filter if present
|
||||
if (rules.satellite_only) {
|
||||
finalQSOs = finalQSOs.filter(qso => qso.satName);
|
||||
logger.debug('QSOs after satellite_only filter', { count: finalQSOs.length });
|
||||
}
|
||||
|
||||
// Calculate worked and confirmed entities
|
||||
const workedEntities = new Set();
|
||||
const confirmedEntities = new Set();
|
||||
@@ -723,6 +730,11 @@ export async function getAwardEntityBreakdown(userId, awardId) {
|
||||
});
|
||||
}
|
||||
|
||||
// Apply satellite_only filter if present
|
||||
if (rules.satellite_only) {
|
||||
finalQSOs = finalQSOs.filter(qso => qso.satName);
|
||||
}
|
||||
|
||||
// Group by (entity, band, mode) slot for entity awards
|
||||
// This allows showing multiple QSOs per entity on different bands/modes
|
||||
const slotMap = new Map(); // Key: "entity/band/mode" -> slot object
|
||||
|
||||
Reference in New Issue
Block a user