From e6f4b9b49c864edac0d81d9705e575c7e1ce5a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Mon, 26 Jan 2026 15:29:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(WEB):=20=EC=88=98=EC=A3=BC=20=ED=92=88?= =?UTF-8?q?=EB=AA=A9=20item=5Fcode=20=ED=95=84=EB=93=9C=20=EB=A7=A4?= =?UTF-8?q?=ED=95=91=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ApiOrderItem 인터페이스에 item_code 필드 추가 - transformItemApiToFrontend에서 item_code 직접 매핑 --- src/components/orders/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/orders/actions.ts b/src/components/orders/actions.ts index 4f5839b7..049af14a 100644 --- a/src/components/orders/actions.ts +++ b/src/components/orders/actions.ts @@ -51,6 +51,7 @@ interface ApiOrderItem { id: number; order_id: number; item_id: number | null; + item_code: string | null; item_name: string; specification: string | null; // 제품-부품 매핑용 코드 @@ -486,7 +487,7 @@ function transformItemApiToFrontend(apiItem: ApiOrderItem): OrderItem { return { id: String(apiItem.id), itemId: apiItem.item_id ?? undefined, - itemCode: apiItem.item_id ? `ITEM-${apiItem.item_id}` : undefined, // 임시: 실제 item_code는 API에서 제공 필요 + itemCode: apiItem.item_code ?? undefined, itemName: apiItem.item_name, specification: apiItem.specification ?? undefined, spec: apiItem.specification ?? undefined, // specification alias