From 45d4d1bf40a1ca15c2ba4c8a339658a1ee653c70 Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Wed, 25 Mar 2026 06:58:01 +0200 Subject: [PATCH] fix: hide enrichment in portal, CF disabled button, no UAT flash, fix overlaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SelectionToolbar: new hideEnrichment prop hides the Enrichment button. Portal uses it to show only Export + Clear in selection toolbar. Portal feature panel: added disabled "Solicita extras CF" button with tooltip "Sectiune platita — contacteaza administratorul". Initial map zoom: starts at zoom 15 (close-up) instead of 7 (Romania overview). Prevents the UAT boundaries flash before fitBounds runs. Applied to both ParcelSync Harta tab and Portal. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/(portal)/portal/page.tsx | 14 ++++++++++++++ .../geoportal/components/selection-toolbar.tsx | 7 +++++-- .../parcel-sync/components/tabs/map-tab.tsx | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/app/(portal)/portal/page.tsx b/src/app/(portal)/portal/page.tsx index eeae2b7..74ae5f5 100644 --- a/src/app/(portal)/portal/page.tsx +++ b/src/app/(portal)/portal/page.tsx @@ -1502,6 +1502,7 @@ function HartaContent() { ref={mapHandleRef} className="h-full w-full" basemap={basemap} + zoom={15} selectionType={selectionMode} onFeatureClick={handleFeatureClick} onSelectionChange={setSelectedFeatures} @@ -1579,6 +1580,18 @@ function HartaContent() { ); })()} +
+ +
)} @@ -1590,6 +1603,7 @@ function HartaContent() { selectedFeatures={selectedFeatures} selectionMode={selectionMode} onSelectionModeChange={handleSelectionModeChange} + hideEnrichment onClearSelection={() => { mapHandleRef.current?.clearSelection(); setSelectedFeatures([]); diff --git a/src/modules/geoportal/components/selection-toolbar.tsx b/src/modules/geoportal/components/selection-toolbar.tsx index de7b1ea..8333d7e 100644 --- a/src/modules/geoportal/components/selection-toolbar.tsx +++ b/src/modules/geoportal/components/selection-toolbar.tsx @@ -21,6 +21,8 @@ type SelectionToolbarProps = { onSelectionModeChange: (mode: SelectionMode) => void; onClearSelection: () => void; className?: string; + /** Hide the enrichment button (e.g. in portal view) */ + hideEnrichment?: boolean; }; const EXPORT_FORMATS: { id: ExportFormat; label: string }[] = [ @@ -40,6 +42,7 @@ export function SelectionToolbar({ onSelectionModeChange, onClearSelection, className, + hideEnrichment, }: SelectionToolbarProps) { const [exporting, setExporting] = useState(false); const [enriching, setEnriching] = useState(false); @@ -138,7 +141,7 @@ export function SelectionToolbar({ - + }