가상투자 종목카드박스 레이아웃 수정

This commit is contained in:
Macbook
2026-05-26 16:42:57 +09:00
parent 7cf43609dc
commit c0d21ac825
25 changed files with 1632 additions and 61 deletions
@@ -234,3 +234,19 @@ export function formatUpdatedTime(ts: number | undefined): string {
hour12: false,
});
}
/** 카드 푸터용 전략 조건 한 줄 요약 */
export function formatVirtualConditionBrief(
row: VirtualConditionRow & { currentValue?: number | null },
): string {
const sideTag = row.side === 'buy' ? '[매수]' : row.side === 'sell' ? '[매도]' : '';
const threshold = row.thresholdLabel
?? formatStrategyThreshold(row.conditionType, row.targetValue, row.conditionLabel);
return [sideTag, row.displayName, threshold].filter(Boolean).join(' ');
}
export function formatVirtualCardConditionLines(
rows: Array<VirtualConditionRow & { currentValue?: number | null }>,
): string[] {
return rows.map(formatVirtualConditionBrief);
}