fix(parcel-sync): allow DB download regardless of layer freshness

The top export buttons required all primary layers to be "fresh" (<7 days)
before using the DB download path. When stale, they fell through to live
eTerra sync which requires credentials — blocking users who just want to
download existing data. Now any UAT with data in DB uses the local export
path directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude VM
2026-04-08 15:16:41 +03:00
parent 0cce1c8170
commit 708e550d06
@@ -149,10 +149,8 @@ export function ExportTab({
const primaryLayers = dbLayersSummary.filter((l) => const primaryLayers = dbLayersSummary.filter((l) =>
PRIMARY_LAYERS.includes(l.id), PRIMARY_LAYERS.includes(l.id),
); );
const allFresh =
primaryLayers.length > 0 && primaryLayers.every((l) => l.isFresh);
const hasData = dbTotalFeatures > 0; const hasData = dbTotalFeatures > 0;
const canExportLocal = allFresh && hasData; const canExportLocal = hasData;
const oldestSyncDate = primaryLayers.reduce( const oldestSyncDate = primaryLayers.reduce(
(oldest, l) => { (oldest, l) => {