From 2ef02e27dbe639876fa3b90c30307dda183545ec Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 17 Jul 2025 10:50:52 +0000
Subject: (최겸) 기술영업 변경사항 적용
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/items-tech/table/hull/import-item-handler.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'lib/items-tech/table/hull/import-item-handler.tsx')

diff --git a/lib/items-tech/table/hull/import-item-handler.tsx b/lib/items-tech/table/hull/import-item-handler.tsx
index aa0c7992..8c8fc57d 100644
--- a/lib/items-tech/table/hull/import-item-handler.tsx
+++ b/lib/items-tech/table/hull/import-item-handler.tsx
@@ -4,11 +4,11 @@ import { z } from "zod"
 import { createOffshoreHullItem } from "../../service"
 
 // 해양 HULL 기능(공종) 유형 enum
-const HULL_WORK_TYPES = ["HA", "HE", "HH", "HM", "NC"] as const;
+const HULL_WORK_TYPES = ["HA", "HE", "HH", "HM", "HO", "HP", "NC"] as const;
 
 // 아이템 데이터 검증을 위한 Zod 스키마
 const itemSchema = z.object({
-  itemCode: z.string().min(1, "아이템 코드는 필수입니다"),
+  itemCode: z.string().optional(),
   workType: z.enum(HULL_WORK_TYPES, {
     required_error: "기능(공종)은 필수입니다",
   }),
@@ -19,7 +19,7 @@ const itemSchema = z.object({
 interface ProcessResult {
   successCount: number;
   errorCount: number;
-  errors?: Array<{ row: number; message: string }>;
+  errors: Array<{ row: number; message: string; itemCode?: string; workType?: string }>;
 }
 
 /**
@@ -45,7 +45,7 @@ export async function processHullFileImport(
   
   // 데이터 행이 없으면 빈 결과 반환
   if (dataRows.length === 0) {
-    return { successCount: 0, errorCount: 0 };
+    return { successCount: 0, errorCount: 0, errors: [] };
   }
   
   // 각 행에 대해 처리
@@ -89,7 +89,7 @@ export async function processHullFileImport(
       // 해양 HULL 아이템 생성
       const result = await createOffshoreHullItem({
         itemCode: cleanedRow.itemCode,
-        workType: cleanedRow.workType as "HA" | "HE" | "HH" | "HM" | "NC",
+        workType: cleanedRow.workType as "HA" | "HE" | "HH" | "HM" | "HO" | "HP" | "NC",
         itemList: cleanedRow.itemList,
         subItemList: cleanedRow.subItemList,
       });
-- 
cgit v1.2.3

