fix(awards): stale statistics, and the Challenge said out loud
Two things from one screenshot, and the second is arithmetic rather than a bug. Editing an award refreshed the grid and not the statistics matrix, so changing which confirmations count left the table showing the old rule's numbers with nothing to mark them stale. That is how a setting comes to look as though it does nothing. And OpsLog's 3229 against LoTW's 3004: the Challenge counts confirmed band-slots on ten bands, and 60 m is not one of them. 3229 less the 224 in the 60 m column is 3005. So the number was right and the QUESTION was different — the panel now answers the Challenge one too, under the table where the comparison is made. The two totals also say what they are on hover. 'Total' and 'Général' side by side tell nobody which counts entities and which counts band-slots, and 3309 read as entities is an impossible number — which is exactly how it was read.
This commit is contained in:
+6
-2
@@ -10,7 +10,9 @@
|
||||
"Ultrabeam / SteppIR over USB: the COM port can be picked from the list again. It used a field you could also type into, and the list could not be selected from at all.",
|
||||
"A control console for SunSDR / ExpertSDR3, as a tab and as a docked pane: drive and tune drive, mic gain, TUNE, volume, mute, squelch, NB, NR, ANF, APF, AGC, the passband, RIT and XIT, the VFO lock, and an S-meter reading real dBm. It follows the radio's own window — TCI announces every change, whoever made it.",
|
||||
"The Elecraft console can be docked as a main-view pane. It always could; the setting simply never listed it.",
|
||||
"Spot alerts name the right mode. A 30 m FT8 spot raised an alert saying SSB while the cluster list beside it said DATA: the alert engine had its own, coarser band plan, which called everything above 10.130 phone. Both now read the same table, and a frequency the plan does not cover is left unnamed rather than guessed at."
|
||||
"Spot alerts name the right mode. A 30 m FT8 spot raised an alert saying SSB while the cluster list beside it said DATA: the alert engine had its own, coarser band plan, which called everything above 10.130 phone. Both now read the same table, and a frequency the plan does not cover is left unnamed rather than guessed at.",
|
||||
"Awards: editing an award now refreshes its statistics as well as its grid. Changing which confirmations count — LoTW only, LoTW plus cards — left the whole matrix showing the previous rule's numbers, with nothing to say they were stale.",
|
||||
"The DXCC statistics show the Challenge, and say what the two totals mean. The Challenge counts confirmed band-slots on ten bands and 60 m is not one of them — which is the whole of the gap against LoTW's figure. The Total column is entities, the last column is band-slots, and both now say so when hovered."
|
||||
],
|
||||
"fr": [
|
||||
"Diplômes : la matrice des bandes affiche les bandes sur lesquelles on a des contacts — pas davantage, et sans s'arrêter au 70cm. Elle listait toutes les bandes autorisées par le diplôme, si bien que le DDFM restait avec des colonnes 6m et 70cm vides, et ne pouvait pas afficher le 23cm quoi que dise le diplôme.",
|
||||
@@ -20,7 +22,9 @@
|
||||
"Ultrabeam / SteppIR en USB : le port COM se choisit à nouveau dans la liste. Le champ était de ceux où l'on peut aussi taper, et la liste ne se laissait pas sélectionner.",
|
||||
"Une console de contrôle pour SunSDR / ExpertSDR3, en onglet et en volet ancré : puissance et puissance d'accord, gain micro, ACCORD, volume, muet, squelch, NB, NR, ANF, APF, AGC, la bande passante, RIT et XIT, le verrouillage du VFO, et un S-mètre en vrais dBm. Elle suit la fenêtre de la radio — TCI annonce chaque changement, quel qu'en soit l'auteur.",
|
||||
"La console Elecraft peut être ancrée comme volet de la vue principale. Elle le pouvait depuis toujours ; le réglage ne la proposait tout simplement pas.",
|
||||
"Les alertes de spot nomment le bon mode. Un spot FT8 sur 30 m déclenchait une alerte annonçant SSB alors que la liste du cluster juste à côté affichait DATA : le moteur d'alertes avait son propre plan de bandes, plus grossier, qui appelait « phonie » tout ce qui dépassait 10,130. Les deux lisent désormais la même table, et une fréquence hors plan reste sans mode plutôt que devinée."
|
||||
"Les alertes de spot nomment le bon mode. Un spot FT8 sur 30 m déclenchait une alerte annonçant SSB alors que la liste du cluster juste à côté affichait DATA : le moteur d'alertes avait son propre plan de bandes, plus grossier, qui appelait « phonie » tout ce qui dépassait 10,130. Les deux lisent désormais la même table, et une fréquence hors plan reste sans mode plutôt que devinée.",
|
||||
"Diplômes : modifier un diplôme actualise désormais ses statistiques et pas seulement sa grille. Changer les confirmations qui comptent — LoTW seul, LoTW plus cartes — laissait toute la matrice afficher les chiffres de la règle précédente, sans rien pour dire qu'ils étaient périmés.",
|
||||
"Les statistiques DXCC affichent le Challenge et disent ce que sont les deux totaux. Le Challenge compte les créneaux bande confirmés sur dix bandes, dont le 60 m ne fait pas partie — c'est là tout l'écart avec le chiffre de LoTW. La colonne Total, ce sont les entités ; la dernière, les créneaux bande ; les deux le disent au survol."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -40,6 +40,15 @@ type AwardStats = { code: string; bands: string[]; rows: AwardStatRow[] };
|
||||
// two are kept apart because they answer different questions (that one sorts an
|
||||
// award's own band counts, this one lays out columns), but a band added to one
|
||||
// belongs in the other.
|
||||
// The DXCC Challenge counts one point per CONFIRMED entity per band, over ten
|
||||
// bands — and 60 m is NOT one of them. That is the whole of the gap an operator
|
||||
// notices between OpsLog and LoTW: 3229 here against 3004 there, and 224 of the
|
||||
// difference is the 60 m column.
|
||||
//
|
||||
// Worked out from the confirmed row rather than asked of the backend, because
|
||||
// that row IS the answer: the Challenge is its sum over these ten bands.
|
||||
const CHALLENGE_BANDS = ['160m', '80m', '40m', '30m', '20m', '17m', '15m', '12m', '10m', '6m'];
|
||||
|
||||
const ALL_BANDS = ['2190m','630m','160m','80m','60m','40m','30m','20m','17m','15m','12m','10m',
|
||||
'6m','4m','2m','1.25m','70cm','33cm','23cm','13cm','9cm','6cm','3cm','1.25cm','6mm','4mm','2.5mm','2mm','1mm'];
|
||||
|
||||
@@ -225,6 +234,17 @@ export function AwardsPanel({ onEditQSO, onAwardsChanged, onPaperQSL }: {
|
||||
return filtered.length ? filtered : GRID_BANDS;
|
||||
}, [awardBands]);
|
||||
|
||||
const challenge = useMemo(() => {
|
||||
if (!stats || selected.toUpperCase() !== 'DXCC') return null;
|
||||
const row = stats.rows.find((r) => r.label === 'CONFIRMED');
|
||||
if (!row) return null;
|
||||
let total = 0;
|
||||
stats.bands.forEach((b, i) => {
|
||||
if (CHALLENGE_BANDS.includes(String(b).toLowerCase())) total += Number(row.cells[i]) || 0;
|
||||
});
|
||||
return total;
|
||||
}, [stats, selected]);
|
||||
|
||||
// Stats rows to show: drop the mode-category rows (CW / DIGITAL / PHONE) the
|
||||
// award doesn't cover. The "ALL" rows (no suffix) always show; a category row
|
||||
// shows only when the award has no emission restriction or lists that emission.
|
||||
@@ -344,7 +364,13 @@ export function AwardsPanel({ onEditQSO, onAwardsChanged, onPaperQSL }: {
|
||||
{t('awp.rescan')}
|
||||
</Button>
|
||||
</div>
|
||||
<AwardEditor open={editing} onClose={() => setEditing(false)} onSaved={() => { setByCode({}); loadList(); onAwardsChanged?.(); }} />
|
||||
{/* setRescanTick as well as setByCode. The grid was refreshed on save
|
||||
and the statistics matrix was not, so changing which confirmations
|
||||
count — LoTW only, LoTW plus cards — left the whole table showing
|
||||
the previous rule's numbers with nothing to say they were stale.
|
||||
That is how a setting comes to look as though it does nothing. */}
|
||||
<AwardEditor open={editing} onClose={() => setEditing(false)}
|
||||
onSaved={() => { setByCode({}); setRescanTick((t) => t + 1); loadList(); onAwardsChanged?.(); }} />
|
||||
{/* Quick selector — scales when there are many awards. */}
|
||||
{awardList.length > 0 && (
|
||||
<div className="px-2 py-2 border-b border-border/40">
|
||||
@@ -498,8 +524,8 @@ export function AwardsPanel({ onEditQSO, onAwardsChanged, onPaperQSL }: {
|
||||
<tr className="bg-card">
|
||||
<th className="sticky left-0 z-20 bg-card text-left py-1.5 pr-3 font-medium border-b border-border">{t('awp.statistic')}</th>
|
||||
{statsBandIdx.map((i) => <th key={stats.bands[i]} className="py-1.5 px-1 font-mono font-medium border-b border-border text-center w-11">{stats.bands[i]}</th>)}
|
||||
<th className="py-1.5 px-2 font-medium border-b border-border text-center">{t('awp.total')}</th>
|
||||
<th className="py-1.5 px-2 font-medium border-b border-border text-center">{t('awp.grand')}</th>
|
||||
<th className="py-1.5 px-2 font-medium border-b border-border text-center" title={t('awp.totalHint')}>{t('awp.total')}</th>
|
||||
<th className="py-1.5 px-2 font-medium border-b border-border text-center" title={t('awp.grandHint')}>{t('awp.grand')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -518,6 +544,19 @@ export function AwardsPanel({ onEditQSO, onAwardsChanged, onPaperQSL }: {
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
{challenge !== null && (
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td className="sticky left-0 bg-card py-1.5 pr-3 font-semibold whitespace-nowrap" title={t('awp.challengeHint')}>
|
||||
{t('awp.challenge')}
|
||||
</td>
|
||||
<td colSpan={statsBandIdx.length} className="py-1.5 text-[11px] text-muted-foreground">
|
||||
{t('awp.challengeBands')}
|
||||
</td>
|
||||
<td className="text-center py-1.5 px-2 font-mono font-bold text-success" colSpan={2}>{challenge}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
)}
|
||||
</table>
|
||||
)}
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user