Files
gaokao-volunteer-system/admin/static/dashboard.js
Hermes Agent 25a84c426b
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
feat(admin): add hidden dashboard seed-order tools
- add hidden dev-only seed endpoint /api/admin/orders/dev-seed
  - overdue_pending_once: create one 2-day-old pending order with draft intake
  - cleanup_demo_seed: delete demo-tagged seeded orders
- restrict hidden seed route to non-prod env
- avoid decrypting all orders during cleanup; query ids/tags directly from SQL
- dashboard hidden entry:
  - title id=dashboard-title
  - dev-seed-panel hidden by default
  - opens via 5 title clicks or ?seed-tools=1
  - buttons: 补 1 笔超时待办 / 清理演示造数
- dashboard JS:
  - postDevSeed()
  - panel show/hide
  - refresh dashboard after seed/cleanup
- tests:
  - route auth + create/cleanup flow
  - dashboard HTML/JS structure assertions
  - admin UI page exposes hidden entry markup
- verification:
  - pytest 69 passed
  - browser: ?seed-tools=1 展开面板, 补造后 pending=8 overdue=1 missing=8, 清理后恢复 pending=7 overdue hidden
2026-06-17 10:42:14 +08:00

14 KiB