From 4c07f977c951cd99dd50d3bdaad0437e3dd55e6d Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Thu, 6 Nov 2025 20:01:16 +0900 Subject: (김준회) ITB/RFQ/일반견적: 발송시 첨부파일 있는 경우 '암호화해제 결재' 프로세스 타도록 변경 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/rfq-last/vendor/application-reason-dialog.tsx | 114 ++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 lib/rfq-last/vendor/application-reason-dialog.tsx (limited to 'lib/rfq-last/vendor/application-reason-dialog.tsx') diff --git a/lib/rfq-last/vendor/application-reason-dialog.tsx b/lib/rfq-last/vendor/application-reason-dialog.tsx new file mode 100644 index 00000000..61f818d9 --- /dev/null +++ b/lib/rfq-last/vendor/application-reason-dialog.tsx @@ -0,0 +1,114 @@ +"use client"; + +import * as React from "react"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { Button } from "@/components/ui/button"; +import { Textarea } from "@/components/ui/textarea"; +import { Label } from "@/components/ui/label"; + +interface ApplicationReasonDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; + onConfirm: (reason: string) => void; + vendorCount: number; + attachmentCount: number; +} + +/** + * 암호화해제 신청 사유 입력 다이얼로그 + * + * RFQ 발송 시 첨부파일이 있는 경우, 결재 미리보기 전에 + * 사용자가 신청 사유를 입력하도록 하는 다이얼로그 + */ +export function ApplicationReasonDialog({ + open, + onOpenChange, + onConfirm, + vendorCount, + attachmentCount, +}: ApplicationReasonDialogProps) { + const [reason, setReason] = React.useState(""); + + // 다이얼로그가 닫힐 때 초기화 + React.useEffect(() => { + if (!open) { + setReason(""); + } + }, [open]); + + const handleConfirm = () => { + if (!reason.trim()) { + return; + } + onConfirm(reason); + onOpenChange(false); + }; + + return ( + + + + 암호화해제 신청 사유 + + 첨부파일이 사외업체에 송부되므로 신청 사유를 입력해주세요. + + + +
+ {/* 발송 정보 요약 */} +
+
+ 발송 대상 + {vendorCount}개 업체 +
+
+ 첨부파일 + {attachmentCount}개 +
+
+ + {/* 신청 사유 입력 */} +
+ +