feat(parcel-sync): sync button on empty Harta tab + intravilan in base sync

Map tab: when UAT has no local data, shows a "Sincronizează terenuri,
clădiri și intravilan" button that triggers background base sync.

Sync background (base mode): now also syncs LIMITE_INTRAV_DYNAMIC layer
(intravilan boundaries) alongside TERENURI_ACTIVE + CLADIRI_ACTIVE.
Non-critical — if intravilan fails, the rest continues.

Also fixed remaining \u2192 unicode escapes in export/layers/epay tabs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-24 18:04:09 +02:00
parent b1fc7c84a7
commit 3da45a4cab
6 changed files with 101 additions and 11 deletions
@@ -221,6 +221,21 @@ async function runBackground(params: {
throw new Error(r.error ?? "Sync clădiri failed");
}
// Sync intravilan limits (always, lightweight layer)
phase = "Sincronizare limite intravilan";
push({});
try {
await syncLayer(username, password, siruta, "LIMITE_INTRAV_DYNAMIC", {
forceFullSync: forceSync,
jobId,
isSubStep: true,
});
} catch {
// Non-critical — don't fail the whole job
note = "Avertisment: limite intravilan nu s-au sincronizat";
push({});
}
if (!terenuriNeedsSync && !cladiriNeedsSync) {
note = "Date proaspete — sync skip";
}