From 1dc24d48e52f2e490f5603ceb02842586ecae533 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 24 Jul 2025 11:06:32 +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 | 56 ++++++++++++++++++++++++-----
 1 file changed, 47 insertions(+), 9 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 978e83d5..91108ba0 100644
--- a/lib/items-tech/table/update-items-sheet.tsx
+++ b/lib/items-tech/table/update-items-sheet.tsx
@@ -52,6 +52,7 @@ const offshoreTopWorkTypes = [
   { value: "TS", label: "TS" },
   { value: "TE", label: "TE" },
   { value: "TP", label: "TP" },
+  { value: "TA", label: "TA" },
 ] as const
 
 const offshoreHullWorkTypes = [
@@ -76,7 +77,7 @@ type ShipbuildingItem = {
 type OffshoreTopItem = {
   id: number
   itemCode: string
-  workType: "TM" | "TS" | "TE" | "TP"
+  workType: "TM" | "TS" | "TE" | "TP" | "TA"
   itemList: string | null
   subItemList: string | null
 }
@@ -94,6 +95,7 @@ type UpdateItemSchema = {
   workType?: string
   shipTypes?: string
   itemList?: string
+  subItemList?: string
 }
 
 interface UpdateItemSheetProps {
@@ -125,11 +127,16 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
           itemList: (item as ShipbuildingItem).itemList || "",
         };
       case 'offshoreTop':
+        const offshoreTopItem = item as OffshoreTopItem;
+        return {
+          itemList: offshoreTopItem.itemList || "",
+          subItemList: offshoreTopItem.subItemList || ""
+        };
       case 'offshoreHull':
-        const offshoreItem = item as OffshoreTopItem | OffshoreHullItem;
+        const offshoreHullItem = item as OffshoreHullItem;
         return {
-          itemList: offshoreItem.itemList || "",
-          subItemList: offshoreItem.subItemList || ""
+          itemList: offshoreHullItem.itemList || "",
+          subItemList: offshoreHullItem.subItemList || ""
         };
       default:
         return {};
@@ -224,7 +231,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
             <div className="mt-4">
               <div className="grid gap-2">
                 <label className="text-sm font-medium leading-none">
-                  Material Group (수정 불가)
+                  자재 그룹 (수정 불가)
                 </label>
                 <Input value={item.itemCode} disabled readOnly />
               </div>
@@ -235,7 +242,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
               name="workType"
               render={({ field }) => (
                 <FormItem>
-                  <FormLabel>기능(공종)</FormLabel>
+                  <FormLabel>기능(공종) <span style={{ color: 'red' }}>*</span></FormLabel>
                   <Select
                     onValueChange={field.onChange}
                     defaultValue={field.value}
@@ -266,7 +273,7 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
                   name="shipTypes"
                   render={({ field }) => (
                     <FormItem>
-                      <FormLabel>선종</FormLabel>
+                      <FormLabel>선종 <span style={{ color: 'red' }}>*</span></FormLabel>
                       <FormControl>
                         <Input placeholder="선종을 입력하세요" {...field} />
                       </FormControl>
@@ -281,14 +288,45 @@ export function UpdateItemSheet({ item, itemType, open, onOpenChange }: UpdateIt
                   name="itemList"
                   render={({ field }) => (
                     <FormItem>
-                      <FormLabel>아이템 리스트</FormLabel>
+                      <FormLabel>자재명</FormLabel>
                       <FormControl>
-                        <Input placeholder="아이템 리스트를 입력하세요" {...field} />
+                        <Input placeholder="자재명을 입력하세요" {...field} />
                       </FormControl>
                       <FormMessage />
                     </FormItem>
                   )}
                 />
+              {itemType === 'offshoreHull' && (
+                <FormField
+                  control={form.control}
+                  name="subItemList"
+                  render={({ field }) => (
+                    <FormItem>
+                      <FormLabel>자재명(상세)</FormLabel>
+                      <FormControl>
+                        <Input placeholder="자재명(상세)을 입력하세요" {...field} />
+                      </FormControl>
+                      <FormMessage />
+                    </FormItem>
+                  )}
+                />
+              )}
+              {itemType === 'offshoreTop' && (
+                <FormField
+                  control={form.control}
+                  name="subItemList"
+                  render={({ field }) => (
+                    <FormItem>
+                      <FormLabel>자재명(상세)</FormLabel>
+                      <FormControl>
+                        <Input placeholder="자재명(상세)을 입력하세요" {...field} />
+                      </FormControl>
+                      <FormMessage />
+                    </FormItem>
+                  )}
+                />
+              )}
+
             <SheetFooter>
               <SheetClose asChild>
                 <Button variant="outline">취소</Button>
-- 
cgit v1.2.3

