feat(entry): County, CQ, ITU and DXCC on the freed row

Comment and Note moving onto one line left the right column two rows shorter
than the left, and this fills it: county, both zones and the ADIF entity
number. All four are filled by the lookup and were only visible after opening a
tab — the wrong place for values an operator wants to SEE are right before
pressing Log.

County is a name, not a code ("St. Tammany Parish"), so it takes the flexible
width and the three numbers get fixed narrow boxes.

Cleared numeric fields store undefined, not 0. Zero is a real DXCC number and a
real zone, so an empty box has to stay empty rather than assert something the
operator did not type.

State stays up on the geography line beside QTH and the locator, which is how
the lookup fills them and how they are read.
This commit is contained in:
2026-08-13 11:24:10 +02:00
parent b18f5c491e
commit 1cfba19ed2
3 changed files with 45 additions and 7 deletions
+41 -3
View File
@@ -4448,6 +4448,41 @@ export default function App() {
onChange={(e) => setDetails((d) => ({ ...d, state: e.target.value.toUpperCase() }))} />
</div>
);
// County beside State: the lookup fills QTH, State, County and the locator
// together, and they are read together. Wider than State because a county name
// is a name — "St. Tammany Parish", not a code.
// The row Comment/Note freed by moving onto one line: county, zones and the
// ADIF entity number. All four are filled by the lookup and were previously
// only visible after opening a tab — which is the wrong place for values an
// operator wants to SEE are right before pressing Log.
//
// A numeric field stores undefined when cleared, not 0: zero is a real DXCC
// number for "no entity" and a real answer for a zone, so an empty box must
// stay empty rather than assert something.
const num = (v: string): number | undefined => {
const s = v.replace(/[^0-9]/g, '');
return s === '' ? undefined : parseInt(s, 10);
};
const geoDetailRow = (
<div className="flex gap-4 items-end">
<div className="flex flex-col flex-1 min-w-0"><Label className="mb-1 h-3.5">{t('field.cnty')}</Label>
<Input value={details.cnty ?? ''}
onChange={(e) => setDetails((d) => ({ ...d, cnty: e.target.value }))} />
</div>
<div className="flex flex-col w-[64px] shrink-0"><Label className="mb-1 h-3.5">{t('field.cqz')}</Label>
<Input value={details.cqz ?? ''} className="font-mono"
onChange={(e) => setDetails((d) => ({ ...d, cqz: num(e.target.value) }))} />
</div>
<div className="flex flex-col w-[64px] shrink-0"><Label className="mb-1 h-3.5">{t('field.ituz')}</Label>
<Input value={details.ituz ?? ''} className="font-mono"
onChange={(e) => setDetails((d) => ({ ...d, ituz: num(e.target.value) }))} />
</div>
<div className="flex flex-col w-[72px] shrink-0"><Label className="mb-1 h-3.5">{t('field.dxcc')}</Label>
<Input value={details.dxcc ?? ''} className="font-mono"
onChange={(e) => setDetails((d) => ({ ...d, dxcc: num(e.target.value) }))} />
</div>
</div>
);
const gridBlock = (
<div className="flex flex-col w-[76px] shrink-0"><Label className="mb-1 h-3.5">{t('field.grid')}</Label>
<Input value={grid} placeholder="JN05" className="font-mono" onChange={(e) => { setGrid(e.target.value); markEdited('grid'); }} />
@@ -5913,9 +5948,12 @@ export default function App() {
{modeRow}
{countryRow}
</div>
<div className="flex gap-4 flex-1 min-w-0">
<div className="flex-1 min-w-0">{commentLine}</div>
<div className="flex-1 min-w-0">{noteLine}</div>
<div className="flex flex-col gap-1.5 flex-1 min-w-0">
<div className="flex gap-4">
<div className="flex-1 min-w-0">{commentLine}</div>
<div className="flex-1 min-w-0">{noteLine}</div>
</div>
{geoDetailRow}
</div>
</div>