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