fix(WEB): 수주 품목 item_code 필드 매핑 추가
- ApiOrderItem 인터페이스에 item_code 필드 추가 - transformItemApiToFrontend에서 item_code 직접 매핑
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user