fix: show remoteGisCount (505) as cu geometrie, add no-geom cleanup step

- UI: scan card now shows remoteGisCount instead of matchedCount (withGeometry)
  as the primary 'cu geometrie' number — this is the true GIS layer feature count
- UI: workflow preview step 1 shows remoteGisCount for download count
- UI: mismatch note reworded as secondary detail about cross-reference matching
- Import: automatic cleanup step at start of syncNoGeometryParcels
  - Builds valid immovablePk set from fresh list (active + identification/area)
  - Deletes stale NO_GEOMETRY records not in the valid set
  - Reports cleaned count in result + progress note
- NoGeomSyncResult type: added 'cleaned' field
- Gitignore: temp-db-check.cjs
This commit is contained in:
AI Assistant
2026-03-07 21:00:43 +02:00
parent f9594fff71
commit 1e6888a32a
5 changed files with 124 additions and 21 deletions
@@ -2523,7 +2523,7 @@ export function ParcelSyncModule() {
{noGeomScan.localSyncFresh &&
noGeomScan.localDbWithGeom > 0
? "skip (date proaspete în DB)"
: `descarcă ${noGeomScan.withGeometry.toLocaleString("ro-RO")} features`}
: `descarcă ${noGeomScan.remoteGisCount.toLocaleString("ro-RO")} features`}
</span>
</li>
{includeNoGeom && (
@@ -2601,7 +2601,7 @@ export function ParcelSyncModule() {
</span>{" "}
imobile în eTerra:{" "}
<span className="text-emerald-600 dark:text-emerald-400 font-medium">
{noGeomScan.withGeometry.toLocaleString("ro-RO")}
{noGeomScan.remoteGisCount.toLocaleString("ro-RO")}
</span>{" "}
cu geometrie,{" "}
<span className="font-semibold text-amber-600 dark:text-amber-400">
@@ -2609,19 +2609,15 @@ export function ParcelSyncModule() {
</span>{" "}
<span className="font-medium">fără geometrie</span>
</p>
{noGeomScan.remoteGisCount > 0 &&
noGeomScan.remoteGisCount !==
noGeomScan.withGeometry && (
<p className="text-[10px] text-muted-foreground/70 mt-0.5">
Layerul GIS are{" "}
{noGeomScan.remoteGisCount.toLocaleString(
"ro-RO",
)}{" "}
features, dar doar{" "}
{noGeomScan.withGeometry.toLocaleString("ro-RO")}{" "}
se potrivesc cu lista de imobile
</p>
)}
{noGeomScan.withGeometry <
noGeomScan.remoteGisCount && (
<p className="text-[10px] text-muted-foreground/70 mt-0.5">
{noGeomScan.withGeometry.toLocaleString("ro-RO")}{" "}
din{" "}
{noGeomScan.remoteGisCount.toLocaleString("ro-RO")}{" "}
features GIS au corespondent în lista de imobile
</p>
)}
<p className="text-[11px] text-muted-foreground mt-0.5">
Cele fără geometrie există în baza de date eTerra dar
nu au contur desenat în layerul GIS.