From f1e369df9fdb883efe0b9febe98bcca6206eeec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Thu, 5 Feb 2026 21:58:06 +0900 Subject: [PATCH] =?UTF-8?q?feat:=ED=92=88=EB=AA=A9=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=EC=97=90=20=EC=88=98=EC=9E=85=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=EB=B0=B0=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ItemMaster 타입에 hasInspectionTemplate 필드 추가 - API 응답 변환 함수에 has_inspection_template 매핑 - 수입검사 양식 연결 품목에 녹색 배지 표시 --- src/components/quotes/ItemSearchModal.tsx | 9 +++++++-- src/lib/api/items.ts | 4 ++++ src/types/item.ts | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/quotes/ItemSearchModal.tsx b/src/components/quotes/ItemSearchModal.tsx index e2b46bb2..bf853796 100644 --- a/src/components/quotes/ItemSearchModal.tsx +++ b/src/components/quotes/ItemSearchModal.tsx @@ -179,9 +179,14 @@ export function ItemSearchModal({ className="p-3 hover:bg-blue-50 cursor-pointer transition-colors" >
-
+
{item.itemCode} - {item.itemName} + {item.itemName} + {item.hasInspectionTemplate && ( + + 수입검사 + + )}
{item.unit && ( diff --git a/src/lib/api/items.ts b/src/lib/api/items.ts index 5d775ffa..4aa3830d 100644 --- a/src/lib/api/items.ts +++ b/src/lib/api/items.ts @@ -104,6 +104,9 @@ interface ApiItemResponse { itemName?: string; itemType?: string; isActive?: boolean; + // 수입검사 양식 연결 여부 + has_inspection_template?: boolean; + hasInspectionTemplate?: boolean; } function transformItemFromApi(apiItem: ApiItemResponse): ItemMaster { @@ -117,6 +120,7 @@ function transformItemFromApi(apiItem: ApiItemResponse): ItemMaster { unit: apiItem.unit || '', specification: apiItem.specification || '', isActive: apiItem.is_active === true || apiItem.is_active === 1 || apiItem.isActive === true, + hasInspectionTemplate: apiItem.has_inspection_template === true || apiItem.hasInspectionTemplate === true, currentRevision: 0, isFinal: false, createdAt: '', diff --git a/src/types/item.ts b/src/types/item.ts index c8b4e830..b6b5fdda 100644 --- a/src/types/item.ts +++ b/src/types/item.ts @@ -132,6 +132,7 @@ export interface ItemMaster { unit: string; // 단위 (EA, SET, KG, M 등) specification?: string; // 규격 isActive?: boolean; // 활성/비활성 + hasInspectionTemplate?: boolean; // 수입검사 양식 연결 여부 // === 분류 === category1?: string; // 대분류