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