Skip to content

feat(ui): topup entry (US-4) and member raise-request (US-20) - #24

Merged
argszero merged 1 commit into
mainfrom
feat/ui-full-us-coverage
Aug 15, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-full-us-coverage

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Implements US-4 (top-up entry) and US-20 (member raise-request) in the UI prototype, completing full user-story coverage (24 US) as the host instructed.

Host rant: 2026-08-15T08:58:47 — "UI 原型补齐 US-4(充值入口)与 US-20(成员申请加额)— 用户故事全量支持核对"

Changes

US-4 (G7) — 普通用户充值点数

  • Wallet 充值 button is now clickable → opens a demo payment modal (preset amounts 100 / 500 / 1000 or custom)
  • Confirm → balance increases, a topup transaction is recorded (permanent points), point-source "充值点数" updates
  • Copy notes "演示流程:真实支付通道后续接入"; 提现 stays disabled

US-20 (G8) — 企业成员申请加额

  • Wallet adds "申请加额 (Request more)" button → modal (amount + reason) → submit → "已提交申请,等待管理员审批"
  • Linked to the org setting toggle "成员自助申请加额需管理员审批" (#org-approval-toggle): when ON → request is queued for approval; when OFF → applies directly
  • Admin · 成员管理 pane adds a 加额申请 list (pending requests with member / amount / reason) — 批准 adds points to the member balance (+ transaction), 驳回 marks rejected
  • data.js adds RAISE_REQUESTS mock data (one pending sample request)

Related Issue

No issue (rant-driven; issue #6 remains unclaimed)

Tests

  • cargo test passes (1 passed)
  • cargo fmt --check passes
  • node --check ui/js/app.js / node --check ui/js/data.js pass
  • New unit tests added (N/A — UI prototype, no test harness)

Checklist

  • Branch naming follows convention (feat/ui-full-us-coverage)
  • Conventional Commits message
  • Single purpose, minimal change

- wallet: topup button now opens a demo payment modal (preset 100/500/1000
  or custom amount) -> balance increases + topup transaction (permanent
  points); note says real payment channel to be added later; withdraw stays
  disabled
- wallet: "申请加额 (Request more)" button for enterprise members ->
  submit amount + reason -> waits for admin approval (linked to org setting
  toggle; when toggle off, request applies directly)
- admin members pane: raise-request list with approve/reject; approve adds
  points to member balance (+ transaction), reject just updates status
- ui/README.md documents US-4 / US-20 support
@argszero
argszero merged commit cfd38ac into main Aug 15, 2026
1 check passed
@argszero
argszero deleted the feat/ui-full-us-coverage branch August 15, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant