From b5c174429548a53e5c86a13bdbfc61516e5ee345 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 9 Dec 2025 03:04:05 +0000
Subject: (최겸) 구매 구매자서명 내 삼성중공업 정보 입력 추가
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/shi-signature/upload-form.tsx | 40 +++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

(limited to 'lib/shi-signature/upload-form.tsx')

diff --git a/lib/shi-signature/upload-form.tsx b/lib/shi-signature/upload-form.tsx
index 642cd1a5..4aa1c442 100644
--- a/lib/shi-signature/upload-form.tsx
+++ b/lib/shi-signature/upload-form.tsx
@@ -7,12 +7,22 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
 import { Input } from '@/components/ui/input';
 import { Label } from '@/components/ui/label';
 import { Alert, AlertDescription } from '@/components/ui/alert';
-import { Upload, Loader2, CheckCircle } from 'lucide-react';
+import { Upload, Loader2 } from 'lucide-react';
 import { toast } from 'sonner';
+import { BuyerSignature } from '@/db/schema';
 
-export function BuyerSignatureUploadForm() {
+const DEFAULT_SHI_ADDRESS = '경기도 성남시 분당구 판교로 227번길 23';
+const DEFAULT_SHI_CEO_NAME = '최성안';
+
+interface BuyerSignatureUploadFormProps {
+  initialSignature?: BuyerSignature | null;
+}
+
+export function BuyerSignatureUploadForm({ initialSignature }: BuyerSignatureUploadFormProps) {
   const [isUploading, setIsUploading] = useState(false);
   const [preview, setPreview] = useState<string | null>(null);
+  const [shiAddress, setShiAddress] = useState(initialSignature?.shiAddress ?? DEFAULT_SHI_ADDRESS);
+  const [shiCeoName, setShiCeoName] = useState(initialSignature?.shiCeoName ?? DEFAULT_SHI_CEO_NAME);
 
   const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
     const file = e.target.files?.[0];
@@ -30,6 +40,8 @@ export function BuyerSignatureUploadForm() {
     setIsUploading(true);
 
     const formData = new FormData(e.currentTarget);
+    formData.set('shiAddress', shiAddress);
+    formData.set('shiCeoName', shiCeoName);
     
     try {
       const result = await uploadBuyerSignature(formData);
@@ -74,6 +86,30 @@ export function BuyerSignatureUploadForm() {
             </p>
           </div>
 
+          <div className="space-y-2">
+            <Label htmlFor="shiAddress">삼성중공업 주소</Label>
+            <Input
+              id="shiAddress"
+              name="shiAddress"
+              value={shiAddress}
+              onChange={(event) => setShiAddress(event.target.value)}
+              required
+              disabled={isUploading}
+            />
+          </div>
+
+          <div className="space-y-2">
+            <Label htmlFor="shiCeoName">대표이사 이름</Label>
+            <Input
+              id="shiCeoName"
+              name="shiCeoName"
+              value={shiCeoName}
+              onChange={(event) => setShiCeoName(event.target.value)}
+              required
+              disabled={isUploading}
+            />
+          </div>
+
           {preview && (
             <div className="border rounded-lg p-4 bg-gray-50">
               <Label className="text-sm font-medium mb-2 block">미리보기</Label>
-- 
cgit v1.2.3

