From 45f4c426c98d86a251644a4858740bec989edf83 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Tue, 20 May 2025 09:01:22 +0000 Subject: (최겸) 기술영업 아이템리스트 수정 및 개발 0520 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/items-tech/repository.ts | 6 - lib/items-tech/service.ts | 317 +++++++-------------- lib/items-tech/table/add-items-dialog.tsx | 125 +++----- lib/items-tech/table/hull/import-item-handler.tsx | 36 +-- lib/items-tech/table/hull/item-excel-template.tsx | 32 +-- .../table/hull/offshore-hull-table-columns.tsx | 116 +------- .../hull/offshore-hull-table-toolbar-actions.tsx | 12 +- lib/items-tech/table/hull/offshore-hull-table.tsx | 32 +-- lib/items-tech/table/ship/Items-ship-table.tsx | 10 + lib/items-tech/table/ship/import-item-handler.tsx | 56 ++-- lib/items-tech/table/ship/item-excel-template.tsx | 27 +- .../table/ship/items-ship-table-columns.tsx | 73 +---- .../table/ship/items-table-toolbar-actions.tsx | 4 +- lib/items-tech/table/top/import-item-handler.tsx | 36 +-- lib/items-tech/table/top/item-excel-template.tsx | 33 +-- .../table/top/offshore-top-table-columns.tsx | 116 +------- .../top/offshore-top-table-toolbar-actions.tsx | 12 +- lib/items-tech/table/top/offshore-top-table.tsx | 29 +- lib/items-tech/table/update-items-sheet.tsx | 140 +++------ lib/items-tech/validations.ts | 39 +-- 20 files changed, 375 insertions(+), 876 deletions(-) (limited to 'lib/items-tech') diff --git a/lib/items-tech/repository.ts b/lib/items-tech/repository.ts index 550e6b1d..43e88866 100644 --- a/lib/items-tech/repository.ts +++ b/lib/items-tech/repository.ts @@ -4,15 +4,9 @@ import { Item, items } from "@/db/schema/items"; import { eq, inArray, - not, asc, desc, - and, - ilike, - gte, - lte, count, - gt, } from "drizzle-orm"; import { PgTransaction } from "drizzle-orm/pg-core"; export type NewItem = typeof items.$inferInsert diff --git a/lib/items-tech/service.ts b/lib/items-tech/service.ts index 97aacfba..02a5a901 100644 --- a/lib/items-tech/service.ts +++ b/lib/items-tech/service.ts @@ -11,7 +11,7 @@ import { getErrorMessage } from "@/lib/handle-error"; import { asc, desc, ilike, and, or, eq, count, inArray, sql } from "drizzle-orm"; import { GetItemsSchema, UpdateItemSchema, ShipbuildingItemCreateData, TypedItemCreateData, OffshoreTopItemCreateData, OffshoreHullItemCreateData } from "./validations"; import { Item, items, itemShipbuilding, itemOffshoreTop, itemOffshoreHull } from "@/db/schema/items"; -import { findAllItems, insertItem, updateItem } from "./repository"; +import { findAllItems } from "./repository"; /* ----------------------------------------------------- 1) 조회 관련 @@ -65,6 +65,7 @@ export async function getShipbuildingItems(input: GetItemsSchema) { itemId: itemShipbuilding.itemId, workType: itemShipbuilding.workType, shipTypes: itemShipbuilding.shipTypes, + itemList: itemShipbuilding.itemList, itemCode: items.itemCode, itemName: items.itemName, description: items.description, @@ -144,10 +145,8 @@ export async function getOffshoreTopItems(input: GetItemsSchema) { id: itemOffshoreTop.id, itemId: itemOffshoreTop.itemId, workType: itemOffshoreTop.workType, - itemList1: itemOffshoreTop.itemList1, - itemList2: itemOffshoreTop.itemList2, - itemList3: itemOffshoreTop.itemList3, - itemList4: itemOffshoreTop.itemList4, + itemList: itemOffshoreTop.itemList, + subItemList: itemOffshoreTop.subItemList, itemCode: items.itemCode, itemName: items.itemName, description: items.description, @@ -227,10 +226,8 @@ export async function getOffshoreHullItems(input: GetItemsSchema) { id: itemOffshoreHull.id, itemId: itemOffshoreHull.itemId, workType: itemOffshoreHull.workType, - itemList1: itemOffshoreHull.itemList1, - itemList2: itemOffshoreHull.itemList2, - itemList3: itemOffshoreHull.itemList3, - itemList4: itemOffshoreHull.itemList4, + itemList: itemOffshoreHull.itemList, + subItemList: itemOffshoreHull.subItemList, itemCode: items.itemCode, itemName: items.itemName, description: items.description, @@ -279,14 +276,20 @@ export async function createShipbuildingItem(input: TypedItemCreateData) { unstable_noStore() try { - if (!input.itemCode || !input.itemName) { + if (!input.itemCode) { return { success: false, - message: "아이템 코드와 아이템 명은 필수입니다", + message: "아이템 코드는 필수입니다", data: null, error: "필수 필드 누락" } } + + // itemName이 없으면 "기술영업"으로 설정 + if (!input.itemName) { + input.itemName = "기술영업" + } + const result = await db.transaction(async (tx) => { // 1. itemCode 정규화해서 직접 쿼리 const existRows = await tx.select().from(items) @@ -294,15 +297,12 @@ export async function createShipbuildingItem(input: TypedItemCreateData) { const existingItem = existRows[0]; let itemId: number; - let itemResult; + let itemResult: any; if (existingItem) { - // 이미 있으면 업데이트 - itemResult = await updateItem(tx, existingItem.id, { - itemName: input.itemName, - description: input.description, - }); + // 기존 아이템이 있으면 업데이트하지 않고 그대로 사용 itemId = existingItem.id; + itemResult = [existingItem]; // 배열 형태로 반환 } else { // 없으면 새로 생성 // 현재 가장 큰 ID 값 가져오기 @@ -326,6 +326,7 @@ export async function createShipbuildingItem(input: TypedItemCreateData) { itemId: itemId, workType: shipData.workType ? (shipData.workType as '기장' | '전장' | '선실' | '배관' | '철의') : '기장', shipTypes: shipData.shipTypes || '', + itemList: shipData.itemList || null, createdAt: new Date(), updatedAt: new Date() }).returning(); @@ -370,20 +371,27 @@ export async function createShipbuildingImportItem(input: { itemName: string; workType: '기장' | '전장' | '선실' | '배관' | '철의'; description?: string | null; + itemList?: string | null; shipTypes: Record; }) { unstable_noStore(); try { - if (!input.itemCode || !input.itemName) { + if (!input.itemCode) { return { success: false, - message: "아이템 코드와 아이템 명은 필수입니다", + message: "아이템 코드는 필수입니다", data: null, error: "필수 필드 누락" } } + + // itemName이 없을 경우 "기술영업"으로 설정 + if (!input.itemName) { + input.itemName = "기술영업"; + } + const results = await db.transaction(async (tx) => { // 1. itemCode 정규화해서 직접 쿼리 const existRows = await tx.select().from(items) @@ -395,13 +403,9 @@ export async function createShipbuildingImportItem(input: { let itemId: number; if (existingItem) { - // 이미 있으면 업데이트 - await updateItem(tx, existingItem.id, { - itemName: input.itemName, - description: input.description, - }); + // 기존 아이템이 있으면 업데이트하지 않고 그대로 사용 itemId = existingItem.id; - console.log('기존 아이템 업데이트, id:', itemId); + console.log('기존 아이템 사용, id:', itemId); } else { // 없으면 새로 생성 // 현재 가장 큰 ID 값 가져오기 @@ -437,6 +441,7 @@ export async function createShipbuildingImportItem(input: { itemId: itemId, workType: input.workType, shipTypes: shipType, + itemList: input.itemList || null, createdAt: new Date(), updatedAt: new Date() }).returning(); @@ -473,14 +478,19 @@ export async function createOffshoreTopItem(data: OffshoreTopItemCreateData) { unstable_noStore() try { - if (!data.itemCode || !data.itemName) { + if (!data.itemCode) { return { success: false, - message: "아이템 코드와 아이템 명은 필수입니다", + message: "아이템 코드는 필수입니다", data: null, error: "필수 필드 누락" } } + + // itemName이 없으면 "기술영업"으로 설정 + if (!data.itemName) { + data.itemName = "기술영업" + } // 트랜잭션 내에서 처리 const result = await db.transaction(async (tx) => { @@ -490,15 +500,12 @@ export async function createOffshoreTopItem(data: OffshoreTopItemCreateData) { const existingItem = existRows[0]; let itemId: number; - let itemResult; + let itemResult: any; if (existingItem) { - // 이미 있으면 업데이트 - itemResult = await updateItem(tx, existingItem.id, { - itemName: data.itemName, - description: data.description, - }); + // 기존 아이템이 있으면 업데이트하지 않고 그대로 사용 itemId = existingItem.id; + itemResult = [existingItem]; // 배열 형태로 반환 } else { // 없으면 새로 생성 // 현재 가장 큰 ID 값 가져오기 @@ -522,10 +529,8 @@ export async function createOffshoreTopItem(data: OffshoreTopItemCreateData) { .values({ itemId: itemId, workType: data.workType, - itemList1: data.itemList1 || null, - itemList2: data.itemList2 || null, - itemList3: data.itemList3 || null, - itemList4: data.itemList4 || null, + itemList: data.itemList, + subItemList: data.subItemList, createdAt: new Date(), updatedAt: new Date() }) @@ -566,14 +571,19 @@ export async function createOffshoreHullItem(data: OffshoreHullItemCreateData) { unstable_noStore() try { - if (!data.itemCode || !data.itemName) { + if (!data.itemCode) { return { success: false, - message: "아이템 코드와 아이템 명은 필수입니다", + message: "아이템 코드는 필수입니다", data: null, error: "필수 필드 누락" } } + + // itemName이 없으면 "기술영업"으로 설정 + if (!data.itemName) { + data.itemName = "기술영업" + } // 트랜잭션 내에서 처리 const result = await db.transaction(async (tx) => { @@ -583,15 +593,12 @@ export async function createOffshoreHullItem(data: OffshoreHullItemCreateData) { const existingItem = existRows[0]; let itemId: number; - let itemResult; + let itemResult: any; if (existingItem) { - // 이미 있으면 업데이트 - itemResult = await updateItem(tx, existingItem.id, { - itemName: data.itemName, - description: data.description, - }); + // 기존 아이템이 있으면 업데이트하지 않고 그대로 사용 itemId = existingItem.id; + itemResult = [existingItem]; // 배열 형태로 반환 } else { // 없으면 새로 생성 // 현재 가장 큰 ID 값 가져오기 @@ -615,10 +622,8 @@ export async function createOffshoreHullItem(data: OffshoreHullItemCreateData) { .values({ itemId: itemId, workType: data.workType, - itemList1: data.itemList1 || null, - itemList2: data.itemList2 || null, - itemList3: data.itemList3 || null, - itemList4: data.itemList4 || null, + itemList: data.itemList, + subItemList: data.subItemList, createdAt: new Date(), updatedAt: new Date() }) @@ -664,6 +669,7 @@ interface UpdateShipbuildingItemInput extends UpdateItemSchema { id: number; workType?: string; shipTypes?: string; + itemList?: string; itemCode?: string; itemName?: string; description?: string; @@ -686,58 +692,25 @@ export async function modifyShipbuildingItem(input: UpdateShipbuildingItemInput) throw new Error("아이템을 찾을 수 없습니다."); } - const existingItem = existingShipbuilding.item; + // 세부 아이템 테이블만 업데이트 (items 테이블은 변경하지 않음) + const updateData: Record = {}; - // 아이템 테이블 정보가 변경되었는지 확인 - const isItemChanged = - (input.itemCode && input.itemCode !== existingItem.itemCode) || - (input.itemName && input.itemName !== existingItem.itemName) || - (input.description !== undefined && input.description !== existingItem.description); + if (input.workType) updateData.workType = input.workType as '기장' | '전장' | '선실' | '배관' | '철의'; + if (input.shipTypes) updateData.shipTypes = input.shipTypes; + if (input.itemList !== undefined) updateData.itemList = input.itemList; - // 세부 아이템 정보만 변경된 경우 - if (!isItemChanged) { - // 조선 아이템 테이블 업데이트 - if (input.workType || input.shipTypes) { - await tx.update(itemShipbuilding) - .set({ - workType: input.workType as '기장' | '전장' | '선실' | '배관' | '철의', - shipTypes: input.shipTypes - }) - .where(eq(itemShipbuilding.id, input.id)); - } - - return { - data: { id: input.id }, - error: null, - success: true, - message: "아이템이 성공적으로 업데이트되었습니다." - }; - } - // 아이템 테이블 정보가 변경된 경우 - 새 아이템 생성하고 세부 아이템 연결 - else { - // 새 아이템 생성 - const [newItem] = await insertItem(tx, { - itemCode: input.itemCode || existingItem.itemCode, - itemName: input.itemName || existingItem.itemName, - description: input.description !== undefined ? input.description : existingItem.description, - }); - - // 세부 아이템 테이블 정보를 새 아이템에 연결 + if (Object.keys(updateData).length > 0) { await tx.update(itemShipbuilding) - .set({ - itemId: newItem.id, - workType: input.workType ? (input.workType as '기장' | '전장' | '선실' | '배관' | '철의') : existingShipbuilding.workType, - shipTypes: input.shipTypes || existingShipbuilding.shipTypes - }) + .set(updateData) .where(eq(itemShipbuilding.id, input.id)); - - return { - data: { id: input.id }, - error: null, - success: true, - message: "새 아이템이 생성되고 세부 정보가 업데이트되었습니다." - }; } + + return { + data: { id: input.id }, + error: null, + success: true, + message: "아이템이 성공적으로 업데이트되었습니다." + }; }); // 캐시 무효화 @@ -758,10 +731,8 @@ export async function modifyShipbuildingItem(input: UpdateShipbuildingItemInput) interface UpdateOffshoreTopItemInput extends UpdateItemSchema { id: number; workType?: string; - itemList1?: string; - itemList2?: string; - itemList3?: string; - itemList4?: string; + itemList?: string; + subItemList?: string; itemCode?: string; itemName?: string; description?: string; @@ -784,69 +755,25 @@ export async function modifyOffshoreTopItem(input: UpdateOffshoreTopItemInput) { throw new Error("아이템을 찾을 수 없습니다."); } - const existingItem = existingOffshoreTop.item; + // 세부 아이템 테이블만 업데이트 (items 테이블은 변경하지 않음) + const updateData: Record = {}; - // 아이템 테이블 정보가 변경되었는지 확인 - const isItemChanged = - (input.itemCode && input.itemCode !== existingItem.itemCode) || - (input.itemName && input.itemName !== existingItem.itemName) || - (input.description !== undefined && input.description !== existingItem.description); + if (input.workType) updateData.workType = input.workType as 'TM' | 'TS' | 'TE' | 'TP'; + if (input.itemList !== undefined) updateData.itemList = input.itemList; + if (input.subItemList !== undefined) updateData.subItemList = input.subItemList; - // 세부 아이템 정보만 변경된 경우 - if (!isItemChanged) { - // Offshore TOP 아이템 테이블 업데이트 - const updateData: Record = {}; - - if (input.workType) updateData.workType = input.workType as 'TM' | 'TS' | 'TE' | 'TP'; - if (input.itemList1 !== undefined) updateData.itemList1 = input.itemList1; - if (input.itemList2 !== undefined) updateData.itemList2 = input.itemList2; - if (input.itemList3 !== undefined) updateData.itemList3 = input.itemList3; - if (input.itemList4 !== undefined) updateData.itemList4 = input.itemList4; - - if (Object.keys(updateData).length > 0) { - await tx.update(itemOffshoreTop) - .set(updateData) - .where(eq(itemOffshoreTop.id, input.id)); - } - - return { - data: { id: input.id }, - error: null, - success: true, - message: "아이템이 성공적으로 업데이트되었습니다." - }; - } - // 아이템 테이블 정보가 변경된 경우 - 새 아이템 생성하고 세부 아이템 연결 - else { - // 새 아이템 생성 - const [newItem] = await insertItem(tx, { - itemCode: input.itemCode || existingItem.itemCode, - itemName: input.itemName || existingItem.itemName, - description: input.description !== undefined ? input.description : existingItem.description, - }); - - // 세부 아이템 테이블 정보를 새 아이템에 연결 - const updateData: Record = { - itemId: newItem.id - }; - - if (input.workType) updateData.workType = input.workType as 'TM' | 'TS' | 'TE' | 'TP'; - if (input.itemList1 !== undefined) updateData.itemList1 = input.itemList1; - if (input.itemList2 !== undefined) updateData.itemList2 = input.itemList2; - if (input.itemList3 !== undefined) updateData.itemList3 = input.itemList3; - if (input.itemList4 !== undefined) updateData.itemList4 = input.itemList4; - + if (Object.keys(updateData).length > 0) { await tx.update(itemOffshoreTop) .set(updateData) .where(eq(itemOffshoreTop.id, input.id)); - - return { - data: { id: input.id }, - error: null, - success: true, - message: "새 아이템이 생성되고 세부 정보가 업데이트되었습니다." - }; } + + return { + data: { id: input.id }, + error: null, + success: true, + message: "아이템이 성공적으로 업데이트되었습니다." + }; }); // 캐시 무효화 @@ -867,10 +794,8 @@ export async function modifyOffshoreTopItem(input: UpdateOffshoreTopItemInput) { interface UpdateOffshoreHullItemInput extends UpdateItemSchema { id: number; workType?: string; - itemList1?: string; - itemList2?: string; - itemList3?: string; - itemList4?: string; + itemList?: string; + subItemList?: string; itemCode?: string; itemName?: string; description?: string; @@ -893,69 +818,25 @@ export async function modifyOffshoreHullItem(input: UpdateOffshoreHullItemInput) throw new Error("아이템을 찾을 수 없습니다."); } - const existingItem = existingOffshoreHull.item; + // 세부 아이템 테이블만 업데이트 (items 테이블은 변경하지 않음) + const updateData: Record = {}; - // 아이템 테이블 정보가 변경되었는지 확인 - const isItemChanged = - (input.itemCode && input.itemCode !== existingItem.itemCode) || - (input.itemName && input.itemName !== existingItem.itemName) || - (input.description !== undefined && input.description !== existingItem.description); + if (input.workType) updateData.workType = input.workType as 'HA' | 'HE' | 'HH' | 'HM' | 'NC'; + if (input.itemList !== undefined) updateData.itemList = input.itemList; + if (input.subItemList !== undefined) updateData.subItemList = input.subItemList; - // 세부 아이템 정보만 변경된 경우 - if (!isItemChanged) { - // Offshore HULL 아이템 테이블 업데이트 - const updateData: Record = {}; - - if (input.workType) updateData.workType = input.workType as 'HA' | 'HE' | 'HH' | 'HM' | 'NC'; - if (input.itemList1 !== undefined) updateData.itemList1 = input.itemList1; - if (input.itemList2 !== undefined) updateData.itemList2 = input.itemList2; - if (input.itemList3 !== undefined) updateData.itemList3 = input.itemList3; - if (input.itemList4 !== undefined) updateData.itemList4 = input.itemList4; - - if (Object.keys(updateData).length > 0) { - await tx.update(itemOffshoreHull) - .set(updateData) - .where(eq(itemOffshoreHull.id, input.id)); - } - - return { - data: { id: input.id }, - error: null, - success: true, - message: "아이템이 성공적으로 업데이트되었습니다." - }; - } - // 아이템 테이블 정보가 변경된 경우 - 새 아이템 생성하고 세부 아이템 연결 - else { - // 새 아이템 생성 - const [newItem] = await insertItem(tx, { - itemCode: input.itemCode || existingItem.itemCode, - itemName: input.itemName || existingItem.itemName, - description: input.description !== undefined ? input.description : existingItem.description, - }); - - // 세부 아이템 테이블 정보를 새 아이템에 연결 - const updateData: Record = { - itemId: newItem.id - }; - - if (input.workType) updateData.workType = input.workType as 'HA' | 'HE' | 'HH' | 'HM' | 'NC'; - if (input.itemList1 !== undefined) updateData.itemList1 = input.itemList1; - if (input.itemList2 !== undefined) updateData.itemList2 = input.itemList2; - if (input.itemList3 !== undefined) updateData.itemList3 = input.itemList3; - if (input.itemList4 !== undefined) updateData.itemList4 = input.itemList4; - + if (Object.keys(updateData).length > 0) { await tx.update(itemOffshoreHull) .set(updateData) .where(eq(itemOffshoreHull.id, input.id)); - - return { - data: { id: input.id }, - error: null, - success: true, - message: "새 아이템이 생성되고 세부 정보가 업데이트되었습니다." - }; } + + return { + data: { id: input.id }, + error: null, + success: true, + message: "아이템이 성공적으로 업데이트되었습니다." + }; }); // 캐시 무효화 diff --git a/lib/items-tech/table/add-items-dialog.tsx b/lib/items-tech/table/add-items-dialog.tsx index 86333189..a3af0a8c 100644 --- a/lib/items-tech/table/add-items-dialog.tsx +++ b/lib/items-tech/table/add-items-dialog.tsx @@ -32,7 +32,6 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select" -import { Textarea } from "@/components/ui/textarea" import { toast } from "sonner" import { createShipbuildingItem, createOffshoreTopItem, createOffshoreHullItem } from "../service" @@ -47,14 +46,15 @@ const shipbuildingWorkTypes = [ { label: "철의", value: "철의" }, ] as const -// 선종 유형 정의 -const shipTypes = [ - { label: "A-MAX", value: "A-MAX" }, - { label: "S-MAX", value: "S-MAX" }, - { label: "LNGC", value: "LNGC" }, - { label: "VLCC", value: "VLCC" }, - { label: "CONT", value: "CONT" }, -] as const +// // 선종 유형 정의 +// const shipTypes = [ +// { label: "A-MAX", value: "A-MAX" }, +// { label: "S-MAX", value: "S-MAX" }, +// { label: "LNGC", value: "LNGC" }, +// { label: "VLCC", value: "VLCC" }, +// { label: "CONT", value: "CONT" }, +// { label: "OPTION", value: "OPTION" }, +// ] as const // 해양 TOP 공종 유형 정의 const offshoreTopWorkTypes = [ @@ -79,13 +79,12 @@ const itemFormSchema = z.object({ itemName: z.string().min(1, "아이템 명은 필수입니다"), description: z.string().optional(), workType: z.string().min(1, "공종은 필수입니다"), + // 조선 및 해양 아이템 공통 필드 + itemList: z.string().optional(), // 조선 아이템 전용 필드 shipTypes: z.string().optional(), // 해양 아이템 전용 필드 - itemList1: z.string().optional(), - itemList2: z.string().optional(), - itemList3: z.string().optional(), - itemList4: z.string().optional(), + subItemList: z.string().optional(), }) type ItemFormValues = z.infer @@ -102,18 +101,17 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { const getDefaultValues = () => { const defaults: ItemFormValues = { itemCode: "", - itemName: "", + itemName: "기술영업", description: "", workType: getDefaultWorkType(), } if (itemType === 'shipbuilding') { - defaults.shipTypes = "A-MAX" + defaults.shipTypes = "OPTION" + defaults.itemList = "" } else { - defaults.itemList1 = "" - defaults.itemList2 = "" - defaults.itemList3 = "" - defaults.itemList4 = "" + defaults.itemList = "" + defaults.subItemList = "" } return defaults @@ -151,7 +149,8 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { itemName: data.itemName, workType: data.workType, shipTypes: data.shipTypes, - description: data.description || null + description: data.description || null, + itemList: data.itemList || null }); break; @@ -161,10 +160,8 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { itemName: data.itemName, workType: data.workType as "TM" | "TS" | "TE" | "TP", description: data.description || null, - itemList1: data.itemList1 || null, - itemList2: data.itemList2 || null, - itemList3: data.itemList3 || null, - itemList4: data.itemList4 || null + itemList: data.itemList || null, + subItemList: data.subItemList || null }); break; @@ -174,10 +171,8 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { itemName: data.itemName, workType: data.workType as "HA" | "HE" | "HH" | "HM" | "NC", description: data.description || null, - itemList1: data.itemList1 || null, - itemList2: data.itemList2 || null, - itemList3: data.itemList3 || null, - itemList4: data.itemList4 || null + itemList: data.itemList || null, + subItemList: data.subItemList || null }); break; @@ -254,19 +249,6 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { )} /> - ( - - 아이템 명 - - - - - - )} - /> {itemType === 'shipbuilding' && ( - ( - - 선종 - - - - )} - /> - )} - {(itemType === 'offshoreTop' || itemType === 'offshoreHull') && ( <> ( - 아이템 리스트 1 + 선종 - + @@ -334,10 +290,10 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { /> ( - 아이템 리스트 2 + 아이템 리스트 @@ -345,12 +301,16 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { )} /> + + )} + {(itemType === 'offshoreTop' || itemType === 'offshoreHull') && ( + <> ( - 아이템 리스트 3 + 아이템 리스트 @@ -360,10 +320,10 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { /> ( - 아이템 리스트 4 + 서브 아이템 리스트 @@ -373,19 +333,6 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { /> )} - ( - - 설명 - -