창고 렉 구조 등록 컴포넌트 중복 방지기능 추가

This commit is contained in:
kjs
2025-12-08 17:13:14 +09:00
parent 76bad47bc7
commit ae7c47ee5f
10 changed files with 1027 additions and 193 deletions

View File

@@ -167,6 +167,29 @@ export async function reorderCategoryValues(orderedValueIds: number[]) {
}
}
/**
* 카테고리 코드로 라벨 조회
*
* @param valueCodes - 카테고리 코드 배열 (예: ["CATEGORY_767659DCUF", "CATEGORY_8292565608"])
* @returns { [code]: label } 형태의 매핑 객체
*/
export async function getCategoryLabelsByCodes(valueCodes: string[]) {
try {
if (!valueCodes || valueCodes.length === 0) {
return { success: true, data: {} };
}
const response = await apiClient.post<{
success: boolean;
data: Record<string, string>;
}>("/table-categories/labels-by-codes", { valueCodes });
return response.data;
} catch (error: any) {
console.error("카테고리 라벨 조회 실패:", error);
return { success: false, error: error.message, data: {} };
}
}
// ================================================
// 컬럼 매핑 관련 API (논리명 ↔ 물리명)
// ================================================