Add store location map manager #20

Open
nalalangan wants to merge 206 commits from feature/location-map-manager into feature/store-selector-modal
3 changed files with 4 additions and 9 deletions
Showing only changes of commit 24f2283caf - Show all commits

View File

@ -47,7 +47,6 @@ export default function LocationMapBottomSheet({
onPreviewDraft,
onPanMode,
onEditObjects,
onEditMode,
onObjectField,
onZoneLinkChange,
onClearSelection,
@ -143,10 +142,6 @@ export default function LocationMapBottomSheet({
{primaryDraftActions}
{secondaryDraftActions}
</div>
) : canManage && mapState?.published_map ? (
<div className="location-map-editor-actions">
<button type="button" onClick={onEditMode}>Edit Map</button>
</div>
) : null;
return (

View File

@ -619,7 +619,6 @@ export default function LocationMapManager() {
onPreviewDraft={handlePreviewDraft}
onPanMode={() => setEditorTool("pan")}
onEditObjects={() => setEditorTool("edit")}
onEditMode={handleEditMode}
onObjectField={handleObjectField}
onZoneLinkChange={handleZoneLinkChange}
onClearSelection={() => setSelectedObjectKey(null)}

View File

@ -360,7 +360,8 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({
await page.getByRole("button", { name: "Publish", exact: true }).click();
await expect(page.locator(".location-map-status")).toHaveText("Published");
await expect(page.getByRole("button", { name: "Edit Map" })).toBeVisible();
await expect(page.getByRole("button", { name: "Edit Draft" })).toBeVisible();
await expect(page.getByRole("button", { name: "Edit Map" })).toHaveCount(0);
await expect(page.getByText("loose batteries")).toHaveCount(0);
await page.locator(".location-map-object", { hasText: "Bread Wall" }).locator("rect").first().click();
@ -1250,7 +1251,7 @@ test("admin publish saves pending map edits before publishing", async ({ page })
await page.goto("/stores/100/locations/10/map");
await page.getByRole("button", { name: "Edit Map" }).click();
await page.getByRole("button", { name: "Edit Draft" }).click();
await page.getByRole("button", { name: "Edit Objects" }).click();
await page.locator(".location-map-object", { hasText: "Live Bakery" }).locator("rect").first().click();
await page.getByRole("textbox", { name: "Label" }).fill("Quick Publish Bakery");
@ -1332,7 +1333,7 @@ test("admin publish failure keeps successfully saved pending edits", async ({ pa
await page.goto("/stores/100/locations/10/map");
await page.getByRole("button", { name: "Edit Map" }).click();
await page.getByRole("button", { name: "Edit Draft" }).click();
await page.getByRole("button", { name: "Edit Objects" }).click();
await page.locator(".location-map-object", { hasText: "Live Bakery" }).locator("rect").first().click();
await page.getByRole("textbox", { name: "Label" }).fill("Saved Draft Bakery");