Compare commits

...

2 Commits

Author SHA1 Message Date
dc9d2dca88 Merge branch 'dev' into main — 보유종목에서 데이트레이딩 제외
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:32:26 +09:00
309a778a63 fix(frontend): 보유종목 목록에서 데이트레이딩 포지션 제외
사용자 요청: 스윙 목록 사이에 데이 종목이 끼어 보이지 않게 — 데이트레이딩 섹션·카운트 제거,
합산 행은 스윙 몫만 표시(DT 몫은 하단 DayTradingStatusBar). 매매 로직 변경 없음.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:31:48 +09:00

View File

@@ -16,7 +16,7 @@
import React, { useMemo } from 'react'
import { useQuery } from '@tanstack/react-query'
import api from '../lib/api'
import { Activity, TrendingUp, Clock, UserCircle, Globe } from 'lucide-react'
import { Activity, TrendingUp, UserCircle, Globe } from 'lucide-react'
import { Position } from '../types/trading'
import { isUsStock } from '../utils/stockUtils'
import { groupHoldings, GroupedHolding } from '../utils/portfolioGrouping'
@@ -253,7 +253,7 @@ const PortfolioPanel = React.memo(({
}, [dtPositions, dtError])
const groups = useMemo(() => groupHoldings(portfolio, dtRows), [portfolio, dtRows])
const total = groups.daytrading.length + groups.swing.length + groups.manual.length + groups.overseas.length
const total = groups.swing.length + groups.manual.length + groups.overseas.length
/** 그룹 소계 (실시간 가격 우선). 통화가 다르므로 그룹 내 같은 통화끼리만 합산 */
const subtotal = (stocks: Position[]) => {
@@ -324,9 +324,6 @@ const PortfolioPanel = React.memo(({
보유 종목
</h3>
<div className="flex items-center gap-1">
{groups.daytrading.length > 0 && (
<span className="text-[8px] font-mono text-[#f97316] bg-[#f97316]/10 px-1.5 py-px rounded-sm">데이 {groups.daytrading.length}</span>
)}
{groups.swing.length > 0 && (
<span className="text-[8px] font-mono text-[#a78bfa] bg-[#a78bfa]/10 px-1.5 py-px rounded-sm">스윙 {groups.swing.length}</span>
)}
@@ -348,7 +345,7 @@ const PortfolioPanel = React.memo(({
</div>
) : total > 0 ? (
<>
{renderGroup(groups.daytrading, '데이트레이딩', <Clock className="w-2.5 h-2.5 text-[#f97316]" />, 'text-[#f97316]', '15:20 자동 청산 (당일 청산 원칙)')}
{/* 데이트레이딩 포지션은 보유종목 목록에서 제외(사용자 요청 2026-10-06) — 하단 DayTradingStatusBar 에서 확인 */}
{renderGroup(groups.swing, '스윙', <TrendingUp className="w-2.5 h-2.5 text-[#a78bfa]" />, 'text-[#a78bfa]')}
{renderGroup(groups.manual, '수동 / 외부', <UserCircle className="w-2.5 h-2.5 text-[#eab308]" />, 'text-[#eab308]', '자동 청산 대상 아님 - 직접 청산 필요')}
{renderGroup(groups.overseas, '해외', <Globe className="w-2.5 h-2.5 text-[#22c55e]" />, 'text-[#22c55e]', undefined, true)}