This commit is contained in:
2026-06-07 14:49:52 +02:00
parent 9189f54df5
commit 7d80d26bbd
4 changed files with 94 additions and 4 deletions
@@ -280,6 +280,19 @@ export function AwardRefSelector({ dxcc, value, onChange, fieldValues }: Props)
value={q}
onChange={(e) => setQ(e.target.value)}
/>
{/* Add an UNLISTED reference: type a new code (e.g. a brand-new POTA park
not yet in the list) and add it directly. */}
{q.trim().length >= 2 && !results.some((r) => r.code.toUpperCase() === q.trim().toUpperCase()) && (
<button
type="button"
onClick={() => { addRef({ code: q.trim().toUpperCase(), name: '' } as AwardRef); setQ(''); }}
className="text-left rounded border border-dashed border-primary/50 px-1.5 py-1 text-[11px] text-primary hover:bg-primary/10"
title="Add this reference even though it isn't in the list yet (new / unlisted)"
>
+ Add <span className="font-mono font-semibold">{q.trim().toUpperCase()}</span>
<span className="text-[10px] text-muted-foreground"> (unlisted)</span>
</button>
)}
<div className="flex-1 overflow-auto border rounded-md text-xs min-h-0">
{busy && (
<div className="flex items-center gap-1.5 px-2 py-1.5 text-muted-foreground">