feat: show stock names as primary display in history, strategy, and backtest pages
All checks were successful
Deploy to Production / deploy (push) Successful in 1m32s

This commit is contained in:
ayuriel 2026-02-16 12:52:56 +09:00
parent 87dff8bfa7
commit 48417a03f5
5 changed files with 9 additions and 11 deletions

View File

@ -60,6 +60,7 @@ interface TransactionItem {
id: number;
date: string;
ticker: string;
name: string | null;
action: string;
shares: number;
price: number;
@ -390,8 +391,7 @@ export default function BacktestDetailPage() {
{selectedHoldings.holdings.map((h) => (
<tr key={h.ticker} className="hover:bg-muted/50">
<td className="px-4 py-3">
<div className="font-medium">{h.ticker}</div>
<div className="text-xs text-muted-foreground">{h.name}</div>
<span className="font-medium" title={h.ticker}>{h.name || h.ticker}</span>
</td>
<td className="px-4 py-3 text-sm text-right">{formatNumber(h.weight)}%</td>
<td className="px-4 py-3 text-sm text-right">{formatCurrency(h.shares)}</td>
@ -422,7 +422,7 @@ export default function BacktestDetailPage() {
{transactions.map((t) => (
<tr key={t.id} className="hover:bg-muted/50">
<td className="px-4 py-3 text-sm">{t.date}</td>
<td className="px-4 py-3 text-sm font-medium">{t.ticker}</td>
<td className="px-4 py-3 text-sm font-medium" title={t.ticker}>{t.name || t.ticker}</td>
<td className="px-4 py-3 text-center">
<span className={`px-2 py-1 rounded text-xs ${
t.action === 'buy'

View File

@ -22,6 +22,7 @@ interface SnapshotDetail {
snapshot_date: string;
holdings: {
ticker: string;
name: string | null;
quantity: number;
price: string;
value: string;
@ -424,8 +425,8 @@ export default function PortfolioHistoryPage() {
<tbody className="divide-y divide-border">
{selectedSnapshot.holdings.map((holding) => (
<tr key={holding.ticker}>
<td className="px-4 py-2 text-sm text-foreground">
{holding.ticker}
<td className="px-4 py-2 text-sm text-foreground" title={holding.ticker}>
{holding.name || holding.ticker}
</td>
<td className="px-4 py-2 text-sm text-right text-foreground">
{holding.quantity.toLocaleString()}

View File

@ -207,8 +207,7 @@ export default function MultiFactorPage() {
<tr key={stock.ticker} className="hover:bg-muted/50">
<td className="px-4 py-3 text-sm font-medium">{stock.rank}</td>
<td className="px-4 py-3">
<div className="font-medium">{stock.ticker}</div>
<div className="text-xs text-muted-foreground">{stock.name}</div>
<span className="font-medium" title={stock.ticker}>{stock.name || stock.ticker}</span>
</td>
<td className="px-4 py-3 text-sm">{stock.sector_name || '-'}</td>
<td className="px-4 py-3 text-sm text-right">{formatCurrency(stock.market_cap)}</td>

View File

@ -172,8 +172,7 @@ export default function QualityStrategyPage() {
<tr key={stock.ticker} className="hover:bg-muted/50">
<td className="px-4 py-3 text-sm font-medium">{stock.rank}</td>
<td className="px-4 py-3">
<div className="font-medium">{stock.ticker}</div>
<div className="text-xs text-muted-foreground">{stock.name}</div>
<span className="font-medium" title={stock.ticker}>{stock.name || stock.ticker}</span>
</td>
<td className="px-4 py-3 text-sm">{stock.sector_name || '-'}</td>
<td className="px-4 py-3 text-sm text-right">{formatCurrency(stock.market_cap)}</td>

View File

@ -188,8 +188,7 @@ export default function ValueMomentumPage() {
<tr key={stock.ticker} className="hover:bg-muted/50">
<td className="px-4 py-3 text-sm font-medium">{stock.rank}</td>
<td className="px-4 py-3">
<div className="font-medium">{stock.ticker}</div>
<div className="text-xs text-muted-foreground">{stock.name}</div>
<span className="font-medium" title={stock.ticker}>{stock.name || stock.ticker}</span>
</td>
<td className="px-4 py-3 text-sm">{stock.sector_name || '-'}</td>
<td className="px-4 py-3 text-sm text-right">{formatCurrency(stock.market_cap)}</td>