From 9f3b8915ab20f177edafd3c4a4cc1ca0da0fc766 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 13 Jun 2025 07:22:04 +0000 Subject: (최겸) 기술영업 아이템 수정(컬럼명 및 item table FK 삭제, rfq에서 사용하는 service 수정) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/items-tech/table/add-items-dialog.tsx | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'lib/items-tech/table/add-items-dialog.tsx') diff --git a/lib/items-tech/table/add-items-dialog.tsx b/lib/items-tech/table/add-items-dialog.tsx index a3af0a8c..ee8ee8b8 100644 --- a/lib/items-tech/table/add-items-dialog.tsx +++ b/lib/items-tech/table/add-items-dialog.tsx @@ -46,16 +46,6 @@ 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" }, -// { label: "OPTION", value: "OPTION" }, -// ] as const - // 해양 TOP 공종 유형 정의 const offshoreTopWorkTypes = [ { label: "TM", value: "TM" }, @@ -76,14 +66,11 @@ const offshoreHullWorkTypes = [ // 기본 아이템 스키마 const itemFormSchema = z.object({ itemCode: z.string().min(1, "아이템 코드는 필수입니다"), - itemName: z.string().min(1, "아이템 명은 필수입니다"), - description: z.string().optional(), workType: z.string().min(1, "공종은 필수입니다"), // 조선 및 해양 아이템 공통 필드 itemList: z.string().optional(), // 조선 아이템 전용 필드 shipTypes: z.string().optional(), - // 해양 아이템 전용 필드 subItemList: z.string().optional(), }) @@ -101,14 +88,11 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { const getDefaultValues = () => { const defaults: ItemFormValues = { itemCode: "", - itemName: "기술영업", - description: "", workType: getDefaultWorkType(), } if (itemType === 'shipbuilding') { defaults.shipTypes = "OPTION" - defaults.itemList = "" } else { defaults.itemList = "" defaults.subItemList = "" @@ -146,20 +130,16 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { await createShipbuildingItem({ itemCode: data.itemCode, - itemName: data.itemName, workType: data.workType, shipTypes: data.shipTypes, - description: data.description || null, - itemList: data.itemList || null + itemList: data.itemList || null, }); break; case 'offshoreTop': await createOffshoreTopItem({ itemCode: data.itemCode, - itemName: data.itemName, workType: data.workType as "TM" | "TS" | "TE" | "TP", - description: data.description || null, itemList: data.itemList || null, subItemList: data.subItemList || null }); @@ -168,9 +148,7 @@ export function AddItemDialog({ itemType }: AddItemDialogProps) { case 'offshoreHull': await createOffshoreHullItem({ itemCode: data.itemCode, - itemName: data.itemName, workType: data.workType as "HA" | "HE" | "HH" | "HM" | "NC", - description: data.description || null, itemList: data.itemList || null, subItemList: data.subItemList || null }); -- cgit v1.2.3