Files
sam-react-prod/src/components/material/ReceivingManagement/ReceivingReceiptDialog.tsx
유병철 9464a368ba refactor: 모달 Content 컴포넌트 분리 및 파일 입력 UI 공통화
- 모달 컴포넌트에서 Content 분리하여 재사용성 향상
  - EstimateDocumentContent, DirectConstructionContent 등
  - WorkLogContent, QuotePreviewContent, ReceivingReceiptContent
- 파일 입력 공통 UI 컴포넌트 추가
  - file-dropzone, file-input, file-list, image-upload
- 폼 컴포넌트 코드 정리 및 중복 제거 (-4,056줄)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 15:07:17 +09:00

47 lines
1.1 KiB
TypeScript

'use client';
/**
* 입고증 다이얼로그
*
* document-system 통합 버전 (2026-01-22)
*/
import { Download } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { DocumentViewer } from '@/components/document-system';
import type { ReceivingDetail } from './types';
import { ReceivingReceiptContent } from './ReceivingReceiptContent';
interface Props {
open: boolean;
onOpenChange: (open: boolean) => void;
detail: ReceivingDetail;
}
export function ReceivingReceiptDialog({ open, onOpenChange, detail }: Props) {
const handleDownload = () => {
// TODO: PDF 다운로드 기능
console.log('PDF 다운로드:', detail);
};
const toolbarExtra = (
<Button variant="outline" size="sm" onClick={handleDownload}>
<Download className="w-4 h-4 mr-1" />
</Button>
);
return (
<DocumentViewer
title="입고증"
subtitle={`${detail.supplier} (${detail.orderNo})`}
preset="inspection"
open={open}
onOpenChange={onOpenChange}
toolbarExtra={toolbarExtra}
>
<ReceivingReceiptContent data={detail} />
</DocumentViewer>
);
}