- 모달 컴포넌트에서 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>
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
'use client';
|
|
|
|
/**
|
|
* 사진대지 모달
|
|
*
|
|
* document-system 통합 버전 (2026-01-22)
|
|
*/
|
|
|
|
import { Edit, Trash2 } from 'lucide-react';
|
|
import { Button } from '@/components/ui/button';
|
|
import { toast } from 'sonner';
|
|
import { DocumentViewer } from '@/components/document-system';
|
|
import type { ProgressBillingDetailFormData } from '../types';
|
|
import { PhotoDocumentContent } from './PhotoDocumentContent';
|
|
|
|
interface PhotoDocumentModalProps {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
data: ProgressBillingDetailFormData;
|
|
}
|
|
|
|
export function PhotoDocumentModal({
|
|
open,
|
|
onOpenChange,
|
|
data,
|
|
}: PhotoDocumentModalProps) {
|
|
const handleEdit = () => {
|
|
toast.info('수정 기능은 준비 중입니다.');
|
|
};
|
|
|
|
const handleDelete = () => {
|
|
toast.info('삭제 기능은 준비 중입니다.');
|
|
};
|
|
|
|
const toolbarExtra = (
|
|
<>
|
|
<Button variant="outline" size="sm" onClick={handleEdit}>
|
|
<Edit className="h-4 w-4 mr-1" />
|
|
수정
|
|
</Button>
|
|
<Button variant="outline" size="sm" onClick={handleDelete}>
|
|
<Trash2 className="h-4 w-4 mr-1" />
|
|
삭제
|
|
</Button>
|
|
</>
|
|
);
|
|
|
|
return (
|
|
<DocumentViewer
|
|
title="사진대지"
|
|
preset="inspection"
|
|
open={open}
|
|
onOpenChange={onOpenChange}
|
|
toolbarExtra={toolbarExtra}
|
|
>
|
|
<PhotoDocumentContent data={data} />
|
|
</DocumentViewer>
|
|
);
|
|
}
|