Add store location map manager #20

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

View File

@ -121,7 +121,7 @@ export default function useLocationMapDraftActions({
const response = await publishLocationMapDraft(activeHouseholdId, locationId);
if (!isCurrentScope()) return;
applyDraftResponse(response, "view", false);
applyDraftResponse(response, "view", false, { preserveSelectedIndex: selectedObjectIndex });
toast.success(
"Published map",
hasUnsavedChanges

View File

@ -2795,6 +2795,9 @@ test("admin publish saves pending map edits before publishing", async ({ page })
await expect(page.locator(".location-map-status")).toHaveText("Published");
await expect(page.getByRole("button", { name: "Map area Quick Publish Bakery" })).toBeVisible();
await expect(page.getByRole("button", { name: "Map area Live Bakery" })).toHaveCount(0);
await expect(page.locator(".location-map-object.is-selected")).toHaveAttribute("data-object-key", "1450");
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Quick Publish Bakery");
await expect(page.getByRole("button", { name: "Close selected map area" })).toBeVisible();
});
test("admin publish failure keeps successfully saved pending edits", async ({ page }) => {