fix(awards): the RDA arbitration writes CNTY, and settled rows leave the list

Two faults, and the first was a design mistake of mine.

The choice was written only as the award override, to keep the imported
CNTY as a record of what HAMLOG said. But CNTY is what the comparison
READS, so the contact went on disagreeing for ever: settle a hundred
rows, run the comparison again, get the same hundred back. The reasoning
was about preserving evidence; the effect was a button with no visible
consequence anywhere, which is indistinguishable from one that does
nothing. This is the operator's own log, and correcting a field in it is
the point of the exercise. The district now lands in CNTY as well as in
the award reference.

And the settled rows stayed on screen, which made the same button look
broken a second time. They are dropped as they are applied — locally,
rather than by re-running the comparison, which reads the whole log and
would be seconds of silence on a remote database to be told what is
already known. The agree/disagree counters follow.
This commit is contained in:
2026-08-26 11:08:15 +02:00
parent dc8f9c5099
commit 2e3464104d
4 changed files with 35 additions and 16 deletions
+18
View File
@@ -7598,6 +7598,24 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
const r: any = await ApplyRDAChoices(choices);
setRdaCmpMsg(r?.message || '');
setRdaPick({});
// The settled rows leave the list, and the counters follow.
//
// They used to stay, which made a working button look like a
// broken one: the operator decided a hundred contacts, the
// hundred rows stayed exactly as they were, and there was
// nothing anywhere to say the writing had happened. Dropping
// them here rather than re-running the comparison, because
// that reads the whole log — seconds of silence on a remote
// database, to be told what is already known.
if (r?.applied > 0) {
const settled = new Set(choices.map((c: any) => c.qso_id));
setRdaCmp((prev: any) => prev && ({
...prev,
disagree: Math.max(0, (prev.disagree ?? 0) - r.applied),
agree: (prev.agree ?? 0) + r.applied,
conflicts: (prev.conflicts ?? []).filter((c: any) => !settled.has(c.qso_id)),
}));
}
} catch (e: any) {
setRdaCmpMsg(String(e?.message ?? e));
} finally {