feat(settings): Load demo data button in Settings -> Data (PMS-679) #437
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-679-load-demo-data-button"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a "Load demo data" button to Settings -> Data (the Import & Export page). One click populates an empty tenant with Mokosh's built-in demo dataset so a fresh account can be explored without touching the CLI.
Why
The Data settings group could export and import tenant data, but loading the demo dataset was CLI-only (
mokosh-bootstrap qa-seed/ the auto-seed on first visit). Nate wanted a UI button that works with seed data, not just ajust/CLI command, for standing up and re-populating the demo.How
A new
SeedDemoPanelon the Import & Export page POSTs/data/seed-demo(the admin-only server endpoint added in the companion mokosh-server PMS-679 PR) viapost_authed_typedand renders the outcome: green when the demo company/contacts/tickets were loaded, amber when the tenant already has data. This matches the server's additive, only-if-empty contract: it never overwrites existing data. The button is gated onuse_can_mutatelike the import panel, so the write is blocked while the server is unreachable. The page is already admin-only.Depends on
mokosh-server PMS-679 (
POST /api/v1/data/seed-demo). Merge that first so the endpoint exists.PMS-679
Match the MAPPS-376 copy cleanup: "This only loads into an empty tenant - it never overwrites existing data." becomes two sentences ("...empty tenant. It never overwrites existing data."). #PMS-679 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>