From 99ca52106b9a7beeb8d31aeb333b4084648007c7 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 1 Sep 2025 10:06:20 +0000
Subject: (최겸) 서명 미리보기 추가, 기술영업 아이템코드 수정 기능 추가
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/items-tech/table/update-items-sheet.tsx | 32 +++++++++++++++--------------
 1 file changed, 17 insertions(+), 15 deletions(-)

(limited to 'lib/items-tech/table/update-items-sheet.tsx')

diff --git a/lib/items-tech/table/update-items-sheet.tsx b/lib/items-tech/table/update-items-sheet.tsx
index 91108ba0..7662884c 100644
--- a/lib/items-tech/table/update-items-sheet.tsx
+++ b/lib/items-tech/table/update-items-sheet.tsx
@@ -111,6 +111,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
   // 초기값 설정
   const form = useForm<UpdateItemSchema>({
     defaultValues: {
+      itemCode: item.itemCode,
       workType: item.workType,
       ...getItemTypeSpecificDefaults(item, itemType),
     },
@@ -152,22 +153,19 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
         case 'shipbuilding':
           result = await modifyShipbuildingItem({ 
             ...data, 
-            id: item.id,
-            itemCode: item.itemCode // itemCode는 변경 불가, 원래 값 사용
+            id: item.id
           });
           break;
         case 'offshoreTop':
           result = await modifyOffshoreTopItem({ 
             ...data, 
-            id: item.id,
-            itemCode: item.itemCode // itemCode는 변경 불가, 원래 값 사용
+            id: item.id
           });
           break;
         case 'offshoreHull':
           result = await modifyOffshoreHullItem({ 
             ...data, 
-            id: item.id,
-            itemCode: item.itemCode // itemCode는 변경 불가, 원래 값 사용
+            id: item.id
           });
           break;
         default:
@@ -227,15 +225,19 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
         
         <Form {...form}>
           <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
-            {/* Material Group을 Form 안으로 이동 */}
-            <div className="mt-4">
-              <div className="grid gap-2">
-                <label className="text-sm font-medium leading-none">
-                  자재 그룹 (수정 불가)
-                </label>
-                <Input value={item.itemCode} disabled readOnly />
-              </div>
-            </div>
+            <FormField
+              control={form.control}
+              name="itemCode"
+              render={({ field }) => (
+                <FormItem>
+                  <FormLabel>자재 그룹 <span style={{ color: 'red' }}>*</span></FormLabel>
+                  <FormControl>
+                    <Input placeholder="자재 그룹을 입력하세요" {...field} />
+                  </FormControl>
+                  <FormMessage />
+                </FormItem>
+              )}
+            />
             
             <FormField
               control={form.control}
-- 
cgit v1.2.3

