refactor(ui): Deduplicate wallet/transactions pages — ledger merged into Transactions - #8
Merged
Merged
Conversation
added 6 commits
August 14, 2026 16:01
- 钱包页移除收支明细表格(wallet-table),保留余额卡片 + 充值/提现 + 跳转提示 - 交易记录页作为唯一明细入口(Tab + 排序/筛选/分页不变),补充说明文案 - 移除 WALLET_COLUMNS 与 walletTable 状态,renderWallet 仅渲染余额/按钮 - data.js 注释更新,不再表述为 wallet 与 transactions 共用 - ui/README.md 同步更新 Rant: 2026-08-14T15:59:09 钱包页与交易记录页去重(方案 A)
- index.html: topup-btn/withdraw-btn 增加 disabled;按钮旁加文案 充值/提现暂不支持(即将上线) - style.css: .btn:disabled 置灰样式(opacity .5 + cursor not-allowed + pointer-events none);wallet-actions 允许换行 - app.js: 移除 disabled 按钮的 toast 事件绑定(不可点击),保留跳转交易记录绑定 Rant: 2026-08-14T16:01:35 钱包页充值/提现置灰并提示暂不支持
- 员工行固定 '+5000 点' 按钮改为 '充值'(data-emp-topup) - 点击弹出 prompt 输入任意正整数点数,校验非空/整数/>0,非法 toast 不生效 - 充值后刷新员工列表与统计(总配额/剩余)+ toast 成功提示 - ui/README.md 同步 Rant: 2026-08-14T16:03:11 管理视图 — 管理员可给任意成员充值
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deduplicate the Wallet and Transactions pages per host instruction (rant
2026-08-14T15:59:09, 方案 A — merge): the Wallet page previously rendered the same data (D.TRANSACTIONS) with nearly identical columns as the Transactions page, causing user confusion.Changes
view-wallet): removed the 收支明细 Ledger table (wallet-table); now shows only the balance card (points balance + Top up / Withdraw buttons) plus a hint line linking to Transactions (#wallet-goto-tx).view-transactions): remains the single detail entry — Tabs (全部/消费/收益) + MRT table (sort/filter/pagination) unchanged; subtitle expanded to cover 消费(用别人的 key)、收益(别人用我的 key)、充值、提现.WALLET_COLUMNSand thewalletTablestate;renderWalletnow renders balance/buttons only;data.jscomment updated (no longerwallet 与 transactions 共用);ui/README.mdsynced.Follow-up 1 (commit
9aef59a, rant2026-08-14T16:01:35)ui/js/app.js: removed the now-dead toast handlers for the disabled buttons;#wallet-goto-txlink remains.Follow-up 2 (commit
d1d3a77, rant2026-08-14T16:03:11)Follow-up 3 (commit
801e78c, rant2026-08-14T16:08:54)deptfields follow renames), 删除 (confirmation; if the dept has members the confirm warns "该部门有 N 名成员"), 查看 via name search/filter.data.jsaddsDEPARTMENTSmock (研发/产品/市场/设计 with monthly quota); used/member-count are aggregated live fromEMPLOYEESso stats stay consistent.Tests
node --checkpasses onui/js/app.jsandui/js/data.jswallet-table/WALLET_COLUMNS/walletTable/data-emp-addreferencescargo testpasses (1 passed)Related
Host rants:
2026-08-14T15:59:09— 钱包页与交易记录页去重 — 明细统一到交易记录,钱包只做余额与资金操作(方案 A)2026-08-14T16:01:35— 钱包页"充值/提现"置灰并提示暂不支持2026-08-14T16:03:11— 管理视图 — 管理员可给任意成员充值(直接增加点数,任意金额)2026-08-14T16:08:54— 管理视图 · 组织管理 — 部门列表 + 部门 CRUD + 每月点数分配Follow-up 4 (commit
d72389a, rants2026-08-14T16:10:26+2026-08-14T16:11:11)DEPARTMENTSplus an 未分配 (unassigned) entry; confirm updates the employee'sdeptand refreshes the list/stats with a toast ("已把 {name} 调整到 {dept} 部门 / 未分配").deptmay now be empty — rendered as a gray 未分配 placeholder; mockEMPLOYEESgains two unassigned new-registration members (赵欣, 王磊); the 改部门 dropdown can remove a member from any dept (set 未分配); department member-count/used stats exclude unassigned members (org pane shows "未分配 N 人" when any), and the employees stat grid now shows a dynamic dept count + unassigned count; top-up works for unassigned members as before (not dept-dependent).Follow-up 5 (commit
18827ac, rant2026-08-14T16:14:33)atk_live_<hex>id stored in the mock (previously the mock itself stored a truncated id).atk_live_****xxxx) while the full id lives in the data.navigator.clipboard.writeText(full id)with a graceful fallback forfile://(temp textarea +execCommand("copy"); if that fails, text is selected and a "Ctrl/Cmd+C" hint toast shows) — success toast "已复制…完整 key 到剪贴板".ui/README.mdupdated to mention API Key management capabilities.