feat: line2에 % + 계좌명(일반/ISA), '비중' 글자·'+' 제거
비중 칩에서 '비중' 라벨 제거(숫자%만), 계좌명을 % 오른쪽 line2로 이동. 계좌명은 owner 접두(가희_) 떼고 유형만 '·'로(중복 제거). line3는 태그만. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2522,6 +2522,13 @@ def _render_holding_row(r: dict, total_value: int, show_day_change: bool = False
|
|||||||
stock_cls = 'stock stock-xs' if _nlen >= 14 else ('stock stock-sm' if _nlen >= 10 else 'stock')
|
stock_cls = 'stock stock-xs' if _nlen >= 14 else ('stock stock-sm' if _nlen >= 10 else 'stock')
|
||||||
code = html.escape(r.get('code', '') or '')
|
code = html.escape(r.get('code', '') or '')
|
||||||
accounts = html.escape('+'.join(r.get('accounts', [])))
|
accounts = html.escape('+'.join(r.get('accounts', [])))
|
||||||
|
# 표시용 계좌명 — '가희_' 등 owner 접두 떼고 유형(일반/ISA)만, 중복 제거, '·' 구분.
|
||||||
|
_acct_types: list[str] = []
|
||||||
|
for _lb in r.get('accounts', []):
|
||||||
|
_t = (_lb or '').split('_')[-1]
|
||||||
|
if _t and _t not in _acct_types:
|
||||||
|
_acct_types.append(_t)
|
||||||
|
acct_label = html.escape('·'.join(_acct_types))
|
||||||
qty = r.get('qty', 0)
|
qty = r.get('qty', 0)
|
||||||
avg = r.get('avg', 0)
|
avg = r.get('avg', 0)
|
||||||
price = r.get('price', 0)
|
price = r.get('price', 0)
|
||||||
@@ -2671,8 +2678,8 @@ def _render_holding_row(r: dict, total_value: int, show_day_change: bool = False
|
|||||||
<summary>
|
<summary>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="line1 line1-held">{_buy_rank_badge(buy_amount)}<span class="{stock_cls}">{stock}</span></div>
|
<div class="line1 line1-held">{_buy_rank_badge(buy_amount)}<span class="{stock_cls}">{stock}</span></div>
|
||||||
<div class="line2">{star}<span class="badge held">보유 {qty:,}주</span>{_pending_badges_html(r)}<span class="muted small wt-chip">비중 <span class="rt-weight">{weight:.2f}</span>%</span></div>
|
<div class="line2">{star}<span class="badge held">보유 {qty:,}주</span>{_pending_badges_html(r)}<span class="muted small wt-chip"><span class="rt-weight">{weight:.2f}</span>%</span><span class="code">{acct_label}</span></div>
|
||||||
<div class="line3">{tag_chip}<span class="code">{accounts}</span></div>
|
<div class="line3">{tag_chip}</div>
|
||||||
{summary_journal_html}
|
{summary_journal_html}
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
|||||||
Reference in New Issue
Block a user