summaryrefslogtreecommitdiff
path: root/lib/items-tech/table/add-items-dialog.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-06-13 07:22:04 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-06-13 07:22:04 +0000
commit9f3b8915ab20f177edafd3c4a4cc1ca0da0fc766 (patch)
treedf110ca4a654bc3b3d0bd02b68cba45a25a7c39e /lib/items-tech/table/add-items-dialog.tsx
parent0fddf148402fd6b99a1b3800d73679899bcb2ed3 (diff)
(최겸) 기술영업 아이템 수정(컬럼명 및 item table FK 삭제, rfq에서 사용하는 service 수정)
Diffstat (limited to 'lib/items-tech/table/add-items-dialog.tsx')
-rw-r--r--lib/items-tech/table/add-items-dialog.tsx24
1 files changed, 1 insertions, 23 deletions
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
});