Files
sam-react-prod/src/components/business/CEODashboard/sections/DebtCollectionSection.tsx
byeongcheolryu 29e7b41615 chore(WEB): 다수 컴포넌트 개선 및 CEO 대시보드 추가
- CEO 대시보드 컴포넌트 추가
- AuthenticatedLayout 개선
- 각 모듈 actions.ts 에러 핸들링 개선
- API fetch-wrapper, refresh-token 로직 개선
- ReceivablesStatus 컴포넌트 업데이트
- globals.css 스타일 업데이트
- 기타 다수 컴포넌트 수정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 17:15:42 +09:00

46 lines
1.2 KiB
TypeScript

'use client';
import { useRouter } from 'next/navigation';
import { Card, CardContent } from '@/components/ui/card';
import { SectionTitle, AmountCardItem, CheckPointItem } from '../components';
import type { DebtCollectionData } from '../types';
interface DebtCollectionSectionProps {
data: DebtCollectionData;
}
export function DebtCollectionSection({ data }: DebtCollectionSectionProps) {
const router = useRouter();
const handleClick = () => {
if (data.detailButtonPath) {
router.push(data.detailButtonPath);
}
};
return (
<Card>
<CardContent className="p-6">
<SectionTitle title="채권추심 현황" badge="info" />
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-4">
{data.cards.map((card) => (
<AmountCardItem
key={card.id}
card={card}
onClick={data.detailButtonPath ? handleClick : undefined}
/>
))}
</div>
{data.checkPoints.length > 0 && (
<div className="border-t pt-4 space-y-1">
{data.checkPoints.map((cp) => (
<CheckPointItem key={cp.id} checkpoint={cp} />
))}
</div>
)}
</CardContent>
</Card>
);
}