fix(parcel-sync): robust county population + local feature count in dropdown
- PATCH /api/eterra/uats: handle nested responses (unwrapArray), try multiple field names (extractName/extractCode), log sample UAT for debugging, match by code first then by name - GET /api/eterra/uats: include localFeatures count per SIRUTA via GisFeature groupBy query - Dropdown: show green badge with local feature count, county with dash - Add SKILLS.md for ParcelSync/eTerra/GIS module context Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,7 @@ type UatEntry = {
|
||||
name: string;
|
||||
county?: string;
|
||||
workspacePk?: number;
|
||||
localFeatures?: number;
|
||||
};
|
||||
|
||||
type SessionStatus = {
|
||||
@@ -1770,19 +1771,21 @@ export function ParcelSyncModule() {
|
||||
setSearchResults([]);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<span className="flex items-center gap-1.5 min-w-0">
|
||||
<span className="font-medium">{item.name}</span>
|
||||
<span className="text-muted-foreground ml-1.5">
|
||||
({item.siruta})
|
||||
</span>
|
||||
{item.county && (
|
||||
<span className="text-muted-foreground">
|
||||
,{" "}
|
||||
–{" "}
|
||||
<span className="font-medium text-foreground/70">
|
||||
{item.county}
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
{(item.localFeatures ?? 0) > 0 && (
|
||||
<span className="inline-flex items-center rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] font-medium text-emerald-600 dark:text-emerald-400 shrink-0">
|
||||
{(item.localFeatures ?? 0).toLocaleString("ro")} local
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
<span className="text-xs text-muted-foreground font-mono ml-2 shrink-0">
|
||||
{item.siruta}
|
||||
|
||||
Reference in New Issue
Block a user