fix: simplify balance billing and govern operation logs

This commit is contained in:
hectorzhao
2026-07-14 17:40:32 +08:00
parent f35691f185
commit 28dad93e3e
40 changed files with 740 additions and 395 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ export function ClientHome() {
}, []);
const account = dashboard?.accounts[0];
const availableBalance = ((account?.balanceCents ?? 0) + (account?.creditCents ?? 0)) / 100;
const availableBalance = (account?.balanceCents ?? 0) / 100;
const todaySpend = (dashboard?.today.spendCents ?? 0) / 100;
const todayRefund = Math.abs((dashboard?.transactions._sum.amountCents ?? 0) < 0 ? 0 : dashboard?.transactions._sum.amountCents ?? 0) / 100;
const balanceBaseline = Math.max(availableBalance + todaySpend - todayRefund, availableBalance, 1);
@@ -145,7 +145,7 @@ export function ClientHome() {
</button>
<button className="quick-action" onClick={() => navigate('/client/billing')} type="button">
<WalletCards size={20} />
<span></span>
<span></span>
<small></small>
</button>
</div>