feat(admin): add module settings to toggle trading feature

Introduce module_settings table to store global feature flags
Add admin UI to enable or disable the Trading module
Hide trading-related UI and skip data fetching when disabled
This commit is contained in:
2026-05-10 16:59:07 +08:00
parent 26bef1b749
commit 42319695e9
11 changed files with 271 additions and 85 deletions

View File

@@ -223,11 +223,19 @@ This project is developed from WSL, but runtime validation is done through Docke
Agent workflow:
* Run when practical:
* Run once when practical:
* `pnpm lint`
* `pnpm typecheck`
* Do not repeatedly retry failed validation commands.
* If lint/typecheck fails because of missing dependencies, native optional bindings, WSL, network, registry, filesystem permission, or other environment/setup issues:
* Do not repeatedly run `pnpm install`, force reinstall dependencies, delete `node_modules`, or otherwise spend time repairing the local environment unless the user explicitly asks.
* Report the exact command attempted and the key error lines.
* Tell the user what command to run locally or in Docker.
* Wait for the user to paste `docker compose up --build`, lint, typecheck, or runtime output before fixing follow-up errors.
* Do NOT run tests in WSL.
* Do NOT require local test execution before finishing a task.
* The user will run `docker compose up --build`.
@@ -246,7 +254,7 @@ A task is complete ONLY IF:
* Minimal diff, with no unrelated changes.
* No UI leaks of internal info.
* Code is readable and concise.
* Passes lint/typecheck when practical.
* Lint/typecheck has been run once when practical, or the environment blocker and user-side validation command have been reported.
* Docker runtime issues are handled from user-provided `docker compose up --build` output.
---