mysql
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user