Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions __tests__/services/__snapshots__/get-isa-portfolio.test.ts.snap
Original file line number Diff line number Diff line change
@@ -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,
},
]
`;
4 changes: 2 additions & 2 deletions app/(routes)/challenge/data/challenge-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand Down
2 changes: 1 addition & 1 deletion app/(routes)/challenge/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ChallengePage = async () => {
{hasIsaAccount ? (
<ChallengePageContainer challenges={await getChallenges()} />
) : (
<NoIsaModal /> // ← 계좌가 없으면 모달만 렌더
<NoIsaModal />
)}
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions app/(routes)/isa/_components/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Calendar = ({ data }: { data: any }) => {
</div>

{transactions && (
<div className='mt-5 px-4'>
<div className='mt-5'>
<p className='text-base font-semibold mb-4'>
{format(selected!, 'M월 d일 (E)', { locale: ko })}
</p>
Expand All @@ -63,7 +63,7 @@ const Calendar = ({ data }: { data: any }) => {
>
{/* 왼쪽: 항목 정보 */}
<div className='space-y-1'>
<p className='text-sm text-gray-800 font-semibold'>
<p className='text-xs sm:text-sm text-gray-800 font-semibold'>
{tx.title}
</p>
<span
Expand All @@ -87,7 +87,7 @@ const Calendar = ({ data }: { data: any }) => {

{/* 오른쪽: 금액 */}
<div className='text-right'>
<p className='font-semibold text-gray-800'>
<p className='font-semibold sm:text-base text-sm text-gray-800'>
{tx.amount.toLocaleString()}원
</p>
</div>
Expand Down
12 changes: 5 additions & 7 deletions app/(routes)/isa/_components/portfolio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,30 +320,28 @@ const Portfolio = ({
))}
</ul>
</div>
<div className='mt-6 p-4 bg-hana-green/10 rounded-lg flex items-center justify-between'>
<div className='mt-6 p-4 bg-hana-green/10 rounded-lg flex flex-col sm:flex-row justify-between items-center'>
{/* 왼쪽 블록 */}
<div className='flex items-start gap-2'>
<Sparkles className='text-hana-green w-5 h-5 mt-0.5' />
<div>
<p className='font-medium text-gray-800 mb-1'>
전문가 모델 기반 리밸런싱을 원하시나요?
</p>
<div className='flex items-center gap-1 text-xs text-gray-500'>
<Bot className='w-3.5 h-3.5 text-gray-400' />
하나은행 AI 기반 ISA 포트폴리오 추천과 연동해보세요.
</div>
</div>
</div>
<button className='flex items-center gap-1 text-sm text-hana-green font-semibold hover:underline whitespace-nowrap'>

{/* 오른쪽 버튼 */}
<button className='mt-4 sm:mt-0 flex items-center gap-1 text-sm text-hana-green font-semibold hover:underline whitespace-nowrap'>
ISA 포트폴리오 연결하기
<ArrowRight className='w-4 h-4' />
</button>
</div>
</div>
</div>

{/*<div className='bg-green-50 rounded-lg p-3 text-xs leading-relaxed text-gray-700'>*/}
{/* {generateRebalancingSummary(rebalancingOpinions)}*/}
{/*</div>*/}
</div>
</div>
)}
Expand Down
6 changes: 3 additions & 3 deletions app/(routes)/isa/_components/profit-report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const ProfitReport = ({
<p className='text-sm text-gray-500'>전체 수익률</p>
<div className='flex justify-center items-center gap-1'>
<p
className={`font-bold text-lg ${currentRate >= 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} %`}
</p>
Expand All @@ -99,7 +99,7 @@ const ProfitReport = ({
<div>
<p className='text-sm text-gray-500'>평가 수익</p>
<p
className={`${evaluatedProfit >= 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)} 원`
Expand All @@ -108,7 +108,7 @@ const ProfitReport = ({
</div>
<div>
<p className='text-sm text-gray-500'>평가 금액</p>
<p className='text-blue-500 font-bold text-lg'>
<p className='text-blue-500 font-bold text-base sm:text-lg'>
{formatComma(evaluatedAmount)}원
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/(routes)/isa/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ISAPage = async () => {
}

const taxData = await taxSaving();
console.log(taxData);

const monthlyReturnsData: MonthlyReturnsSummary = {
...(await getMonthlyReturns('6')),
monthlyEvaluatedAmounts: [],
Expand Down