From d5cfd220144cb5a17226a5f7545a2947b54def52 Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 4 Jun 2026 07:53:12 -0700 Subject: [PATCH] fix: compact map setup states --- .../components/maps/LocationMapSetupPanel.jsx | 30 +++++++------- .../src/styles/pages/LocationMapManager.css | 39 ++++++++++++------- frontend/tests/location-map-manager.spec.ts | 22 ++++++++--- 3 files changed, 60 insertions(+), 31 deletions(-) diff --git a/frontend/src/components/maps/LocationMapSetupPanel.jsx b/frontend/src/components/maps/LocationMapSetupPanel.jsx index f0874b0..d41d3fb 100644 --- a/frontend/src/components/maps/LocationMapSetupPanel.jsx +++ b/frontend/src/components/maps/LocationMapSetupPanel.jsx @@ -10,14 +10,12 @@ export default function LocationMapSetupPanel({ onCreateFromZones, onCreateBlank, }) { - const description = hasAnyMap - ? canManage - ? "A draft map exists for this location." - : "A map draft exists for this location, but it has not been published yet." - : canManage - ? "Create a rough map for this store location." - : "A household admin has not published a map yet."; const hasZones = zoneCount > 0; + const status = hasAnyMap + ? "Draft" + : canManage + ? "Not started" + : "Not published"; const createFromZonesLabel = hasZones ? `Create From ${zoneCount} Zone${zoneCount === 1 ? "" : "s"}` : "Create From Zones"; @@ -28,7 +26,18 @@ export default function LocationMapSetupPanel({ return (

{hasAnyMap ? "Draft Map" : "No Map"}

-

{description}

+
+
+ Status + {status} +
+ {canManage ? ( +
+ Zones + {zoneCount} +
+ ) : null} +
{hasAnyMap && canManage ? (
) : !hasAnyMap && canManage ? (
- {!hasZones ? ( -

- No zones are available yet. Create a blank map now, or add zones first for an automatic starter layout. -

- ) : null} {!hasZones ? ( <>