From 9f09a539d68c75b530febdb5153476719f7d0f46 Mon Sep 17 00:00:00 2001 From: roy-bme Date: Thu, 14 May 2026 19:32:26 +0100 Subject: [PATCH] Fix map business photo upload and panel layering --- components/ops/Map/MapView.tsx | 43 ++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/components/ops/Map/MapView.tsx b/components/ops/Map/MapView.tsx index 51231b7..c602a29 100644 --- a/components/ops/Map/MapView.tsx +++ b/components/ops/Map/MapView.tsx @@ -128,7 +128,10 @@ export default function MapView({ const handleSelectFromPin = useCallback((businessId: string) => { setActiveBusinessId(businessId); - }, []); + const business = items.find((b) => b.id === businessId) ?? null; + setSelected(business); + setEditing(false); + }, [items]); const handleMapClick = useCallback( (coords: { lat: number; lng: number }) => { @@ -212,7 +215,7 @@ export default function MapView({ } const handleAddPhotoClick = useCallback(() => { - console.log("[MapView] Add photo button clicked"); + console.log("file input clicked"); fileInputRef.current?.click(); }, []); @@ -415,17 +418,28 @@ export default function MapView({ /> ) : null} {selected ? ( -
+
-

Edit business

- -
-
- {["name", "sector", "decision_maker_name", "decision_maker_title", "phone", "email", "linkedin", "est_monthly_volume", "zimx_fit_score", "key_suppliers", "key_customers", "pain_points"].map((k) => ( - setForm((p) => ({ ...p, [k]: e.target.value }))} /> - ))} -