From db67593dd4c131564625542bfaf7c26c6c328f36 Mon Sep 17 00:00:00 2001 From: dbstj0403 Date: Sun, 29 Jun 2025 14:10:46 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=B1=8C=EB=A6=B0=EC=A7=80=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=9D=B4=EC=8A=88=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../get-isa-portfolio.test.ts.snap | 36 +++++++++++++++++++ .../challenge/data/challenge-list.tsx | 4 +-- app/(routes)/challenge/page.tsx | 2 +- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 __tests__/services/__snapshots__/get-isa-portfolio.test.ts.snap diff --git a/__tests__/services/__snapshots__/get-isa-portfolio.test.ts.snap b/__tests__/services/__snapshots__/get-isa-portfolio.test.ts.snap new file mode 100644 index 0000000..8d294a2 --- /dev/null +++ b/__tests__/services/__snapshots__/get-isa-portfolio.test.ts.snap @@ -0,0 +1,36 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`getISAPortfolio matches snapshot for consistent portfolio structure 1`] = ` +[ + { + "category": "채권", + "percentage": 4.8, + "value": 1000000, + }, + { + "category": "펀드", + "percentage": 9.5, + "value": 2000000, + }, + { + "category": "ELS", + "percentage": 14.3, + "value": 3000000, + }, + { + "category": "국내 ETF", + "percentage": 19, + "value": 4000000, + }, + { + "category": "해외 ETF", + "percentage": 23.8, + "value": 5000000, + }, + { + "category": "국내&해외 ETF", + "percentage": 28.6, + "value": 6000000, + }, +] +`; diff --git a/app/(routes)/challenge/data/challenge-list.tsx b/app/(routes)/challenge/data/challenge-list.tsx index 838ed0c..89bb100 100644 --- a/app/(routes)/challenge/data/challenge-list.tsx +++ b/app/(routes)/challenge/data/challenge-list.tsx @@ -15,9 +15,9 @@ export const iconList = [ { id: '41', icon: '/images/challenge/icon-connect-isa.svg' }, { id: '42', icon: '/images/challenge/icon-own-3-etfs.svg' }, { id: '43', icon: '/images/challenge/icon-hold-isa-500days.svg' }, - { id: '44', icon: '/images/challenge/icon-view-ai-portfolio.svg' }, + { id: '47', icon: '/images/challenge/icon-view-ai-portfolio.svg' }, { id: '45', icon: '/images/challenge/icon-investment-dna-test.svg' }, - { id: '46', icon: '/images/challenge/icon-annual-deposit-over-1m.svg' }, + { id: '48', icon: '/images/challenge/icon-annual-deposit-over-1m.svg' }, ]; export const challengeList: Mission[] = [ diff --git a/app/(routes)/challenge/page.tsx b/app/(routes)/challenge/page.tsx index 37bd61c..61df16c 100644 --- a/app/(routes)/challenge/page.tsx +++ b/app/(routes)/challenge/page.tsx @@ -12,7 +12,7 @@ const ChallengePage = async () => { {hasIsaAccount ? ( ) : ( - // ← 계좌가 없으면 모달만 렌더 + )} ); From 73d99cb67e50af008a028bf96c49d1a6bb961b8e Mon Sep 17 00:00:00 2001 From: dbstj0403 Date: Sun, 29 Jun 2025 14:38:34 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EB=B0=98=EC=9D=91=ED=98=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(routes)/isa/_components/calendar.tsx | 6 +++--- app/(routes)/isa/_components/portfolio.tsx | 12 +++++------- app/(routes)/isa/_components/profit-report.tsx | 6 +++--- app/(routes)/isa/page.tsx | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/app/(routes)/isa/_components/calendar.tsx b/app/(routes)/isa/_components/calendar.tsx index be13116..3f319fa 100644 --- a/app/(routes)/isa/_components/calendar.tsx +++ b/app/(routes)/isa/_components/calendar.tsx @@ -51,7 +51,7 @@ const Calendar = ({ data }: { data: any }) => { {transactions && ( -
+

{format(selected!, 'M월 d일 (E)', { locale: ko })}

@@ -63,7 +63,7 @@ const Calendar = ({ data }: { data: any }) => { > {/* 왼쪽: 항목 정보 */}
-

+

{tx.title}

{ {/* 오른쪽: 금액 */}
-

+

{tx.amount.toLocaleString()}원

diff --git a/app/(routes)/isa/_components/portfolio.tsx b/app/(routes)/isa/_components/portfolio.tsx index 53412ca..71d3656 100644 --- a/app/(routes)/isa/_components/portfolio.tsx +++ b/app/(routes)/isa/_components/portfolio.tsx @@ -320,7 +320,8 @@ const Portfolio = ({ ))}
-
+
+ {/* 왼쪽 블록 */}
@@ -328,22 +329,19 @@ const Portfolio = ({ 전문가 모델 기반 리밸런싱을 원하시나요?

- 하나은행 AI 기반 ISA 포트폴리오 추천과 연동해보세요.
-
- - {/*
*/} - {/* {generateRebalancingSummary(rebalancingOpinions)}*/} - {/*
*/}
)} diff --git a/app/(routes)/isa/_components/profit-report.tsx b/app/(routes)/isa/_components/profit-report.tsx index 5e06a21..14ba046 100644 --- a/app/(routes)/isa/_components/profit-report.tsx +++ b/app/(routes)/isa/_components/profit-report.tsx @@ -81,7 +81,7 @@ const ProfitReport = ({

전체 수익률

= 0 ? 'text-hana-red ' : 'text-blue'}`} + className={`font-bold text-base sm:text-lg ${currentRate >= 0 ? 'text-hana-red ' : 'text-blue'}`} > {currentRate >= 0 ? `+${currentRate} %` : `${currentRate} %`}

@@ -99,7 +99,7 @@ const ProfitReport = ({

평가 수익

= 0 ? 'text-hana-green' : 'text-blue-500'} font-bold text-lg`} + className={`${evaluatedProfit >= 0 ? 'text-hana-green' : 'text-blue-500'} font-bold text-base sm:text-lg`} > {evaluatedProfit >= 0 ? `+${formatComma(evaluatedProfit)} 원` @@ -108,7 +108,7 @@ const ProfitReport = ({

평가 금액

-

+

{formatComma(evaluatedAmount)}원

diff --git a/app/(routes)/isa/page.tsx b/app/(routes)/isa/page.tsx index 5a56d34..920ced6 100644 --- a/app/(routes)/isa/page.tsx +++ b/app/(routes)/isa/page.tsx @@ -20,7 +20,7 @@ const ISAPage = async () => { } const taxData = await taxSaving(); - console.log(taxData); + const monthlyReturnsData: MonthlyReturnsSummary = { ...(await getMonthlyReturns('6')), monthlyEvaluatedAmounts: [],