fix(parcel-sync): add intravilan to primary layers + tooltip on stale badge

- LIMITE_INTRAV_DYNAMIC added to primary layers checked for freshness
- Auto-refresh scheduler and weekend sync now also sync intravilan
- "X vechi" badge shows tooltip with exact layer names and dates
- "Proaspete" badge also shows tooltip with layer details

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-26 22:10:26 +02:00
parent e5da0301de
commit 8b6d6ba1d0
3 changed files with 45 additions and 15 deletions
@@ -172,6 +172,18 @@ async function runAutoRefresh() {
"CLADIRI_ACTIVE",
{ uatName: uat.name },
);
// Intravilan — lightweight, non-fatal
try {
await syncLayer(
username,
password,
uat.siruta,
"LIMITE_INTRAV_DYNAMIC",
{ uatName: uat.name },
);
} catch {
// intravilan is best-effort
}
const dur = ((Date.now() - start) / 1000).toFixed(1);
console.log(
`[auto-refresh] ${uat.name} (${uat.siruta}): terenuri +${tRes.newFeatures}/-${tRes.removedFeatures}, cladiri +${cRes.newFeatures}/-${cRes.removedFeatures} (${dur}s)`,
@@ -186,10 +186,22 @@ async function executeStep(
"TERENURI_ACTIVE",
{ uatName: city.name, forceFullSync: true },
);
// Also sync intravilan limits (lightweight, non-fatal)
try {
await syncLayer(
process.env.ETERRA_USERNAME!,
process.env.ETERRA_PASSWORD!,
city.siruta,
"LIMITE_INTRAV_DYNAMIC",
{ uatName: city.name },
);
} catch {
// intravilan is best-effort
}
const dur = ((Date.now() - start) / 1000).toFixed(1);
return {
success: res.status === "done",
message: `Terenuri: ${res.totalLocal} local (+${res.newFeatures}/-${res.removedFeatures}) [${dur}s]`,
message: `Terenuri: ${res.totalLocal} local (+${res.newFeatures}/-${res.removedFeatures}) + intravilan [${dur}s]`,
};
}