fix(cluster): WORKED chip filters worked-call only, not the entity status

The WORKED filter also matched the entity status 'worked' (entity/band/mode
already worked, shown as a plain "—"), so selecting WORKED still listed spots of
calls never worked. Match the 'worked' key only via worked_call (the blue
WKD-CALL flag); a worked call still shows under NEW BAND / NEW SLOT.
This commit is contained in:
2026-08-05 14:26:34 +02:00
parent f82d92565f
commit 9af2732314
+8 -5
View File
@@ -4490,11 +4490,14 @@ export default function App() {
const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz); const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz);
const e = spotStatus[k]; const e = spotStatus[k];
const st = (e?.status || '') as SpotStatusKey; const st = (e?.status || '') as SpotStatusKey;
// A previously-worked call counts as WORKED for filtering even when its // WORKED means "I've worked THIS callsign" — the blue WKD-CALL flag —
// entity status is still new-band/new-slot (the grid flags it WKD CALL), // NOT the entity status 'worked' (entity/band/mode already worked, which
// matching the "Hide worked" toggle. Additive: it still matches its own // the grid shows as a plain "—"). So the 'worked' key is matched ONLY via
// entity status too, so it stays visible under NEW BAND / NEW SLOT. // worked_call below; exclude the entity status 'worked' from the generic
const matches = clusterStatusFilter.has(st) // match, or every "already-worked-entity" spot would slip through. A
// worked call still matches its own entity status too (new-band/new-slot),
// so it stays visible under those chips.
const matches = (st !== 'worked' && clusterStatusFilter.has(st))
|| (!!e?.worked_call && clusterStatusFilter.has('worked')) || (!!e?.worked_call && clusterStatusFilter.has('worked'))
|| (!!e?.new_pota && clusterStatusFilter.has('new-pota')) || (!!e?.new_pota && clusterStatusFilter.has('new-pota'))
|| (!!e?.new_county && clusterStatusFilter.has('new-county')) || (!!e?.new_county && clusterStatusFilter.has('new-county'))