Show stage pill next to profit target on dashboards

State API now returns stage = 1 + number of withdrawals. Both the main
dashboard and the account detail page show a small Stage N pill next to
the profit target value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-04-26 03:02:02 -05:00
co-authored by Claude Opus 4.6
parent 009f7471c2
commit 536aad27ef
4 changed files with 21 additions and 4 deletions
+6 -1
View File
@@ -135,7 +135,12 @@ function AccountRow({ account, firm, hideDead, privacy }: { account: AccountStat
</td>
<td className="px-4 py-3 text-slate-600 tabular-nums">
<div className="flex flex-col">
<span>${(account.effectiveProfitTarget ?? cfg?.profitTarget ?? 0).toLocaleString(undefined, { maximumFractionDigits: 2 })}</span>
<div className="flex items-center gap-1.5">
<span>${(account.effectiveProfitTarget ?? cfg?.profitTarget ?? 0).toLocaleString(undefined, { maximumFractionDigits: 2 })}</span>
<span className="inline-block px-1.5 py-0.5 rounded text-[10px] font-semibold bg-indigo-100 text-indigo-700">
Stage {account.stage}
</span>
</div>
{account.dailyTarget && (
<span className="text-xs text-slate-400">${fmt(account.dailyTarget.amount)} today</span>
)}