This commit is contained in:
2026-06-13 21:56:38 +02:00
parent 81e505e040
commit 08162fa126
9 changed files with 257 additions and 15 deletions
+5 -2
View File
@@ -102,10 +102,13 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode, bands, hasCal
}, [wb]);
// "Newness" of the current band+mode entry, for the award/DX-chase badges.
// Derived straight from the entity's real band_status (all bands it was
// worked on — not just the operator's configured column list).
const curClass = CLASSES.find((c) => classMatchesMode(c, currentMode));
const statusKeys = useMemo(() => Array.from(statusMap.keys()), [statusMap]);
const slotStatus = curClass ? statusMap.get(`${currentBand}|${curClass}`) : undefined;
const bandWorked = CLASSES.some((c) => statusMap.get(`${currentBand}|${c}`));
const modeWorked = !!curClass && cols.some((b) => statusMap.get(`${b.tag}|${curClass}`));
const bandWorked = statusKeys.some((k) => k.split('|')[0] === currentBand);
const modeWorked = !!curClass && statusKeys.some((k) => k.split('|')[1] === curClass);
const newBand = hasDxcc && !newOne && !bandWorked;
const newMode = hasDxcc && !newOne && !!curClass && !modeWorked;
const newBandMode = hasDxcc && !newOne && !!curClass && !slotStatus;